diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a0938f7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,8 @@ +[submodule "proto/cosmos-proto"] + path = proto/cosmos-proto + url = https://github.com/cosmos/cosmos-proto.git + branch = main +[submodule "proto/chain"] + path = proto/chain + url = https://github.com/bandprotocol/chain.git + branch = master diff --git a/__tests__/client/client.test.ts b/__tests__/client/client.test.ts index 05575cb..3e6bcc1 100644 --- a/__tests__/client/client.test.ts +++ b/__tests__/client/client.test.ts @@ -5,7 +5,7 @@ import { QueryClient, ServiceError, UnaryResponse, -} from '../../proto/oracle/v1/query_pb_service' +} from '../../codegen/band/oracle/v1/query_pb_service' import { QueryDataSourceRequest, @@ -19,7 +19,7 @@ import { QueryRequestSearchRequest, QueryRequestSearchResponse, QueryRequestResponse, -} from '../../proto/oracle/v1/query_pb' +} from '../../codegen/band/oracle/v1/query_pb' import { DataSource, OracleScript, @@ -29,53 +29,53 @@ import { Report, RawReport, Result, -} from '../../proto/oracle/v1/oracle_pb' -import { ServiceClient } from '../../proto/cosmos/base/tendermint/v1beta1/query_pb_service' +} from '../../codegen/band/oracle/v1/oracle_pb' +import { ServiceClient } from '../../codegen/cosmos/base/tendermint/v1beta1/query_pb_service' import { GetLatestBlockRequest, GetLatestBlockResponse, -} from '../../proto/cosmos/base/tendermint/v1beta1/query_pb' -import { BlockID, Header } from '../../proto/tendermint/types/types_pb' -import { Block } from '../../proto/tendermint/types/block_pb' +} from '../../codegen/cosmos/base/tendermint/v1beta1/query_pb' +import { BlockID, Header } from '../../codegen/tendermint/types/types_pb' +import { Block } from '../../codegen/tendermint/types/block_pb' -import { QueryClient as AuthQueryClient } from '../../proto/cosmos/auth/v1beta1/query_pb_service' -import { QueryClient as QueryAllBalances } from '../../proto/cosmos/bank/v1beta1/query_pb_service' +import { QueryClient as AuthQueryClient } from '../../codegen/cosmos/auth/v1beta1/query_pb_service' +import { QueryClient as QueryAllBalances } from '../../codegen/cosmos/bank/v1beta1/query_pb_service' import { QueryAllBalancesRequest, QueryAllBalancesResponse, -} from '../../proto/cosmos/bank/v1beta1/query_pb' +} from '../../codegen/cosmos/bank/v1beta1/query_pb' import { QueryAccountRequest, QueryAccountResponse, -} from '../../proto/cosmos/auth/v1beta1/query_pb' +} from '../../codegen/cosmos/auth/v1beta1/query_pb' -import { ServiceClient as TxServiceClient } from '../../proto/cosmos/tx/v1beta1/service_pb_service' +import { ServiceClient as TxServiceClient } from '../../codegen/cosmos/tx/v1beta1/service_pb_service' import { GetTxRequest, GetTxResponse, -} from '../../proto/cosmos/tx/v1beta1/service_pb' +} from '../../codegen/cosmos/tx/v1beta1/service_pb' import { Tx, TxBody, AuthInfo, SignerInfo, -} from '../../proto/cosmos/tx/v1beta1/tx_pb' +} from '../../codegen/cosmos/tx/v1beta1/tx_pb' import { Any } from 'google-protobuf/google/protobuf/any_pb' -import { ABCIMessageLog } from '../../proto/cosmos/base/abci/v1beta1/abci_pb' -import { TxResponse } from '../../proto/cosmos/base/abci/v1beta1/abci_pb' -import { StringEvent } from '../../proto/cosmos/base/abci/v1beta1/abci_pb' -import { Attribute } from '../../proto/cosmos/base/abci/v1beta1/abci_pb' -import { SignMode } from '../../proto/cosmos/tx/signing/v1beta1/signing_pb' -import { ModeInfo, Fee } from '../../proto/cosmos/tx/v1beta1/tx_pb' - -jest.mock('../../proto/oracle/v1/query_pb_service') -jest.mock('../../proto/cosmos/base/tendermint/v1beta1/query_pb_service') -jest.mock('../../proto/cosmos/auth/v1beta1/query_pb_service') -jest.mock('../../proto/cosmos/tx/v1beta1/service_pb_service') -jest.mock('../../proto/cosmos/bank/v1beta1/query_pb_service') +import { ABCIMessageLog } from '../../codegen/cosmos/base/abci/v1beta1/abci_pb' +import { TxResponse } from '../../codegen/cosmos/base/abci/v1beta1/abci_pb' +import { StringEvent } from '../../codegen/cosmos/base/abci/v1beta1/abci_pb' +import { Attribute } from '../../codegen/cosmos/base/abci/v1beta1/abci_pb' +import { SignMode } from '../../codegen/cosmos/tx/signing/v1beta1/signing_pb' +import { ModeInfo, Fee } from '../../codegen/cosmos/tx/v1beta1/tx_pb' + +jest.mock('../../codegen/band/oracle/v1/query_pb_service') +jest.mock('../../codegen/cosmos/base/tendermint/v1beta1/query_pb_service') +jest.mock('../../codegen/cosmos/auth/v1beta1/query_pb_service') +jest.mock('../../codegen/cosmos/tx/v1beta1/service_pb_service') +jest.mock('../../codegen/cosmos/bank/v1beta1/query_pb_service') const STATIC_DATE = 1625578450000 Date.now = jest.fn(() => STATIC_DATE) @@ -948,8 +948,11 @@ describe('get latest request', () => { 'aHR0cHM6Ly91cy1ycGMuYmFuZGNoYWluLm9yZy9vcmFjbGUvcmVxdWVzdF9wcmljZXMgQlRDIEVUSA==', }, ], + requester: '', executeGas: 1000000, ibcChannel: undefined, + feeLimitList: [], + tssEncoder: 0, }, reportsList: [ { @@ -998,6 +1001,7 @@ describe('get latest request', () => { resolveStatus: 1, result: 'AAAAAgAAH4lLo7MAAAACGsSNTYA==', }, + signing: undefined, } const response = await client.getLatestRequest( 43, diff --git a/__tests__/client/sendTx.test.ts b/__tests__/client/sendTx.test.ts index 4e76a07..b524e54 100644 --- a/__tests__/client/sendTx.test.ts +++ b/__tests__/client/sendTx.test.ts @@ -1,24 +1,24 @@ import { Client } from '../../src' import { grpc } from '@improbable-eng/grpc-web' -import { ServiceClient as TxServiceClient } from '../../proto/cosmos/tx/v1beta1/service_pb_service' +import { ServiceClient as TxServiceClient } from '../../codegen/cosmos/tx/v1beta1/service_pb_service' import { ServiceError, UnaryResponse, -} from '../../proto/oracle/v1/query_pb_service' +} from '../../codegen/band/oracle/v1/query_pb_service' import { BroadcastTxRequest, BroadcastTxResponse, -} from '../../proto/cosmos/tx/v1beta1/service_pb' -import { TxResponse } from '../../proto/cosmos/base/abci/v1beta1/abci_pb' +} from '../../codegen/cosmos/tx/v1beta1/service_pb' +import { TxResponse } from '../../codegen/cosmos/base/abci/v1beta1/abci_pb' import { ABCIMessageLog, StringEvent, Attribute, -} from '../../proto/cosmos/base/abci/v1beta1/abci_pb' +} from '../../codegen/cosmos/base/abci/v1beta1/abci_pb' -jest.mock('../../proto/cosmos/tx/v1beta1/service_pb_service') +jest.mock('../../codegen/cosmos/tx/v1beta1/service_pb_service') const MockedTxService = jest.mocked(TxServiceClient) diff --git a/__tests__/message.test.ts b/__tests__/message.test.ts index f93ab68..c8287fe 100644 --- a/__tests__/message.test.ts +++ b/__tests__/message.test.ts @@ -1,4 +1,4 @@ -import { Coin } from '../proto/cosmos/base/v1beta1/coin_pb' +import { Coin } from '../codegen/cosmos/base/v1beta1/coin_pb' import { Any } from 'google-protobuf/google/protobuf/any_pb' import { @@ -14,30 +14,22 @@ import { MsgEditDataSource, MsgCreateOracleScript, MsgEditOracleScript, - MsgVoteCouncil, MsgDeposit, - MsgSubmitProposal, - MsgSubmitCouncilProposal, - MsgSubmitSignals, + MsgVoteSignals, MsgSubmitSignalPrices, MsgUpdateReferenceSourceConfig, MsgUpdateParams, } from '../src/message' -import { VoteOption } from '../proto/cosmos/gov/v1beta1/gov_pb' -import { - CouncilType, - VoteOption as VoteOptionCouncil, -} from '../proto/council/v1beta1/types_pb' +import { VoteOption } from '../codegen/cosmos/gov/v1beta1/gov_pb' import fs from 'fs' import path from 'path' -import { VetoProposal } from '../src/proposal' import { Signal, SignalPrice, ReferenceSourceConfig, -} from '../proto/feeds/v1beta1/feeds_pb' -import { Params } from '../proto/feeds/v1beta1/params_pb' +} from '../codegen/band/feeds/v1beta1/feeds_pb' +import { Params } from '../codegen/band/feeds/v1beta1/params_pb' let coin = new Coin() coin.setDenom('uband') @@ -925,55 +917,6 @@ describe('MsgEditOracleScript', () => { }) }) -describe('MsgVoteCouncil', () => { - it('vote successfully', () => { - const msgVote = new MsgVoteCouncil( - 1, - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - VoteOption.VOTE_OPTION_YES, - ) - - const anyMsg = new Any() - const name = 'council.v1beta1.MsgVote' - anyMsg.pack(msgVote.serializeBinary(), name, '/') - - expect(msgVote.toAny()).toEqual(anyMsg) - - expect(() => msgVote.validate()).not.toThrow() - }) - - it('error MsgVote', () => { - let msgs: MsgVoteCouncil[] = [] - let errorText: string[] = [] - - msgs.push( - new MsgVoteCouncil( - 0, - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - VoteOptionCouncil.VOTE_OPTION_YES, - ), - ) - msgs.push(new MsgVoteCouncil(1, '', VoteOptionCouncil.VOTE_OPTION_YES)) - msgs.push( - new MsgVoteCouncil( - 1, - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - VoteOptionCouncil.VOTE_OPTION_UNSPECIFIED, - ), - ) - - errorText.push('proposalId cannot be less than zero') - errorText.push('Address should not be an empty string') - errorText.push('VoteOption should not be VOTE_OPTION_UNSPECIFIED') - - msgs.forEach((msg, index) => { - expect(() => { - msg.validate() - }).toThrowError(errorText[index]) - }) - }) -}) - describe('MsgDeposit', () => { it('deposit successfully', () => { const msgDeposit = new MsgDeposit( @@ -1021,189 +964,32 @@ describe('MsgDeposit', () => { }) }) -describe('MsgSubmitProposal', () => { - it('submit proposal successfully', () => { - const msgSubmitProposal = new MsgSubmitProposal( - [coin], - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - new VetoProposal(1, 'title'), - ) - - const anyMsg = new Any() - const name = 'cosmos.gov.v1beta1.MsgSubmitProposal' - anyMsg.pack(msgSubmitProposal.serializeBinary(), name, '/') - - expect(msgSubmitProposal.toAny()).toEqual(anyMsg) - - expect(() => msgSubmitProposal.validate()).not.toThrow() - }) - - it('error MsgSubmitProposal', () => { - let msgs: MsgSubmitProposal[] = [] - let errorText: string[] = [] - - msgs.push( - new MsgSubmitProposal([], 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c'), - ) - msgs.push(new MsgSubmitProposal([coin], '')) - - errorText.push('Expect at least 1 coin') - errorText.push('proposer should not be an empty string') - - msgs.forEach((msg, index) => { - expect(() => { - msg.validate() - }).toThrowError(errorText[index]) - }) - }) -}) - -describe('MsgSubmitCouncilProposal', () => { - it('submit council proposal successfully', () => { - const msgSubmitProposal = new MsgSubmitCouncilProposal( - 'council proposal', - CouncilType.COUNCIL_TYPE_BAND_DAO, - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [ - new MsgSend( - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [coin], - ), - ], - 'test metadata', - ) - - const anyMsg = new Any() - const name = 'council.v1beta1.MsgSubmitProposal' - anyMsg.pack(msgSubmitProposal.serializeBinary(), name, '/') - - expect(msgSubmitProposal.toAny()).toEqual(anyMsg) - - expect(() => msgSubmitProposal.validate()).not.toThrow() - }) - - it('error MsgSubmitCouncilProposal', () => { - let msgs: MsgSubmitCouncilProposal[] = [] - let errorText: string[] = [] - - // title should not be an empty string - msgs.push( - new MsgSubmitCouncilProposal( - '', - CouncilType.COUNCIL_TYPE_BAND_DAO, - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [ - new MsgSend( - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [coin], - ), - ], - 'test metadata', - ), - ) - - // council should not be COUNCIL_TYPE_UNSPECIFIED - msgs.push( - new MsgSubmitCouncilProposal( - 'council proposal', - CouncilType.COUNCIL_TYPE_UNSPECIFIED, - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [ - new MsgSend( - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [coin], - ), - ], - 'test metadata', - ), - ) - - msgs.push( - new MsgSubmitCouncilProposal( - 'council proposal', - CouncilType.COUNCIL_TYPE_BAND_DAO, - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [], - 'test metadata', - ), - ) - - msgs.push( - new MsgSubmitCouncilProposal( - 'council proposal', - CouncilType.COUNCIL_TYPE_BAND_DAO, - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [ - new MsgSend( - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [coin], - ), - ], - '', - ), - ) - - msgs.push( - new MsgSubmitCouncilProposal( - 'council proposal', - CouncilType.COUNCIL_TYPE_BAND_DAO, - '', - [ - new MsgSend( - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', - [coin], - ), - ], - 'meta', - ), - ) - - errorText.push('title should not be an empty string') - errorText.push('council should not be COUNCIL_TYPE_UNSPECIFIED') - errorText.push('messages should not be an empty string') - errorText.push('metadata should not be an empty string') - errorText.push('proposer should not be an empty string') - - msgs.forEach((msg, index) => { - expect(() => { - // @ts-ignore - msg.validate() - }).toThrowError(errorText[index]) - }) - }) -}) - -describe('MsgSubmitSignals', () => { +describe('MsgVoteSignals', () => { let signal = new Signal() signal.setId('crypto_prices.btcbusd') signal.setPower(1) it('create successfully', () => { - const msgSubmitSignals = new MsgSubmitSignals( + const msgVoteSignals = new MsgVoteSignals( 'band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c', [signal], ) const anyMsg = new Any() - const name = 'feeds.v1beta1.MsgSubmitSignals' - anyMsg.pack(msgSubmitSignals.serializeBinary(), name, '/') + const name = 'band.feeds.v1beta1.MsgVote' + anyMsg.pack(msgVoteSignals.serializeBinary(), name, '/') - expect(msgSubmitSignals.toAny()).toEqual(anyMsg) + expect(msgVoteSignals.toAny()).toEqual(anyMsg) - expect(() => msgSubmitSignals.validate()).not.toThrow() + expect(() => msgVoteSignals.validate()).not.toThrow() }) - it('error MsgSubmitSignals', () => { - let msgs: MsgSubmitSignals[] = [] + it('error MsgVoteSignals', () => { + let msgs: MsgVoteSignals[] = [] let errorText: string[] = [] - msgs.push(new MsgSubmitSignals('', [signal])) + msgs.push(new MsgVoteSignals('', [signal])) - errorText.push('Delegator address should not be an empty string') + errorText.push('Voter address should not be an empty string') msgs.forEach((msg, index) => { expect(() => { @@ -1217,7 +1003,7 @@ describe('MsgSubmitSignalPrice', () => { const signalPrice = new SignalPrice() signalPrice.setSignalId('crypto_price.btcbusd') signalPrice.setPrice(1) - signalPrice.setPriceStatus(0) + signalPrice.setStatus(0) it('create successfully', () => { const msgSubmitSignalPrice = new MsgSubmitSignalPrices( @@ -1227,7 +1013,7 @@ describe('MsgSubmitSignalPrice', () => { ) const anyMsg = new Any() - const name = 'feeds.v1beta1.MsgSubmitSignalPrices' + const name = 'band.feeds.v1beta1.MsgSubmitSignalPrices' anyMsg.pack(msgSubmitSignalPrice.serializeBinary(), name, '/') expect(msgSubmitSignalPrice.toAny()).toEqual(anyMsg) @@ -1235,7 +1021,7 @@ describe('MsgSubmitSignalPrice', () => { expect(() => msgSubmitSignalPrice.validate()).not.toThrow() }) - it('error MsgSubmitSignals', () => { + it('error MsgSubmitSignalPrice', () => { let msgs: MsgSubmitSignalPrices[] = [] let errorText: string[] = [] @@ -1261,8 +1047,10 @@ describe('MsgSubmitSignalPrice', () => { describe('MsgUpdateReferenceSourceConfig', () => { const referenceSource = new ReferenceSourceConfig() - referenceSource.setIpfsHash('QmTzQ1b4SijKVDe3XZPq3N5tHk3PvCjAosYtK6KDxDZXn6') - referenceSource.setVersion('1.1') + referenceSource.setRegistryIpfsHash( + 'QmTzQ1b4SijKVDe3XZPq3N5tHk3PvCjAosYtK6KDxDZXn6', + ) + referenceSource.setRegistryVersion('1.1') it('create successfully', () => { const msgUpdateReferenceSourceConfig = new MsgUpdateReferenceSourceConfig( @@ -1279,7 +1067,7 @@ describe('MsgUpdateReferenceSourceConfig', () => { expect(() => msgUpdateReferenceSourceConfig.validate()).not.toThrow() }) - it('error MsgSubmitSignals', () => { + it('error MsgUpdateReferenceSourceConfig', () => { let msgs: MsgUpdateReferenceSourceConfig[] = [] let errorText: string[] = [] @@ -1324,7 +1112,7 @@ describe('MsgUpdateParams', () => { expect(() => msgUpdateParams.validate()).not.toThrow() }) - it('error MsgSubmitSignals', () => { + it('error MsgUpdateParams', () => { let msgs: MsgUpdateParams[] = [] let errorText: string[] = [] diff --git a/__tests__/transaction.test.ts b/__tests__/transaction.test.ts index 58a1095..1bfbc05 100644 --- a/__tests__/transaction.test.ts +++ b/__tests__/transaction.test.ts @@ -1,7 +1,7 @@ import Transaction from '../src/transaction' import { MsgRequestData } from '../src/message' -import { Coin } from '../proto/cosmos/base/v1beta1/coin_pb' -import { Fee } from '../proto/cosmos/tx/v1beta1/tx_pb' +import { Coin } from '../codegen/cosmos/base/v1beta1/coin_pb' +import { Fee } from '../codegen/cosmos/tx/v1beta1/tx_pb' import { PrivateKey } from '../src/wallet' describe('Transaction', () => { diff --git a/codegen/amino/amino.ts b/codegen/amino/amino.ts new file mode 100644 index 0000000..f931059 --- /dev/null +++ b/codegen/amino/amino.ts @@ -0,0 +1,7 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: amino/amino.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../google/protobuf/descriptor"; +export namespace amino { } diff --git a/proto/amino/amino_pb.d.ts b/codegen/amino/amino_pb.d.ts similarity index 89% rename from proto/amino/amino_pb.d.ts rename to codegen/amino/amino_pb.d.ts index a82b8bc..7afe816 100644 --- a/proto/amino/amino_pb.d.ts +++ b/codegen/amino/amino_pb.d.ts @@ -14,3 +14,5 @@ import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/ export const dontOmitempty: jspb.ExtensionFieldInfo; + export const oneofName: jspb.ExtensionFieldInfo; + diff --git a/proto/amino/amino_pb.js b/codegen/amino/amino_pb.js similarity index 85% rename from proto/amino/amino_pb.js rename to codegen/amino/amino_pb.js index cafd6de..bf77a14 100644 --- a/proto/amino/amino_pb.js +++ b/codegen/amino/amino_pb.js @@ -22,6 +22,7 @@ goog.exportSymbol('proto.amino.encoding', null, global); goog.exportSymbol('proto.amino.fieldName', null, global); goog.exportSymbol('proto.amino.messageEncoding', null, global); goog.exportSymbol('proto.amino.name', null, global); +goog.exportSymbol('proto.amino.oneofName', null, global); /** * A tuple of {field number, class constructor} for the extension @@ -147,4 +148,29 @@ google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[11110005] = new jspb // toObject() will function correctly. google_protobuf_descriptor_pb.FieldOptions.extensions[11110005] = proto.amino.dontOmitempty; + +/** + * A tuple of {field number, class constructor} for the extension + * field named `oneofName`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.amino.oneofName = new jspb.ExtensionFieldInfo( + 11110006, + {oneofName: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[11110006] = new jspb.ExtensionFieldBinaryInfo( + proto.amino.oneofName, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[11110006] = proto.amino.oneofName; + goog.object.extend(exports, proto.amino); diff --git a/proto/amino/amino_pb_service.d.ts b/codegen/amino/amino_pb_service.d.ts similarity index 100% rename from proto/amino/amino_pb_service.d.ts rename to codegen/amino/amino_pb_service.d.ts diff --git a/proto/amino/amino_pb_service.js b/codegen/amino/amino_pb_service.js similarity index 100% rename from proto/amino/amino_pb_service.js rename to codegen/amino/amino_pb_service.js diff --git a/codegen/band/bandtss/v1beta1/bandtss.ts b/codegen/band/bandtss/v1beta1/bandtss.ts new file mode 100644 index 0000000..ea03d04 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/bandtss.ts @@ -0,0 +1,733 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/bandtss/v1beta1/bandtss.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/timestamp"; +import * as dependency_3 from "./../../../cosmos/base/v1beta1/coin"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +export namespace band.bandtss.v1beta1 { + export enum TransitionStatus { + TRANSITION_STATUS_UNSPECIFIED = 0, + TRANSITION_STATUS_CREATING_GROUP = 1, + TRANSITION_STATUS_WAITING_SIGN = 2, + TRANSITION_STATUS_WAITING_EXECUTION = 3 + } + export class Member extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + group_id?: number; + is_active?: boolean; + since?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("is_active" in data && data.is_active != undefined) { + this.is_active = data.is_active; + } + if ("since" in data && data.since != undefined) { + this.since = data.since; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get is_active() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set is_active(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get since() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 4) as dependency_2.google.protobuf.Timestamp; + } + set since(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_since() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + address?: string; + group_id?: number; + is_active?: boolean; + since?: ReturnType; + }): Member { + const message = new Member({}); + if (data.address != null) { + message.address = data.address; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.is_active != null) { + message.is_active = data.is_active; + } + if (data.since != null) { + message.since = dependency_2.google.protobuf.Timestamp.fromObject(data.since); + } + return message; + } + toObject() { + const data: { + address?: string; + group_id?: number; + is_active?: boolean; + since?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.is_active != null) { + data.is_active = this.is_active; + } + if (this.since != null) { + data.since = this.since.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.address.length) + writer.writeString(1, this.address); + if (this.group_id != 0) + writer.writeUint64(2, this.group_id); + if (this.is_active != false) + writer.writeBool(3, this.is_active); + if (this.has_since) + writer.writeMessage(4, this.since, () => this.since.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Member { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Member(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.group_id = reader.readUint64(); + break; + case 3: + message.is_active = reader.readBool(); + break; + case 4: + reader.readMessage(message.since, () => message.since = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Member { + return Member.deserialize(bytes); + } + } + export class CurrentGroup extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + active_time?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("active_time" in data && data.active_time != undefined) { + this.active_time = data.active_time; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get active_time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 2) as dependency_2.google.protobuf.Timestamp; + } + set active_time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_active_time() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + group_id?: number; + active_time?: ReturnType; + }): CurrentGroup { + const message = new CurrentGroup({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.active_time != null) { + message.active_time = dependency_2.google.protobuf.Timestamp.fromObject(data.active_time); + } + return message; + } + toObject() { + const data: { + group_id?: number; + active_time?: ReturnType; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.active_time != null) { + data.active_time = this.active_time.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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.has_active_time) + writer.writeMessage(2, this.active_time, () => this.active_time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CurrentGroup { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CurrentGroup(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.active_time, () => message.active_time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CurrentGroup { + return CurrentGroup.deserialize(bytes); + } + } + export class Signing extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + fee_per_signer?: dependency_3.cosmos.base.v1beta1.Coin[]; + requester?: string; + current_group_signing_id?: number; + incoming_group_signing_id?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("fee_per_signer" in data && data.fee_per_signer != undefined) { + this.fee_per_signer = data.fee_per_signer; + } + if ("requester" in data && data.requester != undefined) { + this.requester = data.requester; + } + if ("current_group_signing_id" in data && data.current_group_signing_id != undefined) { + this.current_group_signing_id = data.current_group_signing_id; + } + if ("incoming_group_signing_id" in data && data.incoming_group_signing_id != undefined) { + this.incoming_group_signing_id = data.incoming_group_signing_id; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get fee_per_signer() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 2) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set fee_per_signer(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get requester() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set requester(value: string) { + pb_1.Message.setField(this, 3, value); + } + get current_group_signing_id() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set current_group_signing_id(value: number) { + pb_1.Message.setField(this, 4, value); + } + get incoming_group_signing_id() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set incoming_group_signing_id(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + id?: number; + fee_per_signer?: ReturnType[]; + requester?: string; + current_group_signing_id?: number; + incoming_group_signing_id?: number; + }): Signing { + const message = new Signing({}); + if (data.id != null) { + message.id = data.id; + } + if (data.fee_per_signer != null) { + message.fee_per_signer = data.fee_per_signer.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.requester != null) { + message.requester = data.requester; + } + if (data.current_group_signing_id != null) { + message.current_group_signing_id = data.current_group_signing_id; + } + if (data.incoming_group_signing_id != null) { + message.incoming_group_signing_id = data.incoming_group_signing_id; + } + return message; + } + toObject() { + const data: { + id?: number; + fee_per_signer?: ReturnType[]; + requester?: string; + current_group_signing_id?: number; + incoming_group_signing_id?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.fee_per_signer != null) { + data.fee_per_signer = this.fee_per_signer.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.requester != null) { + data.requester = this.requester; + } + if (this.current_group_signing_id != null) { + data.current_group_signing_id = this.current_group_signing_id; + } + if (this.incoming_group_signing_id != null) { + data.incoming_group_signing_id = this.incoming_group_signing_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.id != 0) + writer.writeUint64(1, this.id); + if (this.fee_per_signer.length) + writer.writeRepeatedMessage(2, this.fee_per_signer, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.requester.length) + writer.writeString(3, this.requester); + if (this.current_group_signing_id != 0) + writer.writeUint64(4, this.current_group_signing_id); + if (this.incoming_group_signing_id != 0) + writer.writeUint64(5, this.incoming_group_signing_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Signing { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Signing(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.fee_per_signer, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + case 3: + message.requester = reader.readString(); + break; + case 4: + message.current_group_signing_id = reader.readUint64(); + break; + case 5: + message.incoming_group_signing_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Signing { + return Signing.deserialize(bytes); + } + } + export class GroupTransition extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_id?: number; + current_group_id?: number; + current_group_pub_key?: Uint8Array; + incoming_group_id?: number; + incoming_group_pub_key?: Uint8Array; + status?: TransitionStatus; + exec_time?: dependency_2.google.protobuf.Timestamp; + is_force_transition?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signing_id" in data && data.signing_id != undefined) { + this.signing_id = data.signing_id; + } + if ("current_group_id" in data && data.current_group_id != undefined) { + this.current_group_id = data.current_group_id; + } + if ("current_group_pub_key" in data && data.current_group_pub_key != undefined) { + this.current_group_pub_key = data.current_group_pub_key; + } + if ("incoming_group_id" in data && data.incoming_group_id != undefined) { + this.incoming_group_id = data.incoming_group_id; + } + if ("incoming_group_pub_key" in data && data.incoming_group_pub_key != undefined) { + this.incoming_group_pub_key = data.incoming_group_pub_key; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("exec_time" in data && data.exec_time != undefined) { + this.exec_time = data.exec_time; + } + if ("is_force_transition" in data && data.is_force_transition != undefined) { + this.is_force_transition = data.is_force_transition; + } + } + } + get signing_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get current_group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set current_group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get current_group_pub_key() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set current_group_pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get incoming_group_id() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set incoming_group_id(value: number) { + pb_1.Message.setField(this, 4, value); + } + get incoming_group_pub_key() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set incoming_group_pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 6, TransitionStatus.TRANSITION_STATUS_UNSPECIFIED) as TransitionStatus; + } + set status(value: TransitionStatus) { + pb_1.Message.setField(this, 6, value); + } + get exec_time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 7) as dependency_2.google.protobuf.Timestamp; + } + set exec_time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_exec_time() { + return pb_1.Message.getField(this, 7) != null; + } + get is_force_transition() { + return pb_1.Message.getFieldWithDefault(this, 8, false) as boolean; + } + set is_force_transition(value: boolean) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + signing_id?: number; + current_group_id?: number; + current_group_pub_key?: Uint8Array; + incoming_group_id?: number; + incoming_group_pub_key?: Uint8Array; + status?: TransitionStatus; + exec_time?: ReturnType; + is_force_transition?: boolean; + }): GroupTransition { + const message = new GroupTransition({}); + if (data.signing_id != null) { + message.signing_id = data.signing_id; + } + if (data.current_group_id != null) { + message.current_group_id = data.current_group_id; + } + if (data.current_group_pub_key != null) { + message.current_group_pub_key = data.current_group_pub_key; + } + if (data.incoming_group_id != null) { + message.incoming_group_id = data.incoming_group_id; + } + if (data.incoming_group_pub_key != null) { + message.incoming_group_pub_key = data.incoming_group_pub_key; + } + if (data.status != null) { + message.status = data.status; + } + if (data.exec_time != null) { + message.exec_time = dependency_2.google.protobuf.Timestamp.fromObject(data.exec_time); + } + if (data.is_force_transition != null) { + message.is_force_transition = data.is_force_transition; + } + return message; + } + toObject() { + const data: { + signing_id?: number; + current_group_id?: number; + current_group_pub_key?: Uint8Array; + incoming_group_id?: number; + incoming_group_pub_key?: Uint8Array; + status?: TransitionStatus; + exec_time?: ReturnType; + is_force_transition?: boolean; + } = {}; + if (this.signing_id != null) { + data.signing_id = this.signing_id; + } + if (this.current_group_id != null) { + data.current_group_id = this.current_group_id; + } + if (this.current_group_pub_key != null) { + data.current_group_pub_key = this.current_group_pub_key; + } + if (this.incoming_group_id != null) { + data.incoming_group_id = this.incoming_group_id; + } + if (this.incoming_group_pub_key != null) { + data.incoming_group_pub_key = this.incoming_group_pub_key; + } + if (this.status != null) { + data.status = this.status; + } + if (this.exec_time != null) { + data.exec_time = this.exec_time.toObject(); + } + if (this.is_force_transition != null) { + data.is_force_transition = this.is_force_transition; + } + 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.signing_id != 0) + writer.writeUint64(1, this.signing_id); + if (this.current_group_id != 0) + writer.writeUint64(2, this.current_group_id); + if (this.current_group_pub_key.length) + writer.writeBytes(3, this.current_group_pub_key); + if (this.incoming_group_id != 0) + writer.writeUint64(4, this.incoming_group_id); + if (this.incoming_group_pub_key.length) + writer.writeBytes(5, this.incoming_group_pub_key); + if (this.status != TransitionStatus.TRANSITION_STATUS_UNSPECIFIED) + writer.writeEnum(6, this.status); + if (this.has_exec_time) + writer.writeMessage(7, this.exec_time, () => this.exec_time.serialize(writer)); + if (this.is_force_transition != false) + writer.writeBool(8, this.is_force_transition); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GroupTransition { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GroupTransition(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_id = reader.readUint64(); + break; + case 2: + message.current_group_id = reader.readUint64(); + break; + case 3: + message.current_group_pub_key = reader.readBytes(); + break; + case 4: + message.incoming_group_id = reader.readUint64(); + break; + case 5: + message.incoming_group_pub_key = reader.readBytes(); + break; + case 6: + message.status = reader.readEnum(); + break; + case 7: + reader.readMessage(message.exec_time, () => message.exec_time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 8: + message.is_force_transition = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GroupTransition { + return GroupTransition.deserialize(bytes); + } + } + export class GroupTransitionSignatureOrder extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pub_key?: Uint8Array; + transition_time?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("transition_time" in data && data.transition_time != undefined) { + this.transition_time = data.transition_time; + } + } + } + get pub_key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get transition_time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 2) as dependency_2.google.protobuf.Timestamp; + } + set transition_time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_transition_time() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + pub_key?: Uint8Array; + transition_time?: ReturnType; + }): GroupTransitionSignatureOrder { + const message = new GroupTransitionSignatureOrder({}); + if (data.pub_key != null) { + message.pub_key = data.pub_key; + } + if (data.transition_time != null) { + message.transition_time = dependency_2.google.protobuf.Timestamp.fromObject(data.transition_time); + } + return message; + } + toObject() { + const data: { + pub_key?: Uint8Array; + transition_time?: ReturnType; + } = {}; + if (this.pub_key != null) { + data.pub_key = this.pub_key; + } + if (this.transition_time != null) { + data.transition_time = this.transition_time.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.pub_key.length) + writer.writeBytes(1, this.pub_key); + if (this.has_transition_time) + writer.writeMessage(2, this.transition_time, () => this.transition_time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GroupTransitionSignatureOrder { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GroupTransitionSignatureOrder(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.pub_key = reader.readBytes(); + break; + case 2: + reader.readMessage(message.transition_time, () => message.transition_time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GroupTransitionSignatureOrder { + return GroupTransitionSignatureOrder.deserialize(bytes); + } + } +} diff --git a/codegen/band/bandtss/v1beta1/bandtss_pb.d.ts b/codegen/band/bandtss/v1beta1/bandtss_pb.d.ts new file mode 100644 index 0000000..319428f --- /dev/null +++ b/codegen/band/bandtss/v1beta1/bandtss_pb.d.ts @@ -0,0 +1,198 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/bandtss.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; + +export class Member extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + getGroupId(): number; + setGroupId(value: number): void; + + getIsActive(): boolean; + setIsActive(value: boolean): void; + + hasSince(): boolean; + clearSince(): void; + getSince(): google_protobuf_timestamp_pb.Timestamp | undefined; + setSince(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Member.AsObject; + static toObject(includeInstance: boolean, msg: Member): Member.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Member, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Member; + static deserializeBinaryFromReader(message: Member, reader: jspb.BinaryReader): Member; +} + +export namespace Member { + export type AsObject = { + address: string, + groupId: number, + isActive: boolean, + since?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class CurrentGroup extends jspb.Message { + getGroupId(): number; + setGroupId(value: number): void; + + hasActiveTime(): boolean; + clearActiveTime(): void; + getActiveTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setActiveTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CurrentGroup.AsObject; + static toObject(includeInstance: boolean, msg: CurrentGroup): CurrentGroup.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CurrentGroup, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CurrentGroup; + static deserializeBinaryFromReader(message: CurrentGroup, reader: jspb.BinaryReader): CurrentGroup; +} + +export namespace CurrentGroup { + export type AsObject = { + groupId: number, + activeTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class Signing extends jspb.Message { + getId(): number; + setId(value: number): void; + + clearFeePerSignerList(): void; + getFeePerSignerList(): Array; + setFeePerSignerList(value: Array): void; + addFeePerSigner(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getRequester(): string; + setRequester(value: string): void; + + getCurrentGroupSigningId(): number; + setCurrentGroupSigningId(value: number): void; + + getIncomingGroupSigningId(): number; + setIncomingGroupSigningId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Signing.AsObject; + static toObject(includeInstance: boolean, msg: Signing): Signing.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Signing, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Signing; + static deserializeBinaryFromReader(message: Signing, reader: jspb.BinaryReader): Signing; +} + +export namespace Signing { + export type AsObject = { + id: number, + feePerSignerList: Array, + requester: string, + currentGroupSigningId: number, + incomingGroupSigningId: number, + } +} + +export class GroupTransition extends jspb.Message { + getSigningId(): number; + setSigningId(value: number): void; + + getCurrentGroupId(): number; + setCurrentGroupId(value: number): void; + + getCurrentGroupPubKey(): Uint8Array | string; + getCurrentGroupPubKey_asU8(): Uint8Array; + getCurrentGroupPubKey_asB64(): string; + setCurrentGroupPubKey(value: Uint8Array | string): void; + + getIncomingGroupId(): number; + setIncomingGroupId(value: number): void; + + getIncomingGroupPubKey(): Uint8Array | string; + getIncomingGroupPubKey_asU8(): Uint8Array; + getIncomingGroupPubKey_asB64(): string; + setIncomingGroupPubKey(value: Uint8Array | string): void; + + getStatus(): TransitionStatusMap[keyof TransitionStatusMap]; + setStatus(value: TransitionStatusMap[keyof TransitionStatusMap]): void; + + hasExecTime(): boolean; + clearExecTime(): void; + getExecTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setExecTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getIsForceTransition(): boolean; + setIsForceTransition(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupTransition.AsObject; + static toObject(includeInstance: boolean, msg: GroupTransition): GroupTransition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupTransition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupTransition; + static deserializeBinaryFromReader(message: GroupTransition, reader: jspb.BinaryReader): GroupTransition; +} + +export namespace GroupTransition { + export type AsObject = { + signingId: number, + currentGroupId: number, + currentGroupPubKey: Uint8Array | string, + incomingGroupId: number, + incomingGroupPubKey: Uint8Array | string, + status: TransitionStatusMap[keyof TransitionStatusMap], + execTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + isForceTransition: boolean, + } +} + +export class GroupTransitionSignatureOrder extends jspb.Message { + getPubKey(): Uint8Array | string; + getPubKey_asU8(): Uint8Array; + getPubKey_asB64(): string; + setPubKey(value: Uint8Array | string): void; + + hasTransitionTime(): boolean; + clearTransitionTime(): void; + getTransitionTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTransitionTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupTransitionSignatureOrder.AsObject; + static toObject(includeInstance: boolean, msg: GroupTransitionSignatureOrder): GroupTransitionSignatureOrder.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupTransitionSignatureOrder, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupTransitionSignatureOrder; + static deserializeBinaryFromReader(message: GroupTransitionSignatureOrder, reader: jspb.BinaryReader): GroupTransitionSignatureOrder; +} + +export namespace GroupTransitionSignatureOrder { + export type AsObject = { + pubKey: Uint8Array | string, + transitionTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export interface TransitionStatusMap { + TRANSITION_STATUS_UNSPECIFIED: 0; + TRANSITION_STATUS_CREATING_GROUP: 1; + TRANSITION_STATUS_WAITING_SIGN: 2; + TRANSITION_STATUS_WAITING_EXECUTION: 3; +} + +export const TransitionStatus: TransitionStatusMap; + diff --git a/codegen/band/bandtss/v1beta1/bandtss_pb.js b/codegen/band/bandtss/v1beta1/bandtss_pb.js new file mode 100644 index 0000000..f3999a5 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/bandtss_pb.js @@ -0,0 +1,1463 @@ +// source: band/bandtss/v1beta1/bandtss.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +goog.exportSymbol('proto.band.bandtss.v1beta1.CurrentGroup', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.GroupTransition', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.Member', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.Signing', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.TransitionStatus', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.Member = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.Member, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.Member.displayName = 'proto.band.bandtss.v1beta1.Member'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.CurrentGroup = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.CurrentGroup, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.CurrentGroup.displayName = 'proto.band.bandtss.v1beta1.CurrentGroup'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.Signing = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.bandtss.v1beta1.Signing.repeatedFields_, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.Signing, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.Signing.displayName = 'proto.band.bandtss.v1beta1.Signing'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.GroupTransition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.GroupTransition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.GroupTransition.displayName = 'proto.band.bandtss.v1beta1.GroupTransition'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.displayName = 'proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.Member.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.Member.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.Member} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.Member.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + groupId: jspb.Message.getFieldWithDefault(msg, 2, 0), + isActive: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + since: (f = msg.getSince()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.Member} + */ +proto.band.bandtss.v1beta1.Member.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.Member; + return proto.band.bandtss.v1beta1.Member.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.Member} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.Member} + */ +proto.band.bandtss.v1beta1.Member.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsActive(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setSince(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.Member.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.Member.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.Member} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.Member.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getIsActive(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getSince(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.band.bandtss.v1beta1.Member.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.Member} returns this + */ +proto.band.bandtss.v1beta1.Member.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 group_id = 2; + * @return {number} + */ +proto.band.bandtss.v1beta1.Member.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.Member} returns this + */ +proto.band.bandtss.v1beta1.Member.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bool is_active = 3; + * @return {boolean} + */ +proto.band.bandtss.v1beta1.Member.prototype.getIsActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.bandtss.v1beta1.Member} returns this + */ +proto.band.bandtss.v1beta1.Member.prototype.setIsActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp since = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.band.bandtss.v1beta1.Member.prototype.getSince = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.band.bandtss.v1beta1.Member} returns this +*/ +proto.band.bandtss.v1beta1.Member.prototype.setSince = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.Member} returns this + */ +proto.band.bandtss.v1beta1.Member.prototype.clearSince = function() { + return this.setSince(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.Member.prototype.hasSince = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.CurrentGroup.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.CurrentGroup.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.CurrentGroup} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.CurrentGroup.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), + activeTime: (f = msg.getActiveTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.CurrentGroup} + */ +proto.band.bandtss.v1beta1.CurrentGroup.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.CurrentGroup; + return proto.band.bandtss.v1beta1.CurrentGroup.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.CurrentGroup} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.CurrentGroup} + */ +proto.band.bandtss.v1beta1.CurrentGroup.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setActiveTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.CurrentGroup.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.CurrentGroup.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.CurrentGroup} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.CurrentGroup.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getActiveTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 group_id = 1; + * @return {number} + */ +proto.band.bandtss.v1beta1.CurrentGroup.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.CurrentGroup} returns this + */ +proto.band.bandtss.v1beta1.CurrentGroup.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp active_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.band.bandtss.v1beta1.CurrentGroup.prototype.getActiveTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.band.bandtss.v1beta1.CurrentGroup} returns this +*/ +proto.band.bandtss.v1beta1.CurrentGroup.prototype.setActiveTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.CurrentGroup} returns this + */ +proto.band.bandtss.v1beta1.CurrentGroup.prototype.clearActiveTime = function() { + return this.setActiveTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.CurrentGroup.prototype.hasActiveTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.bandtss.v1beta1.Signing.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.Signing.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.Signing.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.Signing} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.Signing.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + feePerSignerList: jspb.Message.toObjectList(msg.getFeePerSignerList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + requester: jspb.Message.getFieldWithDefault(msg, 3, ""), + currentGroupSigningId: jspb.Message.getFieldWithDefault(msg, 4, 0), + incomingGroupSigningId: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.Signing} + */ +proto.band.bandtss.v1beta1.Signing.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.Signing; + return proto.band.bandtss.v1beta1.Signing.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.Signing} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.Signing} + */ +proto.band.bandtss.v1beta1.Signing.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFeePerSigner(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRequester(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCurrentGroupSigningId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIncomingGroupSigningId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.Signing.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.Signing.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.Signing} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.Signing.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getFeePerSignerList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRequester(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCurrentGroupSigningId(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getIncomingGroupSigningId(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional uint64 id = 1; + * @return {number} + */ +proto.band.bandtss.v1beta1.Signing.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.Signing} returns this + */ +proto.band.bandtss.v1beta1.Signing.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee_per_signer = 2; + * @return {!Array} + */ +proto.band.bandtss.v1beta1.Signing.prototype.getFeePerSignerList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.bandtss.v1beta1.Signing} returns this +*/ +proto.band.bandtss.v1beta1.Signing.prototype.setFeePerSignerList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.bandtss.v1beta1.Signing.prototype.addFeePerSigner = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.bandtss.v1beta1.Signing} returns this + */ +proto.band.bandtss.v1beta1.Signing.prototype.clearFeePerSignerList = function() { + return this.setFeePerSignerList([]); +}; + + +/** + * optional string requester = 3; + * @return {string} + */ +proto.band.bandtss.v1beta1.Signing.prototype.getRequester = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.Signing} returns this + */ +proto.band.bandtss.v1beta1.Signing.prototype.setRequester = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 current_group_signing_id = 4; + * @return {number} + */ +proto.band.bandtss.v1beta1.Signing.prototype.getCurrentGroupSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.Signing} returns this + */ +proto.band.bandtss.v1beta1.Signing.prototype.setCurrentGroupSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 incoming_group_signing_id = 5; + * @return {number} + */ +proto.band.bandtss.v1beta1.Signing.prototype.getIncomingGroupSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.Signing} returns this + */ +proto.band.bandtss.v1beta1.Signing.prototype.setIncomingGroupSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.GroupTransition.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.GroupTransition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.GroupTransition.toObject = function(includeInstance, msg) { + var f, obj = { + signingId: jspb.Message.getFieldWithDefault(msg, 1, 0), + currentGroupId: jspb.Message.getFieldWithDefault(msg, 2, 0), + currentGroupPubKey: msg.getCurrentGroupPubKey_asB64(), + incomingGroupId: jspb.Message.getFieldWithDefault(msg, 4, 0), + incomingGroupPubKey: msg.getIncomingGroupPubKey_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 6, 0), + execTime: (f = msg.getExecTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + isForceTransition: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.GroupTransition} + */ +proto.band.bandtss.v1beta1.GroupTransition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.GroupTransition; + return proto.band.bandtss.v1beta1.GroupTransition.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.GroupTransition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.GroupTransition} + */ +proto.band.bandtss.v1beta1.GroupTransition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCurrentGroupId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCurrentGroupPubKey(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIncomingGroupId(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIncomingGroupPubKey(value); + break; + case 6: + var value = /** @type {!proto.band.bandtss.v1beta1.TransitionStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 7: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExecTime(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsForceTransition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.GroupTransition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.GroupTransition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.GroupTransition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigningId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCurrentGroupId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getCurrentGroupPubKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getIncomingGroupId(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getIncomingGroupPubKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 6, + f + ); + } + f = message.getExecTime(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getIsForceTransition(); + if (f) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional uint64 signing_id = 1; + * @return {number} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.GroupTransition} returns this + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.setSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 current_group_id = 2; + * @return {number} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getCurrentGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.GroupTransition} returns this + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.setCurrentGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes current_group_pub_key = 3; + * @return {!(string|Uint8Array)} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getCurrentGroupPubKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes current_group_pub_key = 3; + * This is a type-conversion wrapper around `getCurrentGroupPubKey()` + * @return {string} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getCurrentGroupPubKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCurrentGroupPubKey())); +}; + + +/** + * optional bytes current_group_pub_key = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCurrentGroupPubKey()` + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getCurrentGroupPubKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCurrentGroupPubKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.bandtss.v1beta1.GroupTransition} returns this + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.setCurrentGroupPubKey = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 incoming_group_id = 4; + * @return {number} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getIncomingGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.GroupTransition} returns this + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.setIncomingGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes incoming_group_pub_key = 5; + * @return {!(string|Uint8Array)} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getIncomingGroupPubKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes incoming_group_pub_key = 5; + * This is a type-conversion wrapper around `getIncomingGroupPubKey()` + * @return {string} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getIncomingGroupPubKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIncomingGroupPubKey())); +}; + + +/** + * optional bytes incoming_group_pub_key = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIncomingGroupPubKey()` + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getIncomingGroupPubKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIncomingGroupPubKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.bandtss.v1beta1.GroupTransition} returns this + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.setIncomingGroupPubKey = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional TransitionStatus status = 6; + * @return {!proto.band.bandtss.v1beta1.TransitionStatus} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getStatus = function() { + return /** @type {!proto.band.bandtss.v1beta1.TransitionStatus} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.band.bandtss.v1beta1.TransitionStatus} value + * @return {!proto.band.bandtss.v1beta1.GroupTransition} returns this + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 6, value); +}; + + +/** + * optional google.protobuf.Timestamp exec_time = 7; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getExecTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.band.bandtss.v1beta1.GroupTransition} returns this +*/ +proto.band.bandtss.v1beta1.GroupTransition.prototype.setExecTime = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.GroupTransition} returns this + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.clearExecTime = function() { + return this.setExecTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.hasExecTime = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bool is_force_transition = 8; + * @return {boolean} + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.getIsForceTransition = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.bandtss.v1beta1.GroupTransition} returns this + */ +proto.band.bandtss.v1beta1.GroupTransition.prototype.setIsForceTransition = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: msg.getPubKey_asB64(), + transitionTime: (f = msg.getTransitionTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder} + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder; + return proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder} + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubKey(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTransitionTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTransitionTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes pub_key = 1; + * @return {!(string|Uint8Array)} + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.getPubKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes pub_key = 1; + * This is a type-conversion wrapper around `getPubKey()` + * @return {string} + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.getPubKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPubKey())); +}; + + +/** + * optional bytes pub_key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPubKey()` + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.getPubKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPubKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder} returns this + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.setPubKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp transition_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.getTransitionTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder} returns this +*/ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.setTransitionTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder} returns this + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.clearTransitionTime = function() { + return this.setTransitionTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.GroupTransitionSignatureOrder.prototype.hasTransitionTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * @enum {number} + */ +proto.band.bandtss.v1beta1.TransitionStatus = { + TRANSITION_STATUS_UNSPECIFIED: 0, + TRANSITION_STATUS_CREATING_GROUP: 1, + TRANSITION_STATUS_WAITING_SIGN: 2, + TRANSITION_STATUS_WAITING_EXECUTION: 3 +}; + +goog.object.extend(exports, proto.band.bandtss.v1beta1); diff --git a/codegen/band/bandtss/v1beta1/bandtss_pb_service.d.ts b/codegen/band/bandtss/v1beta1/bandtss_pb_service.d.ts new file mode 100644 index 0000000..f90548f --- /dev/null +++ b/codegen/band/bandtss/v1beta1/bandtss_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/bandtss.proto + diff --git a/codegen/band/bandtss/v1beta1/bandtss_pb_service.js b/codegen/band/bandtss/v1beta1/bandtss_pb_service.js new file mode 100644 index 0000000..f90548f --- /dev/null +++ b/codegen/band/bandtss/v1beta1/bandtss_pb_service.js @@ -0,0 +1,3 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/bandtss.proto + diff --git a/codegen/band/bandtss/v1beta1/genesis.ts b/codegen/band/bandtss/v1beta1/genesis.ts new file mode 100644 index 0000000..a0cea17 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/genesis.ts @@ -0,0 +1,299 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/bandtss/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/duration"; +import * as dependency_3 from "./../../../cosmos/base/v1beta1/coin"; +import * as dependency_4 from "./bandtss"; +import * as pb_1 from "google-protobuf"; +export namespace band.bandtss.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: Params; + members?: dependency_4.band.bandtss.v1beta1.Member[]; + current_group?: dependency_4.band.bandtss.v1beta1.CurrentGroup; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("members" in data && data.members != undefined) { + this.members = data.members; + } + if ("current_group" in data && data.current_group != undefined) { + this.current_group = data.current_group; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, Params, 1) as Params; + } + set params(value: Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get members() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.band.bandtss.v1beta1.Member, 2) as dependency_4.band.bandtss.v1beta1.Member[]; + } + set members(value: dependency_4.band.bandtss.v1beta1.Member[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get current_group() { + return pb_1.Message.getWrapperField(this, dependency_4.band.bandtss.v1beta1.CurrentGroup, 3) as dependency_4.band.bandtss.v1beta1.CurrentGroup; + } + set current_group(value: dependency_4.band.bandtss.v1beta1.CurrentGroup) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_current_group() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + params?: ReturnType; + members?: ReturnType[]; + current_group?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = Params.fromObject(data.params); + } + if (data.members != null) { + message.members = data.members.map(item => dependency_4.band.bandtss.v1beta1.Member.fromObject(item)); + } + if (data.current_group != null) { + message.current_group = dependency_4.band.bandtss.v1beta1.CurrentGroup.fromObject(data.current_group); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + members?: ReturnType[]; + current_group?: ReturnType; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.members != null) { + data.members = this.members.map((item: dependency_4.band.bandtss.v1beta1.Member) => item.toObject()); + } + if (this.current_group != null) { + data.current_group = this.current_group.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.members.length) + writer.writeRepeatedMessage(2, this.members, (item: dependency_4.band.bandtss.v1beta1.Member) => item.serialize(writer)); + if (this.has_current_group) + writer.writeMessage(3, this.current_group, () => this.current_group.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = Params.deserialize(reader)); + break; + case 2: + reader.readMessage(message.members, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.band.bandtss.v1beta1.Member.deserialize(reader), dependency_4.band.bandtss.v1beta1.Member)); + break; + case 3: + reader.readMessage(message.current_group, () => message.current_group = dependency_4.band.bandtss.v1beta1.CurrentGroup.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + reward_percentage?: number; + inactive_penalty_duration?: dependency_2.google.protobuf.Duration; + min_transition_duration?: dependency_2.google.protobuf.Duration; + max_transition_duration?: dependency_2.google.protobuf.Duration; + fee_per_signer?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("reward_percentage" in data && data.reward_percentage != undefined) { + this.reward_percentage = data.reward_percentage; + } + if ("inactive_penalty_duration" in data && data.inactive_penalty_duration != undefined) { + this.inactive_penalty_duration = data.inactive_penalty_duration; + } + if ("min_transition_duration" in data && data.min_transition_duration != undefined) { + this.min_transition_duration = data.min_transition_duration; + } + if ("max_transition_duration" in data && data.max_transition_duration != undefined) { + this.max_transition_duration = data.max_transition_duration; + } + if ("fee_per_signer" in data && data.fee_per_signer != undefined) { + this.fee_per_signer = data.fee_per_signer; + } + } + } + get reward_percentage() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set reward_percentage(value: number) { + pb_1.Message.setField(this, 1, value); + } + get inactive_penalty_duration() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 2) as dependency_2.google.protobuf.Duration; + } + set inactive_penalty_duration(value: dependency_2.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_inactive_penalty_duration() { + return pb_1.Message.getField(this, 2) != null; + } + get min_transition_duration() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 3) as dependency_2.google.protobuf.Duration; + } + set min_transition_duration(value: dependency_2.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_min_transition_duration() { + return pb_1.Message.getField(this, 3) != null; + } + get max_transition_duration() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 4) as dependency_2.google.protobuf.Duration; + } + set max_transition_duration(value: dependency_2.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_max_transition_duration() { + return pb_1.Message.getField(this, 4) != null; + } + get fee_per_signer() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 5) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set fee_per_signer(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + static fromObject(data: { + reward_percentage?: number; + inactive_penalty_duration?: ReturnType; + min_transition_duration?: ReturnType; + max_transition_duration?: ReturnType; + fee_per_signer?: ReturnType[]; + }): Params { + const message = new Params({}); + if (data.reward_percentage != null) { + message.reward_percentage = data.reward_percentage; + } + if (data.inactive_penalty_duration != null) { + message.inactive_penalty_duration = dependency_2.google.protobuf.Duration.fromObject(data.inactive_penalty_duration); + } + if (data.min_transition_duration != null) { + message.min_transition_duration = dependency_2.google.protobuf.Duration.fromObject(data.min_transition_duration); + } + if (data.max_transition_duration != null) { + message.max_transition_duration = dependency_2.google.protobuf.Duration.fromObject(data.max_transition_duration); + } + if (data.fee_per_signer != null) { + message.fee_per_signer = data.fee_per_signer.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + reward_percentage?: number; + inactive_penalty_duration?: ReturnType; + min_transition_duration?: ReturnType; + max_transition_duration?: ReturnType; + fee_per_signer?: ReturnType[]; + } = {}; + if (this.reward_percentage != null) { + data.reward_percentage = this.reward_percentage; + } + if (this.inactive_penalty_duration != null) { + data.inactive_penalty_duration = this.inactive_penalty_duration.toObject(); + } + if (this.min_transition_duration != null) { + data.min_transition_duration = this.min_transition_duration.toObject(); + } + if (this.max_transition_duration != null) { + data.max_transition_duration = this.max_transition_duration.toObject(); + } + if (this.fee_per_signer != null) { + data.fee_per_signer = this.fee_per_signer.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.reward_percentage != 0) + writer.writeUint64(1, this.reward_percentage); + if (this.has_inactive_penalty_duration) + writer.writeMessage(2, this.inactive_penalty_duration, () => this.inactive_penalty_duration.serialize(writer)); + if (this.has_min_transition_duration) + writer.writeMessage(3, this.min_transition_duration, () => this.min_transition_duration.serialize(writer)); + if (this.has_max_transition_duration) + writer.writeMessage(4, this.max_transition_duration, () => this.max_transition_duration.serialize(writer)); + if (this.fee_per_signer.length) + writer.writeRepeatedMessage(5, this.fee_per_signer, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.reward_percentage = reader.readUint64(); + break; + case 2: + reader.readMessage(message.inactive_penalty_duration, () => message.inactive_penalty_duration = dependency_2.google.protobuf.Duration.deserialize(reader)); + break; + case 3: + reader.readMessage(message.min_transition_duration, () => message.min_transition_duration = dependency_2.google.protobuf.Duration.deserialize(reader)); + break; + case 4: + reader.readMessage(message.max_transition_duration, () => message.max_transition_duration = dependency_2.google.protobuf.Duration.deserialize(reader)); + break; + case 5: + reader.readMessage(message.fee_per_signer, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/codegen/band/bandtss/v1beta1/genesis_pb.d.ts b/codegen/band/bandtss/v1beta1/genesis_pb.d.ts new file mode 100644 index 0000000..1f2b048 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/genesis_pb.d.ts @@ -0,0 +1,87 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; +import * as band_bandtss_v1beta1_bandtss_pb from "../../../band/bandtss/v1beta1/bandtss_pb"; + +export class GenesisState extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): Params | undefined; + setParams(value?: Params): void; + + clearMembersList(): void; + getMembersList(): Array; + setMembersList(value: Array): void; + addMembers(value?: band_bandtss_v1beta1_bandtss_pb.Member, index?: number): band_bandtss_v1beta1_bandtss_pb.Member; + + hasCurrentGroup(): boolean; + clearCurrentGroup(): void; + getCurrentGroup(): band_bandtss_v1beta1_bandtss_pb.CurrentGroup | undefined; + setCurrentGroup(value?: band_bandtss_v1beta1_bandtss_pb.CurrentGroup): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + params?: Params.AsObject, + membersList: Array, + currentGroup?: band_bandtss_v1beta1_bandtss_pb.CurrentGroup.AsObject, + } +} + +export class Params extends jspb.Message { + getRewardPercentage(): number; + setRewardPercentage(value: number): void; + + hasInactivePenaltyDuration(): boolean; + clearInactivePenaltyDuration(): void; + getInactivePenaltyDuration(): google_protobuf_duration_pb.Duration | undefined; + setInactivePenaltyDuration(value?: google_protobuf_duration_pb.Duration): void; + + hasMinTransitionDuration(): boolean; + clearMinTransitionDuration(): void; + getMinTransitionDuration(): google_protobuf_duration_pb.Duration | undefined; + setMinTransitionDuration(value?: google_protobuf_duration_pb.Duration): void; + + hasMaxTransitionDuration(): boolean; + clearMaxTransitionDuration(): void; + getMaxTransitionDuration(): google_protobuf_duration_pb.Duration | undefined; + setMaxTransitionDuration(value?: google_protobuf_duration_pb.Duration): void; + + clearFeePerSignerList(): void; + getFeePerSignerList(): Array; + setFeePerSignerList(value: Array): void; + addFeePerSigner(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + rewardPercentage: number, + inactivePenaltyDuration?: google_protobuf_duration_pb.Duration.AsObject, + minTransitionDuration?: google_protobuf_duration_pb.Duration.AsObject, + maxTransitionDuration?: google_protobuf_duration_pb.Duration.AsObject, + feePerSignerList: Array, + } +} + diff --git a/codegen/band/bandtss/v1beta1/genesis_pb.js b/codegen/band/bandtss/v1beta1/genesis_pb.js new file mode 100644 index 0000000..c20d6ec --- /dev/null +++ b/codegen/band/bandtss/v1beta1/genesis_pb.js @@ -0,0 +1,675 @@ +// source: band/bandtss/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var band_bandtss_v1beta1_bandtss_pb = require('../../../band/bandtss/v1beta1/bandtss_pb.js'); +goog.object.extend(proto, band_bandtss_v1beta1_bandtss_pb); +goog.exportSymbol('proto.band.bandtss.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.Params', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.bandtss.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.GenesisState.displayName = 'proto.band.bandtss.v1beta1.GenesisState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.bandtss.v1beta1.Params.repeatedFields_, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.Params.displayName = 'proto.band.bandtss.v1beta1.Params'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.bandtss.v1beta1.GenesisState.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && proto.band.bandtss.v1beta1.Params.toObject(includeInstance, f), + membersList: jspb.Message.toObjectList(msg.getMembersList(), + band_bandtss_v1beta1_bandtss_pb.Member.toObject, includeInstance), + currentGroup: (f = msg.getCurrentGroup()) && band_bandtss_v1beta1_bandtss_pb.CurrentGroup.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.GenesisState} + */ +proto.band.bandtss.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.GenesisState; + return proto.band.bandtss.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.GenesisState} + */ +proto.band.bandtss.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.bandtss.v1beta1.Params; + reader.readMessage(value,proto.band.bandtss.v1beta1.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new band_bandtss_v1beta1_bandtss_pb.Member; + reader.readMessage(value,band_bandtss_v1beta1_bandtss_pb.Member.deserializeBinaryFromReader); + msg.addMembers(value); + break; + case 3: + var value = new band_bandtss_v1beta1_bandtss_pb.CurrentGroup; + reader.readMessage(value,band_bandtss_v1beta1_bandtss_pb.CurrentGroup.deserializeBinaryFromReader); + msg.setCurrentGroup(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.bandtss.v1beta1.Params.serializeBinaryToWriter + ); + } + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_bandtss_v1beta1_bandtss_pb.Member.serializeBinaryToWriter + ); + } + f = message.getCurrentGroup(); + if (f != null) { + writer.writeMessage( + 3, + f, + band_bandtss_v1beta1_bandtss_pb.CurrentGroup.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.bandtss.v1beta1.Params} + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.band.bandtss.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, proto.band.bandtss.v1beta1.Params, 1)); +}; + + +/** + * @param {?proto.band.bandtss.v1beta1.Params|undefined} value + * @return {!proto.band.bandtss.v1beta1.GenesisState} returns this +*/ +proto.band.bandtss.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.GenesisState} returns this + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Member members = 2; + * @return {!Array} + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_bandtss_v1beta1_bandtss_pb.Member, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.bandtss.v1beta1.GenesisState} returns this +*/ +proto.band.bandtss.v1beta1.GenesisState.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.bandtss.v1beta1.Member=} opt_value + * @param {number=} opt_index + * @return {!proto.band.bandtss.v1beta1.Member} + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.bandtss.v1beta1.Member, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.bandtss.v1beta1.GenesisState} returns this + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.clearMembersList = function() { + return this.setMembersList([]); +}; + + +/** + * optional CurrentGroup current_group = 3; + * @return {?proto.band.bandtss.v1beta1.CurrentGroup} + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.getCurrentGroup = function() { + return /** @type{?proto.band.bandtss.v1beta1.CurrentGroup} */ ( + jspb.Message.getWrapperField(this, band_bandtss_v1beta1_bandtss_pb.CurrentGroup, 3)); +}; + + +/** + * @param {?proto.band.bandtss.v1beta1.CurrentGroup|undefined} value + * @return {!proto.band.bandtss.v1beta1.GenesisState} returns this +*/ +proto.band.bandtss.v1beta1.GenesisState.prototype.setCurrentGroup = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.GenesisState} returns this + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.clearCurrentGroup = function() { + return this.setCurrentGroup(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.GenesisState.prototype.hasCurrentGroup = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.bandtss.v1beta1.Params.repeatedFields_ = [5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + rewardPercentage: jspb.Message.getFieldWithDefault(msg, 1, 0), + inactivePenaltyDuration: (f = msg.getInactivePenaltyDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + minTransitionDuration: (f = msg.getMinTransitionDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + maxTransitionDuration: (f = msg.getMaxTransitionDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + feePerSignerList: jspb.Message.toObjectList(msg.getFeePerSignerList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.Params} + */ +proto.band.bandtss.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.Params; + return proto.band.bandtss.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.Params} + */ +proto.band.bandtss.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRewardPercentage(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setInactivePenaltyDuration(value); + break; + case 3: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setMinTransitionDuration(value); + break; + case 4: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setMaxTransitionDuration(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFeePerSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardPercentage(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getInactivePenaltyDuration(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getMinTransitionDuration(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getMaxTransitionDuration(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getFeePerSignerList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 reward_percentage = 1; + * @return {number} + */ +proto.band.bandtss.v1beta1.Params.prototype.getRewardPercentage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.Params} returns this + */ +proto.band.bandtss.v1beta1.Params.prototype.setRewardPercentage = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Duration inactive_penalty_duration = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.band.bandtss.v1beta1.Params.prototype.getInactivePenaltyDuration = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.band.bandtss.v1beta1.Params} returns this +*/ +proto.band.bandtss.v1beta1.Params.prototype.setInactivePenaltyDuration = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.Params} returns this + */ +proto.band.bandtss.v1beta1.Params.prototype.clearInactivePenaltyDuration = function() { + return this.setInactivePenaltyDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.Params.prototype.hasInactivePenaltyDuration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Duration min_transition_duration = 3; + * @return {?proto.google.protobuf.Duration} + */ +proto.band.bandtss.v1beta1.Params.prototype.getMinTransitionDuration = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.band.bandtss.v1beta1.Params} returns this +*/ +proto.band.bandtss.v1beta1.Params.prototype.setMinTransitionDuration = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.Params} returns this + */ +proto.band.bandtss.v1beta1.Params.prototype.clearMinTransitionDuration = function() { + return this.setMinTransitionDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.Params.prototype.hasMinTransitionDuration = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Duration max_transition_duration = 4; + * @return {?proto.google.protobuf.Duration} + */ +proto.band.bandtss.v1beta1.Params.prototype.getMaxTransitionDuration = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.band.bandtss.v1beta1.Params} returns this +*/ +proto.band.bandtss.v1beta1.Params.prototype.setMaxTransitionDuration = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.Params} returns this + */ +proto.band.bandtss.v1beta1.Params.prototype.clearMaxTransitionDuration = function() { + return this.setMaxTransitionDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.Params.prototype.hasMaxTransitionDuration = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee_per_signer = 5; + * @return {!Array} + */ +proto.band.bandtss.v1beta1.Params.prototype.getFeePerSignerList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.bandtss.v1beta1.Params} returns this +*/ +proto.band.bandtss.v1beta1.Params.prototype.setFeePerSignerList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.bandtss.v1beta1.Params.prototype.addFeePerSigner = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.bandtss.v1beta1.Params} returns this + */ +proto.band.bandtss.v1beta1.Params.prototype.clearFeePerSignerList = function() { + return this.setFeePerSignerList([]); +}; + + +goog.object.extend(exports, proto.band.bandtss.v1beta1); diff --git a/codegen/band/bandtss/v1beta1/genesis_pb_service.d.ts b/codegen/band/bandtss/v1beta1/genesis_pb_service.d.ts new file mode 100644 index 0000000..5ec1cab --- /dev/null +++ b/codegen/band/bandtss/v1beta1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/genesis.proto + diff --git a/codegen/band/bandtss/v1beta1/genesis_pb_service.js b/codegen/band/bandtss/v1beta1/genesis_pb_service.js new file mode 100644 index 0000000..5ec1cab --- /dev/null +++ b/codegen/band/bandtss/v1beta1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/genesis.proto + diff --git a/codegen/band/bandtss/v1beta1/query.ts b/codegen/band/bandtss/v1beta1/query.ts new file mode 100644 index 0000000..28acf07 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/query.ts @@ -0,0 +1,1492 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/bandtss/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/timestamp"; +import * as dependency_3 from "./../../../cosmos/base/query/v1beta1/pagination"; +import * as dependency_4 from "./../../../cosmos/base/v1beta1/coin"; +import * as dependency_5 from "./../../../google/api/annotations"; +import * as dependency_6 from "./../../tss/v1beta1/tss"; +import * as dependency_7 from "./bandtss"; +import * as dependency_8 from "./genesis"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.bandtss.v1beta1 { + export enum MemberStatusFilter { + MEMBER_STATUS_FILTER_UNSPECIFIED = 0, + MEMBER_STATUS_FILTER_ACTIVE = 1, + MEMBER_STATUS_FILTER_INACTIVE = 2 + } + export class QueryCountsRequest 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: {}): QueryCountsRequest { + const message = new QueryCountsRequest({}); + 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): QueryCountsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCountsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCountsRequest { + return QueryCountsRequest.deserialize(bytes); + } + } + export class QueryCountsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_count?: 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 ("signing_count" in data && data.signing_count != undefined) { + this.signing_count = data.signing_count; + } + } + } + get signing_count() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_count(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + signing_count?: number; + }): QueryCountsResponse { + const message = new QueryCountsResponse({}); + if (data.signing_count != null) { + message.signing_count = data.signing_count; + } + return message; + } + toObject() { + const data: { + signing_count?: number; + } = {}; + if (this.signing_count != null) { + data.signing_count = this.signing_count; + } + 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.signing_count != 0) + writer.writeUint64(1, this.signing_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCountsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCountsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_count = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCountsResponse { + return QueryCountsResponse.deserialize(bytes); + } + } + export class QueryMembersRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + status?: MemberStatusFilter; + is_incoming_group?: boolean; + pagination?: dependency_3.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 ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("is_incoming_group" in data && data.is_incoming_group != undefined) { + this.is_incoming_group = data.is_incoming_group; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 1, MemberStatusFilter.MEMBER_STATUS_FILTER_UNSPECIFIED) as MemberStatusFilter; + } + set status(value: MemberStatusFilter) { + pb_1.Message.setField(this, 1, value); + } + get is_incoming_group() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set is_incoming_group(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 3) as dependency_3.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + status?: MemberStatusFilter; + is_incoming_group?: boolean; + pagination?: ReturnType; + }): QueryMembersRequest { + const message = new QueryMembersRequest({}); + if (data.status != null) { + message.status = data.status; + } + if (data.is_incoming_group != null) { + message.is_incoming_group = data.is_incoming_group; + } + if (data.pagination != null) { + message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + status?: MemberStatusFilter; + is_incoming_group?: boolean; + pagination?: ReturnType; + } = {}; + if (this.status != null) { + data.status = this.status; + } + if (this.is_incoming_group != null) { + data.is_incoming_group = this.is_incoming_group; + } + 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.status != MemberStatusFilter.MEMBER_STATUS_FILTER_UNSPECIFIED) + writer.writeEnum(1, this.status); + if (this.is_incoming_group != false) + writer.writeBool(2, this.is_incoming_group); + if (this.has_pagination) + writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryMembersRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryMembersRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.status = reader.readEnum(); + break; + case 2: + message.is_incoming_group = reader.readBool(); + break; + case 3: + reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryMembersRequest { + return QueryMembersRequest.deserialize(bytes); + } + } + export class QueryMembersResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + members?: dependency_7.band.bandtss.v1beta1.Member[]; + pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("members" in data && data.members != undefined) { + this.members = data.members; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get members() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_7.band.bandtss.v1beta1.Member, 1) as dependency_7.band.bandtss.v1beta1.Member[]; + } + set members(value: dependency_7.band.bandtss.v1beta1.Member[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_3.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + members?: ReturnType[]; + pagination?: ReturnType; + }): QueryMembersResponse { + const message = new QueryMembersResponse({}); + if (data.members != null) { + message.members = data.members.map(item => dependency_7.band.bandtss.v1beta1.Member.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + members?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.members != null) { + data.members = this.members.map((item: dependency_7.band.bandtss.v1beta1.Member) => item.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.members.length) + writer.writeRepeatedMessage(1, this.members, (item: dependency_7.band.bandtss.v1beta1.Member) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryMembersResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryMembersResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.members, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_7.band.bandtss.v1beta1.Member.deserialize(reader), dependency_7.band.bandtss.v1beta1.Member)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryMembersResponse { + return QueryMembersResponse.deserialize(bytes); + } + } + export class QueryMemberRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): QueryMemberRequest { + const message = new QueryMemberRequest({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryMemberRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryMemberRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryMemberRequest { + return QueryMemberRequest.deserialize(bytes); + } + } + export class QueryMemberResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + current_group_member?: dependency_7.band.bandtss.v1beta1.Member; + incoming_group_member?: dependency_7.band.bandtss.v1beta1.Member; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("current_group_member" in data && data.current_group_member != undefined) { + this.current_group_member = data.current_group_member; + } + if ("incoming_group_member" in data && data.incoming_group_member != undefined) { + this.incoming_group_member = data.incoming_group_member; + } + } + } + get current_group_member() { + return pb_1.Message.getWrapperField(this, dependency_7.band.bandtss.v1beta1.Member, 1) as dependency_7.band.bandtss.v1beta1.Member; + } + set current_group_member(value: dependency_7.band.bandtss.v1beta1.Member) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_current_group_member() { + return pb_1.Message.getField(this, 1) != null; + } + get incoming_group_member() { + return pb_1.Message.getWrapperField(this, dependency_7.band.bandtss.v1beta1.Member, 2) as dependency_7.band.bandtss.v1beta1.Member; + } + set incoming_group_member(value: dependency_7.band.bandtss.v1beta1.Member) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_incoming_group_member() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + current_group_member?: ReturnType; + incoming_group_member?: ReturnType; + }): QueryMemberResponse { + const message = new QueryMemberResponse({}); + if (data.current_group_member != null) { + message.current_group_member = dependency_7.band.bandtss.v1beta1.Member.fromObject(data.current_group_member); + } + if (data.incoming_group_member != null) { + message.incoming_group_member = dependency_7.band.bandtss.v1beta1.Member.fromObject(data.incoming_group_member); + } + return message; + } + toObject() { + const data: { + current_group_member?: ReturnType; + incoming_group_member?: ReturnType; + } = {}; + if (this.current_group_member != null) { + data.current_group_member = this.current_group_member.toObject(); + } + if (this.incoming_group_member != null) { + data.incoming_group_member = this.incoming_group_member.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_current_group_member) + writer.writeMessage(1, this.current_group_member, () => this.current_group_member.serialize(writer)); + if (this.has_incoming_group_member) + writer.writeMessage(2, this.incoming_group_member, () => this.incoming_group_member.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryMemberResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryMemberResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.current_group_member, () => message.current_group_member = dependency_7.band.bandtss.v1beta1.Member.deserialize(reader)); + break; + case 2: + reader.readMessage(message.incoming_group_member, () => message.incoming_group_member = dependency_7.band.bandtss.v1beta1.Member.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryMemberResponse { + return QueryMemberResponse.deserialize(bytes); + } + } + export class QueryCurrentGroupRequest 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: {}): QueryCurrentGroupRequest { + const message = new QueryCurrentGroupRequest({}); + 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): QueryCurrentGroupRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCurrentGroupRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCurrentGroupRequest { + return QueryCurrentGroupRequest.deserialize(bytes); + } + } + export class QueryCurrentGroupResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + size?: number; + threshold?: number; + pub_key?: Uint8Array; + status?: dependency_6.band.tss.v1beta1.GroupStatus; + active_time?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("size" in data && data.size != undefined) { + this.size = data.size; + } + if ("threshold" in data && data.threshold != undefined) { + this.threshold = data.threshold; + } + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("active_time" in data && data.active_time != undefined) { + this.active_time = data.active_time; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get size() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set size(value: number) { + pb_1.Message.setField(this, 2, value); + } + get threshold() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set threshold(value: number) { + pb_1.Message.setField(this, 3, value); + } + get pub_key() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, dependency_6.band.tss.v1beta1.GroupStatus.GROUP_STATUS_UNSPECIFIED) as dependency_6.band.tss.v1beta1.GroupStatus; + } + set status(value: dependency_6.band.tss.v1beta1.GroupStatus) { + pb_1.Message.setField(this, 5, value); + } + get active_time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 6) as dependency_2.google.protobuf.Timestamp; + } + set active_time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_active_time() { + return pb_1.Message.getField(this, 6) != null; + } + static fromObject(data: { + group_id?: number; + size?: number; + threshold?: number; + pub_key?: Uint8Array; + status?: dependency_6.band.tss.v1beta1.GroupStatus; + active_time?: ReturnType; + }): QueryCurrentGroupResponse { + const message = new QueryCurrentGroupResponse({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.size != null) { + message.size = data.size; + } + if (data.threshold != null) { + message.threshold = data.threshold; + } + if (data.pub_key != null) { + message.pub_key = data.pub_key; + } + if (data.status != null) { + message.status = data.status; + } + if (data.active_time != null) { + message.active_time = dependency_2.google.protobuf.Timestamp.fromObject(data.active_time); + } + return message; + } + toObject() { + const data: { + group_id?: number; + size?: number; + threshold?: number; + pub_key?: Uint8Array; + status?: dependency_6.band.tss.v1beta1.GroupStatus; + active_time?: ReturnType; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.size != null) { + data.size = this.size; + } + if (this.threshold != null) { + data.threshold = this.threshold; + } + if (this.pub_key != null) { + data.pub_key = this.pub_key; + } + if (this.status != null) { + data.status = this.status; + } + if (this.active_time != null) { + data.active_time = this.active_time.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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.size != 0) + writer.writeUint64(2, this.size); + if (this.threshold != 0) + writer.writeUint64(3, this.threshold); + if (this.pub_key.length) + writer.writeBytes(4, this.pub_key); + if (this.status != dependency_6.band.tss.v1beta1.GroupStatus.GROUP_STATUS_UNSPECIFIED) + writer.writeEnum(5, this.status); + if (this.has_active_time) + writer.writeMessage(6, this.active_time, () => this.active_time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCurrentGroupResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCurrentGroupResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + message.size = reader.readUint64(); + break; + case 3: + message.threshold = reader.readUint64(); + break; + case 4: + message.pub_key = reader.readBytes(); + break; + case 5: + message.status = reader.readEnum(); + break; + case 6: + reader.readMessage(message.active_time, () => message.active_time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCurrentGroupResponse { + return QueryCurrentGroupResponse.deserialize(bytes); + } + } + export class QueryIncomingGroupRequest 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: {}): QueryIncomingGroupRequest { + const message = new QueryIncomingGroupRequest({}); + 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): QueryIncomingGroupRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIncomingGroupRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIncomingGroupRequest { + return QueryIncomingGroupRequest.deserialize(bytes); + } + } + export class QueryIncomingGroupResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + size?: number; + threshold?: number; + pub_key?: Uint8Array; + status?: dependency_6.band.tss.v1beta1.GroupStatus; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("size" in data && data.size != undefined) { + this.size = data.size; + } + if ("threshold" in data && data.threshold != undefined) { + this.threshold = data.threshold; + } + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get size() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set size(value: number) { + pb_1.Message.setField(this, 2, value); + } + get threshold() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set threshold(value: number) { + pb_1.Message.setField(this, 3, value); + } + get pub_key() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, dependency_6.band.tss.v1beta1.GroupStatus.GROUP_STATUS_UNSPECIFIED) as dependency_6.band.tss.v1beta1.GroupStatus; + } + set status(value: dependency_6.band.tss.v1beta1.GroupStatus) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + group_id?: number; + size?: number; + threshold?: number; + pub_key?: Uint8Array; + status?: dependency_6.band.tss.v1beta1.GroupStatus; + }): QueryIncomingGroupResponse { + const message = new QueryIncomingGroupResponse({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.size != null) { + message.size = data.size; + } + if (data.threshold != null) { + message.threshold = data.threshold; + } + if (data.pub_key != null) { + message.pub_key = data.pub_key; + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + group_id?: number; + size?: number; + threshold?: number; + pub_key?: Uint8Array; + status?: dependency_6.band.tss.v1beta1.GroupStatus; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.size != null) { + data.size = this.size; + } + if (this.threshold != null) { + data.threshold = this.threshold; + } + if (this.pub_key != null) { + data.pub_key = this.pub_key; + } + if (this.status != null) { + data.status = this.status; + } + 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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.size != 0) + writer.writeUint64(2, this.size); + if (this.threshold != 0) + writer.writeUint64(3, this.threshold); + if (this.pub_key.length) + writer.writeBytes(4, this.pub_key); + if (this.status != dependency_6.band.tss.v1beta1.GroupStatus.GROUP_STATUS_UNSPECIFIED) + writer.writeEnum(5, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIncomingGroupResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIncomingGroupResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + message.size = reader.readUint64(); + break; + case 3: + message.threshold = reader.readUint64(); + break; + case 4: + message.pub_key = reader.readBytes(); + break; + case 5: + message.status = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIncomingGroupResponse { + return QueryIncomingGroupResponse.deserialize(bytes); + } + } + export class QuerySigningRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_id?: 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 ("signing_id" in data && data.signing_id != undefined) { + this.signing_id = data.signing_id; + } + } + } + get signing_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + signing_id?: number; + }): QuerySigningRequest { + const message = new QuerySigningRequest({}); + if (data.signing_id != null) { + message.signing_id = data.signing_id; + } + return message; + } + toObject() { + const data: { + signing_id?: number; + } = {}; + if (this.signing_id != null) { + data.signing_id = this.signing_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.signing_id != 0) + writer.writeUint64(1, this.signing_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySigningRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySigningRequest { + return QuerySigningRequest.deserialize(bytes); + } + } + export class QuerySigningResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fee_per_signer?: dependency_4.cosmos.base.v1beta1.Coin[]; + requester?: string; + current_group_signing_result?: dependency_6.band.tss.v1beta1.SigningResult; + incoming_group_signing_result?: dependency_6.band.tss.v1beta1.SigningResult; + }) { + 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 ("fee_per_signer" in data && data.fee_per_signer != undefined) { + this.fee_per_signer = data.fee_per_signer; + } + if ("requester" in data && data.requester != undefined) { + this.requester = data.requester; + } + if ("current_group_signing_result" in data && data.current_group_signing_result != undefined) { + this.current_group_signing_result = data.current_group_signing_result; + } + if ("incoming_group_signing_result" in data && data.incoming_group_signing_result != undefined) { + this.incoming_group_signing_result = data.incoming_group_signing_result; + } + } + } + get fee_per_signer() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set fee_per_signer(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get requester() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set requester(value: string) { + pb_1.Message.setField(this, 2, value); + } + get current_group_signing_result() { + return pb_1.Message.getWrapperField(this, dependency_6.band.tss.v1beta1.SigningResult, 3) as dependency_6.band.tss.v1beta1.SigningResult; + } + set current_group_signing_result(value: dependency_6.band.tss.v1beta1.SigningResult) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_current_group_signing_result() { + return pb_1.Message.getField(this, 3) != null; + } + get incoming_group_signing_result() { + return pb_1.Message.getWrapperField(this, dependency_6.band.tss.v1beta1.SigningResult, 4) as dependency_6.band.tss.v1beta1.SigningResult; + } + set incoming_group_signing_result(value: dependency_6.band.tss.v1beta1.SigningResult) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_incoming_group_signing_result() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + fee_per_signer?: ReturnType[]; + requester?: string; + current_group_signing_result?: ReturnType; + incoming_group_signing_result?: ReturnType; + }): QuerySigningResponse { + const message = new QuerySigningResponse({}); + if (data.fee_per_signer != null) { + message.fee_per_signer = data.fee_per_signer.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.requester != null) { + message.requester = data.requester; + } + if (data.current_group_signing_result != null) { + message.current_group_signing_result = dependency_6.band.tss.v1beta1.SigningResult.fromObject(data.current_group_signing_result); + } + if (data.incoming_group_signing_result != null) { + message.incoming_group_signing_result = dependency_6.band.tss.v1beta1.SigningResult.fromObject(data.incoming_group_signing_result); + } + return message; + } + toObject() { + const data: { + fee_per_signer?: ReturnType[]; + requester?: string; + current_group_signing_result?: ReturnType; + incoming_group_signing_result?: ReturnType; + } = {}; + if (this.fee_per_signer != null) { + data.fee_per_signer = this.fee_per_signer.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.requester != null) { + data.requester = this.requester; + } + if (this.current_group_signing_result != null) { + data.current_group_signing_result = this.current_group_signing_result.toObject(); + } + if (this.incoming_group_signing_result != null) { + data.incoming_group_signing_result = this.incoming_group_signing_result.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.fee_per_signer.length) + writer.writeRepeatedMessage(1, this.fee_per_signer, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.requester.length) + writer.writeString(2, this.requester); + if (this.has_current_group_signing_result) + writer.writeMessage(3, this.current_group_signing_result, () => this.current_group_signing_result.serialize(writer)); + if (this.has_incoming_group_signing_result) + writer.writeMessage(4, this.incoming_group_signing_result, () => this.incoming_group_signing_result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySigningResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.fee_per_signer, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 2: + message.requester = reader.readString(); + break; + case 3: + reader.readMessage(message.current_group_signing_result, () => message.current_group_signing_result = dependency_6.band.tss.v1beta1.SigningResult.deserialize(reader)); + break; + case 4: + reader.readMessage(message.incoming_group_signing_result, () => message.incoming_group_signing_result = dependency_6.band.tss.v1beta1.SigningResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySigningResponse { + return QuerySigningResponse.deserialize(bytes); + } + } + export class QueryGroupTransitionRequest 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: {}): QueryGroupTransitionRequest { + const message = new QueryGroupTransitionRequest({}); + 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): QueryGroupTransitionRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupTransitionRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupTransitionRequest { + return QueryGroupTransitionRequest.deserialize(bytes); + } + } + export class QueryGroupTransitionResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_transition?: dependency_7.band.bandtss.v1beta1.GroupTransition; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group_transition" in data && data.group_transition != undefined) { + this.group_transition = data.group_transition; + } + } + } + get group_transition() { + return pb_1.Message.getWrapperField(this, dependency_7.band.bandtss.v1beta1.GroupTransition, 1) as dependency_7.band.bandtss.v1beta1.GroupTransition; + } + set group_transition(value: dependency_7.band.bandtss.v1beta1.GroupTransition) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_group_transition() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + group_transition?: ReturnType; + }): QueryGroupTransitionResponse { + const message = new QueryGroupTransitionResponse({}); + if (data.group_transition != null) { + message.group_transition = dependency_7.band.bandtss.v1beta1.GroupTransition.fromObject(data.group_transition); + } + return message; + } + toObject() { + const data: { + group_transition?: ReturnType; + } = {}; + if (this.group_transition != null) { + data.group_transition = this.group_transition.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_group_transition) + writer.writeMessage(1, this.group_transition, () => this.group_transition.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupTransitionResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupTransitionResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.group_transition, () => message.group_transition = dependency_7.band.bandtss.v1beta1.GroupTransition.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupTransitionResponse { + return QueryGroupTransitionResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_8.band.bandtss.v1beta1.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_8.band.bandtss.v1beta1.Params, 1) as dependency_8.band.bandtss.v1beta1.Params; + } + set params(value: dependency_8.band.bandtss.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_8.band.bandtss.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_8.band.bandtss.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Counts: { + path: "/band.bandtss.v1beta1.Query/Counts", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryCountsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryCountsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryCountsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryCountsResponse.deserialize(new Uint8Array(bytes)) + }, + Members: { + path: "/band.bandtss.v1beta1.Query/Members", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryMembersRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryMembersRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryMembersResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryMembersResponse.deserialize(new Uint8Array(bytes)) + }, + Member: { + path: "/band.bandtss.v1beta1.Query/Member", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryMemberRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryMemberRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryMemberResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryMemberResponse.deserialize(new Uint8Array(bytes)) + }, + CurrentGroup: { + path: "/band.bandtss.v1beta1.Query/CurrentGroup", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryCurrentGroupRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryCurrentGroupRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryCurrentGroupResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryCurrentGroupResponse.deserialize(new Uint8Array(bytes)) + }, + IncomingGroup: { + path: "/band.bandtss.v1beta1.Query/IncomingGroup", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryIncomingGroupRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryIncomingGroupRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryIncomingGroupResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryIncomingGroupResponse.deserialize(new Uint8Array(bytes)) + }, + Signing: { + path: "/band.bandtss.v1beta1.Query/Signing", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySigningRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySigningRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySigningResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySigningResponse.deserialize(new Uint8Array(bytes)) + }, + GroupTransition: { + path: "/band.bandtss.v1beta1.Query/GroupTransition", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupTransitionRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupTransitionRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupTransitionResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupTransitionResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/band.bandtss.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Counts(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Members(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Member(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CurrentGroup(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract IncomingGroup(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Signing(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GroupTransition(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Counts: GrpcUnaryServiceInterface = (message: QueryCountsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Counts(message, metadata, options, callback); + }; + Members: GrpcUnaryServiceInterface = (message: QueryMembersRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Members(message, metadata, options, callback); + }; + Member: GrpcUnaryServiceInterface = (message: QueryMemberRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Member(message, metadata, options, callback); + }; + CurrentGroup: GrpcUnaryServiceInterface = (message: QueryCurrentGroupRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CurrentGroup(message, metadata, options, callback); + }; + IncomingGroup: GrpcUnaryServiceInterface = (message: QueryIncomingGroupRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.IncomingGroup(message, metadata, options, callback); + }; + Signing: GrpcUnaryServiceInterface = (message: QuerySigningRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Signing(message, metadata, options, callback); + }; + GroupTransition: GrpcUnaryServiceInterface = (message: QueryGroupTransitionRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GroupTransition(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/bandtss/v1beta1/query_pb.d.ts b/codegen/band/bandtss/v1beta1/query_pb.d.ts new file mode 100644 index 0000000..a0029aa --- /dev/null +++ b/codegen/band/bandtss/v1beta1/query_pb.d.ts @@ -0,0 +1,411 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/query.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as cosmos_base_query_v1beta1_pagination_pb from "../../../cosmos/base/query/v1beta1/pagination_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as band_tss_v1beta1_tss_pb from "../../../band/tss/v1beta1/tss_pb"; +import * as band_bandtss_v1beta1_bandtss_pb from "../../../band/bandtss/v1beta1/bandtss_pb"; +import * as band_bandtss_v1beta1_genesis_pb from "../../../band/bandtss/v1beta1/genesis_pb"; + +export class QueryCountsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCountsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryCountsRequest): QueryCountsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCountsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCountsRequest; + static deserializeBinaryFromReader(message: QueryCountsRequest, reader: jspb.BinaryReader): QueryCountsRequest; +} + +export namespace QueryCountsRequest { + export type AsObject = { + } +} + +export class QueryCountsResponse extends jspb.Message { + getSigningCount(): number; + setSigningCount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCountsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryCountsResponse): QueryCountsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCountsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCountsResponse; + static deserializeBinaryFromReader(message: QueryCountsResponse, reader: jspb.BinaryReader): QueryCountsResponse; +} + +export namespace QueryCountsResponse { + export type AsObject = { + signingCount: number, + } +} + +export class QueryMembersRequest extends jspb.Message { + getStatus(): MemberStatusFilterMap[keyof MemberStatusFilterMap]; + setStatus(value: MemberStatusFilterMap[keyof MemberStatusFilterMap]): void; + + getIsIncomingGroup(): boolean; + setIsIncomingGroup(value: boolean): void; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryMembersRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryMembersRequest): QueryMembersRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryMembersRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryMembersRequest; + static deserializeBinaryFromReader(message: QueryMembersRequest, reader: jspb.BinaryReader): QueryMembersRequest; +} + +export namespace QueryMembersRequest { + export type AsObject = { + status: MemberStatusFilterMap[keyof MemberStatusFilterMap], + isIncomingGroup: boolean, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryMembersResponse extends jspb.Message { + clearMembersList(): void; + getMembersList(): Array; + setMembersList(value: Array): void; + addMembers(value?: band_bandtss_v1beta1_bandtss_pb.Member, index?: number): band_bandtss_v1beta1_bandtss_pb.Member; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryMembersResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryMembersResponse): QueryMembersResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryMembersResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryMembersResponse; + static deserializeBinaryFromReader(message: QueryMembersResponse, reader: jspb.BinaryReader): QueryMembersResponse; +} + +export namespace QueryMembersResponse { + export type AsObject = { + membersList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryMemberRequest extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryMemberRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryMemberRequest): QueryMemberRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryMemberRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryMemberRequest; + static deserializeBinaryFromReader(message: QueryMemberRequest, reader: jspb.BinaryReader): QueryMemberRequest; +} + +export namespace QueryMemberRequest { + export type AsObject = { + address: string, + } +} + +export class QueryMemberResponse extends jspb.Message { + hasCurrentGroupMember(): boolean; + clearCurrentGroupMember(): void; + getCurrentGroupMember(): band_bandtss_v1beta1_bandtss_pb.Member | undefined; + setCurrentGroupMember(value?: band_bandtss_v1beta1_bandtss_pb.Member): void; + + hasIncomingGroupMember(): boolean; + clearIncomingGroupMember(): void; + getIncomingGroupMember(): band_bandtss_v1beta1_bandtss_pb.Member | undefined; + setIncomingGroupMember(value?: band_bandtss_v1beta1_bandtss_pb.Member): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryMemberResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryMemberResponse): QueryMemberResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryMemberResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryMemberResponse; + static deserializeBinaryFromReader(message: QueryMemberResponse, reader: jspb.BinaryReader): QueryMemberResponse; +} + +export namespace QueryMemberResponse { + export type AsObject = { + currentGroupMember?: band_bandtss_v1beta1_bandtss_pb.Member.AsObject, + incomingGroupMember?: band_bandtss_v1beta1_bandtss_pb.Member.AsObject, + } +} + +export class QueryCurrentGroupRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCurrentGroupRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryCurrentGroupRequest): QueryCurrentGroupRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCurrentGroupRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCurrentGroupRequest; + static deserializeBinaryFromReader(message: QueryCurrentGroupRequest, reader: jspb.BinaryReader): QueryCurrentGroupRequest; +} + +export namespace QueryCurrentGroupRequest { + export type AsObject = { + } +} + +export class QueryCurrentGroupResponse extends jspb.Message { + getGroupId(): number; + setGroupId(value: number): void; + + getSize(): number; + setSize(value: number): void; + + getThreshold(): number; + setThreshold(value: number): void; + + getPubKey(): Uint8Array | string; + getPubKey_asU8(): Uint8Array; + getPubKey_asB64(): string; + setPubKey(value: Uint8Array | string): void; + + getStatus(): band_tss_v1beta1_tss_pb.GroupStatusMap[keyof band_tss_v1beta1_tss_pb.GroupStatusMap]; + setStatus(value: band_tss_v1beta1_tss_pb.GroupStatusMap[keyof band_tss_v1beta1_tss_pb.GroupStatusMap]): void; + + hasActiveTime(): boolean; + clearActiveTime(): void; + getActiveTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setActiveTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCurrentGroupResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryCurrentGroupResponse): QueryCurrentGroupResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCurrentGroupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCurrentGroupResponse; + static deserializeBinaryFromReader(message: QueryCurrentGroupResponse, reader: jspb.BinaryReader): QueryCurrentGroupResponse; +} + +export namespace QueryCurrentGroupResponse { + export type AsObject = { + groupId: number, + size: number, + threshold: number, + pubKey: Uint8Array | string, + status: band_tss_v1beta1_tss_pb.GroupStatusMap[keyof band_tss_v1beta1_tss_pb.GroupStatusMap], + activeTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class QueryIncomingGroupRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIncomingGroupRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryIncomingGroupRequest): QueryIncomingGroupRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIncomingGroupRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIncomingGroupRequest; + static deserializeBinaryFromReader(message: QueryIncomingGroupRequest, reader: jspb.BinaryReader): QueryIncomingGroupRequest; +} + +export namespace QueryIncomingGroupRequest { + export type AsObject = { + } +} + +export class QueryIncomingGroupResponse extends jspb.Message { + getGroupId(): number; + setGroupId(value: number): void; + + getSize(): number; + setSize(value: number): void; + + getThreshold(): number; + setThreshold(value: number): void; + + getPubKey(): Uint8Array | string; + getPubKey_asU8(): Uint8Array; + getPubKey_asB64(): string; + setPubKey(value: Uint8Array | string): void; + + getStatus(): band_tss_v1beta1_tss_pb.GroupStatusMap[keyof band_tss_v1beta1_tss_pb.GroupStatusMap]; + setStatus(value: band_tss_v1beta1_tss_pb.GroupStatusMap[keyof band_tss_v1beta1_tss_pb.GroupStatusMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIncomingGroupResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryIncomingGroupResponse): QueryIncomingGroupResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIncomingGroupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIncomingGroupResponse; + static deserializeBinaryFromReader(message: QueryIncomingGroupResponse, reader: jspb.BinaryReader): QueryIncomingGroupResponse; +} + +export namespace QueryIncomingGroupResponse { + export type AsObject = { + groupId: number, + size: number, + threshold: number, + pubKey: Uint8Array | string, + status: band_tss_v1beta1_tss_pb.GroupStatusMap[keyof band_tss_v1beta1_tss_pb.GroupStatusMap], + } +} + +export class QuerySigningRequest extends jspb.Message { + getSigningId(): number; + setSigningId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QuerySigningRequest.AsObject; + static toObject(includeInstance: boolean, msg: QuerySigningRequest): QuerySigningRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QuerySigningRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QuerySigningRequest; + static deserializeBinaryFromReader(message: QuerySigningRequest, reader: jspb.BinaryReader): QuerySigningRequest; +} + +export namespace QuerySigningRequest { + export type AsObject = { + signingId: number, + } +} + +export class QuerySigningResponse extends jspb.Message { + clearFeePerSignerList(): void; + getFeePerSignerList(): Array; + setFeePerSignerList(value: Array): void; + addFeePerSigner(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getRequester(): string; + setRequester(value: string): void; + + hasCurrentGroupSigningResult(): boolean; + clearCurrentGroupSigningResult(): void; + getCurrentGroupSigningResult(): band_tss_v1beta1_tss_pb.SigningResult | undefined; + setCurrentGroupSigningResult(value?: band_tss_v1beta1_tss_pb.SigningResult): void; + + hasIncomingGroupSigningResult(): boolean; + clearIncomingGroupSigningResult(): void; + getIncomingGroupSigningResult(): band_tss_v1beta1_tss_pb.SigningResult | undefined; + setIncomingGroupSigningResult(value?: band_tss_v1beta1_tss_pb.SigningResult): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QuerySigningResponse.AsObject; + static toObject(includeInstance: boolean, msg: QuerySigningResponse): QuerySigningResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QuerySigningResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QuerySigningResponse; + static deserializeBinaryFromReader(message: QuerySigningResponse, reader: jspb.BinaryReader): QuerySigningResponse; +} + +export namespace QuerySigningResponse { + export type AsObject = { + feePerSignerList: Array, + requester: string, + currentGroupSigningResult?: band_tss_v1beta1_tss_pb.SigningResult.AsObject, + incomingGroupSigningResult?: band_tss_v1beta1_tss_pb.SigningResult.AsObject, + } +} + +export class QueryGroupTransitionRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryGroupTransitionRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryGroupTransitionRequest): QueryGroupTransitionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryGroupTransitionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryGroupTransitionRequest; + static deserializeBinaryFromReader(message: QueryGroupTransitionRequest, reader: jspb.BinaryReader): QueryGroupTransitionRequest; +} + +export namespace QueryGroupTransitionRequest { + export type AsObject = { + } +} + +export class QueryGroupTransitionResponse extends jspb.Message { + hasGroupTransition(): boolean; + clearGroupTransition(): void; + getGroupTransition(): band_bandtss_v1beta1_bandtss_pb.GroupTransition | undefined; + setGroupTransition(value?: band_bandtss_v1beta1_bandtss_pb.GroupTransition): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryGroupTransitionResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryGroupTransitionResponse): QueryGroupTransitionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryGroupTransitionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryGroupTransitionResponse; + static deserializeBinaryFromReader(message: QueryGroupTransitionResponse, reader: jspb.BinaryReader): QueryGroupTransitionResponse; +} + +export namespace QueryGroupTransitionResponse { + export type AsObject = { + groupTransition?: band_bandtss_v1beta1_bandtss_pb.GroupTransition.AsObject, + } +} + +export class QueryParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; + static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; +} + +export namespace QueryParamsRequest { + export type AsObject = { + } +} + +export class QueryParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_bandtss_v1beta1_genesis_pb.Params | undefined; + setParams(value?: band_bandtss_v1beta1_genesis_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; + static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; +} + +export namespace QueryParamsResponse { + export type AsObject = { + params?: band_bandtss_v1beta1_genesis_pb.Params.AsObject, + } +} + +export interface MemberStatusFilterMap { + MEMBER_STATUS_FILTER_UNSPECIFIED: 0; + MEMBER_STATUS_FILTER_ACTIVE: 1; + MEMBER_STATUS_FILTER_INACTIVE: 2; +} + +export const MemberStatusFilter: MemberStatusFilterMap; + diff --git a/codegen/band/bandtss/v1beta1/query_pb.js b/codegen/band/bandtss/v1beta1/query_pb.js new file mode 100644 index 0000000..cdf9e38 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/query_pb.js @@ -0,0 +1,3108 @@ +// source: band/bandtss/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js'); +goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var band_tss_v1beta1_tss_pb = require('../../../band/tss/v1beta1/tss_pb.js'); +goog.object.extend(proto, band_tss_v1beta1_tss_pb); +var band_bandtss_v1beta1_bandtss_pb = require('../../../band/bandtss/v1beta1/bandtss_pb.js'); +goog.object.extend(proto, band_bandtss_v1beta1_bandtss_pb); +var band_bandtss_v1beta1_genesis_pb = require('../../../band/bandtss/v1beta1/genesis_pb.js'); +goog.object.extend(proto, band_bandtss_v1beta1_genesis_pb); +goog.exportSymbol('proto.band.bandtss.v1beta1.MemberStatusFilter', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryCountsRequest', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryCountsResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryCurrentGroupRequest', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryCurrentGroupResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryGroupTransitionRequest', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryGroupTransitionResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryIncomingGroupRequest', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryIncomingGroupResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryMemberRequest', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryMemberResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryMembersRequest', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryMembersResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QuerySigningRequest', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.QuerySigningResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryCountsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryCountsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryCountsRequest.displayName = 'proto.band.bandtss.v1beta1.QueryCountsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryCountsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryCountsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryCountsResponse.displayName = 'proto.band.bandtss.v1beta1.QueryCountsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryMembersRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryMembersRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryMembersRequest.displayName = 'proto.band.bandtss.v1beta1.QueryMembersRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryMembersResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.bandtss.v1beta1.QueryMembersResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryMembersResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryMembersResponse.displayName = 'proto.band.bandtss.v1beta1.QueryMembersResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryMemberRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryMemberRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryMemberRequest.displayName = 'proto.band.bandtss.v1beta1.QueryMemberRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryMemberResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryMemberResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryMemberResponse.displayName = 'proto.band.bandtss.v1beta1.QueryMemberResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryCurrentGroupRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.displayName = 'proto.band.bandtss.v1beta1.QueryCurrentGroupRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryCurrentGroupResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.displayName = 'proto.band.bandtss.v1beta1.QueryCurrentGroupResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryIncomingGroupRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.displayName = 'proto.band.bandtss.v1beta1.QueryIncomingGroupRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryIncomingGroupResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.displayName = 'proto.band.bandtss.v1beta1.QueryIncomingGroupResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QuerySigningRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QuerySigningRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QuerySigningRequest.displayName = 'proto.band.bandtss.v1beta1.QuerySigningRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QuerySigningResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.bandtss.v1beta1.QuerySigningResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QuerySigningResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QuerySigningResponse.displayName = 'proto.band.bandtss.v1beta1.QuerySigningResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryGroupTransitionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.displayName = 'proto.band.bandtss.v1beta1.QueryGroupTransitionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryGroupTransitionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.displayName = 'proto.band.bandtss.v1beta1.QueryGroupTransitionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryParamsRequest.displayName = 'proto.band.bandtss.v1beta1.QueryParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.QueryParamsResponse.displayName = 'proto.band.bandtss.v1beta1.QueryParamsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryCountsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryCountsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryCountsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryCountsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryCountsRequest} + */ +proto.band.bandtss.v1beta1.QueryCountsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryCountsRequest; + return proto.band.bandtss.v1beta1.QueryCountsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryCountsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryCountsRequest} + */ +proto.band.bandtss.v1beta1.QueryCountsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryCountsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryCountsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryCountsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryCountsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryCountsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryCountsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryCountsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryCountsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + signingCount: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryCountsResponse} + */ +proto.band.bandtss.v1beta1.QueryCountsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryCountsResponse; + return proto.band.bandtss.v1beta1.QueryCountsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryCountsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryCountsResponse} + */ +proto.band.bandtss.v1beta1.QueryCountsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryCountsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryCountsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryCountsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryCountsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigningCount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 signing_count = 1; + * @return {number} + */ +proto.band.bandtss.v1beta1.QueryCountsResponse.prototype.getSigningCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.QueryCountsResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryCountsResponse.prototype.setSigningCount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryMembersRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryMembersRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.toObject = function(includeInstance, msg) { + var f, obj = { + status: jspb.Message.getFieldWithDefault(msg, 1, 0), + isIncomingGroup: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryMembersRequest} + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryMembersRequest; + return proto.band.bandtss.v1beta1.QueryMembersRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryMembersRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryMembersRequest} + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.band.bandtss.v1beta1.MemberStatusFilter} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsIncomingGroup(value); + break; + case 3: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryMembersRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryMembersRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getIsIncomingGroup(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional MemberStatusFilter status = 1; + * @return {!proto.band.bandtss.v1beta1.MemberStatusFilter} + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.getStatus = function() { + return /** @type {!proto.band.bandtss.v1beta1.MemberStatusFilter} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.band.bandtss.v1beta1.MemberStatusFilter} value + * @return {!proto.band.bandtss.v1beta1.QueryMembersRequest} returns this + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bool is_incoming_group = 2; + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.getIsIncomingGroup = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.bandtss.v1beta1.QueryMembersRequest} returns this + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.setIsIncomingGroup = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.band.bandtss.v1beta1.QueryMembersRequest} returns this +*/ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.QueryMembersRequest} returns this + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QueryMembersRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryMembersResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryMembersResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.toObject = function(includeInstance, msg) { + var f, obj = { + membersList: jspb.Message.toObjectList(msg.getMembersList(), + band_bandtss_v1beta1_bandtss_pb.Member.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryMembersResponse} + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryMembersResponse; + return proto.band.bandtss.v1beta1.QueryMembersResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryMembersResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryMembersResponse} + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_bandtss_v1beta1_bandtss_pb.Member; + reader.readMessage(value,band_bandtss_v1beta1_bandtss_pb.Member.deserializeBinaryFromReader); + msg.addMembers(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryMembersResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryMembersResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_bandtss_v1beta1_bandtss_pb.Member.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Member members = 1; + * @return {!Array} + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_bandtss_v1beta1_bandtss_pb.Member, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.bandtss.v1beta1.QueryMembersResponse} returns this +*/ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.bandtss.v1beta1.Member=} opt_value + * @param {number=} opt_index + * @return {!proto.band.bandtss.v1beta1.Member} + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.bandtss.v1beta1.Member, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.bandtss.v1beta1.QueryMembersResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.clearMembersList = function() { + return this.setMembersList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.band.bandtss.v1beta1.QueryMembersResponse} returns this +*/ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.QueryMembersResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QueryMembersResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryMemberRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryMemberRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryMemberRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryMemberRequest.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryMemberRequest} + */ +proto.band.bandtss.v1beta1.QueryMemberRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryMemberRequest; + return proto.band.bandtss.v1beta1.QueryMemberRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryMemberRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryMemberRequest} + */ +proto.band.bandtss.v1beta1.QueryMemberRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryMemberRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryMemberRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryMemberRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryMemberRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.band.bandtss.v1beta1.QueryMemberRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.QueryMemberRequest} returns this + */ +proto.band.bandtss.v1beta1.QueryMemberRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryMemberResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryMemberResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.toObject = function(includeInstance, msg) { + var f, obj = { + currentGroupMember: (f = msg.getCurrentGroupMember()) && band_bandtss_v1beta1_bandtss_pb.Member.toObject(includeInstance, f), + incomingGroupMember: (f = msg.getIncomingGroupMember()) && band_bandtss_v1beta1_bandtss_pb.Member.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryMemberResponse} + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryMemberResponse; + return proto.band.bandtss.v1beta1.QueryMemberResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryMemberResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryMemberResponse} + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_bandtss_v1beta1_bandtss_pb.Member; + reader.readMessage(value,band_bandtss_v1beta1_bandtss_pb.Member.deserializeBinaryFromReader); + msg.setCurrentGroupMember(value); + break; + case 2: + var value = new band_bandtss_v1beta1_bandtss_pb.Member; + reader.readMessage(value,band_bandtss_v1beta1_bandtss_pb.Member.deserializeBinaryFromReader); + msg.setIncomingGroupMember(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryMemberResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryMemberResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCurrentGroupMember(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_bandtss_v1beta1_bandtss_pb.Member.serializeBinaryToWriter + ); + } + f = message.getIncomingGroupMember(); + if (f != null) { + writer.writeMessage( + 2, + f, + band_bandtss_v1beta1_bandtss_pb.Member.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Member current_group_member = 1; + * @return {?proto.band.bandtss.v1beta1.Member} + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.getCurrentGroupMember = function() { + return /** @type{?proto.band.bandtss.v1beta1.Member} */ ( + jspb.Message.getWrapperField(this, band_bandtss_v1beta1_bandtss_pb.Member, 1)); +}; + + +/** + * @param {?proto.band.bandtss.v1beta1.Member|undefined} value + * @return {!proto.band.bandtss.v1beta1.QueryMemberResponse} returns this +*/ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.setCurrentGroupMember = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.QueryMemberResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.clearCurrentGroupMember = function() { + return this.setCurrentGroupMember(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.hasCurrentGroupMember = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Member incoming_group_member = 2; + * @return {?proto.band.bandtss.v1beta1.Member} + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.getIncomingGroupMember = function() { + return /** @type{?proto.band.bandtss.v1beta1.Member} */ ( + jspb.Message.getWrapperField(this, band_bandtss_v1beta1_bandtss_pb.Member, 2)); +}; + + +/** + * @param {?proto.band.bandtss.v1beta1.Member|undefined} value + * @return {!proto.band.bandtss.v1beta1.QueryMemberResponse} returns this +*/ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.setIncomingGroupMember = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.QueryMemberResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.clearIncomingGroupMember = function() { + return this.setIncomingGroupMember(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QueryMemberResponse.prototype.hasIncomingGroupMember = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryCurrentGroupRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupRequest} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryCurrentGroupRequest; + return proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryCurrentGroupRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupRequest} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryCurrentGroupRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), + size: jspb.Message.getFieldWithDefault(msg, 2, 0), + threshold: jspb.Message.getFieldWithDefault(msg, 3, 0), + pubKey: msg.getPubKey_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 5, 0), + activeTime: (f = msg.getActiveTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryCurrentGroupResponse; + return proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSize(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setThreshold(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubKey(value); + break; + case 5: + var value = /** @type {!proto.band.tss.v1beta1.GroupStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setActiveTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getThreshold(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPubKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getActiveTime(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 group_id = 1; + * @return {number} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 size = 2; + * @return {number} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 threshold = 3; + * @return {number} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.getThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.setThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes pub_key = 4; + * @return {!(string|Uint8Array)} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.getPubKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes pub_key = 4; + * This is a type-conversion wrapper around `getPubKey()` + * @return {string} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.getPubKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPubKey())); +}; + + +/** + * optional bytes pub_key = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPubKey()` + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.getPubKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPubKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.setPubKey = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional band.tss.v1beta1.GroupStatus status = 5; + * @return {!proto.band.tss.v1beta1.GroupStatus} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.getStatus = function() { + return /** @type {!proto.band.tss.v1beta1.GroupStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.band.tss.v1beta1.GroupStatus} value + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + +/** + * optional google.protobuf.Timestamp active_time = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.getActiveTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} returns this +*/ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.setActiveTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.QueryCurrentGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.clearActiveTime = function() { + return this.setActiveTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QueryCurrentGroupResponse.prototype.hasActiveTime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryIncomingGroupRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryIncomingGroupRequest} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryIncomingGroupRequest; + return proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryIncomingGroupRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryIncomingGroupRequest} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryIncomingGroupRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), + size: jspb.Message.getFieldWithDefault(msg, 2, 0), + threshold: jspb.Message.getFieldWithDefault(msg, 3, 0), + pubKey: msg.getPubKey_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryIncomingGroupResponse; + return proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSize(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setThreshold(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubKey(value); + break; + case 5: + var value = /** @type {!proto.band.tss.v1beta1.GroupStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getThreshold(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPubKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } +}; + + +/** + * optional uint64 group_id = 1; + * @return {number} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 size = 2; + * @return {number} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 threshold = 3; + * @return {number} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.getThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.setThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes pub_key = 4; + * @return {!(string|Uint8Array)} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.getPubKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes pub_key = 4; + * This is a type-conversion wrapper around `getPubKey()` + * @return {string} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.getPubKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPubKey())); +}; + + +/** + * optional bytes pub_key = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPubKey()` + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.getPubKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPubKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.setPubKey = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional band.tss.v1beta1.GroupStatus status = 5; + * @return {!proto.band.tss.v1beta1.GroupStatus} + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.getStatus = function() { + return /** @type {!proto.band.tss.v1beta1.GroupStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.band.tss.v1beta1.GroupStatus} value + * @return {!proto.band.bandtss.v1beta1.QueryIncomingGroupResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryIncomingGroupResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QuerySigningRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QuerySigningRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QuerySigningRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QuerySigningRequest.toObject = function(includeInstance, msg) { + var f, obj = { + signingId: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QuerySigningRequest} + */ +proto.band.bandtss.v1beta1.QuerySigningRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QuerySigningRequest; + return proto.band.bandtss.v1beta1.QuerySigningRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QuerySigningRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QuerySigningRequest} + */ +proto.band.bandtss.v1beta1.QuerySigningRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QuerySigningRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QuerySigningRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QuerySigningRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QuerySigningRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigningId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 signing_id = 1; + * @return {number} + */ +proto.band.bandtss.v1beta1.QuerySigningRequest.prototype.getSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.QuerySigningRequest} returns this + */ +proto.band.bandtss.v1beta1.QuerySigningRequest.prototype.setSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QuerySigningResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QuerySigningResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feePerSignerList: jspb.Message.toObjectList(msg.getFeePerSignerList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + requester: jspb.Message.getFieldWithDefault(msg, 2, ""), + currentGroupSigningResult: (f = msg.getCurrentGroupSigningResult()) && band_tss_v1beta1_tss_pb.SigningResult.toObject(includeInstance, f), + incomingGroupSigningResult: (f = msg.getIncomingGroupSigningResult()) && band_tss_v1beta1_tss_pb.SigningResult.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QuerySigningResponse} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QuerySigningResponse; + return proto.band.bandtss.v1beta1.QuerySigningResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QuerySigningResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QuerySigningResponse} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFeePerSigner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRequester(value); + break; + case 3: + var value = new band_tss_v1beta1_tss_pb.SigningResult; + reader.readMessage(value,band_tss_v1beta1_tss_pb.SigningResult.deserializeBinaryFromReader); + msg.setCurrentGroupSigningResult(value); + break; + case 4: + var value = new band_tss_v1beta1_tss_pb.SigningResult; + reader.readMessage(value,band_tss_v1beta1_tss_pb.SigningResult.deserializeBinaryFromReader); + msg.setIncomingGroupSigningResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QuerySigningResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QuerySigningResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeePerSignerList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRequester(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCurrentGroupSigningResult(); + if (f != null) { + writer.writeMessage( + 3, + f, + band_tss_v1beta1_tss_pb.SigningResult.serializeBinaryToWriter + ); + } + f = message.getIncomingGroupSigningResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + band_tss_v1beta1_tss_pb.SigningResult.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee_per_signer = 1; + * @return {!Array} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.getFeePerSignerList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.bandtss.v1beta1.QuerySigningResponse} returns this +*/ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.setFeePerSignerList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.addFeePerSigner = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.bandtss.v1beta1.QuerySigningResponse} returns this + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.clearFeePerSignerList = function() { + return this.setFeePerSignerList([]); +}; + + +/** + * optional string requester = 2; + * @return {string} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.getRequester = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.QuerySigningResponse} returns this + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.setRequester = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional band.tss.v1beta1.SigningResult current_group_signing_result = 3; + * @return {?proto.band.tss.v1beta1.SigningResult} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.getCurrentGroupSigningResult = function() { + return /** @type{?proto.band.tss.v1beta1.SigningResult} */ ( + jspb.Message.getWrapperField(this, band_tss_v1beta1_tss_pb.SigningResult, 3)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.SigningResult|undefined} value + * @return {!proto.band.bandtss.v1beta1.QuerySigningResponse} returns this +*/ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.setCurrentGroupSigningResult = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.QuerySigningResponse} returns this + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.clearCurrentGroupSigningResult = function() { + return this.setCurrentGroupSigningResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.hasCurrentGroupSigningResult = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional band.tss.v1beta1.SigningResult incoming_group_signing_result = 4; + * @return {?proto.band.tss.v1beta1.SigningResult} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.getIncomingGroupSigningResult = function() { + return /** @type{?proto.band.tss.v1beta1.SigningResult} */ ( + jspb.Message.getWrapperField(this, band_tss_v1beta1_tss_pb.SigningResult, 4)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.SigningResult|undefined} value + * @return {!proto.band.bandtss.v1beta1.QuerySigningResponse} returns this +*/ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.setIncomingGroupSigningResult = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.QuerySigningResponse} returns this + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.clearIncomingGroupSigningResult = function() { + return this.setIncomingGroupSigningResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QuerySigningResponse.prototype.hasIncomingGroupSigningResult = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryGroupTransitionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryGroupTransitionRequest} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryGroupTransitionRequest; + return proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryGroupTransitionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryGroupTransitionRequest} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryGroupTransitionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryGroupTransitionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + groupTransition: (f = msg.getGroupTransition()) && band_bandtss_v1beta1_bandtss_pb.GroupTransition.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryGroupTransitionResponse} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryGroupTransitionResponse; + return proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryGroupTransitionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryGroupTransitionResponse} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_bandtss_v1beta1_bandtss_pb.GroupTransition; + reader.readMessage(value,band_bandtss_v1beta1_bandtss_pb.GroupTransition.deserializeBinaryFromReader); + msg.setGroupTransition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryGroupTransitionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupTransition(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_bandtss_v1beta1_bandtss_pb.GroupTransition.serializeBinaryToWriter + ); + } +}; + + +/** + * optional GroupTransition group_transition = 1; + * @return {?proto.band.bandtss.v1beta1.GroupTransition} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.prototype.getGroupTransition = function() { + return /** @type{?proto.band.bandtss.v1beta1.GroupTransition} */ ( + jspb.Message.getWrapperField(this, band_bandtss_v1beta1_bandtss_pb.GroupTransition, 1)); +}; + + +/** + * @param {?proto.band.bandtss.v1beta1.GroupTransition|undefined} value + * @return {!proto.band.bandtss.v1beta1.QueryGroupTransitionResponse} returns this +*/ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.prototype.setGroupTransition = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.QueryGroupTransitionResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.prototype.clearGroupTransition = function() { + return this.setGroupTransition(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QueryGroupTransitionResponse.prototype.hasGroupTransition = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryParamsRequest} + */ +proto.band.bandtss.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryParamsRequest; + return proto.band.bandtss.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryParamsRequest} + */ +proto.band.bandtss.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.QueryParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && band_bandtss_v1beta1_genesis_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.QueryParamsResponse} + */ +proto.band.bandtss.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.QueryParamsResponse; + return proto.band.bandtss.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.QueryParamsResponse} + */ +proto.band.bandtss.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_bandtss_v1beta1_genesis_pb.Params; + reader.readMessage(value,band_bandtss_v1beta1_genesis_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.QueryParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_bandtss_v1beta1_genesis_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.bandtss.v1beta1.Params} + */ +proto.band.bandtss.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.band.bandtss.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_bandtss_v1beta1_genesis_pb.Params, 1)); +}; + + +/** + * @param {?proto.band.bandtss.v1beta1.Params|undefined} value + * @return {!proto.band.bandtss.v1beta1.QueryParamsResponse} returns this +*/ +proto.band.bandtss.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.QueryParamsResponse} returns this + */ +proto.band.bandtss.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * @enum {number} + */ +proto.band.bandtss.v1beta1.MemberStatusFilter = { + MEMBER_STATUS_FILTER_UNSPECIFIED: 0, + MEMBER_STATUS_FILTER_ACTIVE: 1, + MEMBER_STATUS_FILTER_INACTIVE: 2 +}; + +goog.object.extend(exports, proto.band.bandtss.v1beta1); diff --git a/codegen/band/bandtss/v1beta1/query_pb_service.d.ts b/codegen/band/bandtss/v1beta1/query_pb_service.d.ts new file mode 100644 index 0000000..535bab8 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/query_pb_service.d.ts @@ -0,0 +1,196 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/query.proto + +import * as band_bandtss_v1beta1_query_pb from "../../../band/bandtss/v1beta1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryCounts = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_query_pb.QueryCountsRequest; + readonly responseType: typeof band_bandtss_v1beta1_query_pb.QueryCountsResponse; +}; + +type QueryMembers = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_query_pb.QueryMembersRequest; + readonly responseType: typeof band_bandtss_v1beta1_query_pb.QueryMembersResponse; +}; + +type QueryMember = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_query_pb.QueryMemberRequest; + readonly responseType: typeof band_bandtss_v1beta1_query_pb.QueryMemberResponse; +}; + +type QueryCurrentGroup = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_query_pb.QueryCurrentGroupRequest; + readonly responseType: typeof band_bandtss_v1beta1_query_pb.QueryCurrentGroupResponse; +}; + +type QueryIncomingGroup = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_query_pb.QueryIncomingGroupRequest; + readonly responseType: typeof band_bandtss_v1beta1_query_pb.QueryIncomingGroupResponse; +}; + +type QuerySigning = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_query_pb.QuerySigningRequest; + readonly responseType: typeof band_bandtss_v1beta1_query_pb.QuerySigningResponse; +}; + +type QueryGroupTransition = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_query_pb.QueryGroupTransitionRequest; + readonly responseType: typeof band_bandtss_v1beta1_query_pb.QueryGroupTransitionResponse; +}; + +type QueryParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_query_pb.QueryParamsRequest; + readonly responseType: typeof band_bandtss_v1beta1_query_pb.QueryParamsResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly Counts: QueryCounts; + static readonly Members: QueryMembers; + static readonly Member: QueryMember; + static readonly CurrentGroup: QueryCurrentGroup; + static readonly IncomingGroup: QueryIncomingGroup; + static readonly Signing: QuerySigning; + static readonly GroupTransition: QueryGroupTransition; + static readonly Params: QueryParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + counts( + requestMessage: band_bandtss_v1beta1_query_pb.QueryCountsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryCountsResponse|null) => void + ): UnaryResponse; + counts( + requestMessage: band_bandtss_v1beta1_query_pb.QueryCountsRequest, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryCountsResponse|null) => void + ): UnaryResponse; + members( + requestMessage: band_bandtss_v1beta1_query_pb.QueryMembersRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryMembersResponse|null) => void + ): UnaryResponse; + members( + requestMessage: band_bandtss_v1beta1_query_pb.QueryMembersRequest, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryMembersResponse|null) => void + ): UnaryResponse; + member( + requestMessage: band_bandtss_v1beta1_query_pb.QueryMemberRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryMemberResponse|null) => void + ): UnaryResponse; + member( + requestMessage: band_bandtss_v1beta1_query_pb.QueryMemberRequest, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryMemberResponse|null) => void + ): UnaryResponse; + currentGroup( + requestMessage: band_bandtss_v1beta1_query_pb.QueryCurrentGroupRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryCurrentGroupResponse|null) => void + ): UnaryResponse; + currentGroup( + requestMessage: band_bandtss_v1beta1_query_pb.QueryCurrentGroupRequest, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryCurrentGroupResponse|null) => void + ): UnaryResponse; + incomingGroup( + requestMessage: band_bandtss_v1beta1_query_pb.QueryIncomingGroupRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryIncomingGroupResponse|null) => void + ): UnaryResponse; + incomingGroup( + requestMessage: band_bandtss_v1beta1_query_pb.QueryIncomingGroupRequest, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryIncomingGroupResponse|null) => void + ): UnaryResponse; + signing( + requestMessage: band_bandtss_v1beta1_query_pb.QuerySigningRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QuerySigningResponse|null) => void + ): UnaryResponse; + signing( + requestMessage: band_bandtss_v1beta1_query_pb.QuerySigningRequest, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QuerySigningResponse|null) => void + ): UnaryResponse; + groupTransition( + requestMessage: band_bandtss_v1beta1_query_pb.QueryGroupTransitionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryGroupTransitionResponse|null) => void + ): UnaryResponse; + groupTransition( + requestMessage: band_bandtss_v1beta1_query_pb.QueryGroupTransitionRequest, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryGroupTransitionResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_bandtss_v1beta1_query_pb.QueryParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_bandtss_v1beta1_query_pb.QueryParamsRequest, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/bandtss/v1beta1/query_pb_service.js b/codegen/band/bandtss/v1beta1/query_pb_service.js new file mode 100644 index 0000000..62bf70a --- /dev/null +++ b/codegen/band/bandtss/v1beta1/query_pb_service.js @@ -0,0 +1,341 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/query.proto + +var band_bandtss_v1beta1_query_pb = require("../../../band/bandtss/v1beta1/query_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Query = (function () { + function Query() {} + Query.serviceName = "band.bandtss.v1beta1.Query"; + return Query; +}()); + +Query.Counts = { + methodName: "Counts", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_query_pb.QueryCountsRequest, + responseType: band_bandtss_v1beta1_query_pb.QueryCountsResponse +}; + +Query.Members = { + methodName: "Members", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_query_pb.QueryMembersRequest, + responseType: band_bandtss_v1beta1_query_pb.QueryMembersResponse +}; + +Query.Member = { + methodName: "Member", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_query_pb.QueryMemberRequest, + responseType: band_bandtss_v1beta1_query_pb.QueryMemberResponse +}; + +Query.CurrentGroup = { + methodName: "CurrentGroup", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_query_pb.QueryCurrentGroupRequest, + responseType: band_bandtss_v1beta1_query_pb.QueryCurrentGroupResponse +}; + +Query.IncomingGroup = { + methodName: "IncomingGroup", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_query_pb.QueryIncomingGroupRequest, + responseType: band_bandtss_v1beta1_query_pb.QueryIncomingGroupResponse +}; + +Query.Signing = { + methodName: "Signing", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_query_pb.QuerySigningRequest, + responseType: band_bandtss_v1beta1_query_pb.QuerySigningResponse +}; + +Query.GroupTransition = { + methodName: "GroupTransition", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_query_pb.QueryGroupTransitionRequest, + responseType: band_bandtss_v1beta1_query_pb.QueryGroupTransitionResponse +}; + +Query.Params = { + methodName: "Params", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_query_pb.QueryParamsRequest, + responseType: band_bandtss_v1beta1_query_pb.QueryParamsResponse +}; + +exports.Query = Query; + +function QueryClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +QueryClient.prototype.counts = function counts(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Counts, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.members = function members(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Members, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.member = function member(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Member, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.currentGroup = function currentGroup(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.CurrentGroup, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.incomingGroup = function incomingGroup(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.IncomingGroup, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.signing = function signing(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Signing, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.groupTransition = function groupTransition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.GroupTransition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Params, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.QueryClient = QueryClient; + diff --git a/codegen/band/bandtss/v1beta1/tx.ts b/codegen/band/bandtss/v1beta1/tx.ts new file mode 100644 index 0000000..a7005ad --- /dev/null +++ b/codegen/band/bandtss/v1beta1/tx.ts @@ -0,0 +1,893 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/bandtss/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/any"; +import * as dependency_3 from "./../../../google/protobuf/timestamp"; +import * as dependency_4 from "./../../../amino/amino"; +import * as dependency_5 from "./../../../cosmos/base/v1beta1/coin"; +import * as dependency_6 from "./../../../cosmos_proto/cosmos"; +import * as dependency_7 from "./../../../cosmos/msg/v1/msg"; +import * as dependency_8 from "./genesis"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.bandtss.v1beta1 { + export class MsgRequestSignature extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + content?: dependency_2.google.protobuf.Any; + memo?: string; + fee_limit?: dependency_5.cosmos.base.v1beta1.Coin[]; + sender?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("content" in data && data.content != undefined) { + this.content = data.content; + } + if ("memo" in data && data.memo != undefined) { + this.memo = data.memo; + } + if ("fee_limit" in data && data.fee_limit != undefined) { + this.fee_limit = data.fee_limit; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get content() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 1) as dependency_2.google.protobuf.Any; + } + set content(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_content() { + return pb_1.Message.getField(this, 1) != null; + } + get memo() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set memo(value: string) { + pb_1.Message.setField(this, 2, value); + } + get fee_limit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 3) as dependency_5.cosmos.base.v1beta1.Coin[]; + } + set fee_limit(value: dependency_5.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + content?: ReturnType; + memo?: string; + fee_limit?: ReturnType[]; + sender?: string; + }): MsgRequestSignature { + const message = new MsgRequestSignature({}); + if (data.content != null) { + message.content = dependency_2.google.protobuf.Any.fromObject(data.content); + } + if (data.memo != null) { + message.memo = data.memo; + } + if (data.fee_limit != null) { + message.fee_limit = data.fee_limit.map(item => dependency_5.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + content?: ReturnType; + memo?: string; + fee_limit?: ReturnType[]; + sender?: string; + } = {}; + if (this.content != null) { + data.content = this.content.toObject(); + } + if (this.memo != null) { + data.memo = this.memo; + } + if (this.fee_limit != null) { + data.fee_limit = this.fee_limit.map((item: dependency_5.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.sender != null) { + data.sender = this.sender; + } + 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_content) + writer.writeMessage(1, this.content, () => this.content.serialize(writer)); + if (this.memo.length) + writer.writeString(2, this.memo); + if (this.fee_limit.length) + writer.writeRepeatedMessage(3, this.fee_limit, (item: dependency_5.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.sender.length) + writer.writeString(4, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRequestSignature { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRequestSignature(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.content, () => message.content = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + case 2: + message.memo = reader.readString(); + break; + case 3: + reader.readMessage(message.fee_limit, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_5.cosmos.base.v1beta1.Coin)); + break; + case 4: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRequestSignature { + return MsgRequestSignature.deserialize(bytes); + } + } + export class MsgRequestSignatureResponse 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: {}): MsgRequestSignatureResponse { + const message = new MsgRequestSignatureResponse({}); + 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): MsgRequestSignatureResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRequestSignatureResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRequestSignatureResponse { + return MsgRequestSignatureResponse.deserialize(bytes); + } + } + export class MsgActivate extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sender?: string; + group_id?: 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 ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + } + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + sender?: string; + group_id?: number; + }): MsgActivate { + const message = new MsgActivate({}); + if (data.sender != null) { + message.sender = data.sender; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + return message; + } + toObject() { + const data: { + sender?: string; + group_id?: number; + } = {}; + if (this.sender != null) { + data.sender = this.sender; + } + if (this.group_id != null) { + data.group_id = this.group_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.sender.length) + writer.writeString(1, this.sender); + if (this.group_id != 0) + writer.writeUint64(2, this.group_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgActivate { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgActivate(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sender = reader.readString(); + break; + case 2: + message.group_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgActivate { + return MsgActivate.deserialize(bytes); + } + } + export class MsgActivateResponse 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: {}): MsgActivateResponse { + const message = new MsgActivateResponse({}); + 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): MsgActivateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgActivateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgActivateResponse { + return MsgActivateResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_8.band.bandtss.v1beta1.Params; + authority?: 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 ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_8.band.bandtss.v1beta1.Params, 1) as dependency_8.band.bandtss.v1beta1.Params; + } + set params(value: dependency_8.band.bandtss.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + params?: ReturnType; + authority?: string; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.params != null) { + message.params = dependency_8.band.bandtss.v1beta1.Params.fromObject(data.params); + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + authority?: string; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.authority != null) { + data.authority = this.authority; + } + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.authority.length) + writer.writeString(2, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_8.band.bandtss.v1beta1.Params.deserialize(reader)); + break; + case 2: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + export class MsgTransitionGroup extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + members?: string[]; + threshold?: number; + exec_time?: dependency_3.google.protobuf.Timestamp; + authority?: string; + }) { + 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 ("members" in data && data.members != undefined) { + this.members = data.members; + } + if ("threshold" in data && data.threshold != undefined) { + this.threshold = data.threshold; + } + if ("exec_time" in data && data.exec_time != undefined) { + this.exec_time = data.exec_time; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get members() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set members(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get threshold() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set threshold(value: number) { + pb_1.Message.setField(this, 2, value); + } + get exec_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 3) as dependency_3.google.protobuf.Timestamp; + } + set exec_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_exec_time() { + return pb_1.Message.getField(this, 3) != null; + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + members?: string[]; + threshold?: number; + exec_time?: ReturnType; + authority?: string; + }): MsgTransitionGroup { + const message = new MsgTransitionGroup({}); + if (data.members != null) { + message.members = data.members; + } + if (data.threshold != null) { + message.threshold = data.threshold; + } + if (data.exec_time != null) { + message.exec_time = dependency_3.google.protobuf.Timestamp.fromObject(data.exec_time); + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + members?: string[]; + threshold?: number; + exec_time?: ReturnType; + authority?: string; + } = {}; + if (this.members != null) { + data.members = this.members; + } + if (this.threshold != null) { + data.threshold = this.threshold; + } + if (this.exec_time != null) { + data.exec_time = this.exec_time.toObject(); + } + if (this.authority != null) { + data.authority = this.authority; + } + 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.members.length) + writer.writeRepeatedString(1, this.members); + if (this.threshold != 0) + writer.writeUint64(2, this.threshold); + if (this.has_exec_time) + writer.writeMessage(3, this.exec_time, () => this.exec_time.serialize(writer)); + if (this.authority.length) + writer.writeString(4, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTransitionGroup { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTransitionGroup(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + message.threshold = reader.readUint64(); + break; + case 3: + reader.readMessage(message.exec_time, () => message.exec_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 4: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTransitionGroup { + return MsgTransitionGroup.deserialize(bytes); + } + } + export class MsgTransitionGroupResponse 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: {}): MsgTransitionGroupResponse { + const message = new MsgTransitionGroupResponse({}); + 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): MsgTransitionGroupResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTransitionGroupResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTransitionGroupResponse { + return MsgTransitionGroupResponse.deserialize(bytes); + } + } + export class MsgForceTransitionGroup extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + incoming_group_id?: number; + exec_time?: dependency_3.google.protobuf.Timestamp; + authority?: 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 ("incoming_group_id" in data && data.incoming_group_id != undefined) { + this.incoming_group_id = data.incoming_group_id; + } + if ("exec_time" in data && data.exec_time != undefined) { + this.exec_time = data.exec_time; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get incoming_group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set incoming_group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get exec_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 2) as dependency_3.google.protobuf.Timestamp; + } + set exec_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_exec_time() { + return pb_1.Message.getField(this, 2) != null; + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + incoming_group_id?: number; + exec_time?: ReturnType; + authority?: string; + }): MsgForceTransitionGroup { + const message = new MsgForceTransitionGroup({}); + if (data.incoming_group_id != null) { + message.incoming_group_id = data.incoming_group_id; + } + if (data.exec_time != null) { + message.exec_time = dependency_3.google.protobuf.Timestamp.fromObject(data.exec_time); + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + incoming_group_id?: number; + exec_time?: ReturnType; + authority?: string; + } = {}; + if (this.incoming_group_id != null) { + data.incoming_group_id = this.incoming_group_id; + } + if (this.exec_time != null) { + data.exec_time = this.exec_time.toObject(); + } + if (this.authority != null) { + data.authority = this.authority; + } + 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.incoming_group_id != 0) + writer.writeUint64(1, this.incoming_group_id); + if (this.has_exec_time) + writer.writeMessage(2, this.exec_time, () => this.exec_time.serialize(writer)); + if (this.authority.length) + writer.writeString(3, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgForceTransitionGroup { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgForceTransitionGroup(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.incoming_group_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.exec_time, () => message.exec_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 3: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgForceTransitionGroup { + return MsgForceTransitionGroup.deserialize(bytes); + } + } + export class MsgForceTransitionGroupResponse 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: {}): MsgForceTransitionGroupResponse { + const message = new MsgForceTransitionGroupResponse({}); + 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): MsgForceTransitionGroupResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgForceTransitionGroupResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgForceTransitionGroupResponse { + return MsgForceTransitionGroupResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + RequestSignature: { + path: "/band.bandtss.v1beta1.Msg/RequestSignature", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRequestSignature) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRequestSignature.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRequestSignatureResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRequestSignatureResponse.deserialize(new Uint8Array(bytes)) + }, + Activate: { + path: "/band.bandtss.v1beta1.Msg/Activate", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgActivate) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgActivate.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgActivateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgActivateResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/band.bandtss.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + }, + TransitionGroup: { + path: "/band.bandtss.v1beta1.Msg/TransitionGroup", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgTransitionGroup) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgTransitionGroup.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgTransitionGroupResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgTransitionGroupResponse.deserialize(new Uint8Array(bytes)) + }, + ForceTransitionGroup: { + path: "/band.bandtss.v1beta1.Msg/ForceTransitionGroup", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgForceTransitionGroup) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgForceTransitionGroup.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgForceTransitionGroupResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgForceTransitionGroupResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract RequestSignature(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Activate(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TransitionGroup(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ForceTransitionGroup(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + RequestSignature: GrpcUnaryServiceInterface = (message: MsgRequestSignature, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RequestSignature(message, metadata, options, callback); + }; + Activate: GrpcUnaryServiceInterface = (message: MsgActivate, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Activate(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + TransitionGroup: GrpcUnaryServiceInterface = (message: MsgTransitionGroup, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TransitionGroup(message, metadata, options, callback); + }; + ForceTransitionGroup: GrpcUnaryServiceInterface = (message: MsgForceTransitionGroup, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ForceTransitionGroup(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/bandtss/v1beta1/tx_pb.d.ts b/codegen/band/bandtss/v1beta1/tx_pb.d.ts new file mode 100644 index 0000000..c2b7ea9 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/tx_pb.d.ts @@ -0,0 +1,245 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/tx.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; +import * as band_bandtss_v1beta1_genesis_pb from "../../../band/bandtss/v1beta1/genesis_pb"; + +export class MsgRequestSignature extends jspb.Message { + hasContent(): boolean; + clearContent(): void; + getContent(): google_protobuf_any_pb.Any | undefined; + setContent(value?: google_protobuf_any_pb.Any): void; + + getMemo(): string; + setMemo(value: string): void; + + clearFeeLimitList(): void; + getFeeLimitList(): Array; + setFeeLimitList(value: Array): void; + addFeeLimit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRequestSignature.AsObject; + static toObject(includeInstance: boolean, msg: MsgRequestSignature): MsgRequestSignature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRequestSignature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRequestSignature; + static deserializeBinaryFromReader(message: MsgRequestSignature, reader: jspb.BinaryReader): MsgRequestSignature; +} + +export namespace MsgRequestSignature { + export type AsObject = { + content?: google_protobuf_any_pb.Any.AsObject, + memo: string, + feeLimitList: Array, + sender: string, + } +} + +export class MsgRequestSignatureResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRequestSignatureResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgRequestSignatureResponse): MsgRequestSignatureResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRequestSignatureResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRequestSignatureResponse; + static deserializeBinaryFromReader(message: MsgRequestSignatureResponse, reader: jspb.BinaryReader): MsgRequestSignatureResponse; +} + +export namespace MsgRequestSignatureResponse { + export type AsObject = { + } +} + +export class MsgActivate extends jspb.Message { + getSender(): string; + setSender(value: string): void; + + getGroupId(): number; + setGroupId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgActivate.AsObject; + static toObject(includeInstance: boolean, msg: MsgActivate): MsgActivate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgActivate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgActivate; + static deserializeBinaryFromReader(message: MsgActivate, reader: jspb.BinaryReader): MsgActivate; +} + +export namespace MsgActivate { + export type AsObject = { + sender: string, + groupId: number, + } +} + +export class MsgActivateResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgActivateResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgActivateResponse): MsgActivateResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgActivateResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgActivateResponse; + static deserializeBinaryFromReader(message: MsgActivateResponse, reader: jspb.BinaryReader): MsgActivateResponse; +} + +export namespace MsgActivateResponse { + export type AsObject = { + } +} + +export class MsgUpdateParams extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_bandtss_v1beta1_genesis_pb.Params | undefined; + setParams(value?: band_bandtss_v1beta1_genesis_pb.Params): void; + + getAuthority(): string; + setAuthority(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + params?: band_bandtss_v1beta1_genesis_pb.Params.AsObject, + authority: string, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + +export class MsgTransitionGroup extends jspb.Message { + clearMembersList(): void; + getMembersList(): Array; + setMembersList(value: Array): void; + addMembers(value: string, index?: number): string; + + getThreshold(): number; + setThreshold(value: number): void; + + hasExecTime(): boolean; + clearExecTime(): void; + getExecTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setExecTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getAuthority(): string; + setAuthority(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTransitionGroup.AsObject; + static toObject(includeInstance: boolean, msg: MsgTransitionGroup): MsgTransitionGroup.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTransitionGroup, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTransitionGroup; + static deserializeBinaryFromReader(message: MsgTransitionGroup, reader: jspb.BinaryReader): MsgTransitionGroup; +} + +export namespace MsgTransitionGroup { + export type AsObject = { + membersList: Array, + threshold: number, + execTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + authority: string, + } +} + +export class MsgTransitionGroupResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTransitionGroupResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgTransitionGroupResponse): MsgTransitionGroupResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTransitionGroupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTransitionGroupResponse; + static deserializeBinaryFromReader(message: MsgTransitionGroupResponse, reader: jspb.BinaryReader): MsgTransitionGroupResponse; +} + +export namespace MsgTransitionGroupResponse { + export type AsObject = { + } +} + +export class MsgForceTransitionGroup extends jspb.Message { + getIncomingGroupId(): number; + setIncomingGroupId(value: number): void; + + hasExecTime(): boolean; + clearExecTime(): void; + getExecTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setExecTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getAuthority(): string; + setAuthority(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgForceTransitionGroup.AsObject; + static toObject(includeInstance: boolean, msg: MsgForceTransitionGroup): MsgForceTransitionGroup.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgForceTransitionGroup, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgForceTransitionGroup; + static deserializeBinaryFromReader(message: MsgForceTransitionGroup, reader: jspb.BinaryReader): MsgForceTransitionGroup; +} + +export namespace MsgForceTransitionGroup { + export type AsObject = { + incomingGroupId: number, + execTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + authority: string, + } +} + +export class MsgForceTransitionGroupResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgForceTransitionGroupResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgForceTransitionGroupResponse): MsgForceTransitionGroupResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgForceTransitionGroupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgForceTransitionGroupResponse; + static deserializeBinaryFromReader(message: MsgForceTransitionGroupResponse, reader: jspb.BinaryReader): MsgForceTransitionGroupResponse; +} + +export namespace MsgForceTransitionGroupResponse { + export type AsObject = { + } +} + diff --git a/codegen/band/bandtss/v1beta1/tx_pb.js b/codegen/band/bandtss/v1beta1/tx_pb.js new file mode 100644 index 0000000..d0c5d42 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/tx_pb.js @@ -0,0 +1,1849 @@ +// source: band/bandtss/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var amino_amino_pb = require('../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var band_bandtss_v1beta1_genesis_pb = require('../../../band/bandtss/v1beta1/genesis_pb.js'); +goog.object.extend(proto, band_bandtss_v1beta1_genesis_pb); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgActivate', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgActivateResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgForceTransitionGroup', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgRequestSignature', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgRequestSignatureResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgTransitionGroup', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgTransitionGroupResponse', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.band.bandtss.v1beta1.MsgUpdateParamsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgRequestSignature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.bandtss.v1beta1.MsgRequestSignature.repeatedFields_, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgRequestSignature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgRequestSignature.displayName = 'proto.band.bandtss.v1beta1.MsgRequestSignature'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgRequestSignatureResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgRequestSignatureResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.displayName = 'proto.band.bandtss.v1beta1.MsgRequestSignatureResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgActivate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgActivate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgActivate.displayName = 'proto.band.bandtss.v1beta1.MsgActivate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgActivateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgActivateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgActivateResponse.displayName = 'proto.band.bandtss.v1beta1.MsgActivateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgUpdateParams.displayName = 'proto.band.bandtss.v1beta1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.displayName = 'proto.band.bandtss.v1beta1.MsgUpdateParamsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.bandtss.v1beta1.MsgTransitionGroup.repeatedFields_, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgTransitionGroup, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgTransitionGroup.displayName = 'proto.band.bandtss.v1beta1.MsgTransitionGroup'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgTransitionGroupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgTransitionGroupResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.displayName = 'proto.band.bandtss.v1beta1.MsgTransitionGroupResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgForceTransitionGroup, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgForceTransitionGroup.displayName = 'proto.band.bandtss.v1beta1.MsgForceTransitionGroup'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.displayName = 'proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgRequestSignature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgRequestSignature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.toObject = function(includeInstance, msg) { + var f, obj = { + content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + memo: jspb.Message.getFieldWithDefault(msg, 2, ""), + feeLimitList: jspb.Message.toObjectList(msg.getFeeLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + sender: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignature} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgRequestSignature; + return proto.band.bandtss.v1beta1.MsgRequestSignature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgRequestSignature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignature} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setContent(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFeeLimit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgRequestSignature.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgRequestSignature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContent(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFeeLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional google.protobuf.Any content = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.getContent = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignature} returns this +*/ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.setContent = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignature} returns this + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.clearContent = function() { + return this.setContent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.hasContent = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string memo = 2; + * @return {string} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignature} returns this + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee_limit = 3; + * @return {!Array} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.getFeeLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignature} returns this +*/ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.setFeeLimitList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.addFeeLimit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignature} returns this + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.clearFeeLimitList = function() { + return this.setFeeLimitList([]); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignature} returns this + */ +proto.band.bandtss.v1beta1.MsgRequestSignature.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgRequestSignatureResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignatureResponse} + */ +proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgRequestSignatureResponse; + return proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgRequestSignatureResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgRequestSignatureResponse} + */ +proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgRequestSignatureResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgRequestSignatureResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgActivate.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgActivate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgActivate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgActivate.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + groupId: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgActivate} + */ +proto.band.bandtss.v1beta1.MsgActivate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgActivate; + return proto.band.bandtss.v1beta1.MsgActivate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgActivate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgActivate} + */ +proto.band.bandtss.v1beta1.MsgActivate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgActivate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgActivate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgActivate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgActivate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.band.bandtss.v1beta1.MsgActivate.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.MsgActivate} returns this + */ +proto.band.bandtss.v1beta1.MsgActivate.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 group_id = 2; + * @return {number} + */ +proto.band.bandtss.v1beta1.MsgActivate.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.MsgActivate} returns this + */ +proto.band.bandtss.v1beta1.MsgActivate.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgActivateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgActivateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgActivateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgActivateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgActivateResponse} + */ +proto.band.bandtss.v1beta1.MsgActivateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgActivateResponse; + return proto.band.bandtss.v1beta1.MsgActivateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgActivateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgActivateResponse} + */ +proto.band.bandtss.v1beta1.MsgActivateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgActivateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgActivateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgActivateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgActivateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && band_bandtss_v1beta1_genesis_pb.Params.toObject(includeInstance, f), + authority: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgUpdateParams} + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgUpdateParams; + return proto.band.bandtss.v1beta1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgUpdateParams} + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_bandtss_v1beta1_genesis_pb.Params; + reader.readMessage(value,band_bandtss_v1beta1_genesis_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_bandtss_v1beta1_genesis_pb.Params.serializeBinaryToWriter + ); + } + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.bandtss.v1beta1.Params} + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.band.bandtss.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_bandtss_v1beta1_genesis_pb.Params, 1)); +}; + + +/** + * @param {?proto.band.bandtss.v1beta1.Params|undefined} value + * @return {!proto.band.bandtss.v1beta1.MsgUpdateParams} returns this +*/ +proto.band.bandtss.v1beta1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.MsgUpdateParams} returns this + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string authority = 2; + * @return {string} + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.MsgUpdateParams} returns this + */ +proto.band.bandtss.v1beta1.MsgUpdateParams.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgUpdateParamsResponse} + */ +proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgUpdateParamsResponse; + return proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgUpdateParamsResponse} + */ +proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgTransitionGroup.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgTransitionGroup} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.toObject = function(includeInstance, msg) { + var f, obj = { + membersList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + threshold: jspb.Message.getFieldWithDefault(msg, 2, 0), + execTime: (f = msg.getExecTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + authority: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroup} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgTransitionGroup; + return proto.band.bandtss.v1beta1.MsgTransitionGroup.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgTransitionGroup} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroup} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addMembers(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setThreshold(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExecTime(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgTransitionGroup.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgTransitionGroup} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getThreshold(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getExecTime(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * repeated string members = 1; + * @return {!Array} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.getMembersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroup} returns this + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.setMembersList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroup} returns this + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.addMembers = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroup} returns this + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.clearMembersList = function() { + return this.setMembersList([]); +}; + + +/** + * optional uint64 threshold = 2; + * @return {number} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.getThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroup} returns this + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.setThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp exec_time = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.getExecTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroup} returns this +*/ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.setExecTime = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroup} returns this + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.clearExecTime = function() { + return this.setExecTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.hasExecTime = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string authority = 4; + * @return {string} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroup} returns this + */ +proto.band.bandtss.v1beta1.MsgTransitionGroup.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgTransitionGroupResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroupResponse} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgTransitionGroupResponse; + return proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgTransitionGroupResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgTransitionGroupResponse} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgTransitionGroupResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgTransitionGroupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgForceTransitionGroup.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgForceTransitionGroup} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.toObject = function(includeInstance, msg) { + var f, obj = { + incomingGroupId: jspb.Message.getFieldWithDefault(msg, 1, 0), + execTime: (f = msg.getExecTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + authority: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgForceTransitionGroup} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgForceTransitionGroup; + return proto.band.bandtss.v1beta1.MsgForceTransitionGroup.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgForceTransitionGroup} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgForceTransitionGroup} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIncomingGroupId(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExecTime(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgForceTransitionGroup.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgForceTransitionGroup} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncomingGroupId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getExecTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint64 incoming_group_id = 1; + * @return {number} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.getIncomingGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.bandtss.v1beta1.MsgForceTransitionGroup} returns this + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.setIncomingGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp exec_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.getExecTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.band.bandtss.v1beta1.MsgForceTransitionGroup} returns this +*/ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.setExecTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.bandtss.v1beta1.MsgForceTransitionGroup} returns this + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.clearExecTime = function() { + return this.setExecTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.hasExecTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string authority = 3; + * @return {string} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.bandtss.v1beta1.MsgForceTransitionGroup} returns this + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroup.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse; + return proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.bandtss.v1beta1.MsgForceTransitionGroupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.band.bandtss.v1beta1); diff --git a/codegen/band/bandtss/v1beta1/tx_pb_service.d.ts b/codegen/band/bandtss/v1beta1/tx_pb_service.d.ts new file mode 100644 index 0000000..ea58435 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/tx_pb_service.d.ts @@ -0,0 +1,139 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/tx.proto + +import * as band_bandtss_v1beta1_tx_pb from "../../../band/bandtss/v1beta1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgRequestSignature = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_tx_pb.MsgRequestSignature; + readonly responseType: typeof band_bandtss_v1beta1_tx_pb.MsgRequestSignatureResponse; +}; + +type MsgActivate = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_tx_pb.MsgActivate; + readonly responseType: typeof band_bandtss_v1beta1_tx_pb.MsgActivateResponse; +}; + +type MsgUpdateParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_tx_pb.MsgUpdateParams; + readonly responseType: typeof band_bandtss_v1beta1_tx_pb.MsgUpdateParamsResponse; +}; + +type MsgTransitionGroup = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_tx_pb.MsgTransitionGroup; + readonly responseType: typeof band_bandtss_v1beta1_tx_pb.MsgTransitionGroupResponse; +}; + +type MsgForceTransitionGroup = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_bandtss_v1beta1_tx_pb.MsgForceTransitionGroup; + readonly responseType: typeof band_bandtss_v1beta1_tx_pb.MsgForceTransitionGroupResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly RequestSignature: MsgRequestSignature; + static readonly Activate: MsgActivate; + static readonly UpdateParams: MsgUpdateParams; + static readonly TransitionGroup: MsgTransitionGroup; + static readonly ForceTransitionGroup: MsgForceTransitionGroup; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + requestSignature( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgRequestSignature, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgRequestSignatureResponse|null) => void + ): UnaryResponse; + requestSignature( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgRequestSignature, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgRequestSignatureResponse|null) => void + ): UnaryResponse; + activate( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgActivate, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgActivateResponse|null) => void + ): UnaryResponse; + activate( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgActivate, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgActivateResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + transitionGroup( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgTransitionGroup, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgTransitionGroupResponse|null) => void + ): UnaryResponse; + transitionGroup( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgTransitionGroup, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgTransitionGroupResponse|null) => void + ): UnaryResponse; + forceTransitionGroup( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgForceTransitionGroup, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgForceTransitionGroupResponse|null) => void + ): UnaryResponse; + forceTransitionGroup( + requestMessage: band_bandtss_v1beta1_tx_pb.MsgForceTransitionGroup, + callback: (error: ServiceError|null, responseMessage: band_bandtss_v1beta1_tx_pb.MsgForceTransitionGroupResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/bandtss/v1beta1/tx_pb_service.js b/codegen/band/bandtss/v1beta1/tx_pb_service.js new file mode 100644 index 0000000..f5748a8 --- /dev/null +++ b/codegen/band/bandtss/v1beta1/tx_pb_service.js @@ -0,0 +1,221 @@ +// package: band.bandtss.v1beta1 +// file: band/bandtss/v1beta1/tx.proto + +var band_bandtss_v1beta1_tx_pb = require("../../../band/bandtss/v1beta1/tx_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Msg = (function () { + function Msg() {} + Msg.serviceName = "band.bandtss.v1beta1.Msg"; + return Msg; +}()); + +Msg.RequestSignature = { + methodName: "RequestSignature", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_tx_pb.MsgRequestSignature, + responseType: band_bandtss_v1beta1_tx_pb.MsgRequestSignatureResponse +}; + +Msg.Activate = { + methodName: "Activate", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_tx_pb.MsgActivate, + responseType: band_bandtss_v1beta1_tx_pb.MsgActivateResponse +}; + +Msg.UpdateParams = { + methodName: "UpdateParams", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_tx_pb.MsgUpdateParams, + responseType: band_bandtss_v1beta1_tx_pb.MsgUpdateParamsResponse +}; + +Msg.TransitionGroup = { + methodName: "TransitionGroup", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_tx_pb.MsgTransitionGroup, + responseType: band_bandtss_v1beta1_tx_pb.MsgTransitionGroupResponse +}; + +Msg.ForceTransitionGroup = { + methodName: "ForceTransitionGroup", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_bandtss_v1beta1_tx_pb.MsgForceTransitionGroup, + responseType: band_bandtss_v1beta1_tx_pb.MsgForceTransitionGroupResponse +}; + +exports.Msg = Msg; + +function MsgClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MsgClient.prototype.requestSignature = function requestSignature(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.RequestSignature, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.activate = function activate(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.Activate, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.updateParams = function updateParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.transitionGroup = function transitionGroup(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.TransitionGroup, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.forceTransitionGroup = function forceTransitionGroup(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ForceTransitionGroup, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MsgClient = MsgClient; + diff --git a/codegen/band/base/node/v1/query.ts b/codegen/band/base/node/v1/query.ts new file mode 100644 index 0000000..4cb51d8 --- /dev/null +++ b/codegen/band/base/node/v1/query.ts @@ -0,0 +1,398 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/base/node/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../google/api/annotations"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.base.node.v1 { + export class ChainIDRequest 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: {}): ChainIDRequest { + const message = new ChainIDRequest({}); + 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): ChainIDRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ChainIDRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ChainIDRequest { + return ChainIDRequest.deserialize(bytes); + } + } + export class ChainIDResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + chain_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 ("chain_id" in data && data.chain_id != undefined) { + this.chain_id = data.chain_id; + } + } + } + get chain_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set chain_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + chain_id?: string; + }): ChainIDResponse { + const message = new ChainIDResponse({}); + if (data.chain_id != null) { + message.chain_id = data.chain_id; + } + return message; + } + toObject() { + const data: { + chain_id?: string; + } = {}; + if (this.chain_id != null) { + data.chain_id = this.chain_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.chain_id.length) + writer.writeString(1, this.chain_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ChainIDResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ChainIDResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.chain_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ChainIDResponse { + return ChainIDResponse.deserialize(bytes); + } + } + export class EVMValidatorsRequest 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: {}): EVMValidatorsRequest { + const message = new EVMValidatorsRequest({}); + 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): EVMValidatorsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EVMValidatorsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EVMValidatorsRequest { + return EVMValidatorsRequest.deserialize(bytes); + } + } + export class EVMValidatorsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_height?: number; + validators?: ValidatorMinimal[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_height" in data && data.block_height != undefined) { + this.block_height = data.block_height; + } + if ("validators" in data && data.validators != undefined) { + this.validators = data.validators; + } + } + } + get block_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set block_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get validators() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorMinimal, 2) as ValidatorMinimal[]; + } + set validators(value: ValidatorMinimal[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + block_height?: number; + validators?: ReturnType[]; + }): EVMValidatorsResponse { + const message = new EVMValidatorsResponse({}); + if (data.block_height != null) { + message.block_height = data.block_height; + } + if (data.validators != null) { + message.validators = data.validators.map(item => ValidatorMinimal.fromObject(item)); + } + return message; + } + toObject() { + const data: { + block_height?: number; + validators?: ReturnType[]; + } = {}; + if (this.block_height != null) { + data.block_height = this.block_height; + } + if (this.validators != null) { + data.validators = this.validators.map((item: ValidatorMinimal) => item.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.block_height != 0) + writer.writeInt64(1, this.block_height); + if (this.validators.length) + writer.writeRepeatedMessage(2, this.validators, (item: ValidatorMinimal) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EVMValidatorsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EVMValidatorsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ValidatorMinimal.deserialize(reader), ValidatorMinimal)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EVMValidatorsResponse { + return EVMValidatorsResponse.deserialize(bytes); + } + } + export class ValidatorMinimal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + voting_power?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("voting_power" in data && data.voting_power != undefined) { + this.voting_power = data.voting_power; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get voting_power() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set voting_power(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + address?: string; + voting_power?: number; + }): ValidatorMinimal { + const message = new ValidatorMinimal({}); + if (data.address != null) { + message.address = data.address; + } + if (data.voting_power != null) { + message.voting_power = data.voting_power; + } + return message; + } + toObject() { + const data: { + address?: string; + voting_power?: number; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.voting_power != null) { + data.voting_power = this.voting_power; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.voting_power != 0) + writer.writeInt64(2, this.voting_power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorMinimal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorMinimal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.voting_power = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorMinimal { + return ValidatorMinimal.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedServiceService { + static definition = { + ChainID: { + path: "/band.base.node.v1.Service/ChainID", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChainIDRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChainIDRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChainIDResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChainIDResponse.deserialize(new Uint8Array(bytes)) + }, + EVMValidators: { + path: "/band.base.node.v1.Service/EVMValidators", + requestStream: false, + responseStream: false, + requestSerialize: (message: EVMValidatorsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => EVMValidatorsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: EVMValidatorsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => EVMValidatorsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract ChainID(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract EVMValidators(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedServiceService.definition, "Service", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + ChainID: GrpcUnaryServiceInterface = (message: ChainIDRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChainID(message, metadata, options, callback); + }; + EVMValidators: GrpcUnaryServiceInterface = (message: EVMValidatorsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.EVMValidators(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/base/node/v1/query_pb.d.ts b/codegen/band/base/node/v1/query_pb.d.ts new file mode 100644 index 0000000..66370ec --- /dev/null +++ b/codegen/band/base/node/v1/query_pb.d.ts @@ -0,0 +1,109 @@ +// package: band.base.node.v1 +// file: band/base/node/v1/query.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../../google/api/annotations_pb"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; + +export class ChainIDRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChainIDRequest.AsObject; + static toObject(includeInstance: boolean, msg: ChainIDRequest): ChainIDRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChainIDRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChainIDRequest; + static deserializeBinaryFromReader(message: ChainIDRequest, reader: jspb.BinaryReader): ChainIDRequest; +} + +export namespace ChainIDRequest { + export type AsObject = { + } +} + +export class ChainIDResponse extends jspb.Message { + getChainId(): string; + setChainId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChainIDResponse.AsObject; + static toObject(includeInstance: boolean, msg: ChainIDResponse): ChainIDResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChainIDResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChainIDResponse; + static deserializeBinaryFromReader(message: ChainIDResponse, reader: jspb.BinaryReader): ChainIDResponse; +} + +export namespace ChainIDResponse { + export type AsObject = { + chainId: string, + } +} + +export class EVMValidatorsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EVMValidatorsRequest.AsObject; + static toObject(includeInstance: boolean, msg: EVMValidatorsRequest): EVMValidatorsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EVMValidatorsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EVMValidatorsRequest; + static deserializeBinaryFromReader(message: EVMValidatorsRequest, reader: jspb.BinaryReader): EVMValidatorsRequest; +} + +export namespace EVMValidatorsRequest { + export type AsObject = { + } +} + +export class EVMValidatorsResponse extends jspb.Message { + getBlockHeight(): number; + setBlockHeight(value: number): void; + + clearValidatorsList(): void; + getValidatorsList(): Array; + setValidatorsList(value: Array): void; + addValidators(value?: ValidatorMinimal, index?: number): ValidatorMinimal; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EVMValidatorsResponse.AsObject; + static toObject(includeInstance: boolean, msg: EVMValidatorsResponse): EVMValidatorsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EVMValidatorsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EVMValidatorsResponse; + static deserializeBinaryFromReader(message: EVMValidatorsResponse, reader: jspb.BinaryReader): EVMValidatorsResponse; +} + +export namespace EVMValidatorsResponse { + export type AsObject = { + blockHeight: number, + validatorsList: Array, + } +} + +export class ValidatorMinimal extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + getVotingPower(): number; + setVotingPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorMinimal.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorMinimal): ValidatorMinimal.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorMinimal, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorMinimal; + static deserializeBinaryFromReader(message: ValidatorMinimal, reader: jspb.BinaryReader): ValidatorMinimal; +} + +export namespace ValidatorMinimal { + export type AsObject = { + address: string, + votingPower: number, + } +} + diff --git a/codegen/band/base/node/v1/query_pb.js b/codegen/band/base/node/v1/query_pb.js new file mode 100644 index 0000000..0e28dfd --- /dev/null +++ b/codegen/band/base/node/v1/query_pb.js @@ -0,0 +1,814 @@ +// source: band/base/node/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.band.base.node.v1.ChainIDRequest', null, global); +goog.exportSymbol('proto.band.base.node.v1.ChainIDResponse', null, global); +goog.exportSymbol('proto.band.base.node.v1.EVMValidatorsRequest', null, global); +goog.exportSymbol('proto.band.base.node.v1.EVMValidatorsResponse', null, global); +goog.exportSymbol('proto.band.base.node.v1.ValidatorMinimal', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.node.v1.ChainIDRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.node.v1.ChainIDRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.node.v1.ChainIDRequest.displayName = 'proto.band.base.node.v1.ChainIDRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.node.v1.ChainIDResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.node.v1.ChainIDResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.node.v1.ChainIDResponse.displayName = 'proto.band.base.node.v1.ChainIDResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.node.v1.EVMValidatorsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.node.v1.EVMValidatorsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.node.v1.EVMValidatorsRequest.displayName = 'proto.band.base.node.v1.EVMValidatorsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.node.v1.EVMValidatorsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.base.node.v1.EVMValidatorsResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.base.node.v1.EVMValidatorsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.node.v1.EVMValidatorsResponse.displayName = 'proto.band.base.node.v1.EVMValidatorsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.node.v1.ValidatorMinimal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.node.v1.ValidatorMinimal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.node.v1.ValidatorMinimal.displayName = 'proto.band.base.node.v1.ValidatorMinimal'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.node.v1.ChainIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.node.v1.ChainIDRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.node.v1.ChainIDRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.ChainIDRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.node.v1.ChainIDRequest} + */ +proto.band.base.node.v1.ChainIDRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.node.v1.ChainIDRequest; + return proto.band.base.node.v1.ChainIDRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.node.v1.ChainIDRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.node.v1.ChainIDRequest} + */ +proto.band.base.node.v1.ChainIDRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.node.v1.ChainIDRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.node.v1.ChainIDRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.node.v1.ChainIDRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.ChainIDRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.node.v1.ChainIDResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.node.v1.ChainIDResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.node.v1.ChainIDResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.ChainIDResponse.toObject = function(includeInstance, msg) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.node.v1.ChainIDResponse} + */ +proto.band.base.node.v1.ChainIDResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.node.v1.ChainIDResponse; + return proto.band.base.node.v1.ChainIDResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.node.v1.ChainIDResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.node.v1.ChainIDResponse} + */ +proto.band.base.node.v1.ChainIDResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.node.v1.ChainIDResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.node.v1.ChainIDResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.node.v1.ChainIDResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.ChainIDResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string chain_id = 1; + * @return {string} + */ +proto.band.base.node.v1.ChainIDResponse.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.base.node.v1.ChainIDResponse} returns this + */ +proto.band.base.node.v1.ChainIDResponse.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.node.v1.EVMValidatorsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.node.v1.EVMValidatorsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.node.v1.EVMValidatorsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.EVMValidatorsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.node.v1.EVMValidatorsRequest} + */ +proto.band.base.node.v1.EVMValidatorsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.node.v1.EVMValidatorsRequest; + return proto.band.base.node.v1.EVMValidatorsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.node.v1.EVMValidatorsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.node.v1.EVMValidatorsRequest} + */ +proto.band.base.node.v1.EVMValidatorsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.node.v1.EVMValidatorsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.node.v1.EVMValidatorsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.node.v1.EVMValidatorsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.EVMValidatorsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.base.node.v1.EVMValidatorsResponse.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.node.v1.EVMValidatorsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.node.v1.EVMValidatorsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.node.v1.EVMValidatorsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.EVMValidatorsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.band.base.node.v1.ValidatorMinimal.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.node.v1.EVMValidatorsResponse} + */ +proto.band.base.node.v1.EVMValidatorsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.node.v1.EVMValidatorsResponse; + return proto.band.base.node.v1.EVMValidatorsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.node.v1.EVMValidatorsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.node.v1.EVMValidatorsResponse} + */ +proto.band.base.node.v1.EVMValidatorsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockHeight(value); + break; + case 2: + var value = new proto.band.base.node.v1.ValidatorMinimal; + reader.readMessage(value,proto.band.base.node.v1.ValidatorMinimal.deserializeBinaryFromReader); + msg.addValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.node.v1.EVMValidatorsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.node.v1.EVMValidatorsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.node.v1.EVMValidatorsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.EVMValidatorsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.band.base.node.v1.ValidatorMinimal.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 block_height = 1; + * @return {number} + */ +proto.band.base.node.v1.EVMValidatorsResponse.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.node.v1.EVMValidatorsResponse} returns this + */ +proto.band.base.node.v1.EVMValidatorsResponse.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated ValidatorMinimal validators = 2; + * @return {!Array} + */ +proto.band.base.node.v1.EVMValidatorsResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.base.node.v1.ValidatorMinimal, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.base.node.v1.EVMValidatorsResponse} returns this +*/ +proto.band.base.node.v1.EVMValidatorsResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.base.node.v1.ValidatorMinimal=} opt_value + * @param {number=} opt_index + * @return {!proto.band.base.node.v1.ValidatorMinimal} + */ +proto.band.base.node.v1.EVMValidatorsResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.base.node.v1.ValidatorMinimal, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.base.node.v1.EVMValidatorsResponse} returns this + */ +proto.band.base.node.v1.EVMValidatorsResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.node.v1.ValidatorMinimal.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.node.v1.ValidatorMinimal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.node.v1.ValidatorMinimal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.ValidatorMinimal.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + votingPower: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.node.v1.ValidatorMinimal} + */ +proto.band.base.node.v1.ValidatorMinimal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.node.v1.ValidatorMinimal; + return proto.band.base.node.v1.ValidatorMinimal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.node.v1.ValidatorMinimal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.node.v1.ValidatorMinimal} + */ +proto.band.base.node.v1.ValidatorMinimal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotingPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.node.v1.ValidatorMinimal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.node.v1.ValidatorMinimal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.node.v1.ValidatorMinimal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.node.v1.ValidatorMinimal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVotingPower(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.band.base.node.v1.ValidatorMinimal.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.base.node.v1.ValidatorMinimal} returns this + */ +proto.band.base.node.v1.ValidatorMinimal.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 voting_power = 2; + * @return {number} + */ +proto.band.base.node.v1.ValidatorMinimal.prototype.getVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.node.v1.ValidatorMinimal} returns this + */ +proto.band.base.node.v1.ValidatorMinimal.prototype.setVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.band.base.node.v1); diff --git a/codegen/band/base/node/v1/query_pb_service.d.ts b/codegen/band/base/node/v1/query_pb_service.d.ts new file mode 100644 index 0000000..0b557f4 --- /dev/null +++ b/codegen/band/base/node/v1/query_pb_service.d.ts @@ -0,0 +1,82 @@ +// package: band.base.node.v1 +// file: band/base/node/v1/query.proto + +import * as band_base_node_v1_query_pb from "../../../../band/base/node/v1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type ServiceChainID = { + readonly methodName: string; + readonly service: typeof Service; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_base_node_v1_query_pb.ChainIDRequest; + readonly responseType: typeof band_base_node_v1_query_pb.ChainIDResponse; +}; + +type ServiceEVMValidators = { + readonly methodName: string; + readonly service: typeof Service; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_base_node_v1_query_pb.EVMValidatorsRequest; + readonly responseType: typeof band_base_node_v1_query_pb.EVMValidatorsResponse; +}; + +export class Service { + static readonly serviceName: string; + static readonly ChainID: ServiceChainID; + static readonly EVMValidators: ServiceEVMValidators; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class ServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + chainID( + requestMessage: band_base_node_v1_query_pb.ChainIDRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_base_node_v1_query_pb.ChainIDResponse|null) => void + ): UnaryResponse; + chainID( + requestMessage: band_base_node_v1_query_pb.ChainIDRequest, + callback: (error: ServiceError|null, responseMessage: band_base_node_v1_query_pb.ChainIDResponse|null) => void + ): UnaryResponse; + eVMValidators( + requestMessage: band_base_node_v1_query_pb.EVMValidatorsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_base_node_v1_query_pb.EVMValidatorsResponse|null) => void + ): UnaryResponse; + eVMValidators( + requestMessage: band_base_node_v1_query_pb.EVMValidatorsRequest, + callback: (error: ServiceError|null, responseMessage: band_base_node_v1_query_pb.EVMValidatorsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/base/node/v1/query_pb_service.js b/codegen/band/base/node/v1/query_pb_service.js new file mode 100644 index 0000000..60911c4 --- /dev/null +++ b/codegen/band/base/node/v1/query_pb_service.js @@ -0,0 +1,101 @@ +// package: band.base.node.v1 +// file: band/base/node/v1/query.proto + +var band_base_node_v1_query_pb = require("../../../../band/base/node/v1/query_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Service = (function () { + function Service() {} + Service.serviceName = "band.base.node.v1.Service"; + return Service; +}()); + +Service.ChainID = { + methodName: "ChainID", + service: Service, + requestStream: false, + responseStream: false, + requestType: band_base_node_v1_query_pb.ChainIDRequest, + responseType: band_base_node_v1_query_pb.ChainIDResponse +}; + +Service.EVMValidators = { + methodName: "EVMValidators", + service: Service, + requestStream: false, + responseStream: false, + requestType: band_base_node_v1_query_pb.EVMValidatorsRequest, + responseType: band_base_node_v1_query_pb.EVMValidatorsResponse +}; + +exports.Service = Service; + +function ServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +ServiceClient.prototype.chainID = function chainID(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Service.ChainID, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ServiceClient.prototype.eVMValidators = function eVMValidators(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Service.EVMValidators, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.ServiceClient = ServiceClient; + diff --git a/codegen/band/base/oracle/v1/proof.ts b/codegen/band/base/oracle/v1/proof.ts new file mode 100644 index 0000000..befc74c --- /dev/null +++ b/codegen/band/base/oracle/v1/proof.ts @@ -0,0 +1,2363 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/base/oracle/v1/proof.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../google/api/annotations"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../oracle/v1/oracle"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.base.oracle.v1 { + export class ProofRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request_id?: number; + 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 ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + request_id?: number; + height?: number; + }): ProofRequest { + const message = new ProofRequest({}); + if (data.request_id != null) { + message.request_id = data.request_id; + } + if (data.height != null) { + message.height = data.height; + } + return message; + } + toObject() { + const data: { + request_id?: number; + height?: number; + } = {}; + if (this.request_id != null) { + data.request_id = this.request_id; + } + if (this.height != null) { + data.height = this.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.request_id != 0) + writer.writeUint64(1, this.request_id); + if (this.height != 0) + writer.writeInt64(2, this.height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProofRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProofRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.request_id = reader.readUint64(); + break; + case 2: + message.height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProofRequest { + return ProofRequest.deserialize(bytes); + } + } + export class ProofResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + result?: SingleProofResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get result() { + return pb_1.Message.getWrapperField(this, SingleProofResult, 2) as SingleProofResult; + } + set result(value: SingleProofResult) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_result() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + height?: number; + result?: ReturnType; + }): ProofResponse { + const message = new ProofResponse({}); + if (data.height != null) { + message.height = data.height; + } + if (data.result != null) { + message.result = SingleProofResult.fromObject(data.result); + } + return message; + } + toObject() { + const data: { + height?: number; + result?: ReturnType; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.result != null) { + data.result = this.result.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.height != 0) + writer.writeInt64(1, this.height); + if (this.has_result) + writer.writeMessage(2, this.result, () => this.result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProofResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProofResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.result, () => message.result = SingleProofResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProofResponse { + return ProofResponse.deserialize(bytes); + } + } + export class MultiProofRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request_ids?: number[]; + }) { + 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 ("request_ids" in data && data.request_ids != undefined) { + this.request_ids = data.request_ids; + } + } + } + get request_ids() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set request_ids(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + request_ids?: number[]; + }): MultiProofRequest { + const message = new MultiProofRequest({}); + if (data.request_ids != null) { + message.request_ids = data.request_ids; + } + return message; + } + toObject() { + const data: { + request_ids?: number[]; + } = {}; + if (this.request_ids != null) { + data.request_ids = this.request_ids; + } + 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.request_ids.length) + writer.writePackedUint64(1, this.request_ids); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MultiProofRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MultiProofRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.request_ids = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MultiProofRequest { + return MultiProofRequest.deserialize(bytes); + } + } + export class MultiProofResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + result?: MultiProofResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get result() { + return pb_1.Message.getWrapperField(this, MultiProofResult, 2) as MultiProofResult; + } + set result(value: MultiProofResult) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_result() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + height?: number; + result?: ReturnType; + }): MultiProofResponse { + const message = new MultiProofResponse({}); + if (data.height != null) { + message.height = data.height; + } + if (data.result != null) { + message.result = MultiProofResult.fromObject(data.result); + } + return message; + } + toObject() { + const data: { + height?: number; + result?: ReturnType; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.result != null) { + data.result = this.result.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.height != 0) + writer.writeInt64(1, this.height); + if (this.has_result) + writer.writeMessage(2, this.result, () => this.result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MultiProofResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MultiProofResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.result, () => message.result = MultiProofResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MultiProofResponse { + return MultiProofResponse.deserialize(bytes); + } + } + export class RequestCountProofRequest 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: {}): RequestCountProofRequest { + const message = new RequestCountProofRequest({}); + 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): RequestCountProofRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestCountProofRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestCountProofRequest { + return RequestCountProofRequest.deserialize(bytes); + } + } + export class RequestCountProofResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + result?: CountProofResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get result() { + return pb_1.Message.getWrapperField(this, CountProofResult, 2) as CountProofResult; + } + set result(value: CountProofResult) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_result() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + height?: number; + result?: ReturnType; + }): RequestCountProofResponse { + const message = new RequestCountProofResponse({}); + if (data.height != null) { + message.height = data.height; + } + if (data.result != null) { + message.result = CountProofResult.fromObject(data.result); + } + return message; + } + toObject() { + const data: { + height?: number; + result?: ReturnType; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.result != null) { + data.result = this.result.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.height != 0) + writer.writeInt64(1, this.height); + if (this.has_result) + writer.writeMessage(2, this.result, () => this.result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestCountProofResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestCountProofResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.result, () => message.result = CountProofResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestCountProofResponse { + return RequestCountProofResponse.deserialize(bytes); + } + } + export class SingleProofResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proof?: SingleProof; + evm_proof_bytes?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proof" in data && data.proof != undefined) { + this.proof = data.proof; + } + if ("evm_proof_bytes" in data && data.evm_proof_bytes != undefined) { + this.evm_proof_bytes = data.evm_proof_bytes; + } + } + } + get proof() { + return pb_1.Message.getWrapperField(this, SingleProof, 1) as SingleProof; + } + set proof(value: SingleProof) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_proof() { + return pb_1.Message.getField(this, 1) != null; + } + get evm_proof_bytes() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set evm_proof_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proof?: ReturnType; + evm_proof_bytes?: Uint8Array; + }): SingleProofResult { + const message = new SingleProofResult({}); + if (data.proof != null) { + message.proof = SingleProof.fromObject(data.proof); + } + if (data.evm_proof_bytes != null) { + message.evm_proof_bytes = data.evm_proof_bytes; + } + return message; + } + toObject() { + const data: { + proof?: ReturnType; + evm_proof_bytes?: Uint8Array; + } = {}; + if (this.proof != null) { + data.proof = this.proof.toObject(); + } + if (this.evm_proof_bytes != null) { + data.evm_proof_bytes = this.evm_proof_bytes; + } + 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_proof) + writer.writeMessage(1, this.proof, () => this.proof.serialize(writer)); + if (this.evm_proof_bytes.length) + writer.writeBytes(2, this.evm_proof_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SingleProofResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SingleProofResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proof, () => message.proof = SingleProof.deserialize(reader)); + break; + case 2: + message.evm_proof_bytes = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SingleProofResult { + return SingleProofResult.deserialize(bytes); + } + } + export class MultiProofResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proof?: MultiProof; + evm_proof_bytes?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proof" in data && data.proof != undefined) { + this.proof = data.proof; + } + if ("evm_proof_bytes" in data && data.evm_proof_bytes != undefined) { + this.evm_proof_bytes = data.evm_proof_bytes; + } + } + } + get proof() { + return pb_1.Message.getWrapperField(this, MultiProof, 1) as MultiProof; + } + set proof(value: MultiProof) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_proof() { + return pb_1.Message.getField(this, 1) != null; + } + get evm_proof_bytes() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set evm_proof_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proof?: ReturnType; + evm_proof_bytes?: Uint8Array; + }): MultiProofResult { + const message = new MultiProofResult({}); + if (data.proof != null) { + message.proof = MultiProof.fromObject(data.proof); + } + if (data.evm_proof_bytes != null) { + message.evm_proof_bytes = data.evm_proof_bytes; + } + return message; + } + toObject() { + const data: { + proof?: ReturnType; + evm_proof_bytes?: Uint8Array; + } = {}; + if (this.proof != null) { + data.proof = this.proof.toObject(); + } + if (this.evm_proof_bytes != null) { + data.evm_proof_bytes = this.evm_proof_bytes; + } + 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_proof) + writer.writeMessage(1, this.proof, () => this.proof.serialize(writer)); + if (this.evm_proof_bytes.length) + writer.writeBytes(2, this.evm_proof_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MultiProofResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MultiProofResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proof, () => message.proof = MultiProof.deserialize(reader)); + break; + case 2: + message.evm_proof_bytes = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MultiProofResult { + return MultiProofResult.deserialize(bytes); + } + } + export class CountProofResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proof?: CountProof; + evm_proof_bytes?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proof" in data && data.proof != undefined) { + this.proof = data.proof; + } + if ("evm_proof_bytes" in data && data.evm_proof_bytes != undefined) { + this.evm_proof_bytes = data.evm_proof_bytes; + } + } + } + get proof() { + return pb_1.Message.getWrapperField(this, CountProof, 1) as CountProof; + } + set proof(value: CountProof) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_proof() { + return pb_1.Message.getField(this, 1) != null; + } + get evm_proof_bytes() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set evm_proof_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proof?: ReturnType; + evm_proof_bytes?: Uint8Array; + }): CountProofResult { + const message = new CountProofResult({}); + if (data.proof != null) { + message.proof = CountProof.fromObject(data.proof); + } + if (data.evm_proof_bytes != null) { + message.evm_proof_bytes = data.evm_proof_bytes; + } + return message; + } + toObject() { + const data: { + proof?: ReturnType; + evm_proof_bytes?: Uint8Array; + } = {}; + if (this.proof != null) { + data.proof = this.proof.toObject(); + } + if (this.evm_proof_bytes != null) { + data.evm_proof_bytes = this.evm_proof_bytes; + } + 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_proof) + writer.writeMessage(1, this.proof, () => this.proof.serialize(writer)); + if (this.evm_proof_bytes.length) + writer.writeBytes(2, this.evm_proof_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CountProofResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CountProofResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proof, () => message.proof = CountProof.deserialize(reader)); + break; + case 2: + message.evm_proof_bytes = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CountProofResult { + return CountProofResult.deserialize(bytes); + } + } + export class SingleProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_height?: number; + oracle_data_proof?: OracleDataProof; + block_relay_proof?: BlockRelayProof; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_height" in data && data.block_height != undefined) { + this.block_height = data.block_height; + } + if ("oracle_data_proof" in data && data.oracle_data_proof != undefined) { + this.oracle_data_proof = data.oracle_data_proof; + } + if ("block_relay_proof" in data && data.block_relay_proof != undefined) { + this.block_relay_proof = data.block_relay_proof; + } + } + } + get block_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set block_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get oracle_data_proof() { + return pb_1.Message.getWrapperField(this, OracleDataProof, 2) as OracleDataProof; + } + set oracle_data_proof(value: OracleDataProof) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_oracle_data_proof() { + return pb_1.Message.getField(this, 2) != null; + } + get block_relay_proof() { + return pb_1.Message.getWrapperField(this, BlockRelayProof, 3) as BlockRelayProof; + } + set block_relay_proof(value: BlockRelayProof) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_block_relay_proof() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + block_height?: number; + oracle_data_proof?: ReturnType; + block_relay_proof?: ReturnType; + }): SingleProof { + const message = new SingleProof({}); + if (data.block_height != null) { + message.block_height = data.block_height; + } + if (data.oracle_data_proof != null) { + message.oracle_data_proof = OracleDataProof.fromObject(data.oracle_data_proof); + } + if (data.block_relay_proof != null) { + message.block_relay_proof = BlockRelayProof.fromObject(data.block_relay_proof); + } + return message; + } + toObject() { + const data: { + block_height?: number; + oracle_data_proof?: ReturnType; + block_relay_proof?: ReturnType; + } = {}; + if (this.block_height != null) { + data.block_height = this.block_height; + } + if (this.oracle_data_proof != null) { + data.oracle_data_proof = this.oracle_data_proof.toObject(); + } + if (this.block_relay_proof != null) { + data.block_relay_proof = this.block_relay_proof.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.block_height != 0) + writer.writeUint64(1, this.block_height); + if (this.has_oracle_data_proof) + writer.writeMessage(2, this.oracle_data_proof, () => this.oracle_data_proof.serialize(writer)); + if (this.has_block_relay_proof) + writer.writeMessage(3, this.block_relay_proof, () => this.block_relay_proof.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SingleProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SingleProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_height = reader.readUint64(); + break; + case 2: + reader.readMessage(message.oracle_data_proof, () => message.oracle_data_proof = OracleDataProof.deserialize(reader)); + break; + case 3: + reader.readMessage(message.block_relay_proof, () => message.block_relay_proof = BlockRelayProof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SingleProof { + return SingleProof.deserialize(bytes); + } + } + export class MultiProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_height?: number; + oracle_data_multi_proof?: OracleDataProof[]; + block_relay_proof?: BlockRelayProof; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_height" in data && data.block_height != undefined) { + this.block_height = data.block_height; + } + if ("oracle_data_multi_proof" in data && data.oracle_data_multi_proof != undefined) { + this.oracle_data_multi_proof = data.oracle_data_multi_proof; + } + if ("block_relay_proof" in data && data.block_relay_proof != undefined) { + this.block_relay_proof = data.block_relay_proof; + } + } + } + get block_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set block_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get oracle_data_multi_proof() { + return pb_1.Message.getRepeatedWrapperField(this, OracleDataProof, 2) as OracleDataProof[]; + } + set oracle_data_multi_proof(value: OracleDataProof[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get block_relay_proof() { + return pb_1.Message.getWrapperField(this, BlockRelayProof, 3) as BlockRelayProof; + } + set block_relay_proof(value: BlockRelayProof) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_block_relay_proof() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + block_height?: number; + oracle_data_multi_proof?: ReturnType[]; + block_relay_proof?: ReturnType; + }): MultiProof { + const message = new MultiProof({}); + if (data.block_height != null) { + message.block_height = data.block_height; + } + if (data.oracle_data_multi_proof != null) { + message.oracle_data_multi_proof = data.oracle_data_multi_proof.map(item => OracleDataProof.fromObject(item)); + } + if (data.block_relay_proof != null) { + message.block_relay_proof = BlockRelayProof.fromObject(data.block_relay_proof); + } + return message; + } + toObject() { + const data: { + block_height?: number; + oracle_data_multi_proof?: ReturnType[]; + block_relay_proof?: ReturnType; + } = {}; + if (this.block_height != null) { + data.block_height = this.block_height; + } + if (this.oracle_data_multi_proof != null) { + data.oracle_data_multi_proof = this.oracle_data_multi_proof.map((item: OracleDataProof) => item.toObject()); + } + if (this.block_relay_proof != null) { + data.block_relay_proof = this.block_relay_proof.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.block_height != 0) + writer.writeUint64(1, this.block_height); + if (this.oracle_data_multi_proof.length) + writer.writeRepeatedMessage(2, this.oracle_data_multi_proof, (item: OracleDataProof) => item.serialize(writer)); + if (this.has_block_relay_proof) + writer.writeMessage(3, this.block_relay_proof, () => this.block_relay_proof.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MultiProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MultiProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_height = reader.readUint64(); + break; + case 2: + reader.readMessage(message.oracle_data_multi_proof, () => pb_1.Message.addToRepeatedWrapperField(message, 2, OracleDataProof.deserialize(reader), OracleDataProof)); + break; + case 3: + reader.readMessage(message.block_relay_proof, () => message.block_relay_proof = BlockRelayProof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MultiProof { + return MultiProof.deserialize(bytes); + } + } + export class CountProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_height?: number; + count_proof?: RequestsCountProof; + block_relay_proof?: BlockRelayProof; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_height" in data && data.block_height != undefined) { + this.block_height = data.block_height; + } + if ("count_proof" in data && data.count_proof != undefined) { + this.count_proof = data.count_proof; + } + if ("block_relay_proof" in data && data.block_relay_proof != undefined) { + this.block_relay_proof = data.block_relay_proof; + } + } + } + get block_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set block_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get count_proof() { + return pb_1.Message.getWrapperField(this, RequestsCountProof, 2) as RequestsCountProof; + } + set count_proof(value: RequestsCountProof) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_count_proof() { + return pb_1.Message.getField(this, 2) != null; + } + get block_relay_proof() { + return pb_1.Message.getWrapperField(this, BlockRelayProof, 3) as BlockRelayProof; + } + set block_relay_proof(value: BlockRelayProof) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_block_relay_proof() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + block_height?: number; + count_proof?: ReturnType; + block_relay_proof?: ReturnType; + }): CountProof { + const message = new CountProof({}); + if (data.block_height != null) { + message.block_height = data.block_height; + } + if (data.count_proof != null) { + message.count_proof = RequestsCountProof.fromObject(data.count_proof); + } + if (data.block_relay_proof != null) { + message.block_relay_proof = BlockRelayProof.fromObject(data.block_relay_proof); + } + return message; + } + toObject() { + const data: { + block_height?: number; + count_proof?: ReturnType; + block_relay_proof?: ReturnType; + } = {}; + if (this.block_height != null) { + data.block_height = this.block_height; + } + if (this.count_proof != null) { + data.count_proof = this.count_proof.toObject(); + } + if (this.block_relay_proof != null) { + data.block_relay_proof = this.block_relay_proof.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.block_height != 0) + writer.writeUint64(1, this.block_height); + if (this.has_count_proof) + writer.writeMessage(2, this.count_proof, () => this.count_proof.serialize(writer)); + if (this.has_block_relay_proof) + writer.writeMessage(3, this.block_relay_proof, () => this.block_relay_proof.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CountProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CountProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_height = reader.readUint64(); + break; + case 2: + reader.readMessage(message.count_proof, () => message.count_proof = RequestsCountProof.deserialize(reader)); + break; + case 3: + reader.readMessage(message.block_relay_proof, () => message.block_relay_proof = BlockRelayProof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CountProof { + return CountProof.deserialize(bytes); + } + } + export class OracleDataProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: dependency_3.band.oracle.v1.Result; + version?: number; + merkle_paths?: IAVLMerklePath[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("merkle_paths" in data && data.merkle_paths != undefined) { + this.merkle_paths = data.merkle_paths; + } + } + } + get result() { + return pb_1.Message.getWrapperField(this, dependency_3.band.oracle.v1.Result, 1) as dependency_3.band.oracle.v1.Result; + } + set result(value: dependency_3.band.oracle.v1.Result) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_result() { + return pb_1.Message.getField(this, 1) != null; + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set version(value: number) { + pb_1.Message.setField(this, 2, value); + } + get merkle_paths() { + return pb_1.Message.getRepeatedWrapperField(this, IAVLMerklePath, 3) as IAVLMerklePath[]; + } + set merkle_paths(value: IAVLMerklePath[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + result?: ReturnType; + version?: number; + merkle_paths?: ReturnType[]; + }): OracleDataProof { + const message = new OracleDataProof({}); + if (data.result != null) { + message.result = dependency_3.band.oracle.v1.Result.fromObject(data.result); + } + if (data.version != null) { + message.version = data.version; + } + if (data.merkle_paths != null) { + message.merkle_paths = data.merkle_paths.map(item => IAVLMerklePath.fromObject(item)); + } + return message; + } + toObject() { + const data: { + result?: ReturnType; + version?: number; + merkle_paths?: ReturnType[]; + } = {}; + if (this.result != null) { + data.result = this.result.toObject(); + } + if (this.version != null) { + data.version = this.version; + } + if (this.merkle_paths != null) { + data.merkle_paths = this.merkle_paths.map((item: IAVLMerklePath) => item.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_result) + writer.writeMessage(1, this.result, () => this.result.serialize(writer)); + if (this.version != 0) + writer.writeUint64(2, this.version); + if (this.merkle_paths.length) + writer.writeRepeatedMessage(3, this.merkle_paths, (item: IAVLMerklePath) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OracleDataProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OracleDataProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.result, () => message.result = dependency_3.band.oracle.v1.Result.deserialize(reader)); + break; + case 2: + message.version = reader.readUint64(); + break; + case 3: + reader.readMessage(message.merkle_paths, () => pb_1.Message.addToRepeatedWrapperField(message, 3, IAVLMerklePath.deserialize(reader), IAVLMerklePath)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OracleDataProof { + return OracleDataProof.deserialize(bytes); + } + } + export class IAVLMerklePath extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + is_data_on_right?: boolean; + subtree_height?: number; + subtree_size?: number; + subtree_version?: number; + sibling_hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("is_data_on_right" in data && data.is_data_on_right != undefined) { + this.is_data_on_right = data.is_data_on_right; + } + if ("subtree_height" in data && data.subtree_height != undefined) { + this.subtree_height = data.subtree_height; + } + if ("subtree_size" in data && data.subtree_size != undefined) { + this.subtree_size = data.subtree_size; + } + if ("subtree_version" in data && data.subtree_version != undefined) { + this.subtree_version = data.subtree_version; + } + if ("sibling_hash" in data && data.sibling_hash != undefined) { + this.sibling_hash = data.sibling_hash; + } + } + } + get is_data_on_right() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set is_data_on_right(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + get subtree_height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set subtree_height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get subtree_size() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set subtree_size(value: number) { + pb_1.Message.setField(this, 3, value); + } + get subtree_version() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set subtree_version(value: number) { + pb_1.Message.setField(this, 4, value); + } + get sibling_hash() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set sibling_hash(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + is_data_on_right?: boolean; + subtree_height?: number; + subtree_size?: number; + subtree_version?: number; + sibling_hash?: Uint8Array; + }): IAVLMerklePath { + const message = new IAVLMerklePath({}); + if (data.is_data_on_right != null) { + message.is_data_on_right = data.is_data_on_right; + } + if (data.subtree_height != null) { + message.subtree_height = data.subtree_height; + } + if (data.subtree_size != null) { + message.subtree_size = data.subtree_size; + } + if (data.subtree_version != null) { + message.subtree_version = data.subtree_version; + } + if (data.sibling_hash != null) { + message.sibling_hash = data.sibling_hash; + } + return message; + } + toObject() { + const data: { + is_data_on_right?: boolean; + subtree_height?: number; + subtree_size?: number; + subtree_version?: number; + sibling_hash?: Uint8Array; + } = {}; + if (this.is_data_on_right != null) { + data.is_data_on_right = this.is_data_on_right; + } + if (this.subtree_height != null) { + data.subtree_height = this.subtree_height; + } + if (this.subtree_size != null) { + data.subtree_size = this.subtree_size; + } + if (this.subtree_version != null) { + data.subtree_version = this.subtree_version; + } + if (this.sibling_hash != null) { + data.sibling_hash = this.sibling_hash; + } + 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.is_data_on_right != false) + writer.writeBool(1, this.is_data_on_right); + if (this.subtree_height != 0) + writer.writeUint32(2, this.subtree_height); + if (this.subtree_size != 0) + writer.writeUint64(3, this.subtree_size); + if (this.subtree_version != 0) + writer.writeUint64(4, this.subtree_version); + if (this.sibling_hash.length) + writer.writeBytes(5, this.sibling_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IAVLMerklePath { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IAVLMerklePath(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.is_data_on_right = reader.readBool(); + break; + case 2: + message.subtree_height = reader.readUint32(); + break; + case 3: + message.subtree_size = reader.readUint64(); + break; + case 4: + message.subtree_version = reader.readUint64(); + break; + case 5: + message.sibling_hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IAVLMerklePath { + return IAVLMerklePath.deserialize(bytes); + } + } + export class BlockRelayProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + multi_store_proof?: MultiStoreProof; + block_header_merkle_parts?: BlockHeaderMerkleParts; + common_encoded_vote_part?: CommonEncodedVotePart; + signatures?: TMSignature[]; + }) { + 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 ("multi_store_proof" in data && data.multi_store_proof != undefined) { + this.multi_store_proof = data.multi_store_proof; + } + if ("block_header_merkle_parts" in data && data.block_header_merkle_parts != undefined) { + this.block_header_merkle_parts = data.block_header_merkle_parts; + } + if ("common_encoded_vote_part" in data && data.common_encoded_vote_part != undefined) { + this.common_encoded_vote_part = data.common_encoded_vote_part; + } + if ("signatures" in data && data.signatures != undefined) { + this.signatures = data.signatures; + } + } + } + get multi_store_proof() { + return pb_1.Message.getWrapperField(this, MultiStoreProof, 1) as MultiStoreProof; + } + set multi_store_proof(value: MultiStoreProof) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_multi_store_proof() { + return pb_1.Message.getField(this, 1) != null; + } + get block_header_merkle_parts() { + return pb_1.Message.getWrapperField(this, BlockHeaderMerkleParts, 2) as BlockHeaderMerkleParts; + } + set block_header_merkle_parts(value: BlockHeaderMerkleParts) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_block_header_merkle_parts() { + return pb_1.Message.getField(this, 2) != null; + } + get common_encoded_vote_part() { + return pb_1.Message.getWrapperField(this, CommonEncodedVotePart, 3) as CommonEncodedVotePart; + } + set common_encoded_vote_part(value: CommonEncodedVotePart) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_common_encoded_vote_part() { + return pb_1.Message.getField(this, 3) != null; + } + get signatures() { + return pb_1.Message.getRepeatedWrapperField(this, TMSignature, 4) as TMSignature[]; + } + set signatures(value: TMSignature[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + multi_store_proof?: ReturnType; + block_header_merkle_parts?: ReturnType; + common_encoded_vote_part?: ReturnType; + signatures?: ReturnType[]; + }): BlockRelayProof { + const message = new BlockRelayProof({}); + if (data.multi_store_proof != null) { + message.multi_store_proof = MultiStoreProof.fromObject(data.multi_store_proof); + } + if (data.block_header_merkle_parts != null) { + message.block_header_merkle_parts = BlockHeaderMerkleParts.fromObject(data.block_header_merkle_parts); + } + if (data.common_encoded_vote_part != null) { + message.common_encoded_vote_part = CommonEncodedVotePart.fromObject(data.common_encoded_vote_part); + } + if (data.signatures != null) { + message.signatures = data.signatures.map(item => TMSignature.fromObject(item)); + } + return message; + } + toObject() { + const data: { + multi_store_proof?: ReturnType; + block_header_merkle_parts?: ReturnType; + common_encoded_vote_part?: ReturnType; + signatures?: ReturnType[]; + } = {}; + if (this.multi_store_proof != null) { + data.multi_store_proof = this.multi_store_proof.toObject(); + } + if (this.block_header_merkle_parts != null) { + data.block_header_merkle_parts = this.block_header_merkle_parts.toObject(); + } + if (this.common_encoded_vote_part != null) { + data.common_encoded_vote_part = this.common_encoded_vote_part.toObject(); + } + if (this.signatures != null) { + data.signatures = this.signatures.map((item: TMSignature) => item.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_multi_store_proof) + writer.writeMessage(1, this.multi_store_proof, () => this.multi_store_proof.serialize(writer)); + if (this.has_block_header_merkle_parts) + writer.writeMessage(2, this.block_header_merkle_parts, () => this.block_header_merkle_parts.serialize(writer)); + if (this.has_common_encoded_vote_part) + writer.writeMessage(3, this.common_encoded_vote_part, () => this.common_encoded_vote_part.serialize(writer)); + if (this.signatures.length) + writer.writeRepeatedMessage(4, this.signatures, (item: TMSignature) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockRelayProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BlockRelayProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.multi_store_proof, () => message.multi_store_proof = MultiStoreProof.deserialize(reader)); + break; + case 2: + reader.readMessage(message.block_header_merkle_parts, () => message.block_header_merkle_parts = BlockHeaderMerkleParts.deserialize(reader)); + break; + case 3: + reader.readMessage(message.common_encoded_vote_part, () => message.common_encoded_vote_part = CommonEncodedVotePart.deserialize(reader)); + break; + case 4: + reader.readMessage(message.signatures, () => pb_1.Message.addToRepeatedWrapperField(message, 4, TMSignature.deserialize(reader), TMSignature)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BlockRelayProof { + return BlockRelayProof.deserialize(bytes); + } + } + export class MultiStoreProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + oracle_iavl_state_hash?: Uint8Array; + mint_store_merkle_hash?: Uint8Array; + params_to_restake_stores_merkle_hash?: Uint8Array; + rollingseed_to_transfer_stores_merkle_hash?: Uint8Array; + tss_to_upgrade_stores_merkle_hash?: Uint8Array; + auth_to_icahost_stores_merkle_hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("oracle_iavl_state_hash" in data && data.oracle_iavl_state_hash != undefined) { + this.oracle_iavl_state_hash = data.oracle_iavl_state_hash; + } + if ("mint_store_merkle_hash" in data && data.mint_store_merkle_hash != undefined) { + this.mint_store_merkle_hash = data.mint_store_merkle_hash; + } + if ("params_to_restake_stores_merkle_hash" in data && data.params_to_restake_stores_merkle_hash != undefined) { + this.params_to_restake_stores_merkle_hash = data.params_to_restake_stores_merkle_hash; + } + if ("rollingseed_to_transfer_stores_merkle_hash" in data && data.rollingseed_to_transfer_stores_merkle_hash != undefined) { + this.rollingseed_to_transfer_stores_merkle_hash = data.rollingseed_to_transfer_stores_merkle_hash; + } + if ("tss_to_upgrade_stores_merkle_hash" in data && data.tss_to_upgrade_stores_merkle_hash != undefined) { + this.tss_to_upgrade_stores_merkle_hash = data.tss_to_upgrade_stores_merkle_hash; + } + if ("auth_to_icahost_stores_merkle_hash" in data && data.auth_to_icahost_stores_merkle_hash != undefined) { + this.auth_to_icahost_stores_merkle_hash = data.auth_to_icahost_stores_merkle_hash; + } + } + } + get oracle_iavl_state_hash() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set oracle_iavl_state_hash(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get mint_store_merkle_hash() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set mint_store_merkle_hash(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get params_to_restake_stores_merkle_hash() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set params_to_restake_stores_merkle_hash(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get rollingseed_to_transfer_stores_merkle_hash() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set rollingseed_to_transfer_stores_merkle_hash(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get tss_to_upgrade_stores_merkle_hash() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set tss_to_upgrade_stores_merkle_hash(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get auth_to_icahost_stores_merkle_hash() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set auth_to_icahost_stores_merkle_hash(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + oracle_iavl_state_hash?: Uint8Array; + mint_store_merkle_hash?: Uint8Array; + params_to_restake_stores_merkle_hash?: Uint8Array; + rollingseed_to_transfer_stores_merkle_hash?: Uint8Array; + tss_to_upgrade_stores_merkle_hash?: Uint8Array; + auth_to_icahost_stores_merkle_hash?: Uint8Array; + }): MultiStoreProof { + const message = new MultiStoreProof({}); + if (data.oracle_iavl_state_hash != null) { + message.oracle_iavl_state_hash = data.oracle_iavl_state_hash; + } + if (data.mint_store_merkle_hash != null) { + message.mint_store_merkle_hash = data.mint_store_merkle_hash; + } + if (data.params_to_restake_stores_merkle_hash != null) { + message.params_to_restake_stores_merkle_hash = data.params_to_restake_stores_merkle_hash; + } + if (data.rollingseed_to_transfer_stores_merkle_hash != null) { + message.rollingseed_to_transfer_stores_merkle_hash = data.rollingseed_to_transfer_stores_merkle_hash; + } + if (data.tss_to_upgrade_stores_merkle_hash != null) { + message.tss_to_upgrade_stores_merkle_hash = data.tss_to_upgrade_stores_merkle_hash; + } + if (data.auth_to_icahost_stores_merkle_hash != null) { + message.auth_to_icahost_stores_merkle_hash = data.auth_to_icahost_stores_merkle_hash; + } + return message; + } + toObject() { + const data: { + oracle_iavl_state_hash?: Uint8Array; + mint_store_merkle_hash?: Uint8Array; + params_to_restake_stores_merkle_hash?: Uint8Array; + rollingseed_to_transfer_stores_merkle_hash?: Uint8Array; + tss_to_upgrade_stores_merkle_hash?: Uint8Array; + auth_to_icahost_stores_merkle_hash?: Uint8Array; + } = {}; + if (this.oracle_iavl_state_hash != null) { + data.oracle_iavl_state_hash = this.oracle_iavl_state_hash; + } + if (this.mint_store_merkle_hash != null) { + data.mint_store_merkle_hash = this.mint_store_merkle_hash; + } + if (this.params_to_restake_stores_merkle_hash != null) { + data.params_to_restake_stores_merkle_hash = this.params_to_restake_stores_merkle_hash; + } + if (this.rollingseed_to_transfer_stores_merkle_hash != null) { + data.rollingseed_to_transfer_stores_merkle_hash = this.rollingseed_to_transfer_stores_merkle_hash; + } + if (this.tss_to_upgrade_stores_merkle_hash != null) { + data.tss_to_upgrade_stores_merkle_hash = this.tss_to_upgrade_stores_merkle_hash; + } + if (this.auth_to_icahost_stores_merkle_hash != null) { + data.auth_to_icahost_stores_merkle_hash = this.auth_to_icahost_stores_merkle_hash; + } + 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.oracle_iavl_state_hash.length) + writer.writeBytes(1, this.oracle_iavl_state_hash); + if (this.mint_store_merkle_hash.length) + writer.writeBytes(2, this.mint_store_merkle_hash); + if (this.params_to_restake_stores_merkle_hash.length) + writer.writeBytes(3, this.params_to_restake_stores_merkle_hash); + if (this.rollingseed_to_transfer_stores_merkle_hash.length) + writer.writeBytes(4, this.rollingseed_to_transfer_stores_merkle_hash); + if (this.tss_to_upgrade_stores_merkle_hash.length) + writer.writeBytes(5, this.tss_to_upgrade_stores_merkle_hash); + if (this.auth_to_icahost_stores_merkle_hash.length) + writer.writeBytes(6, this.auth_to_icahost_stores_merkle_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MultiStoreProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MultiStoreProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.oracle_iavl_state_hash = reader.readBytes(); + break; + case 2: + message.mint_store_merkle_hash = reader.readBytes(); + break; + case 3: + message.params_to_restake_stores_merkle_hash = reader.readBytes(); + break; + case 4: + message.rollingseed_to_transfer_stores_merkle_hash = reader.readBytes(); + break; + case 5: + message.tss_to_upgrade_stores_merkle_hash = reader.readBytes(); + break; + case 6: + message.auth_to_icahost_stores_merkle_hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MultiStoreProof { + return MultiStoreProof.deserialize(bytes); + } + } + export class BlockHeaderMerkleParts extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + version_and_chain_id_hash?: Uint8Array; + height?: number; + time_second?: number; + time_nano_second?: number; + last_block_id_and_other?: Uint8Array; + next_validator_hash_and_consensus_hash?: Uint8Array; + last_results_hash?: Uint8Array; + evidence_and_proposer_hash?: Uint8Array; + }) { + 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_and_chain_id_hash" in data && data.version_and_chain_id_hash != undefined) { + this.version_and_chain_id_hash = data.version_and_chain_id_hash; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("time_second" in data && data.time_second != undefined) { + this.time_second = data.time_second; + } + if ("time_nano_second" in data && data.time_nano_second != undefined) { + this.time_nano_second = data.time_nano_second; + } + if ("last_block_id_and_other" in data && data.last_block_id_and_other != undefined) { + this.last_block_id_and_other = data.last_block_id_and_other; + } + if ("next_validator_hash_and_consensus_hash" in data && data.next_validator_hash_and_consensus_hash != undefined) { + this.next_validator_hash_and_consensus_hash = data.next_validator_hash_and_consensus_hash; + } + if ("last_results_hash" in data && data.last_results_hash != undefined) { + this.last_results_hash = data.last_results_hash; + } + if ("evidence_and_proposer_hash" in data && data.evidence_and_proposer_hash != undefined) { + this.evidence_and_proposer_hash = data.evidence_and_proposer_hash; + } + } + } + get version_and_chain_id_hash() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set version_and_chain_id_hash(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get time_second() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set time_second(value: number) { + pb_1.Message.setField(this, 3, value); + } + get time_nano_second() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set time_nano_second(value: number) { + pb_1.Message.setField(this, 4, value); + } + get last_block_id_and_other() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set last_block_id_and_other(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get next_validator_hash_and_consensus_hash() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set next_validator_hash_and_consensus_hash(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get last_results_hash() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set last_results_hash(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get evidence_and_proposer_hash() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + set evidence_and_proposer_hash(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + version_and_chain_id_hash?: Uint8Array; + height?: number; + time_second?: number; + time_nano_second?: number; + last_block_id_and_other?: Uint8Array; + next_validator_hash_and_consensus_hash?: Uint8Array; + last_results_hash?: Uint8Array; + evidence_and_proposer_hash?: Uint8Array; + }): BlockHeaderMerkleParts { + const message = new BlockHeaderMerkleParts({}); + if (data.version_and_chain_id_hash != null) { + message.version_and_chain_id_hash = data.version_and_chain_id_hash; + } + if (data.height != null) { + message.height = data.height; + } + if (data.time_second != null) { + message.time_second = data.time_second; + } + if (data.time_nano_second != null) { + message.time_nano_second = data.time_nano_second; + } + if (data.last_block_id_and_other != null) { + message.last_block_id_and_other = data.last_block_id_and_other; + } + if (data.next_validator_hash_and_consensus_hash != null) { + message.next_validator_hash_and_consensus_hash = data.next_validator_hash_and_consensus_hash; + } + if (data.last_results_hash != null) { + message.last_results_hash = data.last_results_hash; + } + if (data.evidence_and_proposer_hash != null) { + message.evidence_and_proposer_hash = data.evidence_and_proposer_hash; + } + return message; + } + toObject() { + const data: { + version_and_chain_id_hash?: Uint8Array; + height?: number; + time_second?: number; + time_nano_second?: number; + last_block_id_and_other?: Uint8Array; + next_validator_hash_and_consensus_hash?: Uint8Array; + last_results_hash?: Uint8Array; + evidence_and_proposer_hash?: Uint8Array; + } = {}; + if (this.version_and_chain_id_hash != null) { + data.version_and_chain_id_hash = this.version_and_chain_id_hash; + } + if (this.height != null) { + data.height = this.height; + } + if (this.time_second != null) { + data.time_second = this.time_second; + } + if (this.time_nano_second != null) { + data.time_nano_second = this.time_nano_second; + } + if (this.last_block_id_and_other != null) { + data.last_block_id_and_other = this.last_block_id_and_other; + } + if (this.next_validator_hash_and_consensus_hash != null) { + data.next_validator_hash_and_consensus_hash = this.next_validator_hash_and_consensus_hash; + } + if (this.last_results_hash != null) { + data.last_results_hash = this.last_results_hash; + } + if (this.evidence_and_proposer_hash != null) { + data.evidence_and_proposer_hash = this.evidence_and_proposer_hash; + } + 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_and_chain_id_hash.length) + writer.writeBytes(1, this.version_and_chain_id_hash); + if (this.height != 0) + writer.writeUint64(2, this.height); + if (this.time_second != 0) + writer.writeUint64(3, this.time_second); + if (this.time_nano_second != 0) + writer.writeUint32(4, this.time_nano_second); + if (this.last_block_id_and_other.length) + writer.writeBytes(5, this.last_block_id_and_other); + if (this.next_validator_hash_and_consensus_hash.length) + writer.writeBytes(6, this.next_validator_hash_and_consensus_hash); + if (this.last_results_hash.length) + writer.writeBytes(7, this.last_results_hash); + if (this.evidence_and_proposer_hash.length) + writer.writeBytes(8, this.evidence_and_proposer_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockHeaderMerkleParts { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BlockHeaderMerkleParts(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.version_and_chain_id_hash = reader.readBytes(); + break; + case 2: + message.height = reader.readUint64(); + break; + case 3: + message.time_second = reader.readUint64(); + break; + case 4: + message.time_nano_second = reader.readUint32(); + break; + case 5: + message.last_block_id_and_other = reader.readBytes(); + break; + case 6: + message.next_validator_hash_and_consensus_hash = reader.readBytes(); + break; + case 7: + message.last_results_hash = reader.readBytes(); + break; + case 8: + message.evidence_and_proposer_hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BlockHeaderMerkleParts { + return BlockHeaderMerkleParts.deserialize(bytes); + } + } + export class CommonEncodedVotePart extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signed_data_prefix?: Uint8Array; + signed_data_suffix?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signed_data_prefix" in data && data.signed_data_prefix != undefined) { + this.signed_data_prefix = data.signed_data_prefix; + } + if ("signed_data_suffix" in data && data.signed_data_suffix != undefined) { + this.signed_data_suffix = data.signed_data_suffix; + } + } + } + get signed_data_prefix() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set signed_data_prefix(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get signed_data_suffix() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set signed_data_suffix(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + signed_data_prefix?: Uint8Array; + signed_data_suffix?: Uint8Array; + }): CommonEncodedVotePart { + const message = new CommonEncodedVotePart({}); + if (data.signed_data_prefix != null) { + message.signed_data_prefix = data.signed_data_prefix; + } + if (data.signed_data_suffix != null) { + message.signed_data_suffix = data.signed_data_suffix; + } + return message; + } + toObject() { + const data: { + signed_data_prefix?: Uint8Array; + signed_data_suffix?: Uint8Array; + } = {}; + if (this.signed_data_prefix != null) { + data.signed_data_prefix = this.signed_data_prefix; + } + if (this.signed_data_suffix != null) { + data.signed_data_suffix = this.signed_data_suffix; + } + 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.signed_data_prefix.length) + writer.writeBytes(1, this.signed_data_prefix); + if (this.signed_data_suffix.length) + writer.writeBytes(2, this.signed_data_suffix); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommonEncodedVotePart { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommonEncodedVotePart(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signed_data_prefix = reader.readBytes(); + break; + case 2: + message.signed_data_suffix = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommonEncodedVotePart { + return CommonEncodedVotePart.deserialize(bytes); + } + } + export class TMSignature extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + r?: Uint8Array; + s?: Uint8Array; + v?: number; + encoded_timestamp?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("r" in data && data.r != undefined) { + this.r = data.r; + } + if ("s" in data && data.s != undefined) { + this.s = data.s; + } + if ("v" in data && data.v != undefined) { + this.v = data.v; + } + if ("encoded_timestamp" in data && data.encoded_timestamp != undefined) { + this.encoded_timestamp = data.encoded_timestamp; + } + } + } + get r() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set r(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get s() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set s(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get v() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set v(value: number) { + pb_1.Message.setField(this, 3, value); + } + get encoded_timestamp() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set encoded_timestamp(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + r?: Uint8Array; + s?: Uint8Array; + v?: number; + encoded_timestamp?: Uint8Array; + }): TMSignature { + const message = new TMSignature({}); + if (data.r != null) { + message.r = data.r; + } + if (data.s != null) { + message.s = data.s; + } + if (data.v != null) { + message.v = data.v; + } + if (data.encoded_timestamp != null) { + message.encoded_timestamp = data.encoded_timestamp; + } + return message; + } + toObject() { + const data: { + r?: Uint8Array; + s?: Uint8Array; + v?: number; + encoded_timestamp?: Uint8Array; + } = {}; + if (this.r != null) { + data.r = this.r; + } + if (this.s != null) { + data.s = this.s; + } + if (this.v != null) { + data.v = this.v; + } + if (this.encoded_timestamp != null) { + data.encoded_timestamp = this.encoded_timestamp; + } + 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.r.length) + writer.writeBytes(1, this.r); + if (this.s.length) + writer.writeBytes(2, this.s); + if (this.v != 0) + writer.writeUint32(3, this.v); + if (this.encoded_timestamp.length) + writer.writeBytes(4, this.encoded_timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TMSignature { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TMSignature(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.r = reader.readBytes(); + break; + case 2: + message.s = reader.readBytes(); + break; + case 3: + message.v = reader.readUint32(); + break; + case 4: + message.encoded_timestamp = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TMSignature { + return TMSignature.deserialize(bytes); + } + } + export class RequestsCountProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + count?: number; + version?: number; + merkle_paths?: IAVLMerklePath[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("count" in data && data.count != undefined) { + this.count = data.count; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("merkle_paths" in data && data.merkle_paths != undefined) { + this.merkle_paths = data.merkle_paths; + } + } + } + get count() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set count(value: number) { + pb_1.Message.setField(this, 1, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set version(value: number) { + pb_1.Message.setField(this, 2, value); + } + get merkle_paths() { + return pb_1.Message.getRepeatedWrapperField(this, IAVLMerklePath, 3) as IAVLMerklePath[]; + } + set merkle_paths(value: IAVLMerklePath[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + count?: number; + version?: number; + merkle_paths?: ReturnType[]; + }): RequestsCountProof { + const message = new RequestsCountProof({}); + if (data.count != null) { + message.count = data.count; + } + if (data.version != null) { + message.version = data.version; + } + if (data.merkle_paths != null) { + message.merkle_paths = data.merkle_paths.map(item => IAVLMerklePath.fromObject(item)); + } + return message; + } + toObject() { + const data: { + count?: number; + version?: number; + merkle_paths?: ReturnType[]; + } = {}; + if (this.count != null) { + data.count = this.count; + } + if (this.version != null) { + data.version = this.version; + } + if (this.merkle_paths != null) { + data.merkle_paths = this.merkle_paths.map((item: IAVLMerklePath) => item.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.count != 0) + writer.writeUint64(1, this.count); + if (this.version != 0) + writer.writeUint64(2, this.version); + if (this.merkle_paths.length) + writer.writeRepeatedMessage(3, this.merkle_paths, (item: IAVLMerklePath) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestsCountProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestsCountProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.count = reader.readUint64(); + break; + case 2: + message.version = reader.readUint64(); + break; + case 3: + reader.readMessage(message.merkle_paths, () => pb_1.Message.addToRepeatedWrapperField(message, 3, IAVLMerklePath.deserialize(reader), IAVLMerklePath)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestsCountProof { + return RequestsCountProof.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedServiceService { + static definition = { + Proof: { + path: "/band.base.oracle.v1.Service/Proof", + requestStream: false, + responseStream: false, + requestSerialize: (message: ProofRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ProofRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ProofResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ProofResponse.deserialize(new Uint8Array(bytes)) + }, + MultiProof: { + path: "/band.base.oracle.v1.Service/MultiProof", + requestStream: false, + responseStream: false, + requestSerialize: (message: MultiProofRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MultiProofRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MultiProofResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MultiProofResponse.deserialize(new Uint8Array(bytes)) + }, + RequestCountProof: { + path: "/band.base.oracle.v1.Service/RequestCountProof", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestCountProofRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestCountProofRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: RequestCountProofResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => RequestCountProofResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Proof(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract MultiProof(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RequestCountProof(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedServiceService.definition, "Service", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Proof: GrpcUnaryServiceInterface = (message: ProofRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Proof(message, metadata, options, callback); + }; + MultiProof: GrpcUnaryServiceInterface = (message: MultiProofRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.MultiProof(message, metadata, options, callback); + }; + RequestCountProof: GrpcUnaryServiceInterface = (message: RequestCountProofRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RequestCountProof(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/base/oracle/v1/proof_pb.d.ts b/codegen/band/base/oracle/v1/proof_pb.d.ts new file mode 100644 index 0000000..5a6c76f --- /dev/null +++ b/codegen/band/base/oracle/v1/proof_pb.d.ts @@ -0,0 +1,644 @@ +// package: band.base.oracle.v1 +// file: band/base/oracle/v1/proof.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../../google/api/annotations_pb"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as band_oracle_v1_oracle_pb from "../../../../band/oracle/v1/oracle_pb"; + +export class ProofRequest extends jspb.Message { + getRequestId(): number; + setRequestId(value: number): void; + + getHeight(): number; + setHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProofRequest.AsObject; + static toObject(includeInstance: boolean, msg: ProofRequest): ProofRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProofRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProofRequest; + static deserializeBinaryFromReader(message: ProofRequest, reader: jspb.BinaryReader): ProofRequest; +} + +export namespace ProofRequest { + export type AsObject = { + requestId: number, + height: number, + } +} + +export class ProofResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + hasResult(): boolean; + clearResult(): void; + getResult(): SingleProofResult | undefined; + setResult(value?: SingleProofResult): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProofResponse.AsObject; + static toObject(includeInstance: boolean, msg: ProofResponse): ProofResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProofResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProofResponse; + static deserializeBinaryFromReader(message: ProofResponse, reader: jspb.BinaryReader): ProofResponse; +} + +export namespace ProofResponse { + export type AsObject = { + height: number, + result?: SingleProofResult.AsObject, + } +} + +export class MultiProofRequest extends jspb.Message { + clearRequestIdsList(): void; + getRequestIdsList(): Array; + setRequestIdsList(value: Array): void; + addRequestIds(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultiProofRequest.AsObject; + static toObject(includeInstance: boolean, msg: MultiProofRequest): MultiProofRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultiProofRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultiProofRequest; + static deserializeBinaryFromReader(message: MultiProofRequest, reader: jspb.BinaryReader): MultiProofRequest; +} + +export namespace MultiProofRequest { + export type AsObject = { + requestIdsList: Array, + } +} + +export class MultiProofResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + hasResult(): boolean; + clearResult(): void; + getResult(): MultiProofResult | undefined; + setResult(value?: MultiProofResult): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultiProofResponse.AsObject; + static toObject(includeInstance: boolean, msg: MultiProofResponse): MultiProofResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultiProofResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultiProofResponse; + static deserializeBinaryFromReader(message: MultiProofResponse, reader: jspb.BinaryReader): MultiProofResponse; +} + +export namespace MultiProofResponse { + export type AsObject = { + height: number, + result?: MultiProofResult.AsObject, + } +} + +export class RequestCountProofRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestCountProofRequest.AsObject; + static toObject(includeInstance: boolean, msg: RequestCountProofRequest): RequestCountProofRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestCountProofRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestCountProofRequest; + static deserializeBinaryFromReader(message: RequestCountProofRequest, reader: jspb.BinaryReader): RequestCountProofRequest; +} + +export namespace RequestCountProofRequest { + export type AsObject = { + } +} + +export class RequestCountProofResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + hasResult(): boolean; + clearResult(): void; + getResult(): CountProofResult | undefined; + setResult(value?: CountProofResult): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestCountProofResponse.AsObject; + static toObject(includeInstance: boolean, msg: RequestCountProofResponse): RequestCountProofResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestCountProofResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestCountProofResponse; + static deserializeBinaryFromReader(message: RequestCountProofResponse, reader: jspb.BinaryReader): RequestCountProofResponse; +} + +export namespace RequestCountProofResponse { + export type AsObject = { + height: number, + result?: CountProofResult.AsObject, + } +} + +export class SingleProofResult extends jspb.Message { + hasProof(): boolean; + clearProof(): void; + getProof(): SingleProof | undefined; + setProof(value?: SingleProof): void; + + getEvmProofBytes(): Uint8Array | string; + getEvmProofBytes_asU8(): Uint8Array; + getEvmProofBytes_asB64(): string; + setEvmProofBytes(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SingleProofResult.AsObject; + static toObject(includeInstance: boolean, msg: SingleProofResult): SingleProofResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SingleProofResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SingleProofResult; + static deserializeBinaryFromReader(message: SingleProofResult, reader: jspb.BinaryReader): SingleProofResult; +} + +export namespace SingleProofResult { + export type AsObject = { + proof?: SingleProof.AsObject, + evmProofBytes: Uint8Array | string, + } +} + +export class MultiProofResult extends jspb.Message { + hasProof(): boolean; + clearProof(): void; + getProof(): MultiProof | undefined; + setProof(value?: MultiProof): void; + + getEvmProofBytes(): Uint8Array | string; + getEvmProofBytes_asU8(): Uint8Array; + getEvmProofBytes_asB64(): string; + setEvmProofBytes(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultiProofResult.AsObject; + static toObject(includeInstance: boolean, msg: MultiProofResult): MultiProofResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultiProofResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultiProofResult; + static deserializeBinaryFromReader(message: MultiProofResult, reader: jspb.BinaryReader): MultiProofResult; +} + +export namespace MultiProofResult { + export type AsObject = { + proof?: MultiProof.AsObject, + evmProofBytes: Uint8Array | string, + } +} + +export class CountProofResult extends jspb.Message { + hasProof(): boolean; + clearProof(): void; + getProof(): CountProof | undefined; + setProof(value?: CountProof): void; + + getEvmProofBytes(): Uint8Array | string; + getEvmProofBytes_asU8(): Uint8Array; + getEvmProofBytes_asB64(): string; + setEvmProofBytes(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CountProofResult.AsObject; + static toObject(includeInstance: boolean, msg: CountProofResult): CountProofResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CountProofResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CountProofResult; + static deserializeBinaryFromReader(message: CountProofResult, reader: jspb.BinaryReader): CountProofResult; +} + +export namespace CountProofResult { + export type AsObject = { + proof?: CountProof.AsObject, + evmProofBytes: Uint8Array | string, + } +} + +export class SingleProof extends jspb.Message { + getBlockHeight(): number; + setBlockHeight(value: number): void; + + hasOracleDataProof(): boolean; + clearOracleDataProof(): void; + getOracleDataProof(): OracleDataProof | undefined; + setOracleDataProof(value?: OracleDataProof): void; + + hasBlockRelayProof(): boolean; + clearBlockRelayProof(): void; + getBlockRelayProof(): BlockRelayProof | undefined; + setBlockRelayProof(value?: BlockRelayProof): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SingleProof.AsObject; + static toObject(includeInstance: boolean, msg: SingleProof): SingleProof.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SingleProof, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SingleProof; + static deserializeBinaryFromReader(message: SingleProof, reader: jspb.BinaryReader): SingleProof; +} + +export namespace SingleProof { + export type AsObject = { + blockHeight: number, + oracleDataProof?: OracleDataProof.AsObject, + blockRelayProof?: BlockRelayProof.AsObject, + } +} + +export class MultiProof extends jspb.Message { + getBlockHeight(): number; + setBlockHeight(value: number): void; + + clearOracleDataMultiProofList(): void; + getOracleDataMultiProofList(): Array; + setOracleDataMultiProofList(value: Array): void; + addOracleDataMultiProof(value?: OracleDataProof, index?: number): OracleDataProof; + + hasBlockRelayProof(): boolean; + clearBlockRelayProof(): void; + getBlockRelayProof(): BlockRelayProof | undefined; + setBlockRelayProof(value?: BlockRelayProof): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultiProof.AsObject; + static toObject(includeInstance: boolean, msg: MultiProof): MultiProof.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultiProof, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultiProof; + static deserializeBinaryFromReader(message: MultiProof, reader: jspb.BinaryReader): MultiProof; +} + +export namespace MultiProof { + export type AsObject = { + blockHeight: number, + oracleDataMultiProofList: Array, + blockRelayProof?: BlockRelayProof.AsObject, + } +} + +export class CountProof extends jspb.Message { + getBlockHeight(): number; + setBlockHeight(value: number): void; + + hasCountProof(): boolean; + clearCountProof(): void; + getCountProof(): RequestsCountProof | undefined; + setCountProof(value?: RequestsCountProof): void; + + hasBlockRelayProof(): boolean; + clearBlockRelayProof(): void; + getBlockRelayProof(): BlockRelayProof | undefined; + setBlockRelayProof(value?: BlockRelayProof): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CountProof.AsObject; + static toObject(includeInstance: boolean, msg: CountProof): CountProof.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CountProof, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CountProof; + static deserializeBinaryFromReader(message: CountProof, reader: jspb.BinaryReader): CountProof; +} + +export namespace CountProof { + export type AsObject = { + blockHeight: number, + countProof?: RequestsCountProof.AsObject, + blockRelayProof?: BlockRelayProof.AsObject, + } +} + +export class OracleDataProof extends jspb.Message { + hasResult(): boolean; + clearResult(): void; + getResult(): band_oracle_v1_oracle_pb.Result | undefined; + setResult(value?: band_oracle_v1_oracle_pb.Result): void; + + getVersion(): number; + setVersion(value: number): void; + + clearMerklePathsList(): void; + getMerklePathsList(): Array; + setMerklePathsList(value: Array): void; + addMerklePaths(value?: IAVLMerklePath, index?: number): IAVLMerklePath; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OracleDataProof.AsObject; + static toObject(includeInstance: boolean, msg: OracleDataProof): OracleDataProof.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OracleDataProof, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OracleDataProof; + static deserializeBinaryFromReader(message: OracleDataProof, reader: jspb.BinaryReader): OracleDataProof; +} + +export namespace OracleDataProof { + export type AsObject = { + result?: band_oracle_v1_oracle_pb.Result.AsObject, + version: number, + merklePathsList: Array, + } +} + +export class IAVLMerklePath extends jspb.Message { + getIsDataOnRight(): boolean; + setIsDataOnRight(value: boolean): void; + + getSubtreeHeight(): number; + setSubtreeHeight(value: number): void; + + getSubtreeSize(): number; + setSubtreeSize(value: number): void; + + getSubtreeVersion(): number; + setSubtreeVersion(value: number): void; + + getSiblingHash(): Uint8Array | string; + getSiblingHash_asU8(): Uint8Array; + getSiblingHash_asB64(): string; + setSiblingHash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IAVLMerklePath.AsObject; + static toObject(includeInstance: boolean, msg: IAVLMerklePath): IAVLMerklePath.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IAVLMerklePath, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IAVLMerklePath; + static deserializeBinaryFromReader(message: IAVLMerklePath, reader: jspb.BinaryReader): IAVLMerklePath; +} + +export namespace IAVLMerklePath { + export type AsObject = { + isDataOnRight: boolean, + subtreeHeight: number, + subtreeSize: number, + subtreeVersion: number, + siblingHash: Uint8Array | string, + } +} + +export class BlockRelayProof extends jspb.Message { + hasMultiStoreProof(): boolean; + clearMultiStoreProof(): void; + getMultiStoreProof(): MultiStoreProof | undefined; + setMultiStoreProof(value?: MultiStoreProof): void; + + hasBlockHeaderMerkleParts(): boolean; + clearBlockHeaderMerkleParts(): void; + getBlockHeaderMerkleParts(): BlockHeaderMerkleParts | undefined; + setBlockHeaderMerkleParts(value?: BlockHeaderMerkleParts): void; + + hasCommonEncodedVotePart(): boolean; + clearCommonEncodedVotePart(): void; + getCommonEncodedVotePart(): CommonEncodedVotePart | undefined; + setCommonEncodedVotePart(value?: CommonEncodedVotePart): void; + + clearSignaturesList(): void; + getSignaturesList(): Array; + setSignaturesList(value: Array): void; + addSignatures(value?: TMSignature, index?: number): TMSignature; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockRelayProof.AsObject; + static toObject(includeInstance: boolean, msg: BlockRelayProof): BlockRelayProof.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockRelayProof, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockRelayProof; + static deserializeBinaryFromReader(message: BlockRelayProof, reader: jspb.BinaryReader): BlockRelayProof; +} + +export namespace BlockRelayProof { + export type AsObject = { + multiStoreProof?: MultiStoreProof.AsObject, + blockHeaderMerkleParts?: BlockHeaderMerkleParts.AsObject, + commonEncodedVotePart?: CommonEncodedVotePart.AsObject, + signaturesList: Array, + } +} + +export class MultiStoreProof extends jspb.Message { + getOracleIavlStateHash(): Uint8Array | string; + getOracleIavlStateHash_asU8(): Uint8Array; + getOracleIavlStateHash_asB64(): string; + setOracleIavlStateHash(value: Uint8Array | string): void; + + getMintStoreMerkleHash(): Uint8Array | string; + getMintStoreMerkleHash_asU8(): Uint8Array; + getMintStoreMerkleHash_asB64(): string; + setMintStoreMerkleHash(value: Uint8Array | string): void; + + getParamsToRestakeStoresMerkleHash(): Uint8Array | string; + getParamsToRestakeStoresMerkleHash_asU8(): Uint8Array; + getParamsToRestakeStoresMerkleHash_asB64(): string; + setParamsToRestakeStoresMerkleHash(value: Uint8Array | string): void; + + getRollingseedToTransferStoresMerkleHash(): Uint8Array | string; + getRollingseedToTransferStoresMerkleHash_asU8(): Uint8Array; + getRollingseedToTransferStoresMerkleHash_asB64(): string; + setRollingseedToTransferStoresMerkleHash(value: Uint8Array | string): void; + + getTssToUpgradeStoresMerkleHash(): Uint8Array | string; + getTssToUpgradeStoresMerkleHash_asU8(): Uint8Array; + getTssToUpgradeStoresMerkleHash_asB64(): string; + setTssToUpgradeStoresMerkleHash(value: Uint8Array | string): void; + + getAuthToIcahostStoresMerkleHash(): Uint8Array | string; + getAuthToIcahostStoresMerkleHash_asU8(): Uint8Array; + getAuthToIcahostStoresMerkleHash_asB64(): string; + setAuthToIcahostStoresMerkleHash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultiStoreProof.AsObject; + static toObject(includeInstance: boolean, msg: MultiStoreProof): MultiStoreProof.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultiStoreProof, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultiStoreProof; + static deserializeBinaryFromReader(message: MultiStoreProof, reader: jspb.BinaryReader): MultiStoreProof; +} + +export namespace MultiStoreProof { + export type AsObject = { + oracleIavlStateHash: Uint8Array | string, + mintStoreMerkleHash: Uint8Array | string, + paramsToRestakeStoresMerkleHash: Uint8Array | string, + rollingseedToTransferStoresMerkleHash: Uint8Array | string, + tssToUpgradeStoresMerkleHash: Uint8Array | string, + authToIcahostStoresMerkleHash: Uint8Array | string, + } +} + +export class BlockHeaderMerkleParts extends jspb.Message { + getVersionAndChainIdHash(): Uint8Array | string; + getVersionAndChainIdHash_asU8(): Uint8Array; + getVersionAndChainIdHash_asB64(): string; + setVersionAndChainIdHash(value: Uint8Array | string): void; + + getHeight(): number; + setHeight(value: number): void; + + getTimeSecond(): number; + setTimeSecond(value: number): void; + + getTimeNanoSecond(): number; + setTimeNanoSecond(value: number): void; + + getLastBlockIdAndOther(): Uint8Array | string; + getLastBlockIdAndOther_asU8(): Uint8Array; + getLastBlockIdAndOther_asB64(): string; + setLastBlockIdAndOther(value: Uint8Array | string): void; + + getNextValidatorHashAndConsensusHash(): Uint8Array | string; + getNextValidatorHashAndConsensusHash_asU8(): Uint8Array; + getNextValidatorHashAndConsensusHash_asB64(): string; + setNextValidatorHashAndConsensusHash(value: Uint8Array | string): void; + + getLastResultsHash(): Uint8Array | string; + getLastResultsHash_asU8(): Uint8Array; + getLastResultsHash_asB64(): string; + setLastResultsHash(value: Uint8Array | string): void; + + getEvidenceAndProposerHash(): Uint8Array | string; + getEvidenceAndProposerHash_asU8(): Uint8Array; + getEvidenceAndProposerHash_asB64(): string; + setEvidenceAndProposerHash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockHeaderMerkleParts.AsObject; + static toObject(includeInstance: boolean, msg: BlockHeaderMerkleParts): BlockHeaderMerkleParts.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockHeaderMerkleParts, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockHeaderMerkleParts; + static deserializeBinaryFromReader(message: BlockHeaderMerkleParts, reader: jspb.BinaryReader): BlockHeaderMerkleParts; +} + +export namespace BlockHeaderMerkleParts { + export type AsObject = { + versionAndChainIdHash: Uint8Array | string, + height: number, + timeSecond: number, + timeNanoSecond: number, + lastBlockIdAndOther: Uint8Array | string, + nextValidatorHashAndConsensusHash: Uint8Array | string, + lastResultsHash: Uint8Array | string, + evidenceAndProposerHash: Uint8Array | string, + } +} + +export class CommonEncodedVotePart extends jspb.Message { + getSignedDataPrefix(): Uint8Array | string; + getSignedDataPrefix_asU8(): Uint8Array; + getSignedDataPrefix_asB64(): string; + setSignedDataPrefix(value: Uint8Array | string): void; + + getSignedDataSuffix(): Uint8Array | string; + getSignedDataSuffix_asU8(): Uint8Array; + getSignedDataSuffix_asB64(): string; + setSignedDataSuffix(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CommonEncodedVotePart.AsObject; + static toObject(includeInstance: boolean, msg: CommonEncodedVotePart): CommonEncodedVotePart.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CommonEncodedVotePart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CommonEncodedVotePart; + static deserializeBinaryFromReader(message: CommonEncodedVotePart, reader: jspb.BinaryReader): CommonEncodedVotePart; +} + +export namespace CommonEncodedVotePart { + export type AsObject = { + signedDataPrefix: Uint8Array | string, + signedDataSuffix: Uint8Array | string, + } +} + +export class TMSignature extends jspb.Message { + getR(): Uint8Array | string; + getR_asU8(): Uint8Array; + getR_asB64(): string; + setR(value: Uint8Array | string): void; + + getS(): Uint8Array | string; + getS_asU8(): Uint8Array; + getS_asB64(): string; + setS(value: Uint8Array | string): void; + + getV(): number; + setV(value: number): void; + + getEncodedTimestamp(): Uint8Array | string; + getEncodedTimestamp_asU8(): Uint8Array; + getEncodedTimestamp_asB64(): string; + setEncodedTimestamp(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TMSignature.AsObject; + static toObject(includeInstance: boolean, msg: TMSignature): TMSignature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TMSignature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TMSignature; + static deserializeBinaryFromReader(message: TMSignature, reader: jspb.BinaryReader): TMSignature; +} + +export namespace TMSignature { + export type AsObject = { + r: Uint8Array | string, + s: Uint8Array | string, + v: number, + encodedTimestamp: Uint8Array | string, + } +} + +export class RequestsCountProof extends jspb.Message { + getCount(): number; + setCount(value: number): void; + + getVersion(): number; + setVersion(value: number): void; + + clearMerklePathsList(): void; + getMerklePathsList(): Array; + setMerklePathsList(value: Array): void; + addMerklePaths(value?: IAVLMerklePath, index?: number): IAVLMerklePath; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestsCountProof.AsObject; + static toObject(includeInstance: boolean, msg: RequestsCountProof): RequestsCountProof.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestsCountProof, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestsCountProof; + static deserializeBinaryFromReader(message: RequestsCountProof, reader: jspb.BinaryReader): RequestsCountProof; +} + +export namespace RequestsCountProof { + export type AsObject = { + count: number, + version: number, + merklePathsList: Array, + } +} + diff --git a/codegen/band/base/oracle/v1/proof_pb.js b/codegen/band/base/oracle/v1/proof_pb.js new file mode 100644 index 0000000..4ffea81 --- /dev/null +++ b/codegen/band/base/oracle/v1/proof_pb.js @@ -0,0 +1,5178 @@ +// source: band/base/oracle/v1/proof.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var band_oracle_v1_oracle_pb = require('../../../../band/oracle/v1/oracle_pb.js'); +goog.object.extend(proto, band_oracle_v1_oracle_pb); +goog.exportSymbol('proto.band.base.oracle.v1.BlockHeaderMerkleParts', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.BlockRelayProof', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.CommonEncodedVotePart', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.CountProof', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.CountProofResult', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.IAVLMerklePath', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.MultiProof', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.MultiProofRequest', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.MultiProofResponse', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.MultiProofResult', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.MultiStoreProof', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.OracleDataProof', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.ProofRequest', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.ProofResponse', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.RequestCountProofRequest', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.RequestCountProofResponse', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.RequestsCountProof', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.SingleProof', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.SingleProofResult', null, global); +goog.exportSymbol('proto.band.base.oracle.v1.TMSignature', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.ProofRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.ProofRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.ProofRequest.displayName = 'proto.band.base.oracle.v1.ProofRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.ProofResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.ProofResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.ProofResponse.displayName = 'proto.band.base.oracle.v1.ProofResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.MultiProofRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.base.oracle.v1.MultiProofRequest.repeatedFields_, null); +}; +goog.inherits(proto.band.base.oracle.v1.MultiProofRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.MultiProofRequest.displayName = 'proto.band.base.oracle.v1.MultiProofRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.MultiProofResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.MultiProofResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.MultiProofResponse.displayName = 'proto.band.base.oracle.v1.MultiProofResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.RequestCountProofRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.RequestCountProofRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.RequestCountProofRequest.displayName = 'proto.band.base.oracle.v1.RequestCountProofRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.RequestCountProofResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.RequestCountProofResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.RequestCountProofResponse.displayName = 'proto.band.base.oracle.v1.RequestCountProofResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.SingleProofResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.SingleProofResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.SingleProofResult.displayName = 'proto.band.base.oracle.v1.SingleProofResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.MultiProofResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.MultiProofResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.MultiProofResult.displayName = 'proto.band.base.oracle.v1.MultiProofResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.CountProofResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.CountProofResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.CountProofResult.displayName = 'proto.band.base.oracle.v1.CountProofResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.SingleProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.SingleProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.SingleProof.displayName = 'proto.band.base.oracle.v1.SingleProof'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.MultiProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.base.oracle.v1.MultiProof.repeatedFields_, null); +}; +goog.inherits(proto.band.base.oracle.v1.MultiProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.MultiProof.displayName = 'proto.band.base.oracle.v1.MultiProof'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.CountProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.CountProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.CountProof.displayName = 'proto.band.base.oracle.v1.CountProof'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.OracleDataProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.base.oracle.v1.OracleDataProof.repeatedFields_, null); +}; +goog.inherits(proto.band.base.oracle.v1.OracleDataProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.OracleDataProof.displayName = 'proto.band.base.oracle.v1.OracleDataProof'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.IAVLMerklePath = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.IAVLMerklePath, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.IAVLMerklePath.displayName = 'proto.band.base.oracle.v1.IAVLMerklePath'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.BlockRelayProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.base.oracle.v1.BlockRelayProof.repeatedFields_, null); +}; +goog.inherits(proto.band.base.oracle.v1.BlockRelayProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.BlockRelayProof.displayName = 'proto.band.base.oracle.v1.BlockRelayProof'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.MultiStoreProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.MultiStoreProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.MultiStoreProof.displayName = 'proto.band.base.oracle.v1.MultiStoreProof'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.BlockHeaderMerkleParts, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.BlockHeaderMerkleParts.displayName = 'proto.band.base.oracle.v1.BlockHeaderMerkleParts'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.CommonEncodedVotePart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.CommonEncodedVotePart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.CommonEncodedVotePart.displayName = 'proto.band.base.oracle.v1.CommonEncodedVotePart'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.TMSignature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.base.oracle.v1.TMSignature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.TMSignature.displayName = 'proto.band.base.oracle.v1.TMSignature'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.base.oracle.v1.RequestsCountProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.base.oracle.v1.RequestsCountProof.repeatedFields_, null); +}; +goog.inherits(proto.band.base.oracle.v1.RequestsCountProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.base.oracle.v1.RequestsCountProof.displayName = 'proto.band.base.oracle.v1.RequestsCountProof'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.ProofRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.ProofRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.ProofRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.ProofRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.ProofRequest} + */ +proto.band.base.oracle.v1.ProofRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.ProofRequest; + return proto.band.base.oracle.v1.ProofRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.ProofRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.ProofRequest} + */ +proto.band.base.oracle.v1.ProofRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.ProofRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.ProofRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.ProofRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.ProofRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional uint64 request_id = 1; + * @return {number} + */ +proto.band.base.oracle.v1.ProofRequest.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.ProofRequest} returns this + */ +proto.band.base.oracle.v1.ProofRequest.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.band.base.oracle.v1.ProofRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.ProofRequest} returns this + */ +proto.band.base.oracle.v1.ProofRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.ProofResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.ProofResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.ProofResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.ProofResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + result: (f = msg.getResult()) && proto.band.base.oracle.v1.SingleProofResult.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.ProofResponse} + */ +proto.band.base.oracle.v1.ProofResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.ProofResponse; + return proto.band.base.oracle.v1.ProofResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.ProofResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.ProofResponse} + */ +proto.band.base.oracle.v1.ProofResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = new proto.band.base.oracle.v1.SingleProofResult; + reader.readMessage(value,proto.band.base.oracle.v1.SingleProofResult.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.ProofResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.ProofResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.ProofResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.ProofResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.band.base.oracle.v1.SingleProofResult.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.band.base.oracle.v1.ProofResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.ProofResponse} returns this + */ +proto.band.base.oracle.v1.ProofResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional SingleProofResult result = 2; + * @return {?proto.band.base.oracle.v1.SingleProofResult} + */ +proto.band.base.oracle.v1.ProofResponse.prototype.getResult = function() { + return /** @type{?proto.band.base.oracle.v1.SingleProofResult} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.SingleProofResult, 2)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.SingleProofResult|undefined} value + * @return {!proto.band.base.oracle.v1.ProofResponse} returns this +*/ +proto.band.base.oracle.v1.ProofResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.ProofResponse} returns this + */ +proto.band.base.oracle.v1.ProofResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.ProofResponse.prototype.hasResult = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.base.oracle.v1.MultiProofRequest.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.MultiProofRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.MultiProofRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.MultiProofRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiProofRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.MultiProofRequest} + */ +proto.band.base.oracle.v1.MultiProofRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.MultiProofRequest; + return proto.band.base.oracle.v1.MultiProofRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.MultiProofRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.MultiProofRequest} + */ +proto.band.base.oracle.v1.MultiProofRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addRequestIds(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiProofRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.MultiProofRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.MultiProofRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiProofRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestIdsList(); + if (f.length > 0) { + writer.writePackedUint64( + 1, + f + ); + } +}; + + +/** + * repeated uint64 request_ids = 1; + * @return {!Array} + */ +proto.band.base.oracle.v1.MultiProofRequest.prototype.getRequestIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.base.oracle.v1.MultiProofRequest} returns this + */ +proto.band.base.oracle.v1.MultiProofRequest.prototype.setRequestIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.band.base.oracle.v1.MultiProofRequest} returns this + */ +proto.band.base.oracle.v1.MultiProofRequest.prototype.addRequestIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.base.oracle.v1.MultiProofRequest} returns this + */ +proto.band.base.oracle.v1.MultiProofRequest.prototype.clearRequestIdsList = function() { + return this.setRequestIdsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.MultiProofResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.MultiProofResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.MultiProofResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiProofResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + result: (f = msg.getResult()) && proto.band.base.oracle.v1.MultiProofResult.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.MultiProofResponse} + */ +proto.band.base.oracle.v1.MultiProofResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.MultiProofResponse; + return proto.band.base.oracle.v1.MultiProofResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.MultiProofResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.MultiProofResponse} + */ +proto.band.base.oracle.v1.MultiProofResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = new proto.band.base.oracle.v1.MultiProofResult; + reader.readMessage(value,proto.band.base.oracle.v1.MultiProofResult.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiProofResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.MultiProofResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.MultiProofResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiProofResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.band.base.oracle.v1.MultiProofResult.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.band.base.oracle.v1.MultiProofResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.MultiProofResponse} returns this + */ +proto.band.base.oracle.v1.MultiProofResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional MultiProofResult result = 2; + * @return {?proto.band.base.oracle.v1.MultiProofResult} + */ +proto.band.base.oracle.v1.MultiProofResponse.prototype.getResult = function() { + return /** @type{?proto.band.base.oracle.v1.MultiProofResult} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.MultiProofResult, 2)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.MultiProofResult|undefined} value + * @return {!proto.band.base.oracle.v1.MultiProofResponse} returns this +*/ +proto.band.base.oracle.v1.MultiProofResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.MultiProofResponse} returns this + */ +proto.band.base.oracle.v1.MultiProofResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.MultiProofResponse.prototype.hasResult = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.RequestCountProofRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.RequestCountProofRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.RequestCountProofRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.RequestCountProofRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.RequestCountProofRequest} + */ +proto.band.base.oracle.v1.RequestCountProofRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.RequestCountProofRequest; + return proto.band.base.oracle.v1.RequestCountProofRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.RequestCountProofRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.RequestCountProofRequest} + */ +proto.band.base.oracle.v1.RequestCountProofRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.RequestCountProofRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.RequestCountProofRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.RequestCountProofRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.RequestCountProofRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.RequestCountProofResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.RequestCountProofResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.RequestCountProofResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.RequestCountProofResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + result: (f = msg.getResult()) && proto.band.base.oracle.v1.CountProofResult.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.RequestCountProofResponse} + */ +proto.band.base.oracle.v1.RequestCountProofResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.RequestCountProofResponse; + return proto.band.base.oracle.v1.RequestCountProofResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.RequestCountProofResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.RequestCountProofResponse} + */ +proto.band.base.oracle.v1.RequestCountProofResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = new proto.band.base.oracle.v1.CountProofResult; + reader.readMessage(value,proto.band.base.oracle.v1.CountProofResult.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.RequestCountProofResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.RequestCountProofResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.RequestCountProofResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.RequestCountProofResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.band.base.oracle.v1.CountProofResult.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.band.base.oracle.v1.RequestCountProofResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.RequestCountProofResponse} returns this + */ +proto.band.base.oracle.v1.RequestCountProofResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional CountProofResult result = 2; + * @return {?proto.band.base.oracle.v1.CountProofResult} + */ +proto.band.base.oracle.v1.RequestCountProofResponse.prototype.getResult = function() { + return /** @type{?proto.band.base.oracle.v1.CountProofResult} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.CountProofResult, 2)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.CountProofResult|undefined} value + * @return {!proto.band.base.oracle.v1.RequestCountProofResponse} returns this +*/ +proto.band.base.oracle.v1.RequestCountProofResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.RequestCountProofResponse} returns this + */ +proto.band.base.oracle.v1.RequestCountProofResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.RequestCountProofResponse.prototype.hasResult = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.SingleProofResult.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.SingleProofResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.SingleProofResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.SingleProofResult.toObject = function(includeInstance, msg) { + var f, obj = { + proof: (f = msg.getProof()) && proto.band.base.oracle.v1.SingleProof.toObject(includeInstance, f), + evmProofBytes: msg.getEvmProofBytes_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.SingleProofResult} + */ +proto.band.base.oracle.v1.SingleProofResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.SingleProofResult; + return proto.band.base.oracle.v1.SingleProofResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.SingleProofResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.SingleProofResult} + */ +proto.band.base.oracle.v1.SingleProofResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.base.oracle.v1.SingleProof; + reader.readMessage(value,proto.band.base.oracle.v1.SingleProof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEvmProofBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.SingleProofResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.SingleProofResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.SingleProofResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.SingleProofResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.base.oracle.v1.SingleProof.serializeBinaryToWriter + ); + } + f = message.getEvmProofBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional SingleProof proof = 1; + * @return {?proto.band.base.oracle.v1.SingleProof} + */ +proto.band.base.oracle.v1.SingleProofResult.prototype.getProof = function() { + return /** @type{?proto.band.base.oracle.v1.SingleProof} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.SingleProof, 1)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.SingleProof|undefined} value + * @return {!proto.band.base.oracle.v1.SingleProofResult} returns this +*/ +proto.band.base.oracle.v1.SingleProofResult.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.SingleProofResult} returns this + */ +proto.band.base.oracle.v1.SingleProofResult.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.SingleProofResult.prototype.hasProof = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes evm_proof_bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.SingleProofResult.prototype.getEvmProofBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes evm_proof_bytes = 2; + * This is a type-conversion wrapper around `getEvmProofBytes()` + * @return {string} + */ +proto.band.base.oracle.v1.SingleProofResult.prototype.getEvmProofBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvmProofBytes())); +}; + + +/** + * optional bytes evm_proof_bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvmProofBytes()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.SingleProofResult.prototype.getEvmProofBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvmProofBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.SingleProofResult} returns this + */ +proto.band.base.oracle.v1.SingleProofResult.prototype.setEvmProofBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.MultiProofResult.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.MultiProofResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.MultiProofResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiProofResult.toObject = function(includeInstance, msg) { + var f, obj = { + proof: (f = msg.getProof()) && proto.band.base.oracle.v1.MultiProof.toObject(includeInstance, f), + evmProofBytes: msg.getEvmProofBytes_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.MultiProofResult} + */ +proto.band.base.oracle.v1.MultiProofResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.MultiProofResult; + return proto.band.base.oracle.v1.MultiProofResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.MultiProofResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.MultiProofResult} + */ +proto.band.base.oracle.v1.MultiProofResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.base.oracle.v1.MultiProof; + reader.readMessage(value,proto.band.base.oracle.v1.MultiProof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEvmProofBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiProofResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.MultiProofResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.MultiProofResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiProofResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.base.oracle.v1.MultiProof.serializeBinaryToWriter + ); + } + f = message.getEvmProofBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional MultiProof proof = 1; + * @return {?proto.band.base.oracle.v1.MultiProof} + */ +proto.band.base.oracle.v1.MultiProofResult.prototype.getProof = function() { + return /** @type{?proto.band.base.oracle.v1.MultiProof} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.MultiProof, 1)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.MultiProof|undefined} value + * @return {!proto.band.base.oracle.v1.MultiProofResult} returns this +*/ +proto.band.base.oracle.v1.MultiProofResult.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.MultiProofResult} returns this + */ +proto.band.base.oracle.v1.MultiProofResult.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.MultiProofResult.prototype.hasProof = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes evm_proof_bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.MultiProofResult.prototype.getEvmProofBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes evm_proof_bytes = 2; + * This is a type-conversion wrapper around `getEvmProofBytes()` + * @return {string} + */ +proto.band.base.oracle.v1.MultiProofResult.prototype.getEvmProofBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvmProofBytes())); +}; + + +/** + * optional bytes evm_proof_bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvmProofBytes()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiProofResult.prototype.getEvmProofBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvmProofBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.MultiProofResult} returns this + */ +proto.band.base.oracle.v1.MultiProofResult.prototype.setEvmProofBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.CountProofResult.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.CountProofResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.CountProofResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.CountProofResult.toObject = function(includeInstance, msg) { + var f, obj = { + proof: (f = msg.getProof()) && proto.band.base.oracle.v1.CountProof.toObject(includeInstance, f), + evmProofBytes: msg.getEvmProofBytes_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.CountProofResult} + */ +proto.band.base.oracle.v1.CountProofResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.CountProofResult; + return proto.band.base.oracle.v1.CountProofResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.CountProofResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.CountProofResult} + */ +proto.band.base.oracle.v1.CountProofResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.base.oracle.v1.CountProof; + reader.readMessage(value,proto.band.base.oracle.v1.CountProof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEvmProofBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.CountProofResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.CountProofResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.CountProofResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.CountProofResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.base.oracle.v1.CountProof.serializeBinaryToWriter + ); + } + f = message.getEvmProofBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional CountProof proof = 1; + * @return {?proto.band.base.oracle.v1.CountProof} + */ +proto.band.base.oracle.v1.CountProofResult.prototype.getProof = function() { + return /** @type{?proto.band.base.oracle.v1.CountProof} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.CountProof, 1)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.CountProof|undefined} value + * @return {!proto.band.base.oracle.v1.CountProofResult} returns this +*/ +proto.band.base.oracle.v1.CountProofResult.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.CountProofResult} returns this + */ +proto.band.base.oracle.v1.CountProofResult.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.CountProofResult.prototype.hasProof = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes evm_proof_bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.CountProofResult.prototype.getEvmProofBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes evm_proof_bytes = 2; + * This is a type-conversion wrapper around `getEvmProofBytes()` + * @return {string} + */ +proto.band.base.oracle.v1.CountProofResult.prototype.getEvmProofBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvmProofBytes())); +}; + + +/** + * optional bytes evm_proof_bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvmProofBytes()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.CountProofResult.prototype.getEvmProofBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvmProofBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.CountProofResult} returns this + */ +proto.band.base.oracle.v1.CountProofResult.prototype.setEvmProofBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.SingleProof.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.SingleProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.SingleProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.SingleProof.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + oracleDataProof: (f = msg.getOracleDataProof()) && proto.band.base.oracle.v1.OracleDataProof.toObject(includeInstance, f), + blockRelayProof: (f = msg.getBlockRelayProof()) && proto.band.base.oracle.v1.BlockRelayProof.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.SingleProof} + */ +proto.band.base.oracle.v1.SingleProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.SingleProof; + return proto.band.base.oracle.v1.SingleProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.SingleProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.SingleProof} + */ +proto.band.base.oracle.v1.SingleProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlockHeight(value); + break; + case 2: + var value = new proto.band.base.oracle.v1.OracleDataProof; + reader.readMessage(value,proto.band.base.oracle.v1.OracleDataProof.deserializeBinaryFromReader); + msg.setOracleDataProof(value); + break; + case 3: + var value = new proto.band.base.oracle.v1.BlockRelayProof; + reader.readMessage(value,proto.band.base.oracle.v1.BlockRelayProof.deserializeBinaryFromReader); + msg.setBlockRelayProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.SingleProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.SingleProof.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.SingleProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.SingleProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getOracleDataProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.band.base.oracle.v1.OracleDataProof.serializeBinaryToWriter + ); + } + f = message.getBlockRelayProof(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.band.base.oracle.v1.BlockRelayProof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 block_height = 1; + * @return {number} + */ +proto.band.base.oracle.v1.SingleProof.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.SingleProof} returns this + */ +proto.band.base.oracle.v1.SingleProof.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional OracleDataProof oracle_data_proof = 2; + * @return {?proto.band.base.oracle.v1.OracleDataProof} + */ +proto.band.base.oracle.v1.SingleProof.prototype.getOracleDataProof = function() { + return /** @type{?proto.band.base.oracle.v1.OracleDataProof} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.OracleDataProof, 2)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.OracleDataProof|undefined} value + * @return {!proto.band.base.oracle.v1.SingleProof} returns this +*/ +proto.band.base.oracle.v1.SingleProof.prototype.setOracleDataProof = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.SingleProof} returns this + */ +proto.band.base.oracle.v1.SingleProof.prototype.clearOracleDataProof = function() { + return this.setOracleDataProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.SingleProof.prototype.hasOracleDataProof = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional BlockRelayProof block_relay_proof = 3; + * @return {?proto.band.base.oracle.v1.BlockRelayProof} + */ +proto.band.base.oracle.v1.SingleProof.prototype.getBlockRelayProof = function() { + return /** @type{?proto.band.base.oracle.v1.BlockRelayProof} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.BlockRelayProof, 3)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.BlockRelayProof|undefined} value + * @return {!proto.band.base.oracle.v1.SingleProof} returns this +*/ +proto.band.base.oracle.v1.SingleProof.prototype.setBlockRelayProof = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.SingleProof} returns this + */ +proto.band.base.oracle.v1.SingleProof.prototype.clearBlockRelayProof = function() { + return this.setBlockRelayProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.SingleProof.prototype.hasBlockRelayProof = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.base.oracle.v1.MultiProof.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.MultiProof.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.MultiProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.MultiProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiProof.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + oracleDataMultiProofList: jspb.Message.toObjectList(msg.getOracleDataMultiProofList(), + proto.band.base.oracle.v1.OracleDataProof.toObject, includeInstance), + blockRelayProof: (f = msg.getBlockRelayProof()) && proto.band.base.oracle.v1.BlockRelayProof.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.MultiProof} + */ +proto.band.base.oracle.v1.MultiProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.MultiProof; + return proto.band.base.oracle.v1.MultiProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.MultiProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.MultiProof} + */ +proto.band.base.oracle.v1.MultiProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlockHeight(value); + break; + case 2: + var value = new proto.band.base.oracle.v1.OracleDataProof; + reader.readMessage(value,proto.band.base.oracle.v1.OracleDataProof.deserializeBinaryFromReader); + msg.addOracleDataMultiProof(value); + break; + case 3: + var value = new proto.band.base.oracle.v1.BlockRelayProof; + reader.readMessage(value,proto.band.base.oracle.v1.BlockRelayProof.deserializeBinaryFromReader); + msg.setBlockRelayProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.MultiProof.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.MultiProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getOracleDataMultiProofList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.band.base.oracle.v1.OracleDataProof.serializeBinaryToWriter + ); + } + f = message.getBlockRelayProof(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.band.base.oracle.v1.BlockRelayProof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 block_height = 1; + * @return {number} + */ +proto.band.base.oracle.v1.MultiProof.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.MultiProof} returns this + */ +proto.band.base.oracle.v1.MultiProof.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated OracleDataProof oracle_data_multi_proof = 2; + * @return {!Array} + */ +proto.band.base.oracle.v1.MultiProof.prototype.getOracleDataMultiProofList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.base.oracle.v1.OracleDataProof, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.base.oracle.v1.MultiProof} returns this +*/ +proto.band.base.oracle.v1.MultiProof.prototype.setOracleDataMultiProofList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.base.oracle.v1.OracleDataProof=} opt_value + * @param {number=} opt_index + * @return {!proto.band.base.oracle.v1.OracleDataProof} + */ +proto.band.base.oracle.v1.MultiProof.prototype.addOracleDataMultiProof = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.base.oracle.v1.OracleDataProof, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.base.oracle.v1.MultiProof} returns this + */ +proto.band.base.oracle.v1.MultiProof.prototype.clearOracleDataMultiProofList = function() { + return this.setOracleDataMultiProofList([]); +}; + + +/** + * optional BlockRelayProof block_relay_proof = 3; + * @return {?proto.band.base.oracle.v1.BlockRelayProof} + */ +proto.band.base.oracle.v1.MultiProof.prototype.getBlockRelayProof = function() { + return /** @type{?proto.band.base.oracle.v1.BlockRelayProof} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.BlockRelayProof, 3)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.BlockRelayProof|undefined} value + * @return {!proto.band.base.oracle.v1.MultiProof} returns this +*/ +proto.band.base.oracle.v1.MultiProof.prototype.setBlockRelayProof = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.MultiProof} returns this + */ +proto.band.base.oracle.v1.MultiProof.prototype.clearBlockRelayProof = function() { + return this.setBlockRelayProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.MultiProof.prototype.hasBlockRelayProof = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.CountProof.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.CountProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.CountProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.CountProof.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + countProof: (f = msg.getCountProof()) && proto.band.base.oracle.v1.RequestsCountProof.toObject(includeInstance, f), + blockRelayProof: (f = msg.getBlockRelayProof()) && proto.band.base.oracle.v1.BlockRelayProof.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.CountProof} + */ +proto.band.base.oracle.v1.CountProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.CountProof; + return proto.band.base.oracle.v1.CountProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.CountProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.CountProof} + */ +proto.band.base.oracle.v1.CountProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlockHeight(value); + break; + case 2: + var value = new proto.band.base.oracle.v1.RequestsCountProof; + reader.readMessage(value,proto.band.base.oracle.v1.RequestsCountProof.deserializeBinaryFromReader); + msg.setCountProof(value); + break; + case 3: + var value = new proto.band.base.oracle.v1.BlockRelayProof; + reader.readMessage(value,proto.band.base.oracle.v1.BlockRelayProof.deserializeBinaryFromReader); + msg.setBlockRelayProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.CountProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.CountProof.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.CountProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.CountProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCountProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.band.base.oracle.v1.RequestsCountProof.serializeBinaryToWriter + ); + } + f = message.getBlockRelayProof(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.band.base.oracle.v1.BlockRelayProof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 block_height = 1; + * @return {number} + */ +proto.band.base.oracle.v1.CountProof.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.CountProof} returns this + */ +proto.band.base.oracle.v1.CountProof.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional RequestsCountProof count_proof = 2; + * @return {?proto.band.base.oracle.v1.RequestsCountProof} + */ +proto.band.base.oracle.v1.CountProof.prototype.getCountProof = function() { + return /** @type{?proto.band.base.oracle.v1.RequestsCountProof} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.RequestsCountProof, 2)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.RequestsCountProof|undefined} value + * @return {!proto.band.base.oracle.v1.CountProof} returns this +*/ +proto.band.base.oracle.v1.CountProof.prototype.setCountProof = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.CountProof} returns this + */ +proto.band.base.oracle.v1.CountProof.prototype.clearCountProof = function() { + return this.setCountProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.CountProof.prototype.hasCountProof = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional BlockRelayProof block_relay_proof = 3; + * @return {?proto.band.base.oracle.v1.BlockRelayProof} + */ +proto.band.base.oracle.v1.CountProof.prototype.getBlockRelayProof = function() { + return /** @type{?proto.band.base.oracle.v1.BlockRelayProof} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.BlockRelayProof, 3)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.BlockRelayProof|undefined} value + * @return {!proto.band.base.oracle.v1.CountProof} returns this +*/ +proto.band.base.oracle.v1.CountProof.prototype.setBlockRelayProof = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.CountProof} returns this + */ +proto.band.base.oracle.v1.CountProof.prototype.clearBlockRelayProof = function() { + return this.setBlockRelayProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.CountProof.prototype.hasBlockRelayProof = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.base.oracle.v1.OracleDataProof.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.OracleDataProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.OracleDataProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.OracleDataProof.toObject = function(includeInstance, msg) { + var f, obj = { + result: (f = msg.getResult()) && band_oracle_v1_oracle_pb.Result.toObject(includeInstance, f), + version: jspb.Message.getFieldWithDefault(msg, 2, 0), + merklePathsList: jspb.Message.toObjectList(msg.getMerklePathsList(), + proto.band.base.oracle.v1.IAVLMerklePath.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.OracleDataProof} + */ +proto.band.base.oracle.v1.OracleDataProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.OracleDataProof; + return proto.band.base.oracle.v1.OracleDataProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.OracleDataProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.OracleDataProof} + */ +proto.band.base.oracle.v1.OracleDataProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_oracle_v1_oracle_pb.Result; + reader.readMessage(value,band_oracle_v1_oracle_pb.Result.deserializeBinaryFromReader); + msg.setResult(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setVersion(value); + break; + case 3: + var value = new proto.band.base.oracle.v1.IAVLMerklePath; + reader.readMessage(value,proto.band.base.oracle.v1.IAVLMerklePath.deserializeBinaryFromReader); + msg.addMerklePaths(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.OracleDataProof.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.OracleDataProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.OracleDataProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_oracle_v1_oracle_pb.Result.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getMerklePathsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.band.base.oracle.v1.IAVLMerklePath.serializeBinaryToWriter + ); + } +}; + + +/** + * optional band.oracle.v1.Result result = 1; + * @return {?proto.band.oracle.v1.Result} + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.getResult = function() { + return /** @type{?proto.band.oracle.v1.Result} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.Result, 1)); +}; + + +/** + * @param {?proto.band.oracle.v1.Result|undefined} value + * @return {!proto.band.base.oracle.v1.OracleDataProof} returns this +*/ +proto.band.base.oracle.v1.OracleDataProof.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.OracleDataProof} returns this + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.hasResult = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 version = 2; + * @return {number} + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.OracleDataProof} returns this + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated IAVLMerklePath merkle_paths = 3; + * @return {!Array} + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.getMerklePathsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.base.oracle.v1.IAVLMerklePath, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.base.oracle.v1.OracleDataProof} returns this +*/ +proto.band.base.oracle.v1.OracleDataProof.prototype.setMerklePathsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.band.base.oracle.v1.IAVLMerklePath=} opt_value + * @param {number=} opt_index + * @return {!proto.band.base.oracle.v1.IAVLMerklePath} + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.addMerklePaths = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.base.oracle.v1.IAVLMerklePath, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.base.oracle.v1.OracleDataProof} returns this + */ +proto.band.base.oracle.v1.OracleDataProof.prototype.clearMerklePathsList = function() { + return this.setMerklePathsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.IAVLMerklePath.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.IAVLMerklePath} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.IAVLMerklePath.toObject = function(includeInstance, msg) { + var f, obj = { + isDataOnRight: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + subtreeHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + subtreeSize: jspb.Message.getFieldWithDefault(msg, 3, 0), + subtreeVersion: jspb.Message.getFieldWithDefault(msg, 4, 0), + siblingHash: msg.getSiblingHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.IAVLMerklePath} + */ +proto.band.base.oracle.v1.IAVLMerklePath.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.IAVLMerklePath; + return proto.band.base.oracle.v1.IAVLMerklePath.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.IAVLMerklePath} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.IAVLMerklePath} + */ +proto.band.base.oracle.v1.IAVLMerklePath.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsDataOnRight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setSubtreeHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSubtreeSize(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSubtreeVersion(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSiblingHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.IAVLMerklePath.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.IAVLMerklePath} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.IAVLMerklePath.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsDataOnRight(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getSubtreeHeight(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getSubtreeSize(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSubtreeVersion(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getSiblingHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional bool is_data_on_right = 1; + * @return {boolean} + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.getIsDataOnRight = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.base.oracle.v1.IAVLMerklePath} returns this + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.setIsDataOnRight = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional uint32 subtree_height = 2; + * @return {number} + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.getSubtreeHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.IAVLMerklePath} returns this + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.setSubtreeHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 subtree_size = 3; + * @return {number} + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.getSubtreeSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.IAVLMerklePath} returns this + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.setSubtreeSize = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 subtree_version = 4; + * @return {number} + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.getSubtreeVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.IAVLMerklePath} returns this + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.setSubtreeVersion = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes sibling_hash = 5; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.getSiblingHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes sibling_hash = 5; + * This is a type-conversion wrapper around `getSiblingHash()` + * @return {string} + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.getSiblingHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSiblingHash())); +}; + + +/** + * optional bytes sibling_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSiblingHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.getSiblingHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSiblingHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.IAVLMerklePath} returns this + */ +proto.band.base.oracle.v1.IAVLMerklePath.prototype.setSiblingHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.base.oracle.v1.BlockRelayProof.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.BlockRelayProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.BlockRelayProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.BlockRelayProof.toObject = function(includeInstance, msg) { + var f, obj = { + multiStoreProof: (f = msg.getMultiStoreProof()) && proto.band.base.oracle.v1.MultiStoreProof.toObject(includeInstance, f), + blockHeaderMerkleParts: (f = msg.getBlockHeaderMerkleParts()) && proto.band.base.oracle.v1.BlockHeaderMerkleParts.toObject(includeInstance, f), + commonEncodedVotePart: (f = msg.getCommonEncodedVotePart()) && proto.band.base.oracle.v1.CommonEncodedVotePart.toObject(includeInstance, f), + signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), + proto.band.base.oracle.v1.TMSignature.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.BlockRelayProof} + */ +proto.band.base.oracle.v1.BlockRelayProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.BlockRelayProof; + return proto.band.base.oracle.v1.BlockRelayProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.BlockRelayProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.BlockRelayProof} + */ +proto.band.base.oracle.v1.BlockRelayProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.base.oracle.v1.MultiStoreProof; + reader.readMessage(value,proto.band.base.oracle.v1.MultiStoreProof.deserializeBinaryFromReader); + msg.setMultiStoreProof(value); + break; + case 2: + var value = new proto.band.base.oracle.v1.BlockHeaderMerkleParts; + reader.readMessage(value,proto.band.base.oracle.v1.BlockHeaderMerkleParts.deserializeBinaryFromReader); + msg.setBlockHeaderMerkleParts(value); + break; + case 3: + var value = new proto.band.base.oracle.v1.CommonEncodedVotePart; + reader.readMessage(value,proto.band.base.oracle.v1.CommonEncodedVotePart.deserializeBinaryFromReader); + msg.setCommonEncodedVotePart(value); + break; + case 4: + var value = new proto.band.base.oracle.v1.TMSignature; + reader.readMessage(value,proto.band.base.oracle.v1.TMSignature.deserializeBinaryFromReader); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.BlockRelayProof.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.BlockRelayProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.BlockRelayProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMultiStoreProof(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.base.oracle.v1.MultiStoreProof.serializeBinaryToWriter + ); + } + f = message.getBlockHeaderMerkleParts(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.band.base.oracle.v1.BlockHeaderMerkleParts.serializeBinaryToWriter + ); + } + f = message.getCommonEncodedVotePart(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.band.base.oracle.v1.CommonEncodedVotePart.serializeBinaryToWriter + ); + } + f = message.getSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.band.base.oracle.v1.TMSignature.serializeBinaryToWriter + ); + } +}; + + +/** + * optional MultiStoreProof multi_store_proof = 1; + * @return {?proto.band.base.oracle.v1.MultiStoreProof} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.getMultiStoreProof = function() { + return /** @type{?proto.band.base.oracle.v1.MultiStoreProof} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.MultiStoreProof, 1)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.MultiStoreProof|undefined} value + * @return {!proto.band.base.oracle.v1.BlockRelayProof} returns this +*/ +proto.band.base.oracle.v1.BlockRelayProof.prototype.setMultiStoreProof = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.BlockRelayProof} returns this + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.clearMultiStoreProof = function() { + return this.setMultiStoreProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.hasMultiStoreProof = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional BlockHeaderMerkleParts block_header_merkle_parts = 2; + * @return {?proto.band.base.oracle.v1.BlockHeaderMerkleParts} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.getBlockHeaderMerkleParts = function() { + return /** @type{?proto.band.base.oracle.v1.BlockHeaderMerkleParts} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.BlockHeaderMerkleParts, 2)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.BlockHeaderMerkleParts|undefined} value + * @return {!proto.band.base.oracle.v1.BlockRelayProof} returns this +*/ +proto.band.base.oracle.v1.BlockRelayProof.prototype.setBlockHeaderMerkleParts = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.BlockRelayProof} returns this + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.clearBlockHeaderMerkleParts = function() { + return this.setBlockHeaderMerkleParts(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.hasBlockHeaderMerkleParts = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional CommonEncodedVotePart common_encoded_vote_part = 3; + * @return {?proto.band.base.oracle.v1.CommonEncodedVotePart} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.getCommonEncodedVotePart = function() { + return /** @type{?proto.band.base.oracle.v1.CommonEncodedVotePart} */ ( + jspb.Message.getWrapperField(this, proto.band.base.oracle.v1.CommonEncodedVotePart, 3)); +}; + + +/** + * @param {?proto.band.base.oracle.v1.CommonEncodedVotePart|undefined} value + * @return {!proto.band.base.oracle.v1.BlockRelayProof} returns this +*/ +proto.band.base.oracle.v1.BlockRelayProof.prototype.setCommonEncodedVotePart = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.base.oracle.v1.BlockRelayProof} returns this + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.clearCommonEncodedVotePart = function() { + return this.setCommonEncodedVotePart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.hasCommonEncodedVotePart = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated TMSignature signatures = 4; + * @return {!Array} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.getSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.base.oracle.v1.TMSignature, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.base.oracle.v1.BlockRelayProof} returns this +*/ +proto.band.base.oracle.v1.BlockRelayProof.prototype.setSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.band.base.oracle.v1.TMSignature=} opt_value + * @param {number=} opt_index + * @return {!proto.band.base.oracle.v1.TMSignature} + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.addSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.band.base.oracle.v1.TMSignature, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.base.oracle.v1.BlockRelayProof} returns this + */ +proto.band.base.oracle.v1.BlockRelayProof.prototype.clearSignaturesList = function() { + return this.setSignaturesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.MultiStoreProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.MultiStoreProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiStoreProof.toObject = function(includeInstance, msg) { + var f, obj = { + oracleIavlStateHash: msg.getOracleIavlStateHash_asB64(), + mintStoreMerkleHash: msg.getMintStoreMerkleHash_asB64(), + paramsToRestakeStoresMerkleHash: msg.getParamsToRestakeStoresMerkleHash_asB64(), + rollingseedToTransferStoresMerkleHash: msg.getRollingseedToTransferStoresMerkleHash_asB64(), + tssToUpgradeStoresMerkleHash: msg.getTssToUpgradeStoresMerkleHash_asB64(), + authToIcahostStoresMerkleHash: msg.getAuthToIcahostStoresMerkleHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.MultiStoreProof} + */ +proto.band.base.oracle.v1.MultiStoreProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.MultiStoreProof; + return proto.band.base.oracle.v1.MultiStoreProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.MultiStoreProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.MultiStoreProof} + */ +proto.band.base.oracle.v1.MultiStoreProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOracleIavlStateHash(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMintStoreMerkleHash(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setParamsToRestakeStoresMerkleHash(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRollingseedToTransferStoresMerkleHash(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTssToUpgradeStoresMerkleHash(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAuthToIcahostStoresMerkleHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.MultiStoreProof.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.MultiStoreProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.MultiStoreProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOracleIavlStateHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getMintStoreMerkleHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getParamsToRestakeStoresMerkleHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getRollingseedToTransferStoresMerkleHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getTssToUpgradeStoresMerkleHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getAuthToIcahostStoresMerkleHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } +}; + + +/** + * optional bytes oracle_iavl_state_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getOracleIavlStateHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes oracle_iavl_state_hash = 1; + * This is a type-conversion wrapper around `getOracleIavlStateHash()` + * @return {string} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getOracleIavlStateHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOracleIavlStateHash())); +}; + + +/** + * optional bytes oracle_iavl_state_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOracleIavlStateHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getOracleIavlStateHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOracleIavlStateHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.MultiStoreProof} returns this + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.setOracleIavlStateHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes mint_store_merkle_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getMintStoreMerkleHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes mint_store_merkle_hash = 2; + * This is a type-conversion wrapper around `getMintStoreMerkleHash()` + * @return {string} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getMintStoreMerkleHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMintStoreMerkleHash())); +}; + + +/** + * optional bytes mint_store_merkle_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMintStoreMerkleHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getMintStoreMerkleHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMintStoreMerkleHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.MultiStoreProof} returns this + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.setMintStoreMerkleHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes params_to_restake_stores_merkle_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getParamsToRestakeStoresMerkleHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes params_to_restake_stores_merkle_hash = 3; + * This is a type-conversion wrapper around `getParamsToRestakeStoresMerkleHash()` + * @return {string} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getParamsToRestakeStoresMerkleHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getParamsToRestakeStoresMerkleHash())); +}; + + +/** + * optional bytes params_to_restake_stores_merkle_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getParamsToRestakeStoresMerkleHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getParamsToRestakeStoresMerkleHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getParamsToRestakeStoresMerkleHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.MultiStoreProof} returns this + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.setParamsToRestakeStoresMerkleHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes rollingseed_to_transfer_stores_merkle_hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getRollingseedToTransferStoresMerkleHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes rollingseed_to_transfer_stores_merkle_hash = 4; + * This is a type-conversion wrapper around `getRollingseedToTransferStoresMerkleHash()` + * @return {string} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getRollingseedToTransferStoresMerkleHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRollingseedToTransferStoresMerkleHash())); +}; + + +/** + * optional bytes rollingseed_to_transfer_stores_merkle_hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRollingseedToTransferStoresMerkleHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getRollingseedToTransferStoresMerkleHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRollingseedToTransferStoresMerkleHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.MultiStoreProof} returns this + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.setRollingseedToTransferStoresMerkleHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes tss_to_upgrade_stores_merkle_hash = 5; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getTssToUpgradeStoresMerkleHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes tss_to_upgrade_stores_merkle_hash = 5; + * This is a type-conversion wrapper around `getTssToUpgradeStoresMerkleHash()` + * @return {string} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getTssToUpgradeStoresMerkleHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTssToUpgradeStoresMerkleHash())); +}; + + +/** + * optional bytes tss_to_upgrade_stores_merkle_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTssToUpgradeStoresMerkleHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getTssToUpgradeStoresMerkleHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTssToUpgradeStoresMerkleHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.MultiStoreProof} returns this + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.setTssToUpgradeStoresMerkleHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional bytes auth_to_icahost_stores_merkle_hash = 6; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getAuthToIcahostStoresMerkleHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes auth_to_icahost_stores_merkle_hash = 6; + * This is a type-conversion wrapper around `getAuthToIcahostStoresMerkleHash()` + * @return {string} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getAuthToIcahostStoresMerkleHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAuthToIcahostStoresMerkleHash())); +}; + + +/** + * optional bytes auth_to_icahost_stores_merkle_hash = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAuthToIcahostStoresMerkleHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.getAuthToIcahostStoresMerkleHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAuthToIcahostStoresMerkleHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.MultiStoreProof} returns this + */ +proto.band.base.oracle.v1.MultiStoreProof.prototype.setAuthToIcahostStoresMerkleHash = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.BlockHeaderMerkleParts.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.toObject = function(includeInstance, msg) { + var f, obj = { + versionAndChainIdHash: msg.getVersionAndChainIdHash_asB64(), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + timeSecond: jspb.Message.getFieldWithDefault(msg, 3, 0), + timeNanoSecond: jspb.Message.getFieldWithDefault(msg, 4, 0), + lastBlockIdAndOther: msg.getLastBlockIdAndOther_asB64(), + nextValidatorHashAndConsensusHash: msg.getNextValidatorHashAndConsensusHash_asB64(), + lastResultsHash: msg.getLastResultsHash_asB64(), + evidenceAndProposerHash: msg.getEvidenceAndProposerHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.BlockHeaderMerkleParts; + return proto.band.base.oracle.v1.BlockHeaderMerkleParts.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setVersionAndChainIdHash(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeSecond(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTimeNanoSecond(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastBlockIdAndOther(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNextValidatorHashAndConsensusHash(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastResultsHash(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEvidenceAndProposerHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.BlockHeaderMerkleParts.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersionAndChainIdHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getTimeSecond(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getTimeNanoSecond(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getLastBlockIdAndOther_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getNextValidatorHashAndConsensusHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getLastResultsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getEvidenceAndProposerHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } +}; + + +/** + * optional bytes version_and_chain_id_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getVersionAndChainIdHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes version_and_chain_id_hash = 1; + * This is a type-conversion wrapper around `getVersionAndChainIdHash()` + * @return {string} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getVersionAndChainIdHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getVersionAndChainIdHash())); +}; + + +/** + * optional bytes version_and_chain_id_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVersionAndChainIdHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getVersionAndChainIdHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getVersionAndChainIdHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} returns this + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.setVersionAndChainIdHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 height = 2; + * @return {number} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} returns this + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 time_second = 3; + * @return {number} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getTimeSecond = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} returns this + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.setTimeSecond = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 time_nano_second = 4; + * @return {number} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getTimeNanoSecond = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} returns this + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.setTimeNanoSecond = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes last_block_id_and_other = 5; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getLastBlockIdAndOther = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes last_block_id_and_other = 5; + * This is a type-conversion wrapper around `getLastBlockIdAndOther()` + * @return {string} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getLastBlockIdAndOther_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastBlockIdAndOther())); +}; + + +/** + * optional bytes last_block_id_and_other = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastBlockIdAndOther()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getLastBlockIdAndOther_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastBlockIdAndOther())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} returns this + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.setLastBlockIdAndOther = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional bytes next_validator_hash_and_consensus_hash = 6; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getNextValidatorHashAndConsensusHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes next_validator_hash_and_consensus_hash = 6; + * This is a type-conversion wrapper around `getNextValidatorHashAndConsensusHash()` + * @return {string} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getNextValidatorHashAndConsensusHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextValidatorHashAndConsensusHash())); +}; + + +/** + * optional bytes next_validator_hash_and_consensus_hash = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNextValidatorHashAndConsensusHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getNextValidatorHashAndConsensusHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextValidatorHashAndConsensusHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} returns this + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.setNextValidatorHashAndConsensusHash = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes last_results_hash = 7; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getLastResultsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes last_results_hash = 7; + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {string} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getLastResultsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastResultsHash())); +}; + + +/** + * optional bytes last_results_hash = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getLastResultsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastResultsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} returns this + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.setLastResultsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional bytes evidence_and_proposer_hash = 8; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getEvidenceAndProposerHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes evidence_and_proposer_hash = 8; + * This is a type-conversion wrapper around `getEvidenceAndProposerHash()` + * @return {string} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getEvidenceAndProposerHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvidenceAndProposerHash())); +}; + + +/** + * optional bytes evidence_and_proposer_hash = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvidenceAndProposerHash()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.getEvidenceAndProposerHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvidenceAndProposerHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.BlockHeaderMerkleParts} returns this + */ +proto.band.base.oracle.v1.BlockHeaderMerkleParts.prototype.setEvidenceAndProposerHash = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.CommonEncodedVotePart.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.CommonEncodedVotePart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.toObject = function(includeInstance, msg) { + var f, obj = { + signedDataPrefix: msg.getSignedDataPrefix_asB64(), + signedDataSuffix: msg.getSignedDataSuffix_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.CommonEncodedVotePart} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.CommonEncodedVotePart; + return proto.band.base.oracle.v1.CommonEncodedVotePart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.CommonEncodedVotePart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.CommonEncodedVotePart} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignedDataPrefix(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignedDataSuffix(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.CommonEncodedVotePart.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.CommonEncodedVotePart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedDataPrefix_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getSignedDataSuffix_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes signed_data_prefix = 1; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.getSignedDataPrefix = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes signed_data_prefix = 1; + * This is a type-conversion wrapper around `getSignedDataPrefix()` + * @return {string} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.getSignedDataPrefix_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignedDataPrefix())); +}; + + +/** + * optional bytes signed_data_prefix = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignedDataPrefix()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.getSignedDataPrefix_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignedDataPrefix())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.CommonEncodedVotePart} returns this + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.setSignedDataPrefix = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes signed_data_suffix = 2; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.getSignedDataSuffix = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes signed_data_suffix = 2; + * This is a type-conversion wrapper around `getSignedDataSuffix()` + * @return {string} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.getSignedDataSuffix_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignedDataSuffix())); +}; + + +/** + * optional bytes signed_data_suffix = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignedDataSuffix()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.getSignedDataSuffix_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignedDataSuffix())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.CommonEncodedVotePart} returns this + */ +proto.band.base.oracle.v1.CommonEncodedVotePart.prototype.setSignedDataSuffix = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.TMSignature.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.TMSignature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.TMSignature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.TMSignature.toObject = function(includeInstance, msg) { + var f, obj = { + r: msg.getR_asB64(), + s: msg.getS_asB64(), + v: jspb.Message.getFieldWithDefault(msg, 3, 0), + encodedTimestamp: msg.getEncodedTimestamp_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.TMSignature} + */ +proto.band.base.oracle.v1.TMSignature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.TMSignature; + return proto.band.base.oracle.v1.TMSignature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.TMSignature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.TMSignature} + */ +proto.band.base.oracle.v1.TMSignature.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setR(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setS(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setV(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEncodedTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.TMSignature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.TMSignature.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.TMSignature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.TMSignature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getR_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getS_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getV(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getEncodedTimestamp_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional bytes r = 1; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getR = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes r = 1; + * This is a type-conversion wrapper around `getR()` + * @return {string} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getR_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getR())); +}; + + +/** + * optional bytes r = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getR()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getR_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getR())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.TMSignature} returns this + */ +proto.band.base.oracle.v1.TMSignature.prototype.setR = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes s = 2; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getS = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes s = 2; + * This is a type-conversion wrapper around `getS()` + * @return {string} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getS_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getS())); +}; + + +/** + * optional bytes s = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getS()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getS_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getS())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.TMSignature} returns this + */ +proto.band.base.oracle.v1.TMSignature.prototype.setS = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint32 v = 3; + * @return {number} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getV = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.TMSignature} returns this + */ +proto.band.base.oracle.v1.TMSignature.prototype.setV = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes encoded_timestamp = 4; + * @return {!(string|Uint8Array)} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getEncodedTimestamp = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes encoded_timestamp = 4; + * This is a type-conversion wrapper around `getEncodedTimestamp()` + * @return {string} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getEncodedTimestamp_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEncodedTimestamp())); +}; + + +/** + * optional bytes encoded_timestamp = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEncodedTimestamp()` + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.TMSignature.prototype.getEncodedTimestamp_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEncodedTimestamp())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.base.oracle.v1.TMSignature} returns this + */ +proto.band.base.oracle.v1.TMSignature.prototype.setEncodedTimestamp = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.base.oracle.v1.RequestsCountProof.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.base.oracle.v1.RequestsCountProof.prototype.toObject = function(opt_includeInstance) { + return proto.band.base.oracle.v1.RequestsCountProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.base.oracle.v1.RequestsCountProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.RequestsCountProof.toObject = function(includeInstance, msg) { + var f, obj = { + count: jspb.Message.getFieldWithDefault(msg, 1, 0), + version: jspb.Message.getFieldWithDefault(msg, 2, 0), + merklePathsList: jspb.Message.toObjectList(msg.getMerklePathsList(), + proto.band.base.oracle.v1.IAVLMerklePath.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.base.oracle.v1.RequestsCountProof} + */ +proto.band.base.oracle.v1.RequestsCountProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.base.oracle.v1.RequestsCountProof; + return proto.band.base.oracle.v1.RequestsCountProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.base.oracle.v1.RequestsCountProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.base.oracle.v1.RequestsCountProof} + */ +proto.band.base.oracle.v1.RequestsCountProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setVersion(value); + break; + case 3: + var value = new proto.band.base.oracle.v1.IAVLMerklePath; + reader.readMessage(value,proto.band.base.oracle.v1.IAVLMerklePath.deserializeBinaryFromReader); + msg.addMerklePaths(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.base.oracle.v1.RequestsCountProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.base.oracle.v1.RequestsCountProof.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.base.oracle.v1.RequestsCountProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.base.oracle.v1.RequestsCountProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getVersion(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getMerklePathsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.band.base.oracle.v1.IAVLMerklePath.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 count = 1; + * @return {number} + */ +proto.band.base.oracle.v1.RequestsCountProof.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.RequestsCountProof} returns this + */ +proto.band.base.oracle.v1.RequestsCountProof.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 version = 2; + * @return {number} + */ +proto.band.base.oracle.v1.RequestsCountProof.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.base.oracle.v1.RequestsCountProof} returns this + */ +proto.band.base.oracle.v1.RequestsCountProof.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated IAVLMerklePath merkle_paths = 3; + * @return {!Array} + */ +proto.band.base.oracle.v1.RequestsCountProof.prototype.getMerklePathsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.base.oracle.v1.IAVLMerklePath, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.base.oracle.v1.RequestsCountProof} returns this +*/ +proto.band.base.oracle.v1.RequestsCountProof.prototype.setMerklePathsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.band.base.oracle.v1.IAVLMerklePath=} opt_value + * @param {number=} opt_index + * @return {!proto.band.base.oracle.v1.IAVLMerklePath} + */ +proto.band.base.oracle.v1.RequestsCountProof.prototype.addMerklePaths = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.base.oracle.v1.IAVLMerklePath, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.base.oracle.v1.RequestsCountProof} returns this + */ +proto.band.base.oracle.v1.RequestsCountProof.prototype.clearMerklePathsList = function() { + return this.setMerklePathsList([]); +}; + + +goog.object.extend(exports, proto.band.base.oracle.v1); diff --git a/codegen/band/base/oracle/v1/proof_pb_service.d.ts b/codegen/band/base/oracle/v1/proof_pb_service.d.ts new file mode 100644 index 0000000..99d01cb --- /dev/null +++ b/codegen/band/base/oracle/v1/proof_pb_service.d.ts @@ -0,0 +1,101 @@ +// package: band.base.oracle.v1 +// file: band/base/oracle/v1/proof.proto + +import * as band_base_oracle_v1_proof_pb from "../../../../band/base/oracle/v1/proof_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type ServiceProof = { + readonly methodName: string; + readonly service: typeof Service; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_base_oracle_v1_proof_pb.ProofRequest; + readonly responseType: typeof band_base_oracle_v1_proof_pb.ProofResponse; +}; + +type ServiceMultiProof = { + readonly methodName: string; + readonly service: typeof Service; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_base_oracle_v1_proof_pb.MultiProofRequest; + readonly responseType: typeof band_base_oracle_v1_proof_pb.MultiProofResponse; +}; + +type ServiceRequestCountProof = { + readonly methodName: string; + readonly service: typeof Service; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_base_oracle_v1_proof_pb.RequestCountProofRequest; + readonly responseType: typeof band_base_oracle_v1_proof_pb.RequestCountProofResponse; +}; + +export class Service { + static readonly serviceName: string; + static readonly Proof: ServiceProof; + static readonly MultiProof: ServiceMultiProof; + static readonly RequestCountProof: ServiceRequestCountProof; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class ServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + proof( + requestMessage: band_base_oracle_v1_proof_pb.ProofRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_base_oracle_v1_proof_pb.ProofResponse|null) => void + ): UnaryResponse; + proof( + requestMessage: band_base_oracle_v1_proof_pb.ProofRequest, + callback: (error: ServiceError|null, responseMessage: band_base_oracle_v1_proof_pb.ProofResponse|null) => void + ): UnaryResponse; + multiProof( + requestMessage: band_base_oracle_v1_proof_pb.MultiProofRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_base_oracle_v1_proof_pb.MultiProofResponse|null) => void + ): UnaryResponse; + multiProof( + requestMessage: band_base_oracle_v1_proof_pb.MultiProofRequest, + callback: (error: ServiceError|null, responseMessage: band_base_oracle_v1_proof_pb.MultiProofResponse|null) => void + ): UnaryResponse; + requestCountProof( + requestMessage: band_base_oracle_v1_proof_pb.RequestCountProofRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_base_oracle_v1_proof_pb.RequestCountProofResponse|null) => void + ): UnaryResponse; + requestCountProof( + requestMessage: band_base_oracle_v1_proof_pb.RequestCountProofRequest, + callback: (error: ServiceError|null, responseMessage: band_base_oracle_v1_proof_pb.RequestCountProofResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/base/oracle/v1/proof_pb_service.js b/codegen/band/base/oracle/v1/proof_pb_service.js new file mode 100644 index 0000000..9b7460d --- /dev/null +++ b/codegen/band/base/oracle/v1/proof_pb_service.js @@ -0,0 +1,141 @@ +// package: band.base.oracle.v1 +// file: band/base/oracle/v1/proof.proto + +var band_base_oracle_v1_proof_pb = require("../../../../band/base/oracle/v1/proof_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Service = (function () { + function Service() {} + Service.serviceName = "band.base.oracle.v1.Service"; + return Service; +}()); + +Service.Proof = { + methodName: "Proof", + service: Service, + requestStream: false, + responseStream: false, + requestType: band_base_oracle_v1_proof_pb.ProofRequest, + responseType: band_base_oracle_v1_proof_pb.ProofResponse +}; + +Service.MultiProof = { + methodName: "MultiProof", + service: Service, + requestStream: false, + responseStream: false, + requestType: band_base_oracle_v1_proof_pb.MultiProofRequest, + responseType: band_base_oracle_v1_proof_pb.MultiProofResponse +}; + +Service.RequestCountProof = { + methodName: "RequestCountProof", + service: Service, + requestStream: false, + responseStream: false, + requestType: band_base_oracle_v1_proof_pb.RequestCountProofRequest, + responseType: band_base_oracle_v1_proof_pb.RequestCountProofResponse +}; + +exports.Service = Service; + +function ServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +ServiceClient.prototype.proof = function proof(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Service.Proof, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ServiceClient.prototype.multiProof = function multiProof(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Service.MultiProof, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ServiceClient.prototype.requestCountProof = function requestCountProof(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Service.RequestCountProof, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.ServiceClient = ServiceClient; + diff --git a/codegen/band/feeds/v1beta1/encoder.ts b/codegen/band/feeds/v1beta1/encoder.ts new file mode 100644 index 0000000..aa731a1 --- /dev/null +++ b/codegen/band/feeds/v1beta1/encoder.ts @@ -0,0 +1,14 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/feeds/v1beta1/encoder.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace band.feeds.v1beta1 { + export enum Encoder { + ENCODER_UNSPECIFIED = 0, + ENCODER_FIXED_POINT_ABI = 1, + ENCODER_TICK_ABI = 2 + } +} diff --git a/codegen/band/feeds/v1beta1/encoder_pb.d.ts b/codegen/band/feeds/v1beta1/encoder_pb.d.ts new file mode 100644 index 0000000..da5d781 --- /dev/null +++ b/codegen/band/feeds/v1beta1/encoder_pb.d.ts @@ -0,0 +1,14 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/encoder.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; + +export interface EncoderMap { + ENCODER_UNSPECIFIED: 0; + ENCODER_FIXED_POINT_ABI: 1; + ENCODER_TICK_ABI: 2; +} + +export const Encoder: EncoderMap; + diff --git a/codegen/band/feeds/v1beta1/encoder_pb.js b/codegen/band/feeds/v1beta1/encoder_pb.js new file mode 100644 index 0000000..8e08f94 --- /dev/null +++ b/codegen/band/feeds/v1beta1/encoder_pb.js @@ -0,0 +1,30 @@ +// source: band/feeds/v1beta1/encoder.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.band.feeds.v1beta1.Encoder', null, global); +/** + * @enum {number} + */ +proto.band.feeds.v1beta1.Encoder = { + ENCODER_UNSPECIFIED: 0, + ENCODER_FIXED_POINT_ABI: 1, + ENCODER_TICK_ABI: 2 +}; + +goog.object.extend(exports, proto.band.feeds.v1beta1); diff --git a/codegen/band/feeds/v1beta1/encoder_pb_service.d.ts b/codegen/band/feeds/v1beta1/encoder_pb_service.d.ts new file mode 100644 index 0000000..c15aeca --- /dev/null +++ b/codegen/band/feeds/v1beta1/encoder_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/encoder.proto + diff --git a/codegen/band/feeds/v1beta1/encoder_pb_service.js b/codegen/band/feeds/v1beta1/encoder_pb_service.js new file mode 100644 index 0000000..c15aeca --- /dev/null +++ b/codegen/band/feeds/v1beta1/encoder_pb_service.js @@ -0,0 +1,3 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/encoder.proto + diff --git a/codegen/band/feeds/v1beta1/feeds.ts b/codegen/band/feeds/v1beta1/feeds.ts new file mode 100644 index 0000000..bcc492e --- /dev/null +++ b/codegen/band/feeds/v1beta1/feeds.ts @@ -0,0 +1,1357 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/feeds/v1beta1/feeds.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../cosmos_proto/cosmos"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./encoder"; +import * as pb_1 from "google-protobuf"; +export namespace band.feeds.v1beta1 { + export enum PriceStatus { + PRICE_STATUS_UNSPECIFIED = 0, + PRICE_STATUS_UNKNOWN_SIGNAL_ID = 1, + PRICE_STATUS_NOT_READY = 2, + PRICE_STATUS_AVAILABLE = 3, + PRICE_STATUS_NOT_IN_CURRENT_FEEDS = 4 + } + export enum SignalPriceStatus { + SIGNAL_PRICE_STATUS_UNSPECIFIED = 0, + SIGNAL_PRICE_STATUS_UNSUPPORTED = 1, + SIGNAL_PRICE_STATUS_UNAVAILABLE = 2, + SIGNAL_PRICE_STATUS_AVAILABLE = 3 + } + export class Signal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + power?: 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 ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set power(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + power?: number; + }): Signal { + const message = new Signal({}); + if (data.id != null) { + message.id = data.id; + } + if (data.power != null) { + message.power = data.power; + } + return message; + } + toObject() { + const data: { + id?: string; + power?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.power != null) { + data.power = this.power; + } + 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.id.length) + writer.writeString(1, this.id); + if (this.power != 0) + writer.writeInt64(2, this.power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Signal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Signal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readString(); + break; + case 2: + message.power = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Signal { + return Signal.deserialize(bytes); + } + } + export class Vote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + voter?: string; + signals?: Signal[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("signals" in data && data.signals != undefined) { + this.signals = data.signals; + } + } + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get signals() { + return pb_1.Message.getRepeatedWrapperField(this, Signal, 2) as Signal[]; + } + set signals(value: Signal[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + voter?: string; + signals?: ReturnType[]; + }): Vote { + const message = new Vote({}); + if (data.voter != null) { + message.voter = data.voter; + } + if (data.signals != null) { + message.signals = data.signals.map(item => Signal.fromObject(item)); + } + return message; + } + toObject() { + const data: { + voter?: string; + signals?: ReturnType[]; + } = {}; + if (this.voter != null) { + data.voter = this.voter; + } + if (this.signals != null) { + data.signals = this.signals.map((item: Signal) => item.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.voter.length) + writer.writeString(1, this.voter); + if (this.signals.length) + writer.writeRepeatedMessage(2, this.signals, (item: Signal) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Vote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Vote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.voter = reader.readString(); + break; + case 2: + reader.readMessage(message.signals, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Signal.deserialize(reader), Signal)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Vote { + return Vote.deserialize(bytes); + } + } + export class Feed extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_id?: string; + power?: number; + interval?: 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 ("signal_id" in data && data.signal_id != undefined) { + this.signal_id = data.signal_id; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + if ("interval" in data && data.interval != undefined) { + this.interval = data.interval; + } + } + } + get signal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signal_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set power(value: number) { + pb_1.Message.setField(this, 2, value); + } + get interval() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set interval(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + signal_id?: string; + power?: number; + interval?: number; + }): Feed { + const message = new Feed({}); + if (data.signal_id != null) { + message.signal_id = data.signal_id; + } + if (data.power != null) { + message.power = data.power; + } + if (data.interval != null) { + message.interval = data.interval; + } + return message; + } + toObject() { + const data: { + signal_id?: string; + power?: number; + interval?: number; + } = {}; + if (this.signal_id != null) { + data.signal_id = this.signal_id; + } + if (this.power != null) { + data.power = this.power; + } + if (this.interval != null) { + data.interval = this.interval; + } + 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.signal_id.length) + writer.writeString(1, this.signal_id); + if (this.power != 0) + writer.writeInt64(2, this.power); + if (this.interval != 0) + writer.writeInt64(3, this.interval); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Feed { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Feed(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signal_id = reader.readString(); + break; + case 2: + message.power = reader.readInt64(); + break; + case 3: + message.interval = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Feed { + return Feed.deserialize(bytes); + } + } + export class FeedWithDeviation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_id?: string; + power?: number; + interval?: number; + deviation_basis_point?: 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 ("signal_id" in data && data.signal_id != undefined) { + this.signal_id = data.signal_id; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + if ("interval" in data && data.interval != undefined) { + this.interval = data.interval; + } + if ("deviation_basis_point" in data && data.deviation_basis_point != undefined) { + this.deviation_basis_point = data.deviation_basis_point; + } + } + } + get signal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signal_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set power(value: number) { + pb_1.Message.setField(this, 2, value); + } + get interval() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set interval(value: number) { + pb_1.Message.setField(this, 3, value); + } + get deviation_basis_point() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set deviation_basis_point(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + signal_id?: string; + power?: number; + interval?: number; + deviation_basis_point?: number; + }): FeedWithDeviation { + const message = new FeedWithDeviation({}); + if (data.signal_id != null) { + message.signal_id = data.signal_id; + } + if (data.power != null) { + message.power = data.power; + } + if (data.interval != null) { + message.interval = data.interval; + } + if (data.deviation_basis_point != null) { + message.deviation_basis_point = data.deviation_basis_point; + } + return message; + } + toObject() { + const data: { + signal_id?: string; + power?: number; + interval?: number; + deviation_basis_point?: number; + } = {}; + if (this.signal_id != null) { + data.signal_id = this.signal_id; + } + if (this.power != null) { + data.power = this.power; + } + if (this.interval != null) { + data.interval = this.interval; + } + if (this.deviation_basis_point != null) { + data.deviation_basis_point = this.deviation_basis_point; + } + 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.signal_id.length) + writer.writeString(1, this.signal_id); + if (this.power != 0) + writer.writeInt64(2, this.power); + if (this.interval != 0) + writer.writeInt64(3, this.interval); + if (this.deviation_basis_point != 0) + writer.writeInt64(4, this.deviation_basis_point); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FeedWithDeviation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FeedWithDeviation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signal_id = reader.readString(); + break; + case 2: + message.power = reader.readInt64(); + break; + case 3: + message.interval = reader.readInt64(); + break; + case 4: + message.deviation_basis_point = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FeedWithDeviation { + return FeedWithDeviation.deserialize(bytes); + } + } + export class CurrentFeeds extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + feeds?: Feed[]; + last_update_timestamp?: number; + last_update_block?: number; + }) { + 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 ("feeds" in data && data.feeds != undefined) { + this.feeds = data.feeds; + } + if ("last_update_timestamp" in data && data.last_update_timestamp != undefined) { + this.last_update_timestamp = data.last_update_timestamp; + } + if ("last_update_block" in data && data.last_update_block != undefined) { + this.last_update_block = data.last_update_block; + } + } + } + get feeds() { + return pb_1.Message.getRepeatedWrapperField(this, Feed, 1) as Feed[]; + } + set feeds(value: Feed[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get last_update_timestamp() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set last_update_timestamp(value: number) { + pb_1.Message.setField(this, 2, value); + } + get last_update_block() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set last_update_block(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + feeds?: ReturnType[]; + last_update_timestamp?: number; + last_update_block?: number; + }): CurrentFeeds { + const message = new CurrentFeeds({}); + if (data.feeds != null) { + message.feeds = data.feeds.map(item => Feed.fromObject(item)); + } + if (data.last_update_timestamp != null) { + message.last_update_timestamp = data.last_update_timestamp; + } + if (data.last_update_block != null) { + message.last_update_block = data.last_update_block; + } + return message; + } + toObject() { + const data: { + feeds?: ReturnType[]; + last_update_timestamp?: number; + last_update_block?: number; + } = {}; + if (this.feeds != null) { + data.feeds = this.feeds.map((item: Feed) => item.toObject()); + } + if (this.last_update_timestamp != null) { + data.last_update_timestamp = this.last_update_timestamp; + } + if (this.last_update_block != null) { + data.last_update_block = this.last_update_block; + } + 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.feeds.length) + writer.writeRepeatedMessage(1, this.feeds, (item: Feed) => item.serialize(writer)); + if (this.last_update_timestamp != 0) + writer.writeInt64(2, this.last_update_timestamp); + if (this.last_update_block != 0) + writer.writeInt64(3, this.last_update_block); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CurrentFeeds { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CurrentFeeds(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.feeds, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Feed.deserialize(reader), Feed)); + break; + case 2: + message.last_update_timestamp = reader.readInt64(); + break; + case 3: + message.last_update_block = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CurrentFeeds { + return CurrentFeeds.deserialize(bytes); + } + } + export class CurrentFeedWithDeviations extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + feeds?: FeedWithDeviation[]; + last_update_timestamp?: number; + last_update_block?: number; + }) { + 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 ("feeds" in data && data.feeds != undefined) { + this.feeds = data.feeds; + } + if ("last_update_timestamp" in data && data.last_update_timestamp != undefined) { + this.last_update_timestamp = data.last_update_timestamp; + } + if ("last_update_block" in data && data.last_update_block != undefined) { + this.last_update_block = data.last_update_block; + } + } + } + get feeds() { + return pb_1.Message.getRepeatedWrapperField(this, FeedWithDeviation, 1) as FeedWithDeviation[]; + } + set feeds(value: FeedWithDeviation[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get last_update_timestamp() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set last_update_timestamp(value: number) { + pb_1.Message.setField(this, 2, value); + } + get last_update_block() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set last_update_block(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + feeds?: ReturnType[]; + last_update_timestamp?: number; + last_update_block?: number; + }): CurrentFeedWithDeviations { + const message = new CurrentFeedWithDeviations({}); + if (data.feeds != null) { + message.feeds = data.feeds.map(item => FeedWithDeviation.fromObject(item)); + } + if (data.last_update_timestamp != null) { + message.last_update_timestamp = data.last_update_timestamp; + } + if (data.last_update_block != null) { + message.last_update_block = data.last_update_block; + } + return message; + } + toObject() { + const data: { + feeds?: ReturnType[]; + last_update_timestamp?: number; + last_update_block?: number; + } = {}; + if (this.feeds != null) { + data.feeds = this.feeds.map((item: FeedWithDeviation) => item.toObject()); + } + if (this.last_update_timestamp != null) { + data.last_update_timestamp = this.last_update_timestamp; + } + if (this.last_update_block != null) { + data.last_update_block = this.last_update_block; + } + 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.feeds.length) + writer.writeRepeatedMessage(1, this.feeds, (item: FeedWithDeviation) => item.serialize(writer)); + if (this.last_update_timestamp != 0) + writer.writeInt64(2, this.last_update_timestamp); + if (this.last_update_block != 0) + writer.writeInt64(3, this.last_update_block); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CurrentFeedWithDeviations { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CurrentFeedWithDeviations(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.feeds, () => pb_1.Message.addToRepeatedWrapperField(message, 1, FeedWithDeviation.deserialize(reader), FeedWithDeviation)); + break; + case 2: + message.last_update_timestamp = reader.readInt64(); + break; + case 3: + message.last_update_block = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CurrentFeedWithDeviations { + return CurrentFeedWithDeviations.deserialize(bytes); + } + } + export class Price extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + status?: PriceStatus; + signal_id?: string; + price?: number; + timestamp?: 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 ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("signal_id" in data && data.signal_id != undefined) { + this.signal_id = data.signal_id; + } + if ("price" in data && data.price != undefined) { + this.price = data.price; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 1, PriceStatus.PRICE_STATUS_UNSPECIFIED) as PriceStatus; + } + set status(value: PriceStatus) { + pb_1.Message.setField(this, 1, value); + } + get signal_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set signal_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get price() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set price(value: number) { + pb_1.Message.setField(this, 3, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + status?: PriceStatus; + signal_id?: string; + price?: number; + timestamp?: number; + }): Price { + const message = new Price({}); + if (data.status != null) { + message.status = data.status; + } + if (data.signal_id != null) { + message.signal_id = data.signal_id; + } + if (data.price != null) { + message.price = data.price; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + return message; + } + toObject() { + const data: { + status?: PriceStatus; + signal_id?: string; + price?: number; + timestamp?: number; + } = {}; + if (this.status != null) { + data.status = this.status; + } + if (this.signal_id != null) { + data.signal_id = this.signal_id; + } + if (this.price != null) { + data.price = this.price; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + 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.status != PriceStatus.PRICE_STATUS_UNSPECIFIED) + writer.writeEnum(1, this.status); + if (this.signal_id.length) + writer.writeString(2, this.signal_id); + if (this.price != 0) + writer.writeUint64(3, this.price); + if (this.timestamp != 0) + writer.writeInt64(4, this.timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Price { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Price(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.status = reader.readEnum(); + break; + case 2: + message.signal_id = reader.readString(); + break; + case 3: + message.price = reader.readUint64(); + break; + case 4: + message.timestamp = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Price { + return Price.deserialize(bytes); + } + } + export class SignalPrice extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + status?: SignalPriceStatus; + signal_id?: string; + price?: 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 ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("signal_id" in data && data.signal_id != undefined) { + this.signal_id = data.signal_id; + } + if ("price" in data && data.price != undefined) { + this.price = data.price; + } + } + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 1, SignalPriceStatus.SIGNAL_PRICE_STATUS_UNSPECIFIED) as SignalPriceStatus; + } + set status(value: SignalPriceStatus) { + pb_1.Message.setField(this, 1, value); + } + get signal_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set signal_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get price() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set price(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + status?: SignalPriceStatus; + signal_id?: string; + price?: number; + }): SignalPrice { + const message = new SignalPrice({}); + if (data.status != null) { + message.status = data.status; + } + if (data.signal_id != null) { + message.signal_id = data.signal_id; + } + if (data.price != null) { + message.price = data.price; + } + return message; + } + toObject() { + const data: { + status?: SignalPriceStatus; + signal_id?: string; + price?: number; + } = {}; + if (this.status != null) { + data.status = this.status; + } + if (this.signal_id != null) { + data.signal_id = this.signal_id; + } + if (this.price != null) { + data.price = this.price; + } + 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.status != SignalPriceStatus.SIGNAL_PRICE_STATUS_UNSPECIFIED) + writer.writeEnum(1, this.status); + if (this.signal_id.length) + writer.writeString(2, this.signal_id); + if (this.price != 0) + writer.writeUint64(3, this.price); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignalPrice { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignalPrice(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.status = reader.readEnum(); + break; + case 2: + message.signal_id = reader.readString(); + break; + case 3: + message.price = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignalPrice { + return SignalPrice.deserialize(bytes); + } + } + export class ValidatorPrice extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_price_status?: SignalPriceStatus; + signal_id?: string; + price?: number; + timestamp?: number; + block_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 ("signal_price_status" in data && data.signal_price_status != undefined) { + this.signal_price_status = data.signal_price_status; + } + if ("signal_id" in data && data.signal_id != undefined) { + this.signal_id = data.signal_id; + } + if ("price" in data && data.price != undefined) { + this.price = data.price; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("block_height" in data && data.block_height != undefined) { + this.block_height = data.block_height; + } + } + } + get signal_price_status() { + return pb_1.Message.getFieldWithDefault(this, 1, SignalPriceStatus.SIGNAL_PRICE_STATUS_UNSPECIFIED) as SignalPriceStatus; + } + set signal_price_status(value: SignalPriceStatus) { + pb_1.Message.setField(this, 1, value); + } + get signal_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set signal_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get price() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set price(value: number) { + pb_1.Message.setField(this, 3, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 4, value); + } + get block_height() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set block_height(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + signal_price_status?: SignalPriceStatus; + signal_id?: string; + price?: number; + timestamp?: number; + block_height?: number; + }): ValidatorPrice { + const message = new ValidatorPrice({}); + if (data.signal_price_status != null) { + message.signal_price_status = data.signal_price_status; + } + if (data.signal_id != null) { + message.signal_id = data.signal_id; + } + if (data.price != null) { + message.price = data.price; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + if (data.block_height != null) { + message.block_height = data.block_height; + } + return message; + } + toObject() { + const data: { + signal_price_status?: SignalPriceStatus; + signal_id?: string; + price?: number; + timestamp?: number; + block_height?: number; + } = {}; + if (this.signal_price_status != null) { + data.signal_price_status = this.signal_price_status; + } + if (this.signal_id != null) { + data.signal_id = this.signal_id; + } + if (this.price != null) { + data.price = this.price; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + if (this.block_height != null) { + data.block_height = this.block_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.signal_price_status != SignalPriceStatus.SIGNAL_PRICE_STATUS_UNSPECIFIED) + writer.writeEnum(1, this.signal_price_status); + if (this.signal_id.length) + writer.writeString(2, this.signal_id); + if (this.price != 0) + writer.writeUint64(3, this.price); + if (this.timestamp != 0) + writer.writeInt64(4, this.timestamp); + if (this.block_height != 0) + writer.writeInt64(5, this.block_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorPrice { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorPrice(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signal_price_status = reader.readEnum(); + break; + case 2: + message.signal_id = reader.readString(); + break; + case 3: + message.price = reader.readUint64(); + break; + case 4: + message.timestamp = reader.readInt64(); + break; + case 5: + message.block_height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorPrice { + return ValidatorPrice.deserialize(bytes); + } + } + export class ValidatorPriceList extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: string; + validator_prices?: ValidatorPrice[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("validator_prices" in data && data.validator_prices != undefined) { + this.validator_prices = data.validator_prices; + } + } + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_prices() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorPrice, 2) as ValidatorPrice[]; + } + set validator_prices(value: ValidatorPrice[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + validator?: string; + validator_prices?: ReturnType[]; + }): ValidatorPriceList { + const message = new ValidatorPriceList({}); + if (data.validator != null) { + message.validator = data.validator; + } + if (data.validator_prices != null) { + message.validator_prices = data.validator_prices.map(item => ValidatorPrice.fromObject(item)); + } + return message; + } + toObject() { + const data: { + validator?: string; + validator_prices?: ReturnType[]; + } = {}; + if (this.validator != null) { + data.validator = this.validator; + } + if (this.validator_prices != null) { + data.validator_prices = this.validator_prices.map((item: ValidatorPrice) => item.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.validator.length) + writer.writeString(1, this.validator); + if (this.validator_prices.length) + writer.writeRepeatedMessage(2, this.validator_prices, (item: ValidatorPrice) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorPriceList { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorPriceList(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator = reader.readString(); + break; + case 2: + reader.readMessage(message.validator_prices, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ValidatorPrice.deserialize(reader), ValidatorPrice)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorPriceList { + return ValidatorPriceList.deserialize(bytes); + } + } + export class ReferenceSourceConfig extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + registry_ipfs_hash?: string; + registry_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 ("registry_ipfs_hash" in data && data.registry_ipfs_hash != undefined) { + this.registry_ipfs_hash = data.registry_ipfs_hash; + } + if ("registry_version" in data && data.registry_version != undefined) { + this.registry_version = data.registry_version; + } + } + } + get registry_ipfs_hash() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set registry_ipfs_hash(value: string) { + pb_1.Message.setField(this, 1, value); + } + get registry_version() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set registry_version(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + registry_ipfs_hash?: string; + registry_version?: string; + }): ReferenceSourceConfig { + const message = new ReferenceSourceConfig({}); + if (data.registry_ipfs_hash != null) { + message.registry_ipfs_hash = data.registry_ipfs_hash; + } + if (data.registry_version != null) { + message.registry_version = data.registry_version; + } + return message; + } + toObject() { + const data: { + registry_ipfs_hash?: string; + registry_version?: string; + } = {}; + if (this.registry_ipfs_hash != null) { + data.registry_ipfs_hash = this.registry_ipfs_hash; + } + if (this.registry_version != null) { + data.registry_version = this.registry_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.registry_ipfs_hash.length) + writer.writeString(1, this.registry_ipfs_hash); + if (this.registry_version.length) + writer.writeString(2, this.registry_version); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ReferenceSourceConfig { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ReferenceSourceConfig(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.registry_ipfs_hash = reader.readString(); + break; + case 2: + message.registry_version = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ReferenceSourceConfig { + return ReferenceSourceConfig.deserialize(bytes); + } + } + export class FeedsSignatureOrder extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_ids?: string[]; + encoder?: dependency_3.band.feeds.v1beta1.Encoder; + }) { + 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 ("signal_ids" in data && data.signal_ids != undefined) { + this.signal_ids = data.signal_ids; + } + if ("encoder" in data && data.encoder != undefined) { + this.encoder = data.encoder; + } + } + } + get signal_ids() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set signal_ids(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get encoder() { + return pb_1.Message.getFieldWithDefault(this, 2, dependency_3.band.feeds.v1beta1.Encoder.ENCODER_UNSPECIFIED) as dependency_3.band.feeds.v1beta1.Encoder; + } + set encoder(value: dependency_3.band.feeds.v1beta1.Encoder) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + signal_ids?: string[]; + encoder?: dependency_3.band.feeds.v1beta1.Encoder; + }): FeedsSignatureOrder { + const message = new FeedsSignatureOrder({}); + if (data.signal_ids != null) { + message.signal_ids = data.signal_ids; + } + if (data.encoder != null) { + message.encoder = data.encoder; + } + return message; + } + toObject() { + const data: { + signal_ids?: string[]; + encoder?: dependency_3.band.feeds.v1beta1.Encoder; + } = {}; + if (this.signal_ids != null) { + data.signal_ids = this.signal_ids; + } + if (this.encoder != null) { + data.encoder = this.encoder; + } + 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.signal_ids.length) + writer.writeRepeatedString(1, this.signal_ids); + if (this.encoder != dependency_3.band.feeds.v1beta1.Encoder.ENCODER_UNSPECIFIED) + writer.writeEnum(2, this.encoder); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FeedsSignatureOrder { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FeedsSignatureOrder(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + message.encoder = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FeedsSignatureOrder { + return FeedsSignatureOrder.deserialize(bytes); + } + } +} diff --git a/proto/feeds/v1beta1/feeds_pb.d.ts b/codegen/band/feeds/v1beta1/feeds_pb.d.ts similarity index 76% rename from proto/feeds/v1beta1/feeds_pb.d.ts rename to codegen/band/feeds/v1beta1/feeds_pb.d.ts index b74d9df..d68a6b8 100644 --- a/proto/feeds/v1beta1/feeds_pb.d.ts +++ b/codegen/band/feeds/v1beta1/feeds_pb.d.ts @@ -1,9 +1,10 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/feeds.proto +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/feeds.proto import * as jspb from "google-protobuf"; -import * as cosmos_proto_cosmos_pb from "../../cosmos_proto/cosmos_pb"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as band_feeds_v1beta1_encoder_pb from "../../../band/feeds/v1beta1/encoder_pb"; export class Signal extends jspb.Message { getId(): string; @@ -29,9 +30,9 @@ export namespace Signal { } } -export class DelegatorSignals extends jspb.Message { - getDelegator(): string; - setDelegator(value: string): void; +export class Vote extends jspb.Message { + getVoter(): string; + setVoter(value: string): void; clearSignalsList(): void; getSignalsList(): Array; @@ -39,18 +40,18 @@ export class DelegatorSignals extends jspb.Message { addSignals(value?: Signal, index?: number): Signal; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DelegatorSignals.AsObject; - static toObject(includeInstance: boolean, msg: DelegatorSignals): DelegatorSignals.AsObject; + toObject(includeInstance?: boolean): Vote.AsObject; + static toObject(includeInstance: boolean, msg: Vote): Vote.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DelegatorSignals, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DelegatorSignals; - static deserializeBinaryFromReader(message: DelegatorSignals, reader: jspb.BinaryReader): DelegatorSignals; + static serializeBinaryToWriter(message: Vote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Vote; + static deserializeBinaryFromReader(message: Vote, reader: jspb.BinaryReader): Vote; } -export namespace DelegatorSignals { +export namespace Vote { export type AsObject = { - delegator: string, + voter: string, signalsList: Array, } } @@ -176,8 +177,8 @@ export namespace CurrentFeedWithDeviations { } export class Price extends jspb.Message { - getPriceStatus(): PriceStatusMap[keyof PriceStatusMap]; - setPriceStatus(value: PriceStatusMap[keyof PriceStatusMap]): void; + getStatus(): PriceStatusMap[keyof PriceStatusMap]; + setStatus(value: PriceStatusMap[keyof PriceStatusMap]): void; getSignalId(): string; setSignalId(value: string): void; @@ -200,7 +201,7 @@ export class Price extends jspb.Message { export namespace Price { export type AsObject = { - priceStatus: PriceStatusMap[keyof PriceStatusMap], + status: PriceStatusMap[keyof PriceStatusMap], signalId: string, price: number, timestamp: number, @@ -208,8 +209,8 @@ export namespace Price { } export class SignalPrice extends jspb.Message { - getPriceStatus(): PriceStatusMap[keyof PriceStatusMap]; - setPriceStatus(value: PriceStatusMap[keyof PriceStatusMap]): void; + getStatus(): SignalPriceStatusMap[keyof SignalPriceStatusMap]; + setStatus(value: SignalPriceStatusMap[keyof SignalPriceStatusMap]): void; getSignalId(): string; setSignalId(value: string): void; @@ -229,18 +230,15 @@ export class SignalPrice extends jspb.Message { export namespace SignalPrice { export type AsObject = { - priceStatus: PriceStatusMap[keyof PriceStatusMap], + status: SignalPriceStatusMap[keyof SignalPriceStatusMap], signalId: string, price: number, } } export class ValidatorPrice extends jspb.Message { - getPriceStatus(): PriceStatusMap[keyof PriceStatusMap]; - setPriceStatus(value: PriceStatusMap[keyof PriceStatusMap]): void; - - getValidator(): string; - setValidator(value: string): void; + getSignalPriceStatus(): SignalPriceStatusMap[keyof SignalPriceStatusMap]; + setSignalPriceStatus(value: SignalPriceStatusMap[keyof SignalPriceStatusMap]): void; getSignalId(): string; setSignalId(value: string): void; @@ -266,8 +264,7 @@ export class ValidatorPrice extends jspb.Message { export namespace ValidatorPrice { export type AsObject = { - priceStatus: PriceStatusMap[keyof PriceStatusMap], - validator: string, + signalPriceStatus: SignalPriceStatusMap[keyof SignalPriceStatusMap], signalId: string, price: number, timestamp: number, @@ -302,11 +299,11 @@ export namespace ValidatorPriceList { } export class ReferenceSourceConfig extends jspb.Message { - getIpfsHash(): string; - setIpfsHash(value: string): void; + getRegistryIpfsHash(): string; + setRegistryIpfsHash(value: string): void; - getVersion(): string; - setVersion(value: string): void; + getRegistryVersion(): string; + setRegistryVersion(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ReferenceSourceConfig.AsObject; @@ -320,17 +317,53 @@ export class ReferenceSourceConfig extends jspb.Message { export namespace ReferenceSourceConfig { export type AsObject = { - ipfsHash: string, - version: string, + registryIpfsHash: string, + registryVersion: string, + } +} + +export class FeedsSignatureOrder extends jspb.Message { + clearSignalIdsList(): void; + getSignalIdsList(): Array; + setSignalIdsList(value: Array): void; + addSignalIds(value: string, index?: number): string; + + getEncoder(): band_feeds_v1beta1_encoder_pb.EncoderMap[keyof band_feeds_v1beta1_encoder_pb.EncoderMap]; + setEncoder(value: band_feeds_v1beta1_encoder_pb.EncoderMap[keyof band_feeds_v1beta1_encoder_pb.EncoderMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeedsSignatureOrder.AsObject; + static toObject(includeInstance: boolean, msg: FeedsSignatureOrder): FeedsSignatureOrder.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FeedsSignatureOrder, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FeedsSignatureOrder; + static deserializeBinaryFromReader(message: FeedsSignatureOrder, reader: jspb.BinaryReader): FeedsSignatureOrder; +} + +export namespace FeedsSignatureOrder { + export type AsObject = { + signalIdsList: Array, + encoder: band_feeds_v1beta1_encoder_pb.EncoderMap[keyof band_feeds_v1beta1_encoder_pb.EncoderMap], } } export interface PriceStatusMap { PRICE_STATUS_UNSPECIFIED: 0; - PRICE_STATUS_UNSUPPORTED: 1; - PRICE_STATUS_UNAVAILABLE: 2; + PRICE_STATUS_UNKNOWN_SIGNAL_ID: 1; + PRICE_STATUS_NOT_READY: 2; PRICE_STATUS_AVAILABLE: 3; + PRICE_STATUS_NOT_IN_CURRENT_FEEDS: 4; } export const PriceStatus: PriceStatusMap; +export interface SignalPriceStatusMap { + SIGNAL_PRICE_STATUS_UNSPECIFIED: 0; + SIGNAL_PRICE_STATUS_UNSUPPORTED: 1; + SIGNAL_PRICE_STATUS_UNAVAILABLE: 2; + SIGNAL_PRICE_STATUS_AVAILABLE: 3; +} + +export const SignalPriceStatus: SignalPriceStatusMap; + diff --git a/proto/feeds/v1beta1/feeds_pb.js b/codegen/band/feeds/v1beta1/feeds_pb.js similarity index 55% rename from proto/feeds/v1beta1/feeds_pb.js rename to codegen/band/feeds/v1beta1/feeds_pb.js index 970c0b0..f48fc19 100644 --- a/proto/feeds/v1beta1/feeds_pb.js +++ b/codegen/band/feeds/v1beta1/feeds_pb.js @@ -1,4 +1,4 @@ -// source: feeds/v1beta1/feeds.proto +// source: band/feeds/v1beta1/feeds.proto /** * @fileoverview * @enhanceable @@ -13,30 +13,28 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js'); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -goog.exportSymbol('proto.feeds.v1beta1.CurrentFeedWithDeviations', null, global); -goog.exportSymbol('proto.feeds.v1beta1.CurrentFeeds', null, global); -goog.exportSymbol('proto.feeds.v1beta1.DelegatorSignals', null, global); -goog.exportSymbol('proto.feeds.v1beta1.Feed', null, global); -goog.exportSymbol('proto.feeds.v1beta1.FeedWithDeviation', null, global); -goog.exportSymbol('proto.feeds.v1beta1.Price', null, global); -goog.exportSymbol('proto.feeds.v1beta1.PriceStatus', null, global); -goog.exportSymbol('proto.feeds.v1beta1.ReferenceSourceConfig', null, global); -goog.exportSymbol('proto.feeds.v1beta1.Signal', null, global); -goog.exportSymbol('proto.feeds.v1beta1.SignalPrice', null, global); -goog.exportSymbol('proto.feeds.v1beta1.ValidatorPrice', null, global); -goog.exportSymbol('proto.feeds.v1beta1.ValidatorPriceList', null, global); +var band_feeds_v1beta1_encoder_pb = require('../../../band/feeds/v1beta1/encoder_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_encoder_pb); +goog.exportSymbol('proto.band.feeds.v1beta1.CurrentFeedWithDeviations', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.CurrentFeeds', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.Feed', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.FeedWithDeviation', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.FeedsSignatureOrder', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.Price', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.PriceStatus', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.ReferenceSourceConfig', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.Signal', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.SignalPrice', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.SignalPriceStatus', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.ValidatorPrice', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.ValidatorPriceList', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.Vote', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -47,16 +45,16 @@ goog.exportSymbol('proto.feeds.v1beta1.ValidatorPriceList', null, global); * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.Signal = function(opt_data) { +proto.band.feeds.v1beta1.Signal = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.Signal, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.Signal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.Signal.displayName = 'proto.feeds.v1beta1.Signal'; + proto.band.feeds.v1beta1.Signal.displayName = 'proto.band.feeds.v1beta1.Signal'; } /** * Generated by JsPbCodeGenerator. @@ -68,16 +66,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.DelegatorSignals = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.DelegatorSignals.repeatedFields_, null); +proto.band.feeds.v1beta1.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.Vote.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.DelegatorSignals, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.Vote, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.DelegatorSignals.displayName = 'proto.feeds.v1beta1.DelegatorSignals'; + proto.band.feeds.v1beta1.Vote.displayName = 'proto.band.feeds.v1beta1.Vote'; } /** * Generated by JsPbCodeGenerator. @@ -89,16 +87,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.Feed = function(opt_data) { +proto.band.feeds.v1beta1.Feed = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.Feed, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.Feed, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.Feed.displayName = 'proto.feeds.v1beta1.Feed'; + proto.band.feeds.v1beta1.Feed.displayName = 'proto.band.feeds.v1beta1.Feed'; } /** * Generated by JsPbCodeGenerator. @@ -110,16 +108,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.FeedWithDeviation = function(opt_data) { +proto.band.feeds.v1beta1.FeedWithDeviation = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.FeedWithDeviation, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.FeedWithDeviation, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.FeedWithDeviation.displayName = 'proto.feeds.v1beta1.FeedWithDeviation'; + proto.band.feeds.v1beta1.FeedWithDeviation.displayName = 'proto.band.feeds.v1beta1.FeedWithDeviation'; } /** * Generated by JsPbCodeGenerator. @@ -131,16 +129,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.CurrentFeeds = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.CurrentFeeds.repeatedFields_, null); +proto.band.feeds.v1beta1.CurrentFeeds = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.CurrentFeeds.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.CurrentFeeds, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.CurrentFeeds, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.CurrentFeeds.displayName = 'proto.feeds.v1beta1.CurrentFeeds'; + proto.band.feeds.v1beta1.CurrentFeeds.displayName = 'proto.band.feeds.v1beta1.CurrentFeeds'; } /** * Generated by JsPbCodeGenerator. @@ -152,16 +150,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.CurrentFeedWithDeviations = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.CurrentFeedWithDeviations.repeatedFields_, null); +proto.band.feeds.v1beta1.CurrentFeedWithDeviations = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.CurrentFeedWithDeviations.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.CurrentFeedWithDeviations, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.CurrentFeedWithDeviations, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.CurrentFeedWithDeviations.displayName = 'proto.feeds.v1beta1.CurrentFeedWithDeviations'; + proto.band.feeds.v1beta1.CurrentFeedWithDeviations.displayName = 'proto.band.feeds.v1beta1.CurrentFeedWithDeviations'; } /** * Generated by JsPbCodeGenerator. @@ -173,16 +171,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.Price = function(opt_data) { +proto.band.feeds.v1beta1.Price = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.Price, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.Price, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.Price.displayName = 'proto.feeds.v1beta1.Price'; + proto.band.feeds.v1beta1.Price.displayName = 'proto.band.feeds.v1beta1.Price'; } /** * Generated by JsPbCodeGenerator. @@ -194,16 +192,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.SignalPrice = function(opt_data) { +proto.band.feeds.v1beta1.SignalPrice = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.SignalPrice, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.SignalPrice, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.SignalPrice.displayName = 'proto.feeds.v1beta1.SignalPrice'; + proto.band.feeds.v1beta1.SignalPrice.displayName = 'proto.band.feeds.v1beta1.SignalPrice'; } /** * Generated by JsPbCodeGenerator. @@ -215,16 +213,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.ValidatorPrice = function(opt_data) { +proto.band.feeds.v1beta1.ValidatorPrice = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.ValidatorPrice, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.ValidatorPrice, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.ValidatorPrice.displayName = 'proto.feeds.v1beta1.ValidatorPrice'; + proto.band.feeds.v1beta1.ValidatorPrice.displayName = 'proto.band.feeds.v1beta1.ValidatorPrice'; } /** * Generated by JsPbCodeGenerator. @@ -236,16 +234,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.ValidatorPriceList = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.ValidatorPriceList.repeatedFields_, null); +proto.band.feeds.v1beta1.ValidatorPriceList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.ValidatorPriceList.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.ValidatorPriceList, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.ValidatorPriceList, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.ValidatorPriceList.displayName = 'proto.feeds.v1beta1.ValidatorPriceList'; + proto.band.feeds.v1beta1.ValidatorPriceList.displayName = 'proto.band.feeds.v1beta1.ValidatorPriceList'; } /** * Generated by JsPbCodeGenerator. @@ -257,16 +255,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.ReferenceSourceConfig = function(opt_data) { +proto.band.feeds.v1beta1.ReferenceSourceConfig = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.ReferenceSourceConfig, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.ReferenceSourceConfig, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.ReferenceSourceConfig.displayName = 'proto.feeds.v1beta1.ReferenceSourceConfig'; + proto.band.feeds.v1beta1.ReferenceSourceConfig.displayName = 'proto.band.feeds.v1beta1.ReferenceSourceConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.FeedsSignatureOrder.repeatedFields_, null); +}; +goog.inherits(proto.band.feeds.v1beta1.FeedsSignatureOrder, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.feeds.v1beta1.FeedsSignatureOrder.displayName = 'proto.band.feeds.v1beta1.FeedsSignatureOrder'; } @@ -284,8 +303,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.Signal.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.Signal.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.Signal.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.Signal.toObject(opt_includeInstance, this); }; @@ -294,11 +313,11 @@ proto.feeds.v1beta1.Signal.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.Signal} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.Signal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.Signal.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.Signal.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), power: jspb.Message.getFieldWithDefault(msg, 2, 0) @@ -315,23 +334,23 @@ proto.feeds.v1beta1.Signal.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.Signal} + * @return {!proto.band.feeds.v1beta1.Signal} */ -proto.feeds.v1beta1.Signal.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.Signal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.Signal; - return proto.feeds.v1beta1.Signal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.Signal; + return proto.band.feeds.v1beta1.Signal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.Signal} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.Signal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.Signal} + * @return {!proto.band.feeds.v1beta1.Signal} */ -proto.feeds.v1beta1.Signal.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.Signal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -359,9 +378,9 @@ proto.feeds.v1beta1.Signal.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.Signal.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.Signal.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.Signal.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.Signal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -369,11 +388,11 @@ proto.feeds.v1beta1.Signal.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.Signal} message + * @param {!proto.band.feeds.v1beta1.Signal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.Signal.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.Signal.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { @@ -396,16 +415,16 @@ proto.feeds.v1beta1.Signal.serializeBinaryToWriter = function(message, writer) { * optional string id = 1; * @return {string} */ -proto.feeds.v1beta1.Signal.prototype.getId = function() { +proto.band.feeds.v1beta1.Signal.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.Signal} returns this + * @return {!proto.band.feeds.v1beta1.Signal} returns this */ -proto.feeds.v1beta1.Signal.prototype.setId = function(value) { +proto.band.feeds.v1beta1.Signal.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -414,16 +433,16 @@ proto.feeds.v1beta1.Signal.prototype.setId = function(value) { * optional int64 power = 2; * @return {number} */ -proto.feeds.v1beta1.Signal.prototype.getPower = function() { +proto.band.feeds.v1beta1.Signal.prototype.getPower = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Signal} returns this + * @return {!proto.band.feeds.v1beta1.Signal} returns this */ -proto.feeds.v1beta1.Signal.prototype.setPower = function(value) { +proto.band.feeds.v1beta1.Signal.prototype.setPower = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; @@ -434,7 +453,7 @@ proto.feeds.v1beta1.Signal.prototype.setPower = function(value) { * @private {!Array} * @const */ -proto.feeds.v1beta1.DelegatorSignals.repeatedFields_ = [2]; +proto.band.feeds.v1beta1.Vote.repeatedFields_ = [2]; @@ -451,8 +470,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.DelegatorSignals.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.DelegatorSignals.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.Vote.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.Vote.toObject(opt_includeInstance, this); }; @@ -461,15 +480,15 @@ proto.feeds.v1beta1.DelegatorSignals.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.DelegatorSignals} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.Vote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.DelegatorSignals.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.Vote.toObject = function(includeInstance, msg) { var f, obj = { - delegator: jspb.Message.getFieldWithDefault(msg, 1, ""), + voter: jspb.Message.getFieldWithDefault(msg, 1, ""), signalsList: jspb.Message.toObjectList(msg.getSignalsList(), - proto.feeds.v1beta1.Signal.toObject, includeInstance) + proto.band.feeds.v1beta1.Signal.toObject, includeInstance) }; if (includeInstance) { @@ -483,23 +502,23 @@ proto.feeds.v1beta1.DelegatorSignals.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.DelegatorSignals} + * @return {!proto.band.feeds.v1beta1.Vote} */ -proto.feeds.v1beta1.DelegatorSignals.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.Vote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.DelegatorSignals; - return proto.feeds.v1beta1.DelegatorSignals.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.Vote; + return proto.band.feeds.v1beta1.Vote.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.DelegatorSignals} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.Vote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.DelegatorSignals} + * @return {!proto.band.feeds.v1beta1.Vote} */ -proto.feeds.v1beta1.DelegatorSignals.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.Vote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -508,11 +527,11 @@ proto.feeds.v1beta1.DelegatorSignals.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setDelegator(value); + msg.setVoter(value); break; case 2: - var value = new proto.feeds.v1beta1.Signal; - reader.readMessage(value,proto.feeds.v1beta1.Signal.deserializeBinaryFromReader); + var value = new proto.band.feeds.v1beta1.Signal; + reader.readMessage(value,proto.band.feeds.v1beta1.Signal.deserializeBinaryFromReader); msg.addSignals(value); break; default: @@ -528,9 +547,9 @@ proto.feeds.v1beta1.DelegatorSignals.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.DelegatorSignals.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.Vote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.DelegatorSignals.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.Vote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -538,13 +557,13 @@ proto.feeds.v1beta1.DelegatorSignals.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.DelegatorSignals} message + * @param {!proto.band.feeds.v1beta1.Vote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.DelegatorSignals.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.Vote.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDelegator(); + f = message.getVoter(); if (f.length > 0) { writer.writeString( 1, @@ -556,64 +575,64 @@ proto.feeds.v1beta1.DelegatorSignals.serializeBinaryToWriter = function(message, writer.writeRepeatedMessage( 2, f, - proto.feeds.v1beta1.Signal.serializeBinaryToWriter + proto.band.feeds.v1beta1.Signal.serializeBinaryToWriter ); } }; /** - * optional string delegator = 1; + * optional string voter = 1; * @return {string} */ -proto.feeds.v1beta1.DelegatorSignals.prototype.getDelegator = function() { +proto.band.feeds.v1beta1.Vote.prototype.getVoter = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.DelegatorSignals} returns this + * @return {!proto.band.feeds.v1beta1.Vote} returns this */ -proto.feeds.v1beta1.DelegatorSignals.prototype.setDelegator = function(value) { +proto.band.feeds.v1beta1.Vote.prototype.setVoter = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated Signal signals = 2; - * @return {!Array} + * @return {!Array} */ -proto.feeds.v1beta1.DelegatorSignals.prototype.getSignalsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.feeds.v1beta1.Signal, 2)); +proto.band.feeds.v1beta1.Vote.prototype.getSignalsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.feeds.v1beta1.Signal, 2)); }; /** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.DelegatorSignals} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.Vote} returns this */ -proto.feeds.v1beta1.DelegatorSignals.prototype.setSignalsList = function(value) { +proto.band.feeds.v1beta1.Vote.prototype.setSignalsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {!proto.feeds.v1beta1.Signal=} opt_value + * @param {!proto.band.feeds.v1beta1.Signal=} opt_value * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.Signal} + * @return {!proto.band.feeds.v1beta1.Signal} */ -proto.feeds.v1beta1.DelegatorSignals.prototype.addSignals = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.feeds.v1beta1.Signal, opt_index); +proto.band.feeds.v1beta1.Vote.prototype.addSignals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.feeds.v1beta1.Signal, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.DelegatorSignals} returns this + * @return {!proto.band.feeds.v1beta1.Vote} returns this */ -proto.feeds.v1beta1.DelegatorSignals.prototype.clearSignalsList = function() { +proto.band.feeds.v1beta1.Vote.prototype.clearSignalsList = function() { return this.setSignalsList([]); }; @@ -634,8 +653,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.Feed.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.Feed.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.Feed.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.Feed.toObject(opt_includeInstance, this); }; @@ -644,11 +663,11 @@ proto.feeds.v1beta1.Feed.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.Feed} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.Feed} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.Feed.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.Feed.toObject = function(includeInstance, msg) { var f, obj = { signalId: jspb.Message.getFieldWithDefault(msg, 1, ""), power: jspb.Message.getFieldWithDefault(msg, 2, 0), @@ -666,23 +685,23 @@ proto.feeds.v1beta1.Feed.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.Feed} + * @return {!proto.band.feeds.v1beta1.Feed} */ -proto.feeds.v1beta1.Feed.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.Feed.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.Feed; - return proto.feeds.v1beta1.Feed.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.Feed; + return proto.band.feeds.v1beta1.Feed.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.Feed} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.Feed} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.Feed} + * @return {!proto.band.feeds.v1beta1.Feed} */ -proto.feeds.v1beta1.Feed.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.Feed.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -714,9 +733,9 @@ proto.feeds.v1beta1.Feed.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.Feed.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.Feed.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.Feed.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.Feed.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -724,11 +743,11 @@ proto.feeds.v1beta1.Feed.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.Feed} message + * @param {!proto.band.feeds.v1beta1.Feed} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.Feed.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.Feed.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSignalId(); if (f.length > 0) { @@ -758,16 +777,16 @@ proto.feeds.v1beta1.Feed.serializeBinaryToWriter = function(message, writer) { * optional string signal_id = 1; * @return {string} */ -proto.feeds.v1beta1.Feed.prototype.getSignalId = function() { +proto.band.feeds.v1beta1.Feed.prototype.getSignalId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.Feed} returns this + * @return {!proto.band.feeds.v1beta1.Feed} returns this */ -proto.feeds.v1beta1.Feed.prototype.setSignalId = function(value) { +proto.band.feeds.v1beta1.Feed.prototype.setSignalId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -776,16 +795,16 @@ proto.feeds.v1beta1.Feed.prototype.setSignalId = function(value) { * optional int64 power = 2; * @return {number} */ -proto.feeds.v1beta1.Feed.prototype.getPower = function() { +proto.band.feeds.v1beta1.Feed.prototype.getPower = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Feed} returns this + * @return {!proto.band.feeds.v1beta1.Feed} returns this */ -proto.feeds.v1beta1.Feed.prototype.setPower = function(value) { +proto.band.feeds.v1beta1.Feed.prototype.setPower = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; @@ -794,16 +813,16 @@ proto.feeds.v1beta1.Feed.prototype.setPower = function(value) { * optional int64 interval = 3; * @return {number} */ -proto.feeds.v1beta1.Feed.prototype.getInterval = function() { +proto.band.feeds.v1beta1.Feed.prototype.getInterval = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Feed} returns this + * @return {!proto.band.feeds.v1beta1.Feed} returns this */ -proto.feeds.v1beta1.Feed.prototype.setInterval = function(value) { +proto.band.feeds.v1beta1.Feed.prototype.setInterval = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -824,8 +843,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.FeedWithDeviation.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.FeedWithDeviation.toObject(opt_includeInstance, this); }; @@ -834,11 +853,11 @@ proto.feeds.v1beta1.FeedWithDeviation.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.FeedWithDeviation} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.FeedWithDeviation} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.FeedWithDeviation.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.FeedWithDeviation.toObject = function(includeInstance, msg) { var f, obj = { signalId: jspb.Message.getFieldWithDefault(msg, 1, ""), power: jspb.Message.getFieldWithDefault(msg, 2, 0), @@ -857,23 +876,23 @@ proto.feeds.v1beta1.FeedWithDeviation.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.FeedWithDeviation} + * @return {!proto.band.feeds.v1beta1.FeedWithDeviation} */ -proto.feeds.v1beta1.FeedWithDeviation.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.FeedWithDeviation.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.FeedWithDeviation; - return proto.feeds.v1beta1.FeedWithDeviation.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.FeedWithDeviation; + return proto.band.feeds.v1beta1.FeedWithDeviation.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.FeedWithDeviation} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.FeedWithDeviation} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.FeedWithDeviation} + * @return {!proto.band.feeds.v1beta1.FeedWithDeviation} */ -proto.feeds.v1beta1.FeedWithDeviation.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.FeedWithDeviation.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -909,9 +928,9 @@ proto.feeds.v1beta1.FeedWithDeviation.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.FeedWithDeviation.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.FeedWithDeviation.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -919,11 +938,11 @@ proto.feeds.v1beta1.FeedWithDeviation.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.FeedWithDeviation} message + * @param {!proto.band.feeds.v1beta1.FeedWithDeviation} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.FeedWithDeviation.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.FeedWithDeviation.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSignalId(); if (f.length > 0) { @@ -960,16 +979,16 @@ proto.feeds.v1beta1.FeedWithDeviation.serializeBinaryToWriter = function(message * optional string signal_id = 1; * @return {string} */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.getSignalId = function() { +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.getSignalId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.FeedWithDeviation} returns this + * @return {!proto.band.feeds.v1beta1.FeedWithDeviation} returns this */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.setSignalId = function(value) { +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.setSignalId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -978,16 +997,16 @@ proto.feeds.v1beta1.FeedWithDeviation.prototype.setSignalId = function(value) { * optional int64 power = 2; * @return {number} */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.getPower = function() { +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.getPower = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.FeedWithDeviation} returns this + * @return {!proto.band.feeds.v1beta1.FeedWithDeviation} returns this */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.setPower = function(value) { +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.setPower = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; @@ -996,16 +1015,16 @@ proto.feeds.v1beta1.FeedWithDeviation.prototype.setPower = function(value) { * optional int64 interval = 3; * @return {number} */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.getInterval = function() { +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.getInterval = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.FeedWithDeviation} returns this + * @return {!proto.band.feeds.v1beta1.FeedWithDeviation} returns this */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.setInterval = function(value) { +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.setInterval = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1014,16 +1033,16 @@ proto.feeds.v1beta1.FeedWithDeviation.prototype.setInterval = function(value) { * optional int64 deviation_basis_point = 4; * @return {number} */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.getDeviationBasisPoint = function() { +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.getDeviationBasisPoint = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.FeedWithDeviation} returns this + * @return {!proto.band.feeds.v1beta1.FeedWithDeviation} returns this */ -proto.feeds.v1beta1.FeedWithDeviation.prototype.setDeviationBasisPoint = function(value) { +proto.band.feeds.v1beta1.FeedWithDeviation.prototype.setDeviationBasisPoint = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; @@ -1034,7 +1053,7 @@ proto.feeds.v1beta1.FeedWithDeviation.prototype.setDeviationBasisPoint = functio * @private {!Array} * @const */ -proto.feeds.v1beta1.CurrentFeeds.repeatedFields_ = [1]; +proto.band.feeds.v1beta1.CurrentFeeds.repeatedFields_ = [1]; @@ -1051,8 +1070,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.CurrentFeeds.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.CurrentFeeds.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.CurrentFeeds.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.CurrentFeeds.toObject(opt_includeInstance, this); }; @@ -1061,14 +1080,14 @@ proto.feeds.v1beta1.CurrentFeeds.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.CurrentFeeds} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.CurrentFeeds} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.CurrentFeeds.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.CurrentFeeds.toObject = function(includeInstance, msg) { var f, obj = { feedsList: jspb.Message.toObjectList(msg.getFeedsList(), - proto.feeds.v1beta1.Feed.toObject, includeInstance), + proto.band.feeds.v1beta1.Feed.toObject, includeInstance), lastUpdateTimestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), lastUpdateBlock: jspb.Message.getFieldWithDefault(msg, 3, 0) }; @@ -1084,23 +1103,23 @@ proto.feeds.v1beta1.CurrentFeeds.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.CurrentFeeds} + * @return {!proto.band.feeds.v1beta1.CurrentFeeds} */ -proto.feeds.v1beta1.CurrentFeeds.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.CurrentFeeds.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.CurrentFeeds; - return proto.feeds.v1beta1.CurrentFeeds.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.CurrentFeeds; + return proto.band.feeds.v1beta1.CurrentFeeds.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.CurrentFeeds} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.CurrentFeeds} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.CurrentFeeds} + * @return {!proto.band.feeds.v1beta1.CurrentFeeds} */ -proto.feeds.v1beta1.CurrentFeeds.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.CurrentFeeds.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1108,8 +1127,8 @@ proto.feeds.v1beta1.CurrentFeeds.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.feeds.v1beta1.Feed; - reader.readMessage(value,proto.feeds.v1beta1.Feed.deserializeBinaryFromReader); + var value = new proto.band.feeds.v1beta1.Feed; + reader.readMessage(value,proto.band.feeds.v1beta1.Feed.deserializeBinaryFromReader); msg.addFeeds(value); break; case 2: @@ -1133,9 +1152,9 @@ proto.feeds.v1beta1.CurrentFeeds.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.CurrentFeeds.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.CurrentFeeds.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.CurrentFeeds.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.CurrentFeeds.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1143,18 +1162,18 @@ proto.feeds.v1beta1.CurrentFeeds.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.CurrentFeeds} message + * @param {!proto.band.feeds.v1beta1.CurrentFeeds} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.CurrentFeeds.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.CurrentFeeds.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFeedsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.feeds.v1beta1.Feed.serializeBinaryToWriter + proto.band.feeds.v1beta1.Feed.serializeBinaryToWriter ); } f = message.getLastUpdateTimestamp(); @@ -1176,38 +1195,38 @@ proto.feeds.v1beta1.CurrentFeeds.serializeBinaryToWriter = function(message, wri /** * repeated Feed feeds = 1; - * @return {!Array} + * @return {!Array} */ -proto.feeds.v1beta1.CurrentFeeds.prototype.getFeedsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.feeds.v1beta1.Feed, 1)); +proto.band.feeds.v1beta1.CurrentFeeds.prototype.getFeedsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.feeds.v1beta1.Feed, 1)); }; /** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.CurrentFeeds} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.CurrentFeeds} returns this */ -proto.feeds.v1beta1.CurrentFeeds.prototype.setFeedsList = function(value) { +proto.band.feeds.v1beta1.CurrentFeeds.prototype.setFeedsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.feeds.v1beta1.Feed=} opt_value + * @param {!proto.band.feeds.v1beta1.Feed=} opt_value * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.Feed} + * @return {!proto.band.feeds.v1beta1.Feed} */ -proto.feeds.v1beta1.CurrentFeeds.prototype.addFeeds = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.feeds.v1beta1.Feed, opt_index); +proto.band.feeds.v1beta1.CurrentFeeds.prototype.addFeeds = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.feeds.v1beta1.Feed, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.CurrentFeeds} returns this + * @return {!proto.band.feeds.v1beta1.CurrentFeeds} returns this */ -proto.feeds.v1beta1.CurrentFeeds.prototype.clearFeedsList = function() { +proto.band.feeds.v1beta1.CurrentFeeds.prototype.clearFeedsList = function() { return this.setFeedsList([]); }; @@ -1216,16 +1235,16 @@ proto.feeds.v1beta1.CurrentFeeds.prototype.clearFeedsList = function() { * optional int64 last_update_timestamp = 2; * @return {number} */ -proto.feeds.v1beta1.CurrentFeeds.prototype.getLastUpdateTimestamp = function() { +proto.band.feeds.v1beta1.CurrentFeeds.prototype.getLastUpdateTimestamp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.CurrentFeeds} returns this + * @return {!proto.band.feeds.v1beta1.CurrentFeeds} returns this */ -proto.feeds.v1beta1.CurrentFeeds.prototype.setLastUpdateTimestamp = function(value) { +proto.band.feeds.v1beta1.CurrentFeeds.prototype.setLastUpdateTimestamp = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1234,16 +1253,16 @@ proto.feeds.v1beta1.CurrentFeeds.prototype.setLastUpdateTimestamp = function(val * optional int64 last_update_block = 3; * @return {number} */ -proto.feeds.v1beta1.CurrentFeeds.prototype.getLastUpdateBlock = function() { +proto.band.feeds.v1beta1.CurrentFeeds.prototype.getLastUpdateBlock = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.CurrentFeeds} returns this + * @return {!proto.band.feeds.v1beta1.CurrentFeeds} returns this */ -proto.feeds.v1beta1.CurrentFeeds.prototype.setLastUpdateBlock = function(value) { +proto.band.feeds.v1beta1.CurrentFeeds.prototype.setLastUpdateBlock = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1254,7 +1273,7 @@ proto.feeds.v1beta1.CurrentFeeds.prototype.setLastUpdateBlock = function(value) * @private {!Array} * @const */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.repeatedFields_ = [1]; +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.repeatedFields_ = [1]; @@ -1271,8 +1290,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.CurrentFeedWithDeviations.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.CurrentFeedWithDeviations.toObject(opt_includeInstance, this); }; @@ -1281,14 +1300,14 @@ proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.CurrentFeedWithDeviations} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.CurrentFeedWithDeviations} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.toObject = function(includeInstance, msg) { var f, obj = { feedsList: jspb.Message.toObjectList(msg.getFeedsList(), - proto.feeds.v1beta1.FeedWithDeviation.toObject, includeInstance), + proto.band.feeds.v1beta1.FeedWithDeviation.toObject, includeInstance), lastUpdateTimestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), lastUpdateBlock: jspb.Message.getFieldWithDefault(msg, 3, 0) }; @@ -1304,23 +1323,23 @@ proto.feeds.v1beta1.CurrentFeedWithDeviations.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.CurrentFeedWithDeviations} + * @return {!proto.band.feeds.v1beta1.CurrentFeedWithDeviations} */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.CurrentFeedWithDeviations; - return proto.feeds.v1beta1.CurrentFeedWithDeviations.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.CurrentFeedWithDeviations; + return proto.band.feeds.v1beta1.CurrentFeedWithDeviations.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.CurrentFeedWithDeviations} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.CurrentFeedWithDeviations} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.CurrentFeedWithDeviations} + * @return {!proto.band.feeds.v1beta1.CurrentFeedWithDeviations} */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1328,8 +1347,8 @@ proto.feeds.v1beta1.CurrentFeedWithDeviations.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.feeds.v1beta1.FeedWithDeviation; - reader.readMessage(value,proto.feeds.v1beta1.FeedWithDeviation.deserializeBinaryFromReader); + var value = new proto.band.feeds.v1beta1.FeedWithDeviation; + reader.readMessage(value,proto.band.feeds.v1beta1.FeedWithDeviation.deserializeBinaryFromReader); msg.addFeeds(value); break; case 2: @@ -1353,9 +1372,9 @@ proto.feeds.v1beta1.CurrentFeedWithDeviations.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.CurrentFeedWithDeviations.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.CurrentFeedWithDeviations.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1363,18 +1382,18 @@ proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.CurrentFeedWithDeviations} message + * @param {!proto.band.feeds.v1beta1.CurrentFeedWithDeviations} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFeedsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.feeds.v1beta1.FeedWithDeviation.serializeBinaryToWriter + proto.band.feeds.v1beta1.FeedWithDeviation.serializeBinaryToWriter ); } f = message.getLastUpdateTimestamp(); @@ -1396,38 +1415,38 @@ proto.feeds.v1beta1.CurrentFeedWithDeviations.serializeBinaryToWriter = function /** * repeated FeedWithDeviation feeds = 1; - * @return {!Array} + * @return {!Array} */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.getFeedsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.feeds.v1beta1.FeedWithDeviation, 1)); +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.getFeedsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.feeds.v1beta1.FeedWithDeviation, 1)); }; /** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.CurrentFeedWithDeviations} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.CurrentFeedWithDeviations} returns this */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.setFeedsList = function(value) { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.setFeedsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.feeds.v1beta1.FeedWithDeviation=} opt_value + * @param {!proto.band.feeds.v1beta1.FeedWithDeviation=} opt_value * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.FeedWithDeviation} + * @return {!proto.band.feeds.v1beta1.FeedWithDeviation} */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.addFeeds = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.feeds.v1beta1.FeedWithDeviation, opt_index); +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.addFeeds = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.feeds.v1beta1.FeedWithDeviation, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.CurrentFeedWithDeviations} returns this + * @return {!proto.band.feeds.v1beta1.CurrentFeedWithDeviations} returns this */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.clearFeedsList = function() { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.clearFeedsList = function() { return this.setFeedsList([]); }; @@ -1436,16 +1455,16 @@ proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.clearFeedsList = functio * optional int64 last_update_timestamp = 2; * @return {number} */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.getLastUpdateTimestamp = function() { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.getLastUpdateTimestamp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.CurrentFeedWithDeviations} returns this + * @return {!proto.band.feeds.v1beta1.CurrentFeedWithDeviations} returns this */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.setLastUpdateTimestamp = function(value) { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.setLastUpdateTimestamp = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1454,16 +1473,16 @@ proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.setLastUpdateTimestamp = * optional int64 last_update_block = 3; * @return {number} */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.getLastUpdateBlock = function() { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.getLastUpdateBlock = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.CurrentFeedWithDeviations} returns this + * @return {!proto.band.feeds.v1beta1.CurrentFeedWithDeviations} returns this */ -proto.feeds.v1beta1.CurrentFeedWithDeviations.prototype.setLastUpdateBlock = function(value) { +proto.band.feeds.v1beta1.CurrentFeedWithDeviations.prototype.setLastUpdateBlock = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1484,8 +1503,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.Price.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.Price.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.Price.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.Price.toObject(opt_includeInstance, this); }; @@ -1494,13 +1513,13 @@ proto.feeds.v1beta1.Price.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.Price} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.Price} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.Price.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.Price.toObject = function(includeInstance, msg) { var f, obj = { - priceStatus: jspb.Message.getFieldWithDefault(msg, 1, 0), + status: jspb.Message.getFieldWithDefault(msg, 1, 0), signalId: jspb.Message.getFieldWithDefault(msg, 2, ""), price: jspb.Message.getFieldWithDefault(msg, 3, 0), timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0) @@ -1517,23 +1536,23 @@ proto.feeds.v1beta1.Price.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.Price} + * @return {!proto.band.feeds.v1beta1.Price} */ -proto.feeds.v1beta1.Price.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.Price.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.Price; - return proto.feeds.v1beta1.Price.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.Price; + return proto.band.feeds.v1beta1.Price.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.Price} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.Price} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.Price} + * @return {!proto.band.feeds.v1beta1.Price} */ -proto.feeds.v1beta1.Price.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.Price.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1541,8 +1560,8 @@ proto.feeds.v1beta1.Price.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.feeds.v1beta1.PriceStatus} */ (reader.readEnum()); - msg.setPriceStatus(value); + var value = /** @type {!proto.band.feeds.v1beta1.PriceStatus} */ (reader.readEnum()); + msg.setStatus(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -1569,9 +1588,9 @@ proto.feeds.v1beta1.Price.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.Price.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.Price.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.Price.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.Price.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1579,13 +1598,13 @@ proto.feeds.v1beta1.Price.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.Price} message + * @param {!proto.band.feeds.v1beta1.Price} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.Price.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.Price.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPriceStatus(); + f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( 1, @@ -1617,19 +1636,19 @@ proto.feeds.v1beta1.Price.serializeBinaryToWriter = function(message, writer) { /** - * optional PriceStatus price_status = 1; - * @return {!proto.feeds.v1beta1.PriceStatus} + * optional PriceStatus status = 1; + * @return {!proto.band.feeds.v1beta1.PriceStatus} */ -proto.feeds.v1beta1.Price.prototype.getPriceStatus = function() { - return /** @type {!proto.feeds.v1beta1.PriceStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.band.feeds.v1beta1.Price.prototype.getStatus = function() { + return /** @type {!proto.band.feeds.v1beta1.PriceStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!proto.feeds.v1beta1.PriceStatus} value - * @return {!proto.feeds.v1beta1.Price} returns this + * @param {!proto.band.feeds.v1beta1.PriceStatus} value + * @return {!proto.band.feeds.v1beta1.Price} returns this */ -proto.feeds.v1beta1.Price.prototype.setPriceStatus = function(value) { +proto.band.feeds.v1beta1.Price.prototype.setStatus = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; @@ -1638,16 +1657,16 @@ proto.feeds.v1beta1.Price.prototype.setPriceStatus = function(value) { * optional string signal_id = 2; * @return {string} */ -proto.feeds.v1beta1.Price.prototype.getSignalId = function() { +proto.band.feeds.v1beta1.Price.prototype.getSignalId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.Price} returns this + * @return {!proto.band.feeds.v1beta1.Price} returns this */ -proto.feeds.v1beta1.Price.prototype.setSignalId = function(value) { +proto.band.feeds.v1beta1.Price.prototype.setSignalId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1656,16 +1675,16 @@ proto.feeds.v1beta1.Price.prototype.setSignalId = function(value) { * optional uint64 price = 3; * @return {number} */ -proto.feeds.v1beta1.Price.prototype.getPrice = function() { +proto.band.feeds.v1beta1.Price.prototype.getPrice = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Price} returns this + * @return {!proto.band.feeds.v1beta1.Price} returns this */ -proto.feeds.v1beta1.Price.prototype.setPrice = function(value) { +proto.band.feeds.v1beta1.Price.prototype.setPrice = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1674,16 +1693,16 @@ proto.feeds.v1beta1.Price.prototype.setPrice = function(value) { * optional int64 timestamp = 4; * @return {number} */ -proto.feeds.v1beta1.Price.prototype.getTimestamp = function() { +proto.band.feeds.v1beta1.Price.prototype.getTimestamp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Price} returns this + * @return {!proto.band.feeds.v1beta1.Price} returns this */ -proto.feeds.v1beta1.Price.prototype.setTimestamp = function(value) { +proto.band.feeds.v1beta1.Price.prototype.setTimestamp = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; @@ -1704,8 +1723,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.SignalPrice.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.SignalPrice.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.SignalPrice.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.SignalPrice.toObject(opt_includeInstance, this); }; @@ -1714,13 +1733,13 @@ proto.feeds.v1beta1.SignalPrice.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.SignalPrice} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.SignalPrice} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.SignalPrice.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.SignalPrice.toObject = function(includeInstance, msg) { var f, obj = { - priceStatus: jspb.Message.getFieldWithDefault(msg, 1, 0), + status: jspb.Message.getFieldWithDefault(msg, 1, 0), signalId: jspb.Message.getFieldWithDefault(msg, 2, ""), price: jspb.Message.getFieldWithDefault(msg, 3, 0) }; @@ -1736,23 +1755,23 @@ proto.feeds.v1beta1.SignalPrice.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.SignalPrice} + * @return {!proto.band.feeds.v1beta1.SignalPrice} */ -proto.feeds.v1beta1.SignalPrice.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.SignalPrice.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.SignalPrice; - return proto.feeds.v1beta1.SignalPrice.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.SignalPrice; + return proto.band.feeds.v1beta1.SignalPrice.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.SignalPrice} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.SignalPrice} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.SignalPrice} + * @return {!proto.band.feeds.v1beta1.SignalPrice} */ -proto.feeds.v1beta1.SignalPrice.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.SignalPrice.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1760,8 +1779,8 @@ proto.feeds.v1beta1.SignalPrice.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.feeds.v1beta1.PriceStatus} */ (reader.readEnum()); - msg.setPriceStatus(value); + var value = /** @type {!proto.band.feeds.v1beta1.SignalPriceStatus} */ (reader.readEnum()); + msg.setStatus(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -1784,9 +1803,9 @@ proto.feeds.v1beta1.SignalPrice.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.SignalPrice.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.SignalPrice.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.SignalPrice.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.SignalPrice.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1794,13 +1813,13 @@ proto.feeds.v1beta1.SignalPrice.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.SignalPrice} message + * @param {!proto.band.feeds.v1beta1.SignalPrice} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.SignalPrice.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.SignalPrice.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPriceStatus(); + f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( 1, @@ -1825,19 +1844,19 @@ proto.feeds.v1beta1.SignalPrice.serializeBinaryToWriter = function(message, writ /** - * optional PriceStatus price_status = 1; - * @return {!proto.feeds.v1beta1.PriceStatus} + * optional SignalPriceStatus status = 1; + * @return {!proto.band.feeds.v1beta1.SignalPriceStatus} */ -proto.feeds.v1beta1.SignalPrice.prototype.getPriceStatus = function() { - return /** @type {!proto.feeds.v1beta1.PriceStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.band.feeds.v1beta1.SignalPrice.prototype.getStatus = function() { + return /** @type {!proto.band.feeds.v1beta1.SignalPriceStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!proto.feeds.v1beta1.PriceStatus} value - * @return {!proto.feeds.v1beta1.SignalPrice} returns this + * @param {!proto.band.feeds.v1beta1.SignalPriceStatus} value + * @return {!proto.band.feeds.v1beta1.SignalPrice} returns this */ -proto.feeds.v1beta1.SignalPrice.prototype.setPriceStatus = function(value) { +proto.band.feeds.v1beta1.SignalPrice.prototype.setStatus = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; @@ -1846,16 +1865,16 @@ proto.feeds.v1beta1.SignalPrice.prototype.setPriceStatus = function(value) { * optional string signal_id = 2; * @return {string} */ -proto.feeds.v1beta1.SignalPrice.prototype.getSignalId = function() { +proto.band.feeds.v1beta1.SignalPrice.prototype.getSignalId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.SignalPrice} returns this + * @return {!proto.band.feeds.v1beta1.SignalPrice} returns this */ -proto.feeds.v1beta1.SignalPrice.prototype.setSignalId = function(value) { +proto.band.feeds.v1beta1.SignalPrice.prototype.setSignalId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1864,16 +1883,16 @@ proto.feeds.v1beta1.SignalPrice.prototype.setSignalId = function(value) { * optional uint64 price = 3; * @return {number} */ -proto.feeds.v1beta1.SignalPrice.prototype.getPrice = function() { +proto.band.feeds.v1beta1.SignalPrice.prototype.getPrice = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.SignalPrice} returns this + * @return {!proto.band.feeds.v1beta1.SignalPrice} returns this */ -proto.feeds.v1beta1.SignalPrice.prototype.setPrice = function(value) { +proto.band.feeds.v1beta1.SignalPrice.prototype.setPrice = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1894,8 +1913,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.ValidatorPrice.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.ValidatorPrice.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.ValidatorPrice.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.ValidatorPrice.toObject(opt_includeInstance, this); }; @@ -1904,18 +1923,17 @@ proto.feeds.v1beta1.ValidatorPrice.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.ValidatorPrice} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.ValidatorPrice} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.ValidatorPrice.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.ValidatorPrice.toObject = function(includeInstance, msg) { var f, obj = { - priceStatus: jspb.Message.getFieldWithDefault(msg, 1, 0), - validator: jspb.Message.getFieldWithDefault(msg, 2, ""), - signalId: jspb.Message.getFieldWithDefault(msg, 3, ""), - price: jspb.Message.getFieldWithDefault(msg, 4, 0), - timestamp: jspb.Message.getFieldWithDefault(msg, 5, 0), - blockHeight: jspb.Message.getFieldWithDefault(msg, 6, 0) + signalPriceStatus: jspb.Message.getFieldWithDefault(msg, 1, 0), + signalId: jspb.Message.getFieldWithDefault(msg, 2, ""), + price: jspb.Message.getFieldWithDefault(msg, 3, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0), + blockHeight: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -1929,23 +1947,23 @@ proto.feeds.v1beta1.ValidatorPrice.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.ValidatorPrice} + * @return {!proto.band.feeds.v1beta1.ValidatorPrice} */ -proto.feeds.v1beta1.ValidatorPrice.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.ValidatorPrice.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.ValidatorPrice; - return proto.feeds.v1beta1.ValidatorPrice.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.ValidatorPrice; + return proto.band.feeds.v1beta1.ValidatorPrice.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.ValidatorPrice} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.ValidatorPrice} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.ValidatorPrice} + * @return {!proto.band.feeds.v1beta1.ValidatorPrice} */ -proto.feeds.v1beta1.ValidatorPrice.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.ValidatorPrice.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1953,26 +1971,22 @@ proto.feeds.v1beta1.ValidatorPrice.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.feeds.v1beta1.PriceStatus} */ (reader.readEnum()); - msg.setPriceStatus(value); + var value = /** @type {!proto.band.feeds.v1beta1.SignalPriceStatus} */ (reader.readEnum()); + msg.setSignalPriceStatus(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setValidator(value); - break; - case 3: var value = /** @type {string} */ (reader.readString()); msg.setSignalId(value); break; - case 4: + case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setPrice(value); break; - case 5: + case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setTimestamp(value); break; - case 6: + case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setBlockHeight(value); break; @@ -1989,9 +2003,9 @@ proto.feeds.v1beta1.ValidatorPrice.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.ValidatorPrice.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.ValidatorPrice.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.ValidatorPrice.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.ValidatorPrice.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1999,51 +2013,44 @@ proto.feeds.v1beta1.ValidatorPrice.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.ValidatorPrice} message + * @param {!proto.band.feeds.v1beta1.ValidatorPrice} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.ValidatorPrice.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.ValidatorPrice.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPriceStatus(); + f = message.getSignalPriceStatus(); if (f !== 0.0) { writer.writeEnum( 1, f ); } - f = message.getValidator(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } f = message.getSignalId(); if (f.length > 0) { writer.writeString( - 3, + 2, f ); } f = message.getPrice(); if (f !== 0) { writer.writeUint64( - 4, + 3, f ); } f = message.getTimestamp(); if (f !== 0) { writer.writeInt64( - 5, + 4, f ); } f = message.getBlockHeight(); if (f !== 0) { writer.writeInt64( - 6, + 5, f ); } @@ -2051,120 +2058,102 @@ proto.feeds.v1beta1.ValidatorPrice.serializeBinaryToWriter = function(message, w /** - * optional PriceStatus price_status = 1; - * @return {!proto.feeds.v1beta1.PriceStatus} + * optional SignalPriceStatus signal_price_status = 1; + * @return {!proto.band.feeds.v1beta1.SignalPriceStatus} */ -proto.feeds.v1beta1.ValidatorPrice.prototype.getPriceStatus = function() { - return /** @type {!proto.feeds.v1beta1.PriceStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.band.feeds.v1beta1.ValidatorPrice.prototype.getSignalPriceStatus = function() { + return /** @type {!proto.band.feeds.v1beta1.SignalPriceStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!proto.feeds.v1beta1.PriceStatus} value - * @return {!proto.feeds.v1beta1.ValidatorPrice} returns this + * @param {!proto.band.feeds.v1beta1.SignalPriceStatus} value + * @return {!proto.band.feeds.v1beta1.ValidatorPrice} returns this */ -proto.feeds.v1beta1.ValidatorPrice.prototype.setPriceStatus = function(value) { +proto.band.feeds.v1beta1.ValidatorPrice.prototype.setSignalPriceStatus = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional string validator = 2; + * optional string signal_id = 2; * @return {string} */ -proto.feeds.v1beta1.ValidatorPrice.prototype.getValidator = function() { +proto.band.feeds.v1beta1.ValidatorPrice.prototype.getSignalId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.ValidatorPrice} returns this + * @return {!proto.band.feeds.v1beta1.ValidatorPrice} returns this */ -proto.feeds.v1beta1.ValidatorPrice.prototype.setValidator = function(value) { +proto.band.feeds.v1beta1.ValidatorPrice.prototype.setSignalId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string signal_id = 3; - * @return {string} + * optional uint64 price = 3; + * @return {number} */ -proto.feeds.v1beta1.ValidatorPrice.prototype.getSignalId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.band.feeds.v1beta1.ValidatorPrice.prototype.getPrice = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {string} value - * @return {!proto.feeds.v1beta1.ValidatorPrice} returns this + * @param {number} value + * @return {!proto.band.feeds.v1beta1.ValidatorPrice} returns this */ -proto.feeds.v1beta1.ValidatorPrice.prototype.setSignalId = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.band.feeds.v1beta1.ValidatorPrice.prototype.setPrice = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional uint64 price = 4; + * optional int64 timestamp = 4; * @return {number} */ -proto.feeds.v1beta1.ValidatorPrice.prototype.getPrice = function() { +proto.band.feeds.v1beta1.ValidatorPrice.prototype.getTimestamp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.ValidatorPrice} returns this + * @return {!proto.band.feeds.v1beta1.ValidatorPrice} returns this */ -proto.feeds.v1beta1.ValidatorPrice.prototype.setPrice = function(value) { +proto.band.feeds.v1beta1.ValidatorPrice.prototype.setTimestamp = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 timestamp = 5; + * optional int64 block_height = 5; * @return {number} */ -proto.feeds.v1beta1.ValidatorPrice.prototype.getTimestamp = function() { +proto.band.feeds.v1beta1.ValidatorPrice.prototype.getBlockHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.ValidatorPrice} returns this + * @return {!proto.band.feeds.v1beta1.ValidatorPrice} returns this */ -proto.feeds.v1beta1.ValidatorPrice.prototype.setTimestamp = function(value) { +proto.band.feeds.v1beta1.ValidatorPrice.prototype.setBlockHeight = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; -/** - * optional int64 block_height = 6; - * @return {number} - */ -proto.feeds.v1beta1.ValidatorPrice.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.feeds.v1beta1.ValidatorPrice} returns this - */ -proto.feeds.v1beta1.ValidatorPrice.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.feeds.v1beta1.ValidatorPriceList.repeatedFields_ = [2]; +proto.band.feeds.v1beta1.ValidatorPriceList.repeatedFields_ = [2]; @@ -2181,8 +2170,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.ValidatorPriceList.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.ValidatorPriceList.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.ValidatorPriceList.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.ValidatorPriceList.toObject(opt_includeInstance, this); }; @@ -2191,15 +2180,15 @@ proto.feeds.v1beta1.ValidatorPriceList.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.ValidatorPriceList} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.ValidatorPriceList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.ValidatorPriceList.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.ValidatorPriceList.toObject = function(includeInstance, msg) { var f, obj = { validator: jspb.Message.getFieldWithDefault(msg, 1, ""), validatorPricesList: jspb.Message.toObjectList(msg.getValidatorPricesList(), - proto.feeds.v1beta1.ValidatorPrice.toObject, includeInstance) + proto.band.feeds.v1beta1.ValidatorPrice.toObject, includeInstance) }; if (includeInstance) { @@ -2213,23 +2202,23 @@ proto.feeds.v1beta1.ValidatorPriceList.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.ValidatorPriceList} + * @return {!proto.band.feeds.v1beta1.ValidatorPriceList} */ -proto.feeds.v1beta1.ValidatorPriceList.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.ValidatorPriceList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.ValidatorPriceList; - return proto.feeds.v1beta1.ValidatorPriceList.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.ValidatorPriceList; + return proto.band.feeds.v1beta1.ValidatorPriceList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.ValidatorPriceList} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.ValidatorPriceList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.ValidatorPriceList} + * @return {!proto.band.feeds.v1beta1.ValidatorPriceList} */ -proto.feeds.v1beta1.ValidatorPriceList.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.ValidatorPriceList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2241,8 +2230,8 @@ proto.feeds.v1beta1.ValidatorPriceList.deserializeBinaryFromReader = function(ms msg.setValidator(value); break; case 2: - var value = new proto.feeds.v1beta1.ValidatorPrice; - reader.readMessage(value,proto.feeds.v1beta1.ValidatorPrice.deserializeBinaryFromReader); + var value = new proto.band.feeds.v1beta1.ValidatorPrice; + reader.readMessage(value,proto.band.feeds.v1beta1.ValidatorPrice.deserializeBinaryFromReader); msg.addValidatorPrices(value); break; default: @@ -2258,9 +2247,9 @@ proto.feeds.v1beta1.ValidatorPriceList.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.ValidatorPriceList.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.ValidatorPriceList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.ValidatorPriceList.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.ValidatorPriceList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2268,11 +2257,11 @@ proto.feeds.v1beta1.ValidatorPriceList.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.ValidatorPriceList} message + * @param {!proto.band.feeds.v1beta1.ValidatorPriceList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.ValidatorPriceList.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.ValidatorPriceList.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getValidator(); if (f.length > 0) { @@ -2286,7 +2275,7 @@ proto.feeds.v1beta1.ValidatorPriceList.serializeBinaryToWriter = function(messag writer.writeRepeatedMessage( 2, f, - proto.feeds.v1beta1.ValidatorPrice.serializeBinaryToWriter + proto.band.feeds.v1beta1.ValidatorPrice.serializeBinaryToWriter ); } }; @@ -2296,54 +2285,54 @@ proto.feeds.v1beta1.ValidatorPriceList.serializeBinaryToWriter = function(messag * optional string validator = 1; * @return {string} */ -proto.feeds.v1beta1.ValidatorPriceList.prototype.getValidator = function() { +proto.band.feeds.v1beta1.ValidatorPriceList.prototype.getValidator = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.ValidatorPriceList} returns this + * @return {!proto.band.feeds.v1beta1.ValidatorPriceList} returns this */ -proto.feeds.v1beta1.ValidatorPriceList.prototype.setValidator = function(value) { +proto.band.feeds.v1beta1.ValidatorPriceList.prototype.setValidator = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated ValidatorPrice validator_prices = 2; - * @return {!Array} + * @return {!Array} */ -proto.feeds.v1beta1.ValidatorPriceList.prototype.getValidatorPricesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.feeds.v1beta1.ValidatorPrice, 2)); +proto.band.feeds.v1beta1.ValidatorPriceList.prototype.getValidatorPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.feeds.v1beta1.ValidatorPrice, 2)); }; /** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.ValidatorPriceList} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.ValidatorPriceList} returns this */ -proto.feeds.v1beta1.ValidatorPriceList.prototype.setValidatorPricesList = function(value) { +proto.band.feeds.v1beta1.ValidatorPriceList.prototype.setValidatorPricesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {!proto.feeds.v1beta1.ValidatorPrice=} opt_value + * @param {!proto.band.feeds.v1beta1.ValidatorPrice=} opt_value * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.ValidatorPrice} + * @return {!proto.band.feeds.v1beta1.ValidatorPrice} */ -proto.feeds.v1beta1.ValidatorPriceList.prototype.addValidatorPrices = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.feeds.v1beta1.ValidatorPrice, opt_index); +proto.band.feeds.v1beta1.ValidatorPriceList.prototype.addValidatorPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.feeds.v1beta1.ValidatorPrice, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.ValidatorPriceList} returns this + * @return {!proto.band.feeds.v1beta1.ValidatorPriceList} returns this */ -proto.feeds.v1beta1.ValidatorPriceList.prototype.clearValidatorPricesList = function() { +proto.band.feeds.v1beta1.ValidatorPriceList.prototype.clearValidatorPricesList = function() { return this.setValidatorPricesList([]); }; @@ -2364,8 +2353,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.ReferenceSourceConfig.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.ReferenceSourceConfig.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.ReferenceSourceConfig.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.ReferenceSourceConfig.toObject(opt_includeInstance, this); }; @@ -2374,14 +2363,14 @@ proto.feeds.v1beta1.ReferenceSourceConfig.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.ReferenceSourceConfig} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.ReferenceSourceConfig} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.ReferenceSourceConfig.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.ReferenceSourceConfig.toObject = function(includeInstance, msg) { var f, obj = { - ipfsHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - version: jspb.Message.getFieldWithDefault(msg, 2, "") + registryIpfsHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + registryVersion: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -2395,23 +2384,23 @@ proto.feeds.v1beta1.ReferenceSourceConfig.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.ReferenceSourceConfig} + * @return {!proto.band.feeds.v1beta1.ReferenceSourceConfig} */ -proto.feeds.v1beta1.ReferenceSourceConfig.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.ReferenceSourceConfig.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.ReferenceSourceConfig; - return proto.feeds.v1beta1.ReferenceSourceConfig.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.ReferenceSourceConfig; + return proto.band.feeds.v1beta1.ReferenceSourceConfig.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.ReferenceSourceConfig} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.ReferenceSourceConfig} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.ReferenceSourceConfig} + * @return {!proto.band.feeds.v1beta1.ReferenceSourceConfig} */ -proto.feeds.v1beta1.ReferenceSourceConfig.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.ReferenceSourceConfig.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2420,11 +2409,11 @@ proto.feeds.v1beta1.ReferenceSourceConfig.deserializeBinaryFromReader = function switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setIpfsHash(value); + msg.setRegistryIpfsHash(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); + msg.setRegistryVersion(value); break; default: reader.skipField(); @@ -2439,9 +2428,9 @@ proto.feeds.v1beta1.ReferenceSourceConfig.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.ReferenceSourceConfig.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.ReferenceSourceConfig.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.ReferenceSourceConfig.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.ReferenceSourceConfig.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2449,20 +2438,20 @@ proto.feeds.v1beta1.ReferenceSourceConfig.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.ReferenceSourceConfig} message + * @param {!proto.band.feeds.v1beta1.ReferenceSourceConfig} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.ReferenceSourceConfig.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.ReferenceSourceConfig.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIpfsHash(); + f = message.getRegistryIpfsHash(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getVersion(); + f = message.getRegistryVersion(); if (f.length > 0) { writer.writeString( 2, @@ -2473,49 +2462,246 @@ proto.feeds.v1beta1.ReferenceSourceConfig.serializeBinaryToWriter = function(mes /** - * optional string ipfs_hash = 1; + * optional string registry_ipfs_hash = 1; * @return {string} */ -proto.feeds.v1beta1.ReferenceSourceConfig.prototype.getIpfsHash = function() { +proto.band.feeds.v1beta1.ReferenceSourceConfig.prototype.getRegistryIpfsHash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.ReferenceSourceConfig} returns this + * @return {!proto.band.feeds.v1beta1.ReferenceSourceConfig} returns this */ -proto.feeds.v1beta1.ReferenceSourceConfig.prototype.setIpfsHash = function(value) { +proto.band.feeds.v1beta1.ReferenceSourceConfig.prototype.setRegistryIpfsHash = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string version = 2; + * optional string registry_version = 2; * @return {string} */ -proto.feeds.v1beta1.ReferenceSourceConfig.prototype.getVersion = function() { +proto.band.feeds.v1beta1.ReferenceSourceConfig.prototype.getRegistryVersion = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.ReferenceSourceConfig} returns this + * @return {!proto.band.feeds.v1beta1.ReferenceSourceConfig} returns this */ -proto.feeds.v1beta1.ReferenceSourceConfig.prototype.setVersion = function(value) { +proto.band.feeds.v1beta1.ReferenceSourceConfig.prototype.setRegistryVersion = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.FeedsSignatureOrder.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.feeds.v1beta1.FeedsSignatureOrder} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.toObject = function(includeInstance, msg) { + var f, obj = { + signalIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + encoder: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.feeds.v1beta1.FeedsSignatureOrder} + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.feeds.v1beta1.FeedsSignatureOrder; + return proto.band.feeds.v1beta1.FeedsSignatureOrder.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.feeds.v1beta1.FeedsSignatureOrder} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.feeds.v1beta1.FeedsSignatureOrder} + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addSignalIds(value); + break; + case 2: + var value = /** @type {!proto.band.feeds.v1beta1.Encoder} */ (reader.readEnum()); + msg.setEncoder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.feeds.v1beta1.FeedsSignatureOrder.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.feeds.v1beta1.FeedsSignatureOrder} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignalIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getEncoder(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * repeated string signal_ids = 1; + * @return {!Array} + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.prototype.getSignalIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.FeedsSignatureOrder} returns this + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.prototype.setSignalIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.FeedsSignatureOrder} returns this + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.prototype.addSignalIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.feeds.v1beta1.FeedsSignatureOrder} returns this + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.prototype.clearSignalIdsList = function() { + return this.setSignalIdsList([]); +}; + + +/** + * optional Encoder encoder = 2; + * @return {!proto.band.feeds.v1beta1.Encoder} + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.prototype.getEncoder = function() { + return /** @type {!proto.band.feeds.v1beta1.Encoder} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Encoder} value + * @return {!proto.band.feeds.v1beta1.FeedsSignatureOrder} returns this + */ +proto.band.feeds.v1beta1.FeedsSignatureOrder.prototype.setEncoder = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + /** * @enum {number} */ -proto.feeds.v1beta1.PriceStatus = { +proto.band.feeds.v1beta1.PriceStatus = { PRICE_STATUS_UNSPECIFIED: 0, - PRICE_STATUS_UNSUPPORTED: 1, - PRICE_STATUS_UNAVAILABLE: 2, - PRICE_STATUS_AVAILABLE: 3 + PRICE_STATUS_UNKNOWN_SIGNAL_ID: 1, + PRICE_STATUS_NOT_READY: 2, + PRICE_STATUS_AVAILABLE: 3, + PRICE_STATUS_NOT_IN_CURRENT_FEEDS: 4 +}; + +/** + * @enum {number} + */ +proto.band.feeds.v1beta1.SignalPriceStatus = { + SIGNAL_PRICE_STATUS_UNSPECIFIED: 0, + SIGNAL_PRICE_STATUS_UNSUPPORTED: 1, + SIGNAL_PRICE_STATUS_UNAVAILABLE: 2, + SIGNAL_PRICE_STATUS_AVAILABLE: 3 }; -goog.object.extend(exports, proto.feeds.v1beta1); +goog.object.extend(exports, proto.band.feeds.v1beta1); diff --git a/codegen/band/feeds/v1beta1/feeds_pb_service.d.ts b/codegen/band/feeds/v1beta1/feeds_pb_service.d.ts new file mode 100644 index 0000000..56cc68d --- /dev/null +++ b/codegen/band/feeds/v1beta1/feeds_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/feeds.proto + diff --git a/codegen/band/feeds/v1beta1/feeds_pb_service.js b/codegen/band/feeds/v1beta1/feeds_pb_service.js new file mode 100644 index 0000000..56cc68d --- /dev/null +++ b/codegen/band/feeds/v1beta1/feeds_pb_service.js @@ -0,0 +1,3 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/feeds.proto + diff --git a/codegen/band/feeds/v1beta1/genesis.ts b/codegen/band/feeds/v1beta1/genesis.ts new file mode 100644 index 0000000..add2ea0 --- /dev/null +++ b/codegen/band/feeds/v1beta1/genesis.ts @@ -0,0 +1,130 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/feeds/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./params"; +import * as dependency_3 from "./feeds"; +import * as pb_1 from "google-protobuf"; +export namespace band.feeds.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_2.band.feeds.v1beta1.Params; + votes?: dependency_3.band.feeds.v1beta1.Vote[]; + reference_source_config?: dependency_3.band.feeds.v1beta1.ReferenceSourceConfig; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + if ("reference_source_config" in data && data.reference_source_config != undefined) { + this.reference_source_config = data.reference_source_config; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.band.feeds.v1beta1.Params, 1) as dependency_2.band.feeds.v1beta1.Params; + } + set params(value: dependency_2.band.feeds.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.band.feeds.v1beta1.Vote, 2) as dependency_3.band.feeds.v1beta1.Vote[]; + } + set votes(value: dependency_3.band.feeds.v1beta1.Vote[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get reference_source_config() { + return pb_1.Message.getWrapperField(this, dependency_3.band.feeds.v1beta1.ReferenceSourceConfig, 3) as dependency_3.band.feeds.v1beta1.ReferenceSourceConfig; + } + set reference_source_config(value: dependency_3.band.feeds.v1beta1.ReferenceSourceConfig) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_reference_source_config() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + params?: ReturnType; + votes?: ReturnType[]; + reference_source_config?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = dependency_2.band.feeds.v1beta1.Params.fromObject(data.params); + } + if (data.votes != null) { + message.votes = data.votes.map(item => dependency_3.band.feeds.v1beta1.Vote.fromObject(item)); + } + if (data.reference_source_config != null) { + message.reference_source_config = dependency_3.band.feeds.v1beta1.ReferenceSourceConfig.fromObject(data.reference_source_config); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + votes?: ReturnType[]; + reference_source_config?: ReturnType; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.votes != null) { + data.votes = this.votes.map((item: dependency_3.band.feeds.v1beta1.Vote) => item.toObject()); + } + if (this.reference_source_config != null) { + data.reference_source_config = this.reference_source_config.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.votes.length) + writer.writeRepeatedMessage(2, this.votes, (item: dependency_3.band.feeds.v1beta1.Vote) => item.serialize(writer)); + if (this.has_reference_source_config) + writer.writeMessage(3, this.reference_source_config, () => this.reference_source_config.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_2.band.feeds.v1beta1.Params.deserialize(reader)); + break; + case 2: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.band.feeds.v1beta1.Vote.deserialize(reader), dependency_3.band.feeds.v1beta1.Vote)); + break; + case 3: + reader.readMessage(message.reference_source_config, () => message.reference_source_config = dependency_3.band.feeds.v1beta1.ReferenceSourceConfig.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/codegen/band/feeds/v1beta1/genesis_pb.d.ts b/codegen/band/feeds/v1beta1/genesis_pb.d.ts new file mode 100644 index 0000000..ed78a46 --- /dev/null +++ b/codegen/band/feeds/v1beta1/genesis_pb.d.ts @@ -0,0 +1,42 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as band_feeds_v1beta1_params_pb from "../../../band/feeds/v1beta1/params_pb"; +import * as band_feeds_v1beta1_feeds_pb from "../../../band/feeds/v1beta1/feeds_pb"; + +export class GenesisState extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_feeds_v1beta1_params_pb.Params | undefined; + setParams(value?: band_feeds_v1beta1_params_pb.Params): void; + + clearVotesList(): void; + getVotesList(): Array; + setVotesList(value: Array): void; + addVotes(value?: band_feeds_v1beta1_feeds_pb.Vote, index?: number): band_feeds_v1beta1_feeds_pb.Vote; + + hasReferenceSourceConfig(): boolean; + clearReferenceSourceConfig(): void; + getReferenceSourceConfig(): band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig | undefined; + setReferenceSourceConfig(value?: band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + params?: band_feeds_v1beta1_params_pb.Params.AsObject, + votesList: Array, + referenceSourceConfig?: band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.AsObject, + } +} + diff --git a/codegen/band/feeds/v1beta1/genesis_pb.js b/codegen/band/feeds/v1beta1/genesis_pb.js new file mode 100644 index 0000000..979a481 --- /dev/null +++ b/codegen/band/feeds/v1beta1/genesis_pb.js @@ -0,0 +1,308 @@ +// source: band/feeds/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var band_feeds_v1beta1_params_pb = require('../../../band/feeds/v1beta1/params_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_params_pb); +var band_feeds_v1beta1_feeds_pb = require('../../../band/feeds/v1beta1/feeds_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_feeds_pb); +goog.exportSymbol('proto.band.feeds.v1beta1.GenesisState', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.feeds.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.band.feeds.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.feeds.v1beta1.GenesisState.displayName = 'proto.band.feeds.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.feeds.v1beta1.GenesisState.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.feeds.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.feeds.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.feeds.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && band_feeds_v1beta1_params_pb.Params.toObject(includeInstance, f), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + band_feeds_v1beta1_feeds_pb.Vote.toObject, includeInstance), + referenceSourceConfig: (f = msg.getReferenceSourceConfig()) && band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.feeds.v1beta1.GenesisState} + */ +proto.band.feeds.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.feeds.v1beta1.GenesisState; + return proto.band.feeds.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.feeds.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.feeds.v1beta1.GenesisState} + */ +proto.band.feeds.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_feeds_v1beta1_params_pb.Params; + reader.readMessage(value,band_feeds_v1beta1_params_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new band_feeds_v1beta1_feeds_pb.Vote; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Vote.deserializeBinaryFromReader); + msg.addVotes(value); + break; + case 3: + var value = new band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.deserializeBinaryFromReader); + msg.setReferenceSourceConfig(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.feeds.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.feeds.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.feeds.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.feeds.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_feeds_v1beta1_params_pb.Params.serializeBinaryToWriter + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_feeds_v1beta1_feeds_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getReferenceSourceConfig(); + if (f != null) { + writer.writeMessage( + 3, + f, + band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.feeds.v1beta1.Params} + */ +proto.band.feeds.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.band.feeds.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_feeds_v1beta1_params_pb.Params, 1)); +}; + + +/** + * @param {?proto.band.feeds.v1beta1.Params|undefined} value + * @return {!proto.band.feeds.v1beta1.GenesisState} returns this +*/ +proto.band.feeds.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.feeds.v1beta1.GenesisState} returns this + */ +proto.band.feeds.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.feeds.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Vote votes = 2; + * @return {!Array} + */ +proto.band.feeds.v1beta1.GenesisState.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Vote, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.GenesisState} returns this +*/ +proto.band.feeds.v1beta1.GenesisState.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Vote=} opt_value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.Vote} + */ +proto.band.feeds.v1beta1.GenesisState.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.feeds.v1beta1.Vote, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.feeds.v1beta1.GenesisState} returns this + */ +proto.band.feeds.v1beta1.GenesisState.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + +/** + * optional ReferenceSourceConfig reference_source_config = 3; + * @return {?proto.band.feeds.v1beta1.ReferenceSourceConfig} + */ +proto.band.feeds.v1beta1.GenesisState.prototype.getReferenceSourceConfig = function() { + return /** @type{?proto.band.feeds.v1beta1.ReferenceSourceConfig} */ ( + jspb.Message.getWrapperField(this, band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig, 3)); +}; + + +/** + * @param {?proto.band.feeds.v1beta1.ReferenceSourceConfig|undefined} value + * @return {!proto.band.feeds.v1beta1.GenesisState} returns this +*/ +proto.band.feeds.v1beta1.GenesisState.prototype.setReferenceSourceConfig = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.feeds.v1beta1.GenesisState} returns this + */ +proto.band.feeds.v1beta1.GenesisState.prototype.clearReferenceSourceConfig = function() { + return this.setReferenceSourceConfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.feeds.v1beta1.GenesisState.prototype.hasReferenceSourceConfig = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.band.feeds.v1beta1); diff --git a/codegen/band/feeds/v1beta1/genesis_pb_service.d.ts b/codegen/band/feeds/v1beta1/genesis_pb_service.d.ts new file mode 100644 index 0000000..4d253fd --- /dev/null +++ b/codegen/band/feeds/v1beta1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/genesis.proto + diff --git a/codegen/band/feeds/v1beta1/genesis_pb_service.js b/codegen/band/feeds/v1beta1/genesis_pb_service.js new file mode 100644 index 0000000..4d253fd --- /dev/null +++ b/codegen/band/feeds/v1beta1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/genesis.proto + diff --git a/codegen/band/feeds/v1beta1/params.ts b/codegen/band/feeds/v1beta1/params.ts new file mode 100644 index 0000000..ef53bdb --- /dev/null +++ b/codegen/band/feeds/v1beta1/params.ts @@ -0,0 +1,353 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/feeds/v1beta1/params.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +export namespace band.feeds.v1beta1 { + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + allowable_block_time_discrepancy?: number; + grace_period?: number; + min_interval?: number; + max_interval?: number; + power_step_threshold?: number; + max_current_feeds?: number; + cooldown_time?: number; + min_deviation_basis_point?: number; + max_deviation_basis_point?: number; + current_feeds_update_interval?: number; + price_quorum?: string; + max_signal_ids_per_signing?: 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 ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("allowable_block_time_discrepancy" in data && data.allowable_block_time_discrepancy != undefined) { + this.allowable_block_time_discrepancy = data.allowable_block_time_discrepancy; + } + if ("grace_period" in data && data.grace_period != undefined) { + this.grace_period = data.grace_period; + } + if ("min_interval" in data && data.min_interval != undefined) { + this.min_interval = data.min_interval; + } + if ("max_interval" in data && data.max_interval != undefined) { + this.max_interval = data.max_interval; + } + if ("power_step_threshold" in data && data.power_step_threshold != undefined) { + this.power_step_threshold = data.power_step_threshold; + } + if ("max_current_feeds" in data && data.max_current_feeds != undefined) { + this.max_current_feeds = data.max_current_feeds; + } + if ("cooldown_time" in data && data.cooldown_time != undefined) { + this.cooldown_time = data.cooldown_time; + } + if ("min_deviation_basis_point" in data && data.min_deviation_basis_point != undefined) { + this.min_deviation_basis_point = data.min_deviation_basis_point; + } + if ("max_deviation_basis_point" in data && data.max_deviation_basis_point != undefined) { + this.max_deviation_basis_point = data.max_deviation_basis_point; + } + if ("current_feeds_update_interval" in data && data.current_feeds_update_interval != undefined) { + this.current_feeds_update_interval = data.current_feeds_update_interval; + } + if ("price_quorum" in data && data.price_quorum != undefined) { + this.price_quorum = data.price_quorum; + } + if ("max_signal_ids_per_signing" in data && data.max_signal_ids_per_signing != undefined) { + this.max_signal_ids_per_signing = data.max_signal_ids_per_signing; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get allowable_block_time_discrepancy() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set allowable_block_time_discrepancy(value: number) { + pb_1.Message.setField(this, 2, value); + } + get grace_period() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set grace_period(value: number) { + pb_1.Message.setField(this, 3, value); + } + get min_interval() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set min_interval(value: number) { + pb_1.Message.setField(this, 4, value); + } + get max_interval() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set max_interval(value: number) { + pb_1.Message.setField(this, 5, value); + } + get power_step_threshold() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set power_step_threshold(value: number) { + pb_1.Message.setField(this, 6, value); + } + get max_current_feeds() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set max_current_feeds(value: number) { + pb_1.Message.setField(this, 7, value); + } + get cooldown_time() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set cooldown_time(value: number) { + pb_1.Message.setField(this, 8, value); + } + get min_deviation_basis_point() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set min_deviation_basis_point(value: number) { + pb_1.Message.setField(this, 9, value); + } + get max_deviation_basis_point() { + return pb_1.Message.getFieldWithDefault(this, 10, 0) as number; + } + set max_deviation_basis_point(value: number) { + pb_1.Message.setField(this, 10, value); + } + get current_feeds_update_interval() { + return pb_1.Message.getFieldWithDefault(this, 11, 0) as number; + } + set current_feeds_update_interval(value: number) { + pb_1.Message.setField(this, 11, value); + } + get price_quorum() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set price_quorum(value: string) { + pb_1.Message.setField(this, 12, value); + } + get max_signal_ids_per_signing() { + return pb_1.Message.getFieldWithDefault(this, 13, 0) as number; + } + set max_signal_ids_per_signing(value: number) { + pb_1.Message.setField(this, 13, value); + } + static fromObject(data: { + admin?: string; + allowable_block_time_discrepancy?: number; + grace_period?: number; + min_interval?: number; + max_interval?: number; + power_step_threshold?: number; + max_current_feeds?: number; + cooldown_time?: number; + min_deviation_basis_point?: number; + max_deviation_basis_point?: number; + current_feeds_update_interval?: number; + price_quorum?: string; + max_signal_ids_per_signing?: number; + }): Params { + const message = new Params({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.allowable_block_time_discrepancy != null) { + message.allowable_block_time_discrepancy = data.allowable_block_time_discrepancy; + } + if (data.grace_period != null) { + message.grace_period = data.grace_period; + } + if (data.min_interval != null) { + message.min_interval = data.min_interval; + } + if (data.max_interval != null) { + message.max_interval = data.max_interval; + } + if (data.power_step_threshold != null) { + message.power_step_threshold = data.power_step_threshold; + } + if (data.max_current_feeds != null) { + message.max_current_feeds = data.max_current_feeds; + } + if (data.cooldown_time != null) { + message.cooldown_time = data.cooldown_time; + } + if (data.min_deviation_basis_point != null) { + message.min_deviation_basis_point = data.min_deviation_basis_point; + } + if (data.max_deviation_basis_point != null) { + message.max_deviation_basis_point = data.max_deviation_basis_point; + } + if (data.current_feeds_update_interval != null) { + message.current_feeds_update_interval = data.current_feeds_update_interval; + } + if (data.price_quorum != null) { + message.price_quorum = data.price_quorum; + } + if (data.max_signal_ids_per_signing != null) { + message.max_signal_ids_per_signing = data.max_signal_ids_per_signing; + } + return message; + } + toObject() { + const data: { + admin?: string; + allowable_block_time_discrepancy?: number; + grace_period?: number; + min_interval?: number; + max_interval?: number; + power_step_threshold?: number; + max_current_feeds?: number; + cooldown_time?: number; + min_deviation_basis_point?: number; + max_deviation_basis_point?: number; + current_feeds_update_interval?: number; + price_quorum?: string; + max_signal_ids_per_signing?: number; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.allowable_block_time_discrepancy != null) { + data.allowable_block_time_discrepancy = this.allowable_block_time_discrepancy; + } + if (this.grace_period != null) { + data.grace_period = this.grace_period; + } + if (this.min_interval != null) { + data.min_interval = this.min_interval; + } + if (this.max_interval != null) { + data.max_interval = this.max_interval; + } + if (this.power_step_threshold != null) { + data.power_step_threshold = this.power_step_threshold; + } + if (this.max_current_feeds != null) { + data.max_current_feeds = this.max_current_feeds; + } + if (this.cooldown_time != null) { + data.cooldown_time = this.cooldown_time; + } + if (this.min_deviation_basis_point != null) { + data.min_deviation_basis_point = this.min_deviation_basis_point; + } + if (this.max_deviation_basis_point != null) { + data.max_deviation_basis_point = this.max_deviation_basis_point; + } + if (this.current_feeds_update_interval != null) { + data.current_feeds_update_interval = this.current_feeds_update_interval; + } + if (this.price_quorum != null) { + data.price_quorum = this.price_quorum; + } + if (this.max_signal_ids_per_signing != null) { + data.max_signal_ids_per_signing = this.max_signal_ids_per_signing; + } + 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.admin.length) + writer.writeString(1, this.admin); + if (this.allowable_block_time_discrepancy != 0) + writer.writeInt64(2, this.allowable_block_time_discrepancy); + if (this.grace_period != 0) + writer.writeInt64(3, this.grace_period); + if (this.min_interval != 0) + writer.writeInt64(4, this.min_interval); + if (this.max_interval != 0) + writer.writeInt64(5, this.max_interval); + if (this.power_step_threshold != 0) + writer.writeInt64(6, this.power_step_threshold); + if (this.max_current_feeds != 0) + writer.writeUint64(7, this.max_current_feeds); + if (this.cooldown_time != 0) + writer.writeInt64(8, this.cooldown_time); + if (this.min_deviation_basis_point != 0) + writer.writeInt64(9, this.min_deviation_basis_point); + if (this.max_deviation_basis_point != 0) + writer.writeInt64(10, this.max_deviation_basis_point); + if (this.current_feeds_update_interval != 0) + writer.writeInt64(11, this.current_feeds_update_interval); + if (this.price_quorum.length) + writer.writeString(12, this.price_quorum); + if (this.max_signal_ids_per_signing != 0) + writer.writeUint64(13, this.max_signal_ids_per_signing); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + message.allowable_block_time_discrepancy = reader.readInt64(); + break; + case 3: + message.grace_period = reader.readInt64(); + break; + case 4: + message.min_interval = reader.readInt64(); + break; + case 5: + message.max_interval = reader.readInt64(); + break; + case 6: + message.power_step_threshold = reader.readInt64(); + break; + case 7: + message.max_current_feeds = reader.readUint64(); + break; + case 8: + message.cooldown_time = reader.readInt64(); + break; + case 9: + message.min_deviation_basis_point = reader.readInt64(); + break; + case 10: + message.max_deviation_basis_point = reader.readInt64(); + break; + case 11: + message.current_feeds_update_interval = reader.readInt64(); + break; + case 12: + message.price_quorum = reader.readString(); + break; + case 13: + message.max_signal_ids_per_signing = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/proto/feeds/v1beta1/params_pb.d.ts b/codegen/band/feeds/v1beta1/params_pb.d.ts similarity index 81% rename from proto/feeds/v1beta1/params_pb.d.ts rename to codegen/band/feeds/v1beta1/params_pb.d.ts index 21f2ea0..87f6cad 100644 --- a/proto/feeds/v1beta1/params_pb.d.ts +++ b/codegen/band/feeds/v1beta1/params_pb.d.ts @@ -1,9 +1,9 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/params.proto +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/params.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as cosmos_proto_cosmos_pb from "../../cosmos_proto/cosmos_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; export class Params extends jspb.Message { getAdmin(): string; @@ -39,6 +39,12 @@ export class Params extends jspb.Message { getCurrentFeedsUpdateInterval(): number; setCurrentFeedsUpdateInterval(value: number): void; + getPriceQuorum(): string; + setPriceQuorum(value: string): void; + + getMaxSignalIdsPerSigning(): number; + setMaxSignalIdsPerSigning(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Params.AsObject; static toObject(includeInstance: boolean, msg: Params): Params.AsObject; @@ -62,6 +68,8 @@ export namespace Params { minDeviationBasisPoint: number, maxDeviationBasisPoint: number, currentFeedsUpdateInterval: number, + priceQuorum: string, + maxSignalIdsPerSigning: number, } } diff --git a/proto/feeds/v1beta1/params_pb.js b/codegen/band/feeds/v1beta1/params_pb.js similarity index 61% rename from proto/feeds/v1beta1/params_pb.js rename to codegen/band/feeds/v1beta1/params_pb.js index 298a0fa..6eb6012 100644 --- a/proto/feeds/v1beta1/params_pb.js +++ b/codegen/band/feeds/v1beta1/params_pb.js @@ -1,4 +1,4 @@ -// source: feeds/v1beta1/params.proto +// source: band/feeds/v1beta1/params.proto /** * @fileoverview * @enhanceable @@ -13,19 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js'); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); -goog.exportSymbol('proto.feeds.v1beta1.Params', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.Params', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -36,16 +30,16 @@ goog.exportSymbol('proto.feeds.v1beta1.Params', null, global); * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.Params = function(opt_data) { +proto.band.feeds.v1beta1.Params = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.Params, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.Params, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.Params.displayName = 'proto.feeds.v1beta1.Params'; + proto.band.feeds.v1beta1.Params.displayName = 'proto.band.feeds.v1beta1.Params'; } @@ -63,8 +57,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.Params.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.Params.toObject(opt_includeInstance, this); }; @@ -73,11 +67,11 @@ proto.feeds.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.Params} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.Params} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.Params.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.Params.toObject = function(includeInstance, msg) { var f, obj = { admin: jspb.Message.getFieldWithDefault(msg, 1, ""), allowableBlockTimeDiscrepancy: jspb.Message.getFieldWithDefault(msg, 2, 0), @@ -89,7 +83,9 @@ proto.feeds.v1beta1.Params.toObject = function(includeInstance, msg) { cooldownTime: jspb.Message.getFieldWithDefault(msg, 8, 0), minDeviationBasisPoint: jspb.Message.getFieldWithDefault(msg, 9, 0), maxDeviationBasisPoint: jspb.Message.getFieldWithDefault(msg, 10, 0), - currentFeedsUpdateInterval: jspb.Message.getFieldWithDefault(msg, 11, 0) + currentFeedsUpdateInterval: jspb.Message.getFieldWithDefault(msg, 11, 0), + priceQuorum: jspb.Message.getFieldWithDefault(msg, 12, ""), + maxSignalIdsPerSigning: jspb.Message.getFieldWithDefault(msg, 13, 0) }; if (includeInstance) { @@ -103,23 +99,23 @@ proto.feeds.v1beta1.Params.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.Params} + * @return {!proto.band.feeds.v1beta1.Params} */ -proto.feeds.v1beta1.Params.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.Params.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.Params; - return proto.feeds.v1beta1.Params.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.Params; + return proto.band.feeds.v1beta1.Params.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.Params} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.Params} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.Params} + * @return {!proto.band.feeds.v1beta1.Params} */ -proto.feeds.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -170,6 +166,14 @@ proto.feeds.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {number} */ (reader.readInt64()); msg.setCurrentFeedsUpdateInterval(value); break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setPriceQuorum(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxSignalIdsPerSigning(value); + break; default: reader.skipField(); break; @@ -183,9 +187,9 @@ proto.feeds.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.Params.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.Params.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.Params.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.Params.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -193,11 +197,11 @@ proto.feeds.v1beta1.Params.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.Params} message + * @param {!proto.band.feeds.v1beta1.Params} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAdmin(); if (f.length > 0) { @@ -276,6 +280,20 @@ proto.feeds.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getPriceQuorum(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getMaxSignalIdsPerSigning(); + if (f !== 0) { + writer.writeUint64( + 13, + f + ); + } }; @@ -283,16 +301,16 @@ proto.feeds.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { * optional string admin = 1; * @return {string} */ -proto.feeds.v1beta1.Params.prototype.getAdmin = function() { +proto.band.feeds.v1beta1.Params.prototype.getAdmin = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setAdmin = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setAdmin = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -301,16 +319,16 @@ proto.feeds.v1beta1.Params.prototype.setAdmin = function(value) { * optional int64 allowable_block_time_discrepancy = 2; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getAllowableBlockTimeDiscrepancy = function() { +proto.band.feeds.v1beta1.Params.prototype.getAllowableBlockTimeDiscrepancy = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setAllowableBlockTimeDiscrepancy = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setAllowableBlockTimeDiscrepancy = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; @@ -319,16 +337,16 @@ proto.feeds.v1beta1.Params.prototype.setAllowableBlockTimeDiscrepancy = function * optional int64 grace_period = 3; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getGracePeriod = function() { +proto.band.feeds.v1beta1.Params.prototype.getGracePeriod = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setGracePeriod = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setGracePeriod = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -337,16 +355,16 @@ proto.feeds.v1beta1.Params.prototype.setGracePeriod = function(value) { * optional int64 min_interval = 4; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getMinInterval = function() { +proto.band.feeds.v1beta1.Params.prototype.getMinInterval = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setMinInterval = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setMinInterval = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; @@ -355,16 +373,16 @@ proto.feeds.v1beta1.Params.prototype.setMinInterval = function(value) { * optional int64 max_interval = 5; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getMaxInterval = function() { +proto.band.feeds.v1beta1.Params.prototype.getMaxInterval = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setMaxInterval = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setMaxInterval = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; @@ -373,16 +391,16 @@ proto.feeds.v1beta1.Params.prototype.setMaxInterval = function(value) { * optional int64 power_step_threshold = 6; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getPowerStepThreshold = function() { +proto.band.feeds.v1beta1.Params.prototype.getPowerStepThreshold = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setPowerStepThreshold = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setPowerStepThreshold = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; @@ -391,16 +409,16 @@ proto.feeds.v1beta1.Params.prototype.setPowerStepThreshold = function(value) { * optional uint64 max_current_feeds = 7; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getMaxCurrentFeeds = function() { +proto.band.feeds.v1beta1.Params.prototype.getMaxCurrentFeeds = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setMaxCurrentFeeds = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setMaxCurrentFeeds = function(value) { return jspb.Message.setProto3IntField(this, 7, value); }; @@ -409,16 +427,16 @@ proto.feeds.v1beta1.Params.prototype.setMaxCurrentFeeds = function(value) { * optional int64 cooldown_time = 8; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getCooldownTime = function() { +proto.band.feeds.v1beta1.Params.prototype.getCooldownTime = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setCooldownTime = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setCooldownTime = function(value) { return jspb.Message.setProto3IntField(this, 8, value); }; @@ -427,16 +445,16 @@ proto.feeds.v1beta1.Params.prototype.setCooldownTime = function(value) { * optional int64 min_deviation_basis_point = 9; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getMinDeviationBasisPoint = function() { +proto.band.feeds.v1beta1.Params.prototype.getMinDeviationBasisPoint = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setMinDeviationBasisPoint = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setMinDeviationBasisPoint = function(value) { return jspb.Message.setProto3IntField(this, 9, value); }; @@ -445,16 +463,16 @@ proto.feeds.v1beta1.Params.prototype.setMinDeviationBasisPoint = function(value) * optional int64 max_deviation_basis_point = 10; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getMaxDeviationBasisPoint = function() { +proto.band.feeds.v1beta1.Params.prototype.getMaxDeviationBasisPoint = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setMaxDeviationBasisPoint = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setMaxDeviationBasisPoint = function(value) { return jspb.Message.setProto3IntField(this, 10, value); }; @@ -463,18 +481,54 @@ proto.feeds.v1beta1.Params.prototype.setMaxDeviationBasisPoint = function(value) * optional int64 current_feeds_update_interval = 11; * @return {number} */ -proto.feeds.v1beta1.Params.prototype.getCurrentFeedsUpdateInterval = function() { +proto.band.feeds.v1beta1.Params.prototype.getCurrentFeedsUpdateInterval = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.Params} returns this + * @return {!proto.band.feeds.v1beta1.Params} returns this */ -proto.feeds.v1beta1.Params.prototype.setCurrentFeedsUpdateInterval = function(value) { +proto.band.feeds.v1beta1.Params.prototype.setCurrentFeedsUpdateInterval = function(value) { return jspb.Message.setProto3IntField(this, 11, value); }; -goog.object.extend(exports, proto.feeds.v1beta1); +/** + * optional string price_quorum = 12; + * @return {string} + */ +proto.band.feeds.v1beta1.Params.prototype.getPriceQuorum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.feeds.v1beta1.Params} returns this + */ +proto.band.feeds.v1beta1.Params.prototype.setPriceQuorum = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional uint64 max_signal_ids_per_signing = 13; + * @return {number} + */ +proto.band.feeds.v1beta1.Params.prototype.getMaxSignalIdsPerSigning = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.feeds.v1beta1.Params} returns this + */ +proto.band.feeds.v1beta1.Params.prototype.setMaxSignalIdsPerSigning = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +goog.object.extend(exports, proto.band.feeds.v1beta1); diff --git a/codegen/band/feeds/v1beta1/params_pb_service.d.ts b/codegen/band/feeds/v1beta1/params_pb_service.d.ts new file mode 100644 index 0000000..89fb277 --- /dev/null +++ b/codegen/band/feeds/v1beta1/params_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/params.proto + diff --git a/codegen/band/feeds/v1beta1/params_pb_service.js b/codegen/band/feeds/v1beta1/params_pb_service.js new file mode 100644 index 0000000..89fb277 --- /dev/null +++ b/codegen/band/feeds/v1beta1/params_pb_service.js @@ -0,0 +1,3 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/params.proto + diff --git a/codegen/band/feeds/v1beta1/query.ts b/codegen/band/feeds/v1beta1/query.ts new file mode 100644 index 0000000..2b340f6 --- /dev/null +++ b/codegen/band/feeds/v1beta1/query.ts @@ -0,0 +1,1724 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/feeds/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/api/annotations"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../../cosmos/base/query/v1beta1/pagination"; +import * as dependency_5 from "./feeds"; +import * as dependency_6 from "./params"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.feeds.v1beta1 { + export class QueryCurrentFeedsRequest 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: {}): QueryCurrentFeedsRequest { + const message = new QueryCurrentFeedsRequest({}); + 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): QueryCurrentFeedsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCurrentFeedsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCurrentFeedsRequest { + return QueryCurrentFeedsRequest.deserialize(bytes); + } + } + export class QueryCurrentFeedsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + current_feeds?: dependency_5.band.feeds.v1beta1.CurrentFeedWithDeviations; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("current_feeds" in data && data.current_feeds != undefined) { + this.current_feeds = data.current_feeds; + } + } + } + get current_feeds() { + return pb_1.Message.getWrapperField(this, dependency_5.band.feeds.v1beta1.CurrentFeedWithDeviations, 1) as dependency_5.band.feeds.v1beta1.CurrentFeedWithDeviations; + } + set current_feeds(value: dependency_5.band.feeds.v1beta1.CurrentFeedWithDeviations) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_current_feeds() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + current_feeds?: ReturnType; + }): QueryCurrentFeedsResponse { + const message = new QueryCurrentFeedsResponse({}); + if (data.current_feeds != null) { + message.current_feeds = dependency_5.band.feeds.v1beta1.CurrentFeedWithDeviations.fromObject(data.current_feeds); + } + return message; + } + toObject() { + const data: { + current_feeds?: ReturnType; + } = {}; + if (this.current_feeds != null) { + data.current_feeds = this.current_feeds.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_current_feeds) + writer.writeMessage(1, this.current_feeds, () => this.current_feeds.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCurrentFeedsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCurrentFeedsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.current_feeds, () => message.current_feeds = dependency_5.band.feeds.v1beta1.CurrentFeedWithDeviations.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCurrentFeedsResponse { + return QueryCurrentFeedsResponse.deserialize(bytes); + } + } + export class QueryIsFeederRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: string; + feeder?: 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 ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("feeder" in data && data.feeder != undefined) { + this.feeder = data.feeder; + } + } + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 1, value); + } + get feeder() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set feeder(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + validator?: string; + feeder?: string; + }): QueryIsFeederRequest { + const message = new QueryIsFeederRequest({}); + if (data.validator != null) { + message.validator = data.validator; + } + if (data.feeder != null) { + message.feeder = data.feeder; + } + return message; + } + toObject() { + const data: { + validator?: string; + feeder?: string; + } = {}; + if (this.validator != null) { + data.validator = this.validator; + } + if (this.feeder != null) { + data.feeder = this.feeder; + } + 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.validator.length) + writer.writeString(1, this.validator); + if (this.feeder.length) + writer.writeString(2, this.feeder); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIsFeederRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIsFeederRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator = reader.readString(); + break; + case 2: + message.feeder = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIsFeederRequest { + return QueryIsFeederRequest.deserialize(bytes); + } + } + export class QueryIsFeederResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + is_feeder?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("is_feeder" in data && data.is_feeder != undefined) { + this.is_feeder = data.is_feeder; + } + } + } + get is_feeder() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set is_feeder(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + is_feeder?: boolean; + }): QueryIsFeederResponse { + const message = new QueryIsFeederResponse({}); + if (data.is_feeder != null) { + message.is_feeder = data.is_feeder; + } + return message; + } + toObject() { + const data: { + is_feeder?: boolean; + } = {}; + if (this.is_feeder != null) { + data.is_feeder = this.is_feeder; + } + 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.is_feeder != false) + writer.writeBool(1, this.is_feeder); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIsFeederResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIsFeederResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.is_feeder = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIsFeederResponse { + return QueryIsFeederResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_6.band.feeds.v1beta1.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_6.band.feeds.v1beta1.Params, 1) as dependency_6.band.feeds.v1beta1.Params; + } + set params(value: dependency_6.band.feeds.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_6.band.feeds.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_6.band.feeds.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QueryPriceRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_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 ("signal_id" in data && data.signal_id != undefined) { + this.signal_id = data.signal_id; + } + } + } + get signal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signal_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + signal_id?: string; + }): QueryPriceRequest { + const message = new QueryPriceRequest({}); + if (data.signal_id != null) { + message.signal_id = data.signal_id; + } + return message; + } + toObject() { + const data: { + signal_id?: string; + } = {}; + if (this.signal_id != null) { + data.signal_id = this.signal_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.signal_id.length) + writer.writeString(1, this.signal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPriceRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPriceRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signal_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPriceRequest { + return QueryPriceRequest.deserialize(bytes); + } + } + export class QueryPriceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + price?: dependency_5.band.feeds.v1beta1.Price; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("price" in data && data.price != undefined) { + this.price = data.price; + } + } + } + get price() { + return pb_1.Message.getWrapperField(this, dependency_5.band.feeds.v1beta1.Price, 1) as dependency_5.band.feeds.v1beta1.Price; + } + set price(value: dependency_5.band.feeds.v1beta1.Price) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_price() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + price?: ReturnType; + }): QueryPriceResponse { + const message = new QueryPriceResponse({}); + if (data.price != null) { + message.price = dependency_5.band.feeds.v1beta1.Price.fromObject(data.price); + } + return message; + } + toObject() { + const data: { + price?: ReturnType; + } = {}; + if (this.price != null) { + data.price = this.price.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_price) + writer.writeMessage(1, this.price, () => this.price.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPriceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPriceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.price, () => message.price = dependency_5.band.feeds.v1beta1.Price.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPriceResponse { + return QueryPriceResponse.deserialize(bytes); + } + } + export class QueryPricesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_ids?: string[]; + }) { + 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 ("signal_ids" in data && data.signal_ids != undefined) { + this.signal_ids = data.signal_ids; + } + } + } + get signal_ids() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set signal_ids(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + signal_ids?: string[]; + }): QueryPricesRequest { + const message = new QueryPricesRequest({}); + if (data.signal_ids != null) { + message.signal_ids = data.signal_ids; + } + return message; + } + toObject() { + const data: { + signal_ids?: string[]; + } = {}; + if (this.signal_ids != null) { + data.signal_ids = this.signal_ids; + } + 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.signal_ids.length) + writer.writeRepeatedString(1, this.signal_ids); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPricesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPricesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPricesRequest { + return QueryPricesRequest.deserialize(bytes); + } + } + export class QueryPricesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + prices?: dependency_5.band.feeds.v1beta1.Price[]; + }) { + 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 ("prices" in data && data.prices != undefined) { + this.prices = data.prices; + } + } + } + get prices() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.feeds.v1beta1.Price, 1) as dependency_5.band.feeds.v1beta1.Price[]; + } + set prices(value: dependency_5.band.feeds.v1beta1.Price[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + prices?: ReturnType[]; + }): QueryPricesResponse { + const message = new QueryPricesResponse({}); + if (data.prices != null) { + message.prices = data.prices.map(item => dependency_5.band.feeds.v1beta1.Price.fromObject(item)); + } + return message; + } + toObject() { + const data: { + prices?: ReturnType[]; + } = {}; + if (this.prices != null) { + data.prices = this.prices.map((item: dependency_5.band.feeds.v1beta1.Price) => item.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.prices.length) + writer.writeRepeatedMessage(1, this.prices, (item: dependency_5.band.feeds.v1beta1.Price) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPricesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPricesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.prices, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.feeds.v1beta1.Price.deserialize(reader), dependency_5.band.feeds.v1beta1.Price)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPricesResponse { + return QueryPricesResponse.deserialize(bytes); + } + } + export class QueryAllPricesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_4.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_4.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.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; + }): QueryAllPricesRequest { + const message = new QueryAllPricesRequest({}); + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryAllPricesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllPricesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllPricesRequest { + return QueryAllPricesRequest.deserialize(bytes); + } + } + export class QueryAllPricesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + prices?: dependency_5.band.feeds.v1beta1.Price[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("prices" in data && data.prices != undefined) { + this.prices = data.prices; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get prices() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.feeds.v1beta1.Price, 1) as dependency_5.band.feeds.v1beta1.Price[]; + } + set prices(value: dependency_5.band.feeds.v1beta1.Price[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + prices?: ReturnType[]; + pagination?: ReturnType; + }): QueryAllPricesResponse { + const message = new QueryAllPricesResponse({}); + if (data.prices != null) { + message.prices = data.prices.map(item => dependency_5.band.feeds.v1beta1.Price.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + prices?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.prices != null) { + data.prices = this.prices.map((item: dependency_5.band.feeds.v1beta1.Price) => item.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.prices.length) + writer.writeRepeatedMessage(1, this.prices, (item: dependency_5.band.feeds.v1beta1.Price) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllPricesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllPricesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.prices, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.feeds.v1beta1.Price.deserialize(reader), dependency_5.band.feeds.v1beta1.Price)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllPricesResponse { + return QueryAllPricesResponse.deserialize(bytes); + } + } + export class QueryReferenceSourceConfigRequest 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: {}): QueryReferenceSourceConfigRequest { + const message = new QueryReferenceSourceConfigRequest({}); + 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): QueryReferenceSourceConfigRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryReferenceSourceConfigRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryReferenceSourceConfigRequest { + return QueryReferenceSourceConfigRequest.deserialize(bytes); + } + } + export class QueryReferenceSourceConfigResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + reference_source_config?: dependency_5.band.feeds.v1beta1.ReferenceSourceConfig; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("reference_source_config" in data && data.reference_source_config != undefined) { + this.reference_source_config = data.reference_source_config; + } + } + } + get reference_source_config() { + return pb_1.Message.getWrapperField(this, dependency_5.band.feeds.v1beta1.ReferenceSourceConfig, 1) as dependency_5.band.feeds.v1beta1.ReferenceSourceConfig; + } + set reference_source_config(value: dependency_5.band.feeds.v1beta1.ReferenceSourceConfig) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_reference_source_config() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + reference_source_config?: ReturnType; + }): QueryReferenceSourceConfigResponse { + const message = new QueryReferenceSourceConfigResponse({}); + if (data.reference_source_config != null) { + message.reference_source_config = dependency_5.band.feeds.v1beta1.ReferenceSourceConfig.fromObject(data.reference_source_config); + } + return message; + } + toObject() { + const data: { + reference_source_config?: ReturnType; + } = {}; + if (this.reference_source_config != null) { + data.reference_source_config = this.reference_source_config.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_reference_source_config) + writer.writeMessage(1, this.reference_source_config, () => this.reference_source_config.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryReferenceSourceConfigResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryReferenceSourceConfigResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.reference_source_config, () => message.reference_source_config = dependency_5.band.feeds.v1beta1.ReferenceSourceConfig.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryReferenceSourceConfigResponse { + return QueryReferenceSourceConfigResponse.deserialize(bytes); + } + } + export class QuerySignalTotalPowersRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_ids?: string[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageRequest; + }) { + 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 ("signal_ids" in data && data.signal_ids != undefined) { + this.signal_ids = data.signal_ids; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get signal_ids() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set signal_ids(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + signal_ids?: string[]; + pagination?: ReturnType; + }): QuerySignalTotalPowersRequest { + const message = new QuerySignalTotalPowersRequest({}); + if (data.signal_ids != null) { + message.signal_ids = data.signal_ids; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + signal_ids?: string[]; + pagination?: ReturnType; + } = {}; + if (this.signal_ids != null) { + data.signal_ids = this.signal_ids; + } + 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.signal_ids.length) + writer.writeRepeatedString(1, this.signal_ids); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySignalTotalPowersRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySignalTotalPowersRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySignalTotalPowersRequest { + return QuerySignalTotalPowersRequest.deserialize(bytes); + } + } + export class QuerySignalTotalPowersResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_total_powers?: dependency_5.band.feeds.v1beta1.Signal[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("signal_total_powers" in data && data.signal_total_powers != undefined) { + this.signal_total_powers = data.signal_total_powers; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get signal_total_powers() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.feeds.v1beta1.Signal, 1) as dependency_5.band.feeds.v1beta1.Signal[]; + } + set signal_total_powers(value: dependency_5.band.feeds.v1beta1.Signal[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + signal_total_powers?: ReturnType[]; + pagination?: ReturnType; + }): QuerySignalTotalPowersResponse { + const message = new QuerySignalTotalPowersResponse({}); + if (data.signal_total_powers != null) { + message.signal_total_powers = data.signal_total_powers.map(item => dependency_5.band.feeds.v1beta1.Signal.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + signal_total_powers?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.signal_total_powers != null) { + data.signal_total_powers = this.signal_total_powers.map((item: dependency_5.band.feeds.v1beta1.Signal) => item.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.signal_total_powers.length) + writer.writeRepeatedMessage(1, this.signal_total_powers, (item: dependency_5.band.feeds.v1beta1.Signal) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySignalTotalPowersResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySignalTotalPowersResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signal_total_powers, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.feeds.v1beta1.Signal.deserialize(reader), dependency_5.band.feeds.v1beta1.Signal)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySignalTotalPowersResponse { + return QuerySignalTotalPowersResponse.deserialize(bytes); + } + } + export class QueryValidValidatorRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: 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 ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + } + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator?: string; + }): QueryValidValidatorRequest { + const message = new QueryValidValidatorRequest({}); + if (data.validator != null) { + message.validator = data.validator; + } + return message; + } + toObject() { + const data: { + validator?: string; + } = {}; + if (this.validator != null) { + data.validator = this.validator; + } + 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.validator.length) + writer.writeString(1, this.validator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidValidatorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidValidatorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidValidatorRequest { + return QueryValidValidatorRequest.deserialize(bytes); + } + } + export class QueryValidValidatorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + valid?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("valid" in data && data.valid != undefined) { + this.valid = data.valid; + } + } + } + get valid() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set valid(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + valid?: boolean; + }): QueryValidValidatorResponse { + const message = new QueryValidValidatorResponse({}); + if (data.valid != null) { + message.valid = data.valid; + } + return message; + } + toObject() { + const data: { + valid?: boolean; + } = {}; + if (this.valid != null) { + data.valid = this.valid; + } + 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.valid != false) + writer.writeBool(1, this.valid); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidValidatorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidValidatorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.valid = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidValidatorResponse { + return QueryValidValidatorResponse.deserialize(bytes); + } + } + export class QueryValidatorPricesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: string; + signal_ids?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("signal_ids" in data && data.signal_ids != undefined) { + this.signal_ids = data.signal_ids; + } + } + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 1, value); + } + get signal_ids() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set signal_ids(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + validator?: string; + signal_ids?: string[]; + }): QueryValidatorPricesRequest { + const message = new QueryValidatorPricesRequest({}); + if (data.validator != null) { + message.validator = data.validator; + } + if (data.signal_ids != null) { + message.signal_ids = data.signal_ids; + } + return message; + } + toObject() { + const data: { + validator?: string; + signal_ids?: string[]; + } = {}; + if (this.validator != null) { + data.validator = this.validator; + } + if (this.signal_ids != null) { + data.signal_ids = this.signal_ids; + } + 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.validator.length) + writer.writeString(1, this.validator); + if (this.signal_ids.length) + writer.writeRepeatedString(2, this.signal_ids); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorPricesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorPricesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorPricesRequest { + return QueryValidatorPricesRequest.deserialize(bytes); + } + } + export class QueryValidatorPricesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_prices?: dependency_5.band.feeds.v1beta1.ValidatorPrice[]; + }) { + 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 ("validator_prices" in data && data.validator_prices != undefined) { + this.validator_prices = data.validator_prices; + } + } + } + get validator_prices() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.feeds.v1beta1.ValidatorPrice, 1) as dependency_5.band.feeds.v1beta1.ValidatorPrice[]; + } + set validator_prices(value: dependency_5.band.feeds.v1beta1.ValidatorPrice[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + validator_prices?: ReturnType[]; + }): QueryValidatorPricesResponse { + const message = new QueryValidatorPricesResponse({}); + if (data.validator_prices != null) { + message.validator_prices = data.validator_prices.map(item => dependency_5.band.feeds.v1beta1.ValidatorPrice.fromObject(item)); + } + return message; + } + toObject() { + const data: { + validator_prices?: ReturnType[]; + } = {}; + if (this.validator_prices != null) { + data.validator_prices = this.validator_prices.map((item: dependency_5.band.feeds.v1beta1.ValidatorPrice) => item.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.validator_prices.length) + writer.writeRepeatedMessage(1, this.validator_prices, (item: dependency_5.band.feeds.v1beta1.ValidatorPrice) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorPricesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorPricesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validator_prices, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.feeds.v1beta1.ValidatorPrice.deserialize(reader), dependency_5.band.feeds.v1beta1.ValidatorPrice)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorPricesResponse { + return QueryValidatorPricesResponse.deserialize(bytes); + } + } + export class QueryVoteRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + voter?: 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 ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + } + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + voter?: string; + }): QueryVoteRequest { + const message = new QueryVoteRequest({}); + if (data.voter != null) { + message.voter = data.voter; + } + return message; + } + toObject() { + const data: { + voter?: string; + } = {}; + if (this.voter != null) { + data.voter = this.voter; + } + 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.voter.length) + writer.writeString(1, this.voter); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVoteRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVoteRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.voter = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVoteRequest { + return QueryVoteRequest.deserialize(bytes); + } + } + export class QueryVoteResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signals?: dependency_5.band.feeds.v1beta1.Signal[]; + }) { + 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 ("signals" in data && data.signals != undefined) { + this.signals = data.signals; + } + } + } + get signals() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.feeds.v1beta1.Signal, 1) as dependency_5.band.feeds.v1beta1.Signal[]; + } + set signals(value: dependency_5.band.feeds.v1beta1.Signal[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + signals?: ReturnType[]; + }): QueryVoteResponse { + const message = new QueryVoteResponse({}); + if (data.signals != null) { + message.signals = data.signals.map(item => dependency_5.band.feeds.v1beta1.Signal.fromObject(item)); + } + return message; + } + toObject() { + const data: { + signals?: ReturnType[]; + } = {}; + if (this.signals != null) { + data.signals = this.signals.map((item: dependency_5.band.feeds.v1beta1.Signal) => item.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.signals.length) + writer.writeRepeatedMessage(1, this.signals, (item: dependency_5.band.feeds.v1beta1.Signal) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVoteResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVoteResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signals, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.feeds.v1beta1.Signal.deserialize(reader), dependency_5.band.feeds.v1beta1.Signal)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVoteResponse { + return QueryVoteResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + CurrentFeeds: { + path: "/band.feeds.v1beta1.Query/CurrentFeeds", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryCurrentFeedsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryCurrentFeedsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryCurrentFeedsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryCurrentFeedsResponse.deserialize(new Uint8Array(bytes)) + }, + IsFeeder: { + path: "/band.feeds.v1beta1.Query/IsFeeder", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryIsFeederRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryIsFeederRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryIsFeederResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryIsFeederResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/band.feeds.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + Price: { + path: "/band.feeds.v1beta1.Query/Price", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPriceRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPriceRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPriceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPriceResponse.deserialize(new Uint8Array(bytes)) + }, + Prices: { + path: "/band.feeds.v1beta1.Query/Prices", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPricesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPricesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPricesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPricesResponse.deserialize(new Uint8Array(bytes)) + }, + AllPrices: { + path: "/band.feeds.v1beta1.Query/AllPrices", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAllPricesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAllPricesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAllPricesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAllPricesResponse.deserialize(new Uint8Array(bytes)) + }, + ReferenceSourceConfig: { + path: "/band.feeds.v1beta1.Query/ReferenceSourceConfig", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryReferenceSourceConfigRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryReferenceSourceConfigRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryReferenceSourceConfigResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryReferenceSourceConfigResponse.deserialize(new Uint8Array(bytes)) + }, + SignalTotalPowers: { + path: "/band.feeds.v1beta1.Query/SignalTotalPowers", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySignalTotalPowersRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySignalTotalPowersRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySignalTotalPowersResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySignalTotalPowersResponse.deserialize(new Uint8Array(bytes)) + }, + ValidValidator: { + path: "/band.feeds.v1beta1.Query/ValidValidator", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidValidatorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidValidatorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidValidatorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidValidatorResponse.deserialize(new Uint8Array(bytes)) + }, + ValidatorPrices: { + path: "/band.feeds.v1beta1.Query/ValidatorPrices", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorPricesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorPricesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorPricesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorPricesResponse.deserialize(new Uint8Array(bytes)) + }, + Vote: { + path: "/band.feeds.v1beta1.Query/Vote", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVoteRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVoteRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVoteResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVoteResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CurrentFeeds(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract IsFeeder(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Price(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Prices(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AllPrices(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ReferenceSourceConfig(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SignalTotalPowers(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ValidValidator(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ValidatorPrices(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Vote(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CurrentFeeds: GrpcUnaryServiceInterface = (message: QueryCurrentFeedsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CurrentFeeds(message, metadata, options, callback); + }; + IsFeeder: GrpcUnaryServiceInterface = (message: QueryIsFeederRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.IsFeeder(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + Price: GrpcUnaryServiceInterface = (message: QueryPriceRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Price(message, metadata, options, callback); + }; + Prices: GrpcUnaryServiceInterface = (message: QueryPricesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Prices(message, metadata, options, callback); + }; + AllPrices: GrpcUnaryServiceInterface = (message: QueryAllPricesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AllPrices(message, metadata, options, callback); + }; + ReferenceSourceConfig: GrpcUnaryServiceInterface = (message: QueryReferenceSourceConfigRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ReferenceSourceConfig(message, metadata, options, callback); + }; + SignalTotalPowers: GrpcUnaryServiceInterface = (message: QuerySignalTotalPowersRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SignalTotalPowers(message, metadata, options, callback); + }; + ValidValidator: GrpcUnaryServiceInterface = (message: QueryValidValidatorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ValidValidator(message, metadata, options, callback); + }; + ValidatorPrices: GrpcUnaryServiceInterface = (message: QueryValidatorPricesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ValidatorPrices(message, metadata, options, callback); + }; + Vote: GrpcUnaryServiceInterface = (message: QueryVoteRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Vote(message, metadata, options, callback); + }; + } +} diff --git a/proto/feeds/v1beta1/query_pb.d.ts b/codegen/band/feeds/v1beta1/query_pb.d.ts similarity index 75% rename from proto/feeds/v1beta1/query_pb.d.ts rename to codegen/band/feeds/v1beta1/query_pb.d.ts index c578875..dfcf414 100644 --- a/proto/feeds/v1beta1/query_pb.d.ts +++ b/codegen/band/feeds/v1beta1/query_pb.d.ts @@ -1,67 +1,131 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/query.proto +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/query.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as google_api_annotations_pb from "../../google/api/annotations_pb"; -import * as cosmos_proto_cosmos_pb from "../../cosmos_proto/cosmos_pb"; -import * as cosmos_base_query_v1beta1_pagination_pb from "../../cosmos/base/query/v1beta1/pagination_pb"; -import * as feeds_v1beta1_feeds_pb from "../../feeds/v1beta1/feeds_pb"; -import * as feeds_v1beta1_params_pb from "../../feeds/v1beta1/params_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as cosmos_base_query_v1beta1_pagination_pb from "../../../cosmos/base/query/v1beta1/pagination_pb"; +import * as band_feeds_v1beta1_feeds_pb from "../../../band/feeds/v1beta1/feeds_pb"; +import * as band_feeds_v1beta1_params_pb from "../../../band/feeds/v1beta1/params_pb"; -export class QueryPricesRequest extends jspb.Message { - clearSignalIdsList(): void; - getSignalIdsList(): Array; - setSignalIdsList(value: Array): void; - addSignalIds(value: string, index?: number): string; +export class QueryCurrentFeedsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCurrentFeedsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryCurrentFeedsRequest): QueryCurrentFeedsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCurrentFeedsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCurrentFeedsRequest; + static deserializeBinaryFromReader(message: QueryCurrentFeedsRequest, reader: jspb.BinaryReader): QueryCurrentFeedsRequest; +} - hasPagination(): boolean; - clearPagination(): void; - getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; - setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; +export namespace QueryCurrentFeedsRequest { + export type AsObject = { + } +} + +export class QueryCurrentFeedsResponse extends jspb.Message { + hasCurrentFeeds(): boolean; + clearCurrentFeeds(): void; + getCurrentFeeds(): band_feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations | undefined; + setCurrentFeeds(value?: band_feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryPricesRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryPricesRequest): QueryPricesRequest.AsObject; + toObject(includeInstance?: boolean): QueryCurrentFeedsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryCurrentFeedsResponse): QueryCurrentFeedsResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryPricesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryPricesRequest; - static deserializeBinaryFromReader(message: QueryPricesRequest, reader: jspb.BinaryReader): QueryPricesRequest; + static serializeBinaryToWriter(message: QueryCurrentFeedsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCurrentFeedsResponse; + static deserializeBinaryFromReader(message: QueryCurrentFeedsResponse, reader: jspb.BinaryReader): QueryCurrentFeedsResponse; } -export namespace QueryPricesRequest { +export namespace QueryCurrentFeedsResponse { export type AsObject = { - signalIdsList: Array, - pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + currentFeeds?: band_feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations.AsObject, } } -export class QueryPricesResponse extends jspb.Message { - clearPricesList(): void; - getPricesList(): Array; - setPricesList(value: Array): void; - addPrices(value?: feeds_v1beta1_feeds_pb.Price, index?: number): feeds_v1beta1_feeds_pb.Price; +export class QueryIsFeederRequest extends jspb.Message { + getValidator(): string; + setValidator(value: string): void; - hasPagination(): boolean; - clearPagination(): void; - getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; - setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + getFeeder(): string; + setFeeder(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryPricesResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryPricesResponse): QueryPricesResponse.AsObject; + toObject(includeInstance?: boolean): QueryIsFeederRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryIsFeederRequest): QueryIsFeederRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryPricesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryPricesResponse; - static deserializeBinaryFromReader(message: QueryPricesResponse, reader: jspb.BinaryReader): QueryPricesResponse; + static serializeBinaryToWriter(message: QueryIsFeederRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIsFeederRequest; + static deserializeBinaryFromReader(message: QueryIsFeederRequest, reader: jspb.BinaryReader): QueryIsFeederRequest; } -export namespace QueryPricesResponse { +export namespace QueryIsFeederRequest { export type AsObject = { - pricesList: Array, - pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + validator: string, + feeder: string, + } +} + +export class QueryIsFeederResponse extends jspb.Message { + getIsFeeder(): boolean; + setIsFeeder(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIsFeederResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryIsFeederResponse): QueryIsFeederResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIsFeederResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIsFeederResponse; + static deserializeBinaryFromReader(message: QueryIsFeederResponse, reader: jspb.BinaryReader): QueryIsFeederResponse; +} + +export namespace QueryIsFeederResponse { + export type AsObject = { + isFeeder: boolean, + } +} + +export class QueryParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; + static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; +} + +export namespace QueryParamsRequest { + export type AsObject = { + } +} + +export class QueryParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_feeds_v1beta1_params_pb.Params | undefined; + setParams(value?: band_feeds_v1beta1_params_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; + static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; +} + +export namespace QueryParamsResponse { + export type AsObject = { + params?: band_feeds_v1beta1_params_pb.Params.AsObject, } } @@ -88,8 +152,8 @@ export namespace QueryPriceRequest { export class QueryPriceResponse extends jspb.Message { hasPrice(): boolean; clearPrice(): void; - getPrice(): feeds_v1beta1_feeds_pb.Price | undefined; - setPrice(value?: feeds_v1beta1_feeds_pb.Price): void; + getPrice(): band_feeds_v1beta1_feeds_pb.Price | undefined; + setPrice(value?: band_feeds_v1beta1_feeds_pb.Price): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QueryPriceResponse.AsObject; @@ -103,95 +167,139 @@ export class QueryPriceResponse extends jspb.Message { export namespace QueryPriceResponse { export type AsObject = { - price?: feeds_v1beta1_feeds_pb.Price.AsObject, + price?: band_feeds_v1beta1_feeds_pb.Price.AsObject, } } -export class QueryValidatorPricesRequest extends jspb.Message { - getValidator(): string; - setValidator(value: string): void; - +export class QueryPricesRequest extends jspb.Message { clearSignalIdsList(): void; getSignalIdsList(): Array; setSignalIdsList(value: Array): void; addSignalIds(value: string, index?: number): string; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryValidatorPricesRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryValidatorPricesRequest): QueryValidatorPricesRequest.AsObject; + toObject(includeInstance?: boolean): QueryPricesRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryPricesRequest): QueryPricesRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryValidatorPricesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryValidatorPricesRequest; - static deserializeBinaryFromReader(message: QueryValidatorPricesRequest, reader: jspb.BinaryReader): QueryValidatorPricesRequest; + static serializeBinaryToWriter(message: QueryPricesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPricesRequest; + static deserializeBinaryFromReader(message: QueryPricesRequest, reader: jspb.BinaryReader): QueryPricesRequest; } -export namespace QueryValidatorPricesRequest { +export namespace QueryPricesRequest { export type AsObject = { - validator: string, signalIdsList: Array, } } -export class QueryValidatorPricesResponse extends jspb.Message { - clearValidatorPricesList(): void; - getValidatorPricesList(): Array; - setValidatorPricesList(value: Array): void; - addValidatorPrices(value?: feeds_v1beta1_feeds_pb.ValidatorPrice, index?: number): feeds_v1beta1_feeds_pb.ValidatorPrice; +export class QueryPricesResponse extends jspb.Message { + clearPricesList(): void; + getPricesList(): Array; + setPricesList(value: Array): void; + addPrices(value?: band_feeds_v1beta1_feeds_pb.Price, index?: number): band_feeds_v1beta1_feeds_pb.Price; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryValidatorPricesResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryValidatorPricesResponse): QueryValidatorPricesResponse.AsObject; + toObject(includeInstance?: boolean): QueryPricesResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryPricesResponse): QueryPricesResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryValidatorPricesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryValidatorPricesResponse; - static deserializeBinaryFromReader(message: QueryValidatorPricesResponse, reader: jspb.BinaryReader): QueryValidatorPricesResponse; + static serializeBinaryToWriter(message: QueryPricesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPricesResponse; + static deserializeBinaryFromReader(message: QueryPricesResponse, reader: jspb.BinaryReader): QueryPricesResponse; } -export namespace QueryValidatorPricesResponse { +export namespace QueryPricesResponse { export type AsObject = { - validatorPricesList: Array, + pricesList: Array, } } -export class QueryValidValidatorRequest extends jspb.Message { - getValidator(): string; - setValidator(value: string): void; +export class QueryAllPricesRequest extends jspb.Message { + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryValidValidatorRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryValidValidatorRequest): QueryValidValidatorRequest.AsObject; + toObject(includeInstance?: boolean): QueryAllPricesRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryAllPricesRequest): QueryAllPricesRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryValidValidatorRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryValidValidatorRequest; - static deserializeBinaryFromReader(message: QueryValidValidatorRequest, reader: jspb.BinaryReader): QueryValidValidatorRequest; + static serializeBinaryToWriter(message: QueryAllPricesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryAllPricesRequest; + static deserializeBinaryFromReader(message: QueryAllPricesRequest, reader: jspb.BinaryReader): QueryAllPricesRequest; } -export namespace QueryValidValidatorRequest { +export namespace QueryAllPricesRequest { export type AsObject = { - validator: string, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, } } -export class QueryValidValidatorResponse extends jspb.Message { - getValid(): boolean; - setValid(value: boolean): void; +export class QueryAllPricesResponse extends jspb.Message { + clearPricesList(): void; + getPricesList(): Array; + setPricesList(value: Array): void; + addPrices(value?: band_feeds_v1beta1_feeds_pb.Price, index?: number): band_feeds_v1beta1_feeds_pb.Price; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryValidValidatorResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryValidValidatorResponse): QueryValidValidatorResponse.AsObject; + toObject(includeInstance?: boolean): QueryAllPricesResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryAllPricesResponse): QueryAllPricesResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryValidValidatorResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryValidValidatorResponse; - static deserializeBinaryFromReader(message: QueryValidValidatorResponse, reader: jspb.BinaryReader): QueryValidValidatorResponse; + static serializeBinaryToWriter(message: QueryAllPricesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryAllPricesResponse; + static deserializeBinaryFromReader(message: QueryAllPricesResponse, reader: jspb.BinaryReader): QueryAllPricesResponse; } -export namespace QueryValidValidatorResponse { +export namespace QueryAllPricesResponse { export type AsObject = { - valid: boolean, + pricesList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryReferenceSourceConfigRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryReferenceSourceConfigRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryReferenceSourceConfigRequest): QueryReferenceSourceConfigRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryReferenceSourceConfigRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryReferenceSourceConfigRequest; + static deserializeBinaryFromReader(message: QueryReferenceSourceConfigRequest, reader: jspb.BinaryReader): QueryReferenceSourceConfigRequest; +} + +export namespace QueryReferenceSourceConfigRequest { + export type AsObject = { + } +} + +export class QueryReferenceSourceConfigResponse extends jspb.Message { + hasReferenceSourceConfig(): boolean; + clearReferenceSourceConfig(): void; + getReferenceSourceConfig(): band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig | undefined; + setReferenceSourceConfig(value?: band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryReferenceSourceConfigResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryReferenceSourceConfigResponse): QueryReferenceSourceConfigResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryReferenceSourceConfigResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryReferenceSourceConfigResponse; + static deserializeBinaryFromReader(message: QueryReferenceSourceConfigResponse, reader: jspb.BinaryReader): QueryReferenceSourceConfigResponse; +} + +export namespace QueryReferenceSourceConfigResponse { + export type AsObject = { + referenceSourceConfig?: band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.AsObject, } } @@ -225,9 +333,9 @@ export namespace QuerySignalTotalPowersRequest { export class QuerySignalTotalPowersResponse extends jspb.Message { clearSignalTotalPowersList(): void; - getSignalTotalPowersList(): Array; - setSignalTotalPowersList(value: Array): void; - addSignalTotalPowers(value?: feeds_v1beta1_feeds_pb.Signal, index?: number): feeds_v1beta1_feeds_pb.Signal; + getSignalTotalPowersList(): Array; + setSignalTotalPowersList(value: Array): void; + addSignalTotalPowers(value?: band_feeds_v1beta1_feeds_pb.Signal, index?: number): band_feeds_v1beta1_feeds_pb.Signal; hasPagination(): boolean; clearPagination(): void; @@ -246,208 +354,138 @@ export class QuerySignalTotalPowersResponse extends jspb.Message { export namespace QuerySignalTotalPowersResponse { export type AsObject = { - signalTotalPowersList: Array, + signalTotalPowersList: Array, pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, } } -export class QueryParamsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; - static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; -} - -export namespace QueryParamsRequest { - export type AsObject = { - } -} - -export class QueryParamsResponse extends jspb.Message { - hasParams(): boolean; - clearParams(): void; - getParams(): feeds_v1beta1_params_pb.Params | undefined; - setParams(value?: feeds_v1beta1_params_pb.Params): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; - static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; -} - -export namespace QueryParamsResponse { - export type AsObject = { - params?: feeds_v1beta1_params_pb.Params.AsObject, - } -} - -export class QueryReferenceSourceConfigRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryReferenceSourceConfigRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryReferenceSourceConfigRequest): QueryReferenceSourceConfigRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryReferenceSourceConfigRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryReferenceSourceConfigRequest; - static deserializeBinaryFromReader(message: QueryReferenceSourceConfigRequest, reader: jspb.BinaryReader): QueryReferenceSourceConfigRequest; -} - -export namespace QueryReferenceSourceConfigRequest { - export type AsObject = { - } -} - -export class QueryReferenceSourceConfigResponse extends jspb.Message { - hasReferenceSourceConfig(): boolean; - clearReferenceSourceConfig(): void; - getReferenceSourceConfig(): feeds_v1beta1_feeds_pb.ReferenceSourceConfig | undefined; - setReferenceSourceConfig(value?: feeds_v1beta1_feeds_pb.ReferenceSourceConfig): void; +export class QueryValidValidatorRequest extends jspb.Message { + getValidator(): string; + setValidator(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryReferenceSourceConfigResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryReferenceSourceConfigResponse): QueryReferenceSourceConfigResponse.AsObject; + toObject(includeInstance?: boolean): QueryValidValidatorRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryValidValidatorRequest): QueryValidValidatorRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryReferenceSourceConfigResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryReferenceSourceConfigResponse; - static deserializeBinaryFromReader(message: QueryReferenceSourceConfigResponse, reader: jspb.BinaryReader): QueryReferenceSourceConfigResponse; + static serializeBinaryToWriter(message: QueryValidValidatorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryValidValidatorRequest; + static deserializeBinaryFromReader(message: QueryValidValidatorRequest, reader: jspb.BinaryReader): QueryValidValidatorRequest; } -export namespace QueryReferenceSourceConfigResponse { +export namespace QueryValidValidatorRequest { export type AsObject = { - referenceSourceConfig?: feeds_v1beta1_feeds_pb.ReferenceSourceConfig.AsObject, + validator: string, } } -export class QueryDelegatorSignalsRequest extends jspb.Message { - getDelegator(): string; - setDelegator(value: string): void; +export class QueryValidValidatorResponse extends jspb.Message { + getValid(): boolean; + setValid(value: boolean): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryDelegatorSignalsRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryDelegatorSignalsRequest): QueryDelegatorSignalsRequest.AsObject; + toObject(includeInstance?: boolean): QueryValidValidatorResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryValidValidatorResponse): QueryValidValidatorResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryDelegatorSignalsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryDelegatorSignalsRequest; - static deserializeBinaryFromReader(message: QueryDelegatorSignalsRequest, reader: jspb.BinaryReader): QueryDelegatorSignalsRequest; + static serializeBinaryToWriter(message: QueryValidValidatorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryValidValidatorResponse; + static deserializeBinaryFromReader(message: QueryValidValidatorResponse, reader: jspb.BinaryReader): QueryValidValidatorResponse; } -export namespace QueryDelegatorSignalsRequest { +export namespace QueryValidValidatorResponse { export type AsObject = { - delegator: string, + valid: boolean, } } -export class QueryDelegatorSignalsResponse extends jspb.Message { - clearSignalsList(): void; - getSignalsList(): Array; - setSignalsList(value: Array): void; - addSignals(value?: feeds_v1beta1_feeds_pb.Signal, index?: number): feeds_v1beta1_feeds_pb.Signal; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryDelegatorSignalsResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryDelegatorSignalsResponse): QueryDelegatorSignalsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryDelegatorSignalsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryDelegatorSignalsResponse; - static deserializeBinaryFromReader(message: QueryDelegatorSignalsResponse, reader: jspb.BinaryReader): QueryDelegatorSignalsResponse; -} +export class QueryValidatorPricesRequest extends jspb.Message { + getValidator(): string; + setValidator(value: string): void; -export namespace QueryDelegatorSignalsResponse { - export type AsObject = { - signalsList: Array, - } -} + clearSignalIdsList(): void; + getSignalIdsList(): Array; + setSignalIdsList(value: Array): void; + addSignalIds(value: string, index?: number): string; -export class QueryCurrentFeedsRequest extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryCurrentFeedsRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryCurrentFeedsRequest): QueryCurrentFeedsRequest.AsObject; + toObject(includeInstance?: boolean): QueryValidatorPricesRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryValidatorPricesRequest): QueryValidatorPricesRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryCurrentFeedsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryCurrentFeedsRequest; - static deserializeBinaryFromReader(message: QueryCurrentFeedsRequest, reader: jspb.BinaryReader): QueryCurrentFeedsRequest; + static serializeBinaryToWriter(message: QueryValidatorPricesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryValidatorPricesRequest; + static deserializeBinaryFromReader(message: QueryValidatorPricesRequest, reader: jspb.BinaryReader): QueryValidatorPricesRequest; } -export namespace QueryCurrentFeedsRequest { +export namespace QueryValidatorPricesRequest { export type AsObject = { + validator: string, + signalIdsList: Array, } } -export class QueryCurrentFeedsResponse extends jspb.Message { - hasCurrentFeeds(): boolean; - clearCurrentFeeds(): void; - getCurrentFeeds(): feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations | undefined; - setCurrentFeeds(value?: feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations): void; +export class QueryValidatorPricesResponse extends jspb.Message { + clearValidatorPricesList(): void; + getValidatorPricesList(): Array; + setValidatorPricesList(value: Array): void; + addValidatorPrices(value?: band_feeds_v1beta1_feeds_pb.ValidatorPrice, index?: number): band_feeds_v1beta1_feeds_pb.ValidatorPrice; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryCurrentFeedsResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryCurrentFeedsResponse): QueryCurrentFeedsResponse.AsObject; + toObject(includeInstance?: boolean): QueryValidatorPricesResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryValidatorPricesResponse): QueryValidatorPricesResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryCurrentFeedsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryCurrentFeedsResponse; - static deserializeBinaryFromReader(message: QueryCurrentFeedsResponse, reader: jspb.BinaryReader): QueryCurrentFeedsResponse; + static serializeBinaryToWriter(message: QueryValidatorPricesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryValidatorPricesResponse; + static deserializeBinaryFromReader(message: QueryValidatorPricesResponse, reader: jspb.BinaryReader): QueryValidatorPricesResponse; } -export namespace QueryCurrentFeedsResponse { +export namespace QueryValidatorPricesResponse { export type AsObject = { - currentFeeds?: feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations.AsObject, + validatorPricesList: Array, } } -export class QueryIsFeederRequest extends jspb.Message { - getValidatorAddress(): string; - setValidatorAddress(value: string): void; - - getFeederAddress(): string; - setFeederAddress(value: string): void; +export class QueryVoteRequest extends jspb.Message { + getVoter(): string; + setVoter(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryIsFeederRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryIsFeederRequest): QueryIsFeederRequest.AsObject; + toObject(includeInstance?: boolean): QueryVoteRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryVoteRequest): QueryVoteRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryIsFeederRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryIsFeederRequest; - static deserializeBinaryFromReader(message: QueryIsFeederRequest, reader: jspb.BinaryReader): QueryIsFeederRequest; + static serializeBinaryToWriter(message: QueryVoteRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryVoteRequest; + static deserializeBinaryFromReader(message: QueryVoteRequest, reader: jspb.BinaryReader): QueryVoteRequest; } -export namespace QueryIsFeederRequest { +export namespace QueryVoteRequest { export type AsObject = { - validatorAddress: string, - feederAddress: string, + voter: string, } } -export class QueryIsFeederResponse extends jspb.Message { - getIsFeeder(): boolean; - setIsFeeder(value: boolean): void; +export class QueryVoteResponse extends jspb.Message { + clearSignalsList(): void; + getSignalsList(): Array; + setSignalsList(value: Array): void; + addSignals(value?: band_feeds_v1beta1_feeds_pb.Signal, index?: number): band_feeds_v1beta1_feeds_pb.Signal; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryIsFeederResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryIsFeederResponse): QueryIsFeederResponse.AsObject; + toObject(includeInstance?: boolean): QueryVoteResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryVoteResponse): QueryVoteResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryIsFeederResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryIsFeederResponse; - static deserializeBinaryFromReader(message: QueryIsFeederResponse, reader: jspb.BinaryReader): QueryIsFeederResponse; + static serializeBinaryToWriter(message: QueryVoteResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryVoteResponse; + static deserializeBinaryFromReader(message: QueryVoteResponse, reader: jspb.BinaryReader): QueryVoteResponse; } -export namespace QueryIsFeederResponse { +export namespace QueryVoteResponse { export type AsObject = { - isFeeder: boolean, + signalsList: Array, } } diff --git a/proto/feeds/v1beta1/query_pb.js b/codegen/band/feeds/v1beta1/query_pb.js similarity index 55% rename from proto/feeds/v1beta1/query_pb.js rename to codegen/band/feeds/v1beta1/query_pb.js index 6fcaff2..96cacd4 100644 --- a/proto/feeds/v1beta1/query_pb.js +++ b/codegen/band/feeds/v1beta1/query_pb.js @@ -1,4 +1,4 @@ -// source: feeds/v1beta1/query.proto +// source: band/feeds/v1beta1/query.proto /** * @fileoverview * @enhanceable @@ -13,46 +13,42 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js'); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); -var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js'); +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js'); goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); -var feeds_v1beta1_feeds_pb = require('../../feeds/v1beta1/feeds_pb.js'); -goog.object.extend(proto, feeds_v1beta1_feeds_pb); -var feeds_v1beta1_params_pb = require('../../feeds/v1beta1/params_pb.js'); -goog.object.extend(proto, feeds_v1beta1_params_pb); -goog.exportSymbol('proto.feeds.v1beta1.QueryCurrentFeedsRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryCurrentFeedsResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryDelegatorSignalsRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryDelegatorSignalsResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryIsFeederRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryIsFeederResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryParamsRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryParamsResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryPriceRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryPriceResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryPricesRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryPricesResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryReferenceSourceConfigRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryReferenceSourceConfigResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QuerySignalTotalPowersRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QuerySignalTotalPowersResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryValidValidatorRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryValidValidatorResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryValidatorPricesRequest', null, global); -goog.exportSymbol('proto.feeds.v1beta1.QueryValidatorPricesResponse', null, global); +var band_feeds_v1beta1_feeds_pb = require('../../../band/feeds/v1beta1/feeds_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_feeds_pb); +var band_feeds_v1beta1_params_pb = require('../../../band/feeds/v1beta1/params_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_params_pb); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryAllPricesRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryAllPricesResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryCurrentFeedsRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryCurrentFeedsResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryIsFeederRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryIsFeederResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryPriceRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryPriceResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryPricesRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryPricesResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryValidValidatorRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryValidValidatorResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryValidatorPricesRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryValidatorPricesResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryVoteRequest', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.QueryVoteResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -63,16 +59,16 @@ goog.exportSymbol('proto.feeds.v1beta1.QueryValidatorPricesResponse', null, glob * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryPricesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.QueryPricesRequest.repeatedFields_, null); +proto.band.feeds.v1beta1.QueryCurrentFeedsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryPricesRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryCurrentFeedsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryPricesRequest.displayName = 'proto.feeds.v1beta1.QueryPricesRequest'; + proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.displayName = 'proto.band.feeds.v1beta1.QueryCurrentFeedsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -84,16 +80,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryPricesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.QueryPricesResponse.repeatedFields_, null); +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryPricesResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryCurrentFeedsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryPricesResponse.displayName = 'proto.feeds.v1beta1.QueryPricesResponse'; + proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.displayName = 'proto.band.feeds.v1beta1.QueryCurrentFeedsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -105,16 +101,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryPriceRequest = function(opt_data) { +proto.band.feeds.v1beta1.QueryIsFeederRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryPriceRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryIsFeederRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryPriceRequest.displayName = 'proto.feeds.v1beta1.QueryPriceRequest'; + proto.band.feeds.v1beta1.QueryIsFeederRequest.displayName = 'proto.band.feeds.v1beta1.QueryIsFeederRequest'; } /** * Generated by JsPbCodeGenerator. @@ -126,16 +122,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryPriceResponse = function(opt_data) { +proto.band.feeds.v1beta1.QueryIsFeederResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryPriceResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryIsFeederResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryPriceResponse.displayName = 'proto.feeds.v1beta1.QueryPriceResponse'; + proto.band.feeds.v1beta1.QueryIsFeederResponse.displayName = 'proto.band.feeds.v1beta1.QueryIsFeederResponse'; } /** * Generated by JsPbCodeGenerator. @@ -147,16 +143,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryValidatorPricesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.QueryValidatorPricesRequest.repeatedFields_, null); +proto.band.feeds.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryValidatorPricesRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryParamsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryValidatorPricesRequest.displayName = 'proto.feeds.v1beta1.QueryValidatorPricesRequest'; + proto.band.feeds.v1beta1.QueryParamsRequest.displayName = 'proto.band.feeds.v1beta1.QueryParamsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -168,16 +164,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryValidatorPricesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.QueryValidatorPricesResponse.repeatedFields_, null); +proto.band.feeds.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryValidatorPricesResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryValidatorPricesResponse.displayName = 'proto.feeds.v1beta1.QueryValidatorPricesResponse'; + proto.band.feeds.v1beta1.QueryParamsResponse.displayName = 'proto.band.feeds.v1beta1.QueryParamsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -189,16 +185,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryValidValidatorRequest = function(opt_data) { +proto.band.feeds.v1beta1.QueryPriceRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryValidValidatorRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryPriceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryValidValidatorRequest.displayName = 'proto.feeds.v1beta1.QueryValidValidatorRequest'; + proto.band.feeds.v1beta1.QueryPriceRequest.displayName = 'proto.band.feeds.v1beta1.QueryPriceRequest'; } /** * Generated by JsPbCodeGenerator. @@ -210,16 +206,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryValidValidatorResponse = function(opt_data) { +proto.band.feeds.v1beta1.QueryPriceResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryValidValidatorResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryPriceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryValidValidatorResponse.displayName = 'proto.feeds.v1beta1.QueryValidValidatorResponse'; + proto.band.feeds.v1beta1.QueryPriceResponse.displayName = 'proto.band.feeds.v1beta1.QueryPriceResponse'; } /** * Generated by JsPbCodeGenerator. @@ -231,16 +227,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.QuerySignalTotalPowersRequest.repeatedFields_, null); +proto.band.feeds.v1beta1.QueryPricesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.QueryPricesRequest.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.QuerySignalTotalPowersRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryPricesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QuerySignalTotalPowersRequest.displayName = 'proto.feeds.v1beta1.QuerySignalTotalPowersRequest'; + proto.band.feeds.v1beta1.QueryPricesRequest.displayName = 'proto.band.feeds.v1beta1.QueryPricesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -252,16 +248,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.QuerySignalTotalPowersResponse.repeatedFields_, null); +proto.band.feeds.v1beta1.QueryPricesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.QueryPricesResponse.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.QuerySignalTotalPowersResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryPricesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QuerySignalTotalPowersResponse.displayName = 'proto.feeds.v1beta1.QuerySignalTotalPowersResponse'; + proto.band.feeds.v1beta1.QueryPricesResponse.displayName = 'proto.band.feeds.v1beta1.QueryPricesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -273,16 +269,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryParamsRequest = function(opt_data) { +proto.band.feeds.v1beta1.QueryAllPricesRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryParamsRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryAllPricesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryParamsRequest.displayName = 'proto.feeds.v1beta1.QueryParamsRequest'; + proto.band.feeds.v1beta1.QueryAllPricesRequest.displayName = 'proto.band.feeds.v1beta1.QueryAllPricesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -294,16 +290,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryParamsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.band.feeds.v1beta1.QueryAllPricesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.QueryAllPricesResponse.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.QueryParamsResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryAllPricesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryParamsResponse.displayName = 'proto.feeds.v1beta1.QueryParamsResponse'; + proto.band.feeds.v1beta1.QueryAllPricesResponse.displayName = 'proto.band.feeds.v1beta1.QueryAllPricesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -315,16 +311,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryReferenceSourceConfigRequest = function(opt_data) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryReferenceSourceConfigRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.displayName = 'proto.feeds.v1beta1.QueryReferenceSourceConfigRequest'; + proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.displayName = 'proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest'; } /** * Generated by JsPbCodeGenerator. @@ -336,16 +332,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse = function(opt_data) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryReferenceSourceConfigResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.displayName = 'proto.feeds.v1beta1.QueryReferenceSourceConfigResponse'; + proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.displayName = 'proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse'; } /** * Generated by JsPbCodeGenerator. @@ -357,16 +353,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryDelegatorSignalsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.QueryDelegatorSignalsRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryDelegatorSignalsRequest.displayName = 'proto.feeds.v1beta1.QueryDelegatorSignalsRequest'; + proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.displayName = 'proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest'; } /** * Generated by JsPbCodeGenerator. @@ -378,16 +374,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.QueryDelegatorSignalsResponse.repeatedFields_, null); +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.QueryDelegatorSignalsResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryDelegatorSignalsResponse.displayName = 'proto.feeds.v1beta1.QueryDelegatorSignalsResponse'; + proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.displayName = 'proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse'; } /** * Generated by JsPbCodeGenerator. @@ -399,16 +395,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryCurrentFeedsRequest = function(opt_data) { +proto.band.feeds.v1beta1.QueryValidValidatorRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryCurrentFeedsRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryValidValidatorRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryCurrentFeedsRequest.displayName = 'proto.feeds.v1beta1.QueryCurrentFeedsRequest'; + proto.band.feeds.v1beta1.QueryValidValidatorRequest.displayName = 'proto.band.feeds.v1beta1.QueryValidValidatorRequest'; } /** * Generated by JsPbCodeGenerator. @@ -420,16 +416,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse = function(opt_data) { +proto.band.feeds.v1beta1.QueryValidValidatorResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryCurrentFeedsResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryValidValidatorResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryCurrentFeedsResponse.displayName = 'proto.feeds.v1beta1.QueryCurrentFeedsResponse'; + proto.band.feeds.v1beta1.QueryValidValidatorResponse.displayName = 'proto.band.feeds.v1beta1.QueryValidValidatorResponse'; } /** * Generated by JsPbCodeGenerator. @@ -441,16 +437,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryIsFeederRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.band.feeds.v1beta1.QueryValidatorPricesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.QueryValidatorPricesRequest.repeatedFields_, null); +}; +goog.inherits(proto.band.feeds.v1beta1.QueryValidatorPricesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.feeds.v1beta1.QueryValidatorPricesRequest.displayName = 'proto.band.feeds.v1beta1.QueryValidatorPricesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.feeds.v1beta1.QueryValidatorPricesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.QueryValidatorPricesResponse.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.QueryIsFeederRequest, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryValidatorPricesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryIsFeederRequest.displayName = 'proto.feeds.v1beta1.QueryIsFeederRequest'; + proto.band.feeds.v1beta1.QueryValidatorPricesResponse.displayName = 'proto.band.feeds.v1beta1.QueryValidatorPricesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -462,24 +479,38 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.QueryIsFeederResponse = function(opt_data) { +proto.band.feeds.v1beta1.QueryVoteRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.QueryIsFeederResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.QueryVoteRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.QueryIsFeederResponse.displayName = 'proto.feeds.v1beta1.QueryIsFeederResponse'; + proto.band.feeds.v1beta1.QueryVoteRequest.displayName = 'proto.band.feeds.v1beta1.QueryVoteRequest'; } - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.feeds.v1beta1.QueryPricesRequest.repeatedFields_ = [1]; +proto.band.feeds.v1beta1.QueryVoteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.QueryVoteResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.feeds.v1beta1.QueryVoteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.feeds.v1beta1.QueryVoteResponse.displayName = 'proto.band.feeds.v1beta1.QueryVoteResponse'; +} @@ -496,8 +527,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryPricesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryPricesRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.toObject(opt_includeInstance, this); }; @@ -506,14 +537,13 @@ proto.feeds.v1beta1.QueryPricesRequest.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryPricesRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryCurrentFeedsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryPricesRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.toObject = function(includeInstance, msg) { var f, obj = { - signalIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; if (includeInstance) { @@ -527,38 +557,29 @@ proto.feeds.v1beta1.QueryPricesRequest.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryPricesRequest} + * @return {!proto.band.feeds.v1beta1.QueryCurrentFeedsRequest} */ -proto.feeds.v1beta1.QueryPricesRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryPricesRequest; - return proto.feeds.v1beta1.QueryPricesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryCurrentFeedsRequest; + return proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryPricesRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryCurrentFeedsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryPricesRequest} + * @return {!proto.band.feeds.v1beta1.QueryCurrentFeedsRequest} */ -proto.feeds.v1beta1.QueryPricesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addSignalIds(value); - break; - case 2: - var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; - reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); - msg.setPagination(value); - break; default: reader.skipField(); break; @@ -572,9 +593,9 @@ proto.feeds.v1beta1.QueryPricesRequest.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryPricesRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryPricesRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -582,112 +603,16 @@ proto.feeds.v1beta1.QueryPricesRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryPricesRequest} message + * @param {!proto.band.feeds.v1beta1.QueryCurrentFeedsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryPricesRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryCurrentFeedsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignalIdsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getPagination(); - if (f != null) { - writer.writeMessage( - 2, - f, - cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated string signal_ids = 1; - * @return {!Array} - */ -proto.feeds.v1beta1.QueryPricesRequest.prototype.getSignalIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.QueryPricesRequest} returns this - */ -proto.feeds.v1beta1.QueryPricesRequest.prototype.setSignalIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.QueryPricesRequest} returns this - */ -proto.feeds.v1beta1.QueryPricesRequest.prototype.addSignalIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.QueryPricesRequest} returns this - */ -proto.feeds.v1beta1.QueryPricesRequest.prototype.clearSignalIdsList = function() { - return this.setSignalIdsList([]); -}; - - -/** - * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; - * @return {?proto.cosmos.base.query.v1beta1.PageRequest} - */ -proto.feeds.v1beta1.QueryPricesRequest.prototype.getPagination = function() { - return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); -}; - - -/** - * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value - * @return {!proto.feeds.v1beta1.QueryPricesRequest} returns this -*/ -proto.feeds.v1beta1.QueryPricesRequest.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.QueryPricesRequest} returns this - */ -proto.feeds.v1beta1.QueryPricesRequest.prototype.clearPagination = function() { - return this.setPagination(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.feeds.v1beta1.QueryPricesRequest.prototype.hasPagination = function() { - return jspb.Message.getField(this, 2) != null; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.feeds.v1beta1.QueryPricesResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -703,8 +628,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryPricesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryPricesResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.toObject(opt_includeInstance, this); }; @@ -713,15 +638,13 @@ proto.feeds.v1beta1.QueryPricesResponse.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryPricesResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryCurrentFeedsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryPricesResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.toObject = function(includeInstance, msg) { var f, obj = { - pricesList: jspb.Message.toObjectList(msg.getPricesList(), - feeds_v1beta1_feeds_pb.Price.toObject, includeInstance), - pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + currentFeeds: (f = msg.getCurrentFeeds()) && band_feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations.toObject(includeInstance, f) }; if (includeInstance) { @@ -735,23 +658,23 @@ proto.feeds.v1beta1.QueryPricesResponse.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryPricesResponse} + * @return {!proto.band.feeds.v1beta1.QueryCurrentFeedsResponse} */ -proto.feeds.v1beta1.QueryPricesResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryPricesResponse; - return proto.feeds.v1beta1.QueryPricesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryCurrentFeedsResponse; + return proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryPricesResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryCurrentFeedsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryPricesResponse} + * @return {!proto.band.feeds.v1beta1.QueryCurrentFeedsResponse} */ -proto.feeds.v1beta1.QueryPricesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -759,14 +682,9 @@ proto.feeds.v1beta1.QueryPricesResponse.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new feeds_v1beta1_feeds_pb.Price; - reader.readMessage(value,feeds_v1beta1_feeds_pb.Price.deserializeBinaryFromReader); - msg.addPrices(value); - break; - case 2: - var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; - reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); - msg.setPagination(value); + var value = new band_feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations.deserializeBinaryFromReader); + msg.setCurrentFeeds(value); break; default: reader.skipField(); @@ -781,9 +699,9 @@ proto.feeds.v1beta1.QueryPricesResponse.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryPricesResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryPricesResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -791,94 +709,48 @@ proto.feeds.v1beta1.QueryPricesResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryPricesResponse} message + * @param {!proto.band.feeds.v1beta1.QueryCurrentFeedsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryPricesResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPricesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - feeds_v1beta1_feeds_pb.Price.serializeBinaryToWriter - ); - } - f = message.getPagination(); + f = message.getCurrentFeeds(); if (f != null) { writer.writeMessage( - 2, + 1, f, - cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + band_feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations.serializeBinaryToWriter ); } }; /** - * repeated Price prices = 1; - * @return {!Array} - */ -proto.feeds.v1beta1.QueryPricesResponse.prototype.getPricesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, feeds_v1beta1_feeds_pb.Price, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.QueryPricesResponse} returns this -*/ -proto.feeds.v1beta1.QueryPricesResponse.prototype.setPricesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.feeds.v1beta1.Price=} opt_value - * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.Price} - */ -proto.feeds.v1beta1.QueryPricesResponse.prototype.addPrices = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.feeds.v1beta1.Price, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.QueryPricesResponse} returns this - */ -proto.feeds.v1beta1.QueryPricesResponse.prototype.clearPricesList = function() { - return this.setPricesList([]); -}; - - -/** - * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; - * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + * optional CurrentFeedWithDeviations current_feeds = 1; + * @return {?proto.band.feeds.v1beta1.CurrentFeedWithDeviations} */ -proto.feeds.v1beta1.QueryPricesResponse.prototype.getPagination = function() { - return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.getCurrentFeeds = function() { + return /** @type{?proto.band.feeds.v1beta1.CurrentFeedWithDeviations} */ ( + jspb.Message.getWrapperField(this, band_feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations, 1)); }; /** - * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value - * @return {!proto.feeds.v1beta1.QueryPricesResponse} returns this + * @param {?proto.band.feeds.v1beta1.CurrentFeedWithDeviations|undefined} value + * @return {!proto.band.feeds.v1beta1.QueryCurrentFeedsResponse} returns this */ -proto.feeds.v1beta1.QueryPricesResponse.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.setCurrentFeeds = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.QueryPricesResponse} returns this + * @return {!proto.band.feeds.v1beta1.QueryCurrentFeedsResponse} returns this */ -proto.feeds.v1beta1.QueryPricesResponse.prototype.clearPagination = function() { - return this.setPagination(undefined); +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.clearCurrentFeeds = function() { + return this.setCurrentFeeds(undefined); }; @@ -886,8 +758,8 @@ proto.feeds.v1beta1.QueryPricesResponse.prototype.clearPagination = function() { * Returns whether this field is set. * @return {boolean} */ -proto.feeds.v1beta1.QueryPricesResponse.prototype.hasPagination = function() { - return jspb.Message.getField(this, 2) != null; +proto.band.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.hasCurrentFeeds = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -907,8 +779,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryPriceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryPriceRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryIsFeederRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryIsFeederRequest.toObject(opt_includeInstance, this); }; @@ -917,13 +789,14 @@ proto.feeds.v1beta1.QueryPriceRequest.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryPriceRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryIsFeederRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryPriceRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryIsFeederRequest.toObject = function(includeInstance, msg) { var f, obj = { - signalId: jspb.Message.getFieldWithDefault(msg, 1, "") + validator: jspb.Message.getFieldWithDefault(msg, 1, ""), + feeder: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -937,23 +810,23 @@ proto.feeds.v1beta1.QueryPriceRequest.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryPriceRequest} + * @return {!proto.band.feeds.v1beta1.QueryIsFeederRequest} */ -proto.feeds.v1beta1.QueryPriceRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryIsFeederRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryPriceRequest; - return proto.feeds.v1beta1.QueryPriceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryIsFeederRequest; + return proto.band.feeds.v1beta1.QueryIsFeederRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryPriceRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryIsFeederRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryPriceRequest} + * @return {!proto.band.feeds.v1beta1.QueryIsFeederRequest} */ -proto.feeds.v1beta1.QueryPriceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryIsFeederRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -962,7 +835,11 @@ proto.feeds.v1beta1.QueryPriceRequest.deserializeBinaryFromReader = function(msg switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setSignalId(value); + msg.setValidator(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFeeder(value); break; default: reader.skipField(); @@ -977,9 +854,9 @@ proto.feeds.v1beta1.QueryPriceRequest.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryPriceRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryIsFeederRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryPriceRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryIsFeederRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -987,40 +864,65 @@ proto.feeds.v1beta1.QueryPriceRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryPriceRequest} message + * @param {!proto.band.feeds.v1beta1.QueryIsFeederRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryPriceRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryIsFeederRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignalId(); + f = message.getValidator(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getFeeder(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; /** - * optional string signal_id = 1; + * optional string validator = 1; * @return {string} */ -proto.feeds.v1beta1.QueryPriceRequest.prototype.getSignalId = function() { +proto.band.feeds.v1beta1.QueryIsFeederRequest.prototype.getValidator = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.QueryPriceRequest} returns this + * @return {!proto.band.feeds.v1beta1.QueryIsFeederRequest} returns this */ -proto.feeds.v1beta1.QueryPriceRequest.prototype.setSignalId = function(value) { +proto.band.feeds.v1beta1.QueryIsFeederRequest.prototype.setValidator = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; +/** + * optional string feeder = 2; + * @return {string} + */ +proto.band.feeds.v1beta1.QueryIsFeederRequest.prototype.getFeeder = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.feeds.v1beta1.QueryIsFeederRequest} returns this + */ +proto.band.feeds.v1beta1.QueryIsFeederRequest.prototype.setFeeder = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + @@ -1037,8 +939,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryPriceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryPriceResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryIsFeederResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryIsFeederResponse.toObject(opt_includeInstance, this); }; @@ -1047,13 +949,13 @@ proto.feeds.v1beta1.QueryPriceResponse.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryPriceResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryIsFeederResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryPriceResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryIsFeederResponse.toObject = function(includeInstance, msg) { var f, obj = { - price: (f = msg.getPrice()) && feeds_v1beta1_feeds_pb.Price.toObject(includeInstance, f) + isFeeder: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -1067,23 +969,23 @@ proto.feeds.v1beta1.QueryPriceResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryPriceResponse} + * @return {!proto.band.feeds.v1beta1.QueryIsFeederResponse} */ -proto.feeds.v1beta1.QueryPriceResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryIsFeederResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryPriceResponse; - return proto.feeds.v1beta1.QueryPriceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryIsFeederResponse; + return proto.band.feeds.v1beta1.QueryIsFeederResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryPriceResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryIsFeederResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryPriceResponse} + * @return {!proto.band.feeds.v1beta1.QueryIsFeederResponse} */ -proto.feeds.v1beta1.QueryPriceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryIsFeederResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1091,9 +993,8 @@ proto.feeds.v1beta1.QueryPriceResponse.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new feeds_v1beta1_feeds_pb.Price; - reader.readMessage(value,feeds_v1beta1_feeds_pb.Price.deserializeBinaryFromReader); - msg.setPrice(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsFeeder(value); break; default: reader.skipField(); @@ -1108,9 +1009,9 @@ proto.feeds.v1beta1.QueryPriceResponse.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryPriceResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryIsFeederResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryPriceResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryIsFeederResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1118,67 +1019,141 @@ proto.feeds.v1beta1.QueryPriceResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryPriceResponse} message + * @param {!proto.band.feeds.v1beta1.QueryIsFeederResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryPriceResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryIsFeederResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPrice(); - if (f != null) { - writer.writeMessage( + f = message.getIsFeeder(); + if (f) { + writer.writeBool( 1, - f, - feeds_v1beta1_feeds_pb.Price.serializeBinaryToWriter + f ); } }; /** - * optional Price price = 1; - * @return {?proto.feeds.v1beta1.Price} + * optional bool is_feeder = 1; + * @return {boolean} */ -proto.feeds.v1beta1.QueryPriceResponse.prototype.getPrice = function() { - return /** @type{?proto.feeds.v1beta1.Price} */ ( - jspb.Message.getWrapperField(this, feeds_v1beta1_feeds_pb.Price, 1)); +proto.band.feeds.v1beta1.QueryIsFeederResponse.prototype.getIsFeeder = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {?proto.feeds.v1beta1.Price|undefined} value - * @return {!proto.feeds.v1beta1.QueryPriceResponse} returns this -*/ -proto.feeds.v1beta1.QueryPriceResponse.prototype.setPrice = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {boolean} value + * @return {!proto.band.feeds.v1beta1.QueryIsFeederResponse} returns this + */ +proto.band.feeds.v1beta1.QueryIsFeederResponse.prototype.setIsFeeder = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.QueryPriceResponse} returns this - */ -proto.feeds.v1beta1.QueryPriceResponse.prototype.clearPrice = function() { - return this.setPrice(undefined); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Returns whether this field is set. - * @return {boolean} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.feeds.v1beta1.QueryPriceResponse.prototype.hasPrice = function() { - return jspb.Message.getField(this, 1) != null; +proto.band.feeds.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.feeds.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.feeds.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.feeds.v1beta1.QueryParamsRequest} + */ +proto.band.feeds.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.feeds.v1beta1.QueryParamsRequest; + return proto.band.feeds.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.feeds.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.feeds.v1beta1.QueryParamsRequest} + */ +proto.band.feeds.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.feeds.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.feeds.v1beta1.QueryParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.feeds.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.repeatedFields_ = [2]; +proto.band.feeds.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + @@ -1195,8 +1170,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryValidatorPricesRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryParamsResponse.toObject(opt_includeInstance, this); }; @@ -1205,14 +1180,13 @@ proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryValidatorPricesRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { var f, obj = { - validator: jspb.Message.getFieldWithDefault(msg, 1, ""), - signalIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + params: (f = msg.getParams()) && band_feeds_v1beta1_params_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -1226,23 +1200,23 @@ proto.feeds.v1beta1.QueryValidatorPricesRequest.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryValidatorPricesRequest} + * @return {!proto.band.feeds.v1beta1.QueryParamsResponse} */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryValidatorPricesRequest; - return proto.feeds.v1beta1.QueryValidatorPricesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryParamsResponse; + return proto.band.feeds.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryValidatorPricesRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryValidatorPricesRequest} + * @return {!proto.band.feeds.v1beta1.QueryParamsResponse} */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1250,12 +1224,9 @@ proto.feeds.v1beta1.QueryValidatorPricesRequest.deserializeBinaryFromReader = fu var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setValidator(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addSignalIds(value); + var value = new band_feeds_v1beta1_params_pb.Params; + reader.readMessage(value,band_feeds_v1beta1_params_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); break; default: reader.skipField(); @@ -1270,9 +1241,9 @@ proto.feeds.v1beta1.QueryValidatorPricesRequest.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryValidatorPricesRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1280,91 +1251,190 @@ proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryValidatorPricesRequest} message + * @param {!proto.band.feeds.v1beta1.QueryParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValidator(); - if (f.length > 0) { - writer.writeString( + f = message.getParams(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getSignalIdsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f + f, + band_feeds_v1beta1_params_pb.Params.serializeBinaryToWriter ); } }; /** - * optional string validator = 1; - * @return {string} + * optional Params params = 1; + * @return {?proto.band.feeds.v1beta1.Params} */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.getValidator = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.band.feeds.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.band.feeds.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_feeds_v1beta1_params_pb.Params, 1)); }; /** - * @param {string} value - * @return {!proto.feeds.v1beta1.QueryValidatorPricesRequest} returns this + * @param {?proto.band.feeds.v1beta1.Params|undefined} value + * @return {!proto.band.feeds.v1beta1.QueryParamsResponse} returns this +*/ +proto.band.feeds.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.feeds.v1beta1.QueryParamsResponse} returns this */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.setValidator = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.band.feeds.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); }; /** - * repeated string signal_ids = 2; - * @return {!Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.getSignalIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.band.feeds.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.QueryValidatorPricesRequest} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.setSignalIdsList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.band.feeds.v1beta1.QueryPriceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryPriceRequest.toObject(opt_includeInstance, this); }; /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.QueryValidatorPricesRequest} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.feeds.v1beta1.QueryPriceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.addSignalIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.band.feeds.v1beta1.QueryPriceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + signalId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.QueryValidatorPricesRequest} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.feeds.v1beta1.QueryPriceRequest} */ -proto.feeds.v1beta1.QueryValidatorPricesRequest.prototype.clearSignalIdsList = function() { - return this.setSignalIdsList([]); +proto.band.feeds.v1beta1.QueryPriceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.feeds.v1beta1.QueryPriceRequest; + return proto.band.feeds.v1beta1.QueryPriceRequest.deserializeBinaryFromReader(msg, reader); }; +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.feeds.v1beta1.QueryPriceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.feeds.v1beta1.QueryPriceRequest} + */ +proto.band.feeds.v1beta1.QueryPriceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSignalId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.repeatedFields_ = [1]; +proto.band.feeds.v1beta1.QueryPriceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.feeds.v1beta1.QueryPriceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.feeds.v1beta1.QueryPriceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.feeds.v1beta1.QueryPriceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignalId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string signal_id = 1; + * @return {string} + */ +proto.band.feeds.v1beta1.QueryPriceRequest.prototype.getSignalId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.feeds.v1beta1.QueryPriceRequest} returns this + */ +proto.band.feeds.v1beta1.QueryPriceRequest.prototype.setSignalId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + @@ -1381,8 +1451,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryValidatorPricesResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryPriceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryPriceResponse.toObject(opt_includeInstance, this); }; @@ -1391,14 +1461,13 @@ proto.feeds.v1beta1.QueryValidatorPricesResponse.prototype.toObject = function(o * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryValidatorPricesResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryPriceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryPriceResponse.toObject = function(includeInstance, msg) { var f, obj = { - validatorPricesList: jspb.Message.toObjectList(msg.getValidatorPricesList(), - feeds_v1beta1_feeds_pb.ValidatorPrice.toObject, includeInstance) + price: (f = msg.getPrice()) && band_feeds_v1beta1_feeds_pb.Price.toObject(includeInstance, f) }; if (includeInstance) { @@ -1412,23 +1481,23 @@ proto.feeds.v1beta1.QueryValidatorPricesResponse.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryValidatorPricesResponse} + * @return {!proto.band.feeds.v1beta1.QueryPriceResponse} */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryPriceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryValidatorPricesResponse; - return proto.feeds.v1beta1.QueryValidatorPricesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryPriceResponse; + return proto.band.feeds.v1beta1.QueryPriceResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryValidatorPricesResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryPriceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryValidatorPricesResponse} + * @return {!proto.band.feeds.v1beta1.QueryPriceResponse} */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryPriceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1436,9 +1505,9 @@ proto.feeds.v1beta1.QueryValidatorPricesResponse.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new feeds_v1beta1_feeds_pb.ValidatorPrice; - reader.readMessage(value,feeds_v1beta1_feeds_pb.ValidatorPrice.deserializeBinaryFromReader); - msg.addValidatorPrices(value); + var value = new band_feeds_v1beta1_feeds_pb.Price; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Price.deserializeBinaryFromReader); + msg.setPrice(value); break; default: reader.skipField(); @@ -1453,9 +1522,9 @@ proto.feeds.v1beta1.QueryValidatorPricesResponse.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryPriceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryValidatorPricesResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryPriceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1463,62 +1532,68 @@ proto.feeds.v1beta1.QueryValidatorPricesResponse.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryValidatorPricesResponse} message + * @param {!proto.band.feeds.v1beta1.QueryPriceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryPriceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValidatorPricesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getPrice(); + if (f != null) { + writer.writeMessage( 1, f, - feeds_v1beta1_feeds_pb.ValidatorPrice.serializeBinaryToWriter + band_feeds_v1beta1_feeds_pb.Price.serializeBinaryToWriter ); } }; /** - * repeated ValidatorPrice validator_prices = 1; - * @return {!Array} + * optional Price price = 1; + * @return {?proto.band.feeds.v1beta1.Price} */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.prototype.getValidatorPricesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, feeds_v1beta1_feeds_pb.ValidatorPrice, 1)); +proto.band.feeds.v1beta1.QueryPriceResponse.prototype.getPrice = function() { + return /** @type{?proto.band.feeds.v1beta1.Price} */ ( + jspb.Message.getWrapperField(this, band_feeds_v1beta1_feeds_pb.Price, 1)); }; /** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.QueryValidatorPricesResponse} returns this + * @param {?proto.band.feeds.v1beta1.Price|undefined} value + * @return {!proto.band.feeds.v1beta1.QueryPriceResponse} returns this */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.prototype.setValidatorPricesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.band.feeds.v1beta1.QueryPriceResponse.prototype.setPrice = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * @param {!proto.feeds.v1beta1.ValidatorPrice=} opt_value - * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.ValidatorPrice} + * Clears the message field making it undefined. + * @return {!proto.band.feeds.v1beta1.QueryPriceResponse} returns this */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.prototype.addValidatorPrices = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.feeds.v1beta1.ValidatorPrice, opt_index); +proto.band.feeds.v1beta1.QueryPriceResponse.prototype.clearPrice = function() { + return this.setPrice(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.QueryValidatorPricesResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.feeds.v1beta1.QueryValidatorPricesResponse.prototype.clearValidatorPricesList = function() { - return this.setValidatorPricesList([]); +proto.band.feeds.v1beta1.QueryPriceResponse.prototype.hasPrice = function() { + return jspb.Message.getField(this, 1) != null; }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.feeds.v1beta1.QueryPricesRequest.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1534,8 +1609,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryValidValidatorRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryValidValidatorRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryPricesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryPricesRequest.toObject(opt_includeInstance, this); }; @@ -1544,13 +1619,13 @@ proto.feeds.v1beta1.QueryValidValidatorRequest.prototype.toObject = function(opt * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryValidValidatorRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryPricesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidValidatorRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryPricesRequest.toObject = function(includeInstance, msg) { var f, obj = { - validator: jspb.Message.getFieldWithDefault(msg, 1, "") + signalIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -1564,23 +1639,23 @@ proto.feeds.v1beta1.QueryValidValidatorRequest.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryValidValidatorRequest} + * @return {!proto.band.feeds.v1beta1.QueryPricesRequest} */ -proto.feeds.v1beta1.QueryValidValidatorRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryPricesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryValidValidatorRequest; - return proto.feeds.v1beta1.QueryValidValidatorRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryPricesRequest; + return proto.band.feeds.v1beta1.QueryPricesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryValidValidatorRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryPricesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryValidValidatorRequest} + * @return {!proto.band.feeds.v1beta1.QueryPricesRequest} */ -proto.feeds.v1beta1.QueryValidValidatorRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryPricesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1589,7 +1664,7 @@ proto.feeds.v1beta1.QueryValidValidatorRequest.deserializeBinaryFromReader = fun switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setValidator(value); + msg.addSignalIds(value); break; default: reader.skipField(); @@ -1604,9 +1679,9 @@ proto.feeds.v1beta1.QueryValidValidatorRequest.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryValidValidatorRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryPricesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryValidValidatorRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryPricesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1614,15 +1689,15 @@ proto.feeds.v1beta1.QueryValidValidatorRequest.prototype.serializeBinary = funct /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryValidValidatorRequest} message + * @param {!proto.band.feeds.v1beta1.QueryPricesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidValidatorRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryPricesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValidator(); + f = message.getSignalIdsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedString( 1, f ); @@ -1631,24 +1706,50 @@ proto.feeds.v1beta1.QueryValidValidatorRequest.serializeBinaryToWriter = functio /** - * optional string validator = 1; - * @return {string} + * repeated string signal_ids = 1; + * @return {!Array} */ -proto.feeds.v1beta1.QueryValidValidatorRequest.prototype.getValidator = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.band.feeds.v1beta1.QueryPricesRequest.prototype.getSignalIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.QueryPricesRequest} returns this + */ +proto.band.feeds.v1beta1.QueryPricesRequest.prototype.setSignalIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.QueryValidValidatorRequest} returns this + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.QueryPricesRequest} returns this */ -proto.feeds.v1beta1.QueryValidValidatorRequest.prototype.setValidator = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.band.feeds.v1beta1.QueryPricesRequest.prototype.addSignalIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.feeds.v1beta1.QueryPricesRequest} returns this + */ +proto.band.feeds.v1beta1.QueryPricesRequest.prototype.clearSignalIdsList = function() { + return this.setSignalIdsList([]); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.feeds.v1beta1.QueryPricesResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1664,8 +1765,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryValidValidatorResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryValidValidatorResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryPricesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryPricesResponse.toObject(opt_includeInstance, this); }; @@ -1674,13 +1775,14 @@ proto.feeds.v1beta1.QueryValidValidatorResponse.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryValidValidatorResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryPricesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidValidatorResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryPricesResponse.toObject = function(includeInstance, msg) { var f, obj = { - valid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + pricesList: jspb.Message.toObjectList(msg.getPricesList(), + band_feeds_v1beta1_feeds_pb.Price.toObject, includeInstance) }; if (includeInstance) { @@ -1694,23 +1796,23 @@ proto.feeds.v1beta1.QueryValidValidatorResponse.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryValidValidatorResponse} + * @return {!proto.band.feeds.v1beta1.QueryPricesResponse} */ -proto.feeds.v1beta1.QueryValidValidatorResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryPricesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryValidValidatorResponse; - return proto.feeds.v1beta1.QueryValidValidatorResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryPricesResponse; + return proto.band.feeds.v1beta1.QueryPricesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryValidValidatorResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryPricesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryValidValidatorResponse} + * @return {!proto.band.feeds.v1beta1.QueryPricesResponse} */ -proto.feeds.v1beta1.QueryValidValidatorResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryPricesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1718,8 +1820,9 @@ proto.feeds.v1beta1.QueryValidValidatorResponse.deserializeBinaryFromReader = fu var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setValid(value); + var value = new band_feeds_v1beta1_feeds_pb.Price; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Price.deserializeBinaryFromReader); + msg.addPrices(value); break; default: reader.skipField(); @@ -1734,9 +1837,9 @@ proto.feeds.v1beta1.QueryValidValidatorResponse.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryValidValidatorResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryPricesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryValidValidatorResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryPricesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1744,47 +1847,61 @@ proto.feeds.v1beta1.QueryValidValidatorResponse.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryValidValidatorResponse} message + * @param {!proto.band.feeds.v1beta1.QueryPricesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryValidValidatorResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryPricesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValid(); - if (f) { - writer.writeBool( + f = message.getPricesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, - f + f, + band_feeds_v1beta1_feeds_pb.Price.serializeBinaryToWriter ); } }; /** - * optional bool valid = 1; - * @return {boolean} + * repeated Price prices = 1; + * @return {!Array} */ -proto.feeds.v1beta1.QueryValidValidatorResponse.prototype.getValid = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.band.feeds.v1beta1.QueryPricesResponse.prototype.getPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Price, 1)); }; /** - * @param {boolean} value - * @return {!proto.feeds.v1beta1.QueryValidValidatorResponse} returns this - */ -proto.feeds.v1beta1.QueryValidValidatorResponse.prototype.setValid = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.QueryPricesResponse} returns this +*/ +proto.band.feeds.v1beta1.QueryPricesResponse.prototype.setPricesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; +/** + * @param {!proto.band.feeds.v1beta1.Price=} opt_value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.Price} + */ +proto.band.feeds.v1beta1.QueryPricesResponse.prototype.addPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.feeds.v1beta1.Price, opt_index); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Clears the list making it empty but non-null. + * @return {!proto.band.feeds.v1beta1.QueryPricesResponse} returns this */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.repeatedFields_ = [1]; +proto.band.feeds.v1beta1.QueryPricesResponse.prototype.clearPricesList = function() { + return this.setPricesList([]); +}; + + @@ -1801,8 +1918,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QuerySignalTotalPowersRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryAllPricesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryAllPricesRequest.toObject(opt_includeInstance, this); }; @@ -1811,13 +1928,12 @@ proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryAllPricesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryAllPricesRequest.toObject = function(includeInstance, msg) { var f, obj = { - signalIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; @@ -1832,23 +1948,23 @@ proto.feeds.v1beta1.QuerySignalTotalPowersRequest.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} + * @return {!proto.band.feeds.v1beta1.QueryAllPricesRequest} */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryAllPricesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QuerySignalTotalPowersRequest; - return proto.feeds.v1beta1.QuerySignalTotalPowersRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryAllPricesRequest; + return proto.band.feeds.v1beta1.QueryAllPricesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryAllPricesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} + * @return {!proto.band.feeds.v1beta1.QueryAllPricesRequest} */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryAllPricesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1856,10 +1972,6 @@ proto.feeds.v1beta1.QuerySignalTotalPowersRequest.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addSignalIds(value); - break; - case 2: var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); msg.setPagination(value); @@ -1877,9 +1989,9 @@ proto.feeds.v1beta1.QuerySignalTotalPowersRequest.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryAllPricesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QuerySignalTotalPowersRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryAllPricesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1887,23 +1999,16 @@ proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} message + * @param {!proto.band.feeds.v1beta1.QueryAllPricesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryAllPricesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignalIdsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } f = message.getPagination(); if (f != null) { writer.writeMessage( - 2, + 1, f, cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter ); @@ -1912,66 +2017,29 @@ proto.feeds.v1beta1.QuerySignalTotalPowersRequest.serializeBinaryToWriter = func /** - * repeated string signal_ids = 1; - * @return {!Array} - */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.getSignalIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this - */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.setSignalIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this - */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.addSignalIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this - */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.clearSignalIdsList = function() { - return this.setSignalIdsList([]); -}; - - -/** - * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.getPagination = function() { +proto.band.feeds.v1beta1.QueryAllPricesRequest.prototype.getPagination = function() { return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); }; /** * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this + * @return {!proto.band.feeds.v1beta1.QueryAllPricesRequest} returns this */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.band.feeds.v1beta1.QueryAllPricesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this + * @return {!proto.band.feeds.v1beta1.QueryAllPricesRequest} returns this */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.clearPagination = function() { +proto.band.feeds.v1beta1.QueryAllPricesRequest.prototype.clearPagination = function() { return this.setPagination(undefined); }; @@ -1980,8 +2048,8 @@ proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.clearPagination = fu * Returns whether this field is set. * @return {boolean} */ -proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.hasPagination = function() { - return jspb.Message.getField(this, 2) != null; +proto.band.feeds.v1beta1.QueryAllPricesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -1991,7 +2059,7 @@ proto.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.hasPagination = func * @private {!Array} * @const */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.repeatedFields_ = [1]; +proto.band.feeds.v1beta1.QueryAllPricesResponse.repeatedFields_ = [1]; @@ -2008,8 +2076,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QuerySignalTotalPowersResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryAllPricesResponse.toObject(opt_includeInstance, this); }; @@ -2018,14 +2086,14 @@ proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QuerySignalTotalPowersResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryAllPricesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryAllPricesResponse.toObject = function(includeInstance, msg) { var f, obj = { - signalTotalPowersList: jspb.Message.toObjectList(msg.getSignalTotalPowersList(), - feeds_v1beta1_feeds_pb.Signal.toObject, includeInstance), + pricesList: jspb.Message.toObjectList(msg.getPricesList(), + band_feeds_v1beta1_feeds_pb.Price.toObject, includeInstance), pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; @@ -2040,23 +2108,23 @@ proto.feeds.v1beta1.QuerySignalTotalPowersResponse.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersResponse} + * @return {!proto.band.feeds.v1beta1.QueryAllPricesResponse} */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryAllPricesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QuerySignalTotalPowersResponse; - return proto.feeds.v1beta1.QuerySignalTotalPowersResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryAllPricesResponse; + return proto.band.feeds.v1beta1.QueryAllPricesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QuerySignalTotalPowersResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryAllPricesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersResponse} + * @return {!proto.band.feeds.v1beta1.QueryAllPricesResponse} */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryAllPricesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2064,9 +2132,9 @@ proto.feeds.v1beta1.QuerySignalTotalPowersResponse.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new feeds_v1beta1_feeds_pb.Signal; - reader.readMessage(value,feeds_v1beta1_feeds_pb.Signal.deserializeBinaryFromReader); - msg.addSignalTotalPowers(value); + var value = new band_feeds_v1beta1_feeds_pb.Price; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Price.deserializeBinaryFromReader); + msg.addPrices(value); break; case 2: var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; @@ -2086,9 +2154,9 @@ proto.feeds.v1beta1.QuerySignalTotalPowersResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QuerySignalTotalPowersResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryAllPricesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2096,18 +2164,18 @@ proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QuerySignalTotalPowersResponse} message + * @param {!proto.band.feeds.v1beta1.QueryAllPricesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryAllPricesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignalTotalPowersList(); + f = message.getPricesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - feeds_v1beta1_feeds_pb.Signal.serializeBinaryToWriter + band_feeds_v1beta1_feeds_pb.Price.serializeBinaryToWriter ); } f = message.getPagination(); @@ -2122,40 +2190,40 @@ proto.feeds.v1beta1.QuerySignalTotalPowersResponse.serializeBinaryToWriter = fun /** - * repeated Signal signal_total_powers = 1; - * @return {!Array} + * repeated Price prices = 1; + * @return {!Array} */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.getSignalTotalPowersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, feeds_v1beta1_feeds_pb.Signal, 1)); +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.getPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Price, 1)); }; /** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersResponse} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.QueryAllPricesResponse} returns this */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.setSignalTotalPowersList = function(value) { +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.setPricesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.feeds.v1beta1.Signal=} opt_value + * @param {!proto.band.feeds.v1beta1.Price=} opt_value * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.Signal} + * @return {!proto.band.feeds.v1beta1.Price} */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.addSignalTotalPowers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.feeds.v1beta1.Signal, opt_index); +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.addPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.feeds.v1beta1.Price, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersResponse} returns this + * @return {!proto.band.feeds.v1beta1.QueryAllPricesResponse} returns this */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.clearSignalTotalPowersList = function() { - return this.setSignalTotalPowersList([]); +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.clearPricesList = function() { + return this.setPricesList([]); }; @@ -2163,7 +2231,7 @@ proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.clearSignalTotalPow * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.getPagination = function() { +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.getPagination = function() { return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); }; @@ -2171,18 +2239,18 @@ proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.getPagination = fun /** * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersResponse} returns this + * @return {!proto.band.feeds.v1beta1.QueryAllPricesResponse} returns this */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.setPagination = function(value) { +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.setPagination = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.QuerySignalTotalPowersResponse} returns this + * @return {!proto.band.feeds.v1beta1.QueryAllPricesResponse} returns this */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.clearPagination = function() { +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.clearPagination = function() { return this.setPagination(undefined); }; @@ -2191,7 +2259,7 @@ proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.clearPagination = f * Returns whether this field is set. * @return {boolean} */ -proto.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.hasPagination = function() { +proto.band.feeds.v1beta1.QueryAllPricesResponse.prototype.hasPagination = function() { return jspb.Message.getField(this, 2) != null; }; @@ -2212,8 +2280,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryParamsRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.toObject(opt_includeInstance, this); }; @@ -2222,11 +2290,11 @@ proto.feeds.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -2242,23 +2310,23 @@ proto.feeds.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryParamsRequest} + * @return {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest} */ -proto.feeds.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryParamsRequest; - return proto.feeds.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest; + return proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryParamsRequest} + * @return {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest} */ -proto.feeds.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2278,9 +2346,9 @@ proto.feeds.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryParamsRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2288,11 +2356,11 @@ proto.feeds.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryParamsRequest} message + * @param {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -2313,8 +2381,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryParamsResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.toObject(opt_includeInstance, this); }; @@ -2323,13 +2391,13 @@ proto.feeds.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.toObject = function(includeInstance, msg) { var f, obj = { - params: (f = msg.getParams()) && feeds_v1beta1_params_pb.Params.toObject(includeInstance, f) + referenceSourceConfig: (f = msg.getReferenceSourceConfig()) && band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.toObject(includeInstance, f) }; if (includeInstance) { @@ -2343,23 +2411,23 @@ proto.feeds.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryParamsResponse} + * @return {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse} */ -proto.feeds.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryParamsResponse; - return proto.feeds.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse; + return proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryParamsResponse} + * @return {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse} */ -proto.feeds.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2367,9 +2435,9 @@ proto.feeds.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new feeds_v1beta1_params_pb.Params; - reader.readMessage(value,feeds_v1beta1_params_pb.Params.deserializeBinaryFromReader); - msg.setParams(value); + var value = new band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.deserializeBinaryFromReader); + msg.setReferenceSourceConfig(value); break; default: reader.skipField(); @@ -2384,9 +2452,9 @@ proto.feeds.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryParamsResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2394,48 +2462,48 @@ proto.feeds.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryParamsResponse} message + * @param {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getParams(); + f = message.getReferenceSourceConfig(); if (f != null) { writer.writeMessage( 1, f, - feeds_v1beta1_params_pb.Params.serializeBinaryToWriter + band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.serializeBinaryToWriter ); } }; /** - * optional Params params = 1; - * @return {?proto.feeds.v1beta1.Params} + * optional ReferenceSourceConfig reference_source_config = 1; + * @return {?proto.band.feeds.v1beta1.ReferenceSourceConfig} */ -proto.feeds.v1beta1.QueryParamsResponse.prototype.getParams = function() { - return /** @type{?proto.feeds.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, feeds_v1beta1_params_pb.Params, 1)); +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.getReferenceSourceConfig = function() { + return /** @type{?proto.band.feeds.v1beta1.ReferenceSourceConfig} */ ( + jspb.Message.getWrapperField(this, band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig, 1)); }; /** - * @param {?proto.feeds.v1beta1.Params|undefined} value - * @return {!proto.feeds.v1beta1.QueryParamsResponse} returns this + * @param {?proto.band.feeds.v1beta1.ReferenceSourceConfig|undefined} value + * @return {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse} returns this */ -proto.feeds.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.setReferenceSourceConfig = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.QueryParamsResponse} returns this + * @return {!proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse} returns this */ -proto.feeds.v1beta1.QueryParamsResponse.prototype.clearParams = function() { - return this.setParams(undefined); +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.clearReferenceSourceConfig = function() { + return this.setReferenceSourceConfig(undefined); }; @@ -2443,12 +2511,19 @@ proto.feeds.v1beta1.QueryParamsResponse.prototype.clearParams = function() { * Returns whether this field is set. * @return {boolean} */ -proto.feeds.v1beta1.QueryParamsResponse.prototype.hasParams = function() { +proto.band.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.hasReferenceSourceConfig = function() { return jspb.Message.getField(this, 1) != null; }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2464,8 +2539,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.toObject(opt_includeInstance, this); }; @@ -2474,13 +2549,14 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.prototype.toObject = funct * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryReferenceSourceConfigRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.toObject = function(includeInstance, msg) { var f, obj = { - + signalIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -2494,29 +2570,38 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.toObject = function(includ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryReferenceSourceConfigRequest} + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryReferenceSourceConfigRequest; - return proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest; + return proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryReferenceSourceConfigRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryReferenceSourceConfigRequest} + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addSignalIds(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; default: reader.skipField(); break; @@ -2530,9 +2615,9 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.deserializeBinaryFromReade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2540,15 +2625,111 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryReferenceSourceConfigRequest} message + * @param {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryReferenceSourceConfigRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getSignalIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; +/** + * repeated string signal_ids = 1; + * @return {!Array} + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.getSignalIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.setSignalIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.addSignalIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.clearSignalIdsList = function() { + return this.setSignalIdsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this +*/ +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest} returns this + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.repeatedFields_ = [1]; @@ -2565,8 +2746,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.toObject(opt_includeInstance, this); }; @@ -2575,13 +2756,15 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.toObject = func * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryReferenceSourceConfigResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.toObject = function(includeInstance, msg) { var f, obj = { - referenceSourceConfig: (f = msg.getReferenceSourceConfig()) && feeds_v1beta1_feeds_pb.ReferenceSourceConfig.toObject(includeInstance, f) + signalTotalPowersList: jspb.Message.toObjectList(msg.getSignalTotalPowersList(), + band_feeds_v1beta1_feeds_pb.Signal.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -2595,23 +2778,23 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.toObject = function(inclu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryReferenceSourceConfigResponse} + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryReferenceSourceConfigResponse; - return proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse; + return proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryReferenceSourceConfigResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryReferenceSourceConfigResponse} + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2619,9 +2802,14 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new feeds_v1beta1_feeds_pb.ReferenceSourceConfig; - reader.readMessage(value,feeds_v1beta1_feeds_pb.ReferenceSourceConfig.deserializeBinaryFromReader); - msg.setReferenceSourceConfig(value); + var value = new band_feeds_v1beta1_feeds_pb.Signal; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Signal.deserializeBinaryFromReader); + msg.addSignalTotalPowers(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); break; default: reader.skipField(); @@ -2636,9 +2824,9 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2646,48 +2834,94 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryReferenceSourceConfigResponse} message + * @param {!proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getReferenceSourceConfig(); + f = message.getSignalTotalPowersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_feeds_v1beta1_feeds_pb.Signal.serializeBinaryToWriter + ); + } + f = message.getPagination(); if (f != null) { writer.writeMessage( - 1, + 2, f, - feeds_v1beta1_feeds_pb.ReferenceSourceConfig.serializeBinaryToWriter + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter ); } }; /** - * optional ReferenceSourceConfig reference_source_config = 1; - * @return {?proto.feeds.v1beta1.ReferenceSourceConfig} + * repeated Signal signal_total_powers = 1; + * @return {!Array} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.getReferenceSourceConfig = function() { - return /** @type{?proto.feeds.v1beta1.ReferenceSourceConfig} */ ( - jspb.Message.getWrapperField(this, feeds_v1beta1_feeds_pb.ReferenceSourceConfig, 1)); +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.getSignalTotalPowersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Signal, 1)); }; /** - * @param {?proto.feeds.v1beta1.ReferenceSourceConfig|undefined} value - * @return {!proto.feeds.v1beta1.QueryReferenceSourceConfigResponse} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse} returns this */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.setReferenceSourceConfig = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.setSignalTotalPowersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Signal=} opt_value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.Signal} + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.addSignalTotalPowers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.feeds.v1beta1.Signal, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse} returns this + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.clearSignalTotalPowersList = function() { + return this.setSignalTotalPowersList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse} returns this +*/ +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.QueryReferenceSourceConfigResponse} returns this + * @return {!proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse} returns this */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.clearReferenceSourceConfig = function() { - return this.setReferenceSourceConfig(undefined); +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); }; @@ -2695,8 +2929,8 @@ proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.clearReferenceS * Returns whether this field is set. * @return {boolean} */ -proto.feeds.v1beta1.QueryReferenceSourceConfigResponse.prototype.hasReferenceSourceConfig = function() { - return jspb.Message.getField(this, 1) != null; +proto.band.feeds.v1beta1.QuerySignalTotalPowersResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -2716,8 +2950,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryDelegatorSignalsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryDelegatorSignalsRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryValidValidatorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryValidValidatorRequest.toObject(opt_includeInstance, this); }; @@ -2726,13 +2960,13 @@ proto.feeds.v1beta1.QueryDelegatorSignalsRequest.prototype.toObject = function(o * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryDelegatorSignalsRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryValidValidatorRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryDelegatorSignalsRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryValidValidatorRequest.toObject = function(includeInstance, msg) { var f, obj = { - delegator: jspb.Message.getFieldWithDefault(msg, 1, "") + validator: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -2746,23 +2980,23 @@ proto.feeds.v1beta1.QueryDelegatorSignalsRequest.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryDelegatorSignalsRequest} + * @return {!proto.band.feeds.v1beta1.QueryValidValidatorRequest} */ -proto.feeds.v1beta1.QueryDelegatorSignalsRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryValidValidatorRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryDelegatorSignalsRequest; - return proto.feeds.v1beta1.QueryDelegatorSignalsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryValidValidatorRequest; + return proto.band.feeds.v1beta1.QueryValidValidatorRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryDelegatorSignalsRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryValidValidatorRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryDelegatorSignalsRequest} + * @return {!proto.band.feeds.v1beta1.QueryValidValidatorRequest} */ -proto.feeds.v1beta1.QueryDelegatorSignalsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryValidValidatorRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2771,7 +3005,7 @@ proto.feeds.v1beta1.QueryDelegatorSignalsRequest.deserializeBinaryFromReader = f switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setDelegator(value); + msg.setValidator(value); break; default: reader.skipField(); @@ -2786,9 +3020,9 @@ proto.feeds.v1beta1.QueryDelegatorSignalsRequest.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryDelegatorSignalsRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryValidValidatorRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryDelegatorSignalsRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryValidValidatorRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2796,13 +3030,13 @@ proto.feeds.v1beta1.QueryDelegatorSignalsRequest.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryDelegatorSignalsRequest} message + * @param {!proto.band.feeds.v1beta1.QueryValidValidatorRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryDelegatorSignalsRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryValidValidatorRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDelegator(); + f = message.getValidator(); if (f.length > 0) { writer.writeString( 1, @@ -2813,31 +3047,24 @@ proto.feeds.v1beta1.QueryDelegatorSignalsRequest.serializeBinaryToWriter = funct /** - * optional string delegator = 1; + * optional string validator = 1; * @return {string} */ -proto.feeds.v1beta1.QueryDelegatorSignalsRequest.prototype.getDelegator = function() { +proto.band.feeds.v1beta1.QueryValidValidatorRequest.prototype.getValidator = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.QueryDelegatorSignalsRequest} returns this + * @return {!proto.band.feeds.v1beta1.QueryValidValidatorRequest} returns this */ -proto.feeds.v1beta1.QueryDelegatorSignalsRequest.prototype.setDelegator = function(value) { +proto.band.feeds.v1beta1.QueryValidValidatorRequest.prototype.setValidator = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2853,8 +3080,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryDelegatorSignalsResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryValidValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryValidValidatorResponse.toObject(opt_includeInstance, this); }; @@ -2863,14 +3090,13 @@ proto.feeds.v1beta1.QueryDelegatorSignalsResponse.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryDelegatorSignalsResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryValidValidatorResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryValidValidatorResponse.toObject = function(includeInstance, msg) { var f, obj = { - signalsList: jspb.Message.toObjectList(msg.getSignalsList(), - feeds_v1beta1_feeds_pb.Signal.toObject, includeInstance) + valid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -2884,23 +3110,23 @@ proto.feeds.v1beta1.QueryDelegatorSignalsResponse.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryDelegatorSignalsResponse} + * @return {!proto.band.feeds.v1beta1.QueryValidValidatorResponse} */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryValidValidatorResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryDelegatorSignalsResponse; - return proto.feeds.v1beta1.QueryDelegatorSignalsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryValidValidatorResponse; + return proto.band.feeds.v1beta1.QueryValidValidatorResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryDelegatorSignalsResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryValidValidatorResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryDelegatorSignalsResponse} + * @return {!proto.band.feeds.v1beta1.QueryValidValidatorResponse} */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryValidValidatorResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2908,9 +3134,8 @@ proto.feeds.v1beta1.QueryDelegatorSignalsResponse.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new feeds_v1beta1_feeds_pb.Signal; - reader.readMessage(value,feeds_v1beta1_feeds_pb.Signal.deserializeBinaryFromReader); - msg.addSignals(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setValid(value); break; default: reader.skipField(); @@ -2925,9 +3150,9 @@ proto.feeds.v1beta1.QueryDelegatorSignalsResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryValidValidatorResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryDelegatorSignalsResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryValidValidatorResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2935,61 +3160,47 @@ proto.feeds.v1beta1.QueryDelegatorSignalsResponse.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryDelegatorSignalsResponse} message + * @param {!proto.band.feeds.v1beta1.QueryValidValidatorResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryValidValidatorResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignalsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getValid(); + if (f) { + writer.writeBool( 1, - f, - feeds_v1beta1_feeds_pb.Signal.serializeBinaryToWriter + f ); } }; /** - * repeated Signal signals = 1; - * @return {!Array} + * optional bool valid = 1; + * @return {boolean} */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.prototype.getSignalsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, feeds_v1beta1_feeds_pb.Signal, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.QueryDelegatorSignalsResponse} returns this -*/ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.prototype.setSignalsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.band.feeds.v1beta1.QueryValidValidatorResponse.prototype.getValid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {!proto.feeds.v1beta1.Signal=} opt_value - * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.Signal} + * @param {boolean} value + * @return {!proto.band.feeds.v1beta1.QueryValidValidatorResponse} returns this */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.prototype.addSignals = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.feeds.v1beta1.Signal, opt_index); +proto.band.feeds.v1beta1.QueryValidValidatorResponse.prototype.setValid = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.QueryDelegatorSignalsResponse} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.feeds.v1beta1.QueryDelegatorSignalsResponse.prototype.clearSignalsList = function() { - return this.setSignalsList([]); -}; - - +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.repeatedFields_ = [2]; @@ -3006,8 +3217,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryCurrentFeedsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryCurrentFeedsRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryValidatorPricesRequest.toObject(opt_includeInstance, this); }; @@ -3016,13 +3227,14 @@ proto.feeds.v1beta1.QueryCurrentFeedsRequest.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryCurrentFeedsRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryValidatorPricesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryCurrentFeedsRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.toObject = function(includeInstance, msg) { var f, obj = { - + validator: jspb.Message.getFieldWithDefault(msg, 1, ""), + signalIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -3036,29 +3248,37 @@ proto.feeds.v1beta1.QueryCurrentFeedsRequest.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryCurrentFeedsRequest} + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesRequest} */ -proto.feeds.v1beta1.QueryCurrentFeedsRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryCurrentFeedsRequest; - return proto.feeds.v1beta1.QueryCurrentFeedsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryValidatorPricesRequest; + return proto.band.feeds.v1beta1.QueryValidatorPricesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryCurrentFeedsRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryValidatorPricesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryCurrentFeedsRequest} + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesRequest} */ -proto.feeds.v1beta1.QueryCurrentFeedsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidator(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addSignalIds(value); + break; default: reader.skipField(); break; @@ -3072,9 +3292,9 @@ proto.feeds.v1beta1.QueryCurrentFeedsRequest.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryCurrentFeedsRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryCurrentFeedsRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryValidatorPricesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3082,15 +3302,91 @@ proto.feeds.v1beta1.QueryCurrentFeedsRequest.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryCurrentFeedsRequest} message + * @param {!proto.band.feeds.v1beta1.QueryValidatorPricesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryCurrentFeedsRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getValidator(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignalIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } }; +/** + * optional string validator = 1; + * @return {string} + */ +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.prototype.getValidator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesRequest} returns this + */ +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.prototype.setValidator = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string signal_ids = 2; + * @return {!Array} + */ +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.prototype.getSignalIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesRequest} returns this + */ +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.prototype.setSignalIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesRequest} returns this + */ +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.prototype.addSignalIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesRequest} returns this + */ +proto.band.feeds.v1beta1.QueryValidatorPricesRequest.prototype.clearSignalIdsList = function() { + return this.setSignalIdsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.repeatedFields_ = [1]; @@ -3107,8 +3403,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryCurrentFeedsResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryValidatorPricesResponse.toObject(opt_includeInstance, this); }; @@ -3117,13 +3413,14 @@ proto.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryCurrentFeedsResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryValidatorPricesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.toObject = function(includeInstance, msg) { var f, obj = { - currentFeeds: (f = msg.getCurrentFeeds()) && feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations.toObject(includeInstance, f) + validatorPricesList: jspb.Message.toObjectList(msg.getValidatorPricesList(), + band_feeds_v1beta1_feeds_pb.ValidatorPrice.toObject, includeInstance) }; if (includeInstance) { @@ -3137,23 +3434,23 @@ proto.feeds.v1beta1.QueryCurrentFeedsResponse.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryCurrentFeedsResponse} + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesResponse} */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryCurrentFeedsResponse; - return proto.feeds.v1beta1.QueryCurrentFeedsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryValidatorPricesResponse; + return proto.band.feeds.v1beta1.QueryValidatorPricesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryCurrentFeedsResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryValidatorPricesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryCurrentFeedsResponse} + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesResponse} */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3161,9 +3458,9 @@ proto.feeds.v1beta1.QueryCurrentFeedsResponse.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations; - reader.readMessage(value,feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations.deserializeBinaryFromReader); - msg.setCurrentFeeds(value); + var value = new band_feeds_v1beta1_feeds_pb.ValidatorPrice; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.ValidatorPrice.deserializeBinaryFromReader); + msg.addValidatorPrices(value); break; default: reader.skipField(); @@ -3178,9 +3475,9 @@ proto.feeds.v1beta1.QueryCurrentFeedsResponse.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryCurrentFeedsResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryValidatorPricesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3188,57 +3485,58 @@ proto.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryCurrentFeedsResponse} message + * @param {!proto.band.feeds.v1beta1.QueryValidatorPricesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCurrentFeeds(); - if (f != null) { - writer.writeMessage( + f = message.getValidatorPricesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations.serializeBinaryToWriter + band_feeds_v1beta1_feeds_pb.ValidatorPrice.serializeBinaryToWriter ); } }; /** - * optional CurrentFeedWithDeviations current_feeds = 1; - * @return {?proto.feeds.v1beta1.CurrentFeedWithDeviations} + * repeated ValidatorPrice validator_prices = 1; + * @return {!Array} */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.getCurrentFeeds = function() { - return /** @type{?proto.feeds.v1beta1.CurrentFeedWithDeviations} */ ( - jspb.Message.getWrapperField(this, feeds_v1beta1_feeds_pb.CurrentFeedWithDeviations, 1)); +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.prototype.getValidatorPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.ValidatorPrice, 1)); }; /** - * @param {?proto.feeds.v1beta1.CurrentFeedWithDeviations|undefined} value - * @return {!proto.feeds.v1beta1.QueryCurrentFeedsResponse} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesResponse} returns this */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.setCurrentFeeds = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.prototype.setValidatorPricesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.QueryCurrentFeedsResponse} returns this + * @param {!proto.band.feeds.v1beta1.ValidatorPrice=} opt_value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.ValidatorPrice} */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.clearCurrentFeeds = function() { - return this.setCurrentFeeds(undefined); +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.prototype.addValidatorPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.feeds.v1beta1.ValidatorPrice, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.band.feeds.v1beta1.QueryValidatorPricesResponse} returns this */ -proto.feeds.v1beta1.QueryCurrentFeedsResponse.prototype.hasCurrentFeeds = function() { - return jspb.Message.getField(this, 1) != null; +proto.band.feeds.v1beta1.QueryValidatorPricesResponse.prototype.clearValidatorPricesList = function() { + return this.setValidatorPricesList([]); }; @@ -3258,8 +3556,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryIsFeederRequest.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryIsFeederRequest.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryVoteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryVoteRequest.toObject(opt_includeInstance, this); }; @@ -3268,14 +3566,13 @@ proto.feeds.v1beta1.QueryIsFeederRequest.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryIsFeederRequest} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryVoteRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryIsFeederRequest.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryVoteRequest.toObject = function(includeInstance, msg) { var f, obj = { - validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - feederAddress: jspb.Message.getFieldWithDefault(msg, 2, "") + voter: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -3289,23 +3586,23 @@ proto.feeds.v1beta1.QueryIsFeederRequest.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryIsFeederRequest} + * @return {!proto.band.feeds.v1beta1.QueryVoteRequest} */ -proto.feeds.v1beta1.QueryIsFeederRequest.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryVoteRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryIsFeederRequest; - return proto.feeds.v1beta1.QueryIsFeederRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryVoteRequest; + return proto.band.feeds.v1beta1.QueryVoteRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryIsFeederRequest} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryVoteRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryIsFeederRequest} + * @return {!proto.band.feeds.v1beta1.QueryVoteRequest} */ -proto.feeds.v1beta1.QueryIsFeederRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryVoteRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3314,11 +3611,7 @@ proto.feeds.v1beta1.QueryIsFeederRequest.deserializeBinaryFromReader = function( switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setValidatorAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setFeederAddress(value); + msg.setVoter(value); break; default: reader.skipField(); @@ -3333,9 +3626,9 @@ proto.feeds.v1beta1.QueryIsFeederRequest.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryIsFeederRequest.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryVoteRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryIsFeederRequest.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryVoteRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3343,65 +3636,47 @@ proto.feeds.v1beta1.QueryIsFeederRequest.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryIsFeederRequest} message + * @param {!proto.band.feeds.v1beta1.QueryVoteRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryIsFeederRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryVoteRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValidatorAddress(); + f = message.getVoter(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getFeederAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } }; /** - * optional string validator_address = 1; + * optional string voter = 1; * @return {string} */ -proto.feeds.v1beta1.QueryIsFeederRequest.prototype.getValidatorAddress = function() { +proto.band.feeds.v1beta1.QueryVoteRequest.prototype.getVoter = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.QueryIsFeederRequest} returns this + * @return {!proto.band.feeds.v1beta1.QueryVoteRequest} returns this */ -proto.feeds.v1beta1.QueryIsFeederRequest.prototype.setValidatorAddress = function(value) { +proto.band.feeds.v1beta1.QueryVoteRequest.prototype.setVoter = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional string feeder_address = 2; - * @return {string} - */ -proto.feeds.v1beta1.QueryIsFeederRequest.prototype.getFeederAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - /** - * @param {string} value - * @return {!proto.feeds.v1beta1.QueryIsFeederRequest} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.feeds.v1beta1.QueryIsFeederRequest.prototype.setFeederAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - +proto.band.feeds.v1beta1.QueryVoteResponse.repeatedFields_ = [1]; @@ -3418,8 +3693,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.QueryIsFeederResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.QueryIsFeederResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.QueryVoteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.QueryVoteResponse.toObject(opt_includeInstance, this); }; @@ -3428,13 +3703,14 @@ proto.feeds.v1beta1.QueryIsFeederResponse.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.QueryIsFeederResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.QueryVoteResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryIsFeederResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.QueryVoteResponse.toObject = function(includeInstance, msg) { var f, obj = { - isFeeder: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + signalsList: jspb.Message.toObjectList(msg.getSignalsList(), + band_feeds_v1beta1_feeds_pb.Signal.toObject, includeInstance) }; if (includeInstance) { @@ -3448,23 +3724,23 @@ proto.feeds.v1beta1.QueryIsFeederResponse.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.QueryIsFeederResponse} + * @return {!proto.band.feeds.v1beta1.QueryVoteResponse} */ -proto.feeds.v1beta1.QueryIsFeederResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.QueryVoteResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.QueryIsFeederResponse; - return proto.feeds.v1beta1.QueryIsFeederResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.QueryVoteResponse; + return proto.band.feeds.v1beta1.QueryVoteResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.QueryIsFeederResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.QueryVoteResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.QueryIsFeederResponse} + * @return {!proto.band.feeds.v1beta1.QueryVoteResponse} */ -proto.feeds.v1beta1.QueryIsFeederResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.QueryVoteResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3472,8 +3748,9 @@ proto.feeds.v1beta1.QueryIsFeederResponse.deserializeBinaryFromReader = function var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsFeeder(value); + var value = new band_feeds_v1beta1_feeds_pb.Signal; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Signal.deserializeBinaryFromReader); + msg.addSignals(value); break; default: reader.skipField(); @@ -3488,9 +3765,9 @@ proto.feeds.v1beta1.QueryIsFeederResponse.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.QueryIsFeederResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.QueryVoteResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.QueryIsFeederResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.QueryVoteResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3498,38 +3775,59 @@ proto.feeds.v1beta1.QueryIsFeederResponse.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.QueryIsFeederResponse} message + * @param {!proto.band.feeds.v1beta1.QueryVoteResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.QueryIsFeederResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.QueryVoteResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIsFeeder(); - if (f) { - writer.writeBool( + f = message.getSignalsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, - f + f, + band_feeds_v1beta1_feeds_pb.Signal.serializeBinaryToWriter ); } }; /** - * optional bool is_feeder = 1; - * @return {boolean} + * repeated Signal signals = 1; + * @return {!Array} */ -proto.feeds.v1beta1.QueryIsFeederResponse.prototype.getIsFeeder = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.band.feeds.v1beta1.QueryVoteResponse.prototype.getSignalsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Signal, 1)); }; /** - * @param {boolean} value - * @return {!proto.feeds.v1beta1.QueryIsFeederResponse} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.QueryVoteResponse} returns this +*/ +proto.band.feeds.v1beta1.QueryVoteResponse.prototype.setSignalsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Signal=} opt_value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.Signal} */ -proto.feeds.v1beta1.QueryIsFeederResponse.prototype.setIsFeeder = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.band.feeds.v1beta1.QueryVoteResponse.prototype.addSignals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.feeds.v1beta1.Signal, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.feeds.v1beta1.QueryVoteResponse} returns this + */ +proto.band.feeds.v1beta1.QueryVoteResponse.prototype.clearSignalsList = function() { + return this.setSignalsList([]); }; -goog.object.extend(exports, proto.feeds.v1beta1); +goog.object.extend(exports, proto.band.feeds.v1beta1); diff --git a/codegen/band/feeds/v1beta1/query_pb_service.d.ts b/codegen/band/feeds/v1beta1/query_pb_service.d.ts new file mode 100644 index 0000000..ddfc62e --- /dev/null +++ b/codegen/band/feeds/v1beta1/query_pb_service.d.ts @@ -0,0 +1,253 @@ +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/query.proto + +import * as band_feeds_v1beta1_query_pb from "../../../band/feeds/v1beta1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryCurrentFeeds = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryCurrentFeedsRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryCurrentFeedsResponse; +}; + +type QueryIsFeeder = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryIsFeederRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryIsFeederResponse; +}; + +type QueryParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryParamsRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryParamsResponse; +}; + +type QueryPrice = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryPriceRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryPriceResponse; +}; + +type QueryPrices = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryPricesRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryPricesResponse; +}; + +type QueryAllPrices = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryAllPricesRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryAllPricesResponse; +}; + +type QueryReferenceSourceConfig = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryReferenceSourceConfigRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryReferenceSourceConfigResponse; +}; + +type QuerySignalTotalPowers = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QuerySignalTotalPowersRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QuerySignalTotalPowersResponse; +}; + +type QueryValidValidator = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryValidValidatorRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryValidValidatorResponse; +}; + +type QueryValidatorPrices = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryValidatorPricesRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryValidatorPricesResponse; +}; + +type QueryVote = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_feeds_v1beta1_query_pb.QueryVoteRequest; + readonly responseType: typeof band_feeds_v1beta1_query_pb.QueryVoteResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly CurrentFeeds: QueryCurrentFeeds; + static readonly IsFeeder: QueryIsFeeder; + static readonly Params: QueryParams; + static readonly Price: QueryPrice; + static readonly Prices: QueryPrices; + static readonly AllPrices: QueryAllPrices; + static readonly ReferenceSourceConfig: QueryReferenceSourceConfig; + static readonly SignalTotalPowers: QuerySignalTotalPowers; + static readonly ValidValidator: QueryValidValidator; + static readonly ValidatorPrices: QueryValidatorPrices; + static readonly Vote: QueryVote; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + currentFeeds( + requestMessage: band_feeds_v1beta1_query_pb.QueryCurrentFeedsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryCurrentFeedsResponse|null) => void + ): UnaryResponse; + currentFeeds( + requestMessage: band_feeds_v1beta1_query_pb.QueryCurrentFeedsRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryCurrentFeedsResponse|null) => void + ): UnaryResponse; + isFeeder( + requestMessage: band_feeds_v1beta1_query_pb.QueryIsFeederRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryIsFeederResponse|null) => void + ): UnaryResponse; + isFeeder( + requestMessage: band_feeds_v1beta1_query_pb.QueryIsFeederRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryIsFeederResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_feeds_v1beta1_query_pb.QueryParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_feeds_v1beta1_query_pb.QueryParamsRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + price( + requestMessage: band_feeds_v1beta1_query_pb.QueryPriceRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryPriceResponse|null) => void + ): UnaryResponse; + price( + requestMessage: band_feeds_v1beta1_query_pb.QueryPriceRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryPriceResponse|null) => void + ): UnaryResponse; + prices( + requestMessage: band_feeds_v1beta1_query_pb.QueryPricesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryPricesResponse|null) => void + ): UnaryResponse; + prices( + requestMessage: band_feeds_v1beta1_query_pb.QueryPricesRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryPricesResponse|null) => void + ): UnaryResponse; + allPrices( + requestMessage: band_feeds_v1beta1_query_pb.QueryAllPricesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryAllPricesResponse|null) => void + ): UnaryResponse; + allPrices( + requestMessage: band_feeds_v1beta1_query_pb.QueryAllPricesRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryAllPricesResponse|null) => void + ): UnaryResponse; + referenceSourceConfig( + requestMessage: band_feeds_v1beta1_query_pb.QueryReferenceSourceConfigRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryReferenceSourceConfigResponse|null) => void + ): UnaryResponse; + referenceSourceConfig( + requestMessage: band_feeds_v1beta1_query_pb.QueryReferenceSourceConfigRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryReferenceSourceConfigResponse|null) => void + ): UnaryResponse; + signalTotalPowers( + requestMessage: band_feeds_v1beta1_query_pb.QuerySignalTotalPowersRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QuerySignalTotalPowersResponse|null) => void + ): UnaryResponse; + signalTotalPowers( + requestMessage: band_feeds_v1beta1_query_pb.QuerySignalTotalPowersRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QuerySignalTotalPowersResponse|null) => void + ): UnaryResponse; + validValidator( + requestMessage: band_feeds_v1beta1_query_pb.QueryValidValidatorRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryValidValidatorResponse|null) => void + ): UnaryResponse; + validValidator( + requestMessage: band_feeds_v1beta1_query_pb.QueryValidValidatorRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryValidValidatorResponse|null) => void + ): UnaryResponse; + validatorPrices( + requestMessage: band_feeds_v1beta1_query_pb.QueryValidatorPricesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryValidatorPricesResponse|null) => void + ): UnaryResponse; + validatorPrices( + requestMessage: band_feeds_v1beta1_query_pb.QueryValidatorPricesRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryValidatorPricesResponse|null) => void + ): UnaryResponse; + vote( + requestMessage: band_feeds_v1beta1_query_pb.QueryVoteRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryVoteResponse|null) => void + ): UnaryResponse; + vote( + requestMessage: band_feeds_v1beta1_query_pb.QueryVoteRequest, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_query_pb.QueryVoteResponse|null) => void + ): UnaryResponse; +} + diff --git a/proto/feeds/v1beta1/query_pb_service.js b/codegen/band/feeds/v1beta1/query_pb_service.js similarity index 77% rename from proto/feeds/v1beta1/query_pb_service.js rename to codegen/band/feeds/v1beta1/query_pb_service.js index c6a89df..93efa11 100644 --- a/proto/feeds/v1beta1/query_pb_service.js +++ b/codegen/band/feeds/v1beta1/query_pb_service.js @@ -1,67 +1,67 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/query.proto +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/query.proto -var feeds_v1beta1_query_pb = require("../../feeds/v1beta1/query_pb"); +var band_feeds_v1beta1_query_pb = require("../../../band/feeds/v1beta1/query_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; var Query = (function () { function Query() {} - Query.serviceName = "feeds.v1beta1.Query"; + Query.serviceName = "band.feeds.v1beta1.Query"; return Query; }()); -Query.Prices = { - methodName: "Prices", +Query.CurrentFeeds = { + methodName: "CurrentFeeds", service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QueryPricesRequest, - responseType: feeds_v1beta1_query_pb.QueryPricesResponse + requestType: band_feeds_v1beta1_query_pb.QueryCurrentFeedsRequest, + responseType: band_feeds_v1beta1_query_pb.QueryCurrentFeedsResponse }; -Query.Price = { - methodName: "Price", +Query.IsFeeder = { + methodName: "IsFeeder", service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QueryPriceRequest, - responseType: feeds_v1beta1_query_pb.QueryPriceResponse + requestType: band_feeds_v1beta1_query_pb.QueryIsFeederRequest, + responseType: band_feeds_v1beta1_query_pb.QueryIsFeederResponse }; -Query.ValidatorPrices = { - methodName: "ValidatorPrices", +Query.Params = { + methodName: "Params", service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QueryValidatorPricesRequest, - responseType: feeds_v1beta1_query_pb.QueryValidatorPricesResponse + requestType: band_feeds_v1beta1_query_pb.QueryParamsRequest, + responseType: band_feeds_v1beta1_query_pb.QueryParamsResponse }; -Query.ValidValidator = { - methodName: "ValidValidator", +Query.Price = { + methodName: "Price", service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QueryValidValidatorRequest, - responseType: feeds_v1beta1_query_pb.QueryValidValidatorResponse + requestType: band_feeds_v1beta1_query_pb.QueryPriceRequest, + responseType: band_feeds_v1beta1_query_pb.QueryPriceResponse }; -Query.SignalTotalPowers = { - methodName: "SignalTotalPowers", +Query.Prices = { + methodName: "Prices", service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QuerySignalTotalPowersRequest, - responseType: feeds_v1beta1_query_pb.QuerySignalTotalPowersResponse + requestType: band_feeds_v1beta1_query_pb.QueryPricesRequest, + responseType: band_feeds_v1beta1_query_pb.QueryPricesResponse }; -Query.Params = { - methodName: "Params", +Query.AllPrices = { + methodName: "AllPrices", service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QueryParamsRequest, - responseType: feeds_v1beta1_query_pb.QueryParamsResponse + requestType: band_feeds_v1beta1_query_pb.QueryAllPricesRequest, + responseType: band_feeds_v1beta1_query_pb.QueryAllPricesResponse }; Query.ReferenceSourceConfig = { @@ -69,35 +69,44 @@ Query.ReferenceSourceConfig = { service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QueryReferenceSourceConfigRequest, - responseType: feeds_v1beta1_query_pb.QueryReferenceSourceConfigResponse + requestType: band_feeds_v1beta1_query_pb.QueryReferenceSourceConfigRequest, + responseType: band_feeds_v1beta1_query_pb.QueryReferenceSourceConfigResponse }; -Query.DelegatorSignals = { - methodName: "DelegatorSignals", +Query.SignalTotalPowers = { + methodName: "SignalTotalPowers", service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QueryDelegatorSignalsRequest, - responseType: feeds_v1beta1_query_pb.QueryDelegatorSignalsResponse + requestType: band_feeds_v1beta1_query_pb.QuerySignalTotalPowersRequest, + responseType: band_feeds_v1beta1_query_pb.QuerySignalTotalPowersResponse }; -Query.CurrentFeeds = { - methodName: "CurrentFeeds", +Query.ValidValidator = { + methodName: "ValidValidator", service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QueryCurrentFeedsRequest, - responseType: feeds_v1beta1_query_pb.QueryCurrentFeedsResponse + requestType: band_feeds_v1beta1_query_pb.QueryValidValidatorRequest, + responseType: band_feeds_v1beta1_query_pb.QueryValidValidatorResponse }; -Query.IsFeeder = { - methodName: "IsFeeder", +Query.ValidatorPrices = { + methodName: "ValidatorPrices", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_feeds_v1beta1_query_pb.QueryValidatorPricesRequest, + responseType: band_feeds_v1beta1_query_pb.QueryValidatorPricesResponse +}; + +Query.Vote = { + methodName: "Vote", service: Query, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_query_pb.QueryIsFeederRequest, - responseType: feeds_v1beta1_query_pb.QueryIsFeederResponse + requestType: band_feeds_v1beta1_query_pb.QueryVoteRequest, + responseType: band_feeds_v1beta1_query_pb.QueryVoteResponse }; exports.Query = Query; @@ -107,11 +116,11 @@ function QueryClient(serviceHost, options) { this.options = options || {}; } -QueryClient.prototype.prices = function prices(requestMessage, metadata, callback) { +QueryClient.prototype.currentFeeds = function currentFeeds(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Prices, { + var client = grpc.unary(Query.CurrentFeeds, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -138,11 +147,11 @@ QueryClient.prototype.prices = function prices(requestMessage, metadata, callbac }; }; -QueryClient.prototype.price = function price(requestMessage, metadata, callback) { +QueryClient.prototype.isFeeder = function isFeeder(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Price, { + var client = grpc.unary(Query.IsFeeder, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -169,11 +178,11 @@ QueryClient.prototype.price = function price(requestMessage, metadata, callback) }; }; -QueryClient.prototype.validatorPrices = function validatorPrices(requestMessage, metadata, callback) { +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.ValidatorPrices, { + var client = grpc.unary(Query.Params, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -200,11 +209,11 @@ QueryClient.prototype.validatorPrices = function validatorPrices(requestMessage, }; }; -QueryClient.prototype.validValidator = function validValidator(requestMessage, metadata, callback) { +QueryClient.prototype.price = function price(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.ValidValidator, { + var client = grpc.unary(Query.Price, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -231,11 +240,11 @@ QueryClient.prototype.validValidator = function validValidator(requestMessage, m }; }; -QueryClient.prototype.signalTotalPowers = function signalTotalPowers(requestMessage, metadata, callback) { +QueryClient.prototype.prices = function prices(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.SignalTotalPowers, { + var client = grpc.unary(Query.Prices, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -262,11 +271,11 @@ QueryClient.prototype.signalTotalPowers = function signalTotalPowers(requestMess }; }; -QueryClient.prototype.params = function params(requestMessage, metadata, callback) { +QueryClient.prototype.allPrices = function allPrices(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Params, { + var client = grpc.unary(Query.AllPrices, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -324,11 +333,11 @@ QueryClient.prototype.referenceSourceConfig = function referenceSourceConfig(req }; }; -QueryClient.prototype.delegatorSignals = function delegatorSignals(requestMessage, metadata, callback) { +QueryClient.prototype.signalTotalPowers = function signalTotalPowers(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.DelegatorSignals, { + var client = grpc.unary(Query.SignalTotalPowers, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -355,11 +364,11 @@ QueryClient.prototype.delegatorSignals = function delegatorSignals(requestMessag }; }; -QueryClient.prototype.currentFeeds = function currentFeeds(requestMessage, metadata, callback) { +QueryClient.prototype.validValidator = function validValidator(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.CurrentFeeds, { + var client = grpc.unary(Query.ValidValidator, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -386,11 +395,42 @@ QueryClient.prototype.currentFeeds = function currentFeeds(requestMessage, metad }; }; -QueryClient.prototype.isFeeder = function isFeeder(requestMessage, metadata, callback) { +QueryClient.prototype.validatorPrices = function validatorPrices(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.IsFeeder, { + var client = grpc.unary(Query.ValidatorPrices, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.vote = function vote(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Vote, { request: requestMessage, host: this.serviceHost, metadata: metadata, diff --git a/codegen/band/feeds/v1beta1/tx.ts b/codegen/band/feeds/v1beta1/tx.ts new file mode 100644 index 0000000..4e641f2 --- /dev/null +++ b/codegen/band/feeds/v1beta1/tx.ts @@ -0,0 +1,650 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/feeds/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./feeds"; +import * as dependency_3 from "./params"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../../cosmos/msg/v1/msg"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.feeds.v1beta1 { + export class MsgVote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + voter?: string; + signals?: dependency_2.band.feeds.v1beta1.Signal[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("signals" in data && data.signals != undefined) { + this.signals = data.signals; + } + } + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get signals() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.band.feeds.v1beta1.Signal, 2) as dependency_2.band.feeds.v1beta1.Signal[]; + } + set signals(value: dependency_2.band.feeds.v1beta1.Signal[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + voter?: string; + signals?: ReturnType[]; + }): MsgVote { + const message = new MsgVote({}); + if (data.voter != null) { + message.voter = data.voter; + } + if (data.signals != null) { + message.signals = data.signals.map(item => dependency_2.band.feeds.v1beta1.Signal.fromObject(item)); + } + return message; + } + toObject() { + const data: { + voter?: string; + signals?: ReturnType[]; + } = {}; + if (this.voter != null) { + data.voter = this.voter; + } + if (this.signals != null) { + data.signals = this.signals.map((item: dependency_2.band.feeds.v1beta1.Signal) => item.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.voter.length) + writer.writeString(1, this.voter); + if (this.signals.length) + writer.writeRepeatedMessage(2, this.signals, (item: dependency_2.band.feeds.v1beta1.Signal) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgVote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.voter = reader.readString(); + break; + case 2: + reader.readMessage(message.signals, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.band.feeds.v1beta1.Signal.deserialize(reader), dependency_2.band.feeds.v1beta1.Signal)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVote { + return MsgVote.deserialize(bytes); + } + } + export class MsgVoteResponse 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: {}): MsgVoteResponse { + const message = new MsgVoteResponse({}); + 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): MsgVoteResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVoteResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVoteResponse { + return MsgVoteResponse.deserialize(bytes); + } + } + export class MsgSubmitSignalPrices extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: string; + timestamp?: number; + signal_prices?: dependency_2.band.feeds.v1beta1.SignalPrice[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("signal_prices" in data && data.signal_prices != undefined) { + this.signal_prices = data.signal_prices; + } + } + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 1, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 2, value); + } + get signal_prices() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.band.feeds.v1beta1.SignalPrice, 3) as dependency_2.band.feeds.v1beta1.SignalPrice[]; + } + set signal_prices(value: dependency_2.band.feeds.v1beta1.SignalPrice[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + validator?: string; + timestamp?: number; + signal_prices?: ReturnType[]; + }): MsgSubmitSignalPrices { + const message = new MsgSubmitSignalPrices({}); + if (data.validator != null) { + message.validator = data.validator; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + if (data.signal_prices != null) { + message.signal_prices = data.signal_prices.map(item => dependency_2.band.feeds.v1beta1.SignalPrice.fromObject(item)); + } + return message; + } + toObject() { + const data: { + validator?: string; + timestamp?: number; + signal_prices?: ReturnType[]; + } = {}; + if (this.validator != null) { + data.validator = this.validator; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + if (this.signal_prices != null) { + data.signal_prices = this.signal_prices.map((item: dependency_2.band.feeds.v1beta1.SignalPrice) => item.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.validator.length) + writer.writeString(1, this.validator); + if (this.timestamp != 0) + writer.writeInt64(2, this.timestamp); + if (this.signal_prices.length) + writer.writeRepeatedMessage(3, this.signal_prices, (item: dependency_2.band.feeds.v1beta1.SignalPrice) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitSignalPrices { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitSignalPrices(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator = reader.readString(); + break; + case 2: + message.timestamp = reader.readInt64(); + break; + case 3: + reader.readMessage(message.signal_prices, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.band.feeds.v1beta1.SignalPrice.deserialize(reader), dependency_2.band.feeds.v1beta1.SignalPrice)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitSignalPrices { + return MsgSubmitSignalPrices.deserialize(bytes); + } + } + export class MsgSubmitSignalPricesResponse 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: {}): MsgSubmitSignalPricesResponse { + const message = new MsgSubmitSignalPricesResponse({}); + 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): MsgSubmitSignalPricesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitSignalPricesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitSignalPricesResponse { + return MsgSubmitSignalPricesResponse.deserialize(bytes); + } + } + export class MsgUpdateReferenceSourceConfig extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + reference_source_config?: dependency_2.band.feeds.v1beta1.ReferenceSourceConfig; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("reference_source_config" in data && data.reference_source_config != undefined) { + this.reference_source_config = data.reference_source_config; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get reference_source_config() { + return pb_1.Message.getWrapperField(this, dependency_2.band.feeds.v1beta1.ReferenceSourceConfig, 2) as dependency_2.band.feeds.v1beta1.ReferenceSourceConfig; + } + set reference_source_config(value: dependency_2.band.feeds.v1beta1.ReferenceSourceConfig) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_reference_source_config() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + admin?: string; + reference_source_config?: ReturnType; + }): MsgUpdateReferenceSourceConfig { + const message = new MsgUpdateReferenceSourceConfig({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.reference_source_config != null) { + message.reference_source_config = dependency_2.band.feeds.v1beta1.ReferenceSourceConfig.fromObject(data.reference_source_config); + } + return message; + } + toObject() { + const data: { + admin?: string; + reference_source_config?: ReturnType; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.reference_source_config != null) { + data.reference_source_config = this.reference_source_config.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.admin.length) + writer.writeString(1, this.admin); + if (this.has_reference_source_config) + writer.writeMessage(2, this.reference_source_config, () => this.reference_source_config.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateReferenceSourceConfig { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateReferenceSourceConfig(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + reader.readMessage(message.reference_source_config, () => message.reference_source_config = dependency_2.band.feeds.v1beta1.ReferenceSourceConfig.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateReferenceSourceConfig { + return MsgUpdateReferenceSourceConfig.deserialize(bytes); + } + } + export class MsgUpdateReferenceSourceConfigResponse 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: {}): MsgUpdateReferenceSourceConfigResponse { + const message = new MsgUpdateReferenceSourceConfigResponse({}); + 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): MsgUpdateReferenceSourceConfigResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateReferenceSourceConfigResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateReferenceSourceConfigResponse { + return MsgUpdateReferenceSourceConfigResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_3.band.feeds.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.band.feeds.v1beta1.Params, 2) as dependency_3.band.feeds.v1beta1.Params; + } + set params(value: dependency_3.band.feeds.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_3.band.feeds.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_3.band.feeds.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + Vote: { + path: "/band.feeds.v1beta1.Msg/Vote", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgVote) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgVote.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgVoteResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgVoteResponse.deserialize(new Uint8Array(bytes)) + }, + SubmitSignalPrices: { + path: "/band.feeds.v1beta1.Msg/SubmitSignalPrices", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitSignalPrices) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitSignalPrices.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitSignalPricesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitSignalPricesResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateReferenceSourceConfig: { + path: "/band.feeds.v1beta1.Msg/UpdateReferenceSourceConfig", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateReferenceSourceConfig) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateReferenceSourceConfig.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateReferenceSourceConfigResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateReferenceSourceConfigResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/band.feeds.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Vote(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SubmitSignalPrices(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateReferenceSourceConfig(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Vote: GrpcUnaryServiceInterface = (message: MsgVote, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Vote(message, metadata, options, callback); + }; + SubmitSignalPrices: GrpcUnaryServiceInterface = (message: MsgSubmitSignalPrices, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitSignalPrices(message, metadata, options, callback); + }; + UpdateReferenceSourceConfig: GrpcUnaryServiceInterface = (message: MsgUpdateReferenceSourceConfig, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateReferenceSourceConfig(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/feeds/v1beta1/tx_pb.d.ts b/codegen/band/feeds/v1beta1/tx_pb.d.ts similarity index 69% rename from proto/feeds/v1beta1/tx_pb.d.ts rename to codegen/band/feeds/v1beta1/tx_pb.d.ts index 96e18a6..977c96f 100644 --- a/proto/feeds/v1beta1/tx_pb.d.ts +++ b/codegen/band/feeds/v1beta1/tx_pb.d.ts @@ -1,52 +1,52 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/tx.proto +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/tx.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as feeds_v1beta1_feeds_pb from "../../feeds/v1beta1/feeds_pb"; -import * as feeds_v1beta1_params_pb from "../../feeds/v1beta1/params_pb"; -import * as cosmos_proto_cosmos_pb from "../../cosmos_proto/cosmos_pb"; -import * as cosmos_msg_v1_msg_pb from "../../cosmos/msg/v1/msg_pb"; -import * as amino_amino_pb from "../../amino/amino_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as band_feeds_v1beta1_feeds_pb from "../../../band/feeds/v1beta1/feeds_pb"; +import * as band_feeds_v1beta1_params_pb from "../../../band/feeds/v1beta1/params_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; +import * as amino_amino_pb from "../../../amino/amino_pb"; -export class MsgSubmitSignals extends jspb.Message { - getDelegator(): string; - setDelegator(value: string): void; +export class MsgVote extends jspb.Message { + getVoter(): string; + setVoter(value: string): void; clearSignalsList(): void; - getSignalsList(): Array; - setSignalsList(value: Array): void; - addSignals(value?: feeds_v1beta1_feeds_pb.Signal, index?: number): feeds_v1beta1_feeds_pb.Signal; + getSignalsList(): Array; + setSignalsList(value: Array): void; + addSignals(value?: band_feeds_v1beta1_feeds_pb.Signal, index?: number): band_feeds_v1beta1_feeds_pb.Signal; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitSignals.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitSignals): MsgSubmitSignals.AsObject; + toObject(includeInstance?: boolean): MsgVote.AsObject; + static toObject(includeInstance: boolean, msg: MsgVote): MsgVote.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitSignals, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitSignals; - static deserializeBinaryFromReader(message: MsgSubmitSignals, reader: jspb.BinaryReader): MsgSubmitSignals; + static serializeBinaryToWriter(message: MsgVote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgVote; + static deserializeBinaryFromReader(message: MsgVote, reader: jspb.BinaryReader): MsgVote; } -export namespace MsgSubmitSignals { +export namespace MsgVote { export type AsObject = { - delegator: string, - signalsList: Array, + voter: string, + signalsList: Array, } } -export class MsgSubmitSignalsResponse extends jspb.Message { +export class MsgVoteResponse extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitSignalsResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitSignalsResponse): MsgSubmitSignalsResponse.AsObject; + toObject(includeInstance?: boolean): MsgVoteResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgVoteResponse): MsgVoteResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitSignalsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitSignalsResponse; - static deserializeBinaryFromReader(message: MsgSubmitSignalsResponse, reader: jspb.BinaryReader): MsgSubmitSignalsResponse; + static serializeBinaryToWriter(message: MsgVoteResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgVoteResponse; + static deserializeBinaryFromReader(message: MsgVoteResponse, reader: jspb.BinaryReader): MsgVoteResponse; } -export namespace MsgSubmitSignalsResponse { +export namespace MsgVoteResponse { export type AsObject = { } } @@ -58,10 +58,10 @@ export class MsgSubmitSignalPrices extends jspb.Message { getTimestamp(): number; setTimestamp(value: number): void; - clearPricesList(): void; - getPricesList(): Array; - setPricesList(value: Array): void; - addPrices(value?: feeds_v1beta1_feeds_pb.SignalPrice, index?: number): feeds_v1beta1_feeds_pb.SignalPrice; + clearSignalPricesList(): void; + getSignalPricesList(): Array; + setSignalPricesList(value: Array): void; + addSignalPrices(value?: band_feeds_v1beta1_feeds_pb.SignalPrice, index?: number): band_feeds_v1beta1_feeds_pb.SignalPrice; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgSubmitSignalPrices.AsObject; @@ -77,7 +77,7 @@ export namespace MsgSubmitSignalPrices { export type AsObject = { validator: string, timestamp: number, - pricesList: Array, + signalPricesList: Array, } } @@ -103,8 +103,8 @@ export class MsgUpdateReferenceSourceConfig extends jspb.Message { hasReferenceSourceConfig(): boolean; clearReferenceSourceConfig(): void; - getReferenceSourceConfig(): feeds_v1beta1_feeds_pb.ReferenceSourceConfig | undefined; - setReferenceSourceConfig(value?: feeds_v1beta1_feeds_pb.ReferenceSourceConfig): void; + getReferenceSourceConfig(): band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig | undefined; + setReferenceSourceConfig(value?: band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgUpdateReferenceSourceConfig.AsObject; @@ -119,7 +119,7 @@ export class MsgUpdateReferenceSourceConfig extends jspb.Message { export namespace MsgUpdateReferenceSourceConfig { export type AsObject = { admin: string, - referenceSourceConfig?: feeds_v1beta1_feeds_pb.ReferenceSourceConfig.AsObject, + referenceSourceConfig?: band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.AsObject, } } @@ -145,8 +145,8 @@ export class MsgUpdateParams extends jspb.Message { hasParams(): boolean; clearParams(): void; - getParams(): feeds_v1beta1_params_pb.Params | undefined; - setParams(value?: feeds_v1beta1_params_pb.Params): void; + getParams(): band_feeds_v1beta1_params_pb.Params | undefined; + setParams(value?: band_feeds_v1beta1_params_pb.Params): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; @@ -161,7 +161,7 @@ export class MsgUpdateParams extends jspb.Message { export namespace MsgUpdateParams { export type AsObject = { authority: string, - params?: feeds_v1beta1_params_pb.Params.AsObject, + params?: band_feeds_v1beta1_params_pb.Params.AsObject, } } diff --git a/proto/feeds/v1beta1/tx_pb.js b/codegen/band/feeds/v1beta1/tx_pb.js similarity index 55% rename from proto/feeds/v1beta1/tx_pb.js rename to codegen/band/feeds/v1beta1/tx_pb.js index 04513c3..55231c8 100644 --- a/proto/feeds/v1beta1/tx_pb.js +++ b/codegen/band/feeds/v1beta1/tx_pb.js @@ -1,4 +1,4 @@ -// source: feeds/v1beta1/tx.proto +// source: band/feeds/v1beta1/tx.proto /** * @fileoverview * @enhanceable @@ -13,34 +13,28 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -var feeds_v1beta1_feeds_pb = require('../../feeds/v1beta1/feeds_pb.js'); -goog.object.extend(proto, feeds_v1beta1_feeds_pb); -var feeds_v1beta1_params_pb = require('../../feeds/v1beta1/params_pb.js'); -goog.object.extend(proto, feeds_v1beta1_params_pb); -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js'); +var band_feeds_v1beta1_feeds_pb = require('../../../band/feeds/v1beta1/feeds_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_feeds_pb); +var band_feeds_v1beta1_params_pb = require('../../../band/feeds/v1beta1/params_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_params_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); -var cosmos_msg_v1_msg_pb = require('../../cosmos/msg/v1/msg_pb.js'); +var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); goog.object.extend(proto, cosmos_msg_v1_msg_pb); -var amino_amino_pb = require('../../amino/amino_pb.js'); +var amino_amino_pb = require('../../../amino/amino_pb.js'); goog.object.extend(proto, amino_amino_pb); -goog.exportSymbol('proto.feeds.v1beta1.MsgSubmitSignalPrices', null, global); -goog.exportSymbol('proto.feeds.v1beta1.MsgSubmitSignalPricesResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.MsgSubmitSignals', null, global); -goog.exportSymbol('proto.feeds.v1beta1.MsgSubmitSignalsResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.MsgUpdateParams', null, global); -goog.exportSymbol('proto.feeds.v1beta1.MsgUpdateParamsResponse', null, global); -goog.exportSymbol('proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig', null, global); -goog.exportSymbol('proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.MsgSubmitSignalPrices', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.MsgUpdateParamsResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.MsgVote', null, global); +goog.exportSymbol('proto.band.feeds.v1beta1.MsgVoteResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -51,16 +45,16 @@ goog.exportSymbol('proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse', * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.MsgSubmitSignals = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.MsgSubmitSignals.repeatedFields_, null); +proto.band.feeds.v1beta1.MsgVote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.MsgVote.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.MsgSubmitSignals, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.MsgVote, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.MsgSubmitSignals.displayName = 'proto.feeds.v1beta1.MsgSubmitSignals'; + proto.band.feeds.v1beta1.MsgVote.displayName = 'proto.band.feeds.v1beta1.MsgVote'; } /** * Generated by JsPbCodeGenerator. @@ -72,16 +66,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.MsgSubmitSignalsResponse = function(opt_data) { +proto.band.feeds.v1beta1.MsgVoteResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.MsgSubmitSignalsResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.MsgVoteResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.MsgSubmitSignalsResponse.displayName = 'proto.feeds.v1beta1.MsgSubmitSignalsResponse'; + proto.band.feeds.v1beta1.MsgVoteResponse.displayName = 'proto.band.feeds.v1beta1.MsgVoteResponse'; } /** * Generated by JsPbCodeGenerator. @@ -93,16 +87,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.MsgSubmitSignalPrices = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.MsgSubmitSignalPrices.repeatedFields_, null); +proto.band.feeds.v1beta1.MsgSubmitSignalPrices = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.feeds.v1beta1.MsgSubmitSignalPrices.repeatedFields_, null); }; -goog.inherits(proto.feeds.v1beta1.MsgSubmitSignalPrices, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.MsgSubmitSignalPrices, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.MsgSubmitSignalPrices.displayName = 'proto.feeds.v1beta1.MsgSubmitSignalPrices'; + proto.band.feeds.v1beta1.MsgSubmitSignalPrices.displayName = 'proto.band.feeds.v1beta1.MsgSubmitSignalPrices'; } /** * Generated by JsPbCodeGenerator. @@ -114,16 +108,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.MsgSubmitSignalPricesResponse = function(opt_data) { +proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.MsgSubmitSignalPricesResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.displayName = 'proto.feeds.v1beta1.MsgSubmitSignalPricesResponse'; + proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.displayName = 'proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -135,16 +129,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig = function(opt_data) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.displayName = 'proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig'; + proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.displayName = 'proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig'; } /** * Generated by JsPbCodeGenerator. @@ -156,16 +150,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse = function(opt_data) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.displayName = 'proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse'; + proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.displayName = 'proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse'; } /** * Generated by JsPbCodeGenerator. @@ -177,16 +171,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.MsgUpdateParams = function(opt_data) { +proto.band.feeds.v1beta1.MsgUpdateParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.MsgUpdateParams, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.MsgUpdateParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.MsgUpdateParams.displayName = 'proto.feeds.v1beta1.MsgUpdateParams'; + proto.band.feeds.v1beta1.MsgUpdateParams.displayName = 'proto.band.feeds.v1beta1.MsgUpdateParams'; } /** * Generated by JsPbCodeGenerator. @@ -198,16 +192,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.feeds.v1beta1.MsgUpdateParamsResponse = function(opt_data) { +proto.band.feeds.v1beta1.MsgUpdateParamsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.feeds.v1beta1.MsgUpdateParamsResponse, jspb.Message); +goog.inherits(proto.band.feeds.v1beta1.MsgUpdateParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.feeds.v1beta1.MsgUpdateParamsResponse.displayName = 'proto.feeds.v1beta1.MsgUpdateParamsResponse'; + proto.band.feeds.v1beta1.MsgUpdateParamsResponse.displayName = 'proto.band.feeds.v1beta1.MsgUpdateParamsResponse'; } /** @@ -215,7 +209,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.feeds.v1beta1.MsgSubmitSignals.repeatedFields_ = [2]; +proto.band.feeds.v1beta1.MsgVote.repeatedFields_ = [2]; @@ -232,8 +226,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.MsgSubmitSignals.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.MsgSubmitSignals.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.MsgVote.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.MsgVote.toObject(opt_includeInstance, this); }; @@ -242,15 +236,15 @@ proto.feeds.v1beta1.MsgSubmitSignals.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.MsgSubmitSignals} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.MsgVote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgSubmitSignals.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.MsgVote.toObject = function(includeInstance, msg) { var f, obj = { - delegator: jspb.Message.getFieldWithDefault(msg, 1, ""), + voter: jspb.Message.getFieldWithDefault(msg, 1, ""), signalsList: jspb.Message.toObjectList(msg.getSignalsList(), - feeds_v1beta1_feeds_pb.Signal.toObject, includeInstance) + band_feeds_v1beta1_feeds_pb.Signal.toObject, includeInstance) }; if (includeInstance) { @@ -264,23 +258,23 @@ proto.feeds.v1beta1.MsgSubmitSignals.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.MsgSubmitSignals} + * @return {!proto.band.feeds.v1beta1.MsgVote} */ -proto.feeds.v1beta1.MsgSubmitSignals.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.MsgVote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.MsgSubmitSignals; - return proto.feeds.v1beta1.MsgSubmitSignals.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.MsgVote; + return proto.band.feeds.v1beta1.MsgVote.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.MsgSubmitSignals} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.MsgVote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.MsgSubmitSignals} + * @return {!proto.band.feeds.v1beta1.MsgVote} */ -proto.feeds.v1beta1.MsgSubmitSignals.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.MsgVote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -289,11 +283,11 @@ proto.feeds.v1beta1.MsgSubmitSignals.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setDelegator(value); + msg.setVoter(value); break; case 2: - var value = new feeds_v1beta1_feeds_pb.Signal; - reader.readMessage(value,feeds_v1beta1_feeds_pb.Signal.deserializeBinaryFromReader); + var value = new band_feeds_v1beta1_feeds_pb.Signal; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Signal.deserializeBinaryFromReader); msg.addSignals(value); break; default: @@ -309,9 +303,9 @@ proto.feeds.v1beta1.MsgSubmitSignals.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.MsgSubmitSignals.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.MsgVote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.MsgSubmitSignals.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.MsgVote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -319,13 +313,13 @@ proto.feeds.v1beta1.MsgSubmitSignals.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.MsgSubmitSignals} message + * @param {!proto.band.feeds.v1beta1.MsgVote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgSubmitSignals.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.MsgVote.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDelegator(); + f = message.getVoter(); if (f.length > 0) { writer.writeString( 1, @@ -337,64 +331,64 @@ proto.feeds.v1beta1.MsgSubmitSignals.serializeBinaryToWriter = function(message, writer.writeRepeatedMessage( 2, f, - feeds_v1beta1_feeds_pb.Signal.serializeBinaryToWriter + band_feeds_v1beta1_feeds_pb.Signal.serializeBinaryToWriter ); } }; /** - * optional string delegator = 1; + * optional string voter = 1; * @return {string} */ -proto.feeds.v1beta1.MsgSubmitSignals.prototype.getDelegator = function() { +proto.band.feeds.v1beta1.MsgVote.prototype.getVoter = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.MsgSubmitSignals} returns this + * @return {!proto.band.feeds.v1beta1.MsgVote} returns this */ -proto.feeds.v1beta1.MsgSubmitSignals.prototype.setDelegator = function(value) { +proto.band.feeds.v1beta1.MsgVote.prototype.setVoter = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated Signal signals = 2; - * @return {!Array} + * @return {!Array} */ -proto.feeds.v1beta1.MsgSubmitSignals.prototype.getSignalsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, feeds_v1beta1_feeds_pb.Signal, 2)); +proto.band.feeds.v1beta1.MsgVote.prototype.getSignalsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Signal, 2)); }; /** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.MsgSubmitSignals} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.MsgVote} returns this */ -proto.feeds.v1beta1.MsgSubmitSignals.prototype.setSignalsList = function(value) { +proto.band.feeds.v1beta1.MsgVote.prototype.setSignalsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {!proto.feeds.v1beta1.Signal=} opt_value + * @param {!proto.band.feeds.v1beta1.Signal=} opt_value * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.Signal} + * @return {!proto.band.feeds.v1beta1.Signal} */ -proto.feeds.v1beta1.MsgSubmitSignals.prototype.addSignals = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.feeds.v1beta1.Signal, opt_index); +proto.band.feeds.v1beta1.MsgVote.prototype.addSignals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.feeds.v1beta1.Signal, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.MsgSubmitSignals} returns this + * @return {!proto.band.feeds.v1beta1.MsgVote} returns this */ -proto.feeds.v1beta1.MsgSubmitSignals.prototype.clearSignalsList = function() { +proto.band.feeds.v1beta1.MsgVote.prototype.clearSignalsList = function() { return this.setSignalsList([]); }; @@ -415,8 +409,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.MsgSubmitSignalsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.MsgSubmitSignalsResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.MsgVoteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.MsgVoteResponse.toObject(opt_includeInstance, this); }; @@ -425,11 +419,11 @@ proto.feeds.v1beta1.MsgSubmitSignalsResponse.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.MsgSubmitSignalsResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.MsgVoteResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgSubmitSignalsResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.MsgVoteResponse.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -445,23 +439,23 @@ proto.feeds.v1beta1.MsgSubmitSignalsResponse.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.MsgSubmitSignalsResponse} + * @return {!proto.band.feeds.v1beta1.MsgVoteResponse} */ -proto.feeds.v1beta1.MsgSubmitSignalsResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.MsgVoteResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.MsgSubmitSignalsResponse; - return proto.feeds.v1beta1.MsgSubmitSignalsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.MsgVoteResponse; + return proto.band.feeds.v1beta1.MsgVoteResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.MsgSubmitSignalsResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.MsgVoteResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.MsgSubmitSignalsResponse} + * @return {!proto.band.feeds.v1beta1.MsgVoteResponse} */ -proto.feeds.v1beta1.MsgSubmitSignalsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.MsgVoteResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -481,9 +475,9 @@ proto.feeds.v1beta1.MsgSubmitSignalsResponse.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.MsgSubmitSignalsResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.MsgVoteResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.MsgSubmitSignalsResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.MsgVoteResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -491,11 +485,11 @@ proto.feeds.v1beta1.MsgSubmitSignalsResponse.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.MsgSubmitSignalsResponse} message + * @param {!proto.band.feeds.v1beta1.MsgVoteResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgSubmitSignalsResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.MsgVoteResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -506,7 +500,7 @@ proto.feeds.v1beta1.MsgSubmitSignalsResponse.serializeBinaryToWriter = function( * @private {!Array} * @const */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.repeatedFields_ = [3]; +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.repeatedFields_ = [3]; @@ -523,8 +517,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.MsgSubmitSignalPrices.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.MsgSubmitSignalPrices.toObject(opt_includeInstance, this); }; @@ -533,16 +527,16 @@ proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.MsgSubmitSignalPrices} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.MsgSubmitSignalPrices} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.toObject = function(includeInstance, msg) { var f, obj = { validator: jspb.Message.getFieldWithDefault(msg, 1, ""), timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), - pricesList: jspb.Message.toObjectList(msg.getPricesList(), - feeds_v1beta1_feeds_pb.SignalPrice.toObject, includeInstance) + signalPricesList: jspb.Message.toObjectList(msg.getSignalPricesList(), + band_feeds_v1beta1_feeds_pb.SignalPrice.toObject, includeInstance) }; if (includeInstance) { @@ -556,23 +550,23 @@ proto.feeds.v1beta1.MsgSubmitSignalPrices.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.MsgSubmitSignalPrices} + * @return {!proto.band.feeds.v1beta1.MsgSubmitSignalPrices} */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.MsgSubmitSignalPrices; - return proto.feeds.v1beta1.MsgSubmitSignalPrices.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.MsgSubmitSignalPrices; + return proto.band.feeds.v1beta1.MsgSubmitSignalPrices.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.MsgSubmitSignalPrices} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.MsgSubmitSignalPrices} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.MsgSubmitSignalPrices} + * @return {!proto.band.feeds.v1beta1.MsgSubmitSignalPrices} */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -588,9 +582,9 @@ proto.feeds.v1beta1.MsgSubmitSignalPrices.deserializeBinaryFromReader = function msg.setTimestamp(value); break; case 3: - var value = new feeds_v1beta1_feeds_pb.SignalPrice; - reader.readMessage(value,feeds_v1beta1_feeds_pb.SignalPrice.deserializeBinaryFromReader); - msg.addPrices(value); + var value = new band_feeds_v1beta1_feeds_pb.SignalPrice; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.SignalPrice.deserializeBinaryFromReader); + msg.addSignalPrices(value); break; default: reader.skipField(); @@ -605,9 +599,9 @@ proto.feeds.v1beta1.MsgSubmitSignalPrices.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.MsgSubmitSignalPrices.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.MsgSubmitSignalPrices.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -615,11 +609,11 @@ proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.MsgSubmitSignalPrices} message + * @param {!proto.band.feeds.v1beta1.MsgSubmitSignalPrices} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getValidator(); if (f.length > 0) { @@ -635,12 +629,12 @@ proto.feeds.v1beta1.MsgSubmitSignalPrices.serializeBinaryToWriter = function(mes f ); } - f = message.getPricesList(); + f = message.getSignalPricesList(); if (f.length > 0) { writer.writeRepeatedMessage( 3, f, - feeds_v1beta1_feeds_pb.SignalPrice.serializeBinaryToWriter + band_feeds_v1beta1_feeds_pb.SignalPrice.serializeBinaryToWriter ); } }; @@ -650,16 +644,16 @@ proto.feeds.v1beta1.MsgSubmitSignalPrices.serializeBinaryToWriter = function(mes * optional string validator = 1; * @return {string} */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.getValidator = function() { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.getValidator = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.MsgSubmitSignalPrices} returns this + * @return {!proto.band.feeds.v1beta1.MsgSubmitSignalPrices} returns this */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.setValidator = function(value) { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.setValidator = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -668,55 +662,55 @@ proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.setValidator = function(valu * optional int64 timestamp = 2; * @return {number} */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.getTimestamp = function() { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.getTimestamp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.feeds.v1beta1.MsgSubmitSignalPrices} returns this + * @return {!proto.band.feeds.v1beta1.MsgSubmitSignalPrices} returns this */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.setTimestamp = function(value) { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.setTimestamp = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** - * repeated SignalPrice prices = 3; - * @return {!Array} + * repeated SignalPrice signal_prices = 3; + * @return {!Array} */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.getPricesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, feeds_v1beta1_feeds_pb.SignalPrice, 3)); +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.getSignalPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.SignalPrice, 3)); }; /** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.MsgSubmitSignalPrices} returns this + * @param {!Array} value + * @return {!proto.band.feeds.v1beta1.MsgSubmitSignalPrices} returns this */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.setPricesList = function(value) { +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.setSignalPricesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * @param {!proto.feeds.v1beta1.SignalPrice=} opt_value + * @param {!proto.band.feeds.v1beta1.SignalPrice=} opt_value * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.SignalPrice} + * @return {!proto.band.feeds.v1beta1.SignalPrice} */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.addPrices = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.feeds.v1beta1.SignalPrice, opt_index); +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.addSignalPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.feeds.v1beta1.SignalPrice, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.MsgSubmitSignalPrices} returns this + * @return {!proto.band.feeds.v1beta1.MsgSubmitSignalPrices} returns this */ -proto.feeds.v1beta1.MsgSubmitSignalPrices.prototype.clearPricesList = function() { - return this.setPricesList([]); +proto.band.feeds.v1beta1.MsgSubmitSignalPrices.prototype.clearSignalPricesList = function() { + return this.setSignalPricesList([]); }; @@ -736,8 +730,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.toObject(opt_includeInstance, this); }; @@ -746,11 +740,11 @@ proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.MsgSubmitSignalPricesResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -766,23 +760,23 @@ proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.MsgSubmitSignalPricesResponse} + * @return {!proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse} */ -proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.MsgSubmitSignalPricesResponse; - return proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse; + return proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.MsgSubmitSignalPricesResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.MsgSubmitSignalPricesResponse} + * @return {!proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse} */ -proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -802,9 +796,9 @@ proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -812,11 +806,11 @@ proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.MsgSubmitSignalPricesResponse} message + * @param {!proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgSubmitSignalPricesResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.MsgSubmitSignalPricesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -837,8 +831,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.toObject(opt_includeInstance, this); }; @@ -847,14 +841,14 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.toObject = function(includeInstance, msg) { var f, obj = { admin: jspb.Message.getFieldWithDefault(msg, 1, ""), - referenceSourceConfig: (f = msg.getReferenceSourceConfig()) && feeds_v1beta1_feeds_pb.ReferenceSourceConfig.toObject(includeInstance, f) + referenceSourceConfig: (f = msg.getReferenceSourceConfig()) && band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.toObject(includeInstance, f) }; if (includeInstance) { @@ -868,23 +862,23 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig} + * @return {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig; - return proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig; + return proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig} + * @return {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -896,8 +890,8 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.deserializeBinaryFromReader = msg.setAdmin(value); break; case 2: - var value = new feeds_v1beta1_feeds_pb.ReferenceSourceConfig; - reader.readMessage(value,feeds_v1beta1_feeds_pb.ReferenceSourceConfig.deserializeBinaryFromReader); + var value = new band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.deserializeBinaryFromReader); msg.setReferenceSourceConfig(value); break; default: @@ -913,9 +907,9 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -923,11 +917,11 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig} message + * @param {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAdmin(); if (f.length > 0) { @@ -941,7 +935,7 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.serializeBinaryToWriter = fun writer.writeMessage( 2, f, - feeds_v1beta1_feeds_pb.ReferenceSourceConfig.serializeBinaryToWriter + band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig.serializeBinaryToWriter ); } }; @@ -951,44 +945,44 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.serializeBinaryToWriter = fun * optional string admin = 1; * @return {string} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.getAdmin = function() { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.getAdmin = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig} returns this + * @return {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig} returns this */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.setAdmin = function(value) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.setAdmin = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional ReferenceSourceConfig reference_source_config = 2; - * @return {?proto.feeds.v1beta1.ReferenceSourceConfig} + * @return {?proto.band.feeds.v1beta1.ReferenceSourceConfig} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.getReferenceSourceConfig = function() { - return /** @type{?proto.feeds.v1beta1.ReferenceSourceConfig} */ ( - jspb.Message.getWrapperField(this, feeds_v1beta1_feeds_pb.ReferenceSourceConfig, 2)); +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.getReferenceSourceConfig = function() { + return /** @type{?proto.band.feeds.v1beta1.ReferenceSourceConfig} */ ( + jspb.Message.getWrapperField(this, band_feeds_v1beta1_feeds_pb.ReferenceSourceConfig, 2)); }; /** - * @param {?proto.feeds.v1beta1.ReferenceSourceConfig|undefined} value - * @return {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig} returns this + * @param {?proto.band.feeds.v1beta1.ReferenceSourceConfig|undefined} value + * @return {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig} returns this */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.setReferenceSourceConfig = function(value) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.setReferenceSourceConfig = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig} returns this + * @return {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig} returns this */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.clearReferenceSourceConfig = function() { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.clearReferenceSourceConfig = function() { return this.setReferenceSourceConfig(undefined); }; @@ -997,7 +991,7 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.clearReferenceSourc * Returns whether this field is set. * @return {boolean} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.hasReferenceSourceConfig = function() { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.prototype.hasReferenceSourceConfig = function() { return jspb.Message.getField(this, 2) != null; }; @@ -1018,8 +1012,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.toObject(opt_includeInstance, this); }; @@ -1028,11 +1022,11 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.prototype.toObject = * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -1048,23 +1042,23 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.toObject = function(i /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} + * @return {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse; - return proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse; + return proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} + * @return {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1084,9 +1078,9 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.deserializeBinaryFrom * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1094,11 +1088,11 @@ proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.prototype.serializeBi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} message + * @param {!proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -1119,8 +1113,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.MsgUpdateParams.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.MsgUpdateParams.toObject(opt_includeInstance, this); }; @@ -1129,14 +1123,14 @@ proto.feeds.v1beta1.MsgUpdateParams.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.MsgUpdateParams} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.MsgUpdateParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgUpdateParams.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.MsgUpdateParams.toObject = function(includeInstance, msg) { var f, obj = { authority: jspb.Message.getFieldWithDefault(msg, 1, ""), - params: (f = msg.getParams()) && feeds_v1beta1_params_pb.Params.toObject(includeInstance, f) + params: (f = msg.getParams()) && band_feeds_v1beta1_params_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -1150,23 +1144,23 @@ proto.feeds.v1beta1.MsgUpdateParams.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.MsgUpdateParams} + * @return {!proto.band.feeds.v1beta1.MsgUpdateParams} */ -proto.feeds.v1beta1.MsgUpdateParams.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.MsgUpdateParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.MsgUpdateParams; - return proto.feeds.v1beta1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.MsgUpdateParams; + return proto.band.feeds.v1beta1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.MsgUpdateParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.MsgUpdateParams} + * @return {!proto.band.feeds.v1beta1.MsgUpdateParams} */ -proto.feeds.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1178,8 +1172,8 @@ proto.feeds.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, msg.setAuthority(value); break; case 2: - var value = new feeds_v1beta1_params_pb.Params; - reader.readMessage(value,feeds_v1beta1_params_pb.Params.deserializeBinaryFromReader); + var value = new band_feeds_v1beta1_params_pb.Params; + reader.readMessage(value,band_feeds_v1beta1_params_pb.Params.deserializeBinaryFromReader); msg.setParams(value); break; default: @@ -1195,9 +1189,9 @@ proto.feeds.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.MsgUpdateParams.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.MsgUpdateParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.MsgUpdateParams.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1205,11 +1199,11 @@ proto.feeds.v1beta1.MsgUpdateParams.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.MsgUpdateParams} message + * @param {!proto.band.feeds.v1beta1.MsgUpdateParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAuthority(); if (f.length > 0) { @@ -1223,7 +1217,7 @@ proto.feeds.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer.writeMessage( 2, f, - feeds_v1beta1_params_pb.Params.serializeBinaryToWriter + band_feeds_v1beta1_params_pb.Params.serializeBinaryToWriter ); } }; @@ -1233,44 +1227,44 @@ proto.feeds.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, * optional string authority = 1; * @return {string} */ -proto.feeds.v1beta1.MsgUpdateParams.prototype.getAuthority = function() { +proto.band.feeds.v1beta1.MsgUpdateParams.prototype.getAuthority = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.feeds.v1beta1.MsgUpdateParams} returns this + * @return {!proto.band.feeds.v1beta1.MsgUpdateParams} returns this */ -proto.feeds.v1beta1.MsgUpdateParams.prototype.setAuthority = function(value) { +proto.band.feeds.v1beta1.MsgUpdateParams.prototype.setAuthority = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional Params params = 2; - * @return {?proto.feeds.v1beta1.Params} + * @return {?proto.band.feeds.v1beta1.Params} */ -proto.feeds.v1beta1.MsgUpdateParams.prototype.getParams = function() { - return /** @type{?proto.feeds.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, feeds_v1beta1_params_pb.Params, 2)); +proto.band.feeds.v1beta1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.band.feeds.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_feeds_v1beta1_params_pb.Params, 2)); }; /** - * @param {?proto.feeds.v1beta1.Params|undefined} value - * @return {!proto.feeds.v1beta1.MsgUpdateParams} returns this + * @param {?proto.band.feeds.v1beta1.Params|undefined} value + * @return {!proto.band.feeds.v1beta1.MsgUpdateParams} returns this */ -proto.feeds.v1beta1.MsgUpdateParams.prototype.setParams = function(value) { +proto.band.feeds.v1beta1.MsgUpdateParams.prototype.setParams = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.MsgUpdateParams} returns this + * @return {!proto.band.feeds.v1beta1.MsgUpdateParams} returns this */ -proto.feeds.v1beta1.MsgUpdateParams.prototype.clearParams = function() { +proto.band.feeds.v1beta1.MsgUpdateParams.prototype.clearParams = function() { return this.setParams(undefined); }; @@ -1279,7 +1273,7 @@ proto.feeds.v1beta1.MsgUpdateParams.prototype.clearParams = function() { * Returns whether this field is set. * @return {boolean} */ -proto.feeds.v1beta1.MsgUpdateParams.prototype.hasParams = function() { +proto.band.feeds.v1beta1.MsgUpdateParams.prototype.hasParams = function() { return jspb.Message.getField(this, 2) != null; }; @@ -1300,8 +1294,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.feeds.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +proto.band.feeds.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.feeds.v1beta1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); }; @@ -1310,11 +1304,11 @@ proto.feeds.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @param {!proto.band.feeds.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { +proto.band.feeds.v1beta1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -1330,23 +1324,23 @@ proto.feeds.v1beta1.MsgUpdateParamsResponse.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.MsgUpdateParamsResponse} + * @return {!proto.band.feeds.v1beta1.MsgUpdateParamsResponse} */ -proto.feeds.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { +proto.band.feeds.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.MsgUpdateParamsResponse; - return proto.feeds.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.feeds.v1beta1.MsgUpdateParamsResponse; + return proto.band.feeds.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.feeds.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!proto.band.feeds.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.MsgUpdateParamsResponse} + * @return {!proto.band.feeds.v1beta1.MsgUpdateParamsResponse} */ -proto.feeds.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.feeds.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1366,9 +1360,9 @@ proto.feeds.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.feeds.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { +proto.band.feeds.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + proto.band.feeds.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1376,13 +1370,13 @@ proto.feeds.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.MsgUpdateParamsResponse} message + * @param {!proto.band.feeds.v1beta1.MsgUpdateParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.feeds.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.feeds.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; -goog.object.extend(exports, proto.feeds.v1beta1); +goog.object.extend(exports, proto.band.feeds.v1beta1); diff --git a/proto/feeds/v1beta1/tx_pb_service.d.ts b/codegen/band/feeds/v1beta1/tx_pb_service.d.ts similarity index 52% rename from proto/feeds/v1beta1/tx_pb_service.d.ts rename to codegen/band/feeds/v1beta1/tx_pb_service.d.ts index 519fd0f..5ba76de 100644 --- a/proto/feeds/v1beta1/tx_pb_service.d.ts +++ b/codegen/band/feeds/v1beta1/tx_pb_service.d.ts @@ -1,16 +1,16 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/tx.proto +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/tx.proto -import * as feeds_v1beta1_tx_pb from "../../feeds/v1beta1/tx_pb"; +import * as band_feeds_v1beta1_tx_pb from "../../../band/feeds/v1beta1/tx_pb"; import {grpc} from "@improbable-eng/grpc-web"; -type MsgSubmitSignals = { +type MsgVote = { readonly methodName: string; readonly service: typeof Msg; readonly requestStream: false; readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_tx_pb.MsgSubmitSignals; - readonly responseType: typeof feeds_v1beta1_tx_pb.MsgSubmitSignalsResponse; + readonly requestType: typeof band_feeds_v1beta1_tx_pb.MsgVote; + readonly responseType: typeof band_feeds_v1beta1_tx_pb.MsgVoteResponse; }; type MsgSubmitSignalPrices = { @@ -18,8 +18,8 @@ type MsgSubmitSignalPrices = { readonly service: typeof Msg; readonly requestStream: false; readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_tx_pb.MsgSubmitSignalPrices; - readonly responseType: typeof feeds_v1beta1_tx_pb.MsgSubmitSignalPricesResponse; + readonly requestType: typeof band_feeds_v1beta1_tx_pb.MsgSubmitSignalPrices; + readonly responseType: typeof band_feeds_v1beta1_tx_pb.MsgSubmitSignalPricesResponse; }; type MsgUpdateReferenceSourceConfig = { @@ -27,8 +27,8 @@ type MsgUpdateReferenceSourceConfig = { readonly service: typeof Msg; readonly requestStream: false; readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfig; - readonly responseType: typeof feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfigResponse; + readonly requestType: typeof band_feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfig; + readonly responseType: typeof band_feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfigResponse; }; type MsgUpdateParams = { @@ -36,13 +36,13 @@ type MsgUpdateParams = { readonly service: typeof Msg; readonly requestStream: false; readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_tx_pb.MsgUpdateParams; - readonly responseType: typeof feeds_v1beta1_tx_pb.MsgUpdateParamsResponse; + readonly requestType: typeof band_feeds_v1beta1_tx_pb.MsgUpdateParams; + readonly responseType: typeof band_feeds_v1beta1_tx_pb.MsgUpdateParamsResponse; }; export class Msg { static readonly serviceName: string; - static readonly SubmitSignals: MsgSubmitSignals; + static readonly Vote: MsgVote; static readonly SubmitSignalPrices: MsgSubmitSignalPrices; static readonly UpdateReferenceSourceConfig: MsgUpdateReferenceSourceConfig; static readonly UpdateParams: MsgUpdateParams; @@ -80,41 +80,41 @@ export class MsgClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); - submitSignals( - requestMessage: feeds_v1beta1_tx_pb.MsgSubmitSignals, + vote( + requestMessage: band_feeds_v1beta1_tx_pb.MsgVote, metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_tx_pb.MsgSubmitSignalsResponse|null) => void + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_tx_pb.MsgVoteResponse|null) => void ): UnaryResponse; - submitSignals( - requestMessage: feeds_v1beta1_tx_pb.MsgSubmitSignals, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_tx_pb.MsgSubmitSignalsResponse|null) => void + vote( + requestMessage: band_feeds_v1beta1_tx_pb.MsgVote, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_tx_pb.MsgVoteResponse|null) => void ): UnaryResponse; submitSignalPrices( - requestMessage: feeds_v1beta1_tx_pb.MsgSubmitSignalPrices, + requestMessage: band_feeds_v1beta1_tx_pb.MsgSubmitSignalPrices, metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_tx_pb.MsgSubmitSignalPricesResponse|null) => void + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_tx_pb.MsgSubmitSignalPricesResponse|null) => void ): UnaryResponse; submitSignalPrices( - requestMessage: feeds_v1beta1_tx_pb.MsgSubmitSignalPrices, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_tx_pb.MsgSubmitSignalPricesResponse|null) => void + requestMessage: band_feeds_v1beta1_tx_pb.MsgSubmitSignalPrices, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_tx_pb.MsgSubmitSignalPricesResponse|null) => void ): UnaryResponse; updateReferenceSourceConfig( - requestMessage: feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfig, + requestMessage: band_feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfig, metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfigResponse|null) => void + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfigResponse|null) => void ): UnaryResponse; updateReferenceSourceConfig( - requestMessage: feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfig, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfigResponse|null) => void + requestMessage: band_feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfig, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfigResponse|null) => void ): UnaryResponse; updateParams( - requestMessage: feeds_v1beta1_tx_pb.MsgUpdateParams, + requestMessage: band_feeds_v1beta1_tx_pb.MsgUpdateParams, metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void ): UnaryResponse; updateParams( - requestMessage: feeds_v1beta1_tx_pb.MsgUpdateParams, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + requestMessage: band_feeds_v1beta1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: band_feeds_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void ): UnaryResponse; } diff --git a/proto/feeds/v1beta1/tx_pb_service.js b/codegen/band/feeds/v1beta1/tx_pb_service.js similarity index 82% rename from proto/feeds/v1beta1/tx_pb_service.js rename to codegen/band/feeds/v1beta1/tx_pb_service.js index 2092817..55dadbe 100644 --- a/proto/feeds/v1beta1/tx_pb_service.js +++ b/codegen/band/feeds/v1beta1/tx_pb_service.js @@ -1,22 +1,22 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/tx.proto +// package: band.feeds.v1beta1 +// file: band/feeds/v1beta1/tx.proto -var feeds_v1beta1_tx_pb = require("../../feeds/v1beta1/tx_pb"); +var band_feeds_v1beta1_tx_pb = require("../../../band/feeds/v1beta1/tx_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; var Msg = (function () { function Msg() {} - Msg.serviceName = "feeds.v1beta1.Msg"; + Msg.serviceName = "band.feeds.v1beta1.Msg"; return Msg; }()); -Msg.SubmitSignals = { - methodName: "SubmitSignals", +Msg.Vote = { + methodName: "Vote", service: Msg, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_tx_pb.MsgSubmitSignals, - responseType: feeds_v1beta1_tx_pb.MsgSubmitSignalsResponse + requestType: band_feeds_v1beta1_tx_pb.MsgVote, + responseType: band_feeds_v1beta1_tx_pb.MsgVoteResponse }; Msg.SubmitSignalPrices = { @@ -24,8 +24,8 @@ Msg.SubmitSignalPrices = { service: Msg, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_tx_pb.MsgSubmitSignalPrices, - responseType: feeds_v1beta1_tx_pb.MsgSubmitSignalPricesResponse + requestType: band_feeds_v1beta1_tx_pb.MsgSubmitSignalPrices, + responseType: band_feeds_v1beta1_tx_pb.MsgSubmitSignalPricesResponse }; Msg.UpdateReferenceSourceConfig = { @@ -33,8 +33,8 @@ Msg.UpdateReferenceSourceConfig = { service: Msg, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfig, - responseType: feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfigResponse + requestType: band_feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfig, + responseType: band_feeds_v1beta1_tx_pb.MsgUpdateReferenceSourceConfigResponse }; Msg.UpdateParams = { @@ -42,8 +42,8 @@ Msg.UpdateParams = { service: Msg, requestStream: false, responseStream: false, - requestType: feeds_v1beta1_tx_pb.MsgUpdateParams, - responseType: feeds_v1beta1_tx_pb.MsgUpdateParamsResponse + requestType: band_feeds_v1beta1_tx_pb.MsgUpdateParams, + responseType: band_feeds_v1beta1_tx_pb.MsgUpdateParamsResponse }; exports.Msg = Msg; @@ -53,11 +53,11 @@ function MsgClient(serviceHost, options) { this.options = options || {}; } -MsgClient.prototype.submitSignals = function submitSignals(requestMessage, metadata, callback) { +MsgClient.prototype.vote = function vote(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.SubmitSignals, { + var client = grpc.unary(Msg.Vote, { request: requestMessage, host: this.serviceHost, metadata: metadata, diff --git a/codegen/band/globalfee/v1beta1/genesis.ts b/codegen/band/globalfee/v1beta1/genesis.ts new file mode 100644 index 0000000..f5fbdc6 --- /dev/null +++ b/codegen/band/globalfee/v1beta1/genesis.ts @@ -0,0 +1,147 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/globalfee/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos/base/v1beta1/coin"; +import * as pb_1 from "google-protobuf"; +export namespace band.globalfee.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: 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, Params, 1) as Params; + } + set params(value: Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + minimum_gas_prices?: dependency_2.cosmos.base.v1beta1.DecCoin[]; + }) { + 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 ("minimum_gas_prices" in data && data.minimum_gas_prices != undefined) { + this.minimum_gas_prices = data.minimum_gas_prices; + } + } + } + get minimum_gas_prices() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.DecCoin, 1) as dependency_2.cosmos.base.v1beta1.DecCoin[]; + } + set minimum_gas_prices(value: dependency_2.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + minimum_gas_prices?: ReturnType[]; + }): Params { + const message = new Params({}); + if (data.minimum_gas_prices != null) { + message.minimum_gas_prices = data.minimum_gas_prices.map(item => dependency_2.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + minimum_gas_prices?: ReturnType[]; + } = {}; + if (this.minimum_gas_prices != null) { + data.minimum_gas_prices = this.minimum_gas_prices.map((item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.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.minimum_gas_prices.length) + writer.writeRepeatedMessage(1, this.minimum_gas_prices, (item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.minimum_gas_prices, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_2.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/codegen/band/globalfee/v1beta1/genesis_pb.d.ts b/codegen/band/globalfee/v1beta1/genesis_pb.d.ts new file mode 100644 index 0000000..3047dc7 --- /dev/null +++ b/codegen/band/globalfee/v1beta1/genesis_pb.d.ts @@ -0,0 +1,51 @@ +// package: band.globalfee.v1beta1 +// file: band/globalfee/v1beta1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; + +export class GenesisState extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): Params | undefined; + setParams(value?: Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + params?: Params.AsObject, + } +} + +export class Params extends jspb.Message { + clearMinimumGasPricesList(): void; + getMinimumGasPricesList(): Array; + setMinimumGasPricesList(value: Array): void; + addMinimumGasPrices(value?: cosmos_base_v1beta1_coin_pb.DecCoin, index?: number): cosmos_base_v1beta1_coin_pb.DecCoin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + minimumGasPricesList: Array, + } +} + diff --git a/codegen/band/globalfee/v1beta1/genesis_pb.js b/codegen/band/globalfee/v1beta1/genesis_pb.js new file mode 100644 index 0000000..db3a609 --- /dev/null +++ b/codegen/band/globalfee/v1beta1/genesis_pb.js @@ -0,0 +1,377 @@ +// source: band/globalfee/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.band.globalfee.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.band.globalfee.v1beta1.Params', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.globalfee.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.globalfee.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.globalfee.v1beta1.GenesisState.displayName = 'proto.band.globalfee.v1beta1.GenesisState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.globalfee.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.globalfee.v1beta1.Params.repeatedFields_, null); +}; +goog.inherits(proto.band.globalfee.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.globalfee.v1beta1.Params.displayName = 'proto.band.globalfee.v1beta1.Params'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.globalfee.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.band.globalfee.v1beta1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.globalfee.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.globalfee.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && proto.band.globalfee.v1beta1.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.globalfee.v1beta1.GenesisState} + */ +proto.band.globalfee.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.globalfee.v1beta1.GenesisState; + return proto.band.globalfee.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.globalfee.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.globalfee.v1beta1.GenesisState} + */ +proto.band.globalfee.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.globalfee.v1beta1.Params; + reader.readMessage(value,proto.band.globalfee.v1beta1.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.globalfee.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.globalfee.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.globalfee.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.globalfee.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.globalfee.v1beta1.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.globalfee.v1beta1.Params} + */ +proto.band.globalfee.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.band.globalfee.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, proto.band.globalfee.v1beta1.Params, 1)); +}; + + +/** + * @param {?proto.band.globalfee.v1beta1.Params|undefined} value + * @return {!proto.band.globalfee.v1beta1.GenesisState} returns this +*/ +proto.band.globalfee.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.globalfee.v1beta1.GenesisState} returns this + */ +proto.band.globalfee.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.globalfee.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.globalfee.v1beta1.Params.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.globalfee.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.band.globalfee.v1beta1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.globalfee.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.globalfee.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + minimumGasPricesList: jspb.Message.toObjectList(msg.getMinimumGasPricesList(), + cosmos_base_v1beta1_coin_pb.DecCoin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.globalfee.v1beta1.Params} + */ +proto.band.globalfee.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.globalfee.v1beta1.Params; + return proto.band.globalfee.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.globalfee.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.globalfee.v1beta1.Params} + */ +proto.band.globalfee.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_v1beta1_coin_pb.DecCoin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.DecCoin.deserializeBinaryFromReader); + msg.addMinimumGasPrices(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.globalfee.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.globalfee.v1beta1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.globalfee.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.globalfee.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMinimumGasPricesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin minimum_gas_prices = 1; + * @return {!Array} + */ +proto.band.globalfee.v1beta1.Params.prototype.getMinimumGasPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.globalfee.v1beta1.Params} returns this +*/ +proto.band.globalfee.v1beta1.Params.prototype.setMinimumGasPricesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.DecCoin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.DecCoin} + */ +proto.band.globalfee.v1beta1.Params.prototype.addMinimumGasPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.DecCoin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.globalfee.v1beta1.Params} returns this + */ +proto.band.globalfee.v1beta1.Params.prototype.clearMinimumGasPricesList = function() { + return this.setMinimumGasPricesList([]); +}; + + +goog.object.extend(exports, proto.band.globalfee.v1beta1); diff --git a/codegen/band/globalfee/v1beta1/genesis_pb_service.d.ts b/codegen/band/globalfee/v1beta1/genesis_pb_service.d.ts new file mode 100644 index 0000000..c5427cb --- /dev/null +++ b/codegen/band/globalfee/v1beta1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.globalfee.v1beta1 +// file: band/globalfee/v1beta1/genesis.proto + diff --git a/codegen/band/globalfee/v1beta1/genesis_pb_service.js b/codegen/band/globalfee/v1beta1/genesis_pb_service.js new file mode 100644 index 0000000..c5427cb --- /dev/null +++ b/codegen/band/globalfee/v1beta1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: band.globalfee.v1beta1 +// file: band/globalfee/v1beta1/genesis.proto + diff --git a/codegen/band/globalfee/v1beta1/query.ts b/codegen/band/globalfee/v1beta1/query.ts new file mode 100644 index 0000000..44e72ae --- /dev/null +++ b/codegen/band/globalfee/v1beta1/query.ts @@ -0,0 +1,169 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/globalfee/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/api/annotations"; +import * as dependency_3 from "./genesis"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.globalfee.v1beta1 { + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_3.band.globalfee.v1beta1.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_3.band.globalfee.v1beta1.Params, 1) as dependency_3.band.globalfee.v1beta1.Params; + } + set params(value: dependency_3.band.globalfee.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_3.band.globalfee.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_3.band.globalfee.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Params: { + path: "/band.globalfee.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/globalfee/v1beta1/query_pb.d.ts b/codegen/band/globalfee/v1beta1/query_pb.d.ts new file mode 100644 index 0000000..ed08363 --- /dev/null +++ b/codegen/band/globalfee/v1beta1/query_pb.d.ts @@ -0,0 +1,46 @@ +// package: band.globalfee.v1beta1 +// file: band/globalfee/v1beta1/query.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as band_globalfee_v1beta1_genesis_pb from "../../../band/globalfee/v1beta1/genesis_pb"; + +export class QueryParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; + static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; +} + +export namespace QueryParamsRequest { + export type AsObject = { + } +} + +export class QueryParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_globalfee_v1beta1_genesis_pb.Params | undefined; + setParams(value?: band_globalfee_v1beta1_genesis_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; + static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; +} + +export namespace QueryParamsResponse { + export type AsObject = { + params?: band_globalfee_v1beta1_genesis_pb.Params.AsObject, + } +} + diff --git a/codegen/band/globalfee/v1beta1/query_pb.js b/codegen/band/globalfee/v1beta1/query_pb.js new file mode 100644 index 0000000..20b539a --- /dev/null +++ b/codegen/band/globalfee/v1beta1/query_pb.js @@ -0,0 +1,320 @@ +// source: band/globalfee/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var band_globalfee_v1beta1_genesis_pb = require('../../../band/globalfee/v1beta1/genesis_pb.js'); +goog.object.extend(proto, band_globalfee_v1beta1_genesis_pb); +goog.exportSymbol('proto.band.globalfee.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.band.globalfee.v1beta1.QueryParamsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.globalfee.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.globalfee.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.globalfee.v1beta1.QueryParamsRequest.displayName = 'proto.band.globalfee.v1beta1.QueryParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.globalfee.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.globalfee.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.globalfee.v1beta1.QueryParamsResponse.displayName = 'proto.band.globalfee.v1beta1.QueryParamsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.globalfee.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.globalfee.v1beta1.QueryParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.globalfee.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.globalfee.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.globalfee.v1beta1.QueryParamsRequest} + */ +proto.band.globalfee.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.globalfee.v1beta1.QueryParamsRequest; + return proto.band.globalfee.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.globalfee.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.globalfee.v1beta1.QueryParamsRequest} + */ +proto.band.globalfee.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.globalfee.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.globalfee.v1beta1.QueryParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.globalfee.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.globalfee.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.globalfee.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.globalfee.v1beta1.QueryParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.globalfee.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.globalfee.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && band_globalfee_v1beta1_genesis_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.globalfee.v1beta1.QueryParamsResponse} + */ +proto.band.globalfee.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.globalfee.v1beta1.QueryParamsResponse; + return proto.band.globalfee.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.globalfee.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.globalfee.v1beta1.QueryParamsResponse} + */ +proto.band.globalfee.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_globalfee_v1beta1_genesis_pb.Params; + reader.readMessage(value,band_globalfee_v1beta1_genesis_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.globalfee.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.globalfee.v1beta1.QueryParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.globalfee.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.globalfee.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_globalfee_v1beta1_genesis_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.globalfee.v1beta1.Params} + */ +proto.band.globalfee.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.band.globalfee.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_globalfee_v1beta1_genesis_pb.Params, 1)); +}; + + +/** + * @param {?proto.band.globalfee.v1beta1.Params|undefined} value + * @return {!proto.band.globalfee.v1beta1.QueryParamsResponse} returns this +*/ +proto.band.globalfee.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.globalfee.v1beta1.QueryParamsResponse} returns this + */ +proto.band.globalfee.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.globalfee.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.band.globalfee.v1beta1); diff --git a/codegen/band/globalfee/v1beta1/query_pb_service.d.ts b/codegen/band/globalfee/v1beta1/query_pb_service.d.ts new file mode 100644 index 0000000..b09bcc3 --- /dev/null +++ b/codegen/band/globalfee/v1beta1/query_pb_service.d.ts @@ -0,0 +1,63 @@ +// package: band.globalfee.v1beta1 +// file: band/globalfee/v1beta1/query.proto + +import * as band_globalfee_v1beta1_query_pb from "../../../band/globalfee/v1beta1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_globalfee_v1beta1_query_pb.QueryParamsRequest; + readonly responseType: typeof band_globalfee_v1beta1_query_pb.QueryParamsResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly Params: QueryParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + params( + requestMessage: band_globalfee_v1beta1_query_pb.QueryParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_globalfee_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_globalfee_v1beta1_query_pb.QueryParamsRequest, + callback: (error: ServiceError|null, responseMessage: band_globalfee_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/globalfee/v1beta1/query_pb_service.js b/codegen/band/globalfee/v1beta1/query_pb_service.js new file mode 100644 index 0000000..762595e --- /dev/null +++ b/codegen/band/globalfee/v1beta1/query_pb_service.js @@ -0,0 +1,61 @@ +// package: band.globalfee.v1beta1 +// file: band/globalfee/v1beta1/query.proto + +var band_globalfee_v1beta1_query_pb = require("../../../band/globalfee/v1beta1/query_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Query = (function () { + function Query() {} + Query.serviceName = "band.globalfee.v1beta1.Query"; + return Query; +}()); + +Query.Params = { + methodName: "Params", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_globalfee_v1beta1_query_pb.QueryParamsRequest, + responseType: band_globalfee_v1beta1_query_pb.QueryParamsResponse +}; + +exports.Query = Query; + +function QueryClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Params, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.QueryClient = QueryClient; + diff --git a/codegen/band/globalfee/v1beta1/tx.ts b/codegen/band/globalfee/v1beta1/tx.ts new file mode 100644 index 0000000..9b0724c --- /dev/null +++ b/codegen/band/globalfee/v1beta1/tx.ts @@ -0,0 +1,193 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/globalfee/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../../cosmos/msg/v1/msg"; +import * as dependency_4 from "./genesis"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.globalfee.v1beta1 { + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_4.band.globalfee.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_4.band.globalfee.v1beta1.Params, 2) as dependency_4.band.globalfee.v1beta1.Params; + } + set params(value: dependency_4.band.globalfee.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_4.band.globalfee.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_4.band.globalfee.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + UpdateParams: { + path: "/band.globalfee.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/globalfee/v1beta1/tx_pb.d.ts b/codegen/band/globalfee/v1beta1/tx_pb.d.ts new file mode 100644 index 0000000..e59b3e7 --- /dev/null +++ b/codegen/band/globalfee/v1beta1/tx_pb.d.ts @@ -0,0 +1,51 @@ +// package: band.globalfee.v1beta1 +// file: band/globalfee/v1beta1/tx.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; +import * as band_globalfee_v1beta1_genesis_pb from "../../../band/globalfee/v1beta1/genesis_pb"; + +export class MsgUpdateParams extends jspb.Message { + getAuthority(): string; + setAuthority(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): band_globalfee_v1beta1_genesis_pb.Params | undefined; + setParams(value?: band_globalfee_v1beta1_genesis_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + authority: string, + params?: band_globalfee_v1beta1_genesis_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + diff --git a/proto/cosmos/base/node/v1beta1/query_pb.js b/codegen/band/globalfee/v1beta1/tx_pb.js similarity index 53% rename from proto/cosmos/base/node/v1beta1/query_pb.js rename to codegen/band/globalfee/v1beta1/tx_pb.js index 1a2acdb..24cfb7a 100644 --- a/proto/cosmos/base/node/v1beta1/query_pb.js +++ b/codegen/band/globalfee/v1beta1/tx_pb.js @@ -1,4 +1,4 @@ -// source: cosmos/base/node/v1beta1/query.proto +// source: band/globalfee/v1beta1/tx.proto /** * @fileoverview * @enhanceable @@ -15,10 +15,16 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -goog.exportSymbol('proto.cosmos.base.node.v1beta1.ConfigRequest', null, global); -goog.exportSymbol('proto.cosmos.base.node.v1beta1.ConfigResponse', null, global); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var band_globalfee_v1beta1_genesis_pb = require('../../../band/globalfee/v1beta1/genesis_pb.js'); +goog.object.extend(proto, band_globalfee_v1beta1_genesis_pb); +goog.exportSymbol('proto.band.globalfee.v1beta1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.band.globalfee.v1beta1.MsgUpdateParamsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -29,16 +35,16 @@ goog.exportSymbol('proto.cosmos.base.node.v1beta1.ConfigResponse', null, global) * @extends {jspb.Message} * @constructor */ -proto.cosmos.base.node.v1beta1.ConfigRequest = function(opt_data) { +proto.band.globalfee.v1beta1.MsgUpdateParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.base.node.v1beta1.ConfigRequest, jspb.Message); +goog.inherits(proto.band.globalfee.v1beta1.MsgUpdateParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.base.node.v1beta1.ConfigRequest.displayName = 'proto.cosmos.base.node.v1beta1.ConfigRequest'; + proto.band.globalfee.v1beta1.MsgUpdateParams.displayName = 'proto.band.globalfee.v1beta1.MsgUpdateParams'; } /** * Generated by JsPbCodeGenerator. @@ -50,16 +56,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.cosmos.base.node.v1beta1.ConfigResponse = function(opt_data) { +proto.band.globalfee.v1beta1.MsgUpdateParamsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.base.node.v1beta1.ConfigResponse, jspb.Message); +goog.inherits(proto.band.globalfee.v1beta1.MsgUpdateParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.base.node.v1beta1.ConfigResponse.displayName = 'proto.cosmos.base.node.v1beta1.ConfigResponse'; + proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.displayName = 'proto.band.globalfee.v1beta1.MsgUpdateParamsResponse'; } @@ -77,8 +83,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.base.node.v1beta1.ConfigRequest.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.node.v1beta1.ConfigRequest.toObject(opt_includeInstance, this); +proto.band.globalfee.v1beta1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.band.globalfee.v1beta1.MsgUpdateParams.toObject(opt_includeInstance, this); }; @@ -87,13 +93,14 @@ proto.cosmos.base.node.v1beta1.ConfigRequest.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.base.node.v1beta1.ConfigRequest} msg The msg instance to transform. + * @param {!proto.band.globalfee.v1beta1.MsgUpdateParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.node.v1beta1.ConfigRequest.toObject = function(includeInstance, msg) { +proto.band.globalfee.v1beta1.MsgUpdateParams.toObject = function(includeInstance, msg) { var f, obj = { - + authority: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && band_globalfee_v1beta1_genesis_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -107,29 +114,38 @@ proto.cosmos.base.node.v1beta1.ConfigRequest.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.node.v1beta1.ConfigRequest} + * @return {!proto.band.globalfee.v1beta1.MsgUpdateParams} */ -proto.cosmos.base.node.v1beta1.ConfigRequest.deserializeBinary = function(bytes) { +proto.band.globalfee.v1beta1.MsgUpdateParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.node.v1beta1.ConfigRequest; - return proto.cosmos.base.node.v1beta1.ConfigRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.globalfee.v1beta1.MsgUpdateParams; + return proto.band.globalfee.v1beta1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.base.node.v1beta1.ConfigRequest} msg The message object to deserialize into. + * @param {!proto.band.globalfee.v1beta1.MsgUpdateParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.node.v1beta1.ConfigRequest} + * @return {!proto.band.globalfee.v1beta1.MsgUpdateParams} */ -proto.cosmos.base.node.v1beta1.ConfigRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.globalfee.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + case 2: + var value = new band_globalfee_v1beta1_genesis_pb.Params; + reader.readMessage(value,band_globalfee_v1beta1_genesis_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; default: reader.skipField(); break; @@ -143,9 +159,9 @@ proto.cosmos.base.node.v1beta1.ConfigRequest.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.base.node.v1beta1.ConfigRequest.prototype.serializeBinary = function() { +proto.band.globalfee.v1beta1.MsgUpdateParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.base.node.v1beta1.ConfigRequest.serializeBinaryToWriter(this, writer); + proto.band.globalfee.v1beta1.MsgUpdateParams.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -153,12 +169,82 @@ proto.cosmos.base.node.v1beta1.ConfigRequest.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.node.v1beta1.ConfigRequest} message + * @param {!proto.band.globalfee.v1beta1.MsgUpdateParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.node.v1beta1.ConfigRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.globalfee.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + band_globalfee_v1beta1_genesis_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string authority = 1; + * @return {string} + */ +proto.band.globalfee.v1beta1.MsgUpdateParams.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.globalfee.v1beta1.MsgUpdateParams} returns this + */ +proto.band.globalfee.v1beta1.MsgUpdateParams.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Params params = 2; + * @return {?proto.band.globalfee.v1beta1.Params} + */ +proto.band.globalfee.v1beta1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.band.globalfee.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_globalfee_v1beta1_genesis_pb.Params, 2)); +}; + + +/** + * @param {?proto.band.globalfee.v1beta1.Params|undefined} value + * @return {!proto.band.globalfee.v1beta1.MsgUpdateParams} returns this +*/ +proto.band.globalfee.v1beta1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.globalfee.v1beta1.MsgUpdateParams} returns this + */ +proto.band.globalfee.v1beta1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.globalfee.v1beta1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -178,8 +264,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.node.v1beta1.ConfigResponse.toObject(opt_includeInstance, this); +proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); }; @@ -188,13 +274,13 @@ proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.base.node.v1beta1.ConfigResponse} msg The msg instance to transform. + * @param {!proto.band.globalfee.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.node.v1beta1.ConfigResponse.toObject = function(includeInstance, msg) { +proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { var f, obj = { - minimumGasPrice: jspb.Message.getFieldWithDefault(msg, 1, "") + }; if (includeInstance) { @@ -208,33 +294,29 @@ proto.cosmos.base.node.v1beta1.ConfigResponse.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.node.v1beta1.ConfigResponse} + * @return {!proto.band.globalfee.v1beta1.MsgUpdateParamsResponse} */ -proto.cosmos.base.node.v1beta1.ConfigResponse.deserializeBinary = function(bytes) { +proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.node.v1beta1.ConfigResponse; - return proto.cosmos.base.node.v1beta1.ConfigResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.globalfee.v1beta1.MsgUpdateParamsResponse; + return proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.base.node.v1beta1.ConfigResponse} msg The message object to deserialize into. + * @param {!proto.band.globalfee.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.node.v1beta1.ConfigResponse} + * @return {!proto.band.globalfee.v1beta1.MsgUpdateParamsResponse} */ -proto.cosmos.base.node.v1beta1.ConfigResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMinimumGasPrice(value); - break; default: reader.skipField(); break; @@ -248,9 +330,9 @@ proto.cosmos.base.node.v1beta1.ConfigResponse.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.serializeBinary = function() { +proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.base.node.v1beta1.ConfigResponse.serializeBinaryToWriter(this, writer); + proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -258,38 +340,13 @@ proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.node.v1beta1.ConfigResponse} message + * @param {!proto.band.globalfee.v1beta1.MsgUpdateParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.node.v1beta1.ConfigResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.globalfee.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMinimumGasPrice(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string minimum_gas_price = 1; - * @return {string} - */ -proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.getMinimumGasPrice = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cosmos.base.node.v1beta1.ConfigResponse} returns this - */ -proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.setMinimumGasPrice = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); }; -goog.object.extend(exports, proto.cosmos.base.node.v1beta1); +goog.object.extend(exports, proto.band.globalfee.v1beta1); diff --git a/codegen/band/globalfee/v1beta1/tx_pb_service.d.ts b/codegen/band/globalfee/v1beta1/tx_pb_service.d.ts new file mode 100644 index 0000000..68dcb91 --- /dev/null +++ b/codegen/band/globalfee/v1beta1/tx_pb_service.d.ts @@ -0,0 +1,63 @@ +// package: band.globalfee.v1beta1 +// file: band/globalfee/v1beta1/tx.proto + +import * as band_globalfee_v1beta1_tx_pb from "../../../band/globalfee/v1beta1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgUpdateParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_globalfee_v1beta1_tx_pb.MsgUpdateParams; + readonly responseType: typeof band_globalfee_v1beta1_tx_pb.MsgUpdateParamsResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly UpdateParams: MsgUpdateParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + updateParams( + requestMessage: band_globalfee_v1beta1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_globalfee_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: band_globalfee_v1beta1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: band_globalfee_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/proto/globalfee/v1beta1/tx_pb_service.js b/codegen/band/globalfee/v1beta1/tx_pb_service.js similarity index 78% rename from proto/globalfee/v1beta1/tx_pb_service.js rename to codegen/band/globalfee/v1beta1/tx_pb_service.js index f2d1c8a..ab838e0 100644 --- a/proto/globalfee/v1beta1/tx_pb_service.js +++ b/codegen/band/globalfee/v1beta1/tx_pb_service.js @@ -1,12 +1,12 @@ -// package: globalfee.v1beta1 -// file: globalfee/v1beta1/tx.proto +// package: band.globalfee.v1beta1 +// file: band/globalfee/v1beta1/tx.proto -var globalfee_v1beta1_tx_pb = require("../../globalfee/v1beta1/tx_pb"); +var band_globalfee_v1beta1_tx_pb = require("../../../band/globalfee/v1beta1/tx_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; var Msg = (function () { function Msg() {} - Msg.serviceName = "globalfee.v1beta1.Msg"; + Msg.serviceName = "band.globalfee.v1beta1.Msg"; return Msg; }()); @@ -15,8 +15,8 @@ Msg.UpdateParams = { service: Msg, requestStream: false, responseStream: false, - requestType: globalfee_v1beta1_tx_pb.MsgUpdateParams, - responseType: globalfee_v1beta1_tx_pb.MsgUpdateParamsResponse + requestType: band_globalfee_v1beta1_tx_pb.MsgUpdateParams, + responseType: band_globalfee_v1beta1_tx_pb.MsgUpdateParamsResponse }; exports.Msg = Msg; diff --git a/codegen/band/oracle/v1/genesis.ts b/codegen/band/oracle/v1/genesis.ts new file mode 100644 index 0000000..2695ea8 --- /dev/null +++ b/codegen/band/oracle/v1/genesis.ts @@ -0,0 +1,126 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/oracle/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./oracle"; +import * as pb_1 from "google-protobuf"; +export namespace band.oracle.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_2.band.oracle.v1.Params; + data_sources?: dependency_2.band.oracle.v1.DataSource[]; + oracle_scripts?: dependency_2.band.oracle.v1.OracleScript[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("data_sources" in data && data.data_sources != undefined) { + this.data_sources = data.data_sources; + } + if ("oracle_scripts" in data && data.oracle_scripts != undefined) { + this.oracle_scripts = data.oracle_scripts; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.band.oracle.v1.Params, 1) as dependency_2.band.oracle.v1.Params; + } + set params(value: dependency_2.band.oracle.v1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get data_sources() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.band.oracle.v1.DataSource, 2) as dependency_2.band.oracle.v1.DataSource[]; + } + set data_sources(value: dependency_2.band.oracle.v1.DataSource[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get oracle_scripts() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.band.oracle.v1.OracleScript, 3) as dependency_2.band.oracle.v1.OracleScript[]; + } + set oracle_scripts(value: dependency_2.band.oracle.v1.OracleScript[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + params?: ReturnType; + data_sources?: ReturnType[]; + oracle_scripts?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = dependency_2.band.oracle.v1.Params.fromObject(data.params); + } + if (data.data_sources != null) { + message.data_sources = data.data_sources.map(item => dependency_2.band.oracle.v1.DataSource.fromObject(item)); + } + if (data.oracle_scripts != null) { + message.oracle_scripts = data.oracle_scripts.map(item => dependency_2.band.oracle.v1.OracleScript.fromObject(item)); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + data_sources?: ReturnType[]; + oracle_scripts?: ReturnType[]; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.data_sources != null) { + data.data_sources = this.data_sources.map((item: dependency_2.band.oracle.v1.DataSource) => item.toObject()); + } + if (this.oracle_scripts != null) { + data.oracle_scripts = this.oracle_scripts.map((item: dependency_2.band.oracle.v1.OracleScript) => item.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.data_sources.length) + writer.writeRepeatedMessage(2, this.data_sources, (item: dependency_2.band.oracle.v1.DataSource) => item.serialize(writer)); + if (this.oracle_scripts.length) + writer.writeRepeatedMessage(3, this.oracle_scripts, (item: dependency_2.band.oracle.v1.OracleScript) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_2.band.oracle.v1.Params.deserialize(reader)); + break; + case 2: + reader.readMessage(message.data_sources, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.band.oracle.v1.DataSource.deserialize(reader), dependency_2.band.oracle.v1.DataSource)); + break; + case 3: + reader.readMessage(message.oracle_scripts, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.band.oracle.v1.OracleScript.deserialize(reader), dependency_2.band.oracle.v1.OracleScript)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/codegen/band/oracle/v1/genesis_pb.d.ts b/codegen/band/oracle/v1/genesis_pb.d.ts new file mode 100644 index 0000000..86ab2fc --- /dev/null +++ b/codegen/band/oracle/v1/genesis_pb.d.ts @@ -0,0 +1,41 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as band_oracle_v1_oracle_pb from "../../../band/oracle/v1/oracle_pb"; + +export class GenesisState extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_oracle_v1_oracle_pb.Params | undefined; + setParams(value?: band_oracle_v1_oracle_pb.Params): void; + + clearDataSourcesList(): void; + getDataSourcesList(): Array; + setDataSourcesList(value: Array): void; + addDataSources(value?: band_oracle_v1_oracle_pb.DataSource, index?: number): band_oracle_v1_oracle_pb.DataSource; + + clearOracleScriptsList(): void; + getOracleScriptsList(): Array; + setOracleScriptsList(value: Array): void; + addOracleScripts(value?: band_oracle_v1_oracle_pb.OracleScript, index?: number): band_oracle_v1_oracle_pb.OracleScript; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + params?: band_oracle_v1_oracle_pb.Params.AsObject, + dataSourcesList: Array, + oracleScriptsList: Array, + } +} + diff --git a/codegen/band/oracle/v1/genesis_pb.js b/codegen/band/oracle/v1/genesis_pb.js new file mode 100644 index 0000000..d87c0f3 --- /dev/null +++ b/codegen/band/oracle/v1/genesis_pb.js @@ -0,0 +1,308 @@ +// source: band/oracle/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var band_oracle_v1_oracle_pb = require('../../../band/oracle/v1/oracle_pb.js'); +goog.object.extend(proto, band_oracle_v1_oracle_pb); +goog.exportSymbol('proto.band.oracle.v1.GenesisState', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.GenesisState.displayName = 'proto.band.oracle.v1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.GenesisState.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && band_oracle_v1_oracle_pb.Params.toObject(includeInstance, f), + dataSourcesList: jspb.Message.toObjectList(msg.getDataSourcesList(), + band_oracle_v1_oracle_pb.DataSource.toObject, includeInstance), + oracleScriptsList: jspb.Message.toObjectList(msg.getOracleScriptsList(), + band_oracle_v1_oracle_pb.OracleScript.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.GenesisState} + */ +proto.band.oracle.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.GenesisState; + return proto.band.oracle.v1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.GenesisState} + */ +proto.band.oracle.v1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_oracle_v1_oracle_pb.Params; + reader.readMessage(value,band_oracle_v1_oracle_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new band_oracle_v1_oracle_pb.DataSource; + reader.readMessage(value,band_oracle_v1_oracle_pb.DataSource.deserializeBinaryFromReader); + msg.addDataSources(value); + break; + case 3: + var value = new band_oracle_v1_oracle_pb.OracleScript; + reader.readMessage(value,band_oracle_v1_oracle_pb.OracleScript.deserializeBinaryFromReader); + msg.addOracleScripts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_oracle_v1_oracle_pb.Params.serializeBinaryToWriter + ); + } + f = message.getDataSourcesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_oracle_v1_oracle_pb.DataSource.serializeBinaryToWriter + ); + } + f = message.getOracleScriptsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + band_oracle_v1_oracle_pb.OracleScript.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.oracle.v1.Params} + */ +proto.band.oracle.v1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.band.oracle.v1.Params} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.Params, 1)); +}; + + +/** + * @param {?proto.band.oracle.v1.Params|undefined} value + * @return {!proto.band.oracle.v1.GenesisState} returns this +*/ +proto.band.oracle.v1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.GenesisState} returns this + */ +proto.band.oracle.v1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated DataSource data_sources = 2; + * @return {!Array} + */ +proto.band.oracle.v1.GenesisState.prototype.getDataSourcesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_oracle_v1_oracle_pb.DataSource, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.GenesisState} returns this +*/ +proto.band.oracle.v1.GenesisState.prototype.setDataSourcesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.oracle.v1.DataSource=} opt_value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.DataSource} + */ +proto.band.oracle.v1.GenesisState.prototype.addDataSources = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.oracle.v1.DataSource, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.GenesisState} returns this + */ +proto.band.oracle.v1.GenesisState.prototype.clearDataSourcesList = function() { + return this.setDataSourcesList([]); +}; + + +/** + * repeated OracleScript oracle_scripts = 3; + * @return {!Array} + */ +proto.band.oracle.v1.GenesisState.prototype.getOracleScriptsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_oracle_v1_oracle_pb.OracleScript, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.GenesisState} returns this +*/ +proto.band.oracle.v1.GenesisState.prototype.setOracleScriptsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.band.oracle.v1.OracleScript=} opt_value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.OracleScript} + */ +proto.band.oracle.v1.GenesisState.prototype.addOracleScripts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.oracle.v1.OracleScript, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.GenesisState} returns this + */ +proto.band.oracle.v1.GenesisState.prototype.clearOracleScriptsList = function() { + return this.setOracleScriptsList([]); +}; + + +goog.object.extend(exports, proto.band.oracle.v1); diff --git a/codegen/band/oracle/v1/genesis_pb_service.d.ts b/codegen/band/oracle/v1/genesis_pb_service.d.ts new file mode 100644 index 0000000..a5c98df --- /dev/null +++ b/codegen/band/oracle/v1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/genesis.proto + diff --git a/codegen/band/oracle/v1/genesis_pb_service.js b/codegen/band/oracle/v1/genesis_pb_service.js new file mode 100644 index 0000000..a5c98df --- /dev/null +++ b/codegen/band/oracle/v1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/genesis.proto + diff --git a/codegen/band/oracle/v1/oracle.ts b/codegen/band/oracle/v1/oracle.ts new file mode 100644 index 0000000..6fe92e6 --- /dev/null +++ b/codegen/band/oracle/v1/oracle.ts @@ -0,0 +1,3050 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/oracle/v1/oracle.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/timestamp"; +import * as dependency_3 from "./../../../cosmos/base/v1beta1/coin"; +import * as pb_1 from "google-protobuf"; +export namespace band.oracle.v1 { + export enum ResolveStatus { + RESOLVE_STATUS_OPEN_UNSPECIFIED = 0, + RESOLVE_STATUS_SUCCESS = 1, + RESOLVE_STATUS_FAILURE = 2, + RESOLVE_STATUS_EXPIRED = 3 + } + export enum Encoder { + ENCODER_UNSPECIFIED = 0, + ENCODER_PROTO = 1, + ENCODER_FULL_ABI = 2, + ENCODER_PARTIAL_ABI = 3 + } + export class DataSource extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + owner?: string; + name?: string; + description?: string; + filename?: string; + treasury?: string; + fee?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("filename" in data && data.filename != undefined) { + this.filename = data.filename; + } + if ("treasury" in data && data.treasury != undefined) { + this.treasury = data.treasury; + } + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + } + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get filename() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set filename(value: string) { + pb_1.Message.setField(this, 4, value); + } + get treasury() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set treasury(value: string) { + pb_1.Message.setField(this, 5, value); + } + get fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 6) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set fee(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + static fromObject(data: { + owner?: string; + name?: string; + description?: string; + filename?: string; + treasury?: string; + fee?: ReturnType[]; + }): DataSource { + const message = new DataSource({}); + if (data.owner != null) { + message.owner = data.owner; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.filename != null) { + message.filename = data.filename; + } + if (data.treasury != null) { + message.treasury = data.treasury; + } + if (data.fee != null) { + message.fee = data.fee.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + owner?: string; + name?: string; + description?: string; + filename?: string; + treasury?: string; + fee?: ReturnType[]; + } = {}; + if (this.owner != null) { + data.owner = this.owner; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.filename != null) { + data.filename = this.filename; + } + if (this.treasury != null) { + data.treasury = this.treasury; + } + if (this.fee != null) { + data.fee = this.fee.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.owner.length) + writer.writeString(1, this.owner); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.filename.length) + writer.writeString(4, this.filename); + if (this.treasury.length) + writer.writeString(5, this.treasury); + if (this.fee.length) + writer.writeRepeatedMessage(6, this.fee, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DataSource { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DataSource(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.owner = reader.readString(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.filename = reader.readString(); + break; + case 5: + message.treasury = reader.readString(); + break; + case 6: + reader.readMessage(message.fee, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DataSource { + return DataSource.deserialize(bytes); + } + } + export class OracleScript extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + owner?: string; + name?: string; + description?: string; + filename?: string; + schema?: string; + source_code_url?: 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 ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("filename" in data && data.filename != undefined) { + this.filename = data.filename; + } + if ("schema" in data && data.schema != undefined) { + this.schema = data.schema; + } + if ("source_code_url" in data && data.source_code_url != undefined) { + this.source_code_url = data.source_code_url; + } + } + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get filename() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set filename(value: string) { + pb_1.Message.setField(this, 4, value); + } + get schema() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set schema(value: string) { + pb_1.Message.setField(this, 5, value); + } + get source_code_url() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set source_code_url(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + owner?: string; + name?: string; + description?: string; + filename?: string; + schema?: string; + source_code_url?: string; + }): OracleScript { + const message = new OracleScript({}); + if (data.owner != null) { + message.owner = data.owner; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.filename != null) { + message.filename = data.filename; + } + if (data.schema != null) { + message.schema = data.schema; + } + if (data.source_code_url != null) { + message.source_code_url = data.source_code_url; + } + return message; + } + toObject() { + const data: { + owner?: string; + name?: string; + description?: string; + filename?: string; + schema?: string; + source_code_url?: string; + } = {}; + if (this.owner != null) { + data.owner = this.owner; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.filename != null) { + data.filename = this.filename; + } + if (this.schema != null) { + data.schema = this.schema; + } + if (this.source_code_url != null) { + data.source_code_url = this.source_code_url; + } + 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.owner.length) + writer.writeString(1, this.owner); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.filename.length) + writer.writeString(4, this.filename); + if (this.schema.length) + writer.writeString(5, this.schema); + if (this.source_code_url.length) + writer.writeString(6, this.source_code_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OracleScript { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OracleScript(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.owner = reader.readString(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.filename = reader.readString(); + break; + case 5: + message.schema = reader.readString(); + break; + case 6: + message.source_code_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OracleScript { + return OracleScript.deserialize(bytes); + } + } + export class RawRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + external_id?: number; + data_source_id?: number; + calldata?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("external_id" in data && data.external_id != undefined) { + this.external_id = data.external_id; + } + if ("data_source_id" in data && data.data_source_id != undefined) { + this.data_source_id = data.data_source_id; + } + if ("calldata" in data && data.calldata != undefined) { + this.calldata = data.calldata; + } + } + } + get external_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set external_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get data_source_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set data_source_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get calldata() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set calldata(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + external_id?: number; + data_source_id?: number; + calldata?: Uint8Array; + }): RawRequest { + const message = new RawRequest({}); + if (data.external_id != null) { + message.external_id = data.external_id; + } + if (data.data_source_id != null) { + message.data_source_id = data.data_source_id; + } + if (data.calldata != null) { + message.calldata = data.calldata; + } + return message; + } + toObject() { + const data: { + external_id?: number; + data_source_id?: number; + calldata?: Uint8Array; + } = {}; + if (this.external_id != null) { + data.external_id = this.external_id; + } + if (this.data_source_id != null) { + data.data_source_id = this.data_source_id; + } + if (this.calldata != null) { + data.calldata = this.calldata; + } + 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.external_id != 0) + writer.writeUint64(1, this.external_id); + if (this.data_source_id != 0) + writer.writeUint64(2, this.data_source_id); + if (this.calldata.length) + writer.writeBytes(3, this.calldata); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RawRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RawRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.external_id = reader.readUint64(); + break; + case 2: + message.data_source_id = reader.readUint64(); + break; + case 3: + message.calldata = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RawRequest { + return RawRequest.deserialize(bytes); + } + } + export class RawReport extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + external_id?: number; + exit_code?: number; + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("external_id" in data && data.external_id != undefined) { + this.external_id = data.external_id; + } + if ("exit_code" in data && data.exit_code != undefined) { + this.exit_code = data.exit_code; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get external_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set external_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get exit_code() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set exit_code(value: number) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + external_id?: number; + exit_code?: number; + data?: Uint8Array; + }): RawReport { + const message = new RawReport({}); + if (data.external_id != null) { + message.external_id = data.external_id; + } + if (data.exit_code != null) { + message.exit_code = data.exit_code; + } + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + external_id?: number; + exit_code?: number; + data?: Uint8Array; + } = {}; + if (this.external_id != null) { + data.external_id = this.external_id; + } + if (this.exit_code != null) { + data.exit_code = this.exit_code; + } + if (this.data != null) { + data.data = this.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 (this.external_id != 0) + writer.writeUint64(1, this.external_id); + if (this.exit_code != 0) + writer.writeUint32(2, this.exit_code); + if (this.data.length) + writer.writeBytes(3, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RawReport { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RawReport(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.external_id = reader.readUint64(); + break; + case 2: + message.exit_code = reader.readUint32(); + break; + case 3: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RawReport { + return RawReport.deserialize(bytes); + } + } + export class Request extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + oracle_script_id?: number; + calldata?: Uint8Array; + requested_validators?: string[]; + min_count?: number; + request_height?: number; + request_time?: number; + client_id?: string; + raw_requests?: RawRequest[]; + ibc_channel?: IBCChannel; + execute_gas?: number; + tss_encoder?: Encoder; + requester?: string; + fee_limit?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 8, 13], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("oracle_script_id" in data && data.oracle_script_id != undefined) { + this.oracle_script_id = data.oracle_script_id; + } + if ("calldata" in data && data.calldata != undefined) { + this.calldata = data.calldata; + } + if ("requested_validators" in data && data.requested_validators != undefined) { + this.requested_validators = data.requested_validators; + } + if ("min_count" in data && data.min_count != undefined) { + this.min_count = data.min_count; + } + if ("request_height" in data && data.request_height != undefined) { + this.request_height = data.request_height; + } + if ("request_time" in data && data.request_time != undefined) { + this.request_time = data.request_time; + } + if ("client_id" in data && data.client_id != undefined) { + this.client_id = data.client_id; + } + if ("raw_requests" in data && data.raw_requests != undefined) { + this.raw_requests = data.raw_requests; + } + if ("ibc_channel" in data && data.ibc_channel != undefined) { + this.ibc_channel = data.ibc_channel; + } + if ("execute_gas" in data && data.execute_gas != undefined) { + this.execute_gas = data.execute_gas; + } + if ("tss_encoder" in data && data.tss_encoder != undefined) { + this.tss_encoder = data.tss_encoder; + } + if ("requester" in data && data.requester != undefined) { + this.requester = data.requester; + } + if ("fee_limit" in data && data.fee_limit != undefined) { + this.fee_limit = data.fee_limit; + } + } + } + get oracle_script_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set oracle_script_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get calldata() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set calldata(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get requested_validators() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set requested_validators(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + get min_count() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set min_count(value: number) { + pb_1.Message.setField(this, 4, value); + } + get request_height() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set request_height(value: number) { + pb_1.Message.setField(this, 5, value); + } + get request_time() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set request_time(value: number) { + pb_1.Message.setField(this, 6, value); + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 7, value); + } + get raw_requests() { + return pb_1.Message.getRepeatedWrapperField(this, RawRequest, 8) as RawRequest[]; + } + set raw_requests(value: RawRequest[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + get ibc_channel() { + return pb_1.Message.getWrapperField(this, IBCChannel, 9) as IBCChannel; + } + set ibc_channel(value: IBCChannel) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_ibc_channel() { + return pb_1.Message.getField(this, 9) != null; + } + get execute_gas() { + return pb_1.Message.getFieldWithDefault(this, 10, 0) as number; + } + set execute_gas(value: number) { + pb_1.Message.setField(this, 10, value); + } + get tss_encoder() { + return pb_1.Message.getFieldWithDefault(this, 11, Encoder.ENCODER_UNSPECIFIED) as Encoder; + } + set tss_encoder(value: Encoder) { + pb_1.Message.setField(this, 11, value); + } + get requester() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set requester(value: string) { + pb_1.Message.setField(this, 12, value); + } + get fee_limit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 13) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set fee_limit(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 13, value); + } + static fromObject(data: { + oracle_script_id?: number; + calldata?: Uint8Array; + requested_validators?: string[]; + min_count?: number; + request_height?: number; + request_time?: number; + client_id?: string; + raw_requests?: ReturnType[]; + ibc_channel?: ReturnType; + execute_gas?: number; + tss_encoder?: Encoder; + requester?: string; + fee_limit?: ReturnType[]; + }): Request { + const message = new Request({}); + if (data.oracle_script_id != null) { + message.oracle_script_id = data.oracle_script_id; + } + if (data.calldata != null) { + message.calldata = data.calldata; + } + if (data.requested_validators != null) { + message.requested_validators = data.requested_validators; + } + if (data.min_count != null) { + message.min_count = data.min_count; + } + if (data.request_height != null) { + message.request_height = data.request_height; + } + if (data.request_time != null) { + message.request_time = data.request_time; + } + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.raw_requests != null) { + message.raw_requests = data.raw_requests.map(item => RawRequest.fromObject(item)); + } + if (data.ibc_channel != null) { + message.ibc_channel = IBCChannel.fromObject(data.ibc_channel); + } + if (data.execute_gas != null) { + message.execute_gas = data.execute_gas; + } + if (data.tss_encoder != null) { + message.tss_encoder = data.tss_encoder; + } + if (data.requester != null) { + message.requester = data.requester; + } + if (data.fee_limit != null) { + message.fee_limit = data.fee_limit.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + oracle_script_id?: number; + calldata?: Uint8Array; + requested_validators?: string[]; + min_count?: number; + request_height?: number; + request_time?: number; + client_id?: string; + raw_requests?: ReturnType[]; + ibc_channel?: ReturnType; + execute_gas?: number; + tss_encoder?: Encoder; + requester?: string; + fee_limit?: ReturnType[]; + } = {}; + if (this.oracle_script_id != null) { + data.oracle_script_id = this.oracle_script_id; + } + if (this.calldata != null) { + data.calldata = this.calldata; + } + if (this.requested_validators != null) { + data.requested_validators = this.requested_validators; + } + if (this.min_count != null) { + data.min_count = this.min_count; + } + if (this.request_height != null) { + data.request_height = this.request_height; + } + if (this.request_time != null) { + data.request_time = this.request_time; + } + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.raw_requests != null) { + data.raw_requests = this.raw_requests.map((item: RawRequest) => item.toObject()); + } + if (this.ibc_channel != null) { + data.ibc_channel = this.ibc_channel.toObject(); + } + if (this.execute_gas != null) { + data.execute_gas = this.execute_gas; + } + if (this.tss_encoder != null) { + data.tss_encoder = this.tss_encoder; + } + if (this.requester != null) { + data.requester = this.requester; + } + if (this.fee_limit != null) { + data.fee_limit = this.fee_limit.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.oracle_script_id != 0) + writer.writeUint64(1, this.oracle_script_id); + if (this.calldata.length) + writer.writeBytes(2, this.calldata); + if (this.requested_validators.length) + writer.writeRepeatedString(3, this.requested_validators); + if (this.min_count != 0) + writer.writeUint64(4, this.min_count); + if (this.request_height != 0) + writer.writeInt64(5, this.request_height); + if (this.request_time != 0) + writer.writeInt64(6, this.request_time); + if (this.client_id.length) + writer.writeString(7, this.client_id); + if (this.raw_requests.length) + writer.writeRepeatedMessage(8, this.raw_requests, (item: RawRequest) => item.serialize(writer)); + if (this.has_ibc_channel) + writer.writeMessage(9, this.ibc_channel, () => this.ibc_channel.serialize(writer)); + if (this.execute_gas != 0) + writer.writeUint64(10, this.execute_gas); + if (this.tss_encoder != Encoder.ENCODER_UNSPECIFIED) + writer.writeEnum(11, this.tss_encoder); + if (this.requester.length) + writer.writeString(12, this.requester); + if (this.fee_limit.length) + writer.writeRepeatedMessage(13, this.fee_limit, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.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: + message.oracle_script_id = reader.readUint64(); + break; + case 2: + message.calldata = reader.readBytes(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + case 4: + message.min_count = reader.readUint64(); + break; + case 5: + message.request_height = reader.readInt64(); + break; + case 6: + message.request_time = reader.readInt64(); + break; + case 7: + message.client_id = reader.readString(); + break; + case 8: + reader.readMessage(message.raw_requests, () => pb_1.Message.addToRepeatedWrapperField(message, 8, RawRequest.deserialize(reader), RawRequest)); + break; + case 9: + reader.readMessage(message.ibc_channel, () => message.ibc_channel = IBCChannel.deserialize(reader)); + break; + case 10: + message.execute_gas = reader.readUint64(); + break; + case 11: + message.tss_encoder = reader.readEnum(); + break; + case 12: + message.requester = reader.readString(); + break; + case 13: + reader.readMessage(message.fee_limit, () => pb_1.Message.addToRepeatedWrapperField(message, 13, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Request { + return Request.deserialize(bytes); + } + } + export class Report extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: string; + in_before_resolve?: boolean; + raw_reports?: RawReport[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("in_before_resolve" in data && data.in_before_resolve != undefined) { + this.in_before_resolve = data.in_before_resolve; + } + if ("raw_reports" in data && data.raw_reports != undefined) { + this.raw_reports = data.raw_reports; + } + } + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 1, value); + } + get in_before_resolve() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set in_before_resolve(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get raw_reports() { + return pb_1.Message.getRepeatedWrapperField(this, RawReport, 3) as RawReport[]; + } + set raw_reports(value: RawReport[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + validator?: string; + in_before_resolve?: boolean; + raw_reports?: ReturnType[]; + }): Report { + const message = new Report({}); + if (data.validator != null) { + message.validator = data.validator; + } + if (data.in_before_resolve != null) { + message.in_before_resolve = data.in_before_resolve; + } + if (data.raw_reports != null) { + message.raw_reports = data.raw_reports.map(item => RawReport.fromObject(item)); + } + return message; + } + toObject() { + const data: { + validator?: string; + in_before_resolve?: boolean; + raw_reports?: ReturnType[]; + } = {}; + if (this.validator != null) { + data.validator = this.validator; + } + if (this.in_before_resolve != null) { + data.in_before_resolve = this.in_before_resolve; + } + if (this.raw_reports != null) { + data.raw_reports = this.raw_reports.map((item: RawReport) => item.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.validator.length) + writer.writeString(1, this.validator); + if (this.in_before_resolve != false) + writer.writeBool(2, this.in_before_resolve); + if (this.raw_reports.length) + writer.writeRepeatedMessage(3, this.raw_reports, (item: RawReport) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Report { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Report(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator = reader.readString(); + break; + case 2: + message.in_before_resolve = reader.readBool(); + break; + case 3: + reader.readMessage(message.raw_reports, () => pb_1.Message.addToRepeatedWrapperField(message, 3, RawReport.deserialize(reader), RawReport)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Report { + return Report.deserialize(bytes); + } + } + export class OracleRequestPacketData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + oracle_script_id?: number; + calldata?: Uint8Array; + ask_count?: number; + min_count?: number; + fee_limit?: dependency_3.cosmos.base.v1beta1.Coin[]; + prepare_gas?: number; + execute_gas?: number; + tss_encoder?: Encoder; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], 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; + } + if ("oracle_script_id" in data && data.oracle_script_id != undefined) { + this.oracle_script_id = data.oracle_script_id; + } + if ("calldata" in data && data.calldata != undefined) { + this.calldata = data.calldata; + } + if ("ask_count" in data && data.ask_count != undefined) { + this.ask_count = data.ask_count; + } + if ("min_count" in data && data.min_count != undefined) { + this.min_count = data.min_count; + } + if ("fee_limit" in data && data.fee_limit != undefined) { + this.fee_limit = data.fee_limit; + } + if ("prepare_gas" in data && data.prepare_gas != undefined) { + this.prepare_gas = data.prepare_gas; + } + if ("execute_gas" in data && data.execute_gas != undefined) { + this.execute_gas = data.execute_gas; + } + if ("tss_encoder" in data && data.tss_encoder != undefined) { + this.tss_encoder = data.tss_encoder; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get oracle_script_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set oracle_script_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get calldata() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set calldata(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get ask_count() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set ask_count(value: number) { + pb_1.Message.setField(this, 4, value); + } + get min_count() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set min_count(value: number) { + pb_1.Message.setField(this, 5, value); + } + get fee_limit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 6) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set fee_limit(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get prepare_gas() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set prepare_gas(value: number) { + pb_1.Message.setField(this, 7, value); + } + get execute_gas() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set execute_gas(value: number) { + pb_1.Message.setField(this, 8, value); + } + get tss_encoder() { + return pb_1.Message.getFieldWithDefault(this, 9, Encoder.ENCODER_UNSPECIFIED) as Encoder; + } + set tss_encoder(value: Encoder) { + pb_1.Message.setField(this, 9, value); + } + static fromObject(data: { + client_id?: string; + oracle_script_id?: number; + calldata?: Uint8Array; + ask_count?: number; + min_count?: number; + fee_limit?: ReturnType[]; + prepare_gas?: number; + execute_gas?: number; + tss_encoder?: Encoder; + }): OracleRequestPacketData { + const message = new OracleRequestPacketData({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.oracle_script_id != null) { + message.oracle_script_id = data.oracle_script_id; + } + if (data.calldata != null) { + message.calldata = data.calldata; + } + if (data.ask_count != null) { + message.ask_count = data.ask_count; + } + if (data.min_count != null) { + message.min_count = data.min_count; + } + if (data.fee_limit != null) { + message.fee_limit = data.fee_limit.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.prepare_gas != null) { + message.prepare_gas = data.prepare_gas; + } + if (data.execute_gas != null) { + message.execute_gas = data.execute_gas; + } + if (data.tss_encoder != null) { + message.tss_encoder = data.tss_encoder; + } + return message; + } + toObject() { + const data: { + client_id?: string; + oracle_script_id?: number; + calldata?: Uint8Array; + ask_count?: number; + min_count?: number; + fee_limit?: ReturnType[]; + prepare_gas?: number; + execute_gas?: number; + tss_encoder?: Encoder; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.oracle_script_id != null) { + data.oracle_script_id = this.oracle_script_id; + } + if (this.calldata != null) { + data.calldata = this.calldata; + } + if (this.ask_count != null) { + data.ask_count = this.ask_count; + } + if (this.min_count != null) { + data.min_count = this.min_count; + } + if (this.fee_limit != null) { + data.fee_limit = this.fee_limit.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.prepare_gas != null) { + data.prepare_gas = this.prepare_gas; + } + if (this.execute_gas != null) { + data.execute_gas = this.execute_gas; + } + if (this.tss_encoder != null) { + data.tss_encoder = this.tss_encoder; + } + 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 (this.oracle_script_id != 0) + writer.writeUint64(2, this.oracle_script_id); + if (this.calldata.length) + writer.writeBytes(3, this.calldata); + if (this.ask_count != 0) + writer.writeUint64(4, this.ask_count); + if (this.min_count != 0) + writer.writeUint64(5, this.min_count); + if (this.fee_limit.length) + writer.writeRepeatedMessage(6, this.fee_limit, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.prepare_gas != 0) + writer.writeUint64(7, this.prepare_gas); + if (this.execute_gas != 0) + writer.writeUint64(8, this.execute_gas); + if (this.tss_encoder != Encoder.ENCODER_UNSPECIFIED) + writer.writeEnum(9, this.tss_encoder); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OracleRequestPacketData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OracleRequestPacketData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + message.oracle_script_id = reader.readUint64(); + break; + case 3: + message.calldata = reader.readBytes(); + break; + case 4: + message.ask_count = reader.readUint64(); + break; + case 5: + message.min_count = reader.readUint64(); + break; + case 6: + reader.readMessage(message.fee_limit, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + case 7: + message.prepare_gas = reader.readUint64(); + break; + case 8: + message.execute_gas = reader.readUint64(); + break; + case 9: + message.tss_encoder = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OracleRequestPacketData { + return OracleRequestPacketData.deserialize(bytes); + } + } + export class OracleRequestPacketAcknowledgement extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request_id?: 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 ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + } + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + request_id?: number; + }): OracleRequestPacketAcknowledgement { + const message = new OracleRequestPacketAcknowledgement({}); + if (data.request_id != null) { + message.request_id = data.request_id; + } + return message; + } + toObject() { + const data: { + request_id?: number; + } = {}; + if (this.request_id != null) { + data.request_id = this.request_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.request_id != 0) + writer.writeUint64(1, this.request_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OracleRequestPacketAcknowledgement { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OracleRequestPacketAcknowledgement(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.request_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OracleRequestPacketAcknowledgement { + return OracleRequestPacketAcknowledgement.deserialize(bytes); + } + } + export class OracleResponsePacketData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + request_id?: number; + ans_count?: number; + request_time?: number; + resolve_time?: number; + resolve_status?: ResolveStatus; + result?: Uint8Array; + }) { + 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; + } + if ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + if ("ans_count" in data && data.ans_count != undefined) { + this.ans_count = data.ans_count; + } + if ("request_time" in data && data.request_time != undefined) { + this.request_time = data.request_time; + } + if ("resolve_time" in data && data.resolve_time != undefined) { + this.resolve_time = data.resolve_time; + } + if ("resolve_status" in data && data.resolve_status != undefined) { + this.resolve_status = data.resolve_status; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get ans_count() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set ans_count(value: number) { + pb_1.Message.setField(this, 3, value); + } + get request_time() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set request_time(value: number) { + pb_1.Message.setField(this, 4, value); + } + get resolve_time() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set resolve_time(value: number) { + pb_1.Message.setField(this, 5, value); + } + get resolve_status() { + return pb_1.Message.getFieldWithDefault(this, 6, ResolveStatus.RESOLVE_STATUS_OPEN_UNSPECIFIED) as ResolveStatus; + } + set resolve_status(value: ResolveStatus) { + pb_1.Message.setField(this, 6, value); + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set result(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + client_id?: string; + request_id?: number; + ans_count?: number; + request_time?: number; + resolve_time?: number; + resolve_status?: ResolveStatus; + result?: Uint8Array; + }): OracleResponsePacketData { + const message = new OracleResponsePacketData({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.request_id != null) { + message.request_id = data.request_id; + } + if (data.ans_count != null) { + message.ans_count = data.ans_count; + } + if (data.request_time != null) { + message.request_time = data.request_time; + } + if (data.resolve_time != null) { + message.resolve_time = data.resolve_time; + } + if (data.resolve_status != null) { + message.resolve_status = data.resolve_status; + } + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + client_id?: string; + request_id?: number; + ans_count?: number; + request_time?: number; + resolve_time?: number; + resolve_status?: ResolveStatus; + result?: Uint8Array; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.request_id != null) { + data.request_id = this.request_id; + } + if (this.ans_count != null) { + data.ans_count = this.ans_count; + } + if (this.request_time != null) { + data.request_time = this.request_time; + } + if (this.resolve_time != null) { + data.resolve_time = this.resolve_time; + } + if (this.resolve_status != null) { + data.resolve_status = this.resolve_status; + } + if (this.result != null) { + data.result = this.result; + } + 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 (this.request_id != 0) + writer.writeUint64(2, this.request_id); + if (this.ans_count != 0) + writer.writeUint64(3, this.ans_count); + if (this.request_time != 0) + writer.writeInt64(4, this.request_time); + if (this.resolve_time != 0) + writer.writeInt64(5, this.resolve_time); + if (this.resolve_status != ResolveStatus.RESOLVE_STATUS_OPEN_UNSPECIFIED) + writer.writeEnum(6, this.resolve_status); + if (this.result.length) + writer.writeBytes(7, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OracleResponsePacketData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OracleResponsePacketData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + message.request_id = reader.readUint64(); + break; + case 3: + message.ans_count = reader.readUint64(); + break; + case 4: + message.request_time = reader.readInt64(); + break; + case 5: + message.resolve_time = reader.readInt64(); + break; + case 6: + message.resolve_status = reader.readEnum(); + break; + case 7: + message.result = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OracleResponsePacketData { + return OracleResponsePacketData.deserialize(bytes); + } + } + export class Result extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + oracle_script_id?: number; + calldata?: Uint8Array; + ask_count?: number; + min_count?: number; + request_id?: number; + ans_count?: number; + request_time?: number; + resolve_time?: number; + resolve_status?: ResolveStatus; + result?: Uint8Array; + }) { + 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; + } + if ("oracle_script_id" in data && data.oracle_script_id != undefined) { + this.oracle_script_id = data.oracle_script_id; + } + if ("calldata" in data && data.calldata != undefined) { + this.calldata = data.calldata; + } + if ("ask_count" in data && data.ask_count != undefined) { + this.ask_count = data.ask_count; + } + if ("min_count" in data && data.min_count != undefined) { + this.min_count = data.min_count; + } + if ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + if ("ans_count" in data && data.ans_count != undefined) { + this.ans_count = data.ans_count; + } + if ("request_time" in data && data.request_time != undefined) { + this.request_time = data.request_time; + } + if ("resolve_time" in data && data.resolve_time != undefined) { + this.resolve_time = data.resolve_time; + } + if ("resolve_status" in data && data.resolve_status != undefined) { + this.resolve_status = data.resolve_status; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get oracle_script_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set oracle_script_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get calldata() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set calldata(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get ask_count() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set ask_count(value: number) { + pb_1.Message.setField(this, 4, value); + } + get min_count() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set min_count(value: number) { + pb_1.Message.setField(this, 5, value); + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 6, value); + } + get ans_count() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set ans_count(value: number) { + pb_1.Message.setField(this, 7, value); + } + get request_time() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set request_time(value: number) { + pb_1.Message.setField(this, 8, value); + } + get resolve_time() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set resolve_time(value: number) { + pb_1.Message.setField(this, 9, value); + } + get resolve_status() { + return pb_1.Message.getFieldWithDefault(this, 10, ResolveStatus.RESOLVE_STATUS_OPEN_UNSPECIFIED) as ResolveStatus; + } + set resolve_status(value: ResolveStatus) { + pb_1.Message.setField(this, 10, value); + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 11, new Uint8Array(0)) as Uint8Array; + } + set result(value: Uint8Array) { + pb_1.Message.setField(this, 11, value); + } + static fromObject(data: { + client_id?: string; + oracle_script_id?: number; + calldata?: Uint8Array; + ask_count?: number; + min_count?: number; + request_id?: number; + ans_count?: number; + request_time?: number; + resolve_time?: number; + resolve_status?: ResolveStatus; + result?: Uint8Array; + }): Result { + const message = new Result({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.oracle_script_id != null) { + message.oracle_script_id = data.oracle_script_id; + } + if (data.calldata != null) { + message.calldata = data.calldata; + } + if (data.ask_count != null) { + message.ask_count = data.ask_count; + } + if (data.min_count != null) { + message.min_count = data.min_count; + } + if (data.request_id != null) { + message.request_id = data.request_id; + } + if (data.ans_count != null) { + message.ans_count = data.ans_count; + } + if (data.request_time != null) { + message.request_time = data.request_time; + } + if (data.resolve_time != null) { + message.resolve_time = data.resolve_time; + } + if (data.resolve_status != null) { + message.resolve_status = data.resolve_status; + } + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + client_id?: string; + oracle_script_id?: number; + calldata?: Uint8Array; + ask_count?: number; + min_count?: number; + request_id?: number; + ans_count?: number; + request_time?: number; + resolve_time?: number; + resolve_status?: ResolveStatus; + result?: Uint8Array; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.oracle_script_id != null) { + data.oracle_script_id = this.oracle_script_id; + } + if (this.calldata != null) { + data.calldata = this.calldata; + } + if (this.ask_count != null) { + data.ask_count = this.ask_count; + } + if (this.min_count != null) { + data.min_count = this.min_count; + } + if (this.request_id != null) { + data.request_id = this.request_id; + } + if (this.ans_count != null) { + data.ans_count = this.ans_count; + } + if (this.request_time != null) { + data.request_time = this.request_time; + } + if (this.resolve_time != null) { + data.resolve_time = this.resolve_time; + } + if (this.resolve_status != null) { + data.resolve_status = this.resolve_status; + } + if (this.result != null) { + data.result = this.result; + } + 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 (this.oracle_script_id != 0) + writer.writeUint64(2, this.oracle_script_id); + if (this.calldata.length) + writer.writeBytes(3, this.calldata); + if (this.ask_count != 0) + writer.writeUint64(4, this.ask_count); + if (this.min_count != 0) + writer.writeUint64(5, this.min_count); + if (this.request_id != 0) + writer.writeUint64(6, this.request_id); + if (this.ans_count != 0) + writer.writeUint64(7, this.ans_count); + if (this.request_time != 0) + writer.writeInt64(8, this.request_time); + if (this.resolve_time != 0) + writer.writeInt64(9, this.resolve_time); + if (this.resolve_status != ResolveStatus.RESOLVE_STATUS_OPEN_UNSPECIFIED) + writer.writeEnum(10, this.resolve_status); + if (this.result.length) + writer.writeBytes(11, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Result { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Result(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + message.oracle_script_id = reader.readUint64(); + break; + case 3: + message.calldata = reader.readBytes(); + break; + case 4: + message.ask_count = reader.readUint64(); + break; + case 5: + message.min_count = reader.readUint64(); + break; + case 6: + message.request_id = reader.readUint64(); + break; + case 7: + message.ans_count = reader.readUint64(); + break; + case 8: + message.request_time = reader.readInt64(); + break; + case 9: + message.resolve_time = reader.readInt64(); + break; + case 10: + message.resolve_status = reader.readEnum(); + break; + case 11: + message.result = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Result { + return Result.deserialize(bytes); + } + } + export class SigningResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_id?: number; + error_codespace?: string; + error_code?: 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 ("signing_id" in data && data.signing_id != undefined) { + this.signing_id = data.signing_id; + } + if ("error_codespace" in data && data.error_codespace != undefined) { + this.error_codespace = data.error_codespace; + } + if ("error_code" in data && data.error_code != undefined) { + this.error_code = data.error_code; + } + } + } + get signing_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get error_codespace() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set error_codespace(value: string) { + pb_1.Message.setField(this, 2, value); + } + get error_code() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set error_code(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + signing_id?: number; + error_codespace?: string; + error_code?: number; + }): SigningResult { + const message = new SigningResult({}); + if (data.signing_id != null) { + message.signing_id = data.signing_id; + } + if (data.error_codespace != null) { + message.error_codespace = data.error_codespace; + } + if (data.error_code != null) { + message.error_code = data.error_code; + } + return message; + } + toObject() { + const data: { + signing_id?: number; + error_codespace?: string; + error_code?: number; + } = {}; + if (this.signing_id != null) { + data.signing_id = this.signing_id; + } + if (this.error_codespace != null) { + data.error_codespace = this.error_codespace; + } + if (this.error_code != null) { + data.error_code = this.error_code; + } + 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.signing_id != 0) + writer.writeUint64(1, this.signing_id); + if (this.error_codespace.length) + writer.writeString(2, this.error_codespace); + if (this.error_code != 0) + writer.writeUint64(3, this.error_code); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SigningResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SigningResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_id = reader.readUint64(); + break; + case 2: + message.error_codespace = reader.readString(); + break; + case 3: + message.error_code = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SigningResult { + return SigningResult.deserialize(bytes); + } + } + export class ValidatorStatus extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + is_active?: boolean; + since?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("is_active" in data && data.is_active != undefined) { + this.is_active = data.is_active; + } + if ("since" in data && data.since != undefined) { + this.since = data.since; + } + } + } + get is_active() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set is_active(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + get since() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 2) as dependency_2.google.protobuf.Timestamp; + } + set since(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_since() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + is_active?: boolean; + since?: ReturnType; + }): ValidatorStatus { + const message = new ValidatorStatus({}); + if (data.is_active != null) { + message.is_active = data.is_active; + } + if (data.since != null) { + message.since = dependency_2.google.protobuf.Timestamp.fromObject(data.since); + } + return message; + } + toObject() { + const data: { + is_active?: boolean; + since?: ReturnType; + } = {}; + if (this.is_active != null) { + data.is_active = this.is_active; + } + if (this.since != null) { + data.since = this.since.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.is_active != false) + writer.writeBool(1, this.is_active); + if (this.has_since) + writer.writeMessage(2, this.since, () => this.since.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorStatus { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorStatus(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.is_active = reader.readBool(); + break; + case 2: + reader.readMessage(message.since, () => message.since = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorStatus { + return ValidatorStatus.deserialize(bytes); + } + } + export class ActiveValidator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + power?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set power(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + address?: string; + power?: number; + }): ActiveValidator { + const message = new ActiveValidator({}); + if (data.address != null) { + message.address = data.address; + } + if (data.power != null) { + message.power = data.power; + } + return message; + } + toObject() { + const data: { + address?: string; + power?: number; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.power != null) { + data.power = this.power; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.power != 0) + writer.writeUint64(2, this.power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ActiveValidator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ActiveValidator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.power = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ActiveValidator { + return ActiveValidator.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + max_raw_request_count?: number; + max_ask_count?: number; + max_calldata_size?: number; + max_report_data_size?: number; + expiration_block_count?: number; + base_owasm_gas?: number; + per_validator_request_gas?: number; + sampling_try_count?: number; + oracle_reward_percentage?: number; + inactive_penalty_duration?: number; + ibc_request_enabled?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("max_raw_request_count" in data && data.max_raw_request_count != undefined) { + this.max_raw_request_count = data.max_raw_request_count; + } + if ("max_ask_count" in data && data.max_ask_count != undefined) { + this.max_ask_count = data.max_ask_count; + } + if ("max_calldata_size" in data && data.max_calldata_size != undefined) { + this.max_calldata_size = data.max_calldata_size; + } + if ("max_report_data_size" in data && data.max_report_data_size != undefined) { + this.max_report_data_size = data.max_report_data_size; + } + if ("expiration_block_count" in data && data.expiration_block_count != undefined) { + this.expiration_block_count = data.expiration_block_count; + } + if ("base_owasm_gas" in data && data.base_owasm_gas != undefined) { + this.base_owasm_gas = data.base_owasm_gas; + } + if ("per_validator_request_gas" in data && data.per_validator_request_gas != undefined) { + this.per_validator_request_gas = data.per_validator_request_gas; + } + if ("sampling_try_count" in data && data.sampling_try_count != undefined) { + this.sampling_try_count = data.sampling_try_count; + } + if ("oracle_reward_percentage" in data && data.oracle_reward_percentage != undefined) { + this.oracle_reward_percentage = data.oracle_reward_percentage; + } + if ("inactive_penalty_duration" in data && data.inactive_penalty_duration != undefined) { + this.inactive_penalty_duration = data.inactive_penalty_duration; + } + if ("ibc_request_enabled" in data && data.ibc_request_enabled != undefined) { + this.ibc_request_enabled = data.ibc_request_enabled; + } + } + } + get max_raw_request_count() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set max_raw_request_count(value: number) { + pb_1.Message.setField(this, 1, value); + } + get max_ask_count() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set max_ask_count(value: number) { + pb_1.Message.setField(this, 2, value); + } + get max_calldata_size() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set max_calldata_size(value: number) { + pb_1.Message.setField(this, 3, value); + } + get max_report_data_size() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set max_report_data_size(value: number) { + pb_1.Message.setField(this, 4, value); + } + get expiration_block_count() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set expiration_block_count(value: number) { + pb_1.Message.setField(this, 5, value); + } + get base_owasm_gas() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set base_owasm_gas(value: number) { + pb_1.Message.setField(this, 6, value); + } + get per_validator_request_gas() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set per_validator_request_gas(value: number) { + pb_1.Message.setField(this, 7, value); + } + get sampling_try_count() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set sampling_try_count(value: number) { + pb_1.Message.setField(this, 8, value); + } + get oracle_reward_percentage() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set oracle_reward_percentage(value: number) { + pb_1.Message.setField(this, 9, value); + } + get inactive_penalty_duration() { + return pb_1.Message.getFieldWithDefault(this, 10, 0) as number; + } + set inactive_penalty_duration(value: number) { + pb_1.Message.setField(this, 10, value); + } + get ibc_request_enabled() { + return pb_1.Message.getFieldWithDefault(this, 11, false) as boolean; + } + set ibc_request_enabled(value: boolean) { + pb_1.Message.setField(this, 11, value); + } + static fromObject(data: { + max_raw_request_count?: number; + max_ask_count?: number; + max_calldata_size?: number; + max_report_data_size?: number; + expiration_block_count?: number; + base_owasm_gas?: number; + per_validator_request_gas?: number; + sampling_try_count?: number; + oracle_reward_percentage?: number; + inactive_penalty_duration?: number; + ibc_request_enabled?: boolean; + }): Params { + const message = new Params({}); + if (data.max_raw_request_count != null) { + message.max_raw_request_count = data.max_raw_request_count; + } + if (data.max_ask_count != null) { + message.max_ask_count = data.max_ask_count; + } + if (data.max_calldata_size != null) { + message.max_calldata_size = data.max_calldata_size; + } + if (data.max_report_data_size != null) { + message.max_report_data_size = data.max_report_data_size; + } + if (data.expiration_block_count != null) { + message.expiration_block_count = data.expiration_block_count; + } + if (data.base_owasm_gas != null) { + message.base_owasm_gas = data.base_owasm_gas; + } + if (data.per_validator_request_gas != null) { + message.per_validator_request_gas = data.per_validator_request_gas; + } + if (data.sampling_try_count != null) { + message.sampling_try_count = data.sampling_try_count; + } + if (data.oracle_reward_percentage != null) { + message.oracle_reward_percentage = data.oracle_reward_percentage; + } + if (data.inactive_penalty_duration != null) { + message.inactive_penalty_duration = data.inactive_penalty_duration; + } + if (data.ibc_request_enabled != null) { + message.ibc_request_enabled = data.ibc_request_enabled; + } + return message; + } + toObject() { + const data: { + max_raw_request_count?: number; + max_ask_count?: number; + max_calldata_size?: number; + max_report_data_size?: number; + expiration_block_count?: number; + base_owasm_gas?: number; + per_validator_request_gas?: number; + sampling_try_count?: number; + oracle_reward_percentage?: number; + inactive_penalty_duration?: number; + ibc_request_enabled?: boolean; + } = {}; + if (this.max_raw_request_count != null) { + data.max_raw_request_count = this.max_raw_request_count; + } + if (this.max_ask_count != null) { + data.max_ask_count = this.max_ask_count; + } + if (this.max_calldata_size != null) { + data.max_calldata_size = this.max_calldata_size; + } + if (this.max_report_data_size != null) { + data.max_report_data_size = this.max_report_data_size; + } + if (this.expiration_block_count != null) { + data.expiration_block_count = this.expiration_block_count; + } + if (this.base_owasm_gas != null) { + data.base_owasm_gas = this.base_owasm_gas; + } + if (this.per_validator_request_gas != null) { + data.per_validator_request_gas = this.per_validator_request_gas; + } + if (this.sampling_try_count != null) { + data.sampling_try_count = this.sampling_try_count; + } + if (this.oracle_reward_percentage != null) { + data.oracle_reward_percentage = this.oracle_reward_percentage; + } + if (this.inactive_penalty_duration != null) { + data.inactive_penalty_duration = this.inactive_penalty_duration; + } + if (this.ibc_request_enabled != null) { + data.ibc_request_enabled = this.ibc_request_enabled; + } + 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.max_raw_request_count != 0) + writer.writeUint64(1, this.max_raw_request_count); + if (this.max_ask_count != 0) + writer.writeUint64(2, this.max_ask_count); + if (this.max_calldata_size != 0) + writer.writeUint64(3, this.max_calldata_size); + if (this.max_report_data_size != 0) + writer.writeUint64(4, this.max_report_data_size); + if (this.expiration_block_count != 0) + writer.writeUint64(5, this.expiration_block_count); + if (this.base_owasm_gas != 0) + writer.writeUint64(6, this.base_owasm_gas); + if (this.per_validator_request_gas != 0) + writer.writeUint64(7, this.per_validator_request_gas); + if (this.sampling_try_count != 0) + writer.writeUint64(8, this.sampling_try_count); + if (this.oracle_reward_percentage != 0) + writer.writeUint64(9, this.oracle_reward_percentage); + if (this.inactive_penalty_duration != 0) + writer.writeUint64(10, this.inactive_penalty_duration); + if (this.ibc_request_enabled != false) + writer.writeBool(11, this.ibc_request_enabled); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.max_raw_request_count = reader.readUint64(); + break; + case 2: + message.max_ask_count = reader.readUint64(); + break; + case 3: + message.max_calldata_size = reader.readUint64(); + break; + case 4: + message.max_report_data_size = reader.readUint64(); + break; + case 5: + message.expiration_block_count = reader.readUint64(); + break; + case 6: + message.base_owasm_gas = reader.readUint64(); + break; + case 7: + message.per_validator_request_gas = reader.readUint64(); + break; + case 8: + message.sampling_try_count = reader.readUint64(); + break; + case 9: + message.oracle_reward_percentage = reader.readUint64(); + break; + case 10: + message.inactive_penalty_duration = reader.readUint64(); + break; + case 11: + message.ibc_request_enabled = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } + export class PendingResolveList extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request_ids?: number[]; + }) { + 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 ("request_ids" in data && data.request_ids != undefined) { + this.request_ids = data.request_ids; + } + } + } + get request_ids() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set request_ids(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + request_ids?: number[]; + }): PendingResolveList { + const message = new PendingResolveList({}); + if (data.request_ids != null) { + message.request_ids = data.request_ids; + } + return message; + } + toObject() { + const data: { + request_ids?: number[]; + } = {}; + if (this.request_ids != null) { + data.request_ids = this.request_ids; + } + 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.request_ids.length) + writer.writePackedUint64(1, this.request_ids); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PendingResolveList { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PendingResolveList(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.request_ids = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PendingResolveList { + return PendingResolveList.deserialize(bytes); + } + } + export class IBCChannel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): IBCChannel { + const message = new IBCChannel({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IBCChannel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IBCChannel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IBCChannel { + return IBCChannel.deserialize(bytes); + } + } + export class RequestVerification extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + chain_id?: string; + validator?: string; + request_id?: number; + external_id?: number; + data_source_id?: 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 ("chain_id" in data && data.chain_id != undefined) { + this.chain_id = data.chain_id; + } + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + if ("external_id" in data && data.external_id != undefined) { + this.external_id = data.external_id; + } + if ("data_source_id" in data && data.data_source_id != undefined) { + this.data_source_id = data.data_source_id; + } + } + } + get chain_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set chain_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 2, value); + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 3, value); + } + get external_id() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set external_id(value: number) { + pb_1.Message.setField(this, 4, value); + } + get data_source_id() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set data_source_id(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + chain_id?: string; + validator?: string; + request_id?: number; + external_id?: number; + data_source_id?: number; + }): RequestVerification { + const message = new RequestVerification({}); + if (data.chain_id != null) { + message.chain_id = data.chain_id; + } + if (data.validator != null) { + message.validator = data.validator; + } + if (data.request_id != null) { + message.request_id = data.request_id; + } + if (data.external_id != null) { + message.external_id = data.external_id; + } + if (data.data_source_id != null) { + message.data_source_id = data.data_source_id; + } + return message; + } + toObject() { + const data: { + chain_id?: string; + validator?: string; + request_id?: number; + external_id?: number; + data_source_id?: number; + } = {}; + if (this.chain_id != null) { + data.chain_id = this.chain_id; + } + if (this.validator != null) { + data.validator = this.validator; + } + if (this.request_id != null) { + data.request_id = this.request_id; + } + if (this.external_id != null) { + data.external_id = this.external_id; + } + if (this.data_source_id != null) { + data.data_source_id = this.data_source_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.chain_id.length) + writer.writeString(1, this.chain_id); + if (this.validator.length) + writer.writeString(2, this.validator); + if (this.request_id != 0) + writer.writeUint64(3, this.request_id); + if (this.external_id != 0) + writer.writeUint64(4, this.external_id); + if (this.data_source_id != 0) + writer.writeUint64(5, this.data_source_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestVerification { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestVerification(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.chain_id = reader.readString(); + break; + case 2: + message.validator = reader.readString(); + break; + case 3: + message.request_id = reader.readUint64(); + break; + case 4: + message.external_id = reader.readUint64(); + break; + case 5: + message.data_source_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestVerification { + return RequestVerification.deserialize(bytes); + } + } + export class PriceResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + symbol?: string; + multiplier?: number; + px?: number; + request_id?: number; + resolve_time?: 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 ("symbol" in data && data.symbol != undefined) { + this.symbol = data.symbol; + } + if ("multiplier" in data && data.multiplier != undefined) { + this.multiplier = data.multiplier; + } + if ("px" in data && data.px != undefined) { + this.px = data.px; + } + if ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + if ("resolve_time" in data && data.resolve_time != undefined) { + this.resolve_time = data.resolve_time; + } + } + } + get symbol() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set symbol(value: string) { + pb_1.Message.setField(this, 1, value); + } + get multiplier() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set multiplier(value: number) { + pb_1.Message.setField(this, 2, value); + } + get px() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set px(value: number) { + pb_1.Message.setField(this, 3, value); + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 4, value); + } + get resolve_time() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set resolve_time(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + symbol?: string; + multiplier?: number; + px?: number; + request_id?: number; + resolve_time?: number; + }): PriceResult { + const message = new PriceResult({}); + if (data.symbol != null) { + message.symbol = data.symbol; + } + if (data.multiplier != null) { + message.multiplier = data.multiplier; + } + if (data.px != null) { + message.px = data.px; + } + if (data.request_id != null) { + message.request_id = data.request_id; + } + if (data.resolve_time != null) { + message.resolve_time = data.resolve_time; + } + return message; + } + toObject() { + const data: { + symbol?: string; + multiplier?: number; + px?: number; + request_id?: number; + resolve_time?: number; + } = {}; + if (this.symbol != null) { + data.symbol = this.symbol; + } + if (this.multiplier != null) { + data.multiplier = this.multiplier; + } + if (this.px != null) { + data.px = this.px; + } + if (this.request_id != null) { + data.request_id = this.request_id; + } + if (this.resolve_time != null) { + data.resolve_time = this.resolve_time; + } + 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.symbol.length) + writer.writeString(1, this.symbol); + if (this.multiplier != 0) + writer.writeUint64(2, this.multiplier); + if (this.px != 0) + writer.writeUint64(3, this.px); + if (this.request_id != 0) + writer.writeUint64(4, this.request_id); + if (this.resolve_time != 0) + writer.writeInt64(5, this.resolve_time); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PriceResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PriceResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.symbol = reader.readString(); + break; + case 2: + message.multiplier = reader.readUint64(); + break; + case 3: + message.px = reader.readUint64(); + break; + case 4: + message.request_id = reader.readUint64(); + break; + case 5: + message.resolve_time = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PriceResult { + return PriceResult.deserialize(bytes); + } + } + export class OracleResultSignatureOrder extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request_id?: number; + encoder?: Encoder; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + if ("encoder" in data && data.encoder != undefined) { + this.encoder = data.encoder; + } + } + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get encoder() { + return pb_1.Message.getFieldWithDefault(this, 3, Encoder.ENCODER_UNSPECIFIED) as Encoder; + } + set encoder(value: Encoder) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + request_id?: number; + encoder?: Encoder; + }): OracleResultSignatureOrder { + const message = new OracleResultSignatureOrder({}); + if (data.request_id != null) { + message.request_id = data.request_id; + } + if (data.encoder != null) { + message.encoder = data.encoder; + } + return message; + } + toObject() { + const data: { + request_id?: number; + encoder?: Encoder; + } = {}; + if (this.request_id != null) { + data.request_id = this.request_id; + } + if (this.encoder != null) { + data.encoder = this.encoder; + } + 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.request_id != 0) + writer.writeUint64(1, this.request_id); + if (this.encoder != Encoder.ENCODER_UNSPECIFIED) + writer.writeEnum(3, this.encoder); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OracleResultSignatureOrder { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OracleResultSignatureOrder(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.request_id = reader.readUint64(); + break; + case 3: + message.encoder = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OracleResultSignatureOrder { + return OracleResultSignatureOrder.deserialize(bytes); + } + } +} diff --git a/codegen/band/oracle/v1/oracle_pb.d.ts b/codegen/band/oracle/v1/oracle_pb.d.ts new file mode 100644 index 0000000..07d7975 --- /dev/null +++ b/codegen/band/oracle/v1/oracle_pb.d.ts @@ -0,0 +1,742 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/oracle.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; + +export class DataSource extends jspb.Message { + getOwner(): string; + setOwner(value: string): void; + + getName(): string; + setName(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getFilename(): string; + setFilename(value: string): void; + + getTreasury(): string; + setTreasury(value: string): void; + + clearFeeList(): void; + getFeeList(): Array; + setFeeList(value: Array): void; + addFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DataSource.AsObject; + static toObject(includeInstance: boolean, msg: DataSource): DataSource.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DataSource, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DataSource; + static deserializeBinaryFromReader(message: DataSource, reader: jspb.BinaryReader): DataSource; +} + +export namespace DataSource { + export type AsObject = { + owner: string, + name: string, + description: string, + filename: string, + treasury: string, + feeList: Array, + } +} + +export class OracleScript extends jspb.Message { + getOwner(): string; + setOwner(value: string): void; + + getName(): string; + setName(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getFilename(): string; + setFilename(value: string): void; + + getSchema(): string; + setSchema(value: string): void; + + getSourceCodeUrl(): string; + setSourceCodeUrl(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OracleScript.AsObject; + static toObject(includeInstance: boolean, msg: OracleScript): OracleScript.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OracleScript, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OracleScript; + static deserializeBinaryFromReader(message: OracleScript, reader: jspb.BinaryReader): OracleScript; +} + +export namespace OracleScript { + export type AsObject = { + owner: string, + name: string, + description: string, + filename: string, + schema: string, + sourceCodeUrl: string, + } +} + +export class RawRequest extends jspb.Message { + getExternalId(): number; + setExternalId(value: number): void; + + getDataSourceId(): number; + setDataSourceId(value: number): void; + + getCalldata(): Uint8Array | string; + getCalldata_asU8(): Uint8Array; + getCalldata_asB64(): string; + setCalldata(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RawRequest.AsObject; + static toObject(includeInstance: boolean, msg: RawRequest): RawRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RawRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RawRequest; + static deserializeBinaryFromReader(message: RawRequest, reader: jspb.BinaryReader): RawRequest; +} + +export namespace RawRequest { + export type AsObject = { + externalId: number, + dataSourceId: number, + calldata: Uint8Array | string, + } +} + +export class RawReport extends jspb.Message { + getExternalId(): number; + setExternalId(value: number): void; + + getExitCode(): number; + setExitCode(value: number): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RawReport.AsObject; + static toObject(includeInstance: boolean, msg: RawReport): RawReport.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RawReport, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RawReport; + static deserializeBinaryFromReader(message: RawReport, reader: jspb.BinaryReader): RawReport; +} + +export namespace RawReport { + export type AsObject = { + externalId: number, + exitCode: number, + data: Uint8Array | string, + } +} + +export class Request extends jspb.Message { + getOracleScriptId(): number; + setOracleScriptId(value: number): void; + + getCalldata(): Uint8Array | string; + getCalldata_asU8(): Uint8Array; + getCalldata_asB64(): string; + setCalldata(value: Uint8Array | string): void; + + clearRequestedValidatorsList(): void; + getRequestedValidatorsList(): Array; + setRequestedValidatorsList(value: Array): void; + addRequestedValidators(value: string, index?: number): string; + + getMinCount(): number; + setMinCount(value: number): void; + + getRequestHeight(): number; + setRequestHeight(value: number): void; + + getRequestTime(): number; + setRequestTime(value: number): void; + + getClientId(): string; + setClientId(value: string): void; + + clearRawRequestsList(): void; + getRawRequestsList(): Array; + setRawRequestsList(value: Array): void; + addRawRequests(value?: RawRequest, index?: number): RawRequest; + + hasIbcChannel(): boolean; + clearIbcChannel(): void; + getIbcChannel(): IBCChannel | undefined; + setIbcChannel(value?: IBCChannel): void; + + getExecuteGas(): number; + setExecuteGas(value: number): void; + + getTssEncoder(): EncoderMap[keyof EncoderMap]; + setTssEncoder(value: EncoderMap[keyof EncoderMap]): void; + + getRequester(): string; + setRequester(value: string): void; + + clearFeeLimitList(): void; + getFeeLimitList(): Array; + setFeeLimitList(value: Array): void; + addFeeLimit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Request.AsObject; + static toObject(includeInstance: boolean, msg: Request): Request.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Request, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Request; + static deserializeBinaryFromReader(message: Request, reader: jspb.BinaryReader): Request; +} + +export namespace Request { + export type AsObject = { + oracleScriptId: number, + calldata: Uint8Array | string, + requestedValidatorsList: Array, + minCount: number, + requestHeight: number, + requestTime: number, + clientId: string, + rawRequestsList: Array, + ibcChannel?: IBCChannel.AsObject, + executeGas: number, + tssEncoder: EncoderMap[keyof EncoderMap], + requester: string, + feeLimitList: Array, + } +} + +export class Report extends jspb.Message { + getValidator(): string; + setValidator(value: string): void; + + getInBeforeResolve(): boolean; + setInBeforeResolve(value: boolean): void; + + clearRawReportsList(): void; + getRawReportsList(): Array; + setRawReportsList(value: Array): void; + addRawReports(value?: RawReport, index?: number): RawReport; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Report.AsObject; + static toObject(includeInstance: boolean, msg: Report): Report.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Report, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Report; + static deserializeBinaryFromReader(message: Report, reader: jspb.BinaryReader): Report; +} + +export namespace Report { + export type AsObject = { + validator: string, + inBeforeResolve: boolean, + rawReportsList: Array, + } +} + +export class OracleRequestPacketData extends jspb.Message { + getClientId(): string; + setClientId(value: string): void; + + getOracleScriptId(): number; + setOracleScriptId(value: number): void; + + getCalldata(): Uint8Array | string; + getCalldata_asU8(): Uint8Array; + getCalldata_asB64(): string; + setCalldata(value: Uint8Array | string): void; + + getAskCount(): number; + setAskCount(value: number): void; + + getMinCount(): number; + setMinCount(value: number): void; + + clearFeeLimitList(): void; + getFeeLimitList(): Array; + setFeeLimitList(value: Array): void; + addFeeLimit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getPrepareGas(): number; + setPrepareGas(value: number): void; + + getExecuteGas(): number; + setExecuteGas(value: number): void; + + getTssEncoder(): EncoderMap[keyof EncoderMap]; + setTssEncoder(value: EncoderMap[keyof EncoderMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OracleRequestPacketData.AsObject; + static toObject(includeInstance: boolean, msg: OracleRequestPacketData): OracleRequestPacketData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OracleRequestPacketData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OracleRequestPacketData; + static deserializeBinaryFromReader(message: OracleRequestPacketData, reader: jspb.BinaryReader): OracleRequestPacketData; +} + +export namespace OracleRequestPacketData { + export type AsObject = { + clientId: string, + oracleScriptId: number, + calldata: Uint8Array | string, + askCount: number, + minCount: number, + feeLimitList: Array, + prepareGas: number, + executeGas: number, + tssEncoder: EncoderMap[keyof EncoderMap], + } +} + +export class OracleRequestPacketAcknowledgement extends jspb.Message { + getRequestId(): number; + setRequestId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OracleRequestPacketAcknowledgement.AsObject; + static toObject(includeInstance: boolean, msg: OracleRequestPacketAcknowledgement): OracleRequestPacketAcknowledgement.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OracleRequestPacketAcknowledgement, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OracleRequestPacketAcknowledgement; + static deserializeBinaryFromReader(message: OracleRequestPacketAcknowledgement, reader: jspb.BinaryReader): OracleRequestPacketAcknowledgement; +} + +export namespace OracleRequestPacketAcknowledgement { + export type AsObject = { + requestId: number, + } +} + +export class OracleResponsePacketData extends jspb.Message { + getClientId(): string; + setClientId(value: string): void; + + getRequestId(): number; + setRequestId(value: number): void; + + getAnsCount(): number; + setAnsCount(value: number): void; + + getRequestTime(): number; + setRequestTime(value: number): void; + + getResolveTime(): number; + setResolveTime(value: number): void; + + getResolveStatus(): ResolveStatusMap[keyof ResolveStatusMap]; + setResolveStatus(value: ResolveStatusMap[keyof ResolveStatusMap]): void; + + getResult(): Uint8Array | string; + getResult_asU8(): Uint8Array; + getResult_asB64(): string; + setResult(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OracleResponsePacketData.AsObject; + static toObject(includeInstance: boolean, msg: OracleResponsePacketData): OracleResponsePacketData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OracleResponsePacketData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OracleResponsePacketData; + static deserializeBinaryFromReader(message: OracleResponsePacketData, reader: jspb.BinaryReader): OracleResponsePacketData; +} + +export namespace OracleResponsePacketData { + export type AsObject = { + clientId: string, + requestId: number, + ansCount: number, + requestTime: number, + resolveTime: number, + resolveStatus: ResolveStatusMap[keyof ResolveStatusMap], + result: Uint8Array | string, + } +} + +export class Result extends jspb.Message { + getClientId(): string; + setClientId(value: string): void; + + getOracleScriptId(): number; + setOracleScriptId(value: number): void; + + getCalldata(): Uint8Array | string; + getCalldata_asU8(): Uint8Array; + getCalldata_asB64(): string; + setCalldata(value: Uint8Array | string): void; + + getAskCount(): number; + setAskCount(value: number): void; + + getMinCount(): number; + setMinCount(value: number): void; + + getRequestId(): number; + setRequestId(value: number): void; + + getAnsCount(): number; + setAnsCount(value: number): void; + + getRequestTime(): number; + setRequestTime(value: number): void; + + getResolveTime(): number; + setResolveTime(value: number): void; + + getResolveStatus(): ResolveStatusMap[keyof ResolveStatusMap]; + setResolveStatus(value: ResolveStatusMap[keyof ResolveStatusMap]): void; + + getResult(): Uint8Array | string; + getResult_asU8(): Uint8Array; + getResult_asB64(): string; + setResult(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result; +} + +export namespace Result { + export type AsObject = { + clientId: string, + oracleScriptId: number, + calldata: Uint8Array | string, + askCount: number, + minCount: number, + requestId: number, + ansCount: number, + requestTime: number, + resolveTime: number, + resolveStatus: ResolveStatusMap[keyof ResolveStatusMap], + result: Uint8Array | string, + } +} + +export class SigningResult extends jspb.Message { + getSigningId(): number; + setSigningId(value: number): void; + + getErrorCodespace(): string; + setErrorCodespace(value: string): void; + + getErrorCode(): number; + setErrorCode(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigningResult.AsObject; + static toObject(includeInstance: boolean, msg: SigningResult): SigningResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SigningResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SigningResult; + static deserializeBinaryFromReader(message: SigningResult, reader: jspb.BinaryReader): SigningResult; +} + +export namespace SigningResult { + export type AsObject = { + signingId: number, + errorCodespace: string, + errorCode: number, + } +} + +export class ValidatorStatus extends jspb.Message { + getIsActive(): boolean; + setIsActive(value: boolean): void; + + hasSince(): boolean; + clearSince(): void; + getSince(): google_protobuf_timestamp_pb.Timestamp | undefined; + setSince(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorStatus.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorStatus): ValidatorStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorStatus; + static deserializeBinaryFromReader(message: ValidatorStatus, reader: jspb.BinaryReader): ValidatorStatus; +} + +export namespace ValidatorStatus { + export type AsObject = { + isActive: boolean, + since?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class ActiveValidator extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + getPower(): number; + setPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ActiveValidator.AsObject; + static toObject(includeInstance: boolean, msg: ActiveValidator): ActiveValidator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ActiveValidator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ActiveValidator; + static deserializeBinaryFromReader(message: ActiveValidator, reader: jspb.BinaryReader): ActiveValidator; +} + +export namespace ActiveValidator { + export type AsObject = { + address: string, + power: number, + } +} + +export class Params extends jspb.Message { + getMaxRawRequestCount(): number; + setMaxRawRequestCount(value: number): void; + + getMaxAskCount(): number; + setMaxAskCount(value: number): void; + + getMaxCalldataSize(): number; + setMaxCalldataSize(value: number): void; + + getMaxReportDataSize(): number; + setMaxReportDataSize(value: number): void; + + getExpirationBlockCount(): number; + setExpirationBlockCount(value: number): void; + + getBaseOwasmGas(): number; + setBaseOwasmGas(value: number): void; + + getPerValidatorRequestGas(): number; + setPerValidatorRequestGas(value: number): void; + + getSamplingTryCount(): number; + setSamplingTryCount(value: number): void; + + getOracleRewardPercentage(): number; + setOracleRewardPercentage(value: number): void; + + getInactivePenaltyDuration(): number; + setInactivePenaltyDuration(value: number): void; + + getIbcRequestEnabled(): boolean; + setIbcRequestEnabled(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + maxRawRequestCount: number, + maxAskCount: number, + maxCalldataSize: number, + maxReportDataSize: number, + expirationBlockCount: number, + baseOwasmGas: number, + perValidatorRequestGas: number, + samplingTryCount: number, + oracleRewardPercentage: number, + inactivePenaltyDuration: number, + ibcRequestEnabled: boolean, + } +} + +export class PendingResolveList extends jspb.Message { + clearRequestIdsList(): void; + getRequestIdsList(): Array; + setRequestIdsList(value: Array): void; + addRequestIds(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PendingResolveList.AsObject; + static toObject(includeInstance: boolean, msg: PendingResolveList): PendingResolveList.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PendingResolveList, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PendingResolveList; + static deserializeBinaryFromReader(message: PendingResolveList, reader: jspb.BinaryReader): PendingResolveList; +} + +export namespace PendingResolveList { + export type AsObject = { + requestIdsList: Array, + } +} + +export class IBCChannel extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IBCChannel.AsObject; + static toObject(includeInstance: boolean, msg: IBCChannel): IBCChannel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IBCChannel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IBCChannel; + static deserializeBinaryFromReader(message: IBCChannel, reader: jspb.BinaryReader): IBCChannel; +} + +export namespace IBCChannel { + export type AsObject = { + portId: string, + channelId: string, + } +} + +export class RequestVerification extends jspb.Message { + getChainId(): string; + setChainId(value: string): void; + + getValidator(): string; + setValidator(value: string): void; + + getRequestId(): number; + setRequestId(value: number): void; + + getExternalId(): number; + setExternalId(value: number): void; + + getDataSourceId(): number; + setDataSourceId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestVerification.AsObject; + static toObject(includeInstance: boolean, msg: RequestVerification): RequestVerification.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestVerification, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestVerification; + static deserializeBinaryFromReader(message: RequestVerification, reader: jspb.BinaryReader): RequestVerification; +} + +export namespace RequestVerification { + export type AsObject = { + chainId: string, + validator: string, + requestId: number, + externalId: number, + dataSourceId: number, + } +} + +export class PriceResult extends jspb.Message { + getSymbol(): string; + setSymbol(value: string): void; + + getMultiplier(): number; + setMultiplier(value: number): void; + + getPx(): number; + setPx(value: number): void; + + getRequestId(): number; + setRequestId(value: number): void; + + getResolveTime(): number; + setResolveTime(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PriceResult.AsObject; + static toObject(includeInstance: boolean, msg: PriceResult): PriceResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PriceResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PriceResult; + static deserializeBinaryFromReader(message: PriceResult, reader: jspb.BinaryReader): PriceResult; +} + +export namespace PriceResult { + export type AsObject = { + symbol: string, + multiplier: number, + px: number, + requestId: number, + resolveTime: number, + } +} + +export class OracleResultSignatureOrder extends jspb.Message { + getRequestId(): number; + setRequestId(value: number): void; + + getEncoder(): EncoderMap[keyof EncoderMap]; + setEncoder(value: EncoderMap[keyof EncoderMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OracleResultSignatureOrder.AsObject; + static toObject(includeInstance: boolean, msg: OracleResultSignatureOrder): OracleResultSignatureOrder.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OracleResultSignatureOrder, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OracleResultSignatureOrder; + static deserializeBinaryFromReader(message: OracleResultSignatureOrder, reader: jspb.BinaryReader): OracleResultSignatureOrder; +} + +export namespace OracleResultSignatureOrder { + export type AsObject = { + requestId: number, + encoder: EncoderMap[keyof EncoderMap], + } +} + +export interface ResolveStatusMap { + RESOLVE_STATUS_OPEN_UNSPECIFIED: 0; + RESOLVE_STATUS_SUCCESS: 1; + RESOLVE_STATUS_FAILURE: 2; + RESOLVE_STATUS_EXPIRED: 3; +} + +export const ResolveStatus: ResolveStatusMap; + +export interface EncoderMap { + ENCODER_UNSPECIFIED: 0; + ENCODER_PROTO: 1; + ENCODER_FULL_ABI: 2; + ENCODER_PARTIAL_ABI: 3; +} + +export const Encoder: EncoderMap; + diff --git a/codegen/band/oracle/v1/oracle_pb.js b/codegen/band/oracle/v1/oracle_pb.js new file mode 100644 index 0000000..9148ca2 --- /dev/null +++ b/codegen/band/oracle/v1/oracle_pb.js @@ -0,0 +1,5614 @@ +// source: band/oracle/v1/oracle.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.band.oracle.v1.ActiveValidator', null, global); +goog.exportSymbol('proto.band.oracle.v1.DataSource', null, global); +goog.exportSymbol('proto.band.oracle.v1.Encoder', null, global); +goog.exportSymbol('proto.band.oracle.v1.IBCChannel', null, global); +goog.exportSymbol('proto.band.oracle.v1.OracleRequestPacketAcknowledgement', null, global); +goog.exportSymbol('proto.band.oracle.v1.OracleRequestPacketData', null, global); +goog.exportSymbol('proto.band.oracle.v1.OracleResponsePacketData', null, global); +goog.exportSymbol('proto.band.oracle.v1.OracleResultSignatureOrder', null, global); +goog.exportSymbol('proto.band.oracle.v1.OracleScript', null, global); +goog.exportSymbol('proto.band.oracle.v1.Params', null, global); +goog.exportSymbol('proto.band.oracle.v1.PendingResolveList', null, global); +goog.exportSymbol('proto.band.oracle.v1.PriceResult', null, global); +goog.exportSymbol('proto.band.oracle.v1.RawReport', null, global); +goog.exportSymbol('proto.band.oracle.v1.RawRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.Report', null, global); +goog.exportSymbol('proto.band.oracle.v1.Request', null, global); +goog.exportSymbol('proto.band.oracle.v1.RequestVerification', null, global); +goog.exportSymbol('proto.band.oracle.v1.ResolveStatus', null, global); +goog.exportSymbol('proto.band.oracle.v1.Result', null, global); +goog.exportSymbol('proto.band.oracle.v1.SigningResult', null, global); +goog.exportSymbol('proto.band.oracle.v1.ValidatorStatus', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.DataSource = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.DataSource.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.DataSource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.DataSource.displayName = 'proto.band.oracle.v1.DataSource'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.OracleScript = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.OracleScript, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.OracleScript.displayName = 'proto.band.oracle.v1.OracleScript'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.RawRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.RawRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.RawRequest.displayName = 'proto.band.oracle.v1.RawRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.RawReport = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.RawReport, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.RawReport.displayName = 'proto.band.oracle.v1.RawReport'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.Request.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.Request.displayName = 'proto.band.oracle.v1.Request'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.Report = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.Report.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.Report, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.Report.displayName = 'proto.band.oracle.v1.Report'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.OracleRequestPacketData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.OracleRequestPacketData.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.OracleRequestPacketData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.OracleRequestPacketData.displayName = 'proto.band.oracle.v1.OracleRequestPacketData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.OracleRequestPacketAcknowledgement = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.OracleRequestPacketAcknowledgement, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.OracleRequestPacketAcknowledgement.displayName = 'proto.band.oracle.v1.OracleRequestPacketAcknowledgement'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.OracleResponsePacketData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.OracleResponsePacketData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.OracleResponsePacketData.displayName = 'proto.band.oracle.v1.OracleResponsePacketData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.Result, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.Result.displayName = 'proto.band.oracle.v1.Result'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.SigningResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.SigningResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.SigningResult.displayName = 'proto.band.oracle.v1.SigningResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.ValidatorStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.ValidatorStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.ValidatorStatus.displayName = 'proto.band.oracle.v1.ValidatorStatus'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.ActiveValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.ActiveValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.ActiveValidator.displayName = 'proto.band.oracle.v1.ActiveValidator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.Params.displayName = 'proto.band.oracle.v1.Params'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.PendingResolveList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.PendingResolveList.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.PendingResolveList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.PendingResolveList.displayName = 'proto.band.oracle.v1.PendingResolveList'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.IBCChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.IBCChannel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.IBCChannel.displayName = 'proto.band.oracle.v1.IBCChannel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.RequestVerification = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.RequestVerification, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.RequestVerification.displayName = 'proto.band.oracle.v1.RequestVerification'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.PriceResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.PriceResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.PriceResult.displayName = 'proto.band.oracle.v1.PriceResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.OracleResultSignatureOrder = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.OracleResultSignatureOrder, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.OracleResultSignatureOrder.displayName = 'proto.band.oracle.v1.OracleResultSignatureOrder'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.DataSource.repeatedFields_ = [6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.DataSource.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.DataSource.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.DataSource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.DataSource.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + filename: jspb.Message.getFieldWithDefault(msg, 4, ""), + treasury: jspb.Message.getFieldWithDefault(msg, 5, ""), + feeList: jspb.Message.toObjectList(msg.getFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.DataSource} + */ +proto.band.oracle.v1.DataSource.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.DataSource; + return proto.band.oracle.v1.DataSource.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.DataSource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.DataSource} + */ +proto.band.oracle.v1.DataSource.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFilename(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setTreasury(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.DataSource.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.DataSource.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.DataSource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.DataSource.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getFilename(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getTreasury(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.band.oracle.v1.DataSource.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.DataSource} returns this + */ +proto.band.oracle.v1.DataSource.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.band.oracle.v1.DataSource.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.DataSource} returns this + */ +proto.band.oracle.v1.DataSource.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.band.oracle.v1.DataSource.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.DataSource} returns this + */ +proto.band.oracle.v1.DataSource.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string filename = 4; + * @return {string} + */ +proto.band.oracle.v1.DataSource.prototype.getFilename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.DataSource} returns this + */ +proto.band.oracle.v1.DataSource.prototype.setFilename = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string treasury = 5; + * @return {string} + */ +proto.band.oracle.v1.DataSource.prototype.getTreasury = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.DataSource} returns this + */ +proto.band.oracle.v1.DataSource.prototype.setTreasury = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee = 6; + * @return {!Array} + */ +proto.band.oracle.v1.DataSource.prototype.getFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.DataSource} returns this +*/ +proto.band.oracle.v1.DataSource.prototype.setFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.oracle.v1.DataSource.prototype.addFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.DataSource} returns this + */ +proto.band.oracle.v1.DataSource.prototype.clearFeeList = function() { + return this.setFeeList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.OracleScript.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.OracleScript.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.OracleScript} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleScript.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + filename: jspb.Message.getFieldWithDefault(msg, 4, ""), + schema: jspb.Message.getFieldWithDefault(msg, 5, ""), + sourceCodeUrl: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.OracleScript} + */ +proto.band.oracle.v1.OracleScript.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.OracleScript; + return proto.band.oracle.v1.OracleScript.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.OracleScript} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.OracleScript} + */ +proto.band.oracle.v1.OracleScript.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFilename(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSchema(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceCodeUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.OracleScript.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.OracleScript.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.OracleScript} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleScript.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getFilename(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSourceCodeUrl(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.band.oracle.v1.OracleScript.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.OracleScript} returns this + */ +proto.band.oracle.v1.OracleScript.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.band.oracle.v1.OracleScript.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.OracleScript} returns this + */ +proto.band.oracle.v1.OracleScript.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.band.oracle.v1.OracleScript.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.OracleScript} returns this + */ +proto.band.oracle.v1.OracleScript.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string filename = 4; + * @return {string} + */ +proto.band.oracle.v1.OracleScript.prototype.getFilename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.OracleScript} returns this + */ +proto.band.oracle.v1.OracleScript.prototype.setFilename = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string schema = 5; + * @return {string} + */ +proto.band.oracle.v1.OracleScript.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.OracleScript} returns this + */ +proto.band.oracle.v1.OracleScript.prototype.setSchema = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string source_code_url = 6; + * @return {string} + */ +proto.band.oracle.v1.OracleScript.prototype.getSourceCodeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.OracleScript} returns this + */ +proto.band.oracle.v1.OracleScript.prototype.setSourceCodeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.RawRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.RawRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.RawRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.RawRequest.toObject = function(includeInstance, msg) { + var f, obj = { + externalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + dataSourceId: jspb.Message.getFieldWithDefault(msg, 2, 0), + calldata: msg.getCalldata_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.RawRequest} + */ +proto.band.oracle.v1.RawRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.RawRequest; + return proto.band.oracle.v1.RawRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.RawRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.RawRequest} + */ +proto.band.oracle.v1.RawRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExternalId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDataSourceId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCalldata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.RawRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.RawRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.RawRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.RawRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExternalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDataSourceId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getCalldata_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional uint64 external_id = 1; + * @return {number} + */ +proto.band.oracle.v1.RawRequest.prototype.getExternalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.RawRequest} returns this + */ +proto.band.oracle.v1.RawRequest.prototype.setExternalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 data_source_id = 2; + * @return {number} + */ +proto.band.oracle.v1.RawRequest.prototype.getDataSourceId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.RawRequest} returns this + */ +proto.band.oracle.v1.RawRequest.prototype.setDataSourceId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes calldata = 3; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.RawRequest.prototype.getCalldata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes calldata = 3; + * This is a type-conversion wrapper around `getCalldata()` + * @return {string} + */ +proto.band.oracle.v1.RawRequest.prototype.getCalldata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCalldata())); +}; + + +/** + * optional bytes calldata = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCalldata()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.RawRequest.prototype.getCalldata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCalldata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.RawRequest} returns this + */ +proto.band.oracle.v1.RawRequest.prototype.setCalldata = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.RawReport.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.RawReport.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.RawReport} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.RawReport.toObject = function(includeInstance, msg) { + var f, obj = { + externalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + exitCode: jspb.Message.getFieldWithDefault(msg, 2, 0), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.RawReport} + */ +proto.band.oracle.v1.RawReport.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.RawReport; + return proto.band.oracle.v1.RawReport.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.RawReport} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.RawReport} + */ +proto.band.oracle.v1.RawReport.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExternalId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setExitCode(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.RawReport.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.RawReport.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.RawReport} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.RawReport.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExternalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getExitCode(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional uint64 external_id = 1; + * @return {number} + */ +proto.band.oracle.v1.RawReport.prototype.getExternalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.RawReport} returns this + */ +proto.band.oracle.v1.RawReport.prototype.setExternalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 exit_code = 2; + * @return {number} + */ +proto.band.oracle.v1.RawReport.prototype.getExitCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.RawReport} returns this + */ +proto.band.oracle.v1.RawReport.prototype.setExitCode = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.RawReport.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.band.oracle.v1.RawReport.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.RawReport.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.RawReport} returns this + */ +proto.band.oracle.v1.RawReport.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.Request.repeatedFields_ = [3,8,13]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.Request.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.Request.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.Request.toObject = function(includeInstance, msg) { + var f, obj = { + oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), + calldata: msg.getCalldata_asB64(), + requestedValidatorsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + minCount: jspb.Message.getFieldWithDefault(msg, 4, 0), + requestHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + requestTime: jspb.Message.getFieldWithDefault(msg, 6, 0), + clientId: jspb.Message.getFieldWithDefault(msg, 7, ""), + rawRequestsList: jspb.Message.toObjectList(msg.getRawRequestsList(), + proto.band.oracle.v1.RawRequest.toObject, includeInstance), + ibcChannel: (f = msg.getIbcChannel()) && proto.band.oracle.v1.IBCChannel.toObject(includeInstance, f), + executeGas: jspb.Message.getFieldWithDefault(msg, 10, 0), + tssEncoder: jspb.Message.getFieldWithDefault(msg, 11, 0), + requester: jspb.Message.getFieldWithDefault(msg, 12, ""), + feeLimitList: jspb.Message.toObjectList(msg.getFeeLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.Request} + */ +proto.band.oracle.v1.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.Request; + return proto.band.oracle.v1.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.Request} + */ +proto.band.oracle.v1.Request.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOracleScriptId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCalldata(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addRequestedValidators(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinCount(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRequestHeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRequestTime(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 8: + var value = new proto.band.oracle.v1.RawRequest; + reader.readMessage(value,proto.band.oracle.v1.RawRequest.deserializeBinaryFromReader); + msg.addRawRequests(value); + break; + case 9: + var value = new proto.band.oracle.v1.IBCChannel; + reader.readMessage(value,proto.band.oracle.v1.IBCChannel.deserializeBinaryFromReader); + msg.setIbcChannel(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExecuteGas(value); + break; + case 11: + var value = /** @type {!proto.band.oracle.v1.Encoder} */ (reader.readEnum()); + msg.setTssEncoder(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setRequester(value); + break; + case 13: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFeeLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.Request.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOracleScriptId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCalldata_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getRequestedValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getMinCount(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getRequestHeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getRequestTime(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getRawRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.band.oracle.v1.RawRequest.serializeBinaryToWriter + ); + } + f = message.getIbcChannel(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.band.oracle.v1.IBCChannel.serializeBinaryToWriter + ); + } + f = message.getExecuteGas(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getTssEncoder(); + if (f !== 0.0) { + writer.writeEnum( + 11, + f + ); + } + f = message.getRequester(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getFeeLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 oracle_script_id = 1; + * @return {number} + */ +proto.band.oracle.v1.Request.prototype.getOracleScriptId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setOracleScriptId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes calldata = 2; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.Request.prototype.getCalldata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes calldata = 2; + * This is a type-conversion wrapper around `getCalldata()` + * @return {string} + */ +proto.band.oracle.v1.Request.prototype.getCalldata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCalldata())); +}; + + +/** + * optional bytes calldata = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCalldata()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.Request.prototype.getCalldata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCalldata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setCalldata = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated string requested_validators = 3; + * @return {!Array} + */ +proto.band.oracle.v1.Request.prototype.getRequestedValidatorsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setRequestedValidatorsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.addRequestedValidators = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.clearRequestedValidatorsList = function() { + return this.setRequestedValidatorsList([]); +}; + + +/** + * optional uint64 min_count = 4; + * @return {number} + */ +proto.band.oracle.v1.Request.prototype.getMinCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setMinCount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 request_height = 5; + * @return {number} + */ +proto.band.oracle.v1.Request.prototype.getRequestHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setRequestHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 request_time = 6; + * @return {number} + */ +proto.band.oracle.v1.Request.prototype.getRequestTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setRequestTime = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional string client_id = 7; + * @return {string} + */ +proto.band.oracle.v1.Request.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated RawRequest raw_requests = 8; + * @return {!Array} + */ +proto.band.oracle.v1.Request.prototype.getRawRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.oracle.v1.RawRequest, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.Request} returns this +*/ +proto.band.oracle.v1.Request.prototype.setRawRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.band.oracle.v1.RawRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.RawRequest} + */ +proto.band.oracle.v1.Request.prototype.addRawRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.band.oracle.v1.RawRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.clearRawRequestsList = function() { + return this.setRawRequestsList([]); +}; + + +/** + * optional IBCChannel ibc_channel = 9; + * @return {?proto.band.oracle.v1.IBCChannel} + */ +proto.band.oracle.v1.Request.prototype.getIbcChannel = function() { + return /** @type{?proto.band.oracle.v1.IBCChannel} */ ( + jspb.Message.getWrapperField(this, proto.band.oracle.v1.IBCChannel, 9)); +}; + + +/** + * @param {?proto.band.oracle.v1.IBCChannel|undefined} value + * @return {!proto.band.oracle.v1.Request} returns this +*/ +proto.band.oracle.v1.Request.prototype.setIbcChannel = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.clearIbcChannel = function() { + return this.setIbcChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.Request.prototype.hasIbcChannel = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional uint64 execute_gas = 10; + * @return {number} + */ +proto.band.oracle.v1.Request.prototype.getExecuteGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setExecuteGas = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional Encoder tss_encoder = 11; + * @return {!proto.band.oracle.v1.Encoder} + */ +proto.band.oracle.v1.Request.prototype.getTssEncoder = function() { + return /** @type {!proto.band.oracle.v1.Encoder} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {!proto.band.oracle.v1.Encoder} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setTssEncoder = function(value) { + return jspb.Message.setProto3EnumField(this, 11, value); +}; + + +/** + * optional string requester = 12; + * @return {string} + */ +proto.band.oracle.v1.Request.prototype.getRequester = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.setRequester = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee_limit = 13; + * @return {!Array} + */ +proto.band.oracle.v1.Request.prototype.getFeeLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 13)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.Request} returns this +*/ +proto.band.oracle.v1.Request.prototype.setFeeLimitList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.oracle.v1.Request.prototype.addFeeLimit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.Request} returns this + */ +proto.band.oracle.v1.Request.prototype.clearFeeLimitList = function() { + return this.setFeeLimitList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.Report.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.Report.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.Report.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.Report} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.Report.toObject = function(includeInstance, msg) { + var f, obj = { + validator: jspb.Message.getFieldWithDefault(msg, 1, ""), + inBeforeResolve: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + rawReportsList: jspb.Message.toObjectList(msg.getRawReportsList(), + proto.band.oracle.v1.RawReport.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.Report} + */ +proto.band.oracle.v1.Report.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.Report; + return proto.band.oracle.v1.Report.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.Report} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.Report} + */ +proto.band.oracle.v1.Report.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidator(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setInBeforeResolve(value); + break; + case 3: + var value = new proto.band.oracle.v1.RawReport; + reader.readMessage(value,proto.band.oracle.v1.RawReport.deserializeBinaryFromReader); + msg.addRawReports(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.Report.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.Report.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.Report} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.Report.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInBeforeResolve(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getRawReportsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.band.oracle.v1.RawReport.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator = 1; + * @return {string} + */ +proto.band.oracle.v1.Report.prototype.getValidator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.Report} returns this + */ +proto.band.oracle.v1.Report.prototype.setValidator = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool in_before_resolve = 2; + * @return {boolean} + */ +proto.band.oracle.v1.Report.prototype.getInBeforeResolve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.oracle.v1.Report} returns this + */ +proto.band.oracle.v1.Report.prototype.setInBeforeResolve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * repeated RawReport raw_reports = 3; + * @return {!Array} + */ +proto.band.oracle.v1.Report.prototype.getRawReportsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.oracle.v1.RawReport, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.Report} returns this +*/ +proto.band.oracle.v1.Report.prototype.setRawReportsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.band.oracle.v1.RawReport=} opt_value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.RawReport} + */ +proto.band.oracle.v1.Report.prototype.addRawReports = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.oracle.v1.RawReport, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.Report} returns this + */ +proto.band.oracle.v1.Report.prototype.clearRawReportsList = function() { + return this.setRawReportsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.OracleRequestPacketData.repeatedFields_ = [6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.OracleRequestPacketData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.OracleRequestPacketData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleRequestPacketData.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + oracleScriptId: jspb.Message.getFieldWithDefault(msg, 2, 0), + calldata: msg.getCalldata_asB64(), + askCount: jspb.Message.getFieldWithDefault(msg, 4, 0), + minCount: jspb.Message.getFieldWithDefault(msg, 5, 0), + feeLimitList: jspb.Message.toObjectList(msg.getFeeLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + prepareGas: jspb.Message.getFieldWithDefault(msg, 7, 0), + executeGas: jspb.Message.getFieldWithDefault(msg, 8, 0), + tssEncoder: jspb.Message.getFieldWithDefault(msg, 9, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.OracleRequestPacketData} + */ +proto.band.oracle.v1.OracleRequestPacketData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.OracleRequestPacketData; + return proto.band.oracle.v1.OracleRequestPacketData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.OracleRequestPacketData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.OracleRequestPacketData} + */ +proto.band.oracle.v1.OracleRequestPacketData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOracleScriptId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCalldata(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAskCount(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinCount(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFeeLimit(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPrepareGas(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExecuteGas(value); + break; + case 9: + var value = /** @type {!proto.band.oracle.v1.Encoder} */ (reader.readEnum()); + msg.setTssEncoder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.OracleRequestPacketData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.OracleRequestPacketData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleRequestPacketData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOracleScriptId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getCalldata_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getAskCount(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getMinCount(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getFeeLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPrepareGas(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getExecuteGas(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = message.getTssEncoder(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 oracle_script_id = 2; + * @return {number} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getOracleScriptId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.setOracleScriptId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes calldata = 3; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getCalldata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes calldata = 3; + * This is a type-conversion wrapper around `getCalldata()` + * @return {string} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getCalldata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCalldata())); +}; + + +/** + * optional bytes calldata = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCalldata()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getCalldata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCalldata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.setCalldata = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 ask_count = 4; + * @return {number} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getAskCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.setAskCount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 min_count = 5; + * @return {number} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getMinCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.setMinCount = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee_limit = 6; + * @return {!Array} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getFeeLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this +*/ +proto.band.oracle.v1.OracleRequestPacketData.prototype.setFeeLimitList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.addFeeLimit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.clearFeeLimitList = function() { + return this.setFeeLimitList([]); +}; + + +/** + * optional uint64 prepare_gas = 7; + * @return {number} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getPrepareGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.setPrepareGas = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint64 execute_gas = 8; + * @return {number} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getExecuteGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.setExecuteGas = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional Encoder tss_encoder = 9; + * @return {!proto.band.oracle.v1.Encoder} + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.getTssEncoder = function() { + return /** @type {!proto.band.oracle.v1.Encoder} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.band.oracle.v1.Encoder} value + * @return {!proto.band.oracle.v1.OracleRequestPacketData} returns this + */ +proto.band.oracle.v1.OracleRequestPacketData.prototype.setTssEncoder = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.OracleRequestPacketAcknowledgement.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.OracleRequestPacketAcknowledgement.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.OracleRequestPacketAcknowledgement} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleRequestPacketAcknowledgement.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.OracleRequestPacketAcknowledgement} + */ +proto.band.oracle.v1.OracleRequestPacketAcknowledgement.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.OracleRequestPacketAcknowledgement; + return proto.band.oracle.v1.OracleRequestPacketAcknowledgement.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.OracleRequestPacketAcknowledgement} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.OracleRequestPacketAcknowledgement} + */ +proto.band.oracle.v1.OracleRequestPacketAcknowledgement.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.OracleRequestPacketAcknowledgement.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.OracleRequestPacketAcknowledgement.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.OracleRequestPacketAcknowledgement} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleRequestPacketAcknowledgement.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 request_id = 1; + * @return {number} + */ +proto.band.oracle.v1.OracleRequestPacketAcknowledgement.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleRequestPacketAcknowledgement} returns this + */ +proto.band.oracle.v1.OracleRequestPacketAcknowledgement.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.OracleResponsePacketData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.OracleResponsePacketData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleResponsePacketData.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + requestId: jspb.Message.getFieldWithDefault(msg, 2, 0), + ansCount: jspb.Message.getFieldWithDefault(msg, 3, 0), + requestTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + resolveTime: jspb.Message.getFieldWithDefault(msg, 5, 0), + resolveStatus: jspb.Message.getFieldWithDefault(msg, 6, 0), + result: msg.getResult_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.OracleResponsePacketData} + */ +proto.band.oracle.v1.OracleResponsePacketData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.OracleResponsePacketData; + return proto.band.oracle.v1.OracleResponsePacketData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.OracleResponsePacketData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.OracleResponsePacketData} + */ +proto.band.oracle.v1.OracleResponsePacketData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAnsCount(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRequestTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setResolveTime(value); + break; + case 6: + var value = /** @type {!proto.band.oracle.v1.ResolveStatus} */ (reader.readEnum()); + msg.setResolveStatus(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.OracleResponsePacketData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.OracleResponsePacketData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleResponsePacketData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getAnsCount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getRequestTime(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getResolveTime(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getResolveStatus(); + if (f !== 0.0) { + writer.writeEnum( + 6, + f + ); + } + f = message.getResult_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.OracleResponsePacketData} returns this + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 request_id = 2; + * @return {number} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleResponsePacketData} returns this + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 ans_count = 3; + * @return {number} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.getAnsCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleResponsePacketData} returns this + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.setAnsCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 request_time = 4; + * @return {number} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.getRequestTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleResponsePacketData} returns this + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.setRequestTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 resolve_time = 5; + * @return {number} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.getResolveTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleResponsePacketData} returns this + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.setResolveTime = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional ResolveStatus resolve_status = 6; + * @return {!proto.band.oracle.v1.ResolveStatus} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.getResolveStatus = function() { + return /** @type {!proto.band.oracle.v1.ResolveStatus} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.band.oracle.v1.ResolveStatus} value + * @return {!proto.band.oracle.v1.OracleResponsePacketData} returns this + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.setResolveStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 6, value); +}; + + +/** + * optional bytes result = 7; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.getResult = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes result = 7; + * This is a type-conversion wrapper around `getResult()` + * @return {string} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.getResult_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getResult())); +}; + + +/** + * optional bytes result = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResult()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.getResult_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getResult())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.OracleResponsePacketData} returns this + */ +proto.band.oracle.v1.OracleResponsePacketData.prototype.setResult = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.Result.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.Result.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.Result.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + oracleScriptId: jspb.Message.getFieldWithDefault(msg, 2, 0), + calldata: msg.getCalldata_asB64(), + askCount: jspb.Message.getFieldWithDefault(msg, 4, 0), + minCount: jspb.Message.getFieldWithDefault(msg, 5, 0), + requestId: jspb.Message.getFieldWithDefault(msg, 6, 0), + ansCount: jspb.Message.getFieldWithDefault(msg, 7, 0), + requestTime: jspb.Message.getFieldWithDefault(msg, 8, 0), + resolveTime: jspb.Message.getFieldWithDefault(msg, 9, 0), + resolveStatus: jspb.Message.getFieldWithDefault(msg, 10, 0), + result: msg.getResult_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.Result} + */ +proto.band.oracle.v1.Result.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.Result; + return proto.band.oracle.v1.Result.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.Result} + */ +proto.band.oracle.v1.Result.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOracleScriptId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCalldata(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAskCount(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinCount(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAnsCount(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRequestTime(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setResolveTime(value); + break; + case 10: + var value = /** @type {!proto.band.oracle.v1.ResolveStatus} */ (reader.readEnum()); + msg.setResolveStatus(value); + break; + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.Result.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.Result.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.Result.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOracleScriptId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getCalldata_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getAskCount(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getMinCount(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getAnsCount(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getRequestTime(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getResolveTime(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getResolveStatus(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } + f = message.getResult_asU8(); + if (f.length > 0) { + writer.writeBytes( + 11, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.band.oracle.v1.Result.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 oracle_script_id = 2; + * @return {number} + */ +proto.band.oracle.v1.Result.prototype.getOracleScriptId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setOracleScriptId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes calldata = 3; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.Result.prototype.getCalldata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes calldata = 3; + * This is a type-conversion wrapper around `getCalldata()` + * @return {string} + */ +proto.band.oracle.v1.Result.prototype.getCalldata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCalldata())); +}; + + +/** + * optional bytes calldata = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCalldata()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.Result.prototype.getCalldata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCalldata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setCalldata = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 ask_count = 4; + * @return {number} + */ +proto.band.oracle.v1.Result.prototype.getAskCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setAskCount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 min_count = 5; + * @return {number} + */ +proto.band.oracle.v1.Result.prototype.getMinCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setMinCount = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 request_id = 6; + * @return {number} + */ +proto.band.oracle.v1.Result.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 ans_count = 7; + * @return {number} + */ +proto.band.oracle.v1.Result.prototype.getAnsCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setAnsCount = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional int64 request_time = 8; + * @return {number} + */ +proto.band.oracle.v1.Result.prototype.getRequestTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setRequestTime = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional int64 resolve_time = 9; + * @return {number} + */ +proto.band.oracle.v1.Result.prototype.getResolveTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setResolveTime = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional ResolveStatus resolve_status = 10; + * @return {!proto.band.oracle.v1.ResolveStatus} + */ +proto.band.oracle.v1.Result.prototype.getResolveStatus = function() { + return /** @type {!proto.band.oracle.v1.ResolveStatus} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {!proto.band.oracle.v1.ResolveStatus} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setResolveStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 10, value); +}; + + +/** + * optional bytes result = 11; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.Result.prototype.getResult = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes result = 11; + * This is a type-conversion wrapper around `getResult()` + * @return {string} + */ +proto.band.oracle.v1.Result.prototype.getResult_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getResult())); +}; + + +/** + * optional bytes result = 11; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResult()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.Result.prototype.getResult_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getResult())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.Result} returns this + */ +proto.band.oracle.v1.Result.prototype.setResult = function(value) { + return jspb.Message.setProto3BytesField(this, 11, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.SigningResult.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.SigningResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.SigningResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.SigningResult.toObject = function(includeInstance, msg) { + var f, obj = { + signingId: jspb.Message.getFieldWithDefault(msg, 1, 0), + errorCodespace: jspb.Message.getFieldWithDefault(msg, 2, ""), + errorCode: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.SigningResult} + */ +proto.band.oracle.v1.SigningResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.SigningResult; + return proto.band.oracle.v1.SigningResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.SigningResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.SigningResult} + */ +proto.band.oracle.v1.SigningResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorCodespace(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setErrorCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.SigningResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.SigningResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.SigningResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.SigningResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigningId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getErrorCodespace(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getErrorCode(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional uint64 signing_id = 1; + * @return {number} + */ +proto.band.oracle.v1.SigningResult.prototype.getSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.SigningResult} returns this + */ +proto.band.oracle.v1.SigningResult.prototype.setSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string error_codespace = 2; + * @return {string} + */ +proto.band.oracle.v1.SigningResult.prototype.getErrorCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.SigningResult} returns this + */ +proto.band.oracle.v1.SigningResult.prototype.setErrorCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 error_code = 3; + * @return {number} + */ +proto.band.oracle.v1.SigningResult.prototype.getErrorCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.SigningResult} returns this + */ +proto.band.oracle.v1.SigningResult.prototype.setErrorCode = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.ValidatorStatus.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.ValidatorStatus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.ValidatorStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.ValidatorStatus.toObject = function(includeInstance, msg) { + var f, obj = { + isActive: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + since: (f = msg.getSince()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.ValidatorStatus} + */ +proto.band.oracle.v1.ValidatorStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.ValidatorStatus; + return proto.band.oracle.v1.ValidatorStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.ValidatorStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.ValidatorStatus} + */ +proto.band.oracle.v1.ValidatorStatus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsActive(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setSince(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.ValidatorStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.ValidatorStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.ValidatorStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.ValidatorStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsActive(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getSince(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool is_active = 1; + * @return {boolean} + */ +proto.band.oracle.v1.ValidatorStatus.prototype.getIsActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.oracle.v1.ValidatorStatus} returns this + */ +proto.band.oracle.v1.ValidatorStatus.prototype.setIsActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp since = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.band.oracle.v1.ValidatorStatus.prototype.getSince = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.band.oracle.v1.ValidatorStatus} returns this +*/ +proto.band.oracle.v1.ValidatorStatus.prototype.setSince = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.ValidatorStatus} returns this + */ +proto.band.oracle.v1.ValidatorStatus.prototype.clearSince = function() { + return this.setSince(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.ValidatorStatus.prototype.hasSince = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.ActiveValidator.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.ActiveValidator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.ActiveValidator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.ActiveValidator.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + power: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.ActiveValidator} + */ +proto.band.oracle.v1.ActiveValidator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.ActiveValidator; + return proto.band.oracle.v1.ActiveValidator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.ActiveValidator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.ActiveValidator} + */ +proto.band.oracle.v1.ActiveValidator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.ActiveValidator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.ActiveValidator.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.ActiveValidator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.ActiveValidator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.band.oracle.v1.ActiveValidator.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.ActiveValidator} returns this + */ +proto.band.oracle.v1.ActiveValidator.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 power = 2; + * @return {number} + */ +proto.band.oracle.v1.ActiveValidator.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.ActiveValidator} returns this + */ +proto.band.oracle.v1.ActiveValidator.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + maxRawRequestCount: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxAskCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxCalldataSize: jspb.Message.getFieldWithDefault(msg, 3, 0), + maxReportDataSize: jspb.Message.getFieldWithDefault(msg, 4, 0), + expirationBlockCount: jspb.Message.getFieldWithDefault(msg, 5, 0), + baseOwasmGas: jspb.Message.getFieldWithDefault(msg, 6, 0), + perValidatorRequestGas: jspb.Message.getFieldWithDefault(msg, 7, 0), + samplingTryCount: jspb.Message.getFieldWithDefault(msg, 8, 0), + oracleRewardPercentage: jspb.Message.getFieldWithDefault(msg, 9, 0), + inactivePenaltyDuration: jspb.Message.getFieldWithDefault(msg, 10, 0), + ibcRequestEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 11, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.Params} + */ +proto.band.oracle.v1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.Params; + return proto.band.oracle.v1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.Params} + */ +proto.band.oracle.v1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxRawRequestCount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxAskCount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxCalldataSize(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxReportDataSize(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpirationBlockCount(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBaseOwasmGas(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPerValidatorRequestGas(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSamplingTryCount(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOracleRewardPercentage(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInactivePenaltyDuration(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIbcRequestEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxRawRequestCount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getMaxAskCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getMaxCalldataSize(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getMaxReportDataSize(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getExpirationBlockCount(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getBaseOwasmGas(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getPerValidatorRequestGas(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getSamplingTryCount(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = message.getOracleRewardPercentage(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getInactivePenaltyDuration(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getIbcRequestEnabled(); + if (f) { + writer.writeBool( + 11, + f + ); + } +}; + + +/** + * optional uint64 max_raw_request_count = 1; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getMaxRawRequestCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setMaxRawRequestCount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 max_ask_count = 2; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getMaxAskCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setMaxAskCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 max_calldata_size = 3; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getMaxCalldataSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setMaxCalldataSize = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 max_report_data_size = 4; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getMaxReportDataSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setMaxReportDataSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 expiration_block_count = 5; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getExpirationBlockCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setExpirationBlockCount = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 base_owasm_gas = 6; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getBaseOwasmGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setBaseOwasmGas = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 per_validator_request_gas = 7; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getPerValidatorRequestGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setPerValidatorRequestGas = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint64 sampling_try_count = 8; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getSamplingTryCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setSamplingTryCount = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional uint64 oracle_reward_percentage = 9; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getOracleRewardPercentage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setOracleRewardPercentage = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional uint64 inactive_penalty_duration = 10; + * @return {number} + */ +proto.band.oracle.v1.Params.prototype.getInactivePenaltyDuration = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setInactivePenaltyDuration = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional bool ibc_request_enabled = 11; + * @return {boolean} + */ +proto.band.oracle.v1.Params.prototype.getIbcRequestEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.oracle.v1.Params} returns this + */ +proto.band.oracle.v1.Params.prototype.setIbcRequestEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 11, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.PendingResolveList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.PendingResolveList.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.PendingResolveList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.PendingResolveList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.PendingResolveList.toObject = function(includeInstance, msg) { + var f, obj = { + requestIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.PendingResolveList} + */ +proto.band.oracle.v1.PendingResolveList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.PendingResolveList; + return proto.band.oracle.v1.PendingResolveList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.PendingResolveList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.PendingResolveList} + */ +proto.band.oracle.v1.PendingResolveList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addRequestIds(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.PendingResolveList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.PendingResolveList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.PendingResolveList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.PendingResolveList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestIdsList(); + if (f.length > 0) { + writer.writePackedUint64( + 1, + f + ); + } +}; + + +/** + * repeated uint64 request_ids = 1; + * @return {!Array} + */ +proto.band.oracle.v1.PendingResolveList.prototype.getRequestIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.PendingResolveList} returns this + */ +proto.band.oracle.v1.PendingResolveList.prototype.setRequestIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.PendingResolveList} returns this + */ +proto.band.oracle.v1.PendingResolveList.prototype.addRequestIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.PendingResolveList} returns this + */ +proto.band.oracle.v1.PendingResolveList.prototype.clearRequestIdsList = function() { + return this.setRequestIdsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.IBCChannel.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.IBCChannel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.IBCChannel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.IBCChannel.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.IBCChannel} + */ +proto.band.oracle.v1.IBCChannel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.IBCChannel; + return proto.band.oracle.v1.IBCChannel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.IBCChannel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.IBCChannel} + */ +proto.band.oracle.v1.IBCChannel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.IBCChannel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.IBCChannel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.IBCChannel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.IBCChannel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.band.oracle.v1.IBCChannel.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.IBCChannel} returns this + */ +proto.band.oracle.v1.IBCChannel.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.band.oracle.v1.IBCChannel.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.IBCChannel} returns this + */ +proto.band.oracle.v1.IBCChannel.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.RequestVerification.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.RequestVerification.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.RequestVerification} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.RequestVerification.toObject = function(includeInstance, msg) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + validator: jspb.Message.getFieldWithDefault(msg, 2, ""), + requestId: jspb.Message.getFieldWithDefault(msg, 3, 0), + externalId: jspb.Message.getFieldWithDefault(msg, 4, 0), + dataSourceId: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.RequestVerification} + */ +proto.band.oracle.v1.RequestVerification.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.RequestVerification; + return proto.band.oracle.v1.RequestVerification.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.RequestVerification} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.RequestVerification} + */ +proto.band.oracle.v1.RequestVerification.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidator(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExternalId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDataSourceId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.RequestVerification.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.RequestVerification.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.RequestVerification} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.RequestVerification.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getExternalId(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getDataSourceId(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional string chain_id = 1; + * @return {string} + */ +proto.band.oracle.v1.RequestVerification.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.RequestVerification} returns this + */ +proto.band.oracle.v1.RequestVerification.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator = 2; + * @return {string} + */ +proto.band.oracle.v1.RequestVerification.prototype.getValidator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.RequestVerification} returns this + */ +proto.band.oracle.v1.RequestVerification.prototype.setValidator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 request_id = 3; + * @return {number} + */ +proto.band.oracle.v1.RequestVerification.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.RequestVerification} returns this + */ +proto.band.oracle.v1.RequestVerification.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 external_id = 4; + * @return {number} + */ +proto.band.oracle.v1.RequestVerification.prototype.getExternalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.RequestVerification} returns this + */ +proto.band.oracle.v1.RequestVerification.prototype.setExternalId = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 data_source_id = 5; + * @return {number} + */ +proto.band.oracle.v1.RequestVerification.prototype.getDataSourceId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.RequestVerification} returns this + */ +proto.band.oracle.v1.RequestVerification.prototype.setDataSourceId = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.PriceResult.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.PriceResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.PriceResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.PriceResult.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + multiplier: jspb.Message.getFieldWithDefault(msg, 2, 0), + px: jspb.Message.getFieldWithDefault(msg, 3, 0), + requestId: jspb.Message.getFieldWithDefault(msg, 4, 0), + resolveTime: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.PriceResult} + */ +proto.band.oracle.v1.PriceResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.PriceResult; + return proto.band.oracle.v1.PriceResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.PriceResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.PriceResult} + */ +proto.band.oracle.v1.PriceResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSymbol(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMultiplier(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPx(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setResolveTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.PriceResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.PriceResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.PriceResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.PriceResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMultiplier(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPx(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getResolveTime(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.band.oracle.v1.PriceResult.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.PriceResult} returns this + */ +proto.band.oracle.v1.PriceResult.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 multiplier = 2; + * @return {number} + */ +proto.band.oracle.v1.PriceResult.prototype.getMultiplier = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.PriceResult} returns this + */ +proto.band.oracle.v1.PriceResult.prototype.setMultiplier = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 px = 3; + * @return {number} + */ +proto.band.oracle.v1.PriceResult.prototype.getPx = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.PriceResult} returns this + */ +proto.band.oracle.v1.PriceResult.prototype.setPx = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 request_id = 4; + * @return {number} + */ +proto.band.oracle.v1.PriceResult.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.PriceResult} returns this + */ +proto.band.oracle.v1.PriceResult.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 resolve_time = 5; + * @return {number} + */ +proto.band.oracle.v1.PriceResult.prototype.getResolveTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.PriceResult} returns this + */ +proto.band.oracle.v1.PriceResult.prototype.setResolveTime = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.OracleResultSignatureOrder.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.OracleResultSignatureOrder.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.OracleResultSignatureOrder} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleResultSignatureOrder.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: jspb.Message.getFieldWithDefault(msg, 1, 0), + encoder: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.OracleResultSignatureOrder} + */ +proto.band.oracle.v1.OracleResultSignatureOrder.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.OracleResultSignatureOrder; + return proto.band.oracle.v1.OracleResultSignatureOrder.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.OracleResultSignatureOrder} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.OracleResultSignatureOrder} + */ +proto.band.oracle.v1.OracleResultSignatureOrder.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 3: + var value = /** @type {!proto.band.oracle.v1.Encoder} */ (reader.readEnum()); + msg.setEncoder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.OracleResultSignatureOrder.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.OracleResultSignatureOrder.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.OracleResultSignatureOrder} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.OracleResultSignatureOrder.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getEncoder(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } +}; + + +/** + * optional uint64 request_id = 1; + * @return {number} + */ +proto.band.oracle.v1.OracleResultSignatureOrder.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.OracleResultSignatureOrder} returns this + */ +proto.band.oracle.v1.OracleResultSignatureOrder.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional Encoder encoder = 3; + * @return {!proto.band.oracle.v1.Encoder} + */ +proto.band.oracle.v1.OracleResultSignatureOrder.prototype.getEncoder = function() { + return /** @type {!proto.band.oracle.v1.Encoder} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.band.oracle.v1.Encoder} value + * @return {!proto.band.oracle.v1.OracleResultSignatureOrder} returns this + */ +proto.band.oracle.v1.OracleResultSignatureOrder.prototype.setEncoder = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.band.oracle.v1.ResolveStatus = { + RESOLVE_STATUS_OPEN_UNSPECIFIED: 0, + RESOLVE_STATUS_SUCCESS: 1, + RESOLVE_STATUS_FAILURE: 2, + RESOLVE_STATUS_EXPIRED: 3 +}; + +/** + * @enum {number} + */ +proto.band.oracle.v1.Encoder = { + ENCODER_UNSPECIFIED: 0, + ENCODER_PROTO: 1, + ENCODER_FULL_ABI: 2, + ENCODER_PARTIAL_ABI: 3 +}; + +goog.object.extend(exports, proto.band.oracle.v1); diff --git a/codegen/band/oracle/v1/oracle_pb_service.d.ts b/codegen/band/oracle/v1/oracle_pb_service.d.ts new file mode 100644 index 0000000..1d4e93e --- /dev/null +++ b/codegen/band/oracle/v1/oracle_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/oracle.proto + diff --git a/codegen/band/oracle/v1/oracle_pb_service.js b/codegen/band/oracle/v1/oracle_pb_service.js new file mode 100644 index 0000000..1d4e93e --- /dev/null +++ b/codegen/band/oracle/v1/oracle_pb_service.js @@ -0,0 +1,3 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/oracle.proto + diff --git a/codegen/band/oracle/v1/query.ts b/codegen/band/oracle/v1/query.ts new file mode 100644 index 0000000..5774e7c --- /dev/null +++ b/codegen/band/oracle/v1/query.ts @@ -0,0 +1,2577 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/oracle/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/api/annotations"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./oracle"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.oracle.v1 { + export class QueryCountsRequest 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: {}): QueryCountsRequest { + const message = new QueryCountsRequest({}); + 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): QueryCountsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCountsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCountsRequest { + return QueryCountsRequest.deserialize(bytes); + } + } + export class QueryCountsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data_source_count?: number; + oracle_script_count?: number; + request_count?: 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 ("data_source_count" in data && data.data_source_count != undefined) { + this.data_source_count = data.data_source_count; + } + if ("oracle_script_count" in data && data.oracle_script_count != undefined) { + this.oracle_script_count = data.oracle_script_count; + } + if ("request_count" in data && data.request_count != undefined) { + this.request_count = data.request_count; + } + } + } + get data_source_count() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set data_source_count(value: number) { + pb_1.Message.setField(this, 1, value); + } + get oracle_script_count() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set oracle_script_count(value: number) { + pb_1.Message.setField(this, 2, value); + } + get request_count() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set request_count(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + data_source_count?: number; + oracle_script_count?: number; + request_count?: number; + }): QueryCountsResponse { + const message = new QueryCountsResponse({}); + if (data.data_source_count != null) { + message.data_source_count = data.data_source_count; + } + if (data.oracle_script_count != null) { + message.oracle_script_count = data.oracle_script_count; + } + if (data.request_count != null) { + message.request_count = data.request_count; + } + return message; + } + toObject() { + const data: { + data_source_count?: number; + oracle_script_count?: number; + request_count?: number; + } = {}; + if (this.data_source_count != null) { + data.data_source_count = this.data_source_count; + } + if (this.oracle_script_count != null) { + data.oracle_script_count = this.oracle_script_count; + } + if (this.request_count != null) { + data.request_count = this.request_count; + } + 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.data_source_count != 0) + writer.writeUint64(1, this.data_source_count); + if (this.oracle_script_count != 0) + writer.writeUint64(2, this.oracle_script_count); + if (this.request_count != 0) + writer.writeUint64(3, this.request_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCountsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCountsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data_source_count = reader.readUint64(); + break; + case 2: + message.oracle_script_count = reader.readUint64(); + break; + case 3: + message.request_count = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCountsResponse { + return QueryCountsResponse.deserialize(bytes); + } + } + export class QueryDataRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data_hash?: 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 ("data_hash" in data && data.data_hash != undefined) { + this.data_hash = data.data_hash; + } + } + } + get data_hash() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set data_hash(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + data_hash?: string; + }): QueryDataRequest { + const message = new QueryDataRequest({}); + if (data.data_hash != null) { + message.data_hash = data.data_hash; + } + return message; + } + toObject() { + const data: { + data_hash?: string; + } = {}; + if (this.data_hash != null) { + data.data_hash = this.data_hash; + } + 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.data_hash.length) + writer.writeString(1, this.data_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDataRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDataRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data_hash = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDataRequest { + return QueryDataRequest.deserialize(bytes); + } + } + export class QueryDataResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + data?: Uint8Array; + }): QueryDataResponse { + const message = new QueryDataResponse({}); + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + data?: Uint8Array; + } = {}; + if (this.data != null) { + data.data = this.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 (this.data.length) + writer.writeBytes(1, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDataResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDataResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDataResponse { + return QueryDataResponse.deserialize(bytes); + } + } + export class QueryDataSourceRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data_source_id?: 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 ("data_source_id" in data && data.data_source_id != undefined) { + this.data_source_id = data.data_source_id; + } + } + } + get data_source_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set data_source_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + data_source_id?: number; + }): QueryDataSourceRequest { + const message = new QueryDataSourceRequest({}); + if (data.data_source_id != null) { + message.data_source_id = data.data_source_id; + } + return message; + } + toObject() { + const data: { + data_source_id?: number; + } = {}; + if (this.data_source_id != null) { + data.data_source_id = this.data_source_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.data_source_id != 0) + writer.writeUint64(1, this.data_source_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDataSourceRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDataSourceRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data_source_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDataSourceRequest { + return QueryDataSourceRequest.deserialize(bytes); + } + } + export class QueryDataSourceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data_source?: dependency_4.band.oracle.v1.DataSource; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data_source" in data && data.data_source != undefined) { + this.data_source = data.data_source; + } + } + } + get data_source() { + return pb_1.Message.getWrapperField(this, dependency_4.band.oracle.v1.DataSource, 1) as dependency_4.band.oracle.v1.DataSource; + } + set data_source(value: dependency_4.band.oracle.v1.DataSource) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_data_source() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + data_source?: ReturnType; + }): QueryDataSourceResponse { + const message = new QueryDataSourceResponse({}); + if (data.data_source != null) { + message.data_source = dependency_4.band.oracle.v1.DataSource.fromObject(data.data_source); + } + return message; + } + toObject() { + const data: { + data_source?: ReturnType; + } = {}; + if (this.data_source != null) { + data.data_source = this.data_source.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_data_source) + writer.writeMessage(1, this.data_source, () => this.data_source.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDataSourceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDataSourceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.data_source, () => message.data_source = dependency_4.band.oracle.v1.DataSource.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDataSourceResponse { + return QueryDataSourceResponse.deserialize(bytes); + } + } + export class QueryOracleScriptRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + oracle_script_id?: 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 ("oracle_script_id" in data && data.oracle_script_id != undefined) { + this.oracle_script_id = data.oracle_script_id; + } + } + } + get oracle_script_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set oracle_script_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + oracle_script_id?: number; + }): QueryOracleScriptRequest { + const message = new QueryOracleScriptRequest({}); + if (data.oracle_script_id != null) { + message.oracle_script_id = data.oracle_script_id; + } + return message; + } + toObject() { + const data: { + oracle_script_id?: number; + } = {}; + if (this.oracle_script_id != null) { + data.oracle_script_id = this.oracle_script_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.oracle_script_id != 0) + writer.writeUint64(1, this.oracle_script_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryOracleScriptRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryOracleScriptRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.oracle_script_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryOracleScriptRequest { + return QueryOracleScriptRequest.deserialize(bytes); + } + } + export class QueryOracleScriptResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + oracle_script?: dependency_4.band.oracle.v1.OracleScript; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("oracle_script" in data && data.oracle_script != undefined) { + this.oracle_script = data.oracle_script; + } + } + } + get oracle_script() { + return pb_1.Message.getWrapperField(this, dependency_4.band.oracle.v1.OracleScript, 1) as dependency_4.band.oracle.v1.OracleScript; + } + set oracle_script(value: dependency_4.band.oracle.v1.OracleScript) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_oracle_script() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + oracle_script?: ReturnType; + }): QueryOracleScriptResponse { + const message = new QueryOracleScriptResponse({}); + if (data.oracle_script != null) { + message.oracle_script = dependency_4.band.oracle.v1.OracleScript.fromObject(data.oracle_script); + } + return message; + } + toObject() { + const data: { + oracle_script?: ReturnType; + } = {}; + if (this.oracle_script != null) { + data.oracle_script = this.oracle_script.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_oracle_script) + writer.writeMessage(1, this.oracle_script, () => this.oracle_script.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryOracleScriptResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryOracleScriptResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.oracle_script, () => message.oracle_script = dependency_4.band.oracle.v1.OracleScript.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryOracleScriptResponse { + return QueryOracleScriptResponse.deserialize(bytes); + } + } + export class QueryRequestRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request_id?: 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 ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + } + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + request_id?: number; + }): QueryRequestRequest { + const message = new QueryRequestRequest({}); + if (data.request_id != null) { + message.request_id = data.request_id; + } + return message; + } + toObject() { + const data: { + request_id?: number; + } = {}; + if (this.request_id != null) { + data.request_id = this.request_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.request_id != 0) + writer.writeUint64(1, this.request_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRequestRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRequestRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.request_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRequestRequest { + return QueryRequestRequest.deserialize(bytes); + } + } + export class QueryRequestResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request?: dependency_4.band.oracle.v1.Request; + reports?: dependency_4.band.oracle.v1.Report[]; + result?: dependency_4.band.oracle.v1.Result; + signing?: dependency_4.band.oracle.v1.SigningResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("request" in data && data.request != undefined) { + this.request = data.request; + } + if ("reports" in data && data.reports != undefined) { + this.reports = data.reports; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + if ("signing" in data && data.signing != undefined) { + this.signing = data.signing; + } + } + } + get request() { + return pb_1.Message.getWrapperField(this, dependency_4.band.oracle.v1.Request, 1) as dependency_4.band.oracle.v1.Request; + } + set request(value: dependency_4.band.oracle.v1.Request) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_request() { + return pb_1.Message.getField(this, 1) != null; + } + get reports() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.band.oracle.v1.Report, 2) as dependency_4.band.oracle.v1.Report[]; + } + set reports(value: dependency_4.band.oracle.v1.Report[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get result() { + return pb_1.Message.getWrapperField(this, dependency_4.band.oracle.v1.Result, 3) as dependency_4.band.oracle.v1.Result; + } + set result(value: dependency_4.band.oracle.v1.Result) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_result() { + return pb_1.Message.getField(this, 3) != null; + } + get signing() { + return pb_1.Message.getWrapperField(this, dependency_4.band.oracle.v1.SigningResult, 4) as dependency_4.band.oracle.v1.SigningResult; + } + set signing(value: dependency_4.band.oracle.v1.SigningResult) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_signing() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + request?: ReturnType; + reports?: ReturnType[]; + result?: ReturnType; + signing?: ReturnType; + }): QueryRequestResponse { + const message = new QueryRequestResponse({}); + if (data.request != null) { + message.request = dependency_4.band.oracle.v1.Request.fromObject(data.request); + } + if (data.reports != null) { + message.reports = data.reports.map(item => dependency_4.band.oracle.v1.Report.fromObject(item)); + } + if (data.result != null) { + message.result = dependency_4.band.oracle.v1.Result.fromObject(data.result); + } + if (data.signing != null) { + message.signing = dependency_4.band.oracle.v1.SigningResult.fromObject(data.signing); + } + return message; + } + toObject() { + const data: { + request?: ReturnType; + reports?: ReturnType[]; + result?: ReturnType; + signing?: ReturnType; + } = {}; + if (this.request != null) { + data.request = this.request.toObject(); + } + if (this.reports != null) { + data.reports = this.reports.map((item: dependency_4.band.oracle.v1.Report) => item.toObject()); + } + if (this.result != null) { + data.result = this.result.toObject(); + } + if (this.signing != null) { + data.signing = this.signing.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_request) + writer.writeMessage(1, this.request, () => this.request.serialize(writer)); + if (this.reports.length) + writer.writeRepeatedMessage(2, this.reports, (item: dependency_4.band.oracle.v1.Report) => item.serialize(writer)); + if (this.has_result) + writer.writeMessage(3, this.result, () => this.result.serialize(writer)); + if (this.has_signing) + writer.writeMessage(4, this.signing, () => this.signing.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRequestResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRequestResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.request, () => message.request = dependency_4.band.oracle.v1.Request.deserialize(reader)); + break; + case 2: + reader.readMessage(message.reports, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.band.oracle.v1.Report.deserialize(reader), dependency_4.band.oracle.v1.Report)); + break; + case 3: + reader.readMessage(message.result, () => message.result = dependency_4.band.oracle.v1.Result.deserialize(reader)); + break; + case 4: + reader.readMessage(message.signing, () => message.signing = dependency_4.band.oracle.v1.SigningResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRequestResponse { + return QueryRequestResponse.deserialize(bytes); + } + } + export class QueryPendingRequestsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: 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 ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator_address?: string; + }): QueryPendingRequestsRequest { + const message = new QueryPendingRequestsRequest({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + validator_address?: string; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.validator_address.length) + writer.writeString(1, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPendingRequestsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPendingRequestsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPendingRequestsRequest { + return QueryPendingRequestsRequest.deserialize(bytes); + } + } + export class QueryPendingRequestsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request_ids?: number[]; + }) { + 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 ("request_ids" in data && data.request_ids != undefined) { + this.request_ids = data.request_ids; + } + } + } + get request_ids() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set request_ids(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + request_ids?: number[]; + }): QueryPendingRequestsResponse { + const message = new QueryPendingRequestsResponse({}); + if (data.request_ids != null) { + message.request_ids = data.request_ids; + } + return message; + } + toObject() { + const data: { + request_ids?: number[]; + } = {}; + if (this.request_ids != null) { + data.request_ids = this.request_ids; + } + 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.request_ids.length) + writer.writePackedUint64(1, this.request_ids); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPendingRequestsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPendingRequestsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.request_ids = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPendingRequestsResponse { + return QueryPendingRequestsResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_4.band.oracle.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.band.oracle.v1.Params, 1) as dependency_4.band.oracle.v1.Params; + } + set params(value: dependency_4.band.oracle.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; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_4.band.oracle.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_4.band.oracle.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QueryValidatorRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: 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 ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator_address?: string; + }): QueryValidatorRequest { + const message = new QueryValidatorRequest({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + validator_address?: string; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.validator_address.length) + writer.writeString(1, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorRequest { + return QueryValidatorRequest.deserialize(bytes); + } + } + export class QueryValidatorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + status?: dependency_4.band.oracle.v1.ValidatorStatus; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get status() { + return pb_1.Message.getWrapperField(this, dependency_4.band.oracle.v1.ValidatorStatus, 1) as dependency_4.band.oracle.v1.ValidatorStatus; + } + set status(value: dependency_4.band.oracle.v1.ValidatorStatus) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_status() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + status?: ReturnType; + }): QueryValidatorResponse { + const message = new QueryValidatorResponse({}); + if (data.status != null) { + message.status = dependency_4.band.oracle.v1.ValidatorStatus.fromObject(data.status); + } + return message; + } + toObject() { + const data: { + status?: ReturnType; + } = {}; + if (this.status != null) { + data.status = this.status.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_status) + writer.writeMessage(1, this.status, () => this.status.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.status, () => message.status = dependency_4.band.oracle.v1.ValidatorStatus.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorResponse { + return QueryValidatorResponse.deserialize(bytes); + } + } + export class QueryIsReporterRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: string; + reporter_address?: 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 ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("reporter_address" in data && data.reporter_address != undefined) { + this.reporter_address = data.reporter_address; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get reporter_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set reporter_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + validator_address?: string; + reporter_address?: string; + }): QueryIsReporterRequest { + const message = new QueryIsReporterRequest({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.reporter_address != null) { + message.reporter_address = data.reporter_address; + } + return message; + } + toObject() { + const data: { + validator_address?: string; + reporter_address?: string; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.reporter_address != null) { + data.reporter_address = this.reporter_address; + } + 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.validator_address.length) + writer.writeString(1, this.validator_address); + if (this.reporter_address.length) + writer.writeString(2, this.reporter_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIsReporterRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIsReporterRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + case 2: + message.reporter_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIsReporterRequest { + return QueryIsReporterRequest.deserialize(bytes); + } + } + export class QueryIsReporterResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + is_reporter?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("is_reporter" in data && data.is_reporter != undefined) { + this.is_reporter = data.is_reporter; + } + } + } + get is_reporter() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set is_reporter(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + is_reporter?: boolean; + }): QueryIsReporterResponse { + const message = new QueryIsReporterResponse({}); + if (data.is_reporter != null) { + message.is_reporter = data.is_reporter; + } + return message; + } + toObject() { + const data: { + is_reporter?: boolean; + } = {}; + if (this.is_reporter != null) { + data.is_reporter = this.is_reporter; + } + 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.is_reporter != false) + writer.writeBool(1, this.is_reporter); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIsReporterResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIsReporterResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.is_reporter = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIsReporterResponse { + return QueryIsReporterResponse.deserialize(bytes); + } + } + export class QueryReportersRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: 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 ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator_address?: string; + }): QueryReportersRequest { + const message = new QueryReportersRequest({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + validator_address?: string; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.validator_address.length) + writer.writeString(1, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryReportersRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryReportersRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryReportersRequest { + return QueryReportersRequest.deserialize(bytes); + } + } + export class QueryReportersResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + reporter?: string[]; + }) { + 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 ("reporter" in data && data.reporter != undefined) { + this.reporter = data.reporter; + } + } + } + get reporter() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set reporter(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + reporter?: string[]; + }): QueryReportersResponse { + const message = new QueryReportersResponse({}); + if (data.reporter != null) { + message.reporter = data.reporter; + } + return message; + } + toObject() { + const data: { + reporter?: string[]; + } = {}; + if (this.reporter != null) { + data.reporter = this.reporter; + } + 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.reporter.length) + writer.writeRepeatedString(1, this.reporter); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryReportersResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryReportersResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryReportersResponse { + return QueryReportersResponse.deserialize(bytes); + } + } + export class QueryActiveValidatorsRequest 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: {}): QueryActiveValidatorsRequest { + const message = new QueryActiveValidatorsRequest({}); + 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): QueryActiveValidatorsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryActiveValidatorsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryActiveValidatorsRequest { + return QueryActiveValidatorsRequest.deserialize(bytes); + } + } + export class QueryActiveValidatorsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validators?: dependency_4.band.oracle.v1.ActiveValidator[]; + }) { + 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 ("validators" in data && data.validators != undefined) { + this.validators = data.validators; + } + } + } + get validators() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.band.oracle.v1.ActiveValidator, 1) as dependency_4.band.oracle.v1.ActiveValidator[]; + } + set validators(value: dependency_4.band.oracle.v1.ActiveValidator[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + validators?: ReturnType[]; + }): QueryActiveValidatorsResponse { + const message = new QueryActiveValidatorsResponse({}); + if (data.validators != null) { + message.validators = data.validators.map(item => dependency_4.band.oracle.v1.ActiveValidator.fromObject(item)); + } + return message; + } + toObject() { + const data: { + validators?: ReturnType[]; + } = {}; + if (this.validators != null) { + data.validators = this.validators.map((item: dependency_4.band.oracle.v1.ActiveValidator) => item.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.validators.length) + writer.writeRepeatedMessage(1, this.validators, (item: dependency_4.band.oracle.v1.ActiveValidator) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryActiveValidatorsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryActiveValidatorsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.band.oracle.v1.ActiveValidator.deserialize(reader), dependency_4.band.oracle.v1.ActiveValidator)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryActiveValidatorsResponse { + return QueryActiveValidatorsResponse.deserialize(bytes); + } + } + export class QueryRequestSearchRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + oracle_script_id?: number; + calldata?: string; + ask_count?: number; + min_count?: 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 ("oracle_script_id" in data && data.oracle_script_id != undefined) { + this.oracle_script_id = data.oracle_script_id; + } + if ("calldata" in data && data.calldata != undefined) { + this.calldata = data.calldata; + } + if ("ask_count" in data && data.ask_count != undefined) { + this.ask_count = data.ask_count; + } + if ("min_count" in data && data.min_count != undefined) { + this.min_count = data.min_count; + } + } + } + get oracle_script_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set oracle_script_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get calldata() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set calldata(value: string) { + pb_1.Message.setField(this, 2, value); + } + get ask_count() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set ask_count(value: number) { + pb_1.Message.setField(this, 3, value); + } + get min_count() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set min_count(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + oracle_script_id?: number; + calldata?: string; + ask_count?: number; + min_count?: number; + }): QueryRequestSearchRequest { + const message = new QueryRequestSearchRequest({}); + if (data.oracle_script_id != null) { + message.oracle_script_id = data.oracle_script_id; + } + if (data.calldata != null) { + message.calldata = data.calldata; + } + if (data.ask_count != null) { + message.ask_count = data.ask_count; + } + if (data.min_count != null) { + message.min_count = data.min_count; + } + return message; + } + toObject() { + const data: { + oracle_script_id?: number; + calldata?: string; + ask_count?: number; + min_count?: number; + } = {}; + if (this.oracle_script_id != null) { + data.oracle_script_id = this.oracle_script_id; + } + if (this.calldata != null) { + data.calldata = this.calldata; + } + if (this.ask_count != null) { + data.ask_count = this.ask_count; + } + if (this.min_count != null) { + data.min_count = this.min_count; + } + 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.oracle_script_id != 0) + writer.writeUint64(1, this.oracle_script_id); + if (this.calldata.length) + writer.writeString(2, this.calldata); + if (this.ask_count != 0) + writer.writeUint64(3, this.ask_count); + if (this.min_count != 0) + writer.writeUint64(4, this.min_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRequestSearchRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRequestSearchRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.oracle_script_id = reader.readUint64(); + break; + case 2: + message.calldata = reader.readString(); + break; + case 3: + message.ask_count = reader.readUint64(); + break; + case 4: + message.min_count = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRequestSearchRequest { + return QueryRequestSearchRequest.deserialize(bytes); + } + } + export class QueryRequestSearchResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request?: QueryRequestResponse; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("request" in data && data.request != undefined) { + this.request = data.request; + } + } + } + get request() { + return pb_1.Message.getWrapperField(this, QueryRequestResponse, 1) as QueryRequestResponse; + } + set request(value: QueryRequestResponse) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_request() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + request?: ReturnType; + }): QueryRequestSearchResponse { + const message = new QueryRequestSearchResponse({}); + if (data.request != null) { + message.request = QueryRequestResponse.fromObject(data.request); + } + return message; + } + toObject() { + const data: { + request?: ReturnType; + } = {}; + if (this.request != null) { + data.request = this.request.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_request) + writer.writeMessage(1, this.request, () => this.request.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRequestSearchResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRequestSearchResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.request, () => message.request = QueryRequestResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRequestSearchResponse { + return QueryRequestSearchResponse.deserialize(bytes); + } + } + export class QueryRequestPriceRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + symbols?: string[]; + ask_count?: number; + min_count?: number; + }) { + 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 ("symbols" in data && data.symbols != undefined) { + this.symbols = data.symbols; + } + if ("ask_count" in data && data.ask_count != undefined) { + this.ask_count = data.ask_count; + } + if ("min_count" in data && data.min_count != undefined) { + this.min_count = data.min_count; + } + } + } + get symbols() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set symbols(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get ask_count() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set ask_count(value: number) { + pb_1.Message.setField(this, 2, value); + } + get min_count() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set min_count(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + symbols?: string[]; + ask_count?: number; + min_count?: number; + }): QueryRequestPriceRequest { + const message = new QueryRequestPriceRequest({}); + if (data.symbols != null) { + message.symbols = data.symbols; + } + if (data.ask_count != null) { + message.ask_count = data.ask_count; + } + if (data.min_count != null) { + message.min_count = data.min_count; + } + return message; + } + toObject() { + const data: { + symbols?: string[]; + ask_count?: number; + min_count?: number; + } = {}; + if (this.symbols != null) { + data.symbols = this.symbols; + } + if (this.ask_count != null) { + data.ask_count = this.ask_count; + } + if (this.min_count != null) { + data.min_count = this.min_count; + } + 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.symbols.length) + writer.writeRepeatedString(1, this.symbols); + if (this.ask_count != 0) + writer.writeUint64(2, this.ask_count); + if (this.min_count != 0) + writer.writeUint64(3, this.min_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRequestPriceRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRequestPriceRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + message.ask_count = reader.readUint64(); + break; + case 3: + message.min_count = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRequestPriceRequest { + return QueryRequestPriceRequest.deserialize(bytes); + } + } + export class QueryRequestPriceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + price_results?: dependency_4.band.oracle.v1.PriceResult[]; + }) { + 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 ("price_results" in data && data.price_results != undefined) { + this.price_results = data.price_results; + } + } + } + get price_results() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.band.oracle.v1.PriceResult, 1) as dependency_4.band.oracle.v1.PriceResult[]; + } + set price_results(value: dependency_4.band.oracle.v1.PriceResult[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + price_results?: ReturnType[]; + }): QueryRequestPriceResponse { + const message = new QueryRequestPriceResponse({}); + if (data.price_results != null) { + message.price_results = data.price_results.map(item => dependency_4.band.oracle.v1.PriceResult.fromObject(item)); + } + return message; + } + toObject() { + const data: { + price_results?: ReturnType[]; + } = {}; + if (this.price_results != null) { + data.price_results = this.price_results.map((item: dependency_4.band.oracle.v1.PriceResult) => item.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.price_results.length) + writer.writeRepeatedMessage(1, this.price_results, (item: dependency_4.band.oracle.v1.PriceResult) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRequestPriceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRequestPriceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.price_results, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.band.oracle.v1.PriceResult.deserialize(reader), dependency_4.band.oracle.v1.PriceResult)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRequestPriceResponse { + return QueryRequestPriceResponse.deserialize(bytes); + } + } + export class QueryRequestVerificationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + chain_id?: string; + validator?: string; + request_id?: number; + external_id?: number; + data_source_id?: number; + reporter?: string; + signature?: Uint8Array; + max_delay?: 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 ("chain_id" in data && data.chain_id != undefined) { + this.chain_id = data.chain_id; + } + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + if ("external_id" in data && data.external_id != undefined) { + this.external_id = data.external_id; + } + if ("data_source_id" in data && data.data_source_id != undefined) { + this.data_source_id = data.data_source_id; + } + if ("reporter" in data && data.reporter != undefined) { + this.reporter = data.reporter; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + if ("max_delay" in data && data.max_delay != undefined) { + this.max_delay = data.max_delay; + } + } + } + get chain_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set chain_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 2, value); + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 3, value); + } + get external_id() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set external_id(value: number) { + pb_1.Message.setField(this, 4, value); + } + get data_source_id() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set data_source_id(value: number) { + pb_1.Message.setField(this, 5, value); + } + get reporter() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set reporter(value: string) { + pb_1.Message.setField(this, 6, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get max_delay() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set max_delay(value: number) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + chain_id?: string; + validator?: string; + request_id?: number; + external_id?: number; + data_source_id?: number; + reporter?: string; + signature?: Uint8Array; + max_delay?: number; + }): QueryRequestVerificationRequest { + const message = new QueryRequestVerificationRequest({}); + if (data.chain_id != null) { + message.chain_id = data.chain_id; + } + if (data.validator != null) { + message.validator = data.validator; + } + if (data.request_id != null) { + message.request_id = data.request_id; + } + if (data.external_id != null) { + message.external_id = data.external_id; + } + if (data.data_source_id != null) { + message.data_source_id = data.data_source_id; + } + if (data.reporter != null) { + message.reporter = data.reporter; + } + if (data.signature != null) { + message.signature = data.signature; + } + if (data.max_delay != null) { + message.max_delay = data.max_delay; + } + return message; + } + toObject() { + const data: { + chain_id?: string; + validator?: string; + request_id?: number; + external_id?: number; + data_source_id?: number; + reporter?: string; + signature?: Uint8Array; + max_delay?: number; + } = {}; + if (this.chain_id != null) { + data.chain_id = this.chain_id; + } + if (this.validator != null) { + data.validator = this.validator; + } + if (this.request_id != null) { + data.request_id = this.request_id; + } + if (this.external_id != null) { + data.external_id = this.external_id; + } + if (this.data_source_id != null) { + data.data_source_id = this.data_source_id; + } + if (this.reporter != null) { + data.reporter = this.reporter; + } + if (this.signature != null) { + data.signature = this.signature; + } + if (this.max_delay != null) { + data.max_delay = this.max_delay; + } + 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.chain_id.length) + writer.writeString(1, this.chain_id); + if (this.validator.length) + writer.writeString(2, this.validator); + if (this.request_id != 0) + writer.writeUint64(3, this.request_id); + if (this.external_id != 0) + writer.writeUint64(4, this.external_id); + if (this.data_source_id != 0) + writer.writeUint64(5, this.data_source_id); + if (this.reporter.length) + writer.writeString(6, this.reporter); + if (this.signature.length) + writer.writeBytes(7, this.signature); + if (this.max_delay != 0) + writer.writeUint64(8, this.max_delay); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRequestVerificationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRequestVerificationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.chain_id = reader.readString(); + break; + case 2: + message.validator = reader.readString(); + break; + case 3: + message.request_id = reader.readUint64(); + break; + case 4: + message.external_id = reader.readUint64(); + break; + case 5: + message.data_source_id = reader.readUint64(); + break; + case 6: + message.reporter = reader.readString(); + break; + case 7: + message.signature = reader.readBytes(); + break; + case 8: + message.max_delay = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRequestVerificationRequest { + return QueryRequestVerificationRequest.deserialize(bytes); + } + } + export class QueryRequestVerificationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + chain_id?: string; + validator?: string; + request_id?: number; + external_id?: number; + data_source_id?: number; + is_delay?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("chain_id" in data && data.chain_id != undefined) { + this.chain_id = data.chain_id; + } + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + if ("external_id" in data && data.external_id != undefined) { + this.external_id = data.external_id; + } + if ("data_source_id" in data && data.data_source_id != undefined) { + this.data_source_id = data.data_source_id; + } + if ("is_delay" in data && data.is_delay != undefined) { + this.is_delay = data.is_delay; + } + } + } + get chain_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set chain_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 2, value); + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 3, value); + } + get external_id() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set external_id(value: number) { + pb_1.Message.setField(this, 4, value); + } + get data_source_id() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set data_source_id(value: number) { + pb_1.Message.setField(this, 5, value); + } + get is_delay() { + return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean; + } + set is_delay(value: boolean) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + chain_id?: string; + validator?: string; + request_id?: number; + external_id?: number; + data_source_id?: number; + is_delay?: boolean; + }): QueryRequestVerificationResponse { + const message = new QueryRequestVerificationResponse({}); + if (data.chain_id != null) { + message.chain_id = data.chain_id; + } + if (data.validator != null) { + message.validator = data.validator; + } + if (data.request_id != null) { + message.request_id = data.request_id; + } + if (data.external_id != null) { + message.external_id = data.external_id; + } + if (data.data_source_id != null) { + message.data_source_id = data.data_source_id; + } + if (data.is_delay != null) { + message.is_delay = data.is_delay; + } + return message; + } + toObject() { + const data: { + chain_id?: string; + validator?: string; + request_id?: number; + external_id?: number; + data_source_id?: number; + is_delay?: boolean; + } = {}; + if (this.chain_id != null) { + data.chain_id = this.chain_id; + } + if (this.validator != null) { + data.validator = this.validator; + } + if (this.request_id != null) { + data.request_id = this.request_id; + } + if (this.external_id != null) { + data.external_id = this.external_id; + } + if (this.data_source_id != null) { + data.data_source_id = this.data_source_id; + } + if (this.is_delay != null) { + data.is_delay = this.is_delay; + } + 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.chain_id.length) + writer.writeString(1, this.chain_id); + if (this.validator.length) + writer.writeString(2, this.validator); + if (this.request_id != 0) + writer.writeUint64(3, this.request_id); + if (this.external_id != 0) + writer.writeUint64(4, this.external_id); + if (this.data_source_id != 0) + writer.writeUint64(5, this.data_source_id); + if (this.is_delay != false) + writer.writeBool(6, this.is_delay); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRequestVerificationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRequestVerificationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.chain_id = reader.readString(); + break; + case 2: + message.validator = reader.readString(); + break; + case 3: + message.request_id = reader.readUint64(); + break; + case 4: + message.external_id = reader.readUint64(); + break; + case 5: + message.data_source_id = reader.readUint64(); + break; + case 6: + message.is_delay = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRequestVerificationResponse { + return QueryRequestVerificationResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Counts: { + path: "/band.oracle.v1.Query/Counts", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryCountsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryCountsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryCountsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryCountsResponse.deserialize(new Uint8Array(bytes)) + }, + Data: { + path: "/band.oracle.v1.Query/Data", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDataRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDataRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDataResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDataResponse.deserialize(new Uint8Array(bytes)) + }, + DataSource: { + path: "/band.oracle.v1.Query/DataSource", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDataSourceRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDataSourceRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDataSourceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDataSourceResponse.deserialize(new Uint8Array(bytes)) + }, + OracleScript: { + path: "/band.oracle.v1.Query/OracleScript", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryOracleScriptRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryOracleScriptRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryOracleScriptResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryOracleScriptResponse.deserialize(new Uint8Array(bytes)) + }, + Request: { + path: "/band.oracle.v1.Query/Request", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryRequestRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryRequestRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryRequestResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryRequestResponse.deserialize(new Uint8Array(bytes)) + }, + PendingRequests: { + path: "/band.oracle.v1.Query/PendingRequests", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPendingRequestsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPendingRequestsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPendingRequestsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPendingRequestsResponse.deserialize(new Uint8Array(bytes)) + }, + Validator: { + path: "/band.oracle.v1.Query/Validator", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorResponse.deserialize(new Uint8Array(bytes)) + }, + IsReporter: { + path: "/band.oracle.v1.Query/IsReporter", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryIsReporterRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryIsReporterRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryIsReporterResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryIsReporterResponse.deserialize(new Uint8Array(bytes)) + }, + Reporters: { + path: "/band.oracle.v1.Query/Reporters", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryReportersRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryReportersRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryReportersResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryReportersResponse.deserialize(new Uint8Array(bytes)) + }, + ActiveValidators: { + path: "/band.oracle.v1.Query/ActiveValidators", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryActiveValidatorsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryActiveValidatorsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryActiveValidatorsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryActiveValidatorsResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/band.oracle.v1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + RequestSearch: { + path: "/band.oracle.v1.Query/RequestSearch", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryRequestSearchRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryRequestSearchRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryRequestSearchResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryRequestSearchResponse.deserialize(new Uint8Array(bytes)) + }, + RequestPrice: { + path: "/band.oracle.v1.Query/RequestPrice", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryRequestPriceRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryRequestPriceRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryRequestPriceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryRequestPriceResponse.deserialize(new Uint8Array(bytes)) + }, + RequestVerification: { + path: "/band.oracle.v1.Query/RequestVerification", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryRequestVerificationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryRequestVerificationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryRequestVerificationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryRequestVerificationResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Counts(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Data(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DataSource(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract OracleScript(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Request(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PendingRequests(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Validator(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract IsReporter(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Reporters(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ActiveValidators(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RequestSearch(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RequestPrice(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RequestVerification(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Counts: GrpcUnaryServiceInterface = (message: QueryCountsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Counts(message, metadata, options, callback); + }; + Data: GrpcUnaryServiceInterface = (message: QueryDataRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Data(message, metadata, options, callback); + }; + DataSource: GrpcUnaryServiceInterface = (message: QueryDataSourceRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DataSource(message, metadata, options, callback); + }; + OracleScript: GrpcUnaryServiceInterface = (message: QueryOracleScriptRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.OracleScript(message, metadata, options, callback); + }; + Request: GrpcUnaryServiceInterface = (message: QueryRequestRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Request(message, metadata, options, callback); + }; + PendingRequests: GrpcUnaryServiceInterface = (message: QueryPendingRequestsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PendingRequests(message, metadata, options, callback); + }; + Validator: GrpcUnaryServiceInterface = (message: QueryValidatorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Validator(message, metadata, options, callback); + }; + IsReporter: GrpcUnaryServiceInterface = (message: QueryIsReporterRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.IsReporter(message, metadata, options, callback); + }; + Reporters: GrpcUnaryServiceInterface = (message: QueryReportersRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Reporters(message, metadata, options, callback); + }; + ActiveValidators: GrpcUnaryServiceInterface = (message: QueryActiveValidatorsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ActiveValidators(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + RequestSearch: GrpcUnaryServiceInterface = (message: QueryRequestSearchRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RequestSearch(message, metadata, options, callback); + }; + RequestPrice: GrpcUnaryServiceInterface = (message: QueryRequestPriceRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RequestPrice(message, metadata, options, callback); + }; + RequestVerification: GrpcUnaryServiceInterface = (message: QueryRequestVerificationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RequestVerification(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/oracle/v1/query_pb.d.ts b/codegen/band/oracle/v1/query_pb.d.ts new file mode 100644 index 0000000..4d0a5b7 --- /dev/null +++ b/codegen/band/oracle/v1/query_pb.d.ts @@ -0,0 +1,681 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/query.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as band_oracle_v1_oracle_pb from "../../../band/oracle/v1/oracle_pb"; + +export class QueryCountsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCountsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryCountsRequest): QueryCountsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCountsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCountsRequest; + static deserializeBinaryFromReader(message: QueryCountsRequest, reader: jspb.BinaryReader): QueryCountsRequest; +} + +export namespace QueryCountsRequest { + export type AsObject = { + } +} + +export class QueryCountsResponse extends jspb.Message { + getDataSourceCount(): number; + setDataSourceCount(value: number): void; + + getOracleScriptCount(): number; + setOracleScriptCount(value: number): void; + + getRequestCount(): number; + setRequestCount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCountsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryCountsResponse): QueryCountsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCountsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCountsResponse; + static deserializeBinaryFromReader(message: QueryCountsResponse, reader: jspb.BinaryReader): QueryCountsResponse; +} + +export namespace QueryCountsResponse { + export type AsObject = { + dataSourceCount: number, + oracleScriptCount: number, + requestCount: number, + } +} + +export class QueryDataRequest extends jspb.Message { + getDataHash(): string; + setDataHash(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDataRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryDataRequest): QueryDataRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDataRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDataRequest; + static deserializeBinaryFromReader(message: QueryDataRequest, reader: jspb.BinaryReader): QueryDataRequest; +} + +export namespace QueryDataRequest { + export type AsObject = { + dataHash: string, + } +} + +export class QueryDataResponse extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDataResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryDataResponse): QueryDataResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDataResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDataResponse; + static deserializeBinaryFromReader(message: QueryDataResponse, reader: jspb.BinaryReader): QueryDataResponse; +} + +export namespace QueryDataResponse { + export type AsObject = { + data: Uint8Array | string, + } +} + +export class QueryDataSourceRequest extends jspb.Message { + getDataSourceId(): number; + setDataSourceId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDataSourceRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryDataSourceRequest): QueryDataSourceRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDataSourceRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDataSourceRequest; + static deserializeBinaryFromReader(message: QueryDataSourceRequest, reader: jspb.BinaryReader): QueryDataSourceRequest; +} + +export namespace QueryDataSourceRequest { + export type AsObject = { + dataSourceId: number, + } +} + +export class QueryDataSourceResponse extends jspb.Message { + hasDataSource(): boolean; + clearDataSource(): void; + getDataSource(): band_oracle_v1_oracle_pb.DataSource | undefined; + setDataSource(value?: band_oracle_v1_oracle_pb.DataSource): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDataSourceResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryDataSourceResponse): QueryDataSourceResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDataSourceResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDataSourceResponse; + static deserializeBinaryFromReader(message: QueryDataSourceResponse, reader: jspb.BinaryReader): QueryDataSourceResponse; +} + +export namespace QueryDataSourceResponse { + export type AsObject = { + dataSource?: band_oracle_v1_oracle_pb.DataSource.AsObject, + } +} + +export class QueryOracleScriptRequest extends jspb.Message { + getOracleScriptId(): number; + setOracleScriptId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryOracleScriptRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryOracleScriptRequest): QueryOracleScriptRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryOracleScriptRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryOracleScriptRequest; + static deserializeBinaryFromReader(message: QueryOracleScriptRequest, reader: jspb.BinaryReader): QueryOracleScriptRequest; +} + +export namespace QueryOracleScriptRequest { + export type AsObject = { + oracleScriptId: number, + } +} + +export class QueryOracleScriptResponse extends jspb.Message { + hasOracleScript(): boolean; + clearOracleScript(): void; + getOracleScript(): band_oracle_v1_oracle_pb.OracleScript | undefined; + setOracleScript(value?: band_oracle_v1_oracle_pb.OracleScript): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryOracleScriptResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryOracleScriptResponse): QueryOracleScriptResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryOracleScriptResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryOracleScriptResponse; + static deserializeBinaryFromReader(message: QueryOracleScriptResponse, reader: jspb.BinaryReader): QueryOracleScriptResponse; +} + +export namespace QueryOracleScriptResponse { + export type AsObject = { + oracleScript?: band_oracle_v1_oracle_pb.OracleScript.AsObject, + } +} + +export class QueryRequestRequest extends jspb.Message { + getRequestId(): number; + setRequestId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequestRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequestRequest): QueryRequestRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequestRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequestRequest; + static deserializeBinaryFromReader(message: QueryRequestRequest, reader: jspb.BinaryReader): QueryRequestRequest; +} + +export namespace QueryRequestRequest { + export type AsObject = { + requestId: number, + } +} + +export class QueryRequestResponse extends jspb.Message { + hasRequest(): boolean; + clearRequest(): void; + getRequest(): band_oracle_v1_oracle_pb.Request | undefined; + setRequest(value?: band_oracle_v1_oracle_pb.Request): void; + + clearReportsList(): void; + getReportsList(): Array; + setReportsList(value: Array): void; + addReports(value?: band_oracle_v1_oracle_pb.Report, index?: number): band_oracle_v1_oracle_pb.Report; + + hasResult(): boolean; + clearResult(): void; + getResult(): band_oracle_v1_oracle_pb.Result | undefined; + setResult(value?: band_oracle_v1_oracle_pb.Result): void; + + hasSigning(): boolean; + clearSigning(): void; + getSigning(): band_oracle_v1_oracle_pb.SigningResult | undefined; + setSigning(value?: band_oracle_v1_oracle_pb.SigningResult): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequestResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequestResponse): QueryRequestResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequestResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequestResponse; + static deserializeBinaryFromReader(message: QueryRequestResponse, reader: jspb.BinaryReader): QueryRequestResponse; +} + +export namespace QueryRequestResponse { + export type AsObject = { + request?: band_oracle_v1_oracle_pb.Request.AsObject, + reportsList: Array, + result?: band_oracle_v1_oracle_pb.Result.AsObject, + signing?: band_oracle_v1_oracle_pb.SigningResult.AsObject, + } +} + +export class QueryPendingRequestsRequest extends jspb.Message { + getValidatorAddress(): string; + setValidatorAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryPendingRequestsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryPendingRequestsRequest): QueryPendingRequestsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryPendingRequestsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPendingRequestsRequest; + static deserializeBinaryFromReader(message: QueryPendingRequestsRequest, reader: jspb.BinaryReader): QueryPendingRequestsRequest; +} + +export namespace QueryPendingRequestsRequest { + export type AsObject = { + validatorAddress: string, + } +} + +export class QueryPendingRequestsResponse extends jspb.Message { + clearRequestIdsList(): void; + getRequestIdsList(): Array; + setRequestIdsList(value: Array): void; + addRequestIds(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryPendingRequestsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryPendingRequestsResponse): QueryPendingRequestsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryPendingRequestsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPendingRequestsResponse; + static deserializeBinaryFromReader(message: QueryPendingRequestsResponse, reader: jspb.BinaryReader): QueryPendingRequestsResponse; +} + +export namespace QueryPendingRequestsResponse { + export type AsObject = { + requestIdsList: Array, + } +} + +export class QueryParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; + static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; +} + +export namespace QueryParamsRequest { + export type AsObject = { + } +} + +export class QueryParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_oracle_v1_oracle_pb.Params | undefined; + setParams(value?: band_oracle_v1_oracle_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; + static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; +} + +export namespace QueryParamsResponse { + export type AsObject = { + params?: band_oracle_v1_oracle_pb.Params.AsObject, + } +} + +export class QueryValidatorRequest extends jspb.Message { + getValidatorAddress(): string; + setValidatorAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryValidatorRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryValidatorRequest): QueryValidatorRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryValidatorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryValidatorRequest; + static deserializeBinaryFromReader(message: QueryValidatorRequest, reader: jspb.BinaryReader): QueryValidatorRequest; +} + +export namespace QueryValidatorRequest { + export type AsObject = { + validatorAddress: string, + } +} + +export class QueryValidatorResponse extends jspb.Message { + hasStatus(): boolean; + clearStatus(): void; + getStatus(): band_oracle_v1_oracle_pb.ValidatorStatus | undefined; + setStatus(value?: band_oracle_v1_oracle_pb.ValidatorStatus): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryValidatorResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryValidatorResponse): QueryValidatorResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryValidatorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryValidatorResponse; + static deserializeBinaryFromReader(message: QueryValidatorResponse, reader: jspb.BinaryReader): QueryValidatorResponse; +} + +export namespace QueryValidatorResponse { + export type AsObject = { + status?: band_oracle_v1_oracle_pb.ValidatorStatus.AsObject, + } +} + +export class QueryIsReporterRequest extends jspb.Message { + getValidatorAddress(): string; + setValidatorAddress(value: string): void; + + getReporterAddress(): string; + setReporterAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIsReporterRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryIsReporterRequest): QueryIsReporterRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIsReporterRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIsReporterRequest; + static deserializeBinaryFromReader(message: QueryIsReporterRequest, reader: jspb.BinaryReader): QueryIsReporterRequest; +} + +export namespace QueryIsReporterRequest { + export type AsObject = { + validatorAddress: string, + reporterAddress: string, + } +} + +export class QueryIsReporterResponse extends jspb.Message { + getIsReporter(): boolean; + setIsReporter(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIsReporterResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryIsReporterResponse): QueryIsReporterResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIsReporterResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIsReporterResponse; + static deserializeBinaryFromReader(message: QueryIsReporterResponse, reader: jspb.BinaryReader): QueryIsReporterResponse; +} + +export namespace QueryIsReporterResponse { + export type AsObject = { + isReporter: boolean, + } +} + +export class QueryReportersRequest extends jspb.Message { + getValidatorAddress(): string; + setValidatorAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryReportersRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryReportersRequest): QueryReportersRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryReportersRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryReportersRequest; + static deserializeBinaryFromReader(message: QueryReportersRequest, reader: jspb.BinaryReader): QueryReportersRequest; +} + +export namespace QueryReportersRequest { + export type AsObject = { + validatorAddress: string, + } +} + +export class QueryReportersResponse extends jspb.Message { + clearReporterList(): void; + getReporterList(): Array; + setReporterList(value: Array): void; + addReporter(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryReportersResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryReportersResponse): QueryReportersResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryReportersResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryReportersResponse; + static deserializeBinaryFromReader(message: QueryReportersResponse, reader: jspb.BinaryReader): QueryReportersResponse; +} + +export namespace QueryReportersResponse { + export type AsObject = { + reporterList: Array, + } +} + +export class QueryActiveValidatorsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryActiveValidatorsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryActiveValidatorsRequest): QueryActiveValidatorsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryActiveValidatorsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryActiveValidatorsRequest; + static deserializeBinaryFromReader(message: QueryActiveValidatorsRequest, reader: jspb.BinaryReader): QueryActiveValidatorsRequest; +} + +export namespace QueryActiveValidatorsRequest { + export type AsObject = { + } +} + +export class QueryActiveValidatorsResponse extends jspb.Message { + clearValidatorsList(): void; + getValidatorsList(): Array; + setValidatorsList(value: Array): void; + addValidators(value?: band_oracle_v1_oracle_pb.ActiveValidator, index?: number): band_oracle_v1_oracle_pb.ActiveValidator; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryActiveValidatorsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryActiveValidatorsResponse): QueryActiveValidatorsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryActiveValidatorsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryActiveValidatorsResponse; + static deserializeBinaryFromReader(message: QueryActiveValidatorsResponse, reader: jspb.BinaryReader): QueryActiveValidatorsResponse; +} + +export namespace QueryActiveValidatorsResponse { + export type AsObject = { + validatorsList: Array, + } +} + +export class QueryRequestSearchRequest extends jspb.Message { + getOracleScriptId(): number; + setOracleScriptId(value: number): void; + + getCalldata(): string; + setCalldata(value: string): void; + + getAskCount(): number; + setAskCount(value: number): void; + + getMinCount(): number; + setMinCount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequestSearchRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequestSearchRequest): QueryRequestSearchRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequestSearchRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequestSearchRequest; + static deserializeBinaryFromReader(message: QueryRequestSearchRequest, reader: jspb.BinaryReader): QueryRequestSearchRequest; +} + +export namespace QueryRequestSearchRequest { + export type AsObject = { + oracleScriptId: number, + calldata: string, + askCount: number, + minCount: number, + } +} + +export class QueryRequestSearchResponse extends jspb.Message { + hasRequest(): boolean; + clearRequest(): void; + getRequest(): QueryRequestResponse | undefined; + setRequest(value?: QueryRequestResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequestSearchResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequestSearchResponse): QueryRequestSearchResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequestSearchResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequestSearchResponse; + static deserializeBinaryFromReader(message: QueryRequestSearchResponse, reader: jspb.BinaryReader): QueryRequestSearchResponse; +} + +export namespace QueryRequestSearchResponse { + export type AsObject = { + request?: QueryRequestResponse.AsObject, + } +} + +export class QueryRequestPriceRequest extends jspb.Message { + clearSymbolsList(): void; + getSymbolsList(): Array; + setSymbolsList(value: Array): void; + addSymbols(value: string, index?: number): string; + + getAskCount(): number; + setAskCount(value: number): void; + + getMinCount(): number; + setMinCount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequestPriceRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequestPriceRequest): QueryRequestPriceRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequestPriceRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequestPriceRequest; + static deserializeBinaryFromReader(message: QueryRequestPriceRequest, reader: jspb.BinaryReader): QueryRequestPriceRequest; +} + +export namespace QueryRequestPriceRequest { + export type AsObject = { + symbolsList: Array, + askCount: number, + minCount: number, + } +} + +export class QueryRequestPriceResponse extends jspb.Message { + clearPriceResultsList(): void; + getPriceResultsList(): Array; + setPriceResultsList(value: Array): void; + addPriceResults(value?: band_oracle_v1_oracle_pb.PriceResult, index?: number): band_oracle_v1_oracle_pb.PriceResult; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequestPriceResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequestPriceResponse): QueryRequestPriceResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequestPriceResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequestPriceResponse; + static deserializeBinaryFromReader(message: QueryRequestPriceResponse, reader: jspb.BinaryReader): QueryRequestPriceResponse; +} + +export namespace QueryRequestPriceResponse { + export type AsObject = { + priceResultsList: Array, + } +} + +export class QueryRequestVerificationRequest extends jspb.Message { + getChainId(): string; + setChainId(value: string): void; + + getValidator(): string; + setValidator(value: string): void; + + getRequestId(): number; + setRequestId(value: number): void; + + getExternalId(): number; + setExternalId(value: number): void; + + getDataSourceId(): number; + setDataSourceId(value: number): void; + + getReporter(): string; + setReporter(value: string): void; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): void; + + getMaxDelay(): number; + setMaxDelay(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequestVerificationRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequestVerificationRequest): QueryRequestVerificationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequestVerificationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequestVerificationRequest; + static deserializeBinaryFromReader(message: QueryRequestVerificationRequest, reader: jspb.BinaryReader): QueryRequestVerificationRequest; +} + +export namespace QueryRequestVerificationRequest { + export type AsObject = { + chainId: string, + validator: string, + requestId: number, + externalId: number, + dataSourceId: number, + reporter: string, + signature: Uint8Array | string, + maxDelay: number, + } +} + +export class QueryRequestVerificationResponse extends jspb.Message { + getChainId(): string; + setChainId(value: string): void; + + getValidator(): string; + setValidator(value: string): void; + + getRequestId(): number; + setRequestId(value: number): void; + + getExternalId(): number; + setExternalId(value: number): void; + + getDataSourceId(): number; + setDataSourceId(value: number): void; + + getIsDelay(): boolean; + setIsDelay(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequestVerificationResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequestVerificationResponse): QueryRequestVerificationResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequestVerificationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequestVerificationResponse; + static deserializeBinaryFromReader(message: QueryRequestVerificationResponse, reader: jspb.BinaryReader): QueryRequestVerificationResponse; +} + +export namespace QueryRequestVerificationResponse { + export type AsObject = { + chainId: string, + validator: string, + requestId: number, + externalId: number, + dataSourceId: number, + isDelay: boolean, + } +} + diff --git a/codegen/band/oracle/v1/query_pb.js b/codegen/band/oracle/v1/query_pb.js new file mode 100644 index 0000000..2793706 --- /dev/null +++ b/codegen/band/oracle/v1/query_pb.js @@ -0,0 +1,5271 @@ +// source: band/oracle/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var band_oracle_v1_oracle_pb = require('../../../band/oracle/v1/oracle_pb.js'); +goog.object.extend(proto, band_oracle_v1_oracle_pb); +goog.exportSymbol('proto.band.oracle.v1.QueryActiveValidatorsRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryActiveValidatorsResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryCountsRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryCountsResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryDataRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryDataResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryDataSourceRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryDataSourceResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryIsReporterRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryIsReporterResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryOracleScriptRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryOracleScriptResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryPendingRequestsRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryPendingRequestsResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryReportersRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryReportersResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryRequestPriceRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryRequestPriceResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryRequestRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryRequestResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryRequestSearchRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryRequestSearchResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryRequestVerificationRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryRequestVerificationResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryValidatorRequest', null, global); +goog.exportSymbol('proto.band.oracle.v1.QueryValidatorResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryCountsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryCountsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryCountsRequest.displayName = 'proto.band.oracle.v1.QueryCountsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryCountsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryCountsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryCountsResponse.displayName = 'proto.band.oracle.v1.QueryCountsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryDataRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryDataRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryDataRequest.displayName = 'proto.band.oracle.v1.QueryDataRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryDataResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryDataResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryDataResponse.displayName = 'proto.band.oracle.v1.QueryDataResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryDataSourceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryDataSourceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryDataSourceRequest.displayName = 'proto.band.oracle.v1.QueryDataSourceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryDataSourceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryDataSourceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryDataSourceResponse.displayName = 'proto.band.oracle.v1.QueryDataSourceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryOracleScriptRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryOracleScriptRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryOracleScriptRequest.displayName = 'proto.band.oracle.v1.QueryOracleScriptRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryOracleScriptResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryOracleScriptResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryOracleScriptResponse.displayName = 'proto.band.oracle.v1.QueryOracleScriptResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryRequestRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryRequestRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryRequestRequest.displayName = 'proto.band.oracle.v1.QueryRequestRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryRequestResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.QueryRequestResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.QueryRequestResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryRequestResponse.displayName = 'proto.band.oracle.v1.QueryRequestResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryPendingRequestsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryPendingRequestsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryPendingRequestsRequest.displayName = 'proto.band.oracle.v1.QueryPendingRequestsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryPendingRequestsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.QueryPendingRequestsResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.QueryPendingRequestsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryPendingRequestsResponse.displayName = 'proto.band.oracle.v1.QueryPendingRequestsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryParamsRequest.displayName = 'proto.band.oracle.v1.QueryParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryParamsResponse.displayName = 'proto.band.oracle.v1.QueryParamsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryValidatorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryValidatorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryValidatorRequest.displayName = 'proto.band.oracle.v1.QueryValidatorRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryValidatorResponse.displayName = 'proto.band.oracle.v1.QueryValidatorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryIsReporterRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryIsReporterRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryIsReporterRequest.displayName = 'proto.band.oracle.v1.QueryIsReporterRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryIsReporterResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryIsReporterResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryIsReporterResponse.displayName = 'proto.band.oracle.v1.QueryIsReporterResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryReportersRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryReportersRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryReportersRequest.displayName = 'proto.band.oracle.v1.QueryReportersRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryReportersResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.QueryReportersResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.QueryReportersResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryReportersResponse.displayName = 'proto.band.oracle.v1.QueryReportersResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryActiveValidatorsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryActiveValidatorsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryActiveValidatorsRequest.displayName = 'proto.band.oracle.v1.QueryActiveValidatorsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.QueryActiveValidatorsResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.QueryActiveValidatorsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryActiveValidatorsResponse.displayName = 'proto.band.oracle.v1.QueryActiveValidatorsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryRequestSearchRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryRequestSearchRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryRequestSearchRequest.displayName = 'proto.band.oracle.v1.QueryRequestSearchRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryRequestSearchResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryRequestSearchResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryRequestSearchResponse.displayName = 'proto.band.oracle.v1.QueryRequestSearchResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryRequestPriceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.QueryRequestPriceRequest.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.QueryRequestPriceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryRequestPriceRequest.displayName = 'proto.band.oracle.v1.QueryRequestPriceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryRequestPriceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.QueryRequestPriceResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.QueryRequestPriceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryRequestPriceResponse.displayName = 'proto.band.oracle.v1.QueryRequestPriceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryRequestVerificationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryRequestVerificationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryRequestVerificationRequest.displayName = 'proto.band.oracle.v1.QueryRequestVerificationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.QueryRequestVerificationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.QueryRequestVerificationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.QueryRequestVerificationResponse.displayName = 'proto.band.oracle.v1.QueryRequestVerificationResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryCountsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryCountsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryCountsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryCountsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryCountsRequest} + */ +proto.band.oracle.v1.QueryCountsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryCountsRequest; + return proto.band.oracle.v1.QueryCountsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryCountsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryCountsRequest} + */ +proto.band.oracle.v1.QueryCountsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryCountsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryCountsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryCountsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryCountsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryCountsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryCountsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryCountsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryCountsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + dataSourceCount: jspb.Message.getFieldWithDefault(msg, 1, 0), + oracleScriptCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + requestCount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryCountsResponse} + */ +proto.band.oracle.v1.QueryCountsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryCountsResponse; + return proto.band.oracle.v1.QueryCountsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryCountsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryCountsResponse} + */ +proto.band.oracle.v1.QueryCountsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDataSourceCount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOracleScriptCount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryCountsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryCountsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryCountsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryCountsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataSourceCount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getOracleScriptCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getRequestCount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional uint64 data_source_count = 1; + * @return {number} + */ +proto.band.oracle.v1.QueryCountsResponse.prototype.getDataSourceCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryCountsResponse} returns this + */ +proto.band.oracle.v1.QueryCountsResponse.prototype.setDataSourceCount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 oracle_script_count = 2; + * @return {number} + */ +proto.band.oracle.v1.QueryCountsResponse.prototype.getOracleScriptCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryCountsResponse} returns this + */ +proto.band.oracle.v1.QueryCountsResponse.prototype.setOracleScriptCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 request_count = 3; + * @return {number} + */ +proto.band.oracle.v1.QueryCountsResponse.prototype.getRequestCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryCountsResponse} returns this + */ +proto.band.oracle.v1.QueryCountsResponse.prototype.setRequestCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryDataRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryDataRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryDataRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryDataRequest.toObject = function(includeInstance, msg) { + var f, obj = { + dataHash: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryDataRequest} + */ +proto.band.oracle.v1.QueryDataRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryDataRequest; + return proto.band.oracle.v1.QueryDataRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryDataRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryDataRequest} + */ +proto.band.oracle.v1.QueryDataRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDataHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryDataRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryDataRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryDataRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryDataRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string data_hash = 1; + * @return {string} + */ +proto.band.oracle.v1.QueryDataRequest.prototype.getDataHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryDataRequest} returns this + */ +proto.band.oracle.v1.QueryDataRequest.prototype.setDataHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryDataResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryDataResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryDataResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryDataResponse.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryDataResponse} + */ +proto.band.oracle.v1.QueryDataResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryDataResponse; + return proto.band.oracle.v1.QueryDataResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryDataResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryDataResponse} + */ +proto.band.oracle.v1.QueryDataResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryDataResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryDataResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryDataResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryDataResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.QueryDataResponse.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.band.oracle.v1.QueryDataResponse.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryDataResponse.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.QueryDataResponse} returns this + */ +proto.band.oracle.v1.QueryDataResponse.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryDataSourceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryDataSourceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryDataSourceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryDataSourceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + dataSourceId: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryDataSourceRequest} + */ +proto.band.oracle.v1.QueryDataSourceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryDataSourceRequest; + return proto.band.oracle.v1.QueryDataSourceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryDataSourceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryDataSourceRequest} + */ +proto.band.oracle.v1.QueryDataSourceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDataSourceId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryDataSourceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryDataSourceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryDataSourceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryDataSourceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataSourceId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 data_source_id = 1; + * @return {number} + */ +proto.band.oracle.v1.QueryDataSourceRequest.prototype.getDataSourceId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryDataSourceRequest} returns this + */ +proto.band.oracle.v1.QueryDataSourceRequest.prototype.setDataSourceId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryDataSourceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryDataSourceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryDataSourceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryDataSourceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + dataSource: (f = msg.getDataSource()) && band_oracle_v1_oracle_pb.DataSource.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryDataSourceResponse} + */ +proto.band.oracle.v1.QueryDataSourceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryDataSourceResponse; + return proto.band.oracle.v1.QueryDataSourceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryDataSourceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryDataSourceResponse} + */ +proto.band.oracle.v1.QueryDataSourceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_oracle_v1_oracle_pb.DataSource; + reader.readMessage(value,band_oracle_v1_oracle_pb.DataSource.deserializeBinaryFromReader); + msg.setDataSource(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryDataSourceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryDataSourceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryDataSourceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryDataSourceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataSource(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_oracle_v1_oracle_pb.DataSource.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DataSource data_source = 1; + * @return {?proto.band.oracle.v1.DataSource} + */ +proto.band.oracle.v1.QueryDataSourceResponse.prototype.getDataSource = function() { + return /** @type{?proto.band.oracle.v1.DataSource} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.DataSource, 1)); +}; + + +/** + * @param {?proto.band.oracle.v1.DataSource|undefined} value + * @return {!proto.band.oracle.v1.QueryDataSourceResponse} returns this +*/ +proto.band.oracle.v1.QueryDataSourceResponse.prototype.setDataSource = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.QueryDataSourceResponse} returns this + */ +proto.band.oracle.v1.QueryDataSourceResponse.prototype.clearDataSource = function() { + return this.setDataSource(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.QueryDataSourceResponse.prototype.hasDataSource = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryOracleScriptRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryOracleScriptRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryOracleScriptRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryOracleScriptRequest.toObject = function(includeInstance, msg) { + var f, obj = { + oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryOracleScriptRequest} + */ +proto.band.oracle.v1.QueryOracleScriptRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryOracleScriptRequest; + return proto.band.oracle.v1.QueryOracleScriptRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryOracleScriptRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryOracleScriptRequest} + */ +proto.band.oracle.v1.QueryOracleScriptRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOracleScriptId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryOracleScriptRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryOracleScriptRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryOracleScriptRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryOracleScriptRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOracleScriptId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 oracle_script_id = 1; + * @return {number} + */ +proto.band.oracle.v1.QueryOracleScriptRequest.prototype.getOracleScriptId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryOracleScriptRequest} returns this + */ +proto.band.oracle.v1.QueryOracleScriptRequest.prototype.setOracleScriptId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryOracleScriptResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryOracleScriptResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryOracleScriptResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryOracleScriptResponse.toObject = function(includeInstance, msg) { + var f, obj = { + oracleScript: (f = msg.getOracleScript()) && band_oracle_v1_oracle_pb.OracleScript.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryOracleScriptResponse} + */ +proto.band.oracle.v1.QueryOracleScriptResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryOracleScriptResponse; + return proto.band.oracle.v1.QueryOracleScriptResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryOracleScriptResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryOracleScriptResponse} + */ +proto.band.oracle.v1.QueryOracleScriptResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_oracle_v1_oracle_pb.OracleScript; + reader.readMessage(value,band_oracle_v1_oracle_pb.OracleScript.deserializeBinaryFromReader); + msg.setOracleScript(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryOracleScriptResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryOracleScriptResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryOracleScriptResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryOracleScriptResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOracleScript(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_oracle_v1_oracle_pb.OracleScript.serializeBinaryToWriter + ); + } +}; + + +/** + * optional OracleScript oracle_script = 1; + * @return {?proto.band.oracle.v1.OracleScript} + */ +proto.band.oracle.v1.QueryOracleScriptResponse.prototype.getOracleScript = function() { + return /** @type{?proto.band.oracle.v1.OracleScript} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.OracleScript, 1)); +}; + + +/** + * @param {?proto.band.oracle.v1.OracleScript|undefined} value + * @return {!proto.band.oracle.v1.QueryOracleScriptResponse} returns this +*/ +proto.band.oracle.v1.QueryOracleScriptResponse.prototype.setOracleScript = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.QueryOracleScriptResponse} returns this + */ +proto.band.oracle.v1.QueryOracleScriptResponse.prototype.clearOracleScript = function() { + return this.setOracleScript(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.QueryOracleScriptResponse.prototype.hasOracleScript = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryRequestRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryRequestRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryRequestRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryRequestRequest} + */ +proto.band.oracle.v1.QueryRequestRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryRequestRequest; + return proto.band.oracle.v1.QueryRequestRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryRequestRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryRequestRequest} + */ +proto.band.oracle.v1.QueryRequestRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryRequestRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryRequestRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryRequestRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 request_id = 1; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestRequest.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestRequest} returns this + */ +proto.band.oracle.v1.QueryRequestRequest.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.QueryRequestResponse.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryRequestResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryRequestResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestResponse.toObject = function(includeInstance, msg) { + var f, obj = { + request: (f = msg.getRequest()) && band_oracle_v1_oracle_pb.Request.toObject(includeInstance, f), + reportsList: jspb.Message.toObjectList(msg.getReportsList(), + band_oracle_v1_oracle_pb.Report.toObject, includeInstance), + result: (f = msg.getResult()) && band_oracle_v1_oracle_pb.Result.toObject(includeInstance, f), + signing: (f = msg.getSigning()) && band_oracle_v1_oracle_pb.SigningResult.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryRequestResponse} + */ +proto.band.oracle.v1.QueryRequestResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryRequestResponse; + return proto.band.oracle.v1.QueryRequestResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryRequestResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryRequestResponse} + */ +proto.band.oracle.v1.QueryRequestResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_oracle_v1_oracle_pb.Request; + reader.readMessage(value,band_oracle_v1_oracle_pb.Request.deserializeBinaryFromReader); + msg.setRequest(value); + break; + case 2: + var value = new band_oracle_v1_oracle_pb.Report; + reader.readMessage(value,band_oracle_v1_oracle_pb.Report.deserializeBinaryFromReader); + msg.addReports(value); + break; + case 3: + var value = new band_oracle_v1_oracle_pb.Result; + reader.readMessage(value,band_oracle_v1_oracle_pb.Result.deserializeBinaryFromReader); + msg.setResult(value); + break; + case 4: + var value = new band_oracle_v1_oracle_pb.SigningResult; + reader.readMessage(value,band_oracle_v1_oracle_pb.SigningResult.deserializeBinaryFromReader); + msg.setSigning(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryRequestResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryRequestResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_oracle_v1_oracle_pb.Request.serializeBinaryToWriter + ); + } + f = message.getReportsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_oracle_v1_oracle_pb.Report.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 3, + f, + band_oracle_v1_oracle_pb.Result.serializeBinaryToWriter + ); + } + f = message.getSigning(); + if (f != null) { + writer.writeMessage( + 4, + f, + band_oracle_v1_oracle_pb.SigningResult.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Request request = 1; + * @return {?proto.band.oracle.v1.Request} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.getRequest = function() { + return /** @type{?proto.band.oracle.v1.Request} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.Request, 1)); +}; + + +/** + * @param {?proto.band.oracle.v1.Request|undefined} value + * @return {!proto.band.oracle.v1.QueryRequestResponse} returns this +*/ +proto.band.oracle.v1.QueryRequestResponse.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.QueryRequestResponse} returns this + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.hasRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Report reports = 2; + * @return {!Array} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.getReportsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_oracle_v1_oracle_pb.Report, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.QueryRequestResponse} returns this +*/ +proto.band.oracle.v1.QueryRequestResponse.prototype.setReportsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.oracle.v1.Report=} opt_value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.Report} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.addReports = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.oracle.v1.Report, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.QueryRequestResponse} returns this + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.clearReportsList = function() { + return this.setReportsList([]); +}; + + +/** + * optional Result result = 3; + * @return {?proto.band.oracle.v1.Result} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.getResult = function() { + return /** @type{?proto.band.oracle.v1.Result} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.Result, 3)); +}; + + +/** + * @param {?proto.band.oracle.v1.Result|undefined} value + * @return {!proto.band.oracle.v1.QueryRequestResponse} returns this +*/ +proto.band.oracle.v1.QueryRequestResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.QueryRequestResponse} returns this + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.hasResult = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional SigningResult signing = 4; + * @return {?proto.band.oracle.v1.SigningResult} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.getSigning = function() { + return /** @type{?proto.band.oracle.v1.SigningResult} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.SigningResult, 4)); +}; + + +/** + * @param {?proto.band.oracle.v1.SigningResult|undefined} value + * @return {!proto.band.oracle.v1.QueryRequestResponse} returns this +*/ +proto.band.oracle.v1.QueryRequestResponse.prototype.setSigning = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.QueryRequestResponse} returns this + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.clearSigning = function() { + return this.setSigning(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.QueryRequestResponse.prototype.hasSigning = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryPendingRequestsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryPendingRequestsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryPendingRequestsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryPendingRequestsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryPendingRequestsRequest} + */ +proto.band.oracle.v1.QueryPendingRequestsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryPendingRequestsRequest; + return proto.band.oracle.v1.QueryPendingRequestsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryPendingRequestsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryPendingRequestsRequest} + */ +proto.band.oracle.v1.QueryPendingRequestsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryPendingRequestsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryPendingRequestsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryPendingRequestsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryPendingRequestsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.band.oracle.v1.QueryPendingRequestsRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryPendingRequestsRequest} returns this + */ +proto.band.oracle.v1.QueryPendingRequestsRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryPendingRequestsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryPendingRequestsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryPendingRequestsResponse} + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryPendingRequestsResponse; + return proto.band.oracle.v1.QueryPendingRequestsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryPendingRequestsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryPendingRequestsResponse} + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addRequestIds(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryPendingRequestsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryPendingRequestsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestIdsList(); + if (f.length > 0) { + writer.writePackedUint64( + 1, + f + ); + } +}; + + +/** + * repeated uint64 request_ids = 1; + * @return {!Array} + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.prototype.getRequestIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.QueryPendingRequestsResponse} returns this + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.prototype.setRequestIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.QueryPendingRequestsResponse} returns this + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.prototype.addRequestIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.QueryPendingRequestsResponse} returns this + */ +proto.band.oracle.v1.QueryPendingRequestsResponse.prototype.clearRequestIdsList = function() { + return this.setRequestIdsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryParamsRequest} + */ +proto.band.oracle.v1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryParamsRequest; + return proto.band.oracle.v1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryParamsRequest} + */ +proto.band.oracle.v1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && band_oracle_v1_oracle_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryParamsResponse} + */ +proto.band.oracle.v1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryParamsResponse; + return proto.band.oracle.v1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryParamsResponse} + */ +proto.band.oracle.v1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_oracle_v1_oracle_pb.Params; + reader.readMessage(value,band_oracle_v1_oracle_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_oracle_v1_oracle_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.oracle.v1.Params} + */ +proto.band.oracle.v1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.band.oracle.v1.Params} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.Params, 1)); +}; + + +/** + * @param {?proto.band.oracle.v1.Params|undefined} value + * @return {!proto.band.oracle.v1.QueryParamsResponse} returns this +*/ +proto.band.oracle.v1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.QueryParamsResponse} returns this + */ +proto.band.oracle.v1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryValidatorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryValidatorRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryValidatorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryValidatorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryValidatorRequest} + */ +proto.band.oracle.v1.QueryValidatorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryValidatorRequest; + return proto.band.oracle.v1.QueryValidatorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryValidatorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryValidatorRequest} + */ +proto.band.oracle.v1.QueryValidatorRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryValidatorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryValidatorRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryValidatorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryValidatorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.band.oracle.v1.QueryValidatorRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryValidatorRequest} returns this + */ +proto.band.oracle.v1.QueryValidatorRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryValidatorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryValidatorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: (f = msg.getStatus()) && band_oracle_v1_oracle_pb.ValidatorStatus.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryValidatorResponse} + */ +proto.band.oracle.v1.QueryValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryValidatorResponse; + return proto.band.oracle.v1.QueryValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryValidatorResponse} + */ +proto.band.oracle.v1.QueryValidatorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_oracle_v1_oracle_pb.ValidatorStatus; + reader.readMessage(value,band_oracle_v1_oracle_pb.ValidatorStatus.deserializeBinaryFromReader); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryValidatorResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryValidatorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_oracle_v1_oracle_pb.ValidatorStatus.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ValidatorStatus status = 1; + * @return {?proto.band.oracle.v1.ValidatorStatus} + */ +proto.band.oracle.v1.QueryValidatorResponse.prototype.getStatus = function() { + return /** @type{?proto.band.oracle.v1.ValidatorStatus} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.ValidatorStatus, 1)); +}; + + +/** + * @param {?proto.band.oracle.v1.ValidatorStatus|undefined} value + * @return {!proto.band.oracle.v1.QueryValidatorResponse} returns this +*/ +proto.band.oracle.v1.QueryValidatorResponse.prototype.setStatus = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.QueryValidatorResponse} returns this + */ +proto.band.oracle.v1.QueryValidatorResponse.prototype.clearStatus = function() { + return this.setStatus(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.QueryValidatorResponse.prototype.hasStatus = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryIsReporterRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryIsReporterRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryIsReporterRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryIsReporterRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + reporterAddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryIsReporterRequest} + */ +proto.band.oracle.v1.QueryIsReporterRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryIsReporterRequest; + return proto.band.oracle.v1.QueryIsReporterRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryIsReporterRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryIsReporterRequest} + */ +proto.band.oracle.v1.QueryIsReporterRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setReporterAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryIsReporterRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryIsReporterRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryIsReporterRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryIsReporterRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReporterAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.band.oracle.v1.QueryIsReporterRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryIsReporterRequest} returns this + */ +proto.band.oracle.v1.QueryIsReporterRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string reporter_address = 2; + * @return {string} + */ +proto.band.oracle.v1.QueryIsReporterRequest.prototype.getReporterAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryIsReporterRequest} returns this + */ +proto.band.oracle.v1.QueryIsReporterRequest.prototype.setReporterAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryIsReporterResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryIsReporterResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryIsReporterResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryIsReporterResponse.toObject = function(includeInstance, msg) { + var f, obj = { + isReporter: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryIsReporterResponse} + */ +proto.band.oracle.v1.QueryIsReporterResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryIsReporterResponse; + return proto.band.oracle.v1.QueryIsReporterResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryIsReporterResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryIsReporterResponse} + */ +proto.band.oracle.v1.QueryIsReporterResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsReporter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryIsReporterResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryIsReporterResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryIsReporterResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryIsReporterResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsReporter(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool is_reporter = 1; + * @return {boolean} + */ +proto.band.oracle.v1.QueryIsReporterResponse.prototype.getIsReporter = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.oracle.v1.QueryIsReporterResponse} returns this + */ +proto.band.oracle.v1.QueryIsReporterResponse.prototype.setIsReporter = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryReportersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryReportersRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryReportersRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryReportersRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryReportersRequest} + */ +proto.band.oracle.v1.QueryReportersRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryReportersRequest; + return proto.band.oracle.v1.QueryReportersRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryReportersRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryReportersRequest} + */ +proto.band.oracle.v1.QueryReportersRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryReportersRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryReportersRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryReportersRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryReportersRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.band.oracle.v1.QueryReportersRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryReportersRequest} returns this + */ +proto.band.oracle.v1.QueryReportersRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.QueryReportersResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryReportersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryReportersResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryReportersResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryReportersResponse.toObject = function(includeInstance, msg) { + var f, obj = { + reporterList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryReportersResponse} + */ +proto.band.oracle.v1.QueryReportersResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryReportersResponse; + return proto.band.oracle.v1.QueryReportersResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryReportersResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryReportersResponse} + */ +proto.band.oracle.v1.QueryReportersResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addReporter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryReportersResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryReportersResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryReportersResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryReportersResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReporterList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string reporter = 1; + * @return {!Array} + */ +proto.band.oracle.v1.QueryReportersResponse.prototype.getReporterList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.QueryReportersResponse} returns this + */ +proto.band.oracle.v1.QueryReportersResponse.prototype.setReporterList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.QueryReportersResponse} returns this + */ +proto.band.oracle.v1.QueryReportersResponse.prototype.addReporter = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.QueryReportersResponse} returns this + */ +proto.band.oracle.v1.QueryReportersResponse.prototype.clearReporterList = function() { + return this.setReporterList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryActiveValidatorsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryActiveValidatorsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryActiveValidatorsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryActiveValidatorsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryActiveValidatorsRequest} + */ +proto.band.oracle.v1.QueryActiveValidatorsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryActiveValidatorsRequest; + return proto.band.oracle.v1.QueryActiveValidatorsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryActiveValidatorsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryActiveValidatorsRequest} + */ +proto.band.oracle.v1.QueryActiveValidatorsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryActiveValidatorsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryActiveValidatorsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryActiveValidatorsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryActiveValidatorsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryActiveValidatorsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryActiveValidatorsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + band_oracle_v1_oracle_pb.ActiveValidator.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryActiveValidatorsResponse} + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryActiveValidatorsResponse; + return proto.band.oracle.v1.QueryActiveValidatorsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryActiveValidatorsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryActiveValidatorsResponse} + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_oracle_v1_oracle_pb.ActiveValidator; + reader.readMessage(value,band_oracle_v1_oracle_pb.ActiveValidator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryActiveValidatorsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryActiveValidatorsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_oracle_v1_oracle_pb.ActiveValidator.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ActiveValidator validators = 1; + * @return {!Array} + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_oracle_v1_oracle_pb.ActiveValidator, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.QueryActiveValidatorsResponse} returns this +*/ +proto.band.oracle.v1.QueryActiveValidatorsResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.oracle.v1.ActiveValidator=} opt_value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.ActiveValidator} + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.oracle.v1.ActiveValidator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.QueryActiveValidatorsResponse} returns this + */ +proto.band.oracle.v1.QueryActiveValidatorsResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryRequestSearchRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryRequestSearchRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestSearchRequest.toObject = function(includeInstance, msg) { + var f, obj = { + oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), + calldata: jspb.Message.getFieldWithDefault(msg, 2, ""), + askCount: jspb.Message.getFieldWithDefault(msg, 3, 0), + minCount: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryRequestSearchRequest} + */ +proto.band.oracle.v1.QueryRequestSearchRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryRequestSearchRequest; + return proto.band.oracle.v1.QueryRequestSearchRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryRequestSearchRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryRequestSearchRequest} + */ +proto.band.oracle.v1.QueryRequestSearchRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOracleScriptId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCalldata(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAskCount(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryRequestSearchRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryRequestSearchRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestSearchRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOracleScriptId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCalldata(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAskCount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getMinCount(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional uint64 oracle_script_id = 1; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.getOracleScriptId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestSearchRequest} returns this + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.setOracleScriptId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string calldata = 2; + * @return {string} + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.getCalldata = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryRequestSearchRequest} returns this + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.setCalldata = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 ask_count = 3; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.getAskCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestSearchRequest} returns this + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.setAskCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 min_count = 4; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.getMinCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestSearchRequest} returns this + */ +proto.band.oracle.v1.QueryRequestSearchRequest.prototype.setMinCount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryRequestSearchResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryRequestSearchResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryRequestSearchResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestSearchResponse.toObject = function(includeInstance, msg) { + var f, obj = { + request: (f = msg.getRequest()) && proto.band.oracle.v1.QueryRequestResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryRequestSearchResponse} + */ +proto.band.oracle.v1.QueryRequestSearchResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryRequestSearchResponse; + return proto.band.oracle.v1.QueryRequestSearchResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryRequestSearchResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryRequestSearchResponse} + */ +proto.band.oracle.v1.QueryRequestSearchResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.oracle.v1.QueryRequestResponse; + reader.readMessage(value,proto.band.oracle.v1.QueryRequestResponse.deserializeBinaryFromReader); + msg.setRequest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryRequestSearchResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryRequestSearchResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryRequestSearchResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestSearchResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.oracle.v1.QueryRequestResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional QueryRequestResponse request = 1; + * @return {?proto.band.oracle.v1.QueryRequestResponse} + */ +proto.band.oracle.v1.QueryRequestSearchResponse.prototype.getRequest = function() { + return /** @type{?proto.band.oracle.v1.QueryRequestResponse} */ ( + jspb.Message.getWrapperField(this, proto.band.oracle.v1.QueryRequestResponse, 1)); +}; + + +/** + * @param {?proto.band.oracle.v1.QueryRequestResponse|undefined} value + * @return {!proto.band.oracle.v1.QueryRequestSearchResponse} returns this +*/ +proto.band.oracle.v1.QueryRequestSearchResponse.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.QueryRequestSearchResponse} returns this + */ +proto.band.oracle.v1.QueryRequestSearchResponse.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.QueryRequestSearchResponse.prototype.hasRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.QueryRequestPriceRequest.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryRequestPriceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryRequestPriceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestPriceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + symbolsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + askCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + minCount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryRequestPriceRequest} + */ +proto.band.oracle.v1.QueryRequestPriceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryRequestPriceRequest; + return proto.band.oracle.v1.QueryRequestPriceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryRequestPriceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryRequestPriceRequest} + */ +proto.band.oracle.v1.QueryRequestPriceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addSymbols(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAskCount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryRequestPriceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryRequestPriceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestPriceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbolsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getAskCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getMinCount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * repeated string symbols = 1; + * @return {!Array} + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.getSymbolsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.QueryRequestPriceRequest} returns this + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.setSymbolsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.QueryRequestPriceRequest} returns this + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.addSymbols = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.QueryRequestPriceRequest} returns this + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.clearSymbolsList = function() { + return this.setSymbolsList([]); +}; + + +/** + * optional uint64 ask_count = 2; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.getAskCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestPriceRequest} returns this + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.setAskCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 min_count = 3; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.getMinCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestPriceRequest} returns this + */ +proto.band.oracle.v1.QueryRequestPriceRequest.prototype.setMinCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.QueryRequestPriceResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryRequestPriceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryRequestPriceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryRequestPriceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestPriceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + priceResultsList: jspb.Message.toObjectList(msg.getPriceResultsList(), + band_oracle_v1_oracle_pb.PriceResult.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryRequestPriceResponse} + */ +proto.band.oracle.v1.QueryRequestPriceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryRequestPriceResponse; + return proto.band.oracle.v1.QueryRequestPriceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryRequestPriceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryRequestPriceResponse} + */ +proto.band.oracle.v1.QueryRequestPriceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_oracle_v1_oracle_pb.PriceResult; + reader.readMessage(value,band_oracle_v1_oracle_pb.PriceResult.deserializeBinaryFromReader); + msg.addPriceResults(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryRequestPriceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryRequestPriceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryRequestPriceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestPriceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPriceResultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_oracle_v1_oracle_pb.PriceResult.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PriceResult price_results = 1; + * @return {!Array} + */ +proto.band.oracle.v1.QueryRequestPriceResponse.prototype.getPriceResultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_oracle_v1_oracle_pb.PriceResult, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.QueryRequestPriceResponse} returns this +*/ +proto.band.oracle.v1.QueryRequestPriceResponse.prototype.setPriceResultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.oracle.v1.PriceResult=} opt_value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.PriceResult} + */ +proto.band.oracle.v1.QueryRequestPriceResponse.prototype.addPriceResults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.oracle.v1.PriceResult, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.QueryRequestPriceResponse} returns this + */ +proto.band.oracle.v1.QueryRequestPriceResponse.prototype.clearPriceResultsList = function() { + return this.setPriceResultsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryRequestVerificationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryRequestVerificationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + validator: jspb.Message.getFieldWithDefault(msg, 2, ""), + requestId: jspb.Message.getFieldWithDefault(msg, 3, 0), + externalId: jspb.Message.getFieldWithDefault(msg, 4, 0), + dataSourceId: jspb.Message.getFieldWithDefault(msg, 5, 0), + reporter: jspb.Message.getFieldWithDefault(msg, 6, ""), + signature: msg.getSignature_asB64(), + maxDelay: jspb.Message.getFieldWithDefault(msg, 8, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryRequestVerificationRequest; + return proto.band.oracle.v1.QueryRequestVerificationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryRequestVerificationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidator(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExternalId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDataSourceId(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setReporter(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxDelay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryRequestVerificationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryRequestVerificationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getExternalId(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getDataSourceId(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getReporter(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getMaxDelay(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } +}; + + +/** + * optional string chain_id = 1; + * @return {string} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator = 2; + * @return {string} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getValidator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.setValidator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 request_id = 3; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 external_id = 4; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getExternalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.setExternalId = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 data_source_id = 5; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getDataSourceId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.setDataSourceId = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string reporter = 6; + * @return {string} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getReporter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.setReporter = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional bytes signature = 7; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes signature = 7; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional uint64 max_delay = 8; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.getMaxDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationRequest} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationRequest.prototype.setMaxDelay = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.QueryRequestVerificationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.QueryRequestVerificationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + validator: jspb.Message.getFieldWithDefault(msg, 2, ""), + requestId: jspb.Message.getFieldWithDefault(msg, 3, 0), + externalId: jspb.Message.getFieldWithDefault(msg, 4, 0), + dataSourceId: jspb.Message.getFieldWithDefault(msg, 5, 0), + isDelay: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.QueryRequestVerificationResponse} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.QueryRequestVerificationResponse; + return proto.band.oracle.v1.QueryRequestVerificationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.QueryRequestVerificationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.QueryRequestVerificationResponse} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidator(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExternalId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDataSourceId(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsDelay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.QueryRequestVerificationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.QueryRequestVerificationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getExternalId(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getDataSourceId(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getIsDelay(); + if (f) { + writer.writeBool( + 6, + f + ); + } +}; + + +/** + * optional string chain_id = 1; + * @return {string} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationResponse} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator = 2; + * @return {string} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.getValidator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationResponse} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.setValidator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 request_id = 3; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationResponse} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 external_id = 4; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.getExternalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationResponse} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.setExternalId = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 data_source_id = 5; + * @return {number} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.getDataSourceId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationResponse} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.setDataSourceId = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bool is_delay = 6; + * @return {boolean} + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.getIsDelay = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.oracle.v1.QueryRequestVerificationResponse} returns this + */ +proto.band.oracle.v1.QueryRequestVerificationResponse.prototype.setIsDelay = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +goog.object.extend(exports, proto.band.oracle.v1); diff --git a/codegen/band/oracle/v1/query_pb_service.d.ts b/codegen/band/oracle/v1/query_pb_service.d.ts new file mode 100644 index 0000000..c2fd4ff --- /dev/null +++ b/codegen/band/oracle/v1/query_pb_service.d.ts @@ -0,0 +1,310 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/query.proto + +import * as band_oracle_v1_query_pb from "../../../band/oracle/v1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryCounts = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryCountsRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryCountsResponse; +}; + +type QueryData = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryDataRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryDataResponse; +}; + +type QueryDataSource = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryDataSourceRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryDataSourceResponse; +}; + +type QueryOracleScript = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryOracleScriptRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryOracleScriptResponse; +}; + +type QueryRequest = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryRequestRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryRequestResponse; +}; + +type QueryPendingRequests = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryPendingRequestsRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryPendingRequestsResponse; +}; + +type QueryValidator = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryValidatorRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryValidatorResponse; +}; + +type QueryIsReporter = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryIsReporterRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryIsReporterResponse; +}; + +type QueryReporters = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryReportersRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryReportersResponse; +}; + +type QueryActiveValidators = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryActiveValidatorsRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryActiveValidatorsResponse; +}; + +type QueryParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryParamsRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryParamsResponse; +}; + +type QueryRequestSearch = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryRequestSearchRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryRequestSearchResponse; +}; + +type QueryRequestPrice = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryRequestPriceRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryRequestPriceResponse; +}; + +type QueryRequestVerification = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_query_pb.QueryRequestVerificationRequest; + readonly responseType: typeof band_oracle_v1_query_pb.QueryRequestVerificationResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly Counts: QueryCounts; + static readonly Data: QueryData; + static readonly DataSource: QueryDataSource; + static readonly OracleScript: QueryOracleScript; + static readonly Request: QueryRequest; + static readonly PendingRequests: QueryPendingRequests; + static readonly Validator: QueryValidator; + static readonly IsReporter: QueryIsReporter; + static readonly Reporters: QueryReporters; + static readonly ActiveValidators: QueryActiveValidators; + static readonly Params: QueryParams; + static readonly RequestSearch: QueryRequestSearch; + static readonly RequestPrice: QueryRequestPrice; + static readonly RequestVerification: QueryRequestVerification; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + counts( + requestMessage: band_oracle_v1_query_pb.QueryCountsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryCountsResponse|null) => void + ): UnaryResponse; + counts( + requestMessage: band_oracle_v1_query_pb.QueryCountsRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryCountsResponse|null) => void + ): UnaryResponse; + data( + requestMessage: band_oracle_v1_query_pb.QueryDataRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryDataResponse|null) => void + ): UnaryResponse; + data( + requestMessage: band_oracle_v1_query_pb.QueryDataRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryDataResponse|null) => void + ): UnaryResponse; + dataSource( + requestMessage: band_oracle_v1_query_pb.QueryDataSourceRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryDataSourceResponse|null) => void + ): UnaryResponse; + dataSource( + requestMessage: band_oracle_v1_query_pb.QueryDataSourceRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryDataSourceResponse|null) => void + ): UnaryResponse; + oracleScript( + requestMessage: band_oracle_v1_query_pb.QueryOracleScriptRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryOracleScriptResponse|null) => void + ): UnaryResponse; + oracleScript( + requestMessage: band_oracle_v1_query_pb.QueryOracleScriptRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryOracleScriptResponse|null) => void + ): UnaryResponse; + request( + requestMessage: band_oracle_v1_query_pb.QueryRequestRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryRequestResponse|null) => void + ): UnaryResponse; + request( + requestMessage: band_oracle_v1_query_pb.QueryRequestRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryRequestResponse|null) => void + ): UnaryResponse; + pendingRequests( + requestMessage: band_oracle_v1_query_pb.QueryPendingRequestsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryPendingRequestsResponse|null) => void + ): UnaryResponse; + pendingRequests( + requestMessage: band_oracle_v1_query_pb.QueryPendingRequestsRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryPendingRequestsResponse|null) => void + ): UnaryResponse; + validator( + requestMessage: band_oracle_v1_query_pb.QueryValidatorRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryValidatorResponse|null) => void + ): UnaryResponse; + validator( + requestMessage: band_oracle_v1_query_pb.QueryValidatorRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryValidatorResponse|null) => void + ): UnaryResponse; + isReporter( + requestMessage: band_oracle_v1_query_pb.QueryIsReporterRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryIsReporterResponse|null) => void + ): UnaryResponse; + isReporter( + requestMessage: band_oracle_v1_query_pb.QueryIsReporterRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryIsReporterResponse|null) => void + ): UnaryResponse; + reporters( + requestMessage: band_oracle_v1_query_pb.QueryReportersRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryReportersResponse|null) => void + ): UnaryResponse; + reporters( + requestMessage: band_oracle_v1_query_pb.QueryReportersRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryReportersResponse|null) => void + ): UnaryResponse; + activeValidators( + requestMessage: band_oracle_v1_query_pb.QueryActiveValidatorsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryActiveValidatorsResponse|null) => void + ): UnaryResponse; + activeValidators( + requestMessage: band_oracle_v1_query_pb.QueryActiveValidatorsRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryActiveValidatorsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_oracle_v1_query_pb.QueryParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_oracle_v1_query_pb.QueryParamsRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + requestSearch( + requestMessage: band_oracle_v1_query_pb.QueryRequestSearchRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryRequestSearchResponse|null) => void + ): UnaryResponse; + requestSearch( + requestMessage: band_oracle_v1_query_pb.QueryRequestSearchRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryRequestSearchResponse|null) => void + ): UnaryResponse; + requestPrice( + requestMessage: band_oracle_v1_query_pb.QueryRequestPriceRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryRequestPriceResponse|null) => void + ): UnaryResponse; + requestPrice( + requestMessage: band_oracle_v1_query_pb.QueryRequestPriceRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryRequestPriceResponse|null) => void + ): UnaryResponse; + requestVerification( + requestMessage: band_oracle_v1_query_pb.QueryRequestVerificationRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryRequestVerificationResponse|null) => void + ): UnaryResponse; + requestVerification( + requestMessage: band_oracle_v1_query_pb.QueryRequestVerificationRequest, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_query_pb.QueryRequestVerificationResponse|null) => void + ): UnaryResponse; +} + diff --git a/proto/tss/v1beta1/tx_pb_service.js b/codegen/band/oracle/v1/query_pb_service.js similarity index 63% rename from proto/tss/v1beta1/tx_pb_service.js rename to codegen/band/oracle/v1/query_pb_service.js index 20b565c..e47d89f 100644 --- a/proto/tss/v1beta1/tx_pb_service.js +++ b/codegen/band/oracle/v1/query_pb_service.js @@ -1,144 +1,184 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/tx.proto +// package: band.oracle.v1 +// file: band/oracle/v1/query.proto -var tss_v1beta1_tx_pb = require("../../tss/v1beta1/tx_pb"); +var band_oracle_v1_query_pb = require("../../../band/oracle/v1/query_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; -var Msg = (function () { - function Msg() {} - Msg.serviceName = "tss.v1beta1.Msg"; - return Msg; +var Query = (function () { + function Query() {} + Query.serviceName = "band.oracle.v1.Query"; + return Query; }()); -Msg.CreateGroup = { - methodName: "CreateGroup", - service: Msg, +Query.Counts = { + methodName: "Counts", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgCreateGroup, - responseType: tss_v1beta1_tx_pb.MsgCreateGroupResponse + requestType: band_oracle_v1_query_pb.QueryCountsRequest, + responseType: band_oracle_v1_query_pb.QueryCountsResponse }; -Msg.ReplaceGroup = { - methodName: "ReplaceGroup", - service: Msg, +Query.Data = { + methodName: "Data", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgReplaceGroup, - responseType: tss_v1beta1_tx_pb.MsgReplaceGroupResponse + requestType: band_oracle_v1_query_pb.QueryDataRequest, + responseType: band_oracle_v1_query_pb.QueryDataResponse }; -Msg.UpdateGroupFee = { - methodName: "UpdateGroupFee", - service: Msg, +Query.DataSource = { + methodName: "DataSource", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgUpdateGroupFee, - responseType: tss_v1beta1_tx_pb.MsgUpdateGroupFeeResponse + requestType: band_oracle_v1_query_pb.QueryDataSourceRequest, + responseType: band_oracle_v1_query_pb.QueryDataSourceResponse }; -Msg.SubmitDKGRound1 = { - methodName: "SubmitDKGRound1", - service: Msg, +Query.OracleScript = { + methodName: "OracleScript", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgSubmitDKGRound1, - responseType: tss_v1beta1_tx_pb.MsgSubmitDKGRound1Response + requestType: band_oracle_v1_query_pb.QueryOracleScriptRequest, + responseType: band_oracle_v1_query_pb.QueryOracleScriptResponse }; -Msg.SubmitDKGRound2 = { - methodName: "SubmitDKGRound2", - service: Msg, +Query.Request = { + methodName: "Request", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgSubmitDKGRound2, - responseType: tss_v1beta1_tx_pb.MsgSubmitDKGRound2Response + requestType: band_oracle_v1_query_pb.QueryRequestRequest, + responseType: band_oracle_v1_query_pb.QueryRequestResponse }; -Msg.Complain = { - methodName: "Complain", - service: Msg, +Query.PendingRequests = { + methodName: "PendingRequests", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgComplain, - responseType: tss_v1beta1_tx_pb.MsgComplainResponse + requestType: band_oracle_v1_query_pb.QueryPendingRequestsRequest, + responseType: band_oracle_v1_query_pb.QueryPendingRequestsResponse }; -Msg.Confirm = { - methodName: "Confirm", - service: Msg, +Query.Validator = { + methodName: "Validator", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgConfirm, - responseType: tss_v1beta1_tx_pb.MsgConfirmResponse + requestType: band_oracle_v1_query_pb.QueryValidatorRequest, + responseType: band_oracle_v1_query_pb.QueryValidatorResponse }; -Msg.SubmitDEs = { - methodName: "SubmitDEs", - service: Msg, +Query.IsReporter = { + methodName: "IsReporter", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgSubmitDEs, - responseType: tss_v1beta1_tx_pb.MsgSubmitDEsResponse + requestType: band_oracle_v1_query_pb.QueryIsReporterRequest, + responseType: band_oracle_v1_query_pb.QueryIsReporterResponse }; -Msg.RequestSignature = { - methodName: "RequestSignature", - service: Msg, +Query.Reporters = { + methodName: "Reporters", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgRequestSignature, - responseType: tss_v1beta1_tx_pb.MsgRequestSignatureResponse + requestType: band_oracle_v1_query_pb.QueryReportersRequest, + responseType: band_oracle_v1_query_pb.QueryReportersResponse }; -Msg.SubmitSignature = { - methodName: "SubmitSignature", - service: Msg, +Query.ActiveValidators = { + methodName: "ActiveValidators", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgSubmitSignature, - responseType: tss_v1beta1_tx_pb.MsgSubmitSignatureResponse + requestType: band_oracle_v1_query_pb.QueryActiveValidatorsRequest, + responseType: band_oracle_v1_query_pb.QueryActiveValidatorsResponse }; -Msg.Activate = { - methodName: "Activate", - service: Msg, +Query.Params = { + methodName: "Params", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgActivate, - responseType: tss_v1beta1_tx_pb.MsgActivateResponse + requestType: band_oracle_v1_query_pb.QueryParamsRequest, + responseType: band_oracle_v1_query_pb.QueryParamsResponse }; -Msg.Active = { - methodName: "Active", - service: Msg, +Query.RequestSearch = { + methodName: "RequestSearch", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgActive, - responseType: tss_v1beta1_tx_pb.MsgActiveResponse + requestType: band_oracle_v1_query_pb.QueryRequestSearchRequest, + responseType: band_oracle_v1_query_pb.QueryRequestSearchResponse }; -Msg.UpdateParams = { - methodName: "UpdateParams", - service: Msg, +Query.RequestPrice = { + methodName: "RequestPrice", + service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_tx_pb.MsgUpdateParams, - responseType: tss_v1beta1_tx_pb.MsgUpdateParamsResponse + requestType: band_oracle_v1_query_pb.QueryRequestPriceRequest, + responseType: band_oracle_v1_query_pb.QueryRequestPriceResponse }; -exports.Msg = Msg; +Query.RequestVerification = { + methodName: "RequestVerification", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_oracle_v1_query_pb.QueryRequestVerificationRequest, + responseType: band_oracle_v1_query_pb.QueryRequestVerificationResponse +}; -function MsgClient(serviceHost, options) { +exports.Query = Query; + +function QueryClient(serviceHost, options) { this.serviceHost = serviceHost; this.options = options || {}; } -MsgClient.prototype.createGroup = function createGroup(requestMessage, metadata, callback) { +QueryClient.prototype.counts = function counts(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Counts, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.data = function data(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.CreateGroup, { + var client = grpc.unary(Query.Data, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -165,11 +205,11 @@ MsgClient.prototype.createGroup = function createGroup(requestMessage, metadata, }; }; -MsgClient.prototype.replaceGroup = function replaceGroup(requestMessage, metadata, callback) { +QueryClient.prototype.dataSource = function dataSource(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.ReplaceGroup, { + var client = grpc.unary(Query.DataSource, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -196,11 +236,11 @@ MsgClient.prototype.replaceGroup = function replaceGroup(requestMessage, metadat }; }; -MsgClient.prototype.updateGroupFee = function updateGroupFee(requestMessage, metadata, callback) { +QueryClient.prototype.oracleScript = function oracleScript(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.UpdateGroupFee, { + var client = grpc.unary(Query.OracleScript, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -227,11 +267,11 @@ MsgClient.prototype.updateGroupFee = function updateGroupFee(requestMessage, met }; }; -MsgClient.prototype.submitDKGRound1 = function submitDKGRound1(requestMessage, metadata, callback) { +QueryClient.prototype.request = function request(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.SubmitDKGRound1, { + var client = grpc.unary(Query.Request, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -258,11 +298,11 @@ MsgClient.prototype.submitDKGRound1 = function submitDKGRound1(requestMessage, m }; }; -MsgClient.prototype.submitDKGRound2 = function submitDKGRound2(requestMessage, metadata, callback) { +QueryClient.prototype.pendingRequests = function pendingRequests(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.SubmitDKGRound2, { + var client = grpc.unary(Query.PendingRequests, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -289,11 +329,11 @@ MsgClient.prototype.submitDKGRound2 = function submitDKGRound2(requestMessage, m }; }; -MsgClient.prototype.complain = function complain(requestMessage, metadata, callback) { +QueryClient.prototype.validator = function validator(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.Complain, { + var client = grpc.unary(Query.Validator, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -320,11 +360,11 @@ MsgClient.prototype.complain = function complain(requestMessage, metadata, callb }; }; -MsgClient.prototype.confirm = function confirm(requestMessage, metadata, callback) { +QueryClient.prototype.isReporter = function isReporter(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.Confirm, { + var client = grpc.unary(Query.IsReporter, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -351,11 +391,11 @@ MsgClient.prototype.confirm = function confirm(requestMessage, metadata, callbac }; }; -MsgClient.prototype.submitDEs = function submitDEs(requestMessage, metadata, callback) { +QueryClient.prototype.reporters = function reporters(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.SubmitDEs, { + var client = grpc.unary(Query.Reporters, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -382,11 +422,11 @@ MsgClient.prototype.submitDEs = function submitDEs(requestMessage, metadata, cal }; }; -MsgClient.prototype.requestSignature = function requestSignature(requestMessage, metadata, callback) { +QueryClient.prototype.activeValidators = function activeValidators(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.RequestSignature, { + var client = grpc.unary(Query.ActiveValidators, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -413,11 +453,11 @@ MsgClient.prototype.requestSignature = function requestSignature(requestMessage, }; }; -MsgClient.prototype.submitSignature = function submitSignature(requestMessage, metadata, callback) { +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.SubmitSignature, { + var client = grpc.unary(Query.Params, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -444,11 +484,11 @@ MsgClient.prototype.submitSignature = function submitSignature(requestMessage, m }; }; -MsgClient.prototype.activate = function activate(requestMessage, metadata, callback) { +QueryClient.prototype.requestSearch = function requestSearch(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.Activate, { + var client = grpc.unary(Query.RequestSearch, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -475,11 +515,11 @@ MsgClient.prototype.activate = function activate(requestMessage, metadata, callb }; }; -MsgClient.prototype.active = function active(requestMessage, metadata, callback) { +QueryClient.prototype.requestPrice = function requestPrice(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.Active, { + var client = grpc.unary(Query.RequestPrice, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -506,11 +546,11 @@ MsgClient.prototype.active = function active(requestMessage, metadata, callback) }; }; -MsgClient.prototype.updateParams = function updateParams(requestMessage, metadata, callback) { +QueryClient.prototype.requestVerification = function requestVerification(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.UpdateParams, { + var client = grpc.unary(Query.RequestVerification, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -537,5 +577,5 @@ MsgClient.prototype.updateParams = function updateParams(requestMessage, metadat }; }; -exports.MsgClient = MsgClient; +exports.QueryClient = QueryClient; diff --git a/codegen/band/oracle/v1/tx.ts b/codegen/band/oracle/v1/tx.ts new file mode 100644 index 0000000..5aceab9 --- /dev/null +++ b/codegen/band/oracle/v1/tx.ts @@ -0,0 +1,1886 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/oracle/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./oracle"; +import * as dependency_3 from "./../../../cosmos/base/v1beta1/coin"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../../cosmos/msg/v1/msg"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.oracle.v1 { + export class MsgRequestData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + oracle_script_id?: number; + calldata?: Uint8Array; + ask_count?: number; + min_count?: number; + client_id?: string; + fee_limit?: dependency_3.cosmos.base.v1beta1.Coin[]; + prepare_gas?: number; + execute_gas?: number; + sender?: string; + tss_encoder?: dependency_2.band.oracle.v1.Encoder; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("oracle_script_id" in data && data.oracle_script_id != undefined) { + this.oracle_script_id = data.oracle_script_id; + } + if ("calldata" in data && data.calldata != undefined) { + this.calldata = data.calldata; + } + if ("ask_count" in data && data.ask_count != undefined) { + this.ask_count = data.ask_count; + } + if ("min_count" in data && data.min_count != undefined) { + this.min_count = data.min_count; + } + if ("client_id" in data && data.client_id != undefined) { + this.client_id = data.client_id; + } + if ("fee_limit" in data && data.fee_limit != undefined) { + this.fee_limit = data.fee_limit; + } + if ("prepare_gas" in data && data.prepare_gas != undefined) { + this.prepare_gas = data.prepare_gas; + } + if ("execute_gas" in data && data.execute_gas != undefined) { + this.execute_gas = data.execute_gas; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + if ("tss_encoder" in data && data.tss_encoder != undefined) { + this.tss_encoder = data.tss_encoder; + } + } + } + get oracle_script_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set oracle_script_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get calldata() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set calldata(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get ask_count() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set ask_count(value: number) { + pb_1.Message.setField(this, 3, value); + } + get min_count() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set min_count(value: number) { + pb_1.Message.setField(this, 4, value); + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 5, value); + } + get fee_limit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 6) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set fee_limit(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get prepare_gas() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set prepare_gas(value: number) { + pb_1.Message.setField(this, 7, value); + } + get execute_gas() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set execute_gas(value: number) { + pb_1.Message.setField(this, 8, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 9, value); + } + get tss_encoder() { + return pb_1.Message.getFieldWithDefault(this, 10, dependency_2.band.oracle.v1.Encoder.ENCODER_UNSPECIFIED) as dependency_2.band.oracle.v1.Encoder; + } + set tss_encoder(value: dependency_2.band.oracle.v1.Encoder) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + oracle_script_id?: number; + calldata?: Uint8Array; + ask_count?: number; + min_count?: number; + client_id?: string; + fee_limit?: ReturnType[]; + prepare_gas?: number; + execute_gas?: number; + sender?: string; + tss_encoder?: dependency_2.band.oracle.v1.Encoder; + }): MsgRequestData { + const message = new MsgRequestData({}); + if (data.oracle_script_id != null) { + message.oracle_script_id = data.oracle_script_id; + } + if (data.calldata != null) { + message.calldata = data.calldata; + } + if (data.ask_count != null) { + message.ask_count = data.ask_count; + } + if (data.min_count != null) { + message.min_count = data.min_count; + } + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.fee_limit != null) { + message.fee_limit = data.fee_limit.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.prepare_gas != null) { + message.prepare_gas = data.prepare_gas; + } + if (data.execute_gas != null) { + message.execute_gas = data.execute_gas; + } + if (data.sender != null) { + message.sender = data.sender; + } + if (data.tss_encoder != null) { + message.tss_encoder = data.tss_encoder; + } + return message; + } + toObject() { + const data: { + oracle_script_id?: number; + calldata?: Uint8Array; + ask_count?: number; + min_count?: number; + client_id?: string; + fee_limit?: ReturnType[]; + prepare_gas?: number; + execute_gas?: number; + sender?: string; + tss_encoder?: dependency_2.band.oracle.v1.Encoder; + } = {}; + if (this.oracle_script_id != null) { + data.oracle_script_id = this.oracle_script_id; + } + if (this.calldata != null) { + data.calldata = this.calldata; + } + if (this.ask_count != null) { + data.ask_count = this.ask_count; + } + if (this.min_count != null) { + data.min_count = this.min_count; + } + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.fee_limit != null) { + data.fee_limit = this.fee_limit.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.prepare_gas != null) { + data.prepare_gas = this.prepare_gas; + } + if (this.execute_gas != null) { + data.execute_gas = this.execute_gas; + } + if (this.sender != null) { + data.sender = this.sender; + } + if (this.tss_encoder != null) { + data.tss_encoder = this.tss_encoder; + } + 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.oracle_script_id != 0) + writer.writeUint64(1, this.oracle_script_id); + if (this.calldata.length) + writer.writeBytes(2, this.calldata); + if (this.ask_count != 0) + writer.writeUint64(3, this.ask_count); + if (this.min_count != 0) + writer.writeUint64(4, this.min_count); + if (this.client_id.length) + writer.writeString(5, this.client_id); + if (this.fee_limit.length) + writer.writeRepeatedMessage(6, this.fee_limit, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.prepare_gas != 0) + writer.writeUint64(7, this.prepare_gas); + if (this.execute_gas != 0) + writer.writeUint64(8, this.execute_gas); + if (this.sender.length) + writer.writeString(9, this.sender); + if (this.tss_encoder != dependency_2.band.oracle.v1.Encoder.ENCODER_UNSPECIFIED) + writer.writeEnum(10, this.tss_encoder); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRequestData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRequestData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.oracle_script_id = reader.readUint64(); + break; + case 2: + message.calldata = reader.readBytes(); + break; + case 3: + message.ask_count = reader.readUint64(); + break; + case 4: + message.min_count = reader.readUint64(); + break; + case 5: + message.client_id = reader.readString(); + break; + case 6: + reader.readMessage(message.fee_limit, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + case 7: + message.prepare_gas = reader.readUint64(); + break; + case 8: + message.execute_gas = reader.readUint64(); + break; + case 9: + message.sender = reader.readString(); + break; + case 10: + message.tss_encoder = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRequestData { + return MsgRequestData.deserialize(bytes); + } + } + export class MsgRequestDataResponse 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: {}): MsgRequestDataResponse { + const message = new MsgRequestDataResponse({}); + 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): MsgRequestDataResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRequestDataResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRequestDataResponse { + return MsgRequestDataResponse.deserialize(bytes); + } + } + export class MsgReportData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + request_id?: number; + raw_reports?: dependency_2.band.oracle.v1.RawReport[]; + validator?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("request_id" in data && data.request_id != undefined) { + this.request_id = data.request_id; + } + if ("raw_reports" in data && data.raw_reports != undefined) { + this.raw_reports = data.raw_reports; + } + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + } + } + get request_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set request_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get raw_reports() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.band.oracle.v1.RawReport, 2) as dependency_2.band.oracle.v1.RawReport[]; + } + set raw_reports(value: dependency_2.band.oracle.v1.RawReport[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + request_id?: number; + raw_reports?: ReturnType[]; + validator?: string; + }): MsgReportData { + const message = new MsgReportData({}); + if (data.request_id != null) { + message.request_id = data.request_id; + } + if (data.raw_reports != null) { + message.raw_reports = data.raw_reports.map(item => dependency_2.band.oracle.v1.RawReport.fromObject(item)); + } + if (data.validator != null) { + message.validator = data.validator; + } + return message; + } + toObject() { + const data: { + request_id?: number; + raw_reports?: ReturnType[]; + validator?: string; + } = {}; + if (this.request_id != null) { + data.request_id = this.request_id; + } + if (this.raw_reports != null) { + data.raw_reports = this.raw_reports.map((item: dependency_2.band.oracle.v1.RawReport) => item.toObject()); + } + if (this.validator != null) { + data.validator = this.validator; + } + 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.request_id != 0) + writer.writeUint64(1, this.request_id); + if (this.raw_reports.length) + writer.writeRepeatedMessage(2, this.raw_reports, (item: dependency_2.band.oracle.v1.RawReport) => item.serialize(writer)); + if (this.validator.length) + writer.writeString(3, this.validator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgReportData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgReportData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.request_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.raw_reports, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.band.oracle.v1.RawReport.deserialize(reader), dependency_2.band.oracle.v1.RawReport)); + break; + case 3: + message.validator = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgReportData { + return MsgReportData.deserialize(bytes); + } + } + export class MsgReportDataResponse 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: {}): MsgReportDataResponse { + const message = new MsgReportDataResponse({}); + 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): MsgReportDataResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgReportDataResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgReportDataResponse { + return MsgReportDataResponse.deserialize(bytes); + } + } + export class MsgCreateDataSource extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + description?: string; + executable?: Uint8Array; + fee?: dependency_3.cosmos.base.v1beta1.Coin[]; + treasury?: string; + owner?: string; + sender?: string; + }) { + 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("executable" in data && data.executable != undefined) { + this.executable = data.executable; + } + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + if ("treasury" in data && data.treasury != undefined) { + this.treasury = data.treasury; + } + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get executable() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set executable(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 4) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set fee(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get treasury() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set treasury(value: string) { + pb_1.Message.setField(this, 5, value); + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 6, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + name?: string; + description?: string; + executable?: Uint8Array; + fee?: ReturnType[]; + treasury?: string; + owner?: string; + sender?: string; + }): MsgCreateDataSource { + const message = new MsgCreateDataSource({}); + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.executable != null) { + message.executable = data.executable; + } + if (data.fee != null) { + message.fee = data.fee.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.treasury != null) { + message.treasury = data.treasury; + } + if (data.owner != null) { + message.owner = data.owner; + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + name?: string; + description?: string; + executable?: Uint8Array; + fee?: ReturnType[]; + treasury?: string; + owner?: string; + sender?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.executable != null) { + data.executable = this.executable; + } + if (this.fee != null) { + data.fee = this.fee.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.treasury != null) { + data.treasury = this.treasury; + } + if (this.owner != null) { + data.owner = this.owner; + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.name.length) + writer.writeString(1, this.name); + if (this.description.length) + writer.writeString(2, this.description); + if (this.executable.length) + writer.writeBytes(3, this.executable); + if (this.fee.length) + writer.writeRepeatedMessage(4, this.fee, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.treasury.length) + writer.writeString(5, this.treasury); + if (this.owner.length) + writer.writeString(6, this.owner); + if (this.sender.length) + writer.writeString(7, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateDataSource { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateDataSource(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + message.executable = reader.readBytes(); + break; + case 4: + reader.readMessage(message.fee, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + case 5: + message.treasury = reader.readString(); + break; + case 6: + message.owner = reader.readString(); + break; + case 7: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateDataSource { + return MsgCreateDataSource.deserialize(bytes); + } + } + export class MsgCreateDataSourceResponse 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: {}): MsgCreateDataSourceResponse { + const message = new MsgCreateDataSourceResponse({}); + 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): MsgCreateDataSourceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateDataSourceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateDataSourceResponse { + return MsgCreateDataSourceResponse.deserialize(bytes); + } + } + export class MsgEditDataSource extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data_source_id?: number; + name?: string; + description?: string; + executable?: Uint8Array; + fee?: dependency_3.cosmos.base.v1beta1.Coin[]; + treasury?: string; + owner?: string; + sender?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data_source_id" in data && data.data_source_id != undefined) { + this.data_source_id = data.data_source_id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("executable" in data && data.executable != undefined) { + this.executable = data.executable; + } + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + if ("treasury" in data && data.treasury != undefined) { + this.treasury = data.treasury; + } + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get data_source_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set data_source_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get executable() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set executable(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 5) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set fee(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get treasury() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set treasury(value: string) { + pb_1.Message.setField(this, 6, value); + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 7, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + data_source_id?: number; + name?: string; + description?: string; + executable?: Uint8Array; + fee?: ReturnType[]; + treasury?: string; + owner?: string; + sender?: string; + }): MsgEditDataSource { + const message = new MsgEditDataSource({}); + if (data.data_source_id != null) { + message.data_source_id = data.data_source_id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.executable != null) { + message.executable = data.executable; + } + if (data.fee != null) { + message.fee = data.fee.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.treasury != null) { + message.treasury = data.treasury; + } + if (data.owner != null) { + message.owner = data.owner; + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + data_source_id?: number; + name?: string; + description?: string; + executable?: Uint8Array; + fee?: ReturnType[]; + treasury?: string; + owner?: string; + sender?: string; + } = {}; + if (this.data_source_id != null) { + data.data_source_id = this.data_source_id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.executable != null) { + data.executable = this.executable; + } + if (this.fee != null) { + data.fee = this.fee.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.treasury != null) { + data.treasury = this.treasury; + } + if (this.owner != null) { + data.owner = this.owner; + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.data_source_id != 0) + writer.writeUint64(1, this.data_source_id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.executable.length) + writer.writeBytes(4, this.executable); + if (this.fee.length) + writer.writeRepeatedMessage(5, this.fee, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.treasury.length) + writer.writeString(6, this.treasury); + if (this.owner.length) + writer.writeString(7, this.owner); + if (this.sender.length) + writer.writeString(8, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgEditDataSource { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgEditDataSource(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data_source_id = reader.readUint64(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.executable = reader.readBytes(); + break; + case 5: + reader.readMessage(message.fee, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + case 6: + message.treasury = reader.readString(); + break; + case 7: + message.owner = reader.readString(); + break; + case 8: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgEditDataSource { + return MsgEditDataSource.deserialize(bytes); + } + } + export class MsgEditDataSourceResponse 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: {}): MsgEditDataSourceResponse { + const message = new MsgEditDataSourceResponse({}); + 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): MsgEditDataSourceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgEditDataSourceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgEditDataSourceResponse { + return MsgEditDataSourceResponse.deserialize(bytes); + } + } + export class MsgCreateOracleScript extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + description?: string; + schema?: string; + source_code_url?: string; + code?: Uint8Array; + owner?: string; + sender?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("schema" in data && data.schema != undefined) { + this.schema = data.schema; + } + if ("source_code_url" in data && data.source_code_url != undefined) { + this.source_code_url = data.source_code_url; + } + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get schema() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set schema(value: string) { + pb_1.Message.setField(this, 3, value); + } + get source_code_url() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set source_code_url(value: string) { + pb_1.Message.setField(this, 4, value); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set code(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 6, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + name?: string; + description?: string; + schema?: string; + source_code_url?: string; + code?: Uint8Array; + owner?: string; + sender?: string; + }): MsgCreateOracleScript { + const message = new MsgCreateOracleScript({}); + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.schema != null) { + message.schema = data.schema; + } + if (data.source_code_url != null) { + message.source_code_url = data.source_code_url; + } + if (data.code != null) { + message.code = data.code; + } + if (data.owner != null) { + message.owner = data.owner; + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + name?: string; + description?: string; + schema?: string; + source_code_url?: string; + code?: Uint8Array; + owner?: string; + sender?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.schema != null) { + data.schema = this.schema; + } + if (this.source_code_url != null) { + data.source_code_url = this.source_code_url; + } + if (this.code != null) { + data.code = this.code; + } + if (this.owner != null) { + data.owner = this.owner; + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.name.length) + writer.writeString(1, this.name); + if (this.description.length) + writer.writeString(2, this.description); + if (this.schema.length) + writer.writeString(3, this.schema); + if (this.source_code_url.length) + writer.writeString(4, this.source_code_url); + if (this.code.length) + writer.writeBytes(5, this.code); + if (this.owner.length) + writer.writeString(6, this.owner); + if (this.sender.length) + writer.writeString(7, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateOracleScript { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateOracleScript(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + message.schema = reader.readString(); + break; + case 4: + message.source_code_url = reader.readString(); + break; + case 5: + message.code = reader.readBytes(); + break; + case 6: + message.owner = reader.readString(); + break; + case 7: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateOracleScript { + return MsgCreateOracleScript.deserialize(bytes); + } + } + export class MsgCreateOracleScriptResponse 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: {}): MsgCreateOracleScriptResponse { + const message = new MsgCreateOracleScriptResponse({}); + 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): MsgCreateOracleScriptResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateOracleScriptResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateOracleScriptResponse { + return MsgCreateOracleScriptResponse.deserialize(bytes); + } + } + export class MsgEditOracleScript extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + oracle_script_id?: number; + name?: string; + description?: string; + schema?: string; + source_code_url?: string; + code?: Uint8Array; + owner?: string; + sender?: 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 ("oracle_script_id" in data && data.oracle_script_id != undefined) { + this.oracle_script_id = data.oracle_script_id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("schema" in data && data.schema != undefined) { + this.schema = data.schema; + } + if ("source_code_url" in data && data.source_code_url != undefined) { + this.source_code_url = data.source_code_url; + } + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get oracle_script_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set oracle_script_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get schema() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set schema(value: string) { + pb_1.Message.setField(this, 4, value); + } + get source_code_url() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set source_code_url(value: string) { + pb_1.Message.setField(this, 5, value); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set code(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 7, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + oracle_script_id?: number; + name?: string; + description?: string; + schema?: string; + source_code_url?: string; + code?: Uint8Array; + owner?: string; + sender?: string; + }): MsgEditOracleScript { + const message = new MsgEditOracleScript({}); + if (data.oracle_script_id != null) { + message.oracle_script_id = data.oracle_script_id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.schema != null) { + message.schema = data.schema; + } + if (data.source_code_url != null) { + message.source_code_url = data.source_code_url; + } + if (data.code != null) { + message.code = data.code; + } + if (data.owner != null) { + message.owner = data.owner; + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + oracle_script_id?: number; + name?: string; + description?: string; + schema?: string; + source_code_url?: string; + code?: Uint8Array; + owner?: string; + sender?: string; + } = {}; + if (this.oracle_script_id != null) { + data.oracle_script_id = this.oracle_script_id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.schema != null) { + data.schema = this.schema; + } + if (this.source_code_url != null) { + data.source_code_url = this.source_code_url; + } + if (this.code != null) { + data.code = this.code; + } + if (this.owner != null) { + data.owner = this.owner; + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.oracle_script_id != 0) + writer.writeUint64(1, this.oracle_script_id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.schema.length) + writer.writeString(4, this.schema); + if (this.source_code_url.length) + writer.writeString(5, this.source_code_url); + if (this.code.length) + writer.writeBytes(6, this.code); + if (this.owner.length) + writer.writeString(7, this.owner); + if (this.sender.length) + writer.writeString(8, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgEditOracleScript { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgEditOracleScript(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.oracle_script_id = reader.readUint64(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.schema = reader.readString(); + break; + case 5: + message.source_code_url = reader.readString(); + break; + case 6: + message.code = reader.readBytes(); + break; + case 7: + message.owner = reader.readString(); + break; + case 8: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgEditOracleScript { + return MsgEditOracleScript.deserialize(bytes); + } + } + export class MsgEditOracleScriptResponse 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: {}): MsgEditOracleScriptResponse { + const message = new MsgEditOracleScriptResponse({}); + 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): MsgEditOracleScriptResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgEditOracleScriptResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgEditOracleScriptResponse { + return MsgEditOracleScriptResponse.deserialize(bytes); + } + } + export class MsgActivate extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: 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 ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + } + } + get validator() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator?: string; + }): MsgActivate { + const message = new MsgActivate({}); + if (data.validator != null) { + message.validator = data.validator; + } + return message; + } + toObject() { + const data: { + validator?: string; + } = {}; + if (this.validator != null) { + data.validator = this.validator; + } + 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.validator.length) + writer.writeString(1, this.validator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgActivate { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgActivate(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgActivate { + return MsgActivate.deserialize(bytes); + } + } + export class MsgActivateResponse 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: {}): MsgActivateResponse { + const message = new MsgActivateResponse({}); + 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): MsgActivateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgActivateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgActivateResponse { + return MsgActivateResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_2.band.oracle.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.band.oracle.v1.Params, 2) as dependency_2.band.oracle.v1.Params; + } + set params(value: dependency_2.band.oracle.v1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_2.band.oracle.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_2.band.oracle.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + RequestData: { + path: "/band.oracle.v1.Msg/RequestData", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRequestData) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRequestData.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRequestDataResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRequestDataResponse.deserialize(new Uint8Array(bytes)) + }, + ReportData: { + path: "/band.oracle.v1.Msg/ReportData", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgReportData) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgReportData.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgReportDataResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgReportDataResponse.deserialize(new Uint8Array(bytes)) + }, + CreateDataSource: { + path: "/band.oracle.v1.Msg/CreateDataSource", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreateDataSource) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreateDataSource.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreateDataSourceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreateDataSourceResponse.deserialize(new Uint8Array(bytes)) + }, + EditDataSource: { + path: "/band.oracle.v1.Msg/EditDataSource", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgEditDataSource) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgEditDataSource.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgEditDataSourceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgEditDataSourceResponse.deserialize(new Uint8Array(bytes)) + }, + CreateOracleScript: { + path: "/band.oracle.v1.Msg/CreateOracleScript", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreateOracleScript) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreateOracleScript.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreateOracleScriptResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreateOracleScriptResponse.deserialize(new Uint8Array(bytes)) + }, + EditOracleScript: { + path: "/band.oracle.v1.Msg/EditOracleScript", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgEditOracleScript) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgEditOracleScript.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgEditOracleScriptResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgEditOracleScriptResponse.deserialize(new Uint8Array(bytes)) + }, + Activate: { + path: "/band.oracle.v1.Msg/Activate", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgActivate) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgActivate.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgActivateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgActivateResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/band.oracle.v1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract RequestData(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ReportData(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateDataSource(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract EditDataSource(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateOracleScript(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract EditOracleScript(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Activate(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + RequestData: GrpcUnaryServiceInterface = (message: MsgRequestData, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RequestData(message, metadata, options, callback); + }; + ReportData: GrpcUnaryServiceInterface = (message: MsgReportData, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ReportData(message, metadata, options, callback); + }; + CreateDataSource: GrpcUnaryServiceInterface = (message: MsgCreateDataSource, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateDataSource(message, metadata, options, callback); + }; + EditDataSource: GrpcUnaryServiceInterface = (message: MsgEditDataSource, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.EditDataSource(message, metadata, options, callback); + }; + CreateOracleScript: GrpcUnaryServiceInterface = (message: MsgCreateOracleScript, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateOracleScript(message, metadata, options, callback); + }; + EditOracleScript: GrpcUnaryServiceInterface = (message: MsgEditOracleScript, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.EditOracleScript(message, metadata, options, callback); + }; + Activate: GrpcUnaryServiceInterface = (message: MsgActivate, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Activate(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/oracle/v1/tx_pb.d.ts b/codegen/band/oracle/v1/tx_pb.d.ts new file mode 100644 index 0000000..41a7509 --- /dev/null +++ b/codegen/band/oracle/v1/tx_pb.d.ts @@ -0,0 +1,471 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/tx.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as band_oracle_v1_oracle_pb from "../../../band/oracle/v1/oracle_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; +import * as amino_amino_pb from "../../../amino/amino_pb"; + +export class MsgRequestData extends jspb.Message { + getOracleScriptId(): number; + setOracleScriptId(value: number): void; + + getCalldata(): Uint8Array | string; + getCalldata_asU8(): Uint8Array; + getCalldata_asB64(): string; + setCalldata(value: Uint8Array | string): void; + + getAskCount(): number; + setAskCount(value: number): void; + + getMinCount(): number; + setMinCount(value: number): void; + + getClientId(): string; + setClientId(value: string): void; + + clearFeeLimitList(): void; + getFeeLimitList(): Array; + setFeeLimitList(value: Array): void; + addFeeLimit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getPrepareGas(): number; + setPrepareGas(value: number): void; + + getExecuteGas(): number; + setExecuteGas(value: number): void; + + getSender(): string; + setSender(value: string): void; + + getTssEncoder(): band_oracle_v1_oracle_pb.EncoderMap[keyof band_oracle_v1_oracle_pb.EncoderMap]; + setTssEncoder(value: band_oracle_v1_oracle_pb.EncoderMap[keyof band_oracle_v1_oracle_pb.EncoderMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRequestData.AsObject; + static toObject(includeInstance: boolean, msg: MsgRequestData): MsgRequestData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRequestData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRequestData; + static deserializeBinaryFromReader(message: MsgRequestData, reader: jspb.BinaryReader): MsgRequestData; +} + +export namespace MsgRequestData { + export type AsObject = { + oracleScriptId: number, + calldata: Uint8Array | string, + askCount: number, + minCount: number, + clientId: string, + feeLimitList: Array, + prepareGas: number, + executeGas: number, + sender: string, + tssEncoder: band_oracle_v1_oracle_pb.EncoderMap[keyof band_oracle_v1_oracle_pb.EncoderMap], + } +} + +export class MsgRequestDataResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRequestDataResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgRequestDataResponse): MsgRequestDataResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRequestDataResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRequestDataResponse; + static deserializeBinaryFromReader(message: MsgRequestDataResponse, reader: jspb.BinaryReader): MsgRequestDataResponse; +} + +export namespace MsgRequestDataResponse { + export type AsObject = { + } +} + +export class MsgReportData extends jspb.Message { + getRequestId(): number; + setRequestId(value: number): void; + + clearRawReportsList(): void; + getRawReportsList(): Array; + setRawReportsList(value: Array): void; + addRawReports(value?: band_oracle_v1_oracle_pb.RawReport, index?: number): band_oracle_v1_oracle_pb.RawReport; + + getValidator(): string; + setValidator(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgReportData.AsObject; + static toObject(includeInstance: boolean, msg: MsgReportData): MsgReportData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgReportData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgReportData; + static deserializeBinaryFromReader(message: MsgReportData, reader: jspb.BinaryReader): MsgReportData; +} + +export namespace MsgReportData { + export type AsObject = { + requestId: number, + rawReportsList: Array, + validator: string, + } +} + +export class MsgReportDataResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgReportDataResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgReportDataResponse): MsgReportDataResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgReportDataResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgReportDataResponse; + static deserializeBinaryFromReader(message: MsgReportDataResponse, reader: jspb.BinaryReader): MsgReportDataResponse; +} + +export namespace MsgReportDataResponse { + export type AsObject = { + } +} + +export class MsgCreateDataSource extends jspb.Message { + getName(): string; + setName(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getExecutable(): Uint8Array | string; + getExecutable_asU8(): Uint8Array; + getExecutable_asB64(): string; + setExecutable(value: Uint8Array | string): void; + + clearFeeList(): void; + getFeeList(): Array; + setFeeList(value: Array): void; + addFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getTreasury(): string; + setTreasury(value: string): void; + + getOwner(): string; + setOwner(value: string): void; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgCreateDataSource.AsObject; + static toObject(includeInstance: boolean, msg: MsgCreateDataSource): MsgCreateDataSource.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgCreateDataSource, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgCreateDataSource; + static deserializeBinaryFromReader(message: MsgCreateDataSource, reader: jspb.BinaryReader): MsgCreateDataSource; +} + +export namespace MsgCreateDataSource { + export type AsObject = { + name: string, + description: string, + executable: Uint8Array | string, + feeList: Array, + treasury: string, + owner: string, + sender: string, + } +} + +export class MsgCreateDataSourceResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgCreateDataSourceResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgCreateDataSourceResponse): MsgCreateDataSourceResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgCreateDataSourceResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgCreateDataSourceResponse; + static deserializeBinaryFromReader(message: MsgCreateDataSourceResponse, reader: jspb.BinaryReader): MsgCreateDataSourceResponse; +} + +export namespace MsgCreateDataSourceResponse { + export type AsObject = { + } +} + +export class MsgEditDataSource extends jspb.Message { + getDataSourceId(): number; + setDataSourceId(value: number): void; + + getName(): string; + setName(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getExecutable(): Uint8Array | string; + getExecutable_asU8(): Uint8Array; + getExecutable_asB64(): string; + setExecutable(value: Uint8Array | string): void; + + clearFeeList(): void; + getFeeList(): Array; + setFeeList(value: Array): void; + addFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getTreasury(): string; + setTreasury(value: string): void; + + getOwner(): string; + setOwner(value: string): void; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgEditDataSource.AsObject; + static toObject(includeInstance: boolean, msg: MsgEditDataSource): MsgEditDataSource.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgEditDataSource, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgEditDataSource; + static deserializeBinaryFromReader(message: MsgEditDataSource, reader: jspb.BinaryReader): MsgEditDataSource; +} + +export namespace MsgEditDataSource { + export type AsObject = { + dataSourceId: number, + name: string, + description: string, + executable: Uint8Array | string, + feeList: Array, + treasury: string, + owner: string, + sender: string, + } +} + +export class MsgEditDataSourceResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgEditDataSourceResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgEditDataSourceResponse): MsgEditDataSourceResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgEditDataSourceResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgEditDataSourceResponse; + static deserializeBinaryFromReader(message: MsgEditDataSourceResponse, reader: jspb.BinaryReader): MsgEditDataSourceResponse; +} + +export namespace MsgEditDataSourceResponse { + export type AsObject = { + } +} + +export class MsgCreateOracleScript extends jspb.Message { + getName(): string; + setName(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getSchema(): string; + setSchema(value: string): void; + + getSourceCodeUrl(): string; + setSourceCodeUrl(value: string): void; + + getCode(): Uint8Array | string; + getCode_asU8(): Uint8Array; + getCode_asB64(): string; + setCode(value: Uint8Array | string): void; + + getOwner(): string; + setOwner(value: string): void; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgCreateOracleScript.AsObject; + static toObject(includeInstance: boolean, msg: MsgCreateOracleScript): MsgCreateOracleScript.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgCreateOracleScript, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgCreateOracleScript; + static deserializeBinaryFromReader(message: MsgCreateOracleScript, reader: jspb.BinaryReader): MsgCreateOracleScript; +} + +export namespace MsgCreateOracleScript { + export type AsObject = { + name: string, + description: string, + schema: string, + sourceCodeUrl: string, + code: Uint8Array | string, + owner: string, + sender: string, + } +} + +export class MsgCreateOracleScriptResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgCreateOracleScriptResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgCreateOracleScriptResponse): MsgCreateOracleScriptResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgCreateOracleScriptResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgCreateOracleScriptResponse; + static deserializeBinaryFromReader(message: MsgCreateOracleScriptResponse, reader: jspb.BinaryReader): MsgCreateOracleScriptResponse; +} + +export namespace MsgCreateOracleScriptResponse { + export type AsObject = { + } +} + +export class MsgEditOracleScript extends jspb.Message { + getOracleScriptId(): number; + setOracleScriptId(value: number): void; + + getName(): string; + setName(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getSchema(): string; + setSchema(value: string): void; + + getSourceCodeUrl(): string; + setSourceCodeUrl(value: string): void; + + getCode(): Uint8Array | string; + getCode_asU8(): Uint8Array; + getCode_asB64(): string; + setCode(value: Uint8Array | string): void; + + getOwner(): string; + setOwner(value: string): void; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgEditOracleScript.AsObject; + static toObject(includeInstance: boolean, msg: MsgEditOracleScript): MsgEditOracleScript.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgEditOracleScript, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgEditOracleScript; + static deserializeBinaryFromReader(message: MsgEditOracleScript, reader: jspb.BinaryReader): MsgEditOracleScript; +} + +export namespace MsgEditOracleScript { + export type AsObject = { + oracleScriptId: number, + name: string, + description: string, + schema: string, + sourceCodeUrl: string, + code: Uint8Array | string, + owner: string, + sender: string, + } +} + +export class MsgEditOracleScriptResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgEditOracleScriptResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgEditOracleScriptResponse): MsgEditOracleScriptResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgEditOracleScriptResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgEditOracleScriptResponse; + static deserializeBinaryFromReader(message: MsgEditOracleScriptResponse, reader: jspb.BinaryReader): MsgEditOracleScriptResponse; +} + +export namespace MsgEditOracleScriptResponse { + export type AsObject = { + } +} + +export class MsgActivate extends jspb.Message { + getValidator(): string; + setValidator(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgActivate.AsObject; + static toObject(includeInstance: boolean, msg: MsgActivate): MsgActivate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgActivate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgActivate; + static deserializeBinaryFromReader(message: MsgActivate, reader: jspb.BinaryReader): MsgActivate; +} + +export namespace MsgActivate { + export type AsObject = { + validator: string, + } +} + +export class MsgActivateResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgActivateResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgActivateResponse): MsgActivateResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgActivateResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgActivateResponse; + static deserializeBinaryFromReader(message: MsgActivateResponse, reader: jspb.BinaryReader): MsgActivateResponse; +} + +export namespace MsgActivateResponse { + export type AsObject = { + } +} + +export class MsgUpdateParams extends jspb.Message { + getAuthority(): string; + setAuthority(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): band_oracle_v1_oracle_pb.Params | undefined; + setParams(value?: band_oracle_v1_oracle_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + authority: string, + params?: band_oracle_v1_oracle_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + diff --git a/codegen/band/oracle/v1/tx_pb.js b/codegen/band/oracle/v1/tx_pb.js new file mode 100644 index 0000000..183cf4b --- /dev/null +++ b/codegen/band/oracle/v1/tx_pb.js @@ -0,0 +1,3631 @@ +// source: band/oracle/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var band_oracle_v1_oracle_pb = require('../../../band/oracle/v1/oracle_pb.js'); +goog.object.extend(proto, band_oracle_v1_oracle_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var amino_amino_pb = require('../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); +goog.exportSymbol('proto.band.oracle.v1.MsgActivate', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgActivateResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgCreateDataSource', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgCreateDataSourceResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgCreateOracleScript', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgCreateOracleScriptResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgEditDataSource', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgEditDataSourceResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgEditOracleScript', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgEditOracleScriptResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgReportData', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgReportDataResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgRequestData', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgRequestDataResponse', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.band.oracle.v1.MsgUpdateParamsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgRequestData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.MsgRequestData.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.MsgRequestData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgRequestData.displayName = 'proto.band.oracle.v1.MsgRequestData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgRequestDataResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgRequestDataResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgRequestDataResponse.displayName = 'proto.band.oracle.v1.MsgRequestDataResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgReportData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.MsgReportData.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.MsgReportData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgReportData.displayName = 'proto.band.oracle.v1.MsgReportData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgReportDataResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgReportDataResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgReportDataResponse.displayName = 'proto.band.oracle.v1.MsgReportDataResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgCreateDataSource = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.MsgCreateDataSource.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.MsgCreateDataSource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgCreateDataSource.displayName = 'proto.band.oracle.v1.MsgCreateDataSource'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgCreateDataSourceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgCreateDataSourceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgCreateDataSourceResponse.displayName = 'proto.band.oracle.v1.MsgCreateDataSourceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgEditDataSource = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.oracle.v1.MsgEditDataSource.repeatedFields_, null); +}; +goog.inherits(proto.band.oracle.v1.MsgEditDataSource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgEditDataSource.displayName = 'proto.band.oracle.v1.MsgEditDataSource'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgEditDataSourceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgEditDataSourceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgEditDataSourceResponse.displayName = 'proto.band.oracle.v1.MsgEditDataSourceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgCreateOracleScript = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgCreateOracleScript, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgCreateOracleScript.displayName = 'proto.band.oracle.v1.MsgCreateOracleScript'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgCreateOracleScriptResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgCreateOracleScriptResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgCreateOracleScriptResponse.displayName = 'proto.band.oracle.v1.MsgCreateOracleScriptResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgEditOracleScript = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgEditOracleScript, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgEditOracleScript.displayName = 'proto.band.oracle.v1.MsgEditOracleScript'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgEditOracleScriptResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgEditOracleScriptResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgEditOracleScriptResponse.displayName = 'proto.band.oracle.v1.MsgEditOracleScriptResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgActivate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgActivate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgActivate.displayName = 'proto.band.oracle.v1.MsgActivate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgActivateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgActivateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgActivateResponse.displayName = 'proto.band.oracle.v1.MsgActivateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgUpdateParams.displayName = 'proto.band.oracle.v1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.oracle.v1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.oracle.v1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.oracle.v1.MsgUpdateParamsResponse.displayName = 'proto.band.oracle.v1.MsgUpdateParamsResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.MsgRequestData.repeatedFields_ = [6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgRequestData.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgRequestData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgRequestData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgRequestData.toObject = function(includeInstance, msg) { + var f, obj = { + oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), + calldata: msg.getCalldata_asB64(), + askCount: jspb.Message.getFieldWithDefault(msg, 3, 0), + minCount: jspb.Message.getFieldWithDefault(msg, 4, 0), + clientId: jspb.Message.getFieldWithDefault(msg, 5, ""), + feeLimitList: jspb.Message.toObjectList(msg.getFeeLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + prepareGas: jspb.Message.getFieldWithDefault(msg, 7, 0), + executeGas: jspb.Message.getFieldWithDefault(msg, 8, 0), + sender: jspb.Message.getFieldWithDefault(msg, 9, ""), + tssEncoder: jspb.Message.getFieldWithDefault(msg, 10, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgRequestData} + */ +proto.band.oracle.v1.MsgRequestData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgRequestData; + return proto.band.oracle.v1.MsgRequestData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgRequestData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgRequestData} + */ +proto.band.oracle.v1.MsgRequestData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOracleScriptId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCalldata(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAskCount(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinCount(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFeeLimit(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPrepareGas(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExecuteGas(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 10: + var value = /** @type {!proto.band.oracle.v1.Encoder} */ (reader.readEnum()); + msg.setTssEncoder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgRequestData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgRequestData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgRequestData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgRequestData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOracleScriptId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCalldata_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAskCount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getMinCount(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getFeeLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPrepareGas(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getExecuteGas(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getTssEncoder(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } +}; + + +/** + * optional uint64 oracle_script_id = 1; + * @return {number} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getOracleScriptId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.setOracleScriptId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes calldata = 2; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getCalldata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes calldata = 2; + * This is a type-conversion wrapper around `getCalldata()` + * @return {string} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getCalldata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCalldata())); +}; + + +/** + * optional bytes calldata = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCalldata()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getCalldata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCalldata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.setCalldata = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint64 ask_count = 3; + * @return {number} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getAskCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.setAskCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 min_count = 4; + * @return {number} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getMinCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.setMinCount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string client_id = 5; + * @return {string} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee_limit = 6; + * @return {!Array} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getFeeLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this +*/ +proto.band.oracle.v1.MsgRequestData.prototype.setFeeLimitList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.oracle.v1.MsgRequestData.prototype.addFeeLimit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.clearFeeLimitList = function() { + return this.setFeeLimitList([]); +}; + + +/** + * optional uint64 prepare_gas = 7; + * @return {number} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getPrepareGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.setPrepareGas = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint64 execute_gas = 8; + * @return {number} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getExecuteGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.setExecuteGas = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional string sender = 9; + * @return {string} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional Encoder tss_encoder = 10; + * @return {!proto.band.oracle.v1.Encoder} + */ +proto.band.oracle.v1.MsgRequestData.prototype.getTssEncoder = function() { + return /** @type {!proto.band.oracle.v1.Encoder} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {!proto.band.oracle.v1.Encoder} value + * @return {!proto.band.oracle.v1.MsgRequestData} returns this + */ +proto.band.oracle.v1.MsgRequestData.prototype.setTssEncoder = function(value) { + return jspb.Message.setProto3EnumField(this, 10, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgRequestDataResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgRequestDataResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgRequestDataResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgRequestDataResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgRequestDataResponse} + */ +proto.band.oracle.v1.MsgRequestDataResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgRequestDataResponse; + return proto.band.oracle.v1.MsgRequestDataResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgRequestDataResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgRequestDataResponse} + */ +proto.band.oracle.v1.MsgRequestDataResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgRequestDataResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgRequestDataResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgRequestDataResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgRequestDataResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.MsgReportData.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgReportData.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgReportData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgReportData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgReportData.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: jspb.Message.getFieldWithDefault(msg, 1, 0), + rawReportsList: jspb.Message.toObjectList(msg.getRawReportsList(), + band_oracle_v1_oracle_pb.RawReport.toObject, includeInstance), + validator: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgReportData} + */ +proto.band.oracle.v1.MsgReportData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgReportData; + return proto.band.oracle.v1.MsgReportData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgReportData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgReportData} + */ +proto.band.oracle.v1.MsgReportData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 2: + var value = new band_oracle_v1_oracle_pb.RawReport; + reader.readMessage(value,band_oracle_v1_oracle_pb.RawReport.deserializeBinaryFromReader); + msg.addRawReports(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValidator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgReportData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgReportData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgReportData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgReportData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRawReportsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_oracle_v1_oracle_pb.RawReport.serializeBinaryToWriter + ); + } + f = message.getValidator(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint64 request_id = 1; + * @return {number} + */ +proto.band.oracle.v1.MsgReportData.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.MsgReportData} returns this + */ +proto.band.oracle.v1.MsgReportData.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated RawReport raw_reports = 2; + * @return {!Array} + */ +proto.band.oracle.v1.MsgReportData.prototype.getRawReportsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_oracle_v1_oracle_pb.RawReport, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.MsgReportData} returns this +*/ +proto.band.oracle.v1.MsgReportData.prototype.setRawReportsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.oracle.v1.RawReport=} opt_value + * @param {number=} opt_index + * @return {!proto.band.oracle.v1.RawReport} + */ +proto.band.oracle.v1.MsgReportData.prototype.addRawReports = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.oracle.v1.RawReport, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.MsgReportData} returns this + */ +proto.band.oracle.v1.MsgReportData.prototype.clearRawReportsList = function() { + return this.setRawReportsList([]); +}; + + +/** + * optional string validator = 3; + * @return {string} + */ +proto.band.oracle.v1.MsgReportData.prototype.getValidator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgReportData} returns this + */ +proto.band.oracle.v1.MsgReportData.prototype.setValidator = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgReportDataResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgReportDataResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgReportDataResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgReportDataResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgReportDataResponse} + */ +proto.band.oracle.v1.MsgReportDataResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgReportDataResponse; + return proto.band.oracle.v1.MsgReportDataResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgReportDataResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgReportDataResponse} + */ +proto.band.oracle.v1.MsgReportDataResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgReportDataResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgReportDataResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgReportDataResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgReportDataResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.MsgCreateDataSource.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgCreateDataSource.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgCreateDataSource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgCreateDataSource.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + executable: msg.getExecutable_asB64(), + feeList: jspb.Message.toObjectList(msg.getFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + treasury: jspb.Message.getFieldWithDefault(msg, 5, ""), + owner: jspb.Message.getFieldWithDefault(msg, 6, ""), + sender: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgCreateDataSource} + */ +proto.band.oracle.v1.MsgCreateDataSource.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgCreateDataSource; + return proto.band.oracle.v1.MsgCreateDataSource.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgCreateDataSource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgCreateDataSource} + */ +proto.band.oracle.v1.MsgCreateDataSource.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExecutable(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFee(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setTreasury(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgCreateDataSource.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgCreateDataSource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgCreateDataSource.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExecutable_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTreasury(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateDataSource} returns this + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateDataSource} returns this + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes executable = 3; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.getExecutable = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes executable = 3; + * This is a type-conversion wrapper around `getExecutable()` + * @return {string} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.getExecutable_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExecutable())); +}; + + +/** + * optional bytes executable = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExecutable()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.getExecutable_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExecutable())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.MsgCreateDataSource} returns this + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.setExecutable = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee = 4; + * @return {!Array} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.getFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.MsgCreateDataSource} returns this +*/ +proto.band.oracle.v1.MsgCreateDataSource.prototype.setFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.addFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.MsgCreateDataSource} returns this + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.clearFeeList = function() { + return this.setFeeList([]); +}; + + +/** + * optional string treasury = 5; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.getTreasury = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateDataSource} returns this + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.setTreasury = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string owner = 6; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateDataSource} returns this + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string sender = 7; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateDataSource} returns this + */ +proto.band.oracle.v1.MsgCreateDataSource.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgCreateDataSourceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgCreateDataSourceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgCreateDataSourceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgCreateDataSourceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgCreateDataSourceResponse} + */ +proto.band.oracle.v1.MsgCreateDataSourceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgCreateDataSourceResponse; + return proto.band.oracle.v1.MsgCreateDataSourceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgCreateDataSourceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgCreateDataSourceResponse} + */ +proto.band.oracle.v1.MsgCreateDataSourceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgCreateDataSourceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgCreateDataSourceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgCreateDataSourceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgCreateDataSourceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.oracle.v1.MsgEditDataSource.repeatedFields_ = [5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgEditDataSource.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgEditDataSource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgEditDataSource.toObject = function(includeInstance, msg) { + var f, obj = { + dataSourceId: jspb.Message.getFieldWithDefault(msg, 1, 0), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + executable: msg.getExecutable_asB64(), + feeList: jspb.Message.toObjectList(msg.getFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + treasury: jspb.Message.getFieldWithDefault(msg, 6, ""), + owner: jspb.Message.getFieldWithDefault(msg, 7, ""), + sender: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgEditDataSource} + */ +proto.band.oracle.v1.MsgEditDataSource.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgEditDataSource; + return proto.band.oracle.v1.MsgEditDataSource.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgEditDataSource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgEditDataSource} + */ +proto.band.oracle.v1.MsgEditDataSource.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDataSourceId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExecutable(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addFee(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setTreasury(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgEditDataSource.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgEditDataSource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgEditDataSource.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataSourceId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getExecutable_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTreasury(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional uint64 data_source_id = 1; + * @return {number} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getDataSourceId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.MsgEditDataSource} returns this + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.setDataSourceId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditDataSource} returns this + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditDataSource} returns this + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bytes executable = 4; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getExecutable = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes executable = 4; + * This is a type-conversion wrapper around `getExecutable()` + * @return {string} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getExecutable_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExecutable())); +}; + + +/** + * optional bytes executable = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExecutable()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getExecutable_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExecutable())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.MsgEditDataSource} returns this + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.setExecutable = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fee = 5; + * @return {!Array} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.oracle.v1.MsgEditDataSource} returns this +*/ +proto.band.oracle.v1.MsgEditDataSource.prototype.setFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.addFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.oracle.v1.MsgEditDataSource} returns this + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.clearFeeList = function() { + return this.setFeeList([]); +}; + + +/** + * optional string treasury = 6; + * @return {string} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getTreasury = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditDataSource} returns this + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.setTreasury = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string owner = 7; + * @return {string} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditDataSource} returns this + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string sender = 8; + * @return {string} + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditDataSource} returns this + */ +proto.band.oracle.v1.MsgEditDataSource.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgEditDataSourceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgEditDataSourceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgEditDataSourceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgEditDataSourceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgEditDataSourceResponse} + */ +proto.band.oracle.v1.MsgEditDataSourceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgEditDataSourceResponse; + return proto.band.oracle.v1.MsgEditDataSourceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgEditDataSourceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgEditDataSourceResponse} + */ +proto.band.oracle.v1.MsgEditDataSourceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgEditDataSourceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgEditDataSourceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgEditDataSourceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgEditDataSourceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgCreateOracleScript.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgCreateOracleScript} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgCreateOracleScript.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + schema: jspb.Message.getFieldWithDefault(msg, 3, ""), + sourceCodeUrl: jspb.Message.getFieldWithDefault(msg, 4, ""), + code: msg.getCode_asB64(), + owner: jspb.Message.getFieldWithDefault(msg, 6, ""), + sender: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgCreateOracleScript} + */ +proto.band.oracle.v1.MsgCreateOracleScript.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgCreateOracleScript; + return proto.band.oracle.v1.MsgCreateOracleScript.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgCreateOracleScript} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgCreateOracleScript} + */ +proto.band.oracle.v1.MsgCreateOracleScript.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSchema(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceCodeUrl(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCode(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgCreateOracleScript.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgCreateOracleScript} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgCreateOracleScript.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSourceCodeUrl(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getCode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateOracleScript} returns this + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateOracleScript} returns this + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string schema = 3; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateOracleScript} returns this + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.setSchema = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string source_code_url = 4; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.getSourceCodeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateOracleScript} returns this + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.setSourceCodeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bytes code = 5; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.getCode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes code = 5; + * This is a type-conversion wrapper around `getCode()` + * @return {string} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.getCode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCode())); +}; + + +/** + * optional bytes code = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCode()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.getCode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCode())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.MsgCreateOracleScript} returns this + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.setCode = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional string owner = 6; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateOracleScript} returns this + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string sender = 7; + * @return {string} + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgCreateOracleScript} returns this + */ +proto.band.oracle.v1.MsgCreateOracleScript.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgCreateOracleScriptResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgCreateOracleScriptResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgCreateOracleScriptResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgCreateOracleScriptResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgCreateOracleScriptResponse} + */ +proto.band.oracle.v1.MsgCreateOracleScriptResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgCreateOracleScriptResponse; + return proto.band.oracle.v1.MsgCreateOracleScriptResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgCreateOracleScriptResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgCreateOracleScriptResponse} + */ +proto.band.oracle.v1.MsgCreateOracleScriptResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgCreateOracleScriptResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgCreateOracleScriptResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgCreateOracleScriptResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgCreateOracleScriptResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgEditOracleScript.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgEditOracleScript} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgEditOracleScript.toObject = function(includeInstance, msg) { + var f, obj = { + oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + schema: jspb.Message.getFieldWithDefault(msg, 4, ""), + sourceCodeUrl: jspb.Message.getFieldWithDefault(msg, 5, ""), + code: msg.getCode_asB64(), + owner: jspb.Message.getFieldWithDefault(msg, 7, ""), + sender: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgEditOracleScript} + */ +proto.band.oracle.v1.MsgEditOracleScript.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgEditOracleScript; + return proto.band.oracle.v1.MsgEditOracleScript.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgEditOracleScript} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgEditOracleScript} + */ +proto.band.oracle.v1.MsgEditOracleScript.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOracleScriptId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSchema(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceCodeUrl(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCode(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgEditOracleScript.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgEditOracleScript} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgEditOracleScript.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOracleScriptId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSourceCodeUrl(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional uint64 oracle_script_id = 1; + * @return {number} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getOracleScriptId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.oracle.v1.MsgEditOracleScript} returns this + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.setOracleScriptId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditOracleScript} returns this + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditOracleScript} returns this + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string schema = 4; + * @return {string} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditOracleScript} returns this + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.setSchema = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string source_code_url = 5; + * @return {string} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getSourceCodeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditOracleScript} returns this + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.setSourceCodeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bytes code = 6; + * @return {!(string|Uint8Array)} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getCode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes code = 6; + * This is a type-conversion wrapper around `getCode()` + * @return {string} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getCode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCode())); +}; + + +/** + * optional bytes code = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCode()` + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getCode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCode())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.oracle.v1.MsgEditOracleScript} returns this + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.setCode = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional string owner = 7; + * @return {string} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditOracleScript} returns this + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string sender = 8; + * @return {string} + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgEditOracleScript} returns this + */ +proto.band.oracle.v1.MsgEditOracleScript.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgEditOracleScriptResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgEditOracleScriptResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgEditOracleScriptResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgEditOracleScriptResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgEditOracleScriptResponse} + */ +proto.band.oracle.v1.MsgEditOracleScriptResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgEditOracleScriptResponse; + return proto.band.oracle.v1.MsgEditOracleScriptResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgEditOracleScriptResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgEditOracleScriptResponse} + */ +proto.band.oracle.v1.MsgEditOracleScriptResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgEditOracleScriptResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgEditOracleScriptResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgEditOracleScriptResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgEditOracleScriptResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgActivate.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgActivate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgActivate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgActivate.toObject = function(includeInstance, msg) { + var f, obj = { + validator: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgActivate} + */ +proto.band.oracle.v1.MsgActivate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgActivate; + return proto.band.oracle.v1.MsgActivate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgActivate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgActivate} + */ +proto.band.oracle.v1.MsgActivate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgActivate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgActivate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgActivate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgActivate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator = 1; + * @return {string} + */ +proto.band.oracle.v1.MsgActivate.prototype.getValidator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgActivate} returns this + */ +proto.band.oracle.v1.MsgActivate.prototype.setValidator = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgActivateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgActivateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgActivateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgActivateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgActivateResponse} + */ +proto.band.oracle.v1.MsgActivateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgActivateResponse; + return proto.band.oracle.v1.MsgActivateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgActivateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgActivateResponse} + */ +proto.band.oracle.v1.MsgActivateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgActivateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgActivateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgActivateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgActivateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + authority: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && band_oracle_v1_oracle_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgUpdateParams} + */ +proto.band.oracle.v1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgUpdateParams; + return proto.band.oracle.v1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgUpdateParams} + */ +proto.band.oracle.v1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + case 2: + var value = new band_oracle_v1_oracle_pb.Params; + reader.readMessage(value,band_oracle_v1_oracle_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + band_oracle_v1_oracle_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string authority = 1; + * @return {string} + */ +proto.band.oracle.v1.MsgUpdateParams.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.oracle.v1.MsgUpdateParams} returns this + */ +proto.band.oracle.v1.MsgUpdateParams.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Params params = 2; + * @return {?proto.band.oracle.v1.Params} + */ +proto.band.oracle.v1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.band.oracle.v1.Params} */ ( + jspb.Message.getWrapperField(this, band_oracle_v1_oracle_pb.Params, 2)); +}; + + +/** + * @param {?proto.band.oracle.v1.Params|undefined} value + * @return {!proto.band.oracle.v1.MsgUpdateParams} returns this +*/ +proto.band.oracle.v1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.oracle.v1.MsgUpdateParams} returns this + */ +proto.band.oracle.v1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.oracle.v1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.oracle.v1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.oracle.v1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.oracle.v1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.oracle.v1.MsgUpdateParamsResponse} + */ +proto.band.oracle.v1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.oracle.v1.MsgUpdateParamsResponse; + return proto.band.oracle.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.oracle.v1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.oracle.v1.MsgUpdateParamsResponse} + */ +proto.band.oracle.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.oracle.v1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.oracle.v1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.oracle.v1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.oracle.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.band.oracle.v1); diff --git a/codegen/band/oracle/v1/tx_pb_service.d.ts b/codegen/band/oracle/v1/tx_pb_service.d.ts new file mode 100644 index 0000000..251269f --- /dev/null +++ b/codegen/band/oracle/v1/tx_pb_service.d.ts @@ -0,0 +1,196 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/tx.proto + +import * as band_oracle_v1_tx_pb from "../../../band/oracle/v1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgRequestData = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_tx_pb.MsgRequestData; + readonly responseType: typeof band_oracle_v1_tx_pb.MsgRequestDataResponse; +}; + +type MsgReportData = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_tx_pb.MsgReportData; + readonly responseType: typeof band_oracle_v1_tx_pb.MsgReportDataResponse; +}; + +type MsgCreateDataSource = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_tx_pb.MsgCreateDataSource; + readonly responseType: typeof band_oracle_v1_tx_pb.MsgCreateDataSourceResponse; +}; + +type MsgEditDataSource = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_tx_pb.MsgEditDataSource; + readonly responseType: typeof band_oracle_v1_tx_pb.MsgEditDataSourceResponse; +}; + +type MsgCreateOracleScript = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_tx_pb.MsgCreateOracleScript; + readonly responseType: typeof band_oracle_v1_tx_pb.MsgCreateOracleScriptResponse; +}; + +type MsgEditOracleScript = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_tx_pb.MsgEditOracleScript; + readonly responseType: typeof band_oracle_v1_tx_pb.MsgEditOracleScriptResponse; +}; + +type MsgActivate = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_tx_pb.MsgActivate; + readonly responseType: typeof band_oracle_v1_tx_pb.MsgActivateResponse; +}; + +type MsgUpdateParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_oracle_v1_tx_pb.MsgUpdateParams; + readonly responseType: typeof band_oracle_v1_tx_pb.MsgUpdateParamsResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly RequestData: MsgRequestData; + static readonly ReportData: MsgReportData; + static readonly CreateDataSource: MsgCreateDataSource; + static readonly EditDataSource: MsgEditDataSource; + static readonly CreateOracleScript: MsgCreateOracleScript; + static readonly EditOracleScript: MsgEditOracleScript; + static readonly Activate: MsgActivate; + static readonly UpdateParams: MsgUpdateParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + requestData( + requestMessage: band_oracle_v1_tx_pb.MsgRequestData, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgRequestDataResponse|null) => void + ): UnaryResponse; + requestData( + requestMessage: band_oracle_v1_tx_pb.MsgRequestData, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgRequestDataResponse|null) => void + ): UnaryResponse; + reportData( + requestMessage: band_oracle_v1_tx_pb.MsgReportData, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgReportDataResponse|null) => void + ): UnaryResponse; + reportData( + requestMessage: band_oracle_v1_tx_pb.MsgReportData, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgReportDataResponse|null) => void + ): UnaryResponse; + createDataSource( + requestMessage: band_oracle_v1_tx_pb.MsgCreateDataSource, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgCreateDataSourceResponse|null) => void + ): UnaryResponse; + createDataSource( + requestMessage: band_oracle_v1_tx_pb.MsgCreateDataSource, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgCreateDataSourceResponse|null) => void + ): UnaryResponse; + editDataSource( + requestMessage: band_oracle_v1_tx_pb.MsgEditDataSource, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgEditDataSourceResponse|null) => void + ): UnaryResponse; + editDataSource( + requestMessage: band_oracle_v1_tx_pb.MsgEditDataSource, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgEditDataSourceResponse|null) => void + ): UnaryResponse; + createOracleScript( + requestMessage: band_oracle_v1_tx_pb.MsgCreateOracleScript, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgCreateOracleScriptResponse|null) => void + ): UnaryResponse; + createOracleScript( + requestMessage: band_oracle_v1_tx_pb.MsgCreateOracleScript, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgCreateOracleScriptResponse|null) => void + ): UnaryResponse; + editOracleScript( + requestMessage: band_oracle_v1_tx_pb.MsgEditOracleScript, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgEditOracleScriptResponse|null) => void + ): UnaryResponse; + editOracleScript( + requestMessage: band_oracle_v1_tx_pb.MsgEditOracleScript, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgEditOracleScriptResponse|null) => void + ): UnaryResponse; + activate( + requestMessage: band_oracle_v1_tx_pb.MsgActivate, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgActivateResponse|null) => void + ): UnaryResponse; + activate( + requestMessage: band_oracle_v1_tx_pb.MsgActivate, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgActivateResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: band_oracle_v1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: band_oracle_v1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: band_oracle_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/oracle/v1/tx_pb_service.js b/codegen/band/oracle/v1/tx_pb_service.js new file mode 100644 index 0000000..22dd0fa --- /dev/null +++ b/codegen/band/oracle/v1/tx_pb_service.js @@ -0,0 +1,341 @@ +// package: band.oracle.v1 +// file: band/oracle/v1/tx.proto + +var band_oracle_v1_tx_pb = require("../../../band/oracle/v1/tx_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Msg = (function () { + function Msg() {} + Msg.serviceName = "band.oracle.v1.Msg"; + return Msg; +}()); + +Msg.RequestData = { + methodName: "RequestData", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_oracle_v1_tx_pb.MsgRequestData, + responseType: band_oracle_v1_tx_pb.MsgRequestDataResponse +}; + +Msg.ReportData = { + methodName: "ReportData", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_oracle_v1_tx_pb.MsgReportData, + responseType: band_oracle_v1_tx_pb.MsgReportDataResponse +}; + +Msg.CreateDataSource = { + methodName: "CreateDataSource", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_oracle_v1_tx_pb.MsgCreateDataSource, + responseType: band_oracle_v1_tx_pb.MsgCreateDataSourceResponse +}; + +Msg.EditDataSource = { + methodName: "EditDataSource", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_oracle_v1_tx_pb.MsgEditDataSource, + responseType: band_oracle_v1_tx_pb.MsgEditDataSourceResponse +}; + +Msg.CreateOracleScript = { + methodName: "CreateOracleScript", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_oracle_v1_tx_pb.MsgCreateOracleScript, + responseType: band_oracle_v1_tx_pb.MsgCreateOracleScriptResponse +}; + +Msg.EditOracleScript = { + methodName: "EditOracleScript", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_oracle_v1_tx_pb.MsgEditOracleScript, + responseType: band_oracle_v1_tx_pb.MsgEditOracleScriptResponse +}; + +Msg.Activate = { + methodName: "Activate", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_oracle_v1_tx_pb.MsgActivate, + responseType: band_oracle_v1_tx_pb.MsgActivateResponse +}; + +Msg.UpdateParams = { + methodName: "UpdateParams", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_oracle_v1_tx_pb.MsgUpdateParams, + responseType: band_oracle_v1_tx_pb.MsgUpdateParamsResponse +}; + +exports.Msg = Msg; + +function MsgClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MsgClient.prototype.requestData = function requestData(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.RequestData, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.reportData = function reportData(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ReportData, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.createDataSource = function createDataSource(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.CreateDataSource, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.editDataSource = function editDataSource(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.EditDataSource, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.createOracleScript = function createOracleScript(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.CreateOracleScript, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.editOracleScript = function editOracleScript(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.EditOracleScript, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.activate = function activate(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.Activate, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.updateParams = function updateParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MsgClient = MsgClient; + diff --git a/codegen/band/restake/v1beta1/genesis.ts b/codegen/band/restake/v1beta1/genesis.ts new file mode 100644 index 0000000..2e6ff4d --- /dev/null +++ b/codegen/band/restake/v1beta1/genesis.ts @@ -0,0 +1,216 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/restake/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./types"; +import * as pb_1 from "google-protobuf"; +export namespace band.restake.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: Params; + vaults?: dependency_2.band.restake.v1beta1.Vault[]; + locks?: dependency_2.band.restake.v1beta1.Lock[]; + stakes?: dependency_2.band.restake.v1beta1.Stake[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("vaults" in data && data.vaults != undefined) { + this.vaults = data.vaults; + } + if ("locks" in data && data.locks != undefined) { + this.locks = data.locks; + } + if ("stakes" in data && data.stakes != undefined) { + this.stakes = data.stakes; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, Params, 1) as Params; + } + set params(value: Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get vaults() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.band.restake.v1beta1.Vault, 2) as dependency_2.band.restake.v1beta1.Vault[]; + } + set vaults(value: dependency_2.band.restake.v1beta1.Vault[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get locks() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.band.restake.v1beta1.Lock, 3) as dependency_2.band.restake.v1beta1.Lock[]; + } + set locks(value: dependency_2.band.restake.v1beta1.Lock[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get stakes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.band.restake.v1beta1.Stake, 4) as dependency_2.band.restake.v1beta1.Stake[]; + } + set stakes(value: dependency_2.band.restake.v1beta1.Stake[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + params?: ReturnType; + vaults?: ReturnType[]; + locks?: ReturnType[]; + stakes?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = Params.fromObject(data.params); + } + if (data.vaults != null) { + message.vaults = data.vaults.map(item => dependency_2.band.restake.v1beta1.Vault.fromObject(item)); + } + if (data.locks != null) { + message.locks = data.locks.map(item => dependency_2.band.restake.v1beta1.Lock.fromObject(item)); + } + if (data.stakes != null) { + message.stakes = data.stakes.map(item => dependency_2.band.restake.v1beta1.Stake.fromObject(item)); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + vaults?: ReturnType[]; + locks?: ReturnType[]; + stakes?: ReturnType[]; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.vaults != null) { + data.vaults = this.vaults.map((item: dependency_2.band.restake.v1beta1.Vault) => item.toObject()); + } + if (this.locks != null) { + data.locks = this.locks.map((item: dependency_2.band.restake.v1beta1.Lock) => item.toObject()); + } + if (this.stakes != null) { + data.stakes = this.stakes.map((item: dependency_2.band.restake.v1beta1.Stake) => item.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.vaults.length) + writer.writeRepeatedMessage(2, this.vaults, (item: dependency_2.band.restake.v1beta1.Vault) => item.serialize(writer)); + if (this.locks.length) + writer.writeRepeatedMessage(3, this.locks, (item: dependency_2.band.restake.v1beta1.Lock) => item.serialize(writer)); + if (this.stakes.length) + writer.writeRepeatedMessage(4, this.stakes, (item: dependency_2.band.restake.v1beta1.Stake) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = Params.deserialize(reader)); + break; + case 2: + reader.readMessage(message.vaults, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.band.restake.v1beta1.Vault.deserialize(reader), dependency_2.band.restake.v1beta1.Vault)); + break; + case 3: + reader.readMessage(message.locks, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.band.restake.v1beta1.Lock.deserialize(reader), dependency_2.band.restake.v1beta1.Lock)); + break; + case 4: + reader.readMessage(message.stakes, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.band.restake.v1beta1.Stake.deserialize(reader), dependency_2.band.restake.v1beta1.Stake)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + allowed_denoms?: string[]; + }) { + 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 ("allowed_denoms" in data && data.allowed_denoms != undefined) { + this.allowed_denoms = data.allowed_denoms; + } + } + } + get allowed_denoms() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set allowed_denoms(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + allowed_denoms?: string[]; + }): Params { + const message = new Params({}); + if (data.allowed_denoms != null) { + message.allowed_denoms = data.allowed_denoms; + } + return message; + } + toObject() { + const data: { + allowed_denoms?: string[]; + } = {}; + if (this.allowed_denoms != null) { + data.allowed_denoms = this.allowed_denoms; + } + 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.allowed_denoms.length) + writer.writeRepeatedString(1, this.allowed_denoms); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/codegen/band/restake/v1beta1/genesis_pb.d.ts b/codegen/band/restake/v1beta1/genesis_pb.d.ts new file mode 100644 index 0000000..5e2b017 --- /dev/null +++ b/codegen/band/restake/v1beta1/genesis_pb.d.ts @@ -0,0 +1,69 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as band_restake_v1beta1_types_pb from "../../../band/restake/v1beta1/types_pb"; + +export class GenesisState extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): Params | undefined; + setParams(value?: Params): void; + + clearVaultsList(): void; + getVaultsList(): Array; + setVaultsList(value: Array): void; + addVaults(value?: band_restake_v1beta1_types_pb.Vault, index?: number): band_restake_v1beta1_types_pb.Vault; + + clearLocksList(): void; + getLocksList(): Array; + setLocksList(value: Array): void; + addLocks(value?: band_restake_v1beta1_types_pb.Lock, index?: number): band_restake_v1beta1_types_pb.Lock; + + clearStakesList(): void; + getStakesList(): Array; + setStakesList(value: Array): void; + addStakes(value?: band_restake_v1beta1_types_pb.Stake, index?: number): band_restake_v1beta1_types_pb.Stake; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + params?: Params.AsObject, + vaultsList: Array, + locksList: Array, + stakesList: Array, + } +} + +export class Params extends jspb.Message { + clearAllowedDenomsList(): void; + getAllowedDenomsList(): Array; + setAllowedDenomsList(value: Array): void; + addAllowedDenoms(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + allowedDenomsList: Array, + } +} + diff --git a/codegen/band/restake/v1beta1/genesis_pb.js b/codegen/band/restake/v1beta1/genesis_pb.js new file mode 100644 index 0000000..7028ac7 --- /dev/null +++ b/codegen/band/restake/v1beta1/genesis_pb.js @@ -0,0 +1,539 @@ +// source: band/restake/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var band_restake_v1beta1_types_pb = require('../../../band/restake/v1beta1/types_pb.js'); +goog.object.extend(proto, band_restake_v1beta1_types_pb); +goog.exportSymbol('proto.band.restake.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.Params', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.restake.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.restake.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.band.restake.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.restake.v1beta1.GenesisState.displayName = 'proto.band.restake.v1beta1.GenesisState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.restake.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.restake.v1beta1.Params.repeatedFields_, null); +}; +goog.inherits(proto.band.restake.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.restake.v1beta1.Params.displayName = 'proto.band.restake.v1beta1.Params'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.restake.v1beta1.GenesisState.repeatedFields_ = [2,3,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.restake.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.restake.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && proto.band.restake.v1beta1.Params.toObject(includeInstance, f), + vaultsList: jspb.Message.toObjectList(msg.getVaultsList(), + band_restake_v1beta1_types_pb.Vault.toObject, includeInstance), + locksList: jspb.Message.toObjectList(msg.getLocksList(), + band_restake_v1beta1_types_pb.Lock.toObject, includeInstance), + stakesList: jspb.Message.toObjectList(msg.getStakesList(), + band_restake_v1beta1_types_pb.Stake.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.restake.v1beta1.GenesisState} + */ +proto.band.restake.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.restake.v1beta1.GenesisState; + return proto.band.restake.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.restake.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.restake.v1beta1.GenesisState} + */ +proto.band.restake.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.restake.v1beta1.Params; + reader.readMessage(value,proto.band.restake.v1beta1.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new band_restake_v1beta1_types_pb.Vault; + reader.readMessage(value,band_restake_v1beta1_types_pb.Vault.deserializeBinaryFromReader); + msg.addVaults(value); + break; + case 3: + var value = new band_restake_v1beta1_types_pb.Lock; + reader.readMessage(value,band_restake_v1beta1_types_pb.Lock.deserializeBinaryFromReader); + msg.addLocks(value); + break; + case 4: + var value = new band_restake_v1beta1_types_pb.Stake; + reader.readMessage(value,band_restake_v1beta1_types_pb.Stake.deserializeBinaryFromReader); + msg.addStakes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.restake.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.restake.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.restake.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.restake.v1beta1.Params.serializeBinaryToWriter + ); + } + f = message.getVaultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_restake_v1beta1_types_pb.Vault.serializeBinaryToWriter + ); + } + f = message.getLocksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + band_restake_v1beta1_types_pb.Lock.serializeBinaryToWriter + ); + } + f = message.getStakesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + band_restake_v1beta1_types_pb.Stake.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.restake.v1beta1.Params} + */ +proto.band.restake.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.band.restake.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, proto.band.restake.v1beta1.Params, 1)); +}; + + +/** + * @param {?proto.band.restake.v1beta1.Params|undefined} value + * @return {!proto.band.restake.v1beta1.GenesisState} returns this +*/ +proto.band.restake.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.restake.v1beta1.GenesisState} returns this + */ +proto.band.restake.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.restake.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Vault vaults = 2; + * @return {!Array} + */ +proto.band.restake.v1beta1.GenesisState.prototype.getVaultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_restake_v1beta1_types_pb.Vault, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.restake.v1beta1.GenesisState} returns this +*/ +proto.band.restake.v1beta1.GenesisState.prototype.setVaultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.restake.v1beta1.Vault=} opt_value + * @param {number=} opt_index + * @return {!proto.band.restake.v1beta1.Vault} + */ +proto.band.restake.v1beta1.GenesisState.prototype.addVaults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.restake.v1beta1.Vault, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.restake.v1beta1.GenesisState} returns this + */ +proto.band.restake.v1beta1.GenesisState.prototype.clearVaultsList = function() { + return this.setVaultsList([]); +}; + + +/** + * repeated Lock locks = 3; + * @return {!Array} + */ +proto.band.restake.v1beta1.GenesisState.prototype.getLocksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_restake_v1beta1_types_pb.Lock, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.restake.v1beta1.GenesisState} returns this +*/ +proto.band.restake.v1beta1.GenesisState.prototype.setLocksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.band.restake.v1beta1.Lock=} opt_value + * @param {number=} opt_index + * @return {!proto.band.restake.v1beta1.Lock} + */ +proto.band.restake.v1beta1.GenesisState.prototype.addLocks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.restake.v1beta1.Lock, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.restake.v1beta1.GenesisState} returns this + */ +proto.band.restake.v1beta1.GenesisState.prototype.clearLocksList = function() { + return this.setLocksList([]); +}; + + +/** + * repeated Stake stakes = 4; + * @return {!Array} + */ +proto.band.restake.v1beta1.GenesisState.prototype.getStakesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_restake_v1beta1_types_pb.Stake, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.restake.v1beta1.GenesisState} returns this +*/ +proto.band.restake.v1beta1.GenesisState.prototype.setStakesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.band.restake.v1beta1.Stake=} opt_value + * @param {number=} opt_index + * @return {!proto.band.restake.v1beta1.Stake} + */ +proto.band.restake.v1beta1.GenesisState.prototype.addStakes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.band.restake.v1beta1.Stake, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.restake.v1beta1.GenesisState} returns this + */ +proto.band.restake.v1beta1.GenesisState.prototype.clearStakesList = function() { + return this.setStakesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.restake.v1beta1.Params.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.restake.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.restake.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + allowedDenomsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.restake.v1beta1.Params} + */ +proto.band.restake.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.restake.v1beta1.Params; + return proto.band.restake.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.restake.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.restake.v1beta1.Params} + */ +proto.band.restake.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addAllowedDenoms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.restake.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.restake.v1beta1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.restake.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowedDenomsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string allowed_denoms = 1; + * @return {!Array} + */ +proto.band.restake.v1beta1.Params.prototype.getAllowedDenomsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.restake.v1beta1.Params} returns this + */ +proto.band.restake.v1beta1.Params.prototype.setAllowedDenomsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.band.restake.v1beta1.Params} returns this + */ +proto.band.restake.v1beta1.Params.prototype.addAllowedDenoms = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.restake.v1beta1.Params} returns this + */ +proto.band.restake.v1beta1.Params.prototype.clearAllowedDenomsList = function() { + return this.setAllowedDenomsList([]); +}; + + +goog.object.extend(exports, proto.band.restake.v1beta1); diff --git a/codegen/band/restake/v1beta1/genesis_pb_service.d.ts b/codegen/band/restake/v1beta1/genesis_pb_service.d.ts new file mode 100644 index 0000000..78d83fa --- /dev/null +++ b/codegen/band/restake/v1beta1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/genesis.proto + diff --git a/codegen/band/restake/v1beta1/genesis_pb_service.js b/codegen/band/restake/v1beta1/genesis_pb_service.js new file mode 100644 index 0000000..78d83fa --- /dev/null +++ b/codegen/band/restake/v1beta1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/genesis.proto + diff --git a/codegen/band/restake/v1beta1/query.ts b/codegen/band/restake/v1beta1/query.ts new file mode 100644 index 0000000..1987f42 --- /dev/null +++ b/codegen/band/restake/v1beta1/query.ts @@ -0,0 +1,1020 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/restake/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/api/annotations"; +import * as dependency_3 from "./../../../cosmos/base/query/v1beta1/pagination"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./types"; +import * as dependency_6 from "./genesis"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.restake.v1beta1 { + export class QueryVaultsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_3.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_3.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_3.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_3.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; + }): QueryVaultsRequest { + const message = new QueryVaultsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryVaultsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVaultsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVaultsRequest { + return QueryVaultsRequest.deserialize(bytes); + } + } + export class QueryVaultsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vaults?: dependency_5.band.restake.v1beta1.Vault[]; + pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("vaults" in data && data.vaults != undefined) { + this.vaults = data.vaults; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get vaults() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.restake.v1beta1.Vault, 1) as dependency_5.band.restake.v1beta1.Vault[]; + } + set vaults(value: dependency_5.band.restake.v1beta1.Vault[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_3.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + vaults?: ReturnType[]; + pagination?: ReturnType; + }): QueryVaultsResponse { + const message = new QueryVaultsResponse({}); + if (data.vaults != null) { + message.vaults = data.vaults.map(item => dependency_5.band.restake.v1beta1.Vault.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + vaults?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.vaults != null) { + data.vaults = this.vaults.map((item: dependency_5.band.restake.v1beta1.Vault) => item.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.vaults.length) + writer.writeRepeatedMessage(1, this.vaults, (item: dependency_5.band.restake.v1beta1.Vault) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVaultsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVaultsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.vaults, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.restake.v1beta1.Vault.deserialize(reader), dependency_5.band.restake.v1beta1.Vault)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVaultsResponse { + return QueryVaultsResponse.deserialize(bytes); + } + } + export class QueryVaultRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: 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 ("key" in data && data.key != undefined) { + this.key = data.key; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + key?: string; + }): QueryVaultRequest { + const message = new QueryVaultRequest({}); + if (data.key != null) { + message.key = data.key; + } + return message; + } + toObject() { + const data: { + key?: string; + } = {}; + if (this.key != null) { + data.key = this.key; + } + 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.key.length) + writer.writeString(1, this.key); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVaultRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVaultRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVaultRequest { + return QueryVaultRequest.deserialize(bytes); + } + } + export class QueryVaultResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vault?: dependency_5.band.restake.v1beta1.Vault; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("vault" in data && data.vault != undefined) { + this.vault = data.vault; + } + } + } + get vault() { + return pb_1.Message.getWrapperField(this, dependency_5.band.restake.v1beta1.Vault, 1) as dependency_5.band.restake.v1beta1.Vault; + } + set vault(value: dependency_5.band.restake.v1beta1.Vault) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_vault() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + vault?: ReturnType; + }): QueryVaultResponse { + const message = new QueryVaultResponse({}); + if (data.vault != null) { + message.vault = dependency_5.band.restake.v1beta1.Vault.fromObject(data.vault); + } + return message; + } + toObject() { + const data: { + vault?: ReturnType; + } = {}; + if (this.vault != null) { + data.vault = this.vault.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_vault) + writer.writeMessage(1, this.vault, () => this.vault.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVaultResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVaultResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.vault, () => message.vault = dependency_5.band.restake.v1beta1.Vault.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVaultResponse { + return QueryVaultResponse.deserialize(bytes); + } + } + export class QueryLocksRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + staker_address?: string; + pagination?: dependency_3.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 ("staker_address" in data && data.staker_address != undefined) { + this.staker_address = data.staker_address; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get staker_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set staker_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_3.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + staker_address?: string; + pagination?: ReturnType; + }): QueryLocksRequest { + const message = new QueryLocksRequest({}); + if (data.staker_address != null) { + message.staker_address = data.staker_address; + } + if (data.pagination != null) { + message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + staker_address?: string; + pagination?: ReturnType; + } = {}; + if (this.staker_address != null) { + data.staker_address = this.staker_address; + } + 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.staker_address.length) + writer.writeString(1, this.staker_address); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryLocksRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryLocksRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.staker_address = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryLocksRequest { + return QueryLocksRequest.deserialize(bytes); + } + } + export class QueryLocksResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + locks?: dependency_5.band.restake.v1beta1.LockResponse[]; + pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("locks" in data && data.locks != undefined) { + this.locks = data.locks; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get locks() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.restake.v1beta1.LockResponse, 1) as dependency_5.band.restake.v1beta1.LockResponse[]; + } + set locks(value: dependency_5.band.restake.v1beta1.LockResponse[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_3.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + locks?: ReturnType[]; + pagination?: ReturnType; + }): QueryLocksResponse { + const message = new QueryLocksResponse({}); + if (data.locks != null) { + message.locks = data.locks.map(item => dependency_5.band.restake.v1beta1.LockResponse.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + locks?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.locks != null) { + data.locks = this.locks.map((item: dependency_5.band.restake.v1beta1.LockResponse) => item.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.locks.length) + writer.writeRepeatedMessage(1, this.locks, (item: dependency_5.band.restake.v1beta1.LockResponse) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryLocksResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryLocksResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.locks, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.restake.v1beta1.LockResponse.deserialize(reader), dependency_5.band.restake.v1beta1.LockResponse)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryLocksResponse { + return QueryLocksResponse.deserialize(bytes); + } + } + export class QueryLockRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + staker_address?: string; + key?: 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 ("staker_address" in data && data.staker_address != undefined) { + this.staker_address = data.staker_address; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + } + } + get staker_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set staker_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + staker_address?: string; + key?: string; + }): QueryLockRequest { + const message = new QueryLockRequest({}); + if (data.staker_address != null) { + message.staker_address = data.staker_address; + } + if (data.key != null) { + message.key = data.key; + } + return message; + } + toObject() { + const data: { + staker_address?: string; + key?: string; + } = {}; + if (this.staker_address != null) { + data.staker_address = this.staker_address; + } + if (this.key != null) { + data.key = this.key; + } + 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.staker_address.length) + writer.writeString(1, this.staker_address); + if (this.key.length) + writer.writeString(2, this.key); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryLockRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryLockRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.staker_address = reader.readString(); + break; + case 2: + message.key = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryLockRequest { + return QueryLockRequest.deserialize(bytes); + } + } + export class QueryLockResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + lock?: dependency_5.band.restake.v1beta1.LockResponse; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("lock" in data && data.lock != undefined) { + this.lock = data.lock; + } + } + } + get lock() { + return pb_1.Message.getWrapperField(this, dependency_5.band.restake.v1beta1.LockResponse, 1) as dependency_5.band.restake.v1beta1.LockResponse; + } + set lock(value: dependency_5.band.restake.v1beta1.LockResponse) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_lock() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + lock?: ReturnType; + }): QueryLockResponse { + const message = new QueryLockResponse({}); + if (data.lock != null) { + message.lock = dependency_5.band.restake.v1beta1.LockResponse.fromObject(data.lock); + } + return message; + } + toObject() { + const data: { + lock?: ReturnType; + } = {}; + if (this.lock != null) { + data.lock = this.lock.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_lock) + writer.writeMessage(1, this.lock, () => this.lock.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryLockResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryLockResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.lock, () => message.lock = dependency_5.band.restake.v1beta1.LockResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryLockResponse { + return QueryLockResponse.deserialize(bytes); + } + } + export class QueryStakeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + staker_address?: 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 ("staker_address" in data && data.staker_address != undefined) { + this.staker_address = data.staker_address; + } + } + } + get staker_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set staker_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + staker_address?: string; + }): QueryStakeRequest { + const message = new QueryStakeRequest({}); + if (data.staker_address != null) { + message.staker_address = data.staker_address; + } + return message; + } + toObject() { + const data: { + staker_address?: string; + } = {}; + if (this.staker_address != null) { + data.staker_address = this.staker_address; + } + 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.staker_address.length) + writer.writeString(1, this.staker_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryStakeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryStakeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.staker_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryStakeRequest { + return QueryStakeRequest.deserialize(bytes); + } + } + export class QueryStakeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + stake?: dependency_5.band.restake.v1beta1.Stake; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("stake" in data && data.stake != undefined) { + this.stake = data.stake; + } + } + } + get stake() { + return pb_1.Message.getWrapperField(this, dependency_5.band.restake.v1beta1.Stake, 1) as dependency_5.band.restake.v1beta1.Stake; + } + set stake(value: dependency_5.band.restake.v1beta1.Stake) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_stake() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + stake?: ReturnType; + }): QueryStakeResponse { + const message = new QueryStakeResponse({}); + if (data.stake != null) { + message.stake = dependency_5.band.restake.v1beta1.Stake.fromObject(data.stake); + } + return message; + } + toObject() { + const data: { + stake?: ReturnType; + } = {}; + if (this.stake != null) { + data.stake = this.stake.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_stake) + writer.writeMessage(1, this.stake, () => this.stake.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryStakeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryStakeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.stake, () => message.stake = dependency_5.band.restake.v1beta1.Stake.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryStakeResponse { + return QueryStakeResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_6.band.restake.v1beta1.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_6.band.restake.v1beta1.Params, 1) as dependency_6.band.restake.v1beta1.Params; + } + set params(value: dependency_6.band.restake.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_6.band.restake.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_6.band.restake.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Vaults: { + path: "/band.restake.v1beta1.Query/Vaults", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVaultsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVaultsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVaultsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVaultsResponse.deserialize(new Uint8Array(bytes)) + }, + Vault: { + path: "/band.restake.v1beta1.Query/Vault", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVaultRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVaultRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVaultResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVaultResponse.deserialize(new Uint8Array(bytes)) + }, + Locks: { + path: "/band.restake.v1beta1.Query/Locks", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryLocksRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryLocksRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryLocksResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryLocksResponse.deserialize(new Uint8Array(bytes)) + }, + Lock: { + path: "/band.restake.v1beta1.Query/Lock", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryLockRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryLockRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryLockResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryLockResponse.deserialize(new Uint8Array(bytes)) + }, + Stake: { + path: "/band.restake.v1beta1.Query/Stake", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryStakeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryStakeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryStakeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryStakeResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/band.restake.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Vaults(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Vault(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Locks(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Lock(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Stake(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Vaults: GrpcUnaryServiceInterface = (message: QueryVaultsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Vaults(message, metadata, options, callback); + }; + Vault: GrpcUnaryServiceInterface = (message: QueryVaultRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Vault(message, metadata, options, callback); + }; + Locks: GrpcUnaryServiceInterface = (message: QueryLocksRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Locks(message, metadata, options, callback); + }; + Lock: GrpcUnaryServiceInterface = (message: QueryLockRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Lock(message, metadata, options, callback); + }; + Stake: GrpcUnaryServiceInterface = (message: QueryStakeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Stake(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/restake/v1beta1/query_pb.d.ts b/codegen/band/restake/v1beta1/query_pb.d.ts new file mode 100644 index 0000000..600ab79 --- /dev/null +++ b/codegen/band/restake/v1beta1/query_pb.d.ts @@ -0,0 +1,283 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/query.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as cosmos_base_query_v1beta1_pagination_pb from "../../../cosmos/base/query/v1beta1/pagination_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as band_restake_v1beta1_types_pb from "../../../band/restake/v1beta1/types_pb"; +import * as band_restake_v1beta1_genesis_pb from "../../../band/restake/v1beta1/genesis_pb"; + +export class QueryVaultsRequest extends jspb.Message { + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryVaultsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryVaultsRequest): QueryVaultsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryVaultsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryVaultsRequest; + static deserializeBinaryFromReader(message: QueryVaultsRequest, reader: jspb.BinaryReader): QueryVaultsRequest; +} + +export namespace QueryVaultsRequest { + export type AsObject = { + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryVaultsResponse extends jspb.Message { + clearVaultsList(): void; + getVaultsList(): Array; + setVaultsList(value: Array): void; + addVaults(value?: band_restake_v1beta1_types_pb.Vault, index?: number): band_restake_v1beta1_types_pb.Vault; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryVaultsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryVaultsResponse): QueryVaultsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryVaultsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryVaultsResponse; + static deserializeBinaryFromReader(message: QueryVaultsResponse, reader: jspb.BinaryReader): QueryVaultsResponse; +} + +export namespace QueryVaultsResponse { + export type AsObject = { + vaultsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryVaultRequest extends jspb.Message { + getKey(): string; + setKey(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryVaultRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryVaultRequest): QueryVaultRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryVaultRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryVaultRequest; + static deserializeBinaryFromReader(message: QueryVaultRequest, reader: jspb.BinaryReader): QueryVaultRequest; +} + +export namespace QueryVaultRequest { + export type AsObject = { + key: string, + } +} + +export class QueryVaultResponse extends jspb.Message { + hasVault(): boolean; + clearVault(): void; + getVault(): band_restake_v1beta1_types_pb.Vault | undefined; + setVault(value?: band_restake_v1beta1_types_pb.Vault): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryVaultResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryVaultResponse): QueryVaultResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryVaultResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryVaultResponse; + static deserializeBinaryFromReader(message: QueryVaultResponse, reader: jspb.BinaryReader): QueryVaultResponse; +} + +export namespace QueryVaultResponse { + export type AsObject = { + vault?: band_restake_v1beta1_types_pb.Vault.AsObject, + } +} + +export class QueryLocksRequest extends jspb.Message { + getStakerAddress(): string; + setStakerAddress(value: string): void; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryLocksRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryLocksRequest): QueryLocksRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryLocksRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryLocksRequest; + static deserializeBinaryFromReader(message: QueryLocksRequest, reader: jspb.BinaryReader): QueryLocksRequest; +} + +export namespace QueryLocksRequest { + export type AsObject = { + stakerAddress: string, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryLocksResponse extends jspb.Message { + clearLocksList(): void; + getLocksList(): Array; + setLocksList(value: Array): void; + addLocks(value?: band_restake_v1beta1_types_pb.LockResponse, index?: number): band_restake_v1beta1_types_pb.LockResponse; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryLocksResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryLocksResponse): QueryLocksResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryLocksResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryLocksResponse; + static deserializeBinaryFromReader(message: QueryLocksResponse, reader: jspb.BinaryReader): QueryLocksResponse; +} + +export namespace QueryLocksResponse { + export type AsObject = { + locksList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryLockRequest extends jspb.Message { + getStakerAddress(): string; + setStakerAddress(value: string): void; + + getKey(): string; + setKey(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryLockRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryLockRequest): QueryLockRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryLockRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryLockRequest; + static deserializeBinaryFromReader(message: QueryLockRequest, reader: jspb.BinaryReader): QueryLockRequest; +} + +export namespace QueryLockRequest { + export type AsObject = { + stakerAddress: string, + key: string, + } +} + +export class QueryLockResponse extends jspb.Message { + hasLock(): boolean; + clearLock(): void; + getLock(): band_restake_v1beta1_types_pb.LockResponse | undefined; + setLock(value?: band_restake_v1beta1_types_pb.LockResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryLockResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryLockResponse): QueryLockResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryLockResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryLockResponse; + static deserializeBinaryFromReader(message: QueryLockResponse, reader: jspb.BinaryReader): QueryLockResponse; +} + +export namespace QueryLockResponse { + export type AsObject = { + lock?: band_restake_v1beta1_types_pb.LockResponse.AsObject, + } +} + +export class QueryStakeRequest extends jspb.Message { + getStakerAddress(): string; + setStakerAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryStakeRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryStakeRequest): QueryStakeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryStakeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryStakeRequest; + static deserializeBinaryFromReader(message: QueryStakeRequest, reader: jspb.BinaryReader): QueryStakeRequest; +} + +export namespace QueryStakeRequest { + export type AsObject = { + stakerAddress: string, + } +} + +export class QueryStakeResponse extends jspb.Message { + hasStake(): boolean; + clearStake(): void; + getStake(): band_restake_v1beta1_types_pb.Stake | undefined; + setStake(value?: band_restake_v1beta1_types_pb.Stake): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryStakeResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryStakeResponse): QueryStakeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryStakeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryStakeResponse; + static deserializeBinaryFromReader(message: QueryStakeResponse, reader: jspb.BinaryReader): QueryStakeResponse; +} + +export namespace QueryStakeResponse { + export type AsObject = { + stake?: band_restake_v1beta1_types_pb.Stake.AsObject, + } +} + +export class QueryParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; + static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; +} + +export namespace QueryParamsRequest { + export type AsObject = { + } +} + +export class QueryParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_restake_v1beta1_genesis_pb.Params | undefined; + setParams(value?: band_restake_v1beta1_genesis_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; + static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; +} + +export namespace QueryParamsResponse { + export type AsObject = { + params?: band_restake_v1beta1_genesis_pb.Params.AsObject, + } +} + diff --git a/proto/council/v1beta1/query_pb.js b/codegen/band/restake/v1beta1/query_pb.js similarity index 51% rename from proto/council/v1beta1/query_pb.js rename to codegen/band/restake/v1beta1/query_pb.js index 1337edf..36fc3e1 100644 --- a/proto/council/v1beta1/query_pb.js +++ b/codegen/band/restake/v1beta1/query_pb.js @@ -1,4 +1,4 @@ -// source: council/v1beta1/query.proto +// source: band/restake/v1beta1/query.proto /** * @fileoverview * @enhanceable @@ -15,28 +15,30 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js'); -goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); -var council_v1beta1_types_pb = require('../../council/v1beta1/types_pb.js'); -goog.object.extend(proto, council_v1beta1_types_pb); -goog.exportSymbol('proto.council.v1beta1.QueryCouncilInfoRequest', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryCouncilInfoResponse', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryCouncilInfosRequest', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryCouncilInfosResponse', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryParamsRequest', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryParamsResponse', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryProposalRequest', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryProposalResponse', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryProposalsRequest', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryProposalsResponse', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryTallyResultRequest', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryTallyResultResponse', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryVotesRequest', null, global); -goog.exportSymbol('proto.council.v1beta1.QueryVotesResponse', null, global); +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js'); +goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var band_restake_v1beta1_types_pb = require('../../../band/restake/v1beta1/types_pb.js'); +goog.object.extend(proto, band_restake_v1beta1_types_pb); +var band_restake_v1beta1_genesis_pb = require('../../../band/restake/v1beta1/genesis_pb.js'); +goog.object.extend(proto, band_restake_v1beta1_genesis_pb); +goog.exportSymbol('proto.band.restake.v1beta1.QueryLockRequest', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryLockResponse', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryLocksRequest', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryLocksResponse', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryStakeRequest', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryStakeResponse', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryVaultRequest', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryVaultResponse', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryVaultsRequest', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.QueryVaultsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -47,16 +49,16 @@ goog.exportSymbol('proto.council.v1beta1.QueryVotesResponse', null, global); * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryParamsRequest = function(opt_data) { +proto.band.restake.v1beta1.QueryVaultsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryParamsRequest, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryVaultsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryParamsRequest.displayName = 'proto.council.v1beta1.QueryParamsRequest'; + proto.band.restake.v1beta1.QueryVaultsRequest.displayName = 'proto.band.restake.v1beta1.QueryVaultsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -68,16 +70,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryParamsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.band.restake.v1beta1.QueryVaultsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.restake.v1beta1.QueryVaultsResponse.repeatedFields_, null); }; -goog.inherits(proto.council.v1beta1.QueryParamsResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryVaultsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryParamsResponse.displayName = 'proto.council.v1beta1.QueryParamsResponse'; + proto.band.restake.v1beta1.QueryVaultsResponse.displayName = 'proto.band.restake.v1beta1.QueryVaultsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -89,16 +91,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryCouncilInfoRequest = function(opt_data) { +proto.band.restake.v1beta1.QueryVaultRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryCouncilInfoRequest, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryVaultRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryCouncilInfoRequest.displayName = 'proto.council.v1beta1.QueryCouncilInfoRequest'; + proto.band.restake.v1beta1.QueryVaultRequest.displayName = 'proto.band.restake.v1beta1.QueryVaultRequest'; } /** * Generated by JsPbCodeGenerator. @@ -110,16 +112,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryCouncilInfoResponse = function(opt_data) { +proto.band.restake.v1beta1.QueryVaultResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryCouncilInfoResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryVaultResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryCouncilInfoResponse.displayName = 'proto.council.v1beta1.QueryCouncilInfoResponse'; + proto.band.restake.v1beta1.QueryVaultResponse.displayName = 'proto.band.restake.v1beta1.QueryVaultResponse'; } /** * Generated by JsPbCodeGenerator. @@ -131,16 +133,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryCouncilInfosRequest = function(opt_data) { +proto.band.restake.v1beta1.QueryLocksRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryCouncilInfosRequest, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryLocksRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryCouncilInfosRequest.displayName = 'proto.council.v1beta1.QueryCouncilInfosRequest'; + proto.band.restake.v1beta1.QueryLocksRequest.displayName = 'proto.band.restake.v1beta1.QueryLocksRequest'; } /** * Generated by JsPbCodeGenerator. @@ -152,16 +154,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryCouncilInfosResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.council.v1beta1.QueryCouncilInfosResponse.repeatedFields_, null); +proto.band.restake.v1beta1.QueryLocksResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.restake.v1beta1.QueryLocksResponse.repeatedFields_, null); }; -goog.inherits(proto.council.v1beta1.QueryCouncilInfosResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryLocksResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryCouncilInfosResponse.displayName = 'proto.council.v1beta1.QueryCouncilInfosResponse'; + proto.band.restake.v1beta1.QueryLocksResponse.displayName = 'proto.band.restake.v1beta1.QueryLocksResponse'; } /** * Generated by JsPbCodeGenerator. @@ -173,16 +175,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryProposalRequest = function(opt_data) { +proto.band.restake.v1beta1.QueryLockRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryProposalRequest, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryLockRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryProposalRequest.displayName = 'proto.council.v1beta1.QueryProposalRequest'; + proto.band.restake.v1beta1.QueryLockRequest.displayName = 'proto.band.restake.v1beta1.QueryLockRequest'; } /** * Generated by JsPbCodeGenerator. @@ -194,16 +196,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryProposalResponse = function(opt_data) { +proto.band.restake.v1beta1.QueryLockResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryProposalResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryLockResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryProposalResponse.displayName = 'proto.council.v1beta1.QueryProposalResponse'; + proto.band.restake.v1beta1.QueryLockResponse.displayName = 'proto.band.restake.v1beta1.QueryLockResponse'; } /** * Generated by JsPbCodeGenerator. @@ -215,37 +217,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryProposalsRequest = function(opt_data) { +proto.band.restake.v1beta1.QueryStakeRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryProposalsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.QueryProposalsRequest.displayName = 'proto.council.v1beta1.QueryProposalsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.QueryProposalsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.council.v1beta1.QueryProposalsResponse.repeatedFields_, null); -}; -goog.inherits(proto.council.v1beta1.QueryProposalsResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryStakeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryProposalsResponse.displayName = 'proto.council.v1beta1.QueryProposalsResponse'; + proto.band.restake.v1beta1.QueryStakeRequest.displayName = 'proto.band.restake.v1beta1.QueryStakeRequest'; } /** * Generated by JsPbCodeGenerator. @@ -257,37 +238,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryVotesRequest = function(opt_data) { +proto.band.restake.v1beta1.QueryStakeResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryVotesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.QueryVotesRequest.displayName = 'proto.council.v1beta1.QueryVotesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.QueryVotesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.council.v1beta1.QueryVotesResponse.repeatedFields_, null); -}; -goog.inherits(proto.council.v1beta1.QueryVotesResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryStakeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryVotesResponse.displayName = 'proto.council.v1beta1.QueryVotesResponse'; + proto.band.restake.v1beta1.QueryStakeResponse.displayName = 'proto.band.restake.v1beta1.QueryStakeResponse'; } /** * Generated by JsPbCodeGenerator. @@ -299,16 +259,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryTallyResultRequest = function(opt_data) { +proto.band.restake.v1beta1.QueryParamsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryTallyResultRequest, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryParamsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryTallyResultRequest.displayName = 'proto.council.v1beta1.QueryTallyResultRequest'; + proto.band.restake.v1beta1.QueryParamsRequest.displayName = 'proto.band.restake.v1beta1.QueryParamsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -320,16 +280,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.QueryTallyResultResponse = function(opt_data) { +proto.band.restake.v1beta1.QueryParamsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.QueryTallyResultResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.QueryParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.QueryTallyResultResponse.displayName = 'proto.council.v1beta1.QueryTallyResultResponse'; + proto.band.restake.v1beta1.QueryParamsResponse.displayName = 'proto.band.restake.v1beta1.QueryParamsResponse'; } @@ -347,8 +307,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryParamsRequest.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryVaultsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryVaultsRequest.toObject(opt_includeInstance, this); }; @@ -357,13 +317,13 @@ proto.council.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryVaultsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryVaultsRequest.toObject = function(includeInstance, msg) { var f, obj = { - + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -377,29 +337,34 @@ proto.council.v1beta1.QueryParamsRequest.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryParamsRequest} + * @return {!proto.band.restake.v1beta1.QueryVaultsRequest} */ -proto.council.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryVaultsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryParamsRequest; - return proto.council.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryVaultsRequest; + return proto.band.restake.v1beta1.QueryVaultsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryVaultsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryParamsRequest} + * @return {!proto.band.restake.v1beta1.QueryVaultsRequest} */ -proto.council.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryVaultsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; default: reader.skipField(); break; @@ -413,9 +378,9 @@ proto.council.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryVaultsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryParamsRequest.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryVaultsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -423,16 +388,68 @@ proto.council.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryParamsRequest} message + * @param {!proto.band.restake.v1beta1.QueryVaultsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryVaultsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.band.restake.v1beta1.QueryVaultsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.band.restake.v1beta1.QueryVaultsRequest} returns this +*/ +proto.band.restake.v1beta1.QueryVaultsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.restake.v1beta1.QueryVaultsRequest} returns this + */ +proto.band.restake.v1beta1.QueryVaultsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.restake.v1beta1.QueryVaultsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.restake.v1beta1.QueryVaultsResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -448,8 +465,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryParamsResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryVaultsResponse.toObject(opt_includeInstance, this); }; @@ -458,13 +475,15 @@ proto.council.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryVaultsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryVaultsResponse.toObject = function(includeInstance, msg) { var f, obj = { - params: (f = msg.getParams()) && council_v1beta1_types_pb.Params.toObject(includeInstance, f) + vaultsList: jspb.Message.toObjectList(msg.getVaultsList(), + band_restake_v1beta1_types_pb.Vault.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -478,23 +497,23 @@ proto.council.v1beta1.QueryParamsResponse.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryParamsResponse} + * @return {!proto.band.restake.v1beta1.QueryVaultsResponse} */ -proto.council.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryVaultsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryParamsResponse; - return proto.council.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryVaultsResponse; + return proto.band.restake.v1beta1.QueryVaultsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryVaultsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryParamsResponse} + * @return {!proto.band.restake.v1beta1.QueryVaultsResponse} */ -proto.council.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryVaultsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -502,9 +521,14 @@ proto.council.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new council_v1beta1_types_pb.Params; - reader.readMessage(value,council_v1beta1_types_pb.Params.deserializeBinaryFromReader); - msg.setParams(value); + var value = new band_restake_v1beta1_types_pb.Vault; + reader.readMessage(value,band_restake_v1beta1_types_pb.Vault.deserializeBinaryFromReader); + msg.addVaults(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); break; default: reader.skipField(); @@ -519,9 +543,9 @@ proto.council.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryParamsResponse.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryVaultsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -529,48 +553,94 @@ proto.council.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryParamsResponse} message + * @param {!proto.band.restake.v1beta1.QueryVaultsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryVaultsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getParams(); + f = message.getVaultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_restake_v1beta1_types_pb.Vault.serializeBinaryToWriter + ); + } + f = message.getPagination(); if (f != null) { writer.writeMessage( - 1, + 2, f, - council_v1beta1_types_pb.Params.serializeBinaryToWriter + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter ); } }; /** - * optional Params params = 1; - * @return {?proto.council.v1beta1.Params} + * repeated Vault vaults = 1; + * @return {!Array} */ -proto.council.v1beta1.QueryParamsResponse.prototype.getParams = function() { - return /** @type{?proto.council.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, council_v1beta1_types_pb.Params, 1)); +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.getVaultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_restake_v1beta1_types_pb.Vault, 1)); }; /** - * @param {?proto.council.v1beta1.Params|undefined} value - * @return {!proto.council.v1beta1.QueryParamsResponse} returns this + * @param {!Array} value + * @return {!proto.band.restake.v1beta1.QueryVaultsResponse} returns this */ -proto.council.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.setVaultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.restake.v1beta1.Vault=} opt_value + * @param {number=} opt_index + * @return {!proto.band.restake.v1beta1.Vault} + */ +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.addVaults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.restake.v1beta1.Vault, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.restake.v1beta1.QueryVaultsResponse} returns this + */ +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.clearVaultsList = function() { + return this.setVaultsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.band.restake.v1beta1.QueryVaultsResponse} returns this +*/ +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.QueryParamsResponse} returns this + * @return {!proto.band.restake.v1beta1.QueryVaultsResponse} returns this */ -proto.council.v1beta1.QueryParamsResponse.prototype.clearParams = function() { - return this.setParams(undefined); +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); }; @@ -578,8 +648,8 @@ proto.council.v1beta1.QueryParamsResponse.prototype.clearParams = function() { * Returns whether this field is set. * @return {boolean} */ -proto.council.v1beta1.QueryParamsResponse.prototype.hasParams = function() { - return jspb.Message.getField(this, 1) != null; +proto.band.restake.v1beta1.QueryVaultsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -599,8 +669,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryCouncilInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryCouncilInfoRequest.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryVaultRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryVaultRequest.toObject(opt_includeInstance, this); }; @@ -609,13 +679,13 @@ proto.council.v1beta1.QueryCouncilInfoRequest.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryCouncilInfoRequest} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryVaultRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryCouncilInfoRequest.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryVaultRequest.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, "") + key: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -629,23 +699,23 @@ proto.council.v1beta1.QueryCouncilInfoRequest.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryCouncilInfoRequest} + * @return {!proto.band.restake.v1beta1.QueryVaultRequest} */ -proto.council.v1beta1.QueryCouncilInfoRequest.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryVaultRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryCouncilInfoRequest; - return proto.council.v1beta1.QueryCouncilInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryVaultRequest; + return proto.band.restake.v1beta1.QueryVaultRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryCouncilInfoRequest} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryVaultRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryCouncilInfoRequest} + * @return {!proto.band.restake.v1beta1.QueryVaultRequest} */ -proto.council.v1beta1.QueryCouncilInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryVaultRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -654,7 +724,7 @@ proto.council.v1beta1.QueryCouncilInfoRequest.deserializeBinaryFromReader = func switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setName(value); + msg.setKey(value); break; default: reader.skipField(); @@ -669,9 +739,9 @@ proto.council.v1beta1.QueryCouncilInfoRequest.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryCouncilInfoRequest.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryVaultRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryCouncilInfoRequest.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryVaultRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -679,13 +749,13 @@ proto.council.v1beta1.QueryCouncilInfoRequest.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryCouncilInfoRequest} message + * @param {!proto.band.restake.v1beta1.QueryVaultRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryCouncilInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryVaultRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); + f = message.getKey(); if (f.length > 0) { writer.writeString( 1, @@ -696,19 +766,19 @@ proto.council.v1beta1.QueryCouncilInfoRequest.serializeBinaryToWriter = function /** - * optional string name = 1; + * optional string key = 1; * @return {string} */ -proto.council.v1beta1.QueryCouncilInfoRequest.prototype.getName = function() { +proto.band.restake.v1beta1.QueryVaultRequest.prototype.getKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.council.v1beta1.QueryCouncilInfoRequest} returns this + * @return {!proto.band.restake.v1beta1.QueryVaultRequest} returns this */ -proto.council.v1beta1.QueryCouncilInfoRequest.prototype.setName = function(value) { +proto.band.restake.v1beta1.QueryVaultRequest.prototype.setKey = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -729,8 +799,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryCouncilInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryCouncilInfoResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryVaultResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryVaultResponse.toObject(opt_includeInstance, this); }; @@ -739,13 +809,13 @@ proto.council.v1beta1.QueryCouncilInfoResponse.prototype.toObject = function(opt * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryCouncilInfoResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryVaultResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryCouncilInfoResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryVaultResponse.toObject = function(includeInstance, msg) { var f, obj = { - councilinfo: (f = msg.getCouncilinfo()) && council_v1beta1_types_pb.CouncilInfo.toObject(includeInstance, f) + vault: (f = msg.getVault()) && band_restake_v1beta1_types_pb.Vault.toObject(includeInstance, f) }; if (includeInstance) { @@ -759,23 +829,23 @@ proto.council.v1beta1.QueryCouncilInfoResponse.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryCouncilInfoResponse} + * @return {!proto.band.restake.v1beta1.QueryVaultResponse} */ -proto.council.v1beta1.QueryCouncilInfoResponse.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryVaultResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryCouncilInfoResponse; - return proto.council.v1beta1.QueryCouncilInfoResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryVaultResponse; + return proto.band.restake.v1beta1.QueryVaultResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryCouncilInfoResponse} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryVaultResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryCouncilInfoResponse} + * @return {!proto.band.restake.v1beta1.QueryVaultResponse} */ -proto.council.v1beta1.QueryCouncilInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryVaultResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -783,9 +853,9 @@ proto.council.v1beta1.QueryCouncilInfoResponse.deserializeBinaryFromReader = fun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new council_v1beta1_types_pb.CouncilInfo; - reader.readMessage(value,council_v1beta1_types_pb.CouncilInfo.deserializeBinaryFromReader); - msg.setCouncilinfo(value); + var value = new band_restake_v1beta1_types_pb.Vault; + reader.readMessage(value,band_restake_v1beta1_types_pb.Vault.deserializeBinaryFromReader); + msg.setVault(value); break; default: reader.skipField(); @@ -800,9 +870,9 @@ proto.council.v1beta1.QueryCouncilInfoResponse.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryCouncilInfoResponse.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryVaultResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryCouncilInfoResponse.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryVaultResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -810,48 +880,48 @@ proto.council.v1beta1.QueryCouncilInfoResponse.prototype.serializeBinary = funct /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryCouncilInfoResponse} message + * @param {!proto.band.restake.v1beta1.QueryVaultResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryCouncilInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryVaultResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCouncilinfo(); + f = message.getVault(); if (f != null) { writer.writeMessage( 1, f, - council_v1beta1_types_pb.CouncilInfo.serializeBinaryToWriter + band_restake_v1beta1_types_pb.Vault.serializeBinaryToWriter ); } }; /** - * optional CouncilInfo councilInfo = 1; - * @return {?proto.council.v1beta1.CouncilInfo} + * optional Vault vault = 1; + * @return {?proto.band.restake.v1beta1.Vault} */ -proto.council.v1beta1.QueryCouncilInfoResponse.prototype.getCouncilinfo = function() { - return /** @type{?proto.council.v1beta1.CouncilInfo} */ ( - jspb.Message.getWrapperField(this, council_v1beta1_types_pb.CouncilInfo, 1)); +proto.band.restake.v1beta1.QueryVaultResponse.prototype.getVault = function() { + return /** @type{?proto.band.restake.v1beta1.Vault} */ ( + jspb.Message.getWrapperField(this, band_restake_v1beta1_types_pb.Vault, 1)); }; /** - * @param {?proto.council.v1beta1.CouncilInfo|undefined} value - * @return {!proto.council.v1beta1.QueryCouncilInfoResponse} returns this + * @param {?proto.band.restake.v1beta1.Vault|undefined} value + * @return {!proto.band.restake.v1beta1.QueryVaultResponse} returns this */ -proto.council.v1beta1.QueryCouncilInfoResponse.prototype.setCouncilinfo = function(value) { +proto.band.restake.v1beta1.QueryVaultResponse.prototype.setVault = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.QueryCouncilInfoResponse} returns this + * @return {!proto.band.restake.v1beta1.QueryVaultResponse} returns this */ -proto.council.v1beta1.QueryCouncilInfoResponse.prototype.clearCouncilinfo = function() { - return this.setCouncilinfo(undefined); +proto.band.restake.v1beta1.QueryVaultResponse.prototype.clearVault = function() { + return this.setVault(undefined); }; @@ -859,7 +929,7 @@ proto.council.v1beta1.QueryCouncilInfoResponse.prototype.clearCouncilinfo = func * Returns whether this field is set. * @return {boolean} */ -proto.council.v1beta1.QueryCouncilInfoResponse.prototype.hasCouncilinfo = function() { +proto.band.restake.v1beta1.QueryVaultResponse.prototype.hasVault = function() { return jspb.Message.getField(this, 1) != null; }; @@ -880,8 +950,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryCouncilInfosRequest.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryCouncilInfosRequest.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryLocksRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryLocksRequest.toObject(opt_includeInstance, this); }; @@ -890,12 +960,13 @@ proto.council.v1beta1.QueryCouncilInfosRequest.prototype.toObject = function(opt * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryCouncilInfosRequest} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryLocksRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryCouncilInfosRequest.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryLocksRequest.toObject = function(includeInstance, msg) { var f, obj = { + stakerAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; @@ -910,23 +981,23 @@ proto.council.v1beta1.QueryCouncilInfosRequest.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryCouncilInfosRequest} + * @return {!proto.band.restake.v1beta1.QueryLocksRequest} */ -proto.council.v1beta1.QueryCouncilInfosRequest.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryLocksRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryCouncilInfosRequest; - return proto.council.v1beta1.QueryCouncilInfosRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryLocksRequest; + return proto.band.restake.v1beta1.QueryLocksRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryCouncilInfosRequest} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryLocksRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryCouncilInfosRequest} + * @return {!proto.band.restake.v1beta1.QueryLocksRequest} */ -proto.council.v1beta1.QueryCouncilInfosRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryLocksRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -934,6 +1005,10 @@ proto.council.v1beta1.QueryCouncilInfosRequest.deserializeBinaryFromReader = fun var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setStakerAddress(value); + break; + case 2: var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); msg.setPagination(value); @@ -951,9 +1026,9 @@ proto.council.v1beta1.QueryCouncilInfosRequest.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryCouncilInfosRequest.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryLocksRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryCouncilInfosRequest.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryLocksRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -961,16 +1036,23 @@ proto.council.v1beta1.QueryCouncilInfosRequest.prototype.serializeBinary = funct /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryCouncilInfosRequest} message + * @param {!proto.band.restake.v1beta1.QueryLocksRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryCouncilInfosRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryLocksRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getStakerAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } f = message.getPagination(); if (f != null) { writer.writeMessage( - 1, + 2, f, cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter ); @@ -979,29 +1061,47 @@ proto.council.v1beta1.QueryCouncilInfosRequest.serializeBinaryToWriter = functio /** - * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * optional string staker_address = 1; + * @return {string} + */ +proto.band.restake.v1beta1.QueryLocksRequest.prototype.getStakerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.restake.v1beta1.QueryLocksRequest} returns this + */ +proto.band.restake.v1beta1.QueryLocksRequest.prototype.setStakerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ -proto.council.v1beta1.QueryCouncilInfosRequest.prototype.getPagination = function() { +proto.band.restake.v1beta1.QueryLocksRequest.prototype.getPagination = function() { return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); }; /** * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value - * @return {!proto.council.v1beta1.QueryCouncilInfosRequest} returns this + * @return {!proto.band.restake.v1beta1.QueryLocksRequest} returns this */ -proto.council.v1beta1.QueryCouncilInfosRequest.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.band.restake.v1beta1.QueryLocksRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.QueryCouncilInfosRequest} returns this + * @return {!proto.band.restake.v1beta1.QueryLocksRequest} returns this */ -proto.council.v1beta1.QueryCouncilInfosRequest.prototype.clearPagination = function() { +proto.band.restake.v1beta1.QueryLocksRequest.prototype.clearPagination = function() { return this.setPagination(undefined); }; @@ -1010,8 +1110,8 @@ proto.council.v1beta1.QueryCouncilInfosRequest.prototype.clearPagination = funct * Returns whether this field is set. * @return {boolean} */ -proto.council.v1beta1.QueryCouncilInfosRequest.prototype.hasPagination = function() { - return jspb.Message.getField(this, 1) != null; +proto.band.restake.v1beta1.QueryLocksRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -1021,7 +1121,7 @@ proto.council.v1beta1.QueryCouncilInfosRequest.prototype.hasPagination = functio * @private {!Array} * @const */ -proto.council.v1beta1.QueryCouncilInfosResponse.repeatedFields_ = [1]; +proto.band.restake.v1beta1.QueryLocksResponse.repeatedFields_ = [1]; @@ -1038,8 +1138,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryCouncilInfosResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryLocksResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryLocksResponse.toObject(opt_includeInstance, this); }; @@ -1048,14 +1148,14 @@ proto.council.v1beta1.QueryCouncilInfosResponse.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryCouncilInfosResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryLocksResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryCouncilInfosResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryLocksResponse.toObject = function(includeInstance, msg) { var f, obj = { - councilinfosList: jspb.Message.toObjectList(msg.getCouncilinfosList(), - council_v1beta1_types_pb.CouncilInfo.toObject, includeInstance), + locksList: jspb.Message.toObjectList(msg.getLocksList(), + band_restake_v1beta1_types_pb.LockResponse.toObject, includeInstance), pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; @@ -1070,23 +1170,23 @@ proto.council.v1beta1.QueryCouncilInfosResponse.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryCouncilInfosResponse} + * @return {!proto.band.restake.v1beta1.QueryLocksResponse} */ -proto.council.v1beta1.QueryCouncilInfosResponse.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryLocksResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryCouncilInfosResponse; - return proto.council.v1beta1.QueryCouncilInfosResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryLocksResponse; + return proto.band.restake.v1beta1.QueryLocksResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryCouncilInfosResponse} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryLocksResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryCouncilInfosResponse} + * @return {!proto.band.restake.v1beta1.QueryLocksResponse} */ -proto.council.v1beta1.QueryCouncilInfosResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryLocksResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1094,9 +1194,9 @@ proto.council.v1beta1.QueryCouncilInfosResponse.deserializeBinaryFromReader = fu var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new council_v1beta1_types_pb.CouncilInfo; - reader.readMessage(value,council_v1beta1_types_pb.CouncilInfo.deserializeBinaryFromReader); - msg.addCouncilinfos(value); + var value = new band_restake_v1beta1_types_pb.LockResponse; + reader.readMessage(value,band_restake_v1beta1_types_pb.LockResponse.deserializeBinaryFromReader); + msg.addLocks(value); break; case 2: var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; @@ -1116,9 +1216,9 @@ proto.council.v1beta1.QueryCouncilInfosResponse.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryLocksResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryCouncilInfosResponse.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryLocksResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1126,18 +1226,18 @@ proto.council.v1beta1.QueryCouncilInfosResponse.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryCouncilInfosResponse} message + * @param {!proto.band.restake.v1beta1.QueryLocksResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryCouncilInfosResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryLocksResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCouncilinfosList(); + f = message.getLocksList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - council_v1beta1_types_pb.CouncilInfo.serializeBinaryToWriter + band_restake_v1beta1_types_pb.LockResponse.serializeBinaryToWriter ); } f = message.getPagination(); @@ -1152,40 +1252,40 @@ proto.council.v1beta1.QueryCouncilInfosResponse.serializeBinaryToWriter = functi /** - * repeated CouncilInfo councilInfos = 1; - * @return {!Array} + * repeated LockResponse locks = 1; + * @return {!Array} */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.getCouncilinfosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, council_v1beta1_types_pb.CouncilInfo, 1)); +proto.band.restake.v1beta1.QueryLocksResponse.prototype.getLocksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_restake_v1beta1_types_pb.LockResponse, 1)); }; /** - * @param {!Array} value - * @return {!proto.council.v1beta1.QueryCouncilInfosResponse} returns this + * @param {!Array} value + * @return {!proto.band.restake.v1beta1.QueryLocksResponse} returns this */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.setCouncilinfosList = function(value) { +proto.band.restake.v1beta1.QueryLocksResponse.prototype.setLocksList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.council.v1beta1.CouncilInfo=} opt_value + * @param {!proto.band.restake.v1beta1.LockResponse=} opt_value * @param {number=} opt_index - * @return {!proto.council.v1beta1.CouncilInfo} + * @return {!proto.band.restake.v1beta1.LockResponse} */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.addCouncilinfos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.council.v1beta1.CouncilInfo, opt_index); +proto.band.restake.v1beta1.QueryLocksResponse.prototype.addLocks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.restake.v1beta1.LockResponse, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.council.v1beta1.QueryCouncilInfosResponse} returns this + * @return {!proto.band.restake.v1beta1.QueryLocksResponse} returns this */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.clearCouncilinfosList = function() { - return this.setCouncilinfosList([]); +proto.band.restake.v1beta1.QueryLocksResponse.prototype.clearLocksList = function() { + return this.setLocksList([]); }; @@ -1193,7 +1293,7 @@ proto.council.v1beta1.QueryCouncilInfosResponse.prototype.clearCouncilinfosList * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.getPagination = function() { +proto.band.restake.v1beta1.QueryLocksResponse.prototype.getPagination = function() { return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); }; @@ -1201,18 +1301,18 @@ proto.council.v1beta1.QueryCouncilInfosResponse.prototype.getPagination = functi /** * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value - * @return {!proto.council.v1beta1.QueryCouncilInfosResponse} returns this + * @return {!proto.band.restake.v1beta1.QueryLocksResponse} returns this */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.setPagination = function(value) { +proto.band.restake.v1beta1.QueryLocksResponse.prototype.setPagination = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.QueryCouncilInfosResponse} returns this + * @return {!proto.band.restake.v1beta1.QueryLocksResponse} returns this */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.clearPagination = function() { +proto.band.restake.v1beta1.QueryLocksResponse.prototype.clearPagination = function() { return this.setPagination(undefined); }; @@ -1221,7 +1321,7 @@ proto.council.v1beta1.QueryCouncilInfosResponse.prototype.clearPagination = func * Returns whether this field is set. * @return {boolean} */ -proto.council.v1beta1.QueryCouncilInfosResponse.prototype.hasPagination = function() { +proto.band.restake.v1beta1.QueryLocksResponse.prototype.hasPagination = function() { return jspb.Message.getField(this, 2) != null; }; @@ -1242,8 +1342,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryProposalRequest.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryProposalRequest.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryLockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryLockRequest.toObject(opt_includeInstance, this); }; @@ -1252,13 +1352,14 @@ proto.council.v1beta1.QueryProposalRequest.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryProposalRequest} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryLockRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryProposalRequest.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryLockRequest.toObject = function(includeInstance, msg) { var f, obj = { - proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0) + stakerAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -1272,23 +1373,23 @@ proto.council.v1beta1.QueryProposalRequest.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryProposalRequest} + * @return {!proto.band.restake.v1beta1.QueryLockRequest} */ -proto.council.v1beta1.QueryProposalRequest.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryLockRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryProposalRequest; - return proto.council.v1beta1.QueryProposalRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryLockRequest; + return proto.band.restake.v1beta1.QueryLockRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryProposalRequest} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryLockRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryProposalRequest} + * @return {!proto.band.restake.v1beta1.QueryLockRequest} */ -proto.council.v1beta1.QueryProposalRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryLockRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1296,8 +1397,12 @@ proto.council.v1beta1.QueryProposalRequest.deserializeBinaryFromReader = functio var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProposalId(value); + var value = /** @type {string} */ (reader.readString()); + msg.setStakerAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); break; default: reader.skipField(); @@ -1312,9 +1417,9 @@ proto.council.v1beta1.QueryProposalRequest.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryProposalRequest.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryLockRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryProposalRequest.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryLockRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1322,37 +1427,62 @@ proto.council.v1beta1.QueryProposalRequest.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryProposalRequest} message + * @param {!proto.band.restake.v1beta1.QueryLockRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryProposalRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryLockRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProposalId(); - if (f !== 0) { - writer.writeUint64( + f = message.getStakerAddress(); + if (f.length > 0) { + writer.writeString( 1, f ); } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string staker_address = 1; + * @return {string} + */ +proto.band.restake.v1beta1.QueryLockRequest.prototype.getStakerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional uint64 proposal_id = 1; - * @return {number} + * @param {string} value + * @return {!proto.band.restake.v1beta1.QueryLockRequest} returns this + */ +proto.band.restake.v1beta1.QueryLockRequest.prototype.setStakerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} */ -proto.council.v1beta1.QueryProposalRequest.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.band.restake.v1beta1.QueryLockRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.council.v1beta1.QueryProposalRequest} returns this + * @param {string} value + * @return {!proto.band.restake.v1beta1.QueryLockRequest} returns this */ -proto.council.v1beta1.QueryProposalRequest.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.band.restake.v1beta1.QueryLockRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1372,8 +1502,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryProposalResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryProposalResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryLockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryLockResponse.toObject(opt_includeInstance, this); }; @@ -1382,13 +1512,13 @@ proto.council.v1beta1.QueryProposalResponse.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryProposalResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryLockResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryProposalResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryLockResponse.toObject = function(includeInstance, msg) { var f, obj = { - proposal: (f = msg.getProposal()) && council_v1beta1_types_pb.Proposal.toObject(includeInstance, f) + lock: (f = msg.getLock()) && band_restake_v1beta1_types_pb.LockResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -1402,23 +1532,23 @@ proto.council.v1beta1.QueryProposalResponse.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryProposalResponse} + * @return {!proto.band.restake.v1beta1.QueryLockResponse} */ -proto.council.v1beta1.QueryProposalResponse.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryLockResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryProposalResponse; - return proto.council.v1beta1.QueryProposalResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryLockResponse; + return proto.band.restake.v1beta1.QueryLockResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryProposalResponse} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryLockResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryProposalResponse} + * @return {!proto.band.restake.v1beta1.QueryLockResponse} */ -proto.council.v1beta1.QueryProposalResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryLockResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1426,9 +1556,9 @@ proto.council.v1beta1.QueryProposalResponse.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new council_v1beta1_types_pb.Proposal; - reader.readMessage(value,council_v1beta1_types_pb.Proposal.deserializeBinaryFromReader); - msg.setProposal(value); + var value = new band_restake_v1beta1_types_pb.LockResponse; + reader.readMessage(value,band_restake_v1beta1_types_pb.LockResponse.deserializeBinaryFromReader); + msg.setLock(value); break; default: reader.skipField(); @@ -1443,9 +1573,9 @@ proto.council.v1beta1.QueryProposalResponse.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryProposalResponse.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryLockResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryProposalResponse.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryLockResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1453,48 +1583,48 @@ proto.council.v1beta1.QueryProposalResponse.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryProposalResponse} message + * @param {!proto.band.restake.v1beta1.QueryLockResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryProposalResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryLockResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProposal(); + f = message.getLock(); if (f != null) { writer.writeMessage( 1, f, - council_v1beta1_types_pb.Proposal.serializeBinaryToWriter + band_restake_v1beta1_types_pb.LockResponse.serializeBinaryToWriter ); } }; /** - * optional Proposal proposal = 1; - * @return {?proto.council.v1beta1.Proposal} + * optional LockResponse lock = 1; + * @return {?proto.band.restake.v1beta1.LockResponse} */ -proto.council.v1beta1.QueryProposalResponse.prototype.getProposal = function() { - return /** @type{?proto.council.v1beta1.Proposal} */ ( - jspb.Message.getWrapperField(this, council_v1beta1_types_pb.Proposal, 1)); +proto.band.restake.v1beta1.QueryLockResponse.prototype.getLock = function() { + return /** @type{?proto.band.restake.v1beta1.LockResponse} */ ( + jspb.Message.getWrapperField(this, band_restake_v1beta1_types_pb.LockResponse, 1)); }; /** - * @param {?proto.council.v1beta1.Proposal|undefined} value - * @return {!proto.council.v1beta1.QueryProposalResponse} returns this + * @param {?proto.band.restake.v1beta1.LockResponse|undefined} value + * @return {!proto.band.restake.v1beta1.QueryLockResponse} returns this */ -proto.council.v1beta1.QueryProposalResponse.prototype.setProposal = function(value) { +proto.band.restake.v1beta1.QueryLockResponse.prototype.setLock = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.QueryProposalResponse} returns this + * @return {!proto.band.restake.v1beta1.QueryLockResponse} returns this */ -proto.council.v1beta1.QueryProposalResponse.prototype.clearProposal = function() { - return this.setProposal(undefined); +proto.band.restake.v1beta1.QueryLockResponse.prototype.clearLock = function() { + return this.setLock(undefined); }; @@ -1502,7 +1632,7 @@ proto.council.v1beta1.QueryProposalResponse.prototype.clearProposal = function() * Returns whether this field is set. * @return {boolean} */ -proto.council.v1beta1.QueryProposalResponse.prototype.hasProposal = function() { +proto.band.restake.v1beta1.QueryLockResponse.prototype.hasLock = function() { return jspb.Message.getField(this, 1) != null; }; @@ -1523,8 +1653,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryProposalsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryProposalsRequest.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryStakeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryStakeRequest.toObject(opt_includeInstance, this); }; @@ -1533,16 +1663,13 @@ proto.council.v1beta1.QueryProposalsRequest.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryProposalsRequest} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryStakeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryProposalsRequest.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryStakeRequest.toObject = function(includeInstance, msg) { var f, obj = { - proposalStatus: jspb.Message.getFieldWithDefault(msg, 1, ""), - proposer: jspb.Message.getFieldWithDefault(msg, 2, ""), - council: jspb.Message.getFieldWithDefault(msg, 3, ""), - pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + stakerAddress: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1556,23 +1683,23 @@ proto.council.v1beta1.QueryProposalsRequest.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryProposalsRequest} + * @return {!proto.band.restake.v1beta1.QueryStakeRequest} */ -proto.council.v1beta1.QueryProposalsRequest.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryStakeRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryProposalsRequest; - return proto.council.v1beta1.QueryProposalsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryStakeRequest; + return proto.band.restake.v1beta1.QueryStakeRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryProposalsRequest} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryStakeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryProposalsRequest} + * @return {!proto.band.restake.v1beta1.QueryStakeRequest} */ -proto.council.v1beta1.QueryProposalsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryStakeRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1581,20 +1708,7 @@ proto.council.v1beta1.QueryProposalsRequest.deserializeBinaryFromReader = functi switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setProposalStatus(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setProposer(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setCouncil(value); - break; - case 4: - var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; - reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); - msg.setPagination(value); + msg.setStakerAddress(value); break; default: reader.skipField(); @@ -1609,9 +1723,9 @@ proto.council.v1beta1.QueryProposalsRequest.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryProposalsRequest.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryStakeRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryProposalsRequest.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryStakeRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1619,160 +1733,58 @@ proto.council.v1beta1.QueryProposalsRequest.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryProposalsRequest} message + * @param {!proto.band.restake.v1beta1.QueryStakeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryProposalsRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryStakeRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProposalStatus(); + f = message.getStakerAddress(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getProposer(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getCouncil(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getPagination(); - if (f != null) { - writer.writeMessage( - 4, - f, - cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter - ); - } }; /** - * optional string proposal_status = 1; + * optional string staker_address = 1; * @return {string} */ -proto.council.v1beta1.QueryProposalsRequest.prototype.getProposalStatus = function() { +proto.band.restake.v1beta1.QueryStakeRequest.prototype.getStakerAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.council.v1beta1.QueryProposalsRequest} returns this + * @return {!proto.band.restake.v1beta1.QueryStakeRequest} returns this */ -proto.council.v1beta1.QueryProposalsRequest.prototype.setProposalStatus = function(value) { +proto.band.restake.v1beta1.QueryStakeRequest.prototype.setStakerAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional string proposer = 2; - * @return {string} - */ -proto.council.v1beta1.QueryProposalsRequest.prototype.getProposer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - -/** - * @param {string} value - * @return {!proto.council.v1beta1.QueryProposalsRequest} returns this - */ -proto.council.v1beta1.QueryProposalsRequest.prototype.setProposer = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string council = 3; - * @return {string} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.council.v1beta1.QueryProposalsRequest.prototype.getCouncil = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.QueryProposalsRequest} returns this - */ -proto.council.v1beta1.QueryProposalsRequest.prototype.setCouncil = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional cosmos.base.query.v1beta1.PageRequest pagination = 4; - * @return {?proto.cosmos.base.query.v1beta1.PageRequest} - */ -proto.council.v1beta1.QueryProposalsRequest.prototype.getPagination = function() { - return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 4)); -}; - - -/** - * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value - * @return {!proto.council.v1beta1.QueryProposalsRequest} returns this -*/ -proto.council.v1beta1.QueryProposalsRequest.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.QueryProposalsRequest} returns this - */ -proto.council.v1beta1.QueryProposalsRequest.prototype.clearPagination = function() { - return this.setPagination(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.QueryProposalsRequest.prototype.hasPagination = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.council.v1beta1.QueryProposalsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.QueryProposalsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryProposalsResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryStakeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryStakeResponse.toObject(opt_includeInstance, this); }; @@ -1781,15 +1793,13 @@ proto.council.v1beta1.QueryProposalsResponse.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryProposalsResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryStakeResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryProposalsResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryStakeResponse.toObject = function(includeInstance, msg) { var f, obj = { - proposalsList: jspb.Message.toObjectList(msg.getProposalsList(), - council_v1beta1_types_pb.Proposal.toObject, includeInstance), - pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + stake: (f = msg.getStake()) && band_restake_v1beta1_types_pb.Stake.toObject(includeInstance, f) }; if (includeInstance) { @@ -1803,23 +1813,23 @@ proto.council.v1beta1.QueryProposalsResponse.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryProposalsResponse} + * @return {!proto.band.restake.v1beta1.QueryStakeResponse} */ -proto.council.v1beta1.QueryProposalsResponse.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryStakeResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryProposalsResponse; - return proto.council.v1beta1.QueryProposalsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryStakeResponse; + return proto.band.restake.v1beta1.QueryStakeResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryProposalsResponse} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryStakeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryProposalsResponse} + * @return {!proto.band.restake.v1beta1.QueryStakeResponse} */ -proto.council.v1beta1.QueryProposalsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryStakeResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1827,14 +1837,9 @@ proto.council.v1beta1.QueryProposalsResponse.deserializeBinaryFromReader = funct var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new council_v1beta1_types_pb.Proposal; - reader.readMessage(value,council_v1beta1_types_pb.Proposal.deserializeBinaryFromReader); - msg.addProposals(value); - break; - case 2: - var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; - reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); - msg.setPagination(value); + var value = new band_restake_v1beta1_types_pb.Stake; + reader.readMessage(value,band_restake_v1beta1_types_pb.Stake.deserializeBinaryFromReader); + msg.setStake(value); break; default: reader.skipField(); @@ -1849,9 +1854,9 @@ proto.council.v1beta1.QueryProposalsResponse.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryProposalsResponse.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryStakeResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryProposalsResponse.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryStakeResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1859,94 +1864,48 @@ proto.council.v1beta1.QueryProposalsResponse.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryProposalsResponse} message + * @param {!proto.band.restake.v1beta1.QueryStakeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryProposalsResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryStakeResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProposalsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - council_v1beta1_types_pb.Proposal.serializeBinaryToWriter - ); - } - f = message.getPagination(); + f = message.getStake(); if (f != null) { writer.writeMessage( - 2, + 1, f, - cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + band_restake_v1beta1_types_pb.Stake.serializeBinaryToWriter ); } }; /** - * repeated Proposal proposals = 1; - * @return {!Array} - */ -proto.council.v1beta1.QueryProposalsResponse.prototype.getProposalsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, council_v1beta1_types_pb.Proposal, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.council.v1beta1.QueryProposalsResponse} returns this -*/ -proto.council.v1beta1.QueryProposalsResponse.prototype.setProposalsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.council.v1beta1.Proposal=} opt_value - * @param {number=} opt_index - * @return {!proto.council.v1beta1.Proposal} - */ -proto.council.v1beta1.QueryProposalsResponse.prototype.addProposals = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.council.v1beta1.Proposal, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.council.v1beta1.QueryProposalsResponse} returns this + * optional Stake stake = 1; + * @return {?proto.band.restake.v1beta1.Stake} */ -proto.council.v1beta1.QueryProposalsResponse.prototype.clearProposalsList = function() { - return this.setProposalsList([]); -}; - - -/** - * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; - * @return {?proto.cosmos.base.query.v1beta1.PageResponse} - */ -proto.council.v1beta1.QueryProposalsResponse.prototype.getPagination = function() { - return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +proto.band.restake.v1beta1.QueryStakeResponse.prototype.getStake = function() { + return /** @type{?proto.band.restake.v1beta1.Stake} */ ( + jspb.Message.getWrapperField(this, band_restake_v1beta1_types_pb.Stake, 1)); }; /** - * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value - * @return {!proto.council.v1beta1.QueryProposalsResponse} returns this + * @param {?proto.band.restake.v1beta1.Stake|undefined} value + * @return {!proto.band.restake.v1beta1.QueryStakeResponse} returns this */ -proto.council.v1beta1.QueryProposalsResponse.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.band.restake.v1beta1.QueryStakeResponse.prototype.setStake = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.QueryProposalsResponse} returns this + * @return {!proto.band.restake.v1beta1.QueryStakeResponse} returns this */ -proto.council.v1beta1.QueryProposalsResponse.prototype.clearPagination = function() { - return this.setPagination(undefined); +proto.band.restake.v1beta1.QueryStakeResponse.prototype.clearStake = function() { + return this.setStake(undefined); }; @@ -1954,149 +1913,12 @@ proto.council.v1beta1.QueryProposalsResponse.prototype.clearPagination = functio * Returns whether this field is set. * @return {boolean} */ -proto.council.v1beta1.QueryProposalsResponse.prototype.hasPagination = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.QueryVotesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryVotesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryVotesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.QueryVotesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryVotesRequest} - */ -proto.council.v1beta1.QueryVotesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryVotesRequest; - return proto.council.v1beta1.QueryVotesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryVotesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryVotesRequest} - */ -proto.council.v1beta1.QueryVotesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProposalId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.QueryVotesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryVotesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryVotesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.QueryVotesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProposalId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } -}; - - -/** - * optional uint64 proposal_id = 1; - * @return {number} - */ -proto.council.v1beta1.QueryVotesRequest.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.council.v1beta1.QueryVotesRequest} returns this - */ -proto.council.v1beta1.QueryVotesRequest.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.band.restake.v1beta1.QueryStakeResponse.prototype.hasStake = function() { + return jspb.Message.getField(this, 1) != null; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.council.v1beta1.QueryVotesResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2112,8 +1934,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryVotesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryVotesResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryParamsRequest.toObject(opt_includeInstance, this); }; @@ -2122,166 +1944,13 @@ proto.council.v1beta1.QueryVotesResponse.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryVotesResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryParamsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryVotesResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { var f, obj = { - votesList: jspb.Message.toObjectList(msg.getVotesList(), - council_v1beta1_types_pb.Vote.toObject, includeInstance) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryVotesResponse} - */ -proto.council.v1beta1.QueryVotesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryVotesResponse; - return proto.council.v1beta1.QueryVotesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryVotesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryVotesResponse} - */ -proto.council.v1beta1.QueryVotesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new council_v1beta1_types_pb.Vote; - reader.readMessage(value,council_v1beta1_types_pb.Vote.deserializeBinaryFromReader); - msg.addVotes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.QueryVotesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryVotesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryVotesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.QueryVotesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - council_v1beta1_types_pb.Vote.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Vote votes = 1; - * @return {!Array} - */ -proto.council.v1beta1.QueryVotesResponse.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, council_v1beta1_types_pb.Vote, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.council.v1beta1.QueryVotesResponse} returns this -*/ -proto.council.v1beta1.QueryVotesResponse.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.council.v1beta1.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.council.v1beta1.Vote} - */ -proto.council.v1beta1.QueryVotesResponse.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.council.v1beta1.Vote, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.council.v1beta1.QueryVotesResponse} returns this - */ -proto.council.v1beta1.QueryVotesResponse.prototype.clearVotesList = function() { - return this.setVotesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.QueryTallyResultRequest.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryTallyResultRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryTallyResultRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.QueryTallyResultRequest.toObject = function(includeInstance, msg) { - var f, obj = { - proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -2295,33 +1964,29 @@ proto.council.v1beta1.QueryTallyResultRequest.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryTallyResultRequest} + * @return {!proto.band.restake.v1beta1.QueryParamsRequest} */ -proto.council.v1beta1.QueryTallyResultRequest.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryTallyResultRequest; - return proto.council.v1beta1.QueryTallyResultRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryParamsRequest; + return proto.band.restake.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryTallyResultRequest} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryParamsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryTallyResultRequest} + * @return {!proto.band.restake.v1beta1.QueryParamsRequest} */ -proto.council.v1beta1.QueryTallyResultRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProposalId(value); - break; default: reader.skipField(); break; @@ -2335,9 +2000,9 @@ proto.council.v1beta1.QueryTallyResultRequest.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryTallyResultRequest.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryTallyResultRequest.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryParamsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2345,37 +2010,12 @@ proto.council.v1beta1.QueryTallyResultRequest.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryTallyResultRequest} message + * @param {!proto.band.restake.v1beta1.QueryParamsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryTallyResultRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProposalId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } -}; - - -/** - * optional uint64 proposal_id = 1; - * @return {number} - */ -proto.council.v1beta1.QueryTallyResultRequest.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.council.v1beta1.QueryTallyResultRequest} returns this - */ -proto.council.v1beta1.QueryTallyResultRequest.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2395,8 +2035,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.QueryTallyResultResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.QueryTallyResultResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.QueryParamsResponse.toObject(opt_includeInstance, this); }; @@ -2405,13 +2045,13 @@ proto.council.v1beta1.QueryTallyResultResponse.prototype.toObject = function(opt * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.QueryTallyResultResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.QueryParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryTallyResultResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { var f, obj = { - tally: (f = msg.getTally()) && council_v1beta1_types_pb.TallyResult.toObject(includeInstance, f) + params: (f = msg.getParams()) && band_restake_v1beta1_genesis_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -2425,23 +2065,23 @@ proto.council.v1beta1.QueryTallyResultResponse.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.QueryTallyResultResponse} + * @return {!proto.band.restake.v1beta1.QueryParamsResponse} */ -proto.council.v1beta1.QueryTallyResultResponse.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.QueryTallyResultResponse; - return proto.council.v1beta1.QueryTallyResultResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.QueryParamsResponse; + return proto.band.restake.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.QueryTallyResultResponse} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.QueryParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.QueryTallyResultResponse} + * @return {!proto.band.restake.v1beta1.QueryParamsResponse} */ -proto.council.v1beta1.QueryTallyResultResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2449,9 +2089,9 @@ proto.council.v1beta1.QueryTallyResultResponse.deserializeBinaryFromReader = fun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new council_v1beta1_types_pb.TallyResult; - reader.readMessage(value,council_v1beta1_types_pb.TallyResult.deserializeBinaryFromReader); - msg.setTally(value); + var value = new band_restake_v1beta1_genesis_pb.Params; + reader.readMessage(value,band_restake_v1beta1_genesis_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); break; default: reader.skipField(); @@ -2466,9 +2106,9 @@ proto.council.v1beta1.QueryTallyResultResponse.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.QueryTallyResultResponse.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.QueryTallyResultResponse.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.QueryParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2476,48 +2116,48 @@ proto.council.v1beta1.QueryTallyResultResponse.prototype.serializeBinary = funct /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.QueryTallyResultResponse} message + * @param {!proto.band.restake.v1beta1.QueryParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.QueryTallyResultResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTally(); + f = message.getParams(); if (f != null) { writer.writeMessage( 1, f, - council_v1beta1_types_pb.TallyResult.serializeBinaryToWriter + band_restake_v1beta1_genesis_pb.Params.serializeBinaryToWriter ); } }; /** - * optional TallyResult tally = 1; - * @return {?proto.council.v1beta1.TallyResult} + * optional Params params = 1; + * @return {?proto.band.restake.v1beta1.Params} */ -proto.council.v1beta1.QueryTallyResultResponse.prototype.getTally = function() { - return /** @type{?proto.council.v1beta1.TallyResult} */ ( - jspb.Message.getWrapperField(this, council_v1beta1_types_pb.TallyResult, 1)); +proto.band.restake.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.band.restake.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_restake_v1beta1_genesis_pb.Params, 1)); }; /** - * @param {?proto.council.v1beta1.TallyResult|undefined} value - * @return {!proto.council.v1beta1.QueryTallyResultResponse} returns this + * @param {?proto.band.restake.v1beta1.Params|undefined} value + * @return {!proto.band.restake.v1beta1.QueryParamsResponse} returns this */ -proto.council.v1beta1.QueryTallyResultResponse.prototype.setTally = function(value) { +proto.band.restake.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.QueryTallyResultResponse} returns this + * @return {!proto.band.restake.v1beta1.QueryParamsResponse} returns this */ -proto.council.v1beta1.QueryTallyResultResponse.prototype.clearTally = function() { - return this.setTally(undefined); +proto.band.restake.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); }; @@ -2525,9 +2165,9 @@ proto.council.v1beta1.QueryTallyResultResponse.prototype.clearTally = function() * Returns whether this field is set. * @return {boolean} */ -proto.council.v1beta1.QueryTallyResultResponse.prototype.hasTally = function() { +proto.band.restake.v1beta1.QueryParamsResponse.prototype.hasParams = function() { return jspb.Message.getField(this, 1) != null; }; -goog.object.extend(exports, proto.council.v1beta1); +goog.object.extend(exports, proto.band.restake.v1beta1); diff --git a/codegen/band/restake/v1beta1/query_pb_service.d.ts b/codegen/band/restake/v1beta1/query_pb_service.d.ts new file mode 100644 index 0000000..7119668 --- /dev/null +++ b/codegen/band/restake/v1beta1/query_pb_service.d.ts @@ -0,0 +1,158 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/query.proto + +import * as band_restake_v1beta1_query_pb from "../../../band/restake/v1beta1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryVaults = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_restake_v1beta1_query_pb.QueryVaultsRequest; + readonly responseType: typeof band_restake_v1beta1_query_pb.QueryVaultsResponse; +}; + +type QueryVault = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_restake_v1beta1_query_pb.QueryVaultRequest; + readonly responseType: typeof band_restake_v1beta1_query_pb.QueryVaultResponse; +}; + +type QueryLocks = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_restake_v1beta1_query_pb.QueryLocksRequest; + readonly responseType: typeof band_restake_v1beta1_query_pb.QueryLocksResponse; +}; + +type QueryLock = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_restake_v1beta1_query_pb.QueryLockRequest; + readonly responseType: typeof band_restake_v1beta1_query_pb.QueryLockResponse; +}; + +type QueryStake = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_restake_v1beta1_query_pb.QueryStakeRequest; + readonly responseType: typeof band_restake_v1beta1_query_pb.QueryStakeResponse; +}; + +type QueryParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_restake_v1beta1_query_pb.QueryParamsRequest; + readonly responseType: typeof band_restake_v1beta1_query_pb.QueryParamsResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly Vaults: QueryVaults; + static readonly Vault: QueryVault; + static readonly Locks: QueryLocks; + static readonly Lock: QueryLock; + static readonly Stake: QueryStake; + static readonly Params: QueryParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + vaults( + requestMessage: band_restake_v1beta1_query_pb.QueryVaultsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryVaultsResponse|null) => void + ): UnaryResponse; + vaults( + requestMessage: band_restake_v1beta1_query_pb.QueryVaultsRequest, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryVaultsResponse|null) => void + ): UnaryResponse; + vault( + requestMessage: band_restake_v1beta1_query_pb.QueryVaultRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryVaultResponse|null) => void + ): UnaryResponse; + vault( + requestMessage: band_restake_v1beta1_query_pb.QueryVaultRequest, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryVaultResponse|null) => void + ): UnaryResponse; + locks( + requestMessage: band_restake_v1beta1_query_pb.QueryLocksRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryLocksResponse|null) => void + ): UnaryResponse; + locks( + requestMessage: band_restake_v1beta1_query_pb.QueryLocksRequest, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryLocksResponse|null) => void + ): UnaryResponse; + lock( + requestMessage: band_restake_v1beta1_query_pb.QueryLockRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryLockResponse|null) => void + ): UnaryResponse; + lock( + requestMessage: band_restake_v1beta1_query_pb.QueryLockRequest, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryLockResponse|null) => void + ): UnaryResponse; + stake( + requestMessage: band_restake_v1beta1_query_pb.QueryStakeRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryStakeResponse|null) => void + ): UnaryResponse; + stake( + requestMessage: band_restake_v1beta1_query_pb.QueryStakeRequest, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryStakeResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_restake_v1beta1_query_pb.QueryParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_restake_v1beta1_query_pb.QueryParamsRequest, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/restake/v1beta1/query_pb_service.js b/codegen/band/restake/v1beta1/query_pb_service.js new file mode 100644 index 0000000..19fd34c --- /dev/null +++ b/codegen/band/restake/v1beta1/query_pb_service.js @@ -0,0 +1,261 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/query.proto + +var band_restake_v1beta1_query_pb = require("../../../band/restake/v1beta1/query_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Query = (function () { + function Query() {} + Query.serviceName = "band.restake.v1beta1.Query"; + return Query; +}()); + +Query.Vaults = { + methodName: "Vaults", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_restake_v1beta1_query_pb.QueryVaultsRequest, + responseType: band_restake_v1beta1_query_pb.QueryVaultsResponse +}; + +Query.Vault = { + methodName: "Vault", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_restake_v1beta1_query_pb.QueryVaultRequest, + responseType: band_restake_v1beta1_query_pb.QueryVaultResponse +}; + +Query.Locks = { + methodName: "Locks", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_restake_v1beta1_query_pb.QueryLocksRequest, + responseType: band_restake_v1beta1_query_pb.QueryLocksResponse +}; + +Query.Lock = { + methodName: "Lock", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_restake_v1beta1_query_pb.QueryLockRequest, + responseType: band_restake_v1beta1_query_pb.QueryLockResponse +}; + +Query.Stake = { + methodName: "Stake", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_restake_v1beta1_query_pb.QueryStakeRequest, + responseType: band_restake_v1beta1_query_pb.QueryStakeResponse +}; + +Query.Params = { + methodName: "Params", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_restake_v1beta1_query_pb.QueryParamsRequest, + responseType: band_restake_v1beta1_query_pb.QueryParamsResponse +}; + +exports.Query = Query; + +function QueryClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +QueryClient.prototype.vaults = function vaults(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Vaults, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.vault = function vault(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Vault, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.locks = function locks(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Locks, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.lock = function lock(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Lock, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.stake = function stake(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Stake, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Params, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.QueryClient = QueryClient; + diff --git a/codegen/band/restake/v1beta1/tx.ts b/codegen/band/restake/v1beta1/tx.ts new file mode 100644 index 0000000..2a0dd70 --- /dev/null +++ b/codegen/band/restake/v1beta1/tx.ts @@ -0,0 +1,481 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/restake/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../cosmos/msg/v1/msg"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../../cosmos/base/v1beta1/coin"; +import * as dependency_6 from "./genesis"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.restake.v1beta1 { + export class MsgStake extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + staker_address?: string; + coins?: dependency_5.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("staker_address" in data && data.staker_address != undefined) { + this.staker_address = data.staker_address; + } + if ("coins" in data && data.coins != undefined) { + this.coins = data.coins; + } + } + } + get staker_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set staker_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get coins() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 2) as dependency_5.cosmos.base.v1beta1.Coin[]; + } + set coins(value: dependency_5.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + staker_address?: string; + coins?: ReturnType[]; + }): MsgStake { + const message = new MsgStake({}); + if (data.staker_address != null) { + message.staker_address = data.staker_address; + } + if (data.coins != null) { + message.coins = data.coins.map(item => dependency_5.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + staker_address?: string; + coins?: ReturnType[]; + } = {}; + if (this.staker_address != null) { + data.staker_address = this.staker_address; + } + if (this.coins != null) { + data.coins = this.coins.map((item: dependency_5.cosmos.base.v1beta1.Coin) => item.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.staker_address.length) + writer.writeString(1, this.staker_address); + if (this.coins.length) + writer.writeRepeatedMessage(2, this.coins, (item: dependency_5.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgStake { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgStake(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.staker_address = reader.readString(); + break; + case 2: + reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_5.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgStake { + return MsgStake.deserialize(bytes); + } + } + export class MsgStakeResponse 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: {}): MsgStakeResponse { + const message = new MsgStakeResponse({}); + 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): MsgStakeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgStakeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgStakeResponse { + return MsgStakeResponse.deserialize(bytes); + } + } + export class MsgUnstake extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + staker_address?: string; + coins?: dependency_5.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("staker_address" in data && data.staker_address != undefined) { + this.staker_address = data.staker_address; + } + if ("coins" in data && data.coins != undefined) { + this.coins = data.coins; + } + } + } + get staker_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set staker_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get coins() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 2) as dependency_5.cosmos.base.v1beta1.Coin[]; + } + set coins(value: dependency_5.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + staker_address?: string; + coins?: ReturnType[]; + }): MsgUnstake { + const message = new MsgUnstake({}); + if (data.staker_address != null) { + message.staker_address = data.staker_address; + } + if (data.coins != null) { + message.coins = data.coins.map(item => dependency_5.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + staker_address?: string; + coins?: ReturnType[]; + } = {}; + if (this.staker_address != null) { + data.staker_address = this.staker_address; + } + if (this.coins != null) { + data.coins = this.coins.map((item: dependency_5.cosmos.base.v1beta1.Coin) => item.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.staker_address.length) + writer.writeString(1, this.staker_address); + if (this.coins.length) + writer.writeRepeatedMessage(2, this.coins, (item: dependency_5.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUnstake { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUnstake(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.staker_address = reader.readString(); + break; + case 2: + reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_5.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUnstake { + return MsgUnstake.deserialize(bytes); + } + } + export class MsgUnstakeResponse 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: {}): MsgUnstakeResponse { + const message = new MsgUnstakeResponse({}); + 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): MsgUnstakeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUnstakeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUnstakeResponse { + return MsgUnstakeResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_6.band.restake.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_6.band.restake.v1beta1.Params, 2) as dependency_6.band.restake.v1beta1.Params; + } + set params(value: dependency_6.band.restake.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_6.band.restake.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_6.band.restake.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + Stake: { + path: "/band.restake.v1beta1.Msg/Stake", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgStake) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgStake.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgStakeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgStakeResponse.deserialize(new Uint8Array(bytes)) + }, + Unstake: { + path: "/band.restake.v1beta1.Msg/Unstake", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUnstake) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUnstake.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUnstakeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUnstakeResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/band.restake.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Stake(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Unstake(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Stake: GrpcUnaryServiceInterface = (message: MsgStake, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Stake(message, metadata, options, callback); + }; + Unstake: GrpcUnaryServiceInterface = (message: MsgUnstake, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Unstake(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/restake/v1beta1/tx_pb.d.ts b/codegen/band/restake/v1beta1/tx_pb.d.ts new file mode 100644 index 0000000..8096332 --- /dev/null +++ b/codegen/band/restake/v1beta1/tx_pb.d.ts @@ -0,0 +1,137 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/tx.proto + +import * as jspb from "google-protobuf"; +import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; +import * as band_restake_v1beta1_genesis_pb from "../../../band/restake/v1beta1/genesis_pb"; + +export class MsgStake extends jspb.Message { + getStakerAddress(): string; + setStakerAddress(value: string): void; + + clearCoinsList(): void; + getCoinsList(): Array; + setCoinsList(value: Array): void; + addCoins(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgStake.AsObject; + static toObject(includeInstance: boolean, msg: MsgStake): MsgStake.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgStake, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgStake; + static deserializeBinaryFromReader(message: MsgStake, reader: jspb.BinaryReader): MsgStake; +} + +export namespace MsgStake { + export type AsObject = { + stakerAddress: string, + coinsList: Array, + } +} + +export class MsgStakeResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgStakeResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgStakeResponse): MsgStakeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgStakeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgStakeResponse; + static deserializeBinaryFromReader(message: MsgStakeResponse, reader: jspb.BinaryReader): MsgStakeResponse; +} + +export namespace MsgStakeResponse { + export type AsObject = { + } +} + +export class MsgUnstake extends jspb.Message { + getStakerAddress(): string; + setStakerAddress(value: string): void; + + clearCoinsList(): void; + getCoinsList(): Array; + setCoinsList(value: Array): void; + addCoins(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUnstake.AsObject; + static toObject(includeInstance: boolean, msg: MsgUnstake): MsgUnstake.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUnstake, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUnstake; + static deserializeBinaryFromReader(message: MsgUnstake, reader: jspb.BinaryReader): MsgUnstake; +} + +export namespace MsgUnstake { + export type AsObject = { + stakerAddress: string, + coinsList: Array, + } +} + +export class MsgUnstakeResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUnstakeResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUnstakeResponse): MsgUnstakeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUnstakeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUnstakeResponse; + static deserializeBinaryFromReader(message: MsgUnstakeResponse, reader: jspb.BinaryReader): MsgUnstakeResponse; +} + +export namespace MsgUnstakeResponse { + export type AsObject = { + } +} + +export class MsgUpdateParams extends jspb.Message { + getAuthority(): string; + setAuthority(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): band_restake_v1beta1_genesis_pb.Params | undefined; + setParams(value?: band_restake_v1beta1_genesis_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + authority: string, + params?: band_restake_v1beta1_genesis_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + diff --git a/proto/council/v1beta1/tx_pb.js b/codegen/band/restake/v1beta1/tx_pb.js similarity index 51% rename from proto/council/v1beta1/tx_pb.js rename to codegen/band/restake/v1beta1/tx_pb.js index ae0d08f..c6ad50d 100644 --- a/proto/council/v1beta1/tx_pb.js +++ b/codegen/band/restake/v1beta1/tx_pb.js @@ -1,4 +1,4 @@ -// source: council/v1beta1/tx.proto +// source: band/restake/v1beta1/tx.proto /** * @fileoverview * @enhanceable @@ -15,24 +15,24 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +var amino_amino_pb = require('../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, google_protobuf_any_pb); -var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); -goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js'); +var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); -var cosmos_params_v1beta1_params_pb = require('../../cosmos/params/v1beta1/params_pb.js'); -goog.object.extend(proto, cosmos_params_v1beta1_params_pb); -var council_v1beta1_types_pb = require('../../council/v1beta1/types_pb.js'); -goog.object.extend(proto, council_v1beta1_types_pb); -goog.exportSymbol('proto.council.v1beta1.MsgExecLegacyContent', null, global); -goog.exportSymbol('proto.council.v1beta1.MsgExecLegacyContentResponse', null, global); -goog.exportSymbol('proto.council.v1beta1.MsgSubmitProposal', null, global); -goog.exportSymbol('proto.council.v1beta1.MsgSubmitProposalResponse', null, global); -goog.exportSymbol('proto.council.v1beta1.MsgVote', null, global); -goog.exportSymbol('proto.council.v1beta1.MsgVoteResponse', null, global); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var band_restake_v1beta1_genesis_pb = require('../../../band/restake/v1beta1/genesis_pb.js'); +goog.object.extend(proto, band_restake_v1beta1_genesis_pb); +goog.exportSymbol('proto.band.restake.v1beta1.MsgStake', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.MsgStakeResponse', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.MsgUnstake', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.MsgUnstakeResponse', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.MsgUpdateParamsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -43,16 +43,16 @@ goog.exportSymbol('proto.council.v1beta1.MsgVoteResponse', null, global); * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.MsgSubmitProposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.council.v1beta1.MsgSubmitProposal.repeatedFields_, null); +proto.band.restake.v1beta1.MsgStake = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.restake.v1beta1.MsgStake.repeatedFields_, null); }; -goog.inherits(proto.council.v1beta1.MsgSubmitProposal, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.MsgStake, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.MsgSubmitProposal.displayName = 'proto.council.v1beta1.MsgSubmitProposal'; + proto.band.restake.v1beta1.MsgStake.displayName = 'proto.band.restake.v1beta1.MsgStake'; } /** * Generated by JsPbCodeGenerator. @@ -64,16 +64,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.MsgSubmitProposalResponse = function(opt_data) { +proto.band.restake.v1beta1.MsgStakeResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.MsgSubmitProposalResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.MsgStakeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.MsgSubmitProposalResponse.displayName = 'proto.council.v1beta1.MsgSubmitProposalResponse'; + proto.band.restake.v1beta1.MsgStakeResponse.displayName = 'proto.band.restake.v1beta1.MsgStakeResponse'; } /** * Generated by JsPbCodeGenerator. @@ -85,16 +85,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.MsgExecLegacyContent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.band.restake.v1beta1.MsgUnstake = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.restake.v1beta1.MsgUnstake.repeatedFields_, null); }; -goog.inherits(proto.council.v1beta1.MsgExecLegacyContent, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.MsgUnstake, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.MsgExecLegacyContent.displayName = 'proto.council.v1beta1.MsgExecLegacyContent'; + proto.band.restake.v1beta1.MsgUnstake.displayName = 'proto.band.restake.v1beta1.MsgUnstake'; } /** * Generated by JsPbCodeGenerator. @@ -106,16 +106,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.MsgExecLegacyContentResponse = function(opt_data) { +proto.band.restake.v1beta1.MsgUnstakeResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.MsgExecLegacyContentResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.MsgUnstakeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.MsgExecLegacyContentResponse.displayName = 'proto.council.v1beta1.MsgExecLegacyContentResponse'; + proto.band.restake.v1beta1.MsgUnstakeResponse.displayName = 'proto.band.restake.v1beta1.MsgUnstakeResponse'; } /** * Generated by JsPbCodeGenerator. @@ -127,16 +127,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.MsgVote = function(opt_data) { +proto.band.restake.v1beta1.MsgUpdateParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.MsgVote, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.MsgUpdateParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.MsgVote.displayName = 'proto.council.v1beta1.MsgVote'; + proto.band.restake.v1beta1.MsgUpdateParams.displayName = 'proto.band.restake.v1beta1.MsgUpdateParams'; } /** * Generated by JsPbCodeGenerator. @@ -148,16 +148,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.council.v1beta1.MsgVoteResponse = function(opt_data) { +proto.band.restake.v1beta1.MsgUpdateParamsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.council.v1beta1.MsgVoteResponse, jspb.Message); +goog.inherits(proto.band.restake.v1beta1.MsgUpdateParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.council.v1beta1.MsgVoteResponse.displayName = 'proto.council.v1beta1.MsgVoteResponse'; + proto.band.restake.v1beta1.MsgUpdateParamsResponse.displayName = 'proto.band.restake.v1beta1.MsgUpdateParamsResponse'; } /** @@ -165,7 +165,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.council.v1beta1.MsgSubmitProposal.repeatedFields_ = [3]; +proto.band.restake.v1beta1.MsgStake.repeatedFields_ = [2]; @@ -182,8 +182,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.MsgSubmitProposal.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.MsgSubmitProposal.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.MsgStake.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.MsgStake.toObject(opt_includeInstance, this); }; @@ -192,18 +192,15 @@ proto.council.v1beta1.MsgSubmitProposal.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.MsgSubmitProposal} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.MsgStake} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgSubmitProposal.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.MsgStake.toObject = function(includeInstance, msg) { var f, obj = { - council: jspb.Message.getFieldWithDefault(msg, 1, 0), - proposer: jspb.Message.getFieldWithDefault(msg, 2, ""), - messagesList: jspb.Message.toObjectList(msg.getMessagesList(), - google_protobuf_any_pb.Any.toObject, includeInstance), - title: jspb.Message.getFieldWithDefault(msg, 4, ""), - metadata: jspb.Message.getFieldWithDefault(msg, 5, "") + stakerAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + coinsList: jspb.Message.toObjectList(msg.getCoinsList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) }; if (includeInstance) { @@ -217,23 +214,23 @@ proto.council.v1beta1.MsgSubmitProposal.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.MsgSubmitProposal} + * @return {!proto.band.restake.v1beta1.MsgStake} */ -proto.council.v1beta1.MsgSubmitProposal.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.MsgStake.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.MsgSubmitProposal; - return proto.council.v1beta1.MsgSubmitProposal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.MsgStake; + return proto.band.restake.v1beta1.MsgStake.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.MsgSubmitProposal} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.MsgStake} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.MsgSubmitProposal} + * @return {!proto.band.restake.v1beta1.MsgStake} */ -proto.council.v1beta1.MsgSubmitProposal.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.MsgStake.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -241,25 +238,13 @@ proto.council.v1beta1.MsgSubmitProposal.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.council.v1beta1.CouncilType} */ (reader.readEnum()); - msg.setCouncil(value); - break; - case 2: var value = /** @type {string} */ (reader.readString()); - msg.setProposer(value); + msg.setStakerAddress(value); break; - case 3: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.addMessages(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setTitle(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setMetadata(value); + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addCoins(value); break; default: reader.skipField(); @@ -274,9 +259,9 @@ proto.council.v1beta1.MsgSubmitProposal.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.MsgSubmitProposal.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.MsgStake.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.MsgSubmitProposal.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.MsgStake.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -284,158 +269,83 @@ proto.council.v1beta1.MsgSubmitProposal.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.MsgSubmitProposal} message + * @param {!proto.band.restake.v1beta1.MsgStake} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgSubmitProposal.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.MsgStake.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCouncil(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getProposer(); + f = message.getStakerAddress(); if (f.length > 0) { writer.writeString( - 2, + 1, f ); } - f = message.getMessagesList(); + f = message.getCoinsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 3, + 2, f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } - f = message.getTitle(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getMetadata(); - if (f.length > 0) { - writer.writeString( - 5, - f + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } }; /** - * optional CouncilType council = 1; - * @return {!proto.council.v1beta1.CouncilType} - */ -proto.council.v1beta1.MsgSubmitProposal.prototype.getCouncil = function() { - return /** @type {!proto.council.v1beta1.CouncilType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.council.v1beta1.CouncilType} value - * @return {!proto.council.v1beta1.MsgSubmitProposal} returns this - */ -proto.council.v1beta1.MsgSubmitProposal.prototype.setCouncil = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string proposer = 2; + * optional string staker_address = 1; * @return {string} */ -proto.council.v1beta1.MsgSubmitProposal.prototype.getProposer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.band.restake.v1beta1.MsgStake.prototype.getStakerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.council.v1beta1.MsgSubmitProposal} returns this + * @return {!proto.band.restake.v1beta1.MsgStake} returns this */ -proto.council.v1beta1.MsgSubmitProposal.prototype.setProposer = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.band.restake.v1beta1.MsgStake.prototype.setStakerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated google.protobuf.Any messages = 3; - * @return {!Array} + * repeated cosmos.base.v1beta1.Coin coins = 2; + * @return {!Array} */ -proto.council.v1beta1.MsgSubmitProposal.prototype.getMessagesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3)); +proto.band.restake.v1beta1.MsgStake.prototype.getCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); }; /** - * @param {!Array} value - * @return {!proto.council.v1beta1.MsgSubmitProposal} returns this + * @param {!Array} value + * @return {!proto.band.restake.v1beta1.MsgStake} returns this */ -proto.council.v1beta1.MsgSubmitProposal.prototype.setMessagesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.band.restake.v1beta1.MsgStake.prototype.setCoinsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {!proto.google.protobuf.Any=} opt_value + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value * @param {number=} opt_index - * @return {!proto.google.protobuf.Any} + * @return {!proto.cosmos.base.v1beta1.Coin} */ -proto.council.v1beta1.MsgSubmitProposal.prototype.addMessages = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index); +proto.band.restake.v1beta1.MsgStake.prototype.addCoins = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.council.v1beta1.MsgSubmitProposal} returns this + * @return {!proto.band.restake.v1beta1.MsgStake} returns this */ -proto.council.v1beta1.MsgSubmitProposal.prototype.clearMessagesList = function() { - return this.setMessagesList([]); -}; - - -/** - * optional string title = 4; - * @return {string} - */ -proto.council.v1beta1.MsgSubmitProposal.prototype.getTitle = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.MsgSubmitProposal} returns this - */ -proto.council.v1beta1.MsgSubmitProposal.prototype.setTitle = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string metadata = 5; - * @return {string} - */ -proto.council.v1beta1.MsgSubmitProposal.prototype.getMetadata = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.MsgSubmitProposal} returns this - */ -proto.council.v1beta1.MsgSubmitProposal.prototype.setMetadata = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.band.restake.v1beta1.MsgStake.prototype.clearCoinsList = function() { + return this.setCoinsList([]); }; @@ -455,8 +365,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.MsgSubmitProposalResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.MsgSubmitProposalResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.MsgStakeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.MsgStakeResponse.toObject(opt_includeInstance, this); }; @@ -465,13 +375,13 @@ proto.council.v1beta1.MsgSubmitProposalResponse.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.MsgSubmitProposalResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.MsgStakeResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgSubmitProposalResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.MsgStakeResponse.toObject = function(includeInstance, msg) { var f, obj = { - proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; if (includeInstance) { @@ -485,33 +395,29 @@ proto.council.v1beta1.MsgSubmitProposalResponse.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.MsgSubmitProposalResponse} + * @return {!proto.band.restake.v1beta1.MsgStakeResponse} */ -proto.council.v1beta1.MsgSubmitProposalResponse.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.MsgStakeResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.MsgSubmitProposalResponse; - return proto.council.v1beta1.MsgSubmitProposalResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.MsgStakeResponse; + return proto.band.restake.v1beta1.MsgStakeResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.MsgSubmitProposalResponse} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.MsgStakeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.MsgSubmitProposalResponse} + * @return {!proto.band.restake.v1beta1.MsgStakeResponse} */ -proto.council.v1beta1.MsgSubmitProposalResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.MsgStakeResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProposalId(value); - break; default: reader.skipField(); break; @@ -525,9 +431,9 @@ proto.council.v1beta1.MsgSubmitProposalResponse.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.MsgSubmitProposalResponse.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.MsgStakeResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.MsgSubmitProposalResponse.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.MsgStakeResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -535,40 +441,22 @@ proto.council.v1beta1.MsgSubmitProposalResponse.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.MsgSubmitProposalResponse} message + * @param {!proto.band.restake.v1beta1.MsgStakeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgSubmitProposalResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.MsgStakeResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProposalId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } }; -/** - * optional uint64 proposal_id = 1; - * @return {number} - */ -proto.council.v1beta1.MsgSubmitProposalResponse.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - /** - * @param {number} value - * @return {!proto.council.v1beta1.MsgSubmitProposalResponse} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.council.v1beta1.MsgSubmitProposalResponse.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - +proto.band.restake.v1beta1.MsgUnstake.repeatedFields_ = [2]; @@ -585,8 +473,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.MsgExecLegacyContent.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.MsgUnstake.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.MsgUnstake.toObject(opt_includeInstance, this); }; @@ -595,15 +483,15 @@ proto.council.v1beta1.MsgExecLegacyContent.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.MsgExecLegacyContent} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.MsgUnstake} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgExecLegacyContent.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.MsgUnstake.toObject = function(includeInstance, msg) { var f, obj = { - council: jspb.Message.getFieldWithDefault(msg, 1, 0), - content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), - authority: jspb.Message.getFieldWithDefault(msg, 3, "") + stakerAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + coinsList: jspb.Message.toObjectList(msg.getCoinsList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) }; if (includeInstance) { @@ -617,23 +505,23 @@ proto.council.v1beta1.MsgExecLegacyContent.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.MsgExecLegacyContent} + * @return {!proto.band.restake.v1beta1.MsgUnstake} */ -proto.council.v1beta1.MsgExecLegacyContent.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.MsgUnstake.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.MsgExecLegacyContent; - return proto.council.v1beta1.MsgExecLegacyContent.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.MsgUnstake; + return proto.band.restake.v1beta1.MsgUnstake.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.MsgExecLegacyContent} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.MsgUnstake} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.MsgExecLegacyContent} + * @return {!proto.band.restake.v1beta1.MsgUnstake} */ -proto.council.v1beta1.MsgExecLegacyContent.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.MsgUnstake.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -641,17 +529,13 @@ proto.council.v1beta1.MsgExecLegacyContent.deserializeBinaryFromReader = functio var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.council.v1beta1.CouncilType} */ (reader.readEnum()); - msg.setCouncil(value); + var value = /** @type {string} */ (reader.readString()); + msg.setStakerAddress(value); break; case 2: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setContent(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAuthority(value); + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addCoins(value); break; default: reader.skipField(); @@ -666,9 +550,9 @@ proto.council.v1beta1.MsgExecLegacyContent.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.MsgUnstake.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.MsgExecLegacyContent.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.MsgUnstake.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -676,107 +560,83 @@ proto.council.v1beta1.MsgExecLegacyContent.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.MsgExecLegacyContent} message + * @param {!proto.band.restake.v1beta1.MsgUnstake} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgExecLegacyContent.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.MsgUnstake.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCouncil(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getStakerAddress(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getContent(); - if (f != null) { - writer.writeMessage( + f = message.getCoinsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 2, f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } - f = message.getAuthority(); - if (f.length > 0) { - writer.writeString( - 3, - f + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } }; /** - * optional CouncilType council = 1; - * @return {!proto.council.v1beta1.CouncilType} + * optional string staker_address = 1; + * @return {string} */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.getCouncil = function() { - return /** @type {!proto.council.v1beta1.CouncilType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.band.restake.v1beta1.MsgUnstake.prototype.getStakerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!proto.council.v1beta1.CouncilType} value - * @return {!proto.council.v1beta1.MsgExecLegacyContent} returns this + * @param {string} value + * @return {!proto.band.restake.v1beta1.MsgUnstake} returns this */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.setCouncil = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.band.restake.v1beta1.MsgUnstake.prototype.setStakerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional google.protobuf.Any content = 2; - * @return {?proto.google.protobuf.Any} + * repeated cosmos.base.v1beta1.Coin coins = 2; + * @return {!Array} */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.getContent = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +proto.band.restake.v1beta1.MsgUnstake.prototype.getCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); }; /** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.council.v1beta1.MsgExecLegacyContent} returns this + * @param {!Array} value + * @return {!proto.band.restake.v1beta1.MsgUnstake} returns this */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.setContent = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.MsgExecLegacyContent} returns this - */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.clearContent = function() { - return this.setContent(undefined); +proto.band.restake.v1beta1.MsgUnstake.prototype.setCoinsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.hasContent = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string authority = 3; - * @return {string} + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.getAuthority = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.band.restake.v1beta1.MsgUnstake.prototype.addCoins = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; /** - * @param {string} value - * @return {!proto.council.v1beta1.MsgExecLegacyContent} returns this + * Clears the list making it empty but non-null. + * @return {!proto.band.restake.v1beta1.MsgUnstake} returns this */ -proto.council.v1beta1.MsgExecLegacyContent.prototype.setAuthority = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.band.restake.v1beta1.MsgUnstake.prototype.clearCoinsList = function() { + return this.setCoinsList([]); }; @@ -796,8 +656,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.MsgExecLegacyContentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.MsgExecLegacyContentResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.MsgUnstakeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.MsgUnstakeResponse.toObject(opt_includeInstance, this); }; @@ -806,11 +666,11 @@ proto.council.v1beta1.MsgExecLegacyContentResponse.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.MsgExecLegacyContentResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.MsgUnstakeResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgExecLegacyContentResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.MsgUnstakeResponse.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -826,23 +686,23 @@ proto.council.v1beta1.MsgExecLegacyContentResponse.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.MsgExecLegacyContentResponse} + * @return {!proto.band.restake.v1beta1.MsgUnstakeResponse} */ -proto.council.v1beta1.MsgExecLegacyContentResponse.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.MsgUnstakeResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.MsgExecLegacyContentResponse; - return proto.council.v1beta1.MsgExecLegacyContentResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.MsgUnstakeResponse; + return proto.band.restake.v1beta1.MsgUnstakeResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.MsgExecLegacyContentResponse} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.MsgUnstakeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.MsgExecLegacyContentResponse} + * @return {!proto.band.restake.v1beta1.MsgUnstakeResponse} */ -proto.council.v1beta1.MsgExecLegacyContentResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.MsgUnstakeResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -862,9 +722,9 @@ proto.council.v1beta1.MsgExecLegacyContentResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.MsgExecLegacyContentResponse.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.MsgUnstakeResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.MsgExecLegacyContentResponse.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.MsgUnstakeResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -872,11 +732,11 @@ proto.council.v1beta1.MsgExecLegacyContentResponse.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.MsgExecLegacyContentResponse} message + * @param {!proto.band.restake.v1beta1.MsgUnstakeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgExecLegacyContentResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.MsgUnstakeResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -897,8 +757,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.MsgVote.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.MsgVote.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.MsgUpdateParams.toObject(opt_includeInstance, this); }; @@ -907,15 +767,14 @@ proto.council.v1beta1.MsgVote.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.MsgVote} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.MsgUpdateParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgVote.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.MsgUpdateParams.toObject = function(includeInstance, msg) { var f, obj = { - proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), - voter: jspb.Message.getFieldWithDefault(msg, 2, ""), - option: jspb.Message.getFieldWithDefault(msg, 3, 0) + authority: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && band_restake_v1beta1_genesis_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -929,23 +788,23 @@ proto.council.v1beta1.MsgVote.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.MsgVote} + * @return {!proto.band.restake.v1beta1.MsgUpdateParams} */ -proto.council.v1beta1.MsgVote.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.MsgUpdateParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.MsgVote; - return proto.council.v1beta1.MsgVote.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.MsgUpdateParams; + return proto.band.restake.v1beta1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.MsgVote} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.MsgUpdateParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.MsgVote} + * @return {!proto.band.restake.v1beta1.MsgUpdateParams} */ -proto.council.v1beta1.MsgVote.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -953,16 +812,13 @@ proto.council.v1beta1.MsgVote.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProposalId(value); - break; - case 2: var value = /** @type {string} */ (reader.readString()); - msg.setVoter(value); + msg.setAuthority(value); break; - case 3: - var value = /** @type {!proto.council.v1beta1.VoteOption} */ (reader.readEnum()); - msg.setOption(value); + case 2: + var value = new band_restake_v1beta1_genesis_pb.Params; + reader.readMessage(value,band_restake_v1beta1_genesis_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); break; default: reader.skipField(); @@ -977,9 +833,9 @@ proto.council.v1beta1.MsgVote.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.MsgVote.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.MsgUpdateParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.MsgVote.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.MsgUpdateParams.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -987,87 +843,82 @@ proto.council.v1beta1.MsgVote.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.MsgVote} message + * @param {!proto.band.restake.v1beta1.MsgUpdateParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgVote.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProposalId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getVoter(); + f = message.getAuthority(); if (f.length > 0) { writer.writeString( - 2, + 1, f ); } - f = message.getOption(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + band_restake_v1beta1_genesis_pb.Params.serializeBinaryToWriter ); } }; /** - * optional uint64 proposal_id = 1; - * @return {number} + * optional string authority = 1; + * @return {string} */ -proto.council.v1beta1.MsgVote.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.band.restake.v1beta1.MsgUpdateParams.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.council.v1beta1.MsgVote} returns this + * @param {string} value + * @return {!proto.band.restake.v1beta1.MsgUpdateParams} returns this */ -proto.council.v1beta1.MsgVote.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.band.restake.v1beta1.MsgUpdateParams.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string voter = 2; - * @return {string} + * optional Params params = 2; + * @return {?proto.band.restake.v1beta1.Params} */ -proto.council.v1beta1.MsgVote.prototype.getVoter = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.band.restake.v1beta1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.band.restake.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_restake_v1beta1_genesis_pb.Params, 2)); }; /** - * @param {string} value - * @return {!proto.council.v1beta1.MsgVote} returns this - */ -proto.council.v1beta1.MsgVote.prototype.setVoter = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + * @param {?proto.band.restake.v1beta1.Params|undefined} value + * @return {!proto.band.restake.v1beta1.MsgUpdateParams} returns this +*/ +proto.band.restake.v1beta1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * optional VoteOption option = 3; - * @return {!proto.council.v1beta1.VoteOption} + * Clears the message field making it undefined. + * @return {!proto.band.restake.v1beta1.MsgUpdateParams} returns this */ -proto.council.v1beta1.MsgVote.prototype.getOption = function() { - return /** @type {!proto.council.v1beta1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.band.restake.v1beta1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); }; /** - * @param {!proto.council.v1beta1.VoteOption} value - * @return {!proto.council.v1beta1.MsgVote} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.council.v1beta1.MsgVote.prototype.setOption = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); +proto.band.restake.v1beta1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -1087,8 +938,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.council.v1beta1.MsgVoteResponse.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.MsgVoteResponse.toObject(opt_includeInstance, this); +proto.band.restake.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); }; @@ -1097,11 +948,11 @@ proto.council.v1beta1.MsgVoteResponse.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.MsgVoteResponse} msg The msg instance to transform. + * @param {!proto.band.restake.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgVoteResponse.toObject = function(includeInstance, msg) { +proto.band.restake.v1beta1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -1117,23 +968,23 @@ proto.council.v1beta1.MsgVoteResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.MsgVoteResponse} + * @return {!proto.band.restake.v1beta1.MsgUpdateParamsResponse} */ -proto.council.v1beta1.MsgVoteResponse.deserializeBinary = function(bytes) { +proto.band.restake.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.MsgVoteResponse; - return proto.council.v1beta1.MsgVoteResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.restake.v1beta1.MsgUpdateParamsResponse; + return proto.band.restake.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.council.v1beta1.MsgVoteResponse} msg The message object to deserialize into. + * @param {!proto.band.restake.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.MsgVoteResponse} + * @return {!proto.band.restake.v1beta1.MsgUpdateParamsResponse} */ -proto.council.v1beta1.MsgVoteResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.restake.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1153,9 +1004,9 @@ proto.council.v1beta1.MsgVoteResponse.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.council.v1beta1.MsgVoteResponse.prototype.serializeBinary = function() { +proto.band.restake.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.MsgVoteResponse.serializeBinaryToWriter(this, writer); + proto.band.restake.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1163,13 +1014,13 @@ proto.council.v1beta1.MsgVoteResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.MsgVoteResponse} message + * @param {!proto.band.restake.v1beta1.MsgUpdateParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.council.v1beta1.MsgVoteResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.restake.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; -goog.object.extend(exports, proto.council.v1beta1); +goog.object.extend(exports, proto.band.restake.v1beta1); diff --git a/proto/council/v1beta1/tx_pb_service.d.ts b/codegen/band/restake/v1beta1/tx_pb_service.d.ts similarity index 50% rename from proto/council/v1beta1/tx_pb_service.d.ts rename to codegen/band/restake/v1beta1/tx_pb_service.d.ts index 495e149..f1d712e 100644 --- a/proto/council/v1beta1/tx_pb_service.d.ts +++ b/codegen/band/restake/v1beta1/tx_pb_service.d.ts @@ -1,41 +1,41 @@ -// package: council.v1beta1 -// file: council/v1beta1/tx.proto +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/tx.proto -import * as council_v1beta1_tx_pb from "../../council/v1beta1/tx_pb"; +import * as band_restake_v1beta1_tx_pb from "../../../band/restake/v1beta1/tx_pb"; import {grpc} from "@improbable-eng/grpc-web"; -type MsgSubmitProposal = { +type MsgStake = { readonly methodName: string; readonly service: typeof Msg; readonly requestStream: false; readonly responseStream: false; - readonly requestType: typeof council_v1beta1_tx_pb.MsgSubmitProposal; - readonly responseType: typeof council_v1beta1_tx_pb.MsgSubmitProposalResponse; + readonly requestType: typeof band_restake_v1beta1_tx_pb.MsgStake; + readonly responseType: typeof band_restake_v1beta1_tx_pb.MsgStakeResponse; }; -type MsgExecLegacyContent = { +type MsgUnstake = { readonly methodName: string; readonly service: typeof Msg; readonly requestStream: false; readonly responseStream: false; - readonly requestType: typeof council_v1beta1_tx_pb.MsgExecLegacyContent; - readonly responseType: typeof council_v1beta1_tx_pb.MsgExecLegacyContentResponse; + readonly requestType: typeof band_restake_v1beta1_tx_pb.MsgUnstake; + readonly responseType: typeof band_restake_v1beta1_tx_pb.MsgUnstakeResponse; }; -type MsgVote = { +type MsgUpdateParams = { readonly methodName: string; readonly service: typeof Msg; readonly requestStream: false; readonly responseStream: false; - readonly requestType: typeof council_v1beta1_tx_pb.MsgVote; - readonly responseType: typeof council_v1beta1_tx_pb.MsgVoteResponse; + readonly requestType: typeof band_restake_v1beta1_tx_pb.MsgUpdateParams; + readonly responseType: typeof band_restake_v1beta1_tx_pb.MsgUpdateParamsResponse; }; export class Msg { static readonly serviceName: string; - static readonly SubmitProposal: MsgSubmitProposal; - static readonly ExecLegacyContent: MsgExecLegacyContent; - static readonly Vote: MsgVote; + static readonly Stake: MsgStake; + static readonly Unstake: MsgUnstake; + static readonly UpdateParams: MsgUpdateParams; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -70,32 +70,32 @@ export class MsgClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); - submitProposal( - requestMessage: council_v1beta1_tx_pb.MsgSubmitProposal, + stake( + requestMessage: band_restake_v1beta1_tx_pb.MsgStake, metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_tx_pb.MsgSubmitProposalResponse|null) => void + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_tx_pb.MsgStakeResponse|null) => void ): UnaryResponse; - submitProposal( - requestMessage: council_v1beta1_tx_pb.MsgSubmitProposal, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_tx_pb.MsgSubmitProposalResponse|null) => void + stake( + requestMessage: band_restake_v1beta1_tx_pb.MsgStake, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_tx_pb.MsgStakeResponse|null) => void ): UnaryResponse; - execLegacyContent( - requestMessage: council_v1beta1_tx_pb.MsgExecLegacyContent, + unstake( + requestMessage: band_restake_v1beta1_tx_pb.MsgUnstake, metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_tx_pb.MsgExecLegacyContentResponse|null) => void + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_tx_pb.MsgUnstakeResponse|null) => void ): UnaryResponse; - execLegacyContent( - requestMessage: council_v1beta1_tx_pb.MsgExecLegacyContent, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_tx_pb.MsgExecLegacyContentResponse|null) => void + unstake( + requestMessage: band_restake_v1beta1_tx_pb.MsgUnstake, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_tx_pb.MsgUnstakeResponse|null) => void ): UnaryResponse; - vote( - requestMessage: council_v1beta1_tx_pb.MsgVote, + updateParams( + requestMessage: band_restake_v1beta1_tx_pb.MsgUpdateParams, metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_tx_pb.MsgVoteResponse|null) => void + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void ): UnaryResponse; - vote( - requestMessage: council_v1beta1_tx_pb.MsgVote, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_tx_pb.MsgVoteResponse|null) => void + updateParams( + requestMessage: band_restake_v1beta1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: band_restake_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void ): UnaryResponse; } diff --git a/proto/council/v1beta1/tx_pb_service.js b/codegen/band/restake/v1beta1/tx_pb_service.js similarity index 69% rename from proto/council/v1beta1/tx_pb_service.js rename to codegen/band/restake/v1beta1/tx_pb_service.js index ff56f8b..840c51c 100644 --- a/proto/council/v1beta1/tx_pb_service.js +++ b/codegen/band/restake/v1beta1/tx_pb_service.js @@ -1,40 +1,40 @@ -// package: council.v1beta1 -// file: council/v1beta1/tx.proto +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/tx.proto -var council_v1beta1_tx_pb = require("../../council/v1beta1/tx_pb"); +var band_restake_v1beta1_tx_pb = require("../../../band/restake/v1beta1/tx_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; var Msg = (function () { function Msg() {} - Msg.serviceName = "council.v1beta1.Msg"; + Msg.serviceName = "band.restake.v1beta1.Msg"; return Msg; }()); -Msg.SubmitProposal = { - methodName: "SubmitProposal", +Msg.Stake = { + methodName: "Stake", service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_tx_pb.MsgSubmitProposal, - responseType: council_v1beta1_tx_pb.MsgSubmitProposalResponse + requestType: band_restake_v1beta1_tx_pb.MsgStake, + responseType: band_restake_v1beta1_tx_pb.MsgStakeResponse }; -Msg.ExecLegacyContent = { - methodName: "ExecLegacyContent", +Msg.Unstake = { + methodName: "Unstake", service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_tx_pb.MsgExecLegacyContent, - responseType: council_v1beta1_tx_pb.MsgExecLegacyContentResponse + requestType: band_restake_v1beta1_tx_pb.MsgUnstake, + responseType: band_restake_v1beta1_tx_pb.MsgUnstakeResponse }; -Msg.Vote = { - methodName: "Vote", +Msg.UpdateParams = { + methodName: "UpdateParams", service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_tx_pb.MsgVote, - responseType: council_v1beta1_tx_pb.MsgVoteResponse + requestType: band_restake_v1beta1_tx_pb.MsgUpdateParams, + responseType: band_restake_v1beta1_tx_pb.MsgUpdateParamsResponse }; exports.Msg = Msg; @@ -44,11 +44,11 @@ function MsgClient(serviceHost, options) { this.options = options || {}; } -MsgClient.prototype.submitProposal = function submitProposal(requestMessage, metadata, callback) { +MsgClient.prototype.stake = function stake(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.SubmitProposal, { + var client = grpc.unary(Msg.Stake, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -75,11 +75,11 @@ MsgClient.prototype.submitProposal = function submitProposal(requestMessage, met }; }; -MsgClient.prototype.execLegacyContent = function execLegacyContent(requestMessage, metadata, callback) { +MsgClient.prototype.unstake = function unstake(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.ExecLegacyContent, { + var client = grpc.unary(Msg.Unstake, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -106,11 +106,11 @@ MsgClient.prototype.execLegacyContent = function execLegacyContent(requestMessag }; }; -MsgClient.prototype.vote = function vote(requestMessage, metadata, callback) { +MsgClient.prototype.updateParams = function updateParams(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.Vote, { + var client = grpc.unary(Msg.UpdateParams, { request: requestMessage, host: this.serviceHost, metadata: metadata, diff --git a/codegen/band/restake/v1beta1/types.ts b/codegen/band/restake/v1beta1/types.ts new file mode 100644 index 0000000..4f5f163 --- /dev/null +++ b/codegen/band/restake/v1beta1/types.ts @@ -0,0 +1,395 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/restake/v1beta1/types.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../amino/amino"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../../cosmos/base/v1beta1/coin"; +import * as pb_1 from "google-protobuf"; +export namespace band.restake.v1beta1 { + export class Vault extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: string; + is_active?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("is_active" in data && data.is_active != undefined) { + this.is_active = data.is_active; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 1, value); + } + get is_active() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set is_active(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + key?: string; + is_active?: boolean; + }): Vault { + const message = new Vault({}); + if (data.key != null) { + message.key = data.key; + } + if (data.is_active != null) { + message.is_active = data.is_active; + } + return message; + } + toObject() { + const data: { + key?: string; + is_active?: boolean; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.is_active != null) { + data.is_active = this.is_active; + } + 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.key.length) + writer.writeString(1, this.key); + if (this.is_active != false) + writer.writeBool(2, this.is_active); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Vault { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Vault(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readString(); + break; + case 2: + message.is_active = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Vault { + return Vault.deserialize(bytes); + } + } + export class Lock extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + staker_address?: string; + key?: string; + power?: 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 ("staker_address" in data && data.staker_address != undefined) { + this.staker_address = data.staker_address; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + } + } + get staker_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set staker_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 2, value); + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set power(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + staker_address?: string; + key?: string; + power?: string; + }): Lock { + const message = new Lock({}); + if (data.staker_address != null) { + message.staker_address = data.staker_address; + } + if (data.key != null) { + message.key = data.key; + } + if (data.power != null) { + message.power = data.power; + } + return message; + } + toObject() { + const data: { + staker_address?: string; + key?: string; + power?: string; + } = {}; + if (this.staker_address != null) { + data.staker_address = this.staker_address; + } + if (this.key != null) { + data.key = this.key; + } + if (this.power != null) { + data.power = this.power; + } + 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.staker_address.length) + writer.writeString(1, this.staker_address); + if (this.key.length) + writer.writeString(2, this.key); + if (this.power.length) + writer.writeString(3, this.power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Lock { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Lock(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.staker_address = reader.readString(); + break; + case 2: + message.key = reader.readString(); + break; + case 3: + message.power = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Lock { + return Lock.deserialize(bytes); + } + } + export class Stake extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + staker_address?: string; + coins?: dependency_4.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("staker_address" in data && data.staker_address != undefined) { + this.staker_address = data.staker_address; + } + if ("coins" in data && data.coins != undefined) { + this.coins = data.coins; + } + } + } + get staker_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set staker_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get coins() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 2) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set coins(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + staker_address?: string; + coins?: ReturnType[]; + }): Stake { + const message = new Stake({}); + if (data.staker_address != null) { + message.staker_address = data.staker_address; + } + if (data.coins != null) { + message.coins = data.coins.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + staker_address?: string; + coins?: ReturnType[]; + } = {}; + if (this.staker_address != null) { + data.staker_address = this.staker_address; + } + if (this.coins != null) { + data.coins = this.coins.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.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.staker_address.length) + writer.writeString(1, this.staker_address); + if (this.coins.length) + writer.writeRepeatedMessage(2, this.coins, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Stake { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Stake(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.staker_address = reader.readString(); + break; + case 2: + reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Stake { + return Stake.deserialize(bytes); + } + } + export class LockResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: string; + power?: 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 ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 1, value); + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set power(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + key?: string; + power?: string; + }): LockResponse { + const message = new LockResponse({}); + if (data.key != null) { + message.key = data.key; + } + if (data.power != null) { + message.power = data.power; + } + return message; + } + toObject() { + const data: { + key?: string; + power?: string; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.power != null) { + data.power = this.power; + } + 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.key.length) + writer.writeString(1, this.key); + if (this.power.length) + writer.writeString(2, this.power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LockResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LockResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readString(); + break; + case 2: + message.power = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): LockResponse { + return LockResponse.deserialize(bytes); + } + } +} diff --git a/codegen/band/restake/v1beta1/types_pb.d.ts b/codegen/band/restake/v1beta1/types_pb.d.ts new file mode 100644 index 0000000..1d433b3 --- /dev/null +++ b/codegen/band/restake/v1beta1/types_pb.d.ts @@ -0,0 +1,111 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/types.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; + +export class Vault extends jspb.Message { + getKey(): string; + setKey(value: string): void; + + getIsActive(): boolean; + setIsActive(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Vault.AsObject; + static toObject(includeInstance: boolean, msg: Vault): Vault.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Vault, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Vault; + static deserializeBinaryFromReader(message: Vault, reader: jspb.BinaryReader): Vault; +} + +export namespace Vault { + export type AsObject = { + key: string, + isActive: boolean, + } +} + +export class Lock extends jspb.Message { + getStakerAddress(): string; + setStakerAddress(value: string): void; + + getKey(): string; + setKey(value: string): void; + + getPower(): string; + setPower(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Lock.AsObject; + static toObject(includeInstance: boolean, msg: Lock): Lock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Lock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Lock; + static deserializeBinaryFromReader(message: Lock, reader: jspb.BinaryReader): Lock; +} + +export namespace Lock { + export type AsObject = { + stakerAddress: string, + key: string, + power: string, + } +} + +export class Stake extends jspb.Message { + getStakerAddress(): string; + setStakerAddress(value: string): void; + + clearCoinsList(): void; + getCoinsList(): Array; + setCoinsList(value: Array): void; + addCoins(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Stake.AsObject; + static toObject(includeInstance: boolean, msg: Stake): Stake.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Stake, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Stake; + static deserializeBinaryFromReader(message: Stake, reader: jspb.BinaryReader): Stake; +} + +export namespace Stake { + export type AsObject = { + stakerAddress: string, + coinsList: Array, + } +} + +export class LockResponse extends jspb.Message { + getKey(): string; + setKey(value: string): void; + + getPower(): string; + setPower(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LockResponse.AsObject; + static toObject(includeInstance: boolean, msg: LockResponse): LockResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LockResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LockResponse; + static deserializeBinaryFromReader(message: LockResponse, reader: jspb.BinaryReader): LockResponse; +} + +export namespace LockResponse { + export type AsObject = { + key: string, + power: string, + } +} + diff --git a/codegen/band/restake/v1beta1/types_pb.js b/codegen/band/restake/v1beta1/types_pb.js new file mode 100644 index 0000000..4325c81 --- /dev/null +++ b/codegen/band/restake/v1beta1/types_pb.js @@ -0,0 +1,814 @@ +// source: band/restake/v1beta1/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var amino_amino_pb = require('../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.band.restake.v1beta1.Lock', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.LockResponse', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.Stake', null, global); +goog.exportSymbol('proto.band.restake.v1beta1.Vault', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.restake.v1beta1.Vault = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.restake.v1beta1.Vault, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.restake.v1beta1.Vault.displayName = 'proto.band.restake.v1beta1.Vault'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.restake.v1beta1.Lock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.restake.v1beta1.Lock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.restake.v1beta1.Lock.displayName = 'proto.band.restake.v1beta1.Lock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.restake.v1beta1.Stake = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.restake.v1beta1.Stake.repeatedFields_, null); +}; +goog.inherits(proto.band.restake.v1beta1.Stake, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.restake.v1beta1.Stake.displayName = 'proto.band.restake.v1beta1.Stake'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.restake.v1beta1.LockResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.restake.v1beta1.LockResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.restake.v1beta1.LockResponse.displayName = 'proto.band.restake.v1beta1.LockResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.restake.v1beta1.Vault.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.Vault.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.restake.v1beta1.Vault} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.Vault.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + isActive: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.restake.v1beta1.Vault} + */ +proto.band.restake.v1beta1.Vault.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.restake.v1beta1.Vault; + return proto.band.restake.v1beta1.Vault.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.restake.v1beta1.Vault} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.restake.v1beta1.Vault} + */ +proto.band.restake.v1beta1.Vault.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsActive(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.restake.v1beta1.Vault.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.restake.v1beta1.Vault.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.restake.v1beta1.Vault} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.Vault.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIsActive(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.band.restake.v1beta1.Vault.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.restake.v1beta1.Vault} returns this + */ +proto.band.restake.v1beta1.Vault.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool is_active = 2; + * @return {boolean} + */ +proto.band.restake.v1beta1.Vault.prototype.getIsActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.restake.v1beta1.Vault} returns this + */ +proto.band.restake.v1beta1.Vault.prototype.setIsActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.restake.v1beta1.Lock.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.Lock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.restake.v1beta1.Lock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.Lock.toObject = function(includeInstance, msg) { + var f, obj = { + stakerAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, ""), + power: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.restake.v1beta1.Lock} + */ +proto.band.restake.v1beta1.Lock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.restake.v1beta1.Lock; + return proto.band.restake.v1beta1.Lock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.restake.v1beta1.Lock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.restake.v1beta1.Lock} + */ +proto.band.restake.v1beta1.Lock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setStakerAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.restake.v1beta1.Lock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.restake.v1beta1.Lock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.restake.v1beta1.Lock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.Lock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStakerAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPower(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string staker_address = 1; + * @return {string} + */ +proto.band.restake.v1beta1.Lock.prototype.getStakerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.restake.v1beta1.Lock} returns this + */ +proto.band.restake.v1beta1.Lock.prototype.setStakerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.band.restake.v1beta1.Lock.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.restake.v1beta1.Lock} returns this + */ +proto.band.restake.v1beta1.Lock.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string power = 3; + * @return {string} + */ +proto.band.restake.v1beta1.Lock.prototype.getPower = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.restake.v1beta1.Lock} returns this + */ +proto.band.restake.v1beta1.Lock.prototype.setPower = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.restake.v1beta1.Stake.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.restake.v1beta1.Stake.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.Stake.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.restake.v1beta1.Stake} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.Stake.toObject = function(includeInstance, msg) { + var f, obj = { + stakerAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + coinsList: jspb.Message.toObjectList(msg.getCoinsList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.restake.v1beta1.Stake} + */ +proto.band.restake.v1beta1.Stake.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.restake.v1beta1.Stake; + return proto.band.restake.v1beta1.Stake.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.restake.v1beta1.Stake} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.restake.v1beta1.Stake} + */ +proto.band.restake.v1beta1.Stake.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setStakerAddress(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.restake.v1beta1.Stake.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.restake.v1beta1.Stake.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.restake.v1beta1.Stake} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.Stake.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStakerAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCoinsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string staker_address = 1; + * @return {string} + */ +proto.band.restake.v1beta1.Stake.prototype.getStakerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.restake.v1beta1.Stake} returns this + */ +proto.band.restake.v1beta1.Stake.prototype.setStakerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin coins = 2; + * @return {!Array} + */ +proto.band.restake.v1beta1.Stake.prototype.getCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.restake.v1beta1.Stake} returns this +*/ +proto.band.restake.v1beta1.Stake.prototype.setCoinsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.restake.v1beta1.Stake.prototype.addCoins = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.restake.v1beta1.Stake} returns this + */ +proto.band.restake.v1beta1.Stake.prototype.clearCoinsList = function() { + return this.setCoinsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.restake.v1beta1.LockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.restake.v1beta1.LockResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.restake.v1beta1.LockResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.LockResponse.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + power: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.restake.v1beta1.LockResponse} + */ +proto.band.restake.v1beta1.LockResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.restake.v1beta1.LockResponse; + return proto.band.restake.v1beta1.LockResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.restake.v1beta1.LockResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.restake.v1beta1.LockResponse} + */ +proto.band.restake.v1beta1.LockResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.restake.v1beta1.LockResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.restake.v1beta1.LockResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.restake.v1beta1.LockResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.restake.v1beta1.LockResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPower(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.band.restake.v1beta1.LockResponse.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.restake.v1beta1.LockResponse} returns this + */ +proto.band.restake.v1beta1.LockResponse.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string power = 2; + * @return {string} + */ +proto.band.restake.v1beta1.LockResponse.prototype.getPower = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.restake.v1beta1.LockResponse} returns this + */ +proto.band.restake.v1beta1.LockResponse.prototype.setPower = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.band.restake.v1beta1); diff --git a/codegen/band/restake/v1beta1/types_pb_service.d.ts b/codegen/band/restake/v1beta1/types_pb_service.d.ts new file mode 100644 index 0000000..23d2ec5 --- /dev/null +++ b/codegen/band/restake/v1beta1/types_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/types.proto + diff --git a/codegen/band/restake/v1beta1/types_pb_service.js b/codegen/band/restake/v1beta1/types_pb_service.js new file mode 100644 index 0000000..23d2ec5 --- /dev/null +++ b/codegen/band/restake/v1beta1/types_pb_service.js @@ -0,0 +1,3 @@ +// package: band.restake.v1beta1 +// file: band/restake/v1beta1/types.proto + diff --git a/codegen/band/rollingseed/v1beta1/genesis.ts b/codegen/band/rollingseed/v1beta1/genesis.ts new file mode 100644 index 0000000..3098b9d --- /dev/null +++ b/codegen/band/rollingseed/v1beta1/genesis.ts @@ -0,0 +1,48 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/rollingseed/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace band.rollingseed.v1beta1 { + export class GenesisState 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: {}): GenesisState { + const message = new GenesisState({}); + 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): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/rollingseed/v1beta1/genesis_pb.d.ts b/codegen/band/rollingseed/v1beta1/genesis_pb.d.ts similarity index 89% rename from proto/rollingseed/v1beta1/genesis_pb.d.ts rename to codegen/band/rollingseed/v1beta1/genesis_pb.d.ts index 12cd8af..8a814f3 100644 --- a/proto/rollingseed/v1beta1/genesis_pb.d.ts +++ b/codegen/band/rollingseed/v1beta1/genesis_pb.d.ts @@ -1,5 +1,5 @@ -// package: rollingseed.v1beta1 -// file: rollingseed/v1beta1/genesis.proto +// package: band.rollingseed.v1beta1 +// file: band/rollingseed/v1beta1/genesis.proto import * as jspb from "google-protobuf"; diff --git a/proto/rollingseed/v1beta1/genesis_pb.js b/codegen/band/rollingseed/v1beta1/genesis_pb.js similarity index 64% rename from proto/rollingseed/v1beta1/genesis_pb.js rename to codegen/band/rollingseed/v1beta1/genesis_pb.js index 230b742..640b983 100644 --- a/proto/rollingseed/v1beta1/genesis_pb.js +++ b/codegen/band/rollingseed/v1beta1/genesis_pb.js @@ -1,4 +1,4 @@ -// source: rollingseed/v1beta1/genesis.proto +// source: band/rollingseed/v1beta1/genesis.proto /** * @fileoverview * @enhanceable @@ -15,7 +15,7 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -goog.exportSymbol('proto.rollingseed.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.band.rollingseed.v1beta1.GenesisState', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -26,16 +26,16 @@ goog.exportSymbol('proto.rollingseed.v1beta1.GenesisState', null, global); * @extends {jspb.Message} * @constructor */ -proto.rollingseed.v1beta1.GenesisState = function(opt_data) { +proto.band.rollingseed.v1beta1.GenesisState = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.rollingseed.v1beta1.GenesisState, jspb.Message); +goog.inherits(proto.band.rollingseed.v1beta1.GenesisState, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.rollingseed.v1beta1.GenesisState.displayName = 'proto.rollingseed.v1beta1.GenesisState'; + proto.band.rollingseed.v1beta1.GenesisState.displayName = 'proto.band.rollingseed.v1beta1.GenesisState'; } @@ -53,8 +53,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.rollingseed.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { - return proto.rollingseed.v1beta1.GenesisState.toObject(opt_includeInstance, this); +proto.band.rollingseed.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.band.rollingseed.v1beta1.GenesisState.toObject(opt_includeInstance, this); }; @@ -63,11 +63,11 @@ proto.rollingseed.v1beta1.GenesisState.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.rollingseed.v1beta1.GenesisState} msg The msg instance to transform. + * @param {!proto.band.rollingseed.v1beta1.GenesisState} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.rollingseed.v1beta1.GenesisState.toObject = function(includeInstance, msg) { +proto.band.rollingseed.v1beta1.GenesisState.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -83,23 +83,23 @@ proto.rollingseed.v1beta1.GenesisState.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.rollingseed.v1beta1.GenesisState} + * @return {!proto.band.rollingseed.v1beta1.GenesisState} */ -proto.rollingseed.v1beta1.GenesisState.deserializeBinary = function(bytes) { +proto.band.rollingseed.v1beta1.GenesisState.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.rollingseed.v1beta1.GenesisState; - return proto.rollingseed.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.rollingseed.v1beta1.GenesisState; + return proto.band.rollingseed.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.rollingseed.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!proto.band.rollingseed.v1beta1.GenesisState} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.rollingseed.v1beta1.GenesisState} + * @return {!proto.band.rollingseed.v1beta1.GenesisState} */ -proto.rollingseed.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { +proto.band.rollingseed.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -119,9 +119,9 @@ proto.rollingseed.v1beta1.GenesisState.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.rollingseed.v1beta1.GenesisState.prototype.serializeBinary = function() { +proto.band.rollingseed.v1beta1.GenesisState.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.rollingseed.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); + proto.band.rollingseed.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -129,13 +129,13 @@ proto.rollingseed.v1beta1.GenesisState.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.rollingseed.v1beta1.GenesisState} message + * @param {!proto.band.rollingseed.v1beta1.GenesisState} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.rollingseed.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { +proto.band.rollingseed.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; -goog.object.extend(exports, proto.rollingseed.v1beta1); +goog.object.extend(exports, proto.band.rollingseed.v1beta1); diff --git a/codegen/band/rollingseed/v1beta1/genesis_pb_service.d.ts b/codegen/band/rollingseed/v1beta1/genesis_pb_service.d.ts new file mode 100644 index 0000000..9ea3c3f --- /dev/null +++ b/codegen/band/rollingseed/v1beta1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.rollingseed.v1beta1 +// file: band/rollingseed/v1beta1/genesis.proto + diff --git a/codegen/band/rollingseed/v1beta1/genesis_pb_service.js b/codegen/band/rollingseed/v1beta1/genesis_pb_service.js new file mode 100644 index 0000000..9ea3c3f --- /dev/null +++ b/codegen/band/rollingseed/v1beta1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: band.rollingseed.v1beta1 +// file: band/rollingseed/v1beta1/genesis.proto + diff --git a/codegen/band/tss/v1beta1/genesis.ts b/codegen/band/tss/v1beta1/genesis.ts new file mode 100644 index 0000000..ea35de9 --- /dev/null +++ b/codegen/band/tss/v1beta1/genesis.ts @@ -0,0 +1,448 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tss/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./tss"; +import * as pb_1 from "google-protobuf"; +export namespace band.tss.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: Params; + groups?: dependency_3.band.tss.v1beta1.Group[]; + members?: dependency_3.band.tss.v1beta1.Member[]; + des?: DEGenesis[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("groups" in data && data.groups != undefined) { + this.groups = data.groups; + } + if ("members" in data && data.members != undefined) { + this.members = data.members; + } + if ("des" in data && data.des != undefined) { + this.des = data.des; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, Params, 1) as Params; + } + set params(value: Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get groups() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.band.tss.v1beta1.Group, 2) as dependency_3.band.tss.v1beta1.Group[]; + } + set groups(value: dependency_3.band.tss.v1beta1.Group[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get members() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.band.tss.v1beta1.Member, 3) as dependency_3.band.tss.v1beta1.Member[]; + } + set members(value: dependency_3.band.tss.v1beta1.Member[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get des() { + return pb_1.Message.getRepeatedWrapperField(this, DEGenesis, 4) as DEGenesis[]; + } + set des(value: DEGenesis[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + params?: ReturnType; + groups?: ReturnType[]; + members?: ReturnType[]; + des?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = Params.fromObject(data.params); + } + if (data.groups != null) { + message.groups = data.groups.map(item => dependency_3.band.tss.v1beta1.Group.fromObject(item)); + } + if (data.members != null) { + message.members = data.members.map(item => dependency_3.band.tss.v1beta1.Member.fromObject(item)); + } + if (data.des != null) { + message.des = data.des.map(item => DEGenesis.fromObject(item)); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + groups?: ReturnType[]; + members?: ReturnType[]; + des?: ReturnType[]; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.groups != null) { + data.groups = this.groups.map((item: dependency_3.band.tss.v1beta1.Group) => item.toObject()); + } + if (this.members != null) { + data.members = this.members.map((item: dependency_3.band.tss.v1beta1.Member) => item.toObject()); + } + if (this.des != null) { + data.des = this.des.map((item: DEGenesis) => item.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.groups.length) + writer.writeRepeatedMessage(2, this.groups, (item: dependency_3.band.tss.v1beta1.Group) => item.serialize(writer)); + if (this.members.length) + writer.writeRepeatedMessage(3, this.members, (item: dependency_3.band.tss.v1beta1.Member) => item.serialize(writer)); + if (this.des.length) + writer.writeRepeatedMessage(4, this.des, (item: DEGenesis) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = Params.deserialize(reader)); + break; + case 2: + reader.readMessage(message.groups, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.band.tss.v1beta1.Group.deserialize(reader), dependency_3.band.tss.v1beta1.Group)); + break; + case 3: + reader.readMessage(message.members, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_3.band.tss.v1beta1.Member.deserialize(reader), dependency_3.band.tss.v1beta1.Member)); + break; + case 4: + reader.readMessage(message.des, () => pb_1.Message.addToRepeatedWrapperField(message, 4, DEGenesis.deserialize(reader), DEGenesis)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + max_group_size?: number; + max_de_size?: number; + creation_period?: number; + signing_period?: number; + max_signing_attempt?: number; + max_memo_length?: number; + max_message_length?: 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 ("max_group_size" in data && data.max_group_size != undefined) { + this.max_group_size = data.max_group_size; + } + if ("max_de_size" in data && data.max_de_size != undefined) { + this.max_de_size = data.max_de_size; + } + if ("creation_period" in data && data.creation_period != undefined) { + this.creation_period = data.creation_period; + } + if ("signing_period" in data && data.signing_period != undefined) { + this.signing_period = data.signing_period; + } + if ("max_signing_attempt" in data && data.max_signing_attempt != undefined) { + this.max_signing_attempt = data.max_signing_attempt; + } + if ("max_memo_length" in data && data.max_memo_length != undefined) { + this.max_memo_length = data.max_memo_length; + } + if ("max_message_length" in data && data.max_message_length != undefined) { + this.max_message_length = data.max_message_length; + } + } + } + get max_group_size() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set max_group_size(value: number) { + pb_1.Message.setField(this, 1, value); + } + get max_de_size() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set max_de_size(value: number) { + pb_1.Message.setField(this, 2, value); + } + get creation_period() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set creation_period(value: number) { + pb_1.Message.setField(this, 3, value); + } + get signing_period() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set signing_period(value: number) { + pb_1.Message.setField(this, 4, value); + } + get max_signing_attempt() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set max_signing_attempt(value: number) { + pb_1.Message.setField(this, 5, value); + } + get max_memo_length() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set max_memo_length(value: number) { + pb_1.Message.setField(this, 6, value); + } + get max_message_length() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set max_message_length(value: number) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + max_group_size?: number; + max_de_size?: number; + creation_period?: number; + signing_period?: number; + max_signing_attempt?: number; + max_memo_length?: number; + max_message_length?: number; + }): Params { + const message = new Params({}); + if (data.max_group_size != null) { + message.max_group_size = data.max_group_size; + } + if (data.max_de_size != null) { + message.max_de_size = data.max_de_size; + } + if (data.creation_period != null) { + message.creation_period = data.creation_period; + } + if (data.signing_period != null) { + message.signing_period = data.signing_period; + } + if (data.max_signing_attempt != null) { + message.max_signing_attempt = data.max_signing_attempt; + } + if (data.max_memo_length != null) { + message.max_memo_length = data.max_memo_length; + } + if (data.max_message_length != null) { + message.max_message_length = data.max_message_length; + } + return message; + } + toObject() { + const data: { + max_group_size?: number; + max_de_size?: number; + creation_period?: number; + signing_period?: number; + max_signing_attempt?: number; + max_memo_length?: number; + max_message_length?: number; + } = {}; + if (this.max_group_size != null) { + data.max_group_size = this.max_group_size; + } + if (this.max_de_size != null) { + data.max_de_size = this.max_de_size; + } + if (this.creation_period != null) { + data.creation_period = this.creation_period; + } + if (this.signing_period != null) { + data.signing_period = this.signing_period; + } + if (this.max_signing_attempt != null) { + data.max_signing_attempt = this.max_signing_attempt; + } + if (this.max_memo_length != null) { + data.max_memo_length = this.max_memo_length; + } + if (this.max_message_length != null) { + data.max_message_length = this.max_message_length; + } + 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.max_group_size != 0) + writer.writeUint64(1, this.max_group_size); + if (this.max_de_size != 0) + writer.writeUint64(2, this.max_de_size); + if (this.creation_period != 0) + writer.writeUint64(3, this.creation_period); + if (this.signing_period != 0) + writer.writeUint64(4, this.signing_period); + if (this.max_signing_attempt != 0) + writer.writeUint64(5, this.max_signing_attempt); + if (this.max_memo_length != 0) + writer.writeUint64(6, this.max_memo_length); + if (this.max_message_length != 0) + writer.writeUint64(7, this.max_message_length); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.max_group_size = reader.readUint64(); + break; + case 2: + message.max_de_size = reader.readUint64(); + break; + case 3: + message.creation_period = reader.readUint64(); + break; + case 4: + message.signing_period = reader.readUint64(); + break; + case 5: + message.max_signing_attempt = reader.readUint64(); + break; + case 6: + message.max_memo_length = reader.readUint64(); + break; + case 7: + message.max_message_length = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } + export class DEGenesis extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + de?: dependency_3.band.tss.v1beta1.DE; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("de" in data && data.de != undefined) { + this.de = data.de; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get de() { + return pb_1.Message.getWrapperField(this, dependency_3.band.tss.v1beta1.DE, 2) as dependency_3.band.tss.v1beta1.DE; + } + set de(value: dependency_3.band.tss.v1beta1.DE) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_de() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + address?: string; + de?: ReturnType; + }): DEGenesis { + const message = new DEGenesis({}); + if (data.address != null) { + message.address = data.address; + } + if (data.de != null) { + message.de = dependency_3.band.tss.v1beta1.DE.fromObject(data.de); + } + return message; + } + toObject() { + const data: { + address?: string; + de?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.de != null) { + data.de = this.de.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.address.length) + writer.writeString(1, this.address); + if (this.has_de) + writer.writeMessage(2, this.de, () => this.de.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DEGenesis { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DEGenesis(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.de, () => message.de = dependency_3.band.tss.v1beta1.DE.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DEGenesis { + return DEGenesis.deserialize(bytes); + } + } +} diff --git a/codegen/band/tss/v1beta1/genesis_pb.d.ts b/codegen/band/tss/v1beta1/genesis_pb.d.ts new file mode 100644 index 0000000..2c2d85e --- /dev/null +++ b/codegen/band/tss/v1beta1/genesis_pb.d.ts @@ -0,0 +1,118 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as band_tss_v1beta1_tss_pb from "../../../band/tss/v1beta1/tss_pb"; + +export class GenesisState extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): Params | undefined; + setParams(value?: Params): void; + + clearGroupsList(): void; + getGroupsList(): Array; + setGroupsList(value: Array): void; + addGroups(value?: band_tss_v1beta1_tss_pb.Group, index?: number): band_tss_v1beta1_tss_pb.Group; + + clearMembersList(): void; + getMembersList(): Array; + setMembersList(value: Array): void; + addMembers(value?: band_tss_v1beta1_tss_pb.Member, index?: number): band_tss_v1beta1_tss_pb.Member; + + clearDesList(): void; + getDesList(): Array; + setDesList(value: Array): void; + addDes(value?: DEGenesis, index?: number): DEGenesis; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + params?: Params.AsObject, + groupsList: Array, + membersList: Array, + desList: Array, + } +} + +export class Params extends jspb.Message { + getMaxGroupSize(): number; + setMaxGroupSize(value: number): void; + + getMaxDeSize(): number; + setMaxDeSize(value: number): void; + + getCreationPeriod(): number; + setCreationPeriod(value: number): void; + + getSigningPeriod(): number; + setSigningPeriod(value: number): void; + + getMaxSigningAttempt(): number; + setMaxSigningAttempt(value: number): void; + + getMaxMemoLength(): number; + setMaxMemoLength(value: number): void; + + getMaxMessageLength(): number; + setMaxMessageLength(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + maxGroupSize: number, + maxDeSize: number, + creationPeriod: number, + signingPeriod: number, + maxSigningAttempt: number, + maxMemoLength: number, + maxMessageLength: number, + } +} + +export class DEGenesis extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + hasDe(): boolean; + clearDe(): void; + getDe(): band_tss_v1beta1_tss_pb.DE | undefined; + setDe(value?: band_tss_v1beta1_tss_pb.DE): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DEGenesis.AsObject; + static toObject(includeInstance: boolean, msg: DEGenesis): DEGenesis.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DEGenesis, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DEGenesis; + static deserializeBinaryFromReader(message: DEGenesis, reader: jspb.BinaryReader): DEGenesis; +} + +export namespace DEGenesis { + export type AsObject = { + address: string, + de?: band_tss_v1beta1_tss_pb.DE.AsObject, + } +} + diff --git a/codegen/band/tss/v1beta1/genesis_pb.js b/codegen/band/tss/v1beta1/genesis_pb.js new file mode 100644 index 0000000..d6f55ba --- /dev/null +++ b/codegen/band/tss/v1beta1/genesis_pb.js @@ -0,0 +1,898 @@ +// source: band/tss/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var band_tss_v1beta1_tss_pb = require('../../../band/tss/v1beta1/tss_pb.js'); +goog.object.extend(proto, band_tss_v1beta1_tss_pb); +goog.exportSymbol('proto.band.tss.v1beta1.DEGenesis', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.Params', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.band.tss.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.GenesisState.displayName = 'proto.band.tss.v1beta1.GenesisState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.Params.displayName = 'proto.band.tss.v1beta1.Params'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.DEGenesis = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.DEGenesis, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.DEGenesis.displayName = 'proto.band.tss.v1beta1.DEGenesis'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tss.v1beta1.GenesisState.repeatedFields_ = [2,3,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && proto.band.tss.v1beta1.Params.toObject(includeInstance, f), + groupsList: jspb.Message.toObjectList(msg.getGroupsList(), + band_tss_v1beta1_tss_pb.Group.toObject, includeInstance), + membersList: jspb.Message.toObjectList(msg.getMembersList(), + band_tss_v1beta1_tss_pb.Member.toObject, includeInstance), + desList: jspb.Message.toObjectList(msg.getDesList(), + proto.band.tss.v1beta1.DEGenesis.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.GenesisState} + */ +proto.band.tss.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.GenesisState; + return proto.band.tss.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.GenesisState} + */ +proto.band.tss.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.tss.v1beta1.Params; + reader.readMessage(value,proto.band.tss.v1beta1.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new band_tss_v1beta1_tss_pb.Group; + reader.readMessage(value,band_tss_v1beta1_tss_pb.Group.deserializeBinaryFromReader); + msg.addGroups(value); + break; + case 3: + var value = new band_tss_v1beta1_tss_pb.Member; + reader.readMessage(value,band_tss_v1beta1_tss_pb.Member.deserializeBinaryFromReader); + msg.addMembers(value); + break; + case 4: + var value = new proto.band.tss.v1beta1.DEGenesis; + reader.readMessage(value,proto.band.tss.v1beta1.DEGenesis.deserializeBinaryFromReader); + msg.addDes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.tss.v1beta1.Params.serializeBinaryToWriter + ); + } + f = message.getGroupsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_tss_v1beta1_tss_pb.Group.serializeBinaryToWriter + ); + } + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + band_tss_v1beta1_tss_pb.Member.serializeBinaryToWriter + ); + } + f = message.getDesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.band.tss.v1beta1.DEGenesis.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.tss.v1beta1.Params} + */ +proto.band.tss.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.band.tss.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, proto.band.tss.v1beta1.Params, 1)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.Params|undefined} value + * @return {!proto.band.tss.v1beta1.GenesisState} returns this +*/ +proto.band.tss.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.GenesisState} returns this + */ +proto.band.tss.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tss.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Group groups = 2; + * @return {!Array} + */ +proto.band.tss.v1beta1.GenesisState.prototype.getGroupsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tss_v1beta1_tss_pb.Group, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.GenesisState} returns this +*/ +proto.band.tss.v1beta1.GenesisState.prototype.setGroupsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.Group=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.Group} + */ +proto.band.tss.v1beta1.GenesisState.prototype.addGroups = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.tss.v1beta1.Group, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.GenesisState} returns this + */ +proto.band.tss.v1beta1.GenesisState.prototype.clearGroupsList = function() { + return this.setGroupsList([]); +}; + + +/** + * repeated Member members = 3; + * @return {!Array} + */ +proto.band.tss.v1beta1.GenesisState.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tss_v1beta1_tss_pb.Member, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.GenesisState} returns this +*/ +proto.band.tss.v1beta1.GenesisState.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.Member=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.Member} + */ +proto.band.tss.v1beta1.GenesisState.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.tss.v1beta1.Member, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.GenesisState} returns this + */ +proto.band.tss.v1beta1.GenesisState.prototype.clearMembersList = function() { + return this.setMembersList([]); +}; + + +/** + * repeated DEGenesis des = 4; + * @return {!Array} + */ +proto.band.tss.v1beta1.GenesisState.prototype.getDesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.DEGenesis, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.GenesisState} returns this +*/ +proto.band.tss.v1beta1.GenesisState.prototype.setDesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.DEGenesis=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.DEGenesis} + */ +proto.band.tss.v1beta1.GenesisState.prototype.addDes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.band.tss.v1beta1.DEGenesis, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.GenesisState} returns this + */ +proto.band.tss.v1beta1.GenesisState.prototype.clearDesList = function() { + return this.setDesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + maxGroupSize: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxDeSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + creationPeriod: jspb.Message.getFieldWithDefault(msg, 3, 0), + signingPeriod: jspb.Message.getFieldWithDefault(msg, 4, 0), + maxSigningAttempt: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxMemoLength: jspb.Message.getFieldWithDefault(msg, 6, 0), + maxMessageLength: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.Params} + */ +proto.band.tss.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.Params; + return proto.band.tss.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.Params} + */ +proto.band.tss.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxGroupSize(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxDeSize(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreationPeriod(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningPeriod(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxSigningAttempt(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxMemoLength(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxMessageLength(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxGroupSize(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getMaxDeSize(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getCreationPeriod(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSigningPeriod(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getMaxSigningAttempt(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getMaxMemoLength(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMaxMessageLength(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } +}; + + +/** + * optional uint64 max_group_size = 1; + * @return {number} + */ +proto.band.tss.v1beta1.Params.prototype.getMaxGroupSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.Params} returns this + */ +proto.band.tss.v1beta1.Params.prototype.setMaxGroupSize = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 max_de_size = 2; + * @return {number} + */ +proto.band.tss.v1beta1.Params.prototype.getMaxDeSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.Params} returns this + */ +proto.band.tss.v1beta1.Params.prototype.setMaxDeSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 creation_period = 3; + * @return {number} + */ +proto.band.tss.v1beta1.Params.prototype.getCreationPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.Params} returns this + */ +proto.band.tss.v1beta1.Params.prototype.setCreationPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 signing_period = 4; + * @return {number} + */ +proto.band.tss.v1beta1.Params.prototype.getSigningPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.Params} returns this + */ +proto.band.tss.v1beta1.Params.prototype.setSigningPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 max_signing_attempt = 5; + * @return {number} + */ +proto.band.tss.v1beta1.Params.prototype.getMaxSigningAttempt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.Params} returns this + */ +proto.band.tss.v1beta1.Params.prototype.setMaxSigningAttempt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 max_memo_length = 6; + * @return {number} + */ +proto.band.tss.v1beta1.Params.prototype.getMaxMemoLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.Params} returns this + */ +proto.band.tss.v1beta1.Params.prototype.setMaxMemoLength = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 max_message_length = 7; + * @return {number} + */ +proto.band.tss.v1beta1.Params.prototype.getMaxMessageLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.Params} returns this + */ +proto.band.tss.v1beta1.Params.prototype.setMaxMessageLength = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.DEGenesis.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.DEGenesis.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.DEGenesis} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.DEGenesis.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + de: (f = msg.getDe()) && band_tss_v1beta1_tss_pb.DE.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.DEGenesis} + */ +proto.band.tss.v1beta1.DEGenesis.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.DEGenesis; + return proto.band.tss.v1beta1.DEGenesis.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.DEGenesis} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.DEGenesis} + */ +proto.band.tss.v1beta1.DEGenesis.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = new band_tss_v1beta1_tss_pb.DE; + reader.readMessage(value,band_tss_v1beta1_tss_pb.DE.deserializeBinaryFromReader); + msg.setDe(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.DEGenesis.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.DEGenesis.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.DEGenesis} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.DEGenesis.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDe(); + if (f != null) { + writer.writeMessage( + 2, + f, + band_tss_v1beta1_tss_pb.DE.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.band.tss.v1beta1.DEGenesis.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.DEGenesis} returns this + */ +proto.band.tss.v1beta1.DEGenesis.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional DE de = 2; + * @return {?proto.band.tss.v1beta1.DE} + */ +proto.band.tss.v1beta1.DEGenesis.prototype.getDe = function() { + return /** @type{?proto.band.tss.v1beta1.DE} */ ( + jspb.Message.getWrapperField(this, band_tss_v1beta1_tss_pb.DE, 2)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.DE|undefined} value + * @return {!proto.band.tss.v1beta1.DEGenesis} returns this +*/ +proto.band.tss.v1beta1.DEGenesis.prototype.setDe = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.DEGenesis} returns this + */ +proto.band.tss.v1beta1.DEGenesis.prototype.clearDe = function() { + return this.setDe(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tss.v1beta1.DEGenesis.prototype.hasDe = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.band.tss.v1beta1); diff --git a/codegen/band/tss/v1beta1/genesis_pb_service.d.ts b/codegen/band/tss/v1beta1/genesis_pb_service.d.ts new file mode 100644 index 0000000..d852435 --- /dev/null +++ b/codegen/band/tss/v1beta1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/genesis.proto + diff --git a/codegen/band/tss/v1beta1/genesis_pb_service.js b/codegen/band/tss/v1beta1/genesis_pb_service.js new file mode 100644 index 0000000..d852435 --- /dev/null +++ b/codegen/band/tss/v1beta1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/genesis.proto + diff --git a/codegen/band/tss/v1beta1/originator.ts b/codegen/band/tss/v1beta1/originator.ts new file mode 100644 index 0000000..f289cba --- /dev/null +++ b/codegen/band/tss/v1beta1/originator.ts @@ -0,0 +1,259 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tss/v1beta1/originator.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +export namespace band.tss.v1beta1 { + export class DirectOriginator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + source_chain_id?: string; + requester?: string; + memo?: 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 ("source_chain_id" in data && data.source_chain_id != undefined) { + this.source_chain_id = data.source_chain_id; + } + if ("requester" in data && data.requester != undefined) { + this.requester = data.requester; + } + if ("memo" in data && data.memo != undefined) { + this.memo = data.memo; + } + } + } + get source_chain_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set source_chain_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get requester() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set requester(value: string) { + pb_1.Message.setField(this, 2, value); + } + get memo() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set memo(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + source_chain_id?: string; + requester?: string; + memo?: string; + }): DirectOriginator { + const message = new DirectOriginator({}); + if (data.source_chain_id != null) { + message.source_chain_id = data.source_chain_id; + } + if (data.requester != null) { + message.requester = data.requester; + } + if (data.memo != null) { + message.memo = data.memo; + } + return message; + } + toObject() { + const data: { + source_chain_id?: string; + requester?: string; + memo?: string; + } = {}; + if (this.source_chain_id != null) { + data.source_chain_id = this.source_chain_id; + } + if (this.requester != null) { + data.requester = this.requester; + } + if (this.memo != null) { + data.memo = this.memo; + } + 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.source_chain_id.length) + writer.writeString(1, this.source_chain_id); + if (this.requester.length) + writer.writeString(2, this.requester); + if (this.memo.length) + writer.writeString(3, this.memo); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DirectOriginator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DirectOriginator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.source_chain_id = reader.readString(); + break; + case 2: + message.requester = reader.readString(); + break; + case 3: + message.memo = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DirectOriginator { + return DirectOriginator.deserialize(bytes); + } + } + export class TunnelOriginator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + source_chain_id?: string; + tunnel_id?: number; + destination_chain_id?: string; + destination_contract_address?: 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 ("source_chain_id" in data && data.source_chain_id != undefined) { + this.source_chain_id = data.source_chain_id; + } + if ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("destination_chain_id" in data && data.destination_chain_id != undefined) { + this.destination_chain_id = data.destination_chain_id; + } + if ("destination_contract_address" in data && data.destination_contract_address != undefined) { + this.destination_contract_address = data.destination_contract_address; + } + } + } + get source_chain_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set source_chain_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get destination_chain_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set destination_chain_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get destination_contract_address() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set destination_contract_address(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + source_chain_id?: string; + tunnel_id?: number; + destination_chain_id?: string; + destination_contract_address?: string; + }): TunnelOriginator { + const message = new TunnelOriginator({}); + if (data.source_chain_id != null) { + message.source_chain_id = data.source_chain_id; + } + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.destination_chain_id != null) { + message.destination_chain_id = data.destination_chain_id; + } + if (data.destination_contract_address != null) { + message.destination_contract_address = data.destination_contract_address; + } + return message; + } + toObject() { + const data: { + source_chain_id?: string; + tunnel_id?: number; + destination_chain_id?: string; + destination_contract_address?: string; + } = {}; + if (this.source_chain_id != null) { + data.source_chain_id = this.source_chain_id; + } + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.destination_chain_id != null) { + data.destination_chain_id = this.destination_chain_id; + } + if (this.destination_contract_address != null) { + data.destination_contract_address = this.destination_contract_address; + } + 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.source_chain_id.length) + writer.writeString(1, this.source_chain_id); + if (this.tunnel_id != 0) + writer.writeUint64(2, this.tunnel_id); + if (this.destination_chain_id.length) + writer.writeString(3, this.destination_chain_id); + if (this.destination_contract_address.length) + writer.writeString(4, this.destination_contract_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TunnelOriginator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TunnelOriginator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.source_chain_id = reader.readString(); + break; + case 2: + message.tunnel_id = reader.readUint64(); + break; + case 3: + message.destination_chain_id = reader.readString(); + break; + case 4: + message.destination_contract_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TunnelOriginator { + return TunnelOriginator.deserialize(bytes); + } + } +} diff --git a/codegen/band/tss/v1beta1/originator_pb.d.ts b/codegen/band/tss/v1beta1/originator_pb.d.ts new file mode 100644 index 0000000..4618c3c --- /dev/null +++ b/codegen/band/tss/v1beta1/originator_pb.d.ts @@ -0,0 +1,67 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/originator.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; + +export class DirectOriginator extends jspb.Message { + getSourceChainId(): string; + setSourceChainId(value: string): void; + + getRequester(): string; + setRequester(value: string): void; + + getMemo(): string; + setMemo(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DirectOriginator.AsObject; + static toObject(includeInstance: boolean, msg: DirectOriginator): DirectOriginator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DirectOriginator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DirectOriginator; + static deserializeBinaryFromReader(message: DirectOriginator, reader: jspb.BinaryReader): DirectOriginator; +} + +export namespace DirectOriginator { + export type AsObject = { + sourceChainId: string, + requester: string, + memo: string, + } +} + +export class TunnelOriginator extends jspb.Message { + getSourceChainId(): string; + setSourceChainId(value: string): void; + + getTunnelId(): number; + setTunnelId(value: number): void; + + getDestinationChainId(): string; + setDestinationChainId(value: string): void; + + getDestinationContractAddress(): string; + setDestinationContractAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TunnelOriginator.AsObject; + static toObject(includeInstance: boolean, msg: TunnelOriginator): TunnelOriginator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TunnelOriginator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TunnelOriginator; + static deserializeBinaryFromReader(message: TunnelOriginator, reader: jspb.BinaryReader): TunnelOriginator; +} + +export namespace TunnelOriginator { + export type AsObject = { + sourceChainId: string, + tunnelId: number, + destinationChainId: string, + destinationContractAddress: string, + } +} + diff --git a/codegen/band/tss/v1beta1/originator_pb.js b/codegen/band/tss/v1beta1/originator_pb.js new file mode 100644 index 0000000..55ae4bf --- /dev/null +++ b/codegen/band/tss/v1beta1/originator_pb.js @@ -0,0 +1,476 @@ +// source: band/tss/v1beta1/originator.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +goog.exportSymbol('proto.band.tss.v1beta1.DirectOriginator', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.TunnelOriginator', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.DirectOriginator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.DirectOriginator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.DirectOriginator.displayName = 'proto.band.tss.v1beta1.DirectOriginator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.TunnelOriginator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.TunnelOriginator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.TunnelOriginator.displayName = 'proto.band.tss.v1beta1.TunnelOriginator'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.DirectOriginator.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.DirectOriginator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.DirectOriginator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.DirectOriginator.toObject = function(includeInstance, msg) { + var f, obj = { + sourceChainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + requester: jspb.Message.getFieldWithDefault(msg, 2, ""), + memo: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.DirectOriginator} + */ +proto.band.tss.v1beta1.DirectOriginator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.DirectOriginator; + return proto.band.tss.v1beta1.DirectOriginator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.DirectOriginator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.DirectOriginator} + */ +proto.band.tss.v1beta1.DirectOriginator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceChainId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRequester(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.DirectOriginator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.DirectOriginator.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.DirectOriginator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.DirectOriginator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSourceChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRequester(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string source_chain_id = 1; + * @return {string} + */ +proto.band.tss.v1beta1.DirectOriginator.prototype.getSourceChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.DirectOriginator} returns this + */ +proto.band.tss.v1beta1.DirectOriginator.prototype.setSourceChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string requester = 2; + * @return {string} + */ +proto.band.tss.v1beta1.DirectOriginator.prototype.getRequester = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.DirectOriginator} returns this + */ +proto.band.tss.v1beta1.DirectOriginator.prototype.setRequester = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string memo = 3; + * @return {string} + */ +proto.band.tss.v1beta1.DirectOriginator.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.DirectOriginator} returns this + */ +proto.band.tss.v1beta1.DirectOriginator.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.TunnelOriginator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.TunnelOriginator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.TunnelOriginator.toObject = function(includeInstance, msg) { + var f, obj = { + sourceChainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + tunnelId: jspb.Message.getFieldWithDefault(msg, 2, 0), + destinationChainId: jspb.Message.getFieldWithDefault(msg, 3, ""), + destinationContractAddress: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.TunnelOriginator} + */ +proto.band.tss.v1beta1.TunnelOriginator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.TunnelOriginator; + return proto.band.tss.v1beta1.TunnelOriginator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.TunnelOriginator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.TunnelOriginator} + */ +proto.band.tss.v1beta1.TunnelOriginator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceChainId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDestinationChainId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDestinationContractAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.TunnelOriginator.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.TunnelOriginator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.TunnelOriginator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSourceChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getDestinationChainId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDestinationContractAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string source_chain_id = 1; + * @return {string} + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.getSourceChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.TunnelOriginator} returns this + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.setSourceChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 tunnel_id = 2; + * @return {number} + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.TunnelOriginator} returns this + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string destination_chain_id = 3; + * @return {string} + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.getDestinationChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.TunnelOriginator} returns this + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.setDestinationChainId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string destination_contract_address = 4; + * @return {string} + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.getDestinationContractAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.TunnelOriginator} returns this + */ +proto.band.tss.v1beta1.TunnelOriginator.prototype.setDestinationContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.band.tss.v1beta1); diff --git a/codegen/band/tss/v1beta1/originator_pb_service.d.ts b/codegen/band/tss/v1beta1/originator_pb_service.d.ts new file mode 100644 index 0000000..87c44ef --- /dev/null +++ b/codegen/band/tss/v1beta1/originator_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/originator.proto + diff --git a/codegen/band/tss/v1beta1/originator_pb_service.js b/codegen/band/tss/v1beta1/originator_pb_service.js new file mode 100644 index 0000000..87c44ef --- /dev/null +++ b/codegen/band/tss/v1beta1/originator_pb_service.js @@ -0,0 +1,3 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/originator.proto + diff --git a/codegen/band/tss/v1beta1/query.ts b/codegen/band/tss/v1beta1/query.ts new file mode 100644 index 0000000..ece908f --- /dev/null +++ b/codegen/band/tss/v1beta1/query.ts @@ -0,0 +1,1776 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tss/v1beta1/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 "./../../../google/api/annotations"; +import * as dependency_4 from "./tss"; +import * as dependency_5 from "./genesis"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.tss.v1beta1 { + export class QueryCountsRequest 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: {}): QueryCountsRequest { + const message = new QueryCountsRequest({}); + 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): QueryCountsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCountsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCountsRequest { + return QueryCountsRequest.deserialize(bytes); + } + } + export class QueryCountsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_count?: number; + signing_count?: 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 ("group_count" in data && data.group_count != undefined) { + this.group_count = data.group_count; + } + if ("signing_count" in data && data.signing_count != undefined) { + this.signing_count = data.signing_count; + } + } + } + get group_count() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_count(value: number) { + pb_1.Message.setField(this, 1, value); + } + get signing_count() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set signing_count(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + group_count?: number; + signing_count?: number; + }): QueryCountsResponse { + const message = new QueryCountsResponse({}); + if (data.group_count != null) { + message.group_count = data.group_count; + } + if (data.signing_count != null) { + message.signing_count = data.signing_count; + } + return message; + } + toObject() { + const data: { + group_count?: number; + signing_count?: number; + } = {}; + if (this.group_count != null) { + data.group_count = this.group_count; + } + if (this.signing_count != null) { + data.signing_count = this.signing_count; + } + 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.group_count != 0) + writer.writeUint64(1, this.group_count); + if (this.signing_count != 0) + writer.writeUint64(2, this.signing_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCountsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCountsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_count = reader.readUint64(); + break; + case 2: + message.signing_count = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCountsResponse { + return QueryCountsResponse.deserialize(bytes); + } + } + export class QueryGroupRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + group_id?: number; + }): QueryGroupRequest { + const message = new QueryGroupRequest({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + return message; + } + toObject() { + const data: { + group_id?: number; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupRequest { + return QueryGroupRequest.deserialize(bytes); + } + } + export class QueryGroupResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_result?: dependency_4.band.tss.v1beta1.GroupResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group_result" in data && data.group_result != undefined) { + this.group_result = data.group_result; + } + } + } + get group_result() { + return pb_1.Message.getWrapperField(this, dependency_4.band.tss.v1beta1.GroupResult, 1) as dependency_4.band.tss.v1beta1.GroupResult; + } + set group_result(value: dependency_4.band.tss.v1beta1.GroupResult) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_group_result() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + group_result?: ReturnType; + }): QueryGroupResponse { + const message = new QueryGroupResponse({}); + if (data.group_result != null) { + message.group_result = dependency_4.band.tss.v1beta1.GroupResult.fromObject(data.group_result); + } + return message; + } + toObject() { + const data: { + group_result?: ReturnType; + } = {}; + if (this.group_result != null) { + data.group_result = this.group_result.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_group_result) + writer.writeMessage(1, this.group_result, () => this.group_result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.group_result, () => message.group_result = dependency_4.band.tss.v1beta1.GroupResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupResponse { + return QueryGroupResponse.deserialize(bytes); + } + } + export class QueryGroupsRequest 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; + }): QueryGroupsRequest { + const message = new QueryGroupsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryGroupsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupsRequest(); + 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): QueryGroupsRequest { + return QueryGroupsRequest.deserialize(bytes); + } + } + export class QueryGroupsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + groups?: dependency_4.band.tss.v1beta1.GroupResult[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("groups" in data && data.groups != undefined) { + this.groups = data.groups; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get groups() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.band.tss.v1beta1.GroupResult, 1) as dependency_4.band.tss.v1beta1.GroupResult[]; + } + set groups(value: dependency_4.band.tss.v1beta1.GroupResult[]) { + 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; + } + static fromObject(data: { + groups?: ReturnType[]; + pagination?: ReturnType; + }): QueryGroupsResponse { + const message = new QueryGroupsResponse({}); + if (data.groups != null) { + message.groups = data.groups.map(item => dependency_4.band.tss.v1beta1.GroupResult.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + groups?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.groups != null) { + data.groups = this.groups.map((item: dependency_4.band.tss.v1beta1.GroupResult) => item.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.groups.length) + writer.writeRepeatedMessage(1, this.groups, (item: dependency_4.band.tss.v1beta1.GroupResult) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.groups, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.band.tss.v1beta1.GroupResult.deserialize(reader), dependency_4.band.tss.v1beta1.GroupResult)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupsResponse { + return QueryGroupsResponse.deserialize(bytes); + } + } + export class QueryMembersRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + group_id?: number; + }): QueryMembersRequest { + const message = new QueryMembersRequest({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + return message; + } + toObject() { + const data: { + group_id?: number; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryMembersRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryMembersRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryMembersRequest { + return QueryMembersRequest.deserialize(bytes); + } + } + export class QueryMembersResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + members?: dependency_4.band.tss.v1beta1.Member[]; + }) { + 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 ("members" in data && data.members != undefined) { + this.members = data.members; + } + } + } + get members() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.band.tss.v1beta1.Member, 1) as dependency_4.band.tss.v1beta1.Member[]; + } + set members(value: dependency_4.band.tss.v1beta1.Member[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + members?: ReturnType[]; + }): QueryMembersResponse { + const message = new QueryMembersResponse({}); + if (data.members != null) { + message.members = data.members.map(item => dependency_4.band.tss.v1beta1.Member.fromObject(item)); + } + return message; + } + toObject() { + const data: { + members?: ReturnType[]; + } = {}; + if (this.members != null) { + data.members = this.members.map((item: dependency_4.band.tss.v1beta1.Member) => item.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.members.length) + writer.writeRepeatedMessage(1, this.members, (item: dependency_4.band.tss.v1beta1.Member) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryMembersResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryMembersResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.members, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.band.tss.v1beta1.Member.deserialize(reader), dependency_4.band.tss.v1beta1.Member)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryMembersResponse { + return QueryMembersResponse.deserialize(bytes); + } + } + export class QueryIsGranteeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: 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 ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + granter?: string; + grantee?: string; + }): QueryIsGranteeRequest { + const message = new QueryIsGranteeRequest({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + 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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIsGranteeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIsGranteeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIsGranteeRequest { + return QueryIsGranteeRequest.deserialize(bytes); + } + } + export class QueryIsGranteeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + is_grantee?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("is_grantee" in data && data.is_grantee != undefined) { + this.is_grantee = data.is_grantee; + } + } + } + get is_grantee() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set is_grantee(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + is_grantee?: boolean; + }): QueryIsGranteeResponse { + const message = new QueryIsGranteeResponse({}); + if (data.is_grantee != null) { + message.is_grantee = data.is_grantee; + } + return message; + } + toObject() { + const data: { + is_grantee?: boolean; + } = {}; + if (this.is_grantee != null) { + data.is_grantee = this.is_grantee; + } + 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.is_grantee != false) + writer.writeBool(1, this.is_grantee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIsGranteeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIsGranteeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.is_grantee = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIsGranteeResponse { + return QueryIsGranteeResponse.deserialize(bytes); + } + } + export class QueryDERequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + address?: string; + pagination?: ReturnType; + }): QueryDERequest { + const message = new QueryDERequest({}); + if (data.address != null) { + message.address = data.address; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + address?: string; + pagination?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDERequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDERequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + 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): QueryDERequest { + return QueryDERequest.deserialize(bytes); + } + } + export class QueryDEResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + des?: dependency_4.band.tss.v1beta1.DE[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("des" in data && data.des != undefined) { + this.des = data.des; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get des() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.band.tss.v1beta1.DE, 1) as dependency_4.band.tss.v1beta1.DE[]; + } + set des(value: dependency_4.band.tss.v1beta1.DE[]) { + 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; + } + static fromObject(data: { + des?: ReturnType[]; + pagination?: ReturnType; + }): QueryDEResponse { + const message = new QueryDEResponse({}); + if (data.des != null) { + message.des = data.des.map(item => dependency_4.band.tss.v1beta1.DE.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + des?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.des != null) { + data.des = this.des.map((item: dependency_4.band.tss.v1beta1.DE) => item.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.des.length) + writer.writeRepeatedMessage(1, this.des, (item: dependency_4.band.tss.v1beta1.DE) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDEResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDEResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.des, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.band.tss.v1beta1.DE.deserialize(reader), dependency_4.band.tss.v1beta1.DE)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDEResponse { + return QueryDEResponse.deserialize(bytes); + } + } + export class QueryPendingGroupsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): QueryPendingGroupsRequest { + const message = new QueryPendingGroupsRequest({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPendingGroupsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPendingGroupsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPendingGroupsRequest { + return QueryPendingGroupsRequest.deserialize(bytes); + } + } + export class QueryPendingGroupsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pending_groups?: number[]; + }) { + 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 ("pending_groups" in data && data.pending_groups != undefined) { + this.pending_groups = data.pending_groups; + } + } + } + get pending_groups() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set pending_groups(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + pending_groups?: number[]; + }): QueryPendingGroupsResponse { + const message = new QueryPendingGroupsResponse({}); + if (data.pending_groups != null) { + message.pending_groups = data.pending_groups; + } + return message; + } + toObject() { + const data: { + pending_groups?: number[]; + } = {}; + if (this.pending_groups != null) { + data.pending_groups = this.pending_groups; + } + 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.pending_groups.length) + writer.writePackedUint64(1, this.pending_groups); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPendingGroupsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPendingGroupsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.pending_groups = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPendingGroupsResponse { + return QueryPendingGroupsResponse.deserialize(bytes); + } + } + export class QueryPendingSigningsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): QueryPendingSigningsRequest { + const message = new QueryPendingSigningsRequest({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPendingSigningsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPendingSigningsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPendingSigningsRequest { + return QueryPendingSigningsRequest.deserialize(bytes); + } + } + export class QueryPendingSigningsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pending_signings?: number[]; + }) { + 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 ("pending_signings" in data && data.pending_signings != undefined) { + this.pending_signings = data.pending_signings; + } + } + } + get pending_signings() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set pending_signings(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + pending_signings?: number[]; + }): QueryPendingSigningsResponse { + const message = new QueryPendingSigningsResponse({}); + if (data.pending_signings != null) { + message.pending_signings = data.pending_signings; + } + return message; + } + toObject() { + const data: { + pending_signings?: number[]; + } = {}; + if (this.pending_signings != null) { + data.pending_signings = this.pending_signings; + } + 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.pending_signings.length) + writer.writePackedUint64(1, this.pending_signings); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPendingSigningsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPendingSigningsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.pending_signings = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPendingSigningsResponse { + return QueryPendingSigningsResponse.deserialize(bytes); + } + } + export class QuerySigningRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_id?: 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 ("signing_id" in data && data.signing_id != undefined) { + this.signing_id = data.signing_id; + } + } + } + get signing_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + signing_id?: number; + }): QuerySigningRequest { + const message = new QuerySigningRequest({}); + if (data.signing_id != null) { + message.signing_id = data.signing_id; + } + return message; + } + toObject() { + const data: { + signing_id?: number; + } = {}; + if (this.signing_id != null) { + data.signing_id = this.signing_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.signing_id != 0) + writer.writeUint64(1, this.signing_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySigningRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySigningRequest { + return QuerySigningRequest.deserialize(bytes); + } + } + export class QuerySigningResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_result?: dependency_4.band.tss.v1beta1.SigningResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signing_result" in data && data.signing_result != undefined) { + this.signing_result = data.signing_result; + } + } + } + get signing_result() { + return pb_1.Message.getWrapperField(this, dependency_4.band.tss.v1beta1.SigningResult, 1) as dependency_4.band.tss.v1beta1.SigningResult; + } + set signing_result(value: dependency_4.band.tss.v1beta1.SigningResult) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_signing_result() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + signing_result?: ReturnType; + }): QuerySigningResponse { + const message = new QuerySigningResponse({}); + if (data.signing_result != null) { + message.signing_result = dependency_4.band.tss.v1beta1.SigningResult.fromObject(data.signing_result); + } + return message; + } + toObject() { + const data: { + signing_result?: ReturnType; + } = {}; + if (this.signing_result != null) { + data.signing_result = this.signing_result.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_signing_result) + writer.writeMessage(1, this.signing_result, () => this.signing_result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySigningResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signing_result, () => message.signing_result = dependency_4.band.tss.v1beta1.SigningResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySigningResponse { + return QuerySigningResponse.deserialize(bytes); + } + } + export class QuerySigningsRequest 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; + }): QuerySigningsRequest { + const message = new QuerySigningsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QuerySigningsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningsRequest(); + 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): QuerySigningsRequest { + return QuerySigningsRequest.deserialize(bytes); + } + } + export class QuerySigningsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_results?: dependency_4.band.tss.v1beta1.SigningResult[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("signing_results" in data && data.signing_results != undefined) { + this.signing_results = data.signing_results; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get signing_results() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.band.tss.v1beta1.SigningResult, 1) as dependency_4.band.tss.v1beta1.SigningResult[]; + } + set signing_results(value: dependency_4.band.tss.v1beta1.SigningResult[]) { + 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; + } + static fromObject(data: { + signing_results?: ReturnType[]; + pagination?: ReturnType; + }): QuerySigningsResponse { + const message = new QuerySigningsResponse({}); + if (data.signing_results != null) { + message.signing_results = data.signing_results.map(item => dependency_4.band.tss.v1beta1.SigningResult.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + signing_results?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.signing_results != null) { + data.signing_results = this.signing_results.map((item: dependency_4.band.tss.v1beta1.SigningResult) => item.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.signing_results.length) + writer.writeRepeatedMessage(1, this.signing_results, (item: dependency_4.band.tss.v1beta1.SigningResult) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySigningsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signing_results, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.band.tss.v1beta1.SigningResult.deserialize(reader), dependency_4.band.tss.v1beta1.SigningResult)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySigningsResponse { + return QuerySigningsResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_5.band.tss.v1beta1.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_5.band.tss.v1beta1.Params, 1) as dependency_5.band.tss.v1beta1.Params; + } + set params(value: dependency_5.band.tss.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_5.band.tss.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_5.band.tss.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Counts: { + path: "/band.tss.v1beta1.Query/Counts", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryCountsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryCountsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryCountsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryCountsResponse.deserialize(new Uint8Array(bytes)) + }, + Groups: { + path: "/band.tss.v1beta1.Query/Groups", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupsResponse.deserialize(new Uint8Array(bytes)) + }, + Group: { + path: "/band.tss.v1beta1.Query/Group", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupResponse.deserialize(new Uint8Array(bytes)) + }, + Members: { + path: "/band.tss.v1beta1.Query/Members", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryMembersRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryMembersRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryMembersResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryMembersResponse.deserialize(new Uint8Array(bytes)) + }, + IsGrantee: { + path: "/band.tss.v1beta1.Query/IsGrantee", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryIsGranteeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryIsGranteeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryIsGranteeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryIsGranteeResponse.deserialize(new Uint8Array(bytes)) + }, + DE: { + path: "/band.tss.v1beta1.Query/DE", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDERequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDERequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDEResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDEResponse.deserialize(new Uint8Array(bytes)) + }, + PendingGroups: { + path: "/band.tss.v1beta1.Query/PendingGroups", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPendingGroupsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPendingGroupsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPendingGroupsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPendingGroupsResponse.deserialize(new Uint8Array(bytes)) + }, + PendingSignings: { + path: "/band.tss.v1beta1.Query/PendingSignings", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPendingSigningsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPendingSigningsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPendingSigningsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPendingSigningsResponse.deserialize(new Uint8Array(bytes)) + }, + Signing: { + path: "/band.tss.v1beta1.Query/Signing", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySigningRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySigningRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySigningResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySigningResponse.deserialize(new Uint8Array(bytes)) + }, + Signings: { + path: "/band.tss.v1beta1.Query/Signings", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySigningsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySigningsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySigningsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySigningsResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/band.tss.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Counts(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Groups(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Group(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Members(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract IsGrantee(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DE(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PendingGroups(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PendingSignings(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Signing(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Signings(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Counts: GrpcUnaryServiceInterface = (message: QueryCountsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Counts(message, metadata, options, callback); + }; + Groups: GrpcUnaryServiceInterface = (message: QueryGroupsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Groups(message, metadata, options, callback); + }; + Group: GrpcUnaryServiceInterface = (message: QueryGroupRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Group(message, metadata, options, callback); + }; + Members: GrpcUnaryServiceInterface = (message: QueryMembersRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Members(message, metadata, options, callback); + }; + IsGrantee: GrpcUnaryServiceInterface = (message: QueryIsGranteeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.IsGrantee(message, metadata, options, callback); + }; + DE: GrpcUnaryServiceInterface = (message: QueryDERequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DE(message, metadata, options, callback); + }; + PendingGroups: GrpcUnaryServiceInterface = (message: QueryPendingGroupsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PendingGroups(message, metadata, options, callback); + }; + PendingSignings: GrpcUnaryServiceInterface = (message: QueryPendingSigningsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PendingSignings(message, metadata, options, callback); + }; + Signing: GrpcUnaryServiceInterface = (message: QuerySigningRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Signing(message, metadata, options, callback); + }; + Signings: GrpcUnaryServiceInterface = (message: QuerySigningsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Signings(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + } +} diff --git a/proto/tss/v1beta1/query_pb.d.ts b/codegen/band/tss/v1beta1/query_pb.d.ts similarity index 61% rename from proto/tss/v1beta1/query_pb.d.ts rename to codegen/band/tss/v1beta1/query_pb.d.ts index 8de9cf5..84e1b3b 100644 --- a/proto/tss/v1beta1/query_pb.d.ts +++ b/codegen/band/tss/v1beta1/query_pb.d.ts @@ -1,11 +1,12 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/query.proto +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/query.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as cosmos_base_query_v1beta1_pagination_pb from "../../cosmos/base/query/v1beta1/pagination_pb"; -import * as google_api_annotations_pb from "../../google/api/annotations_pb"; -import * as tss_v1beta1_tss_pb from "../../tss/v1beta1/tss_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_base_query_v1beta1_pagination_pb from "../../../cosmos/base/query/v1beta1/pagination_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as band_tss_v1beta1_tss_pb from "../../../band/tss/v1beta1/tss_pb"; +import * as band_tss_v1beta1_genesis_pb from "../../../band/tss/v1beta1/genesis_pb"; export class QueryCountsRequest extends jspb.Message { serializeBinary(): Uint8Array; @@ -30,9 +31,6 @@ export class QueryCountsResponse extends jspb.Message { getSigningCount(): number; setSigningCount(value: number): void; - getReplacementCount(): number; - setReplacementCount(value: number): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QueryCountsResponse.AsObject; static toObject(includeInstance: boolean, msg: QueryCountsResponse): QueryCountsResponse.AsObject; @@ -47,7 +45,6 @@ export namespace QueryCountsResponse { export type AsObject = { groupCount: number, signingCount: number, - replacementCount: number, } } @@ -72,45 +69,10 @@ export namespace QueryGroupRequest { } export class QueryGroupResponse extends jspb.Message { - hasGroup(): boolean; - clearGroup(): void; - getGroup(): tss_v1beta1_tss_pb.Group | undefined; - setGroup(value?: tss_v1beta1_tss_pb.Group): void; - - getDkgContext(): Uint8Array | string; - getDkgContext_asU8(): Uint8Array; - getDkgContext_asB64(): string; - setDkgContext(value: Uint8Array | string): void; - - clearMembersList(): void; - getMembersList(): Array; - setMembersList(value: Array): void; - addMembers(value?: tss_v1beta1_tss_pb.Member, index?: number): tss_v1beta1_tss_pb.Member; - - clearStatusesList(): void; - getStatusesList(): Array; - setStatusesList(value: Array): void; - addStatuses(value?: tss_v1beta1_tss_pb.Status, index?: number): tss_v1beta1_tss_pb.Status; - - clearRound1InfosList(): void; - getRound1InfosList(): Array; - setRound1InfosList(value: Array): void; - addRound1Infos(value?: tss_v1beta1_tss_pb.Round1Info, index?: number): tss_v1beta1_tss_pb.Round1Info; - - clearRound2InfosList(): void; - getRound2InfosList(): Array; - setRound2InfosList(value: Array): void; - addRound2Infos(value?: tss_v1beta1_tss_pb.Round2Info, index?: number): tss_v1beta1_tss_pb.Round2Info; - - clearComplaintsWithStatusList(): void; - getComplaintsWithStatusList(): Array; - setComplaintsWithStatusList(value: Array): void; - addComplaintsWithStatus(value?: tss_v1beta1_tss_pb.ComplaintsWithStatus, index?: number): tss_v1beta1_tss_pb.ComplaintsWithStatus; - - clearConfirmsList(): void; - getConfirmsList(): Array; - setConfirmsList(value: Array): void; - addConfirms(value?: tss_v1beta1_tss_pb.Confirm, index?: number): tss_v1beta1_tss_pb.Confirm; + hasGroupResult(): boolean; + clearGroupResult(): void; + getGroupResult(): band_tss_v1beta1_tss_pb.GroupResult | undefined; + setGroupResult(value?: band_tss_v1beta1_tss_pb.GroupResult): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QueryGroupResponse.AsObject; @@ -124,14 +86,57 @@ export class QueryGroupResponse extends jspb.Message { export namespace QueryGroupResponse { export type AsObject = { - group?: tss_v1beta1_tss_pb.Group.AsObject, - dkgContext: Uint8Array | string, - membersList: Array, - statusesList: Array, - round1InfosList: Array, - round2InfosList: Array, - complaintsWithStatusList: Array, - confirmsList: Array, + groupResult?: band_tss_v1beta1_tss_pb.GroupResult.AsObject, + } +} + +export class QueryGroupsRequest extends jspb.Message { + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryGroupsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryGroupsRequest): QueryGroupsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryGroupsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryGroupsRequest; + static deserializeBinaryFromReader(message: QueryGroupsRequest, reader: jspb.BinaryReader): QueryGroupsRequest; +} + +export namespace QueryGroupsRequest { + export type AsObject = { + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryGroupsResponse extends jspb.Message { + clearGroupsList(): void; + getGroupsList(): Array; + setGroupsList(value: Array): void; + addGroups(value?: band_tss_v1beta1_tss_pb.GroupResult, index?: number): band_tss_v1beta1_tss_pb.GroupResult; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryGroupsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryGroupsResponse): QueryGroupsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryGroupsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryGroupsResponse; + static deserializeBinaryFromReader(message: QueryGroupsResponse, reader: jspb.BinaryReader): QueryGroupsResponse; +} + +export namespace QueryGroupsResponse { + export type AsObject = { + groupsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, } } @@ -157,9 +162,9 @@ export namespace QueryMembersRequest { export class QueryMembersResponse extends jspb.Message { clearMembersList(): void; - getMembersList(): Array; - setMembersList(value: Array): void; - addMembers(value?: tss_v1beta1_tss_pb.Member, index?: number): tss_v1beta1_tss_pb.Member; + getMembersList(): Array; + setMembersList(value: Array): void; + addMembers(value?: band_tss_v1beta1_tss_pb.Member, index?: number): band_tss_v1beta1_tss_pb.Member; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QueryMembersResponse.AsObject; @@ -173,7 +178,7 @@ export class QueryMembersResponse extends jspb.Message { export namespace QueryMembersResponse { export type AsObject = { - membersList: Array, + membersList: Array, } } @@ -249,9 +254,9 @@ export namespace QueryDERequest { export class QueryDEResponse extends jspb.Message { clearDesList(): void; - getDesList(): Array; - setDesList(value: Array): void; - addDes(value?: tss_v1beta1_tss_pb.DE, index?: number): tss_v1beta1_tss_pb.DE; + getDesList(): Array; + setDesList(value: Array): void; + addDes(value?: band_tss_v1beta1_tss_pb.DE, index?: number): band_tss_v1beta1_tss_pb.DE; hasPagination(): boolean; clearPagination(): void; @@ -270,7 +275,7 @@ export class QueryDEResponse extends jspb.Message { export namespace QueryDEResponse { export type AsObject = { - desList: Array, + desList: Array, pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, } } @@ -380,20 +385,10 @@ export namespace QuerySigningRequest { } export class QuerySigningResponse extends jspb.Message { - hasSigning(): boolean; - clearSigning(): void; - getSigning(): tss_v1beta1_tss_pb.Signing | undefined; - setSigning(value?: tss_v1beta1_tss_pb.Signing): void; - - hasEvmSignature(): boolean; - clearEvmSignature(): void; - getEvmSignature(): tss_v1beta1_tss_pb.EVMSignature | undefined; - setEvmSignature(value?: tss_v1beta1_tss_pb.EVMSignature): void; - - clearReceivedPartialSignaturesList(): void; - getReceivedPartialSignaturesList(): Array; - setReceivedPartialSignaturesList(value: Array): void; - addReceivedPartialSignatures(value?: tss_v1beta1_tss_pb.PartialSignature, index?: number): tss_v1beta1_tss_pb.PartialSignature; + hasSigningResult(): boolean; + clearSigningResult(): void; + getSigningResult(): band_tss_v1beta1_tss_pb.SigningResult | undefined; + setSigningResult(value?: band_tss_v1beta1_tss_pb.SigningResult): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QuerySigningResponse.AsObject; @@ -407,139 +402,37 @@ export class QuerySigningResponse extends jspb.Message { export namespace QuerySigningResponse { export type AsObject = { - signing?: tss_v1beta1_tss_pb.Signing.AsObject, - evmSignature?: tss_v1beta1_tss_pb.EVMSignature.AsObject, - receivedPartialSignaturesList: Array, - } -} - -export class QueryStatusesRequest extends jspb.Message { - getStatus(): tss_v1beta1_tss_pb.MemberStatusMap[keyof tss_v1beta1_tss_pb.MemberStatusMap]; - setStatus(value: tss_v1beta1_tss_pb.MemberStatusMap[keyof tss_v1beta1_tss_pb.MemberStatusMap]): void; - - hasPagination(): boolean; - clearPagination(): void; - getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; - setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryStatusesRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryStatusesRequest): QueryStatusesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryStatusesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryStatusesRequest; - static deserializeBinaryFromReader(message: QueryStatusesRequest, reader: jspb.BinaryReader): QueryStatusesRequest; -} - -export namespace QueryStatusesRequest { - export type AsObject = { - status: tss_v1beta1_tss_pb.MemberStatusMap[keyof tss_v1beta1_tss_pb.MemberStatusMap], - pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + signingResult?: band_tss_v1beta1_tss_pb.SigningResult.AsObject, } } -export class QueryStatusesResponse extends jspb.Message { - clearStatusesList(): void; - getStatusesList(): Array; - setStatusesList(value: Array): void; - addStatuses(value?: tss_v1beta1_tss_pb.Status, index?: number): tss_v1beta1_tss_pb.Status; - - hasPagination(): boolean; - clearPagination(): void; - getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; - setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryStatusesResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryStatusesResponse): QueryStatusesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryStatusesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryStatusesResponse; - static deserializeBinaryFromReader(message: QueryStatusesResponse, reader: jspb.BinaryReader): QueryStatusesResponse; -} - -export namespace QueryStatusesResponse { - export type AsObject = { - statusesList: Array, - pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, - } -} - -export class QueryStatusRequest extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryStatusRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryStatusRequest): QueryStatusRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryStatusRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryStatusRequest; - static deserializeBinaryFromReader(message: QueryStatusRequest, reader: jspb.BinaryReader): QueryStatusRequest; -} - -export namespace QueryStatusRequest { - export type AsObject = { - address: string, - } -} - -export class QueryStatusResponse extends jspb.Message { - hasStatus(): boolean; - clearStatus(): void; - getStatus(): tss_v1beta1_tss_pb.Status | undefined; - setStatus(value?: tss_v1beta1_tss_pb.Status): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryStatusResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryStatusResponse): QueryStatusResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryStatusResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryStatusResponse; - static deserializeBinaryFromReader(message: QueryStatusResponse, reader: jspb.BinaryReader): QueryStatusResponse; -} - -export namespace QueryStatusResponse { - export type AsObject = { - status?: tss_v1beta1_tss_pb.Status.AsObject, - } -} - -export class QueryReplacementsRequest extends jspb.Message { - getStatus(): tss_v1beta1_tss_pb.ReplacementStatusMap[keyof tss_v1beta1_tss_pb.ReplacementStatusMap]; - setStatus(value: tss_v1beta1_tss_pb.ReplacementStatusMap[keyof tss_v1beta1_tss_pb.ReplacementStatusMap]): void; - +export class QuerySigningsRequest extends jspb.Message { hasPagination(): boolean; clearPagination(): void; getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryReplacementsRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryReplacementsRequest): QueryReplacementsRequest.AsObject; + toObject(includeInstance?: boolean): QuerySigningsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QuerySigningsRequest): QuerySigningsRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryReplacementsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryReplacementsRequest; - static deserializeBinaryFromReader(message: QueryReplacementsRequest, reader: jspb.BinaryReader): QueryReplacementsRequest; + static serializeBinaryToWriter(message: QuerySigningsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QuerySigningsRequest; + static deserializeBinaryFromReader(message: QuerySigningsRequest, reader: jspb.BinaryReader): QuerySigningsRequest; } -export namespace QueryReplacementsRequest { +export namespace QuerySigningsRequest { export type AsObject = { - status: tss_v1beta1_tss_pb.ReplacementStatusMap[keyof tss_v1beta1_tss_pb.ReplacementStatusMap], pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, } } -export class QueryReplacementsResponse extends jspb.Message { - clearReplacementsList(): void; - getReplacementsList(): Array; - setReplacementsList(value: Array): void; - addReplacements(value?: tss_v1beta1_tss_pb.Replacement, index?: number): tss_v1beta1_tss_pb.Replacement; +export class QuerySigningsResponse extends jspb.Message { + clearSigningResultsList(): void; + getSigningResultsList(): Array; + setSigningResultsList(value: Array): void; + addSigningResults(value?: band_tss_v1beta1_tss_pb.SigningResult, index?: number): band_tss_v1beta1_tss_pb.SigningResult; hasPagination(): boolean; clearPagination(): void; @@ -547,61 +440,57 @@ export class QueryReplacementsResponse extends jspb.Message { setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryReplacementsResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryReplacementsResponse): QueryReplacementsResponse.AsObject; + toObject(includeInstance?: boolean): QuerySigningsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QuerySigningsResponse): QuerySigningsResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryReplacementsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryReplacementsResponse; - static deserializeBinaryFromReader(message: QueryReplacementsResponse, reader: jspb.BinaryReader): QueryReplacementsResponse; + static serializeBinaryToWriter(message: QuerySigningsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QuerySigningsResponse; + static deserializeBinaryFromReader(message: QuerySigningsResponse, reader: jspb.BinaryReader): QuerySigningsResponse; } -export namespace QueryReplacementsResponse { +export namespace QuerySigningsResponse { export type AsObject = { - replacementsList: Array, + signingResultsList: Array, pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, } } -export class QueryReplacementRequest extends jspb.Message { - getId(): number; - setId(value: number): void; - +export class QueryParamsRequest extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryReplacementRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryReplacementRequest): QueryReplacementRequest.AsObject; + toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryReplacementRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryReplacementRequest; - static deserializeBinaryFromReader(message: QueryReplacementRequest, reader: jspb.BinaryReader): QueryReplacementRequest; + static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; + static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; } -export namespace QueryReplacementRequest { +export namespace QueryParamsRequest { export type AsObject = { - id: number, } } -export class QueryReplacementResponse extends jspb.Message { - hasReplacement(): boolean; - clearReplacement(): void; - getReplacement(): tss_v1beta1_tss_pb.Replacement | undefined; - setReplacement(value?: tss_v1beta1_tss_pb.Replacement): void; +export class QueryParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_tss_v1beta1_genesis_pb.Params | undefined; + setParams(value?: band_tss_v1beta1_genesis_pb.Params): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryReplacementResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryReplacementResponse): QueryReplacementResponse.AsObject; + toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryReplacementResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryReplacementResponse; - static deserializeBinaryFromReader(message: QueryReplacementResponse, reader: jspb.BinaryReader): QueryReplacementResponse; + static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; + static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; } -export namespace QueryReplacementResponse { +export namespace QueryParamsResponse { export type AsObject = { - replacement?: tss_v1beta1_tss_pb.Replacement.AsObject, + params?: band_tss_v1beta1_genesis_pb.Params.AsObject, } } diff --git a/proto/tss/v1beta1/query_pb.js b/codegen/band/tss/v1beta1/query_pb.js similarity index 51% rename from proto/tss/v1beta1/query_pb.js rename to codegen/band/tss/v1beta1/query_pb.js index 7eed1e1..340d66c 100644 --- a/proto/tss/v1beta1/query_pb.js +++ b/codegen/band/tss/v1beta1/query_pb.js @@ -1,4 +1,4 @@ -// source: tss/v1beta1/query.proto +// source: band/tss/v1beta1/query.proto /** * @fileoverview * @enhanceable @@ -15,38 +15,38 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js'); +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js'); goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); -var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); -var tss_v1beta1_tss_pb = require('../../tss/v1beta1/tss_pb.js'); -goog.object.extend(proto, tss_v1beta1_tss_pb); -goog.exportSymbol('proto.tss.v1beta1.QueryCountsRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryCountsResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryDERequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryDEResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryGroupRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryGroupResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryIsGranteeRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryIsGranteeResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryMembersRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryMembersResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryPendingGroupsRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryPendingGroupsResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryPendingSigningsRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryPendingSigningsResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryReplacementRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryReplacementResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryReplacementsRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryReplacementsResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QuerySigningRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QuerySigningResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryStatusRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryStatusResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryStatusesRequest', null, global); -goog.exportSymbol('proto.tss.v1beta1.QueryStatusesResponse', null, global); +var band_tss_v1beta1_tss_pb = require('../../../band/tss/v1beta1/tss_pb.js'); +goog.object.extend(proto, band_tss_v1beta1_tss_pb); +var band_tss_v1beta1_genesis_pb = require('../../../band/tss/v1beta1/genesis_pb.js'); +goog.object.extend(proto, band_tss_v1beta1_genesis_pb); +goog.exportSymbol('proto.band.tss.v1beta1.QueryCountsRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryCountsResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryDERequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryDEResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryGroupRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryGroupResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryGroupsRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryGroupsResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryIsGranteeRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryIsGranteeResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryMembersRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryMembersResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryPendingGroupsRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryPendingGroupsResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryPendingSigningsRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QueryPendingSigningsResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QuerySigningRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QuerySigningResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QuerySigningsRequest', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.QuerySigningsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -57,16 +57,16 @@ goog.exportSymbol('proto.tss.v1beta1.QueryStatusesResponse', null, global); * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryCountsRequest = function(opt_data) { +proto.band.tss.v1beta1.QueryCountsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryCountsRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryCountsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryCountsRequest.displayName = 'proto.tss.v1beta1.QueryCountsRequest'; + proto.band.tss.v1beta1.QueryCountsRequest.displayName = 'proto.band.tss.v1beta1.QueryCountsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -78,16 +78,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryCountsResponse = function(opt_data) { +proto.band.tss.v1beta1.QueryCountsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryCountsResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryCountsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryCountsResponse.displayName = 'proto.tss.v1beta1.QueryCountsResponse'; + proto.band.tss.v1beta1.QueryCountsResponse.displayName = 'proto.band.tss.v1beta1.QueryCountsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -99,16 +99,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryGroupRequest = function(opt_data) { +proto.band.tss.v1beta1.QueryGroupRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryGroupRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryGroupRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryGroupRequest.displayName = 'proto.tss.v1beta1.QueryGroupRequest'; + proto.band.tss.v1beta1.QueryGroupRequest.displayName = 'proto.band.tss.v1beta1.QueryGroupRequest'; } /** * Generated by JsPbCodeGenerator. @@ -120,58 +120,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryGroupResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.QueryGroupResponse.repeatedFields_, null); -}; -goog.inherits(proto.tss.v1beta1.QueryGroupResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.QueryGroupResponse.displayName = 'proto.tss.v1beta1.QueryGroupResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.QueryMembersRequest = function(opt_data) { +proto.band.tss.v1beta1.QueryGroupResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryMembersRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.QueryMembersRequest.displayName = 'proto.tss.v1beta1.QueryMembersRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.QueryMembersResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.QueryMembersResponse.repeatedFields_, null); -}; -goog.inherits(proto.tss.v1beta1.QueryMembersResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryGroupResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryMembersResponse.displayName = 'proto.tss.v1beta1.QueryMembersResponse'; + proto.band.tss.v1beta1.QueryGroupResponse.displayName = 'proto.band.tss.v1beta1.QueryGroupResponse'; } /** * Generated by JsPbCodeGenerator. @@ -183,16 +141,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryIsGranteeRequest = function(opt_data) { +proto.band.tss.v1beta1.QueryGroupsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryIsGranteeRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryGroupsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryIsGranteeRequest.displayName = 'proto.tss.v1beta1.QueryIsGranteeRequest'; + proto.band.tss.v1beta1.QueryGroupsRequest.displayName = 'proto.band.tss.v1beta1.QueryGroupsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -204,16 +162,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryIsGranteeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.band.tss.v1beta1.QueryGroupsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.QueryGroupsResponse.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.QueryIsGranteeResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryGroupsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryIsGranteeResponse.displayName = 'proto.tss.v1beta1.QueryIsGranteeResponse'; + proto.band.tss.v1beta1.QueryGroupsResponse.displayName = 'proto.band.tss.v1beta1.QueryGroupsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -225,16 +183,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryDERequest = function(opt_data) { +proto.band.tss.v1beta1.QueryMembersRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryDERequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryMembersRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryDERequest.displayName = 'proto.tss.v1beta1.QueryDERequest'; + proto.band.tss.v1beta1.QueryMembersRequest.displayName = 'proto.band.tss.v1beta1.QueryMembersRequest'; } /** * Generated by JsPbCodeGenerator. @@ -246,16 +204,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryDEResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.QueryDEResponse.repeatedFields_, null); +proto.band.tss.v1beta1.QueryMembersResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.QueryMembersResponse.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.QueryDEResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryMembersResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryDEResponse.displayName = 'proto.tss.v1beta1.QueryDEResponse'; + proto.band.tss.v1beta1.QueryMembersResponse.displayName = 'proto.band.tss.v1beta1.QueryMembersResponse'; } /** * Generated by JsPbCodeGenerator. @@ -267,16 +225,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryPendingGroupsRequest = function(opt_data) { +proto.band.tss.v1beta1.QueryIsGranteeRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryPendingGroupsRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryIsGranteeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryPendingGroupsRequest.displayName = 'proto.tss.v1beta1.QueryPendingGroupsRequest'; + proto.band.tss.v1beta1.QueryIsGranteeRequest.displayName = 'proto.band.tss.v1beta1.QueryIsGranteeRequest'; } /** * Generated by JsPbCodeGenerator. @@ -288,16 +246,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryPendingGroupsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.QueryPendingGroupsResponse.repeatedFields_, null); +proto.band.tss.v1beta1.QueryIsGranteeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryPendingGroupsResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryIsGranteeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryPendingGroupsResponse.displayName = 'proto.tss.v1beta1.QueryPendingGroupsResponse'; + proto.band.tss.v1beta1.QueryIsGranteeResponse.displayName = 'proto.band.tss.v1beta1.QueryIsGranteeResponse'; } /** * Generated by JsPbCodeGenerator. @@ -309,16 +267,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryPendingSigningsRequest = function(opt_data) { +proto.band.tss.v1beta1.QueryDERequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryPendingSigningsRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryDERequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryPendingSigningsRequest.displayName = 'proto.tss.v1beta1.QueryPendingSigningsRequest'; + proto.band.tss.v1beta1.QueryDERequest.displayName = 'proto.band.tss.v1beta1.QueryDERequest'; } /** * Generated by JsPbCodeGenerator. @@ -330,16 +288,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryPendingSigningsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.QueryPendingSigningsResponse.repeatedFields_, null); +proto.band.tss.v1beta1.QueryDEResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.QueryDEResponse.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.QueryPendingSigningsResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryDEResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryPendingSigningsResponse.displayName = 'proto.tss.v1beta1.QueryPendingSigningsResponse'; + proto.band.tss.v1beta1.QueryDEResponse.displayName = 'proto.band.tss.v1beta1.QueryDEResponse'; } /** * Generated by JsPbCodeGenerator. @@ -351,16 +309,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QuerySigningRequest = function(opt_data) { +proto.band.tss.v1beta1.QueryPendingGroupsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QuerySigningRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryPendingGroupsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QuerySigningRequest.displayName = 'proto.tss.v1beta1.QuerySigningRequest'; + proto.band.tss.v1beta1.QueryPendingGroupsRequest.displayName = 'proto.band.tss.v1beta1.QueryPendingGroupsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -372,16 +330,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QuerySigningResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.QuerySigningResponse.repeatedFields_, null); +proto.band.tss.v1beta1.QueryPendingGroupsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.QueryPendingGroupsResponse.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.QuerySigningResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryPendingGroupsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QuerySigningResponse.displayName = 'proto.tss.v1beta1.QuerySigningResponse'; + proto.band.tss.v1beta1.QueryPendingGroupsResponse.displayName = 'proto.band.tss.v1beta1.QueryPendingGroupsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -393,16 +351,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryStatusesRequest = function(opt_data) { +proto.band.tss.v1beta1.QueryPendingSigningsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryStatusesRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryPendingSigningsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryStatusesRequest.displayName = 'proto.tss.v1beta1.QueryStatusesRequest'; + proto.band.tss.v1beta1.QueryPendingSigningsRequest.displayName = 'proto.band.tss.v1beta1.QueryPendingSigningsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -414,16 +372,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryStatusesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.QueryStatusesResponse.repeatedFields_, null); +proto.band.tss.v1beta1.QueryPendingSigningsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.QueryPendingSigningsResponse.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.QueryStatusesResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryPendingSigningsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryStatusesResponse.displayName = 'proto.tss.v1beta1.QueryStatusesResponse'; + proto.band.tss.v1beta1.QueryPendingSigningsResponse.displayName = 'proto.band.tss.v1beta1.QueryPendingSigningsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -435,16 +393,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryStatusRequest = function(opt_data) { +proto.band.tss.v1beta1.QuerySigningRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryStatusRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QuerySigningRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryStatusRequest.displayName = 'proto.tss.v1beta1.QueryStatusRequest'; + proto.band.tss.v1beta1.QuerySigningRequest.displayName = 'proto.band.tss.v1beta1.QuerySigningRequest'; } /** * Generated by JsPbCodeGenerator. @@ -456,16 +414,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryStatusResponse = function(opt_data) { +proto.band.tss.v1beta1.QuerySigningResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryStatusResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QuerySigningResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryStatusResponse.displayName = 'proto.tss.v1beta1.QueryStatusResponse'; + proto.band.tss.v1beta1.QuerySigningResponse.displayName = 'proto.band.tss.v1beta1.QuerySigningResponse'; } /** * Generated by JsPbCodeGenerator. @@ -477,16 +435,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryReplacementsRequest = function(opt_data) { +proto.band.tss.v1beta1.QuerySigningsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryReplacementsRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QuerySigningsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryReplacementsRequest.displayName = 'proto.tss.v1beta1.QueryReplacementsRequest'; + proto.band.tss.v1beta1.QuerySigningsRequest.displayName = 'proto.band.tss.v1beta1.QuerySigningsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -498,16 +456,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryReplacementsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.QueryReplacementsResponse.repeatedFields_, null); +proto.band.tss.v1beta1.QuerySigningsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.QuerySigningsResponse.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.QueryReplacementsResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QuerySigningsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryReplacementsResponse.displayName = 'proto.tss.v1beta1.QueryReplacementsResponse'; + proto.band.tss.v1beta1.QuerySigningsResponse.displayName = 'proto.band.tss.v1beta1.QuerySigningsResponse'; } /** * Generated by JsPbCodeGenerator. @@ -519,16 +477,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryReplacementRequest = function(opt_data) { +proto.band.tss.v1beta1.QueryParamsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryReplacementRequest, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryParamsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryReplacementRequest.displayName = 'proto.tss.v1beta1.QueryReplacementRequest'; + proto.band.tss.v1beta1.QueryParamsRequest.displayName = 'proto.band.tss.v1beta1.QueryParamsRequest'; } /** * Generated by JsPbCodeGenerator. @@ -540,16 +498,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.QueryReplacementResponse = function(opt_data) { +proto.band.tss.v1beta1.QueryParamsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.QueryReplacementResponse, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.QueryParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.QueryReplacementResponse.displayName = 'proto.tss.v1beta1.QueryReplacementResponse'; + proto.band.tss.v1beta1.QueryParamsResponse.displayName = 'proto.band.tss.v1beta1.QueryParamsResponse'; } @@ -567,8 +525,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryCountsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryCountsRequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryCountsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryCountsRequest.toObject(opt_includeInstance, this); }; @@ -577,11 +535,11 @@ proto.tss.v1beta1.QueryCountsRequest.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryCountsRequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryCountsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryCountsRequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryCountsRequest.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -597,23 +555,23 @@ proto.tss.v1beta1.QueryCountsRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryCountsRequest} + * @return {!proto.band.tss.v1beta1.QueryCountsRequest} */ -proto.tss.v1beta1.QueryCountsRequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryCountsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryCountsRequest; - return proto.tss.v1beta1.QueryCountsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryCountsRequest; + return proto.band.tss.v1beta1.QueryCountsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryCountsRequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryCountsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryCountsRequest} + * @return {!proto.band.tss.v1beta1.QueryCountsRequest} */ -proto.tss.v1beta1.QueryCountsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryCountsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -633,9 +591,9 @@ proto.tss.v1beta1.QueryCountsRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryCountsRequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryCountsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryCountsRequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryCountsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -643,11 +601,11 @@ proto.tss.v1beta1.QueryCountsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryCountsRequest} message + * @param {!proto.band.tss.v1beta1.QueryCountsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryCountsRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryCountsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -668,8 +626,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryCountsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryCountsResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryCountsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryCountsResponse.toObject(opt_includeInstance, this); }; @@ -678,15 +636,14 @@ proto.tss.v1beta1.QueryCountsResponse.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryCountsResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryCountsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryCountsResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryCountsResponse.toObject = function(includeInstance, msg) { var f, obj = { groupCount: jspb.Message.getFieldWithDefault(msg, 1, 0), - signingCount: jspb.Message.getFieldWithDefault(msg, 2, 0), - replacementCount: jspb.Message.getFieldWithDefault(msg, 3, 0) + signingCount: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -700,23 +657,23 @@ proto.tss.v1beta1.QueryCountsResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryCountsResponse} + * @return {!proto.band.tss.v1beta1.QueryCountsResponse} */ -proto.tss.v1beta1.QueryCountsResponse.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryCountsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryCountsResponse; - return proto.tss.v1beta1.QueryCountsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryCountsResponse; + return proto.band.tss.v1beta1.QueryCountsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryCountsResponse} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryCountsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryCountsResponse} + * @return {!proto.band.tss.v1beta1.QueryCountsResponse} */ -proto.tss.v1beta1.QueryCountsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryCountsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -731,10 +688,6 @@ proto.tss.v1beta1.QueryCountsResponse.deserializeBinaryFromReader = function(msg var value = /** @type {number} */ (reader.readUint64()); msg.setSigningCount(value); break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setReplacementCount(value); - break; default: reader.skipField(); break; @@ -748,9 +701,9 @@ proto.tss.v1beta1.QueryCountsResponse.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryCountsResponse.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryCountsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryCountsResponse.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryCountsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -758,11 +711,11 @@ proto.tss.v1beta1.QueryCountsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryCountsResponse} message + * @param {!proto.band.tss.v1beta1.QueryCountsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryCountsResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryCountsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getGroupCount(); if (f !== 0) { @@ -778,13 +731,6 @@ proto.tss.v1beta1.QueryCountsResponse.serializeBinaryToWriter = function(message f ); } - f = message.getReplacementCount(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } }; @@ -792,16 +738,16 @@ proto.tss.v1beta1.QueryCountsResponse.serializeBinaryToWriter = function(message * optional uint64 group_count = 1; * @return {number} */ -proto.tss.v1beta1.QueryCountsResponse.prototype.getGroupCount = function() { +proto.band.tss.v1beta1.QueryCountsResponse.prototype.getGroupCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.QueryCountsResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryCountsResponse} returns this */ -proto.tss.v1beta1.QueryCountsResponse.prototype.setGroupCount = function(value) { +proto.band.tss.v1beta1.QueryCountsResponse.prototype.setGroupCount = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -810,38 +756,20 @@ proto.tss.v1beta1.QueryCountsResponse.prototype.setGroupCount = function(value) * optional uint64 signing_count = 2; * @return {number} */ -proto.tss.v1beta1.QueryCountsResponse.prototype.getSigningCount = function() { +proto.band.tss.v1beta1.QueryCountsResponse.prototype.getSigningCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.QueryCountsResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryCountsResponse} returns this */ -proto.tss.v1beta1.QueryCountsResponse.prototype.setSigningCount = function(value) { +proto.band.tss.v1beta1.QueryCountsResponse.prototype.setSigningCount = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * optional uint64 replacement_count = 3; - * @return {number} - */ -proto.tss.v1beta1.QueryCountsResponse.prototype.getReplacementCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.QueryCountsResponse} returns this - */ -proto.tss.v1beta1.QueryCountsResponse.prototype.setReplacementCount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - @@ -858,8 +786,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryGroupRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryGroupRequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryGroupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryGroupRequest.toObject(opt_includeInstance, this); }; @@ -868,11 +796,11 @@ proto.tss.v1beta1.QueryGroupRequest.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryGroupRequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryGroupRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryGroupRequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryGroupRequest.toObject = function(includeInstance, msg) { var f, obj = { groupId: jspb.Message.getFieldWithDefault(msg, 1, 0) }; @@ -888,23 +816,23 @@ proto.tss.v1beta1.QueryGroupRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryGroupRequest} + * @return {!proto.band.tss.v1beta1.QueryGroupRequest} */ -proto.tss.v1beta1.QueryGroupRequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryGroupRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryGroupRequest; - return proto.tss.v1beta1.QueryGroupRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryGroupRequest; + return proto.band.tss.v1beta1.QueryGroupRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryGroupRequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryGroupRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryGroupRequest} + * @return {!proto.band.tss.v1beta1.QueryGroupRequest} */ -proto.tss.v1beta1.QueryGroupRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryGroupRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -928,9 +856,9 @@ proto.tss.v1beta1.QueryGroupRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryGroupRequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryGroupRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryGroupRequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryGroupRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -938,11 +866,11 @@ proto.tss.v1beta1.QueryGroupRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryGroupRequest} message + * @param {!proto.band.tss.v1beta1.QueryGroupRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryGroupRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryGroupRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getGroupId(); if (f !== 0) { @@ -958,28 +886,21 @@ proto.tss.v1beta1.QueryGroupRequest.serializeBinaryToWriter = function(message, * optional uint64 group_id = 1; * @return {number} */ -proto.tss.v1beta1.QueryGroupRequest.prototype.getGroupId = function() { +proto.band.tss.v1beta1.QueryGroupRequest.prototype.getGroupId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.QueryGroupRequest} returns this + * @return {!proto.band.tss.v1beta1.QueryGroupRequest} returns this */ -proto.tss.v1beta1.QueryGroupRequest.prototype.setGroupId = function(value) { +proto.band.tss.v1beta1.QueryGroupRequest.prototype.setGroupId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.QueryGroupResponse.repeatedFields_ = [3,4,5,6,7,8]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -995,8 +916,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryGroupResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryGroupResponse.toObject(opt_includeInstance, this); }; @@ -1005,26 +926,13 @@ proto.tss.v1beta1.QueryGroupResponse.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryGroupResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryGroupResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryGroupResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryGroupResponse.toObject = function(includeInstance, msg) { var f, obj = { - group: (f = msg.getGroup()) && tss_v1beta1_tss_pb.Group.toObject(includeInstance, f), - dkgContext: msg.getDkgContext_asB64(), - membersList: jspb.Message.toObjectList(msg.getMembersList(), - tss_v1beta1_tss_pb.Member.toObject, includeInstance), - statusesList: jspb.Message.toObjectList(msg.getStatusesList(), - tss_v1beta1_tss_pb.Status.toObject, includeInstance), - round1InfosList: jspb.Message.toObjectList(msg.getRound1InfosList(), - tss_v1beta1_tss_pb.Round1Info.toObject, includeInstance), - round2InfosList: jspb.Message.toObjectList(msg.getRound2InfosList(), - tss_v1beta1_tss_pb.Round2Info.toObject, includeInstance), - complaintsWithStatusList: jspb.Message.toObjectList(msg.getComplaintsWithStatusList(), - tss_v1beta1_tss_pb.ComplaintsWithStatus.toObject, includeInstance), - confirmsList: jspb.Message.toObjectList(msg.getConfirmsList(), - tss_v1beta1_tss_pb.Confirm.toObject, includeInstance) + groupResult: (f = msg.getGroupResult()) && band_tss_v1beta1_tss_pb.GroupResult.toObject(includeInstance, f) }; if (includeInstance) { @@ -1038,23 +946,23 @@ proto.tss.v1beta1.QueryGroupResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryGroupResponse} + * @return {!proto.band.tss.v1beta1.QueryGroupResponse} */ -proto.tss.v1beta1.QueryGroupResponse.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryGroupResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryGroupResponse; - return proto.tss.v1beta1.QueryGroupResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryGroupResponse; + return proto.band.tss.v1beta1.QueryGroupResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryGroupResponse} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryGroupResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryGroupResponse} + * @return {!proto.band.tss.v1beta1.QueryGroupResponse} */ -proto.tss.v1beta1.QueryGroupResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryGroupResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1062,43 +970,9 @@ proto.tss.v1beta1.QueryGroupResponse.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new tss_v1beta1_tss_pb.Group; - reader.readMessage(value,tss_v1beta1_tss_pb.Group.deserializeBinaryFromReader); - msg.setGroup(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDkgContext(value); - break; - case 3: - var value = new tss_v1beta1_tss_pb.Member; - reader.readMessage(value,tss_v1beta1_tss_pb.Member.deserializeBinaryFromReader); - msg.addMembers(value); - break; - case 4: - var value = new tss_v1beta1_tss_pb.Status; - reader.readMessage(value,tss_v1beta1_tss_pb.Status.deserializeBinaryFromReader); - msg.addStatuses(value); - break; - case 5: - var value = new tss_v1beta1_tss_pb.Round1Info; - reader.readMessage(value,tss_v1beta1_tss_pb.Round1Info.deserializeBinaryFromReader); - msg.addRound1Infos(value); - break; - case 6: - var value = new tss_v1beta1_tss_pb.Round2Info; - reader.readMessage(value,tss_v1beta1_tss_pb.Round2Info.deserializeBinaryFromReader); - msg.addRound2Infos(value); - break; - case 7: - var value = new tss_v1beta1_tss_pb.ComplaintsWithStatus; - reader.readMessage(value,tss_v1beta1_tss_pb.ComplaintsWithStatus.deserializeBinaryFromReader); - msg.addComplaintsWithStatus(value); - break; - case 8: - var value = new tss_v1beta1_tss_pb.Confirm; - reader.readMessage(value,tss_v1beta1_tss_pb.Confirm.deserializeBinaryFromReader); - msg.addConfirms(value); + var value = new band_tss_v1beta1_tss_pb.GroupResult; + reader.readMessage(value,band_tss_v1beta1_tss_pb.GroupResult.deserializeBinaryFromReader); + msg.setGroupResult(value); break; default: reader.skipField(); @@ -1113,9 +987,9 @@ proto.tss.v1beta1.QueryGroupResponse.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryGroupResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryGroupResponse.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryGroupResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1123,103 +997,48 @@ proto.tss.v1beta1.QueryGroupResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryGroupResponse} message + * @param {!proto.band.tss.v1beta1.QueryGroupResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryGroupResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryGroupResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getGroup(); + f = message.getGroupResult(); if (f != null) { writer.writeMessage( 1, f, - tss_v1beta1_tss_pb.Group.serializeBinaryToWriter - ); - } - f = message.getDkgContext_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getMembersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - tss_v1beta1_tss_pb.Member.serializeBinaryToWriter - ); - } - f = message.getStatusesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - tss_v1beta1_tss_pb.Status.serializeBinaryToWriter - ); - } - f = message.getRound1InfosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - tss_v1beta1_tss_pb.Round1Info.serializeBinaryToWriter - ); - } - f = message.getRound2InfosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - tss_v1beta1_tss_pb.Round2Info.serializeBinaryToWriter - ); - } - f = message.getComplaintsWithStatusList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - tss_v1beta1_tss_pb.ComplaintsWithStatus.serializeBinaryToWriter - ); - } - f = message.getConfirmsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - tss_v1beta1_tss_pb.Confirm.serializeBinaryToWriter + band_tss_v1beta1_tss_pb.GroupResult.serializeBinaryToWriter ); } }; /** - * optional Group group = 1; - * @return {?proto.tss.v1beta1.Group} + * optional GroupResult group_result = 1; + * @return {?proto.band.tss.v1beta1.GroupResult} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getGroup = function() { - return /** @type{?proto.tss.v1beta1.Group} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_tss_pb.Group, 1)); +proto.band.tss.v1beta1.QueryGroupResponse.prototype.getGroupResult = function() { + return /** @type{?proto.band.tss.v1beta1.GroupResult} */ ( + jspb.Message.getWrapperField(this, band_tss_v1beta1_tss_pb.GroupResult, 1)); }; /** - * @param {?proto.tss.v1beta1.Group|undefined} value - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * @param {?proto.band.tss.v1beta1.GroupResult|undefined} value + * @return {!proto.band.tss.v1beta1.QueryGroupResponse} returns this */ -proto.tss.v1beta1.QueryGroupResponse.prototype.setGroup = function(value) { +proto.band.tss.v1beta1.QueryGroupResponse.prototype.setGroupResult = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryGroupResponse} returns this */ -proto.tss.v1beta1.QueryGroupResponse.prototype.clearGroup = function() { - return this.setGroup(undefined); +proto.band.tss.v1beta1.QueryGroupResponse.prototype.clearGroupResult = function() { + return this.setGroupResult(undefined); }; @@ -1227,278 +1046,370 @@ proto.tss.v1beta1.QueryGroupResponse.prototype.clearGroup = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.hasGroup = function() { +proto.band.tss.v1beta1.QueryGroupResponse.prototype.hasGroupResult = function() { return jspb.Message.getField(this, 1) != null; }; -/** - * optional bytes dkg_context = 2; - * @return {!(string|Uint8Array)} - */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getDkgContext = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes dkg_context = 2; - * This is a type-conversion wrapper around `getDkgContext()` - * @return {string} - */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getDkgContext_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDkgContext())); -}; -/** - * optional bytes dkg_context = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDkgContext()` - * @return {!Uint8Array} - */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getDkgContext_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDkgContext())); -}; - +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.setDkgContext = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.band.tss.v1beta1.QueryGroupsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryGroupsRequest.toObject(opt_includeInstance, this); }; /** - * repeated Member members = 3; - * @return {!Array} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.QueryGroupsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getMembersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Member, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this -*/ -proto.tss.v1beta1.QueryGroupResponse.prototype.setMembersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - +proto.band.tss.v1beta1.QueryGroupsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; -/** - * @param {!proto.tss.v1beta1.Member=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Member} - */ -proto.tss.v1beta1.QueryGroupResponse.prototype.addMembers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tss.v1beta1.Member, opt_index); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.QueryGroupsRequest} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.clearMembersList = function() { - return this.setMembersList([]); +proto.band.tss.v1beta1.QueryGroupsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.QueryGroupsRequest; + return proto.band.tss.v1beta1.QueryGroupsRequest.deserializeBinaryFromReader(msg, reader); }; /** - * repeated Status statuses = 4; - * @return {!Array} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.QueryGroupsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.QueryGroupsRequest} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getStatusesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Status, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this -*/ -proto.tss.v1beta1.QueryGroupResponse.prototype.setStatusesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); +proto.band.tss.v1beta1.QueryGroupsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!proto.tss.v1beta1.Status=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Status} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.addStatuses = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tss.v1beta1.Status, opt_index); +proto.band.tss.v1beta1.QueryGroupsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.QueryGroupsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.QueryGroupsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryGroupResponse.prototype.clearStatusesList = function() { - return this.setStatusesList([]); +proto.band.tss.v1beta1.QueryGroupsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; /** - * repeated Round1Info round1_infos = 5; - * @return {!Array} + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getRound1InfosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Round1Info, 5)); +proto.band.tss.v1beta1.QueryGroupsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); }; /** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.band.tss.v1beta1.QueryGroupsRequest} returns this */ -proto.tss.v1beta1.QueryGroupResponse.prototype.setRound1InfosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); +proto.band.tss.v1beta1.QueryGroupsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * @param {!proto.tss.v1beta1.Round1Info=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Round1Info} + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.QueryGroupsRequest} returns this */ -proto.tss.v1beta1.QueryGroupResponse.prototype.addRound1Infos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.tss.v1beta1.Round1Info, opt_index); +proto.band.tss.v1beta1.QueryGroupsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.clearRound1InfosList = function() { - return this.setRound1InfosList([]); +proto.band.tss.v1beta1.QueryGroupsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * repeated Round2Info round2_infos = 6; - * @return {!Array} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getRound2InfosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Round2Info, 6)); -}; - +proto.band.tss.v1beta1.QueryGroupsResponse.repeatedFields_ = [1]; -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this -*/ -proto.tss.v1beta1.QueryGroupResponse.prototype.setRound2InfosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!proto.tss.v1beta1.Round2Info=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Round2Info} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.addRound2Infos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.tss.v1beta1.Round2Info, opt_index); +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryGroupsResponse.toObject(opt_includeInstance, this); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.QueryGroupsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryGroupResponse.prototype.clearRound2InfosList = function() { - return this.setRound2InfosList([]); +proto.band.tss.v1beta1.QueryGroupsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + groupsList: jspb.Message.toObjectList(msg.getGroupsList(), + band_tss_v1beta1_tss_pb.GroupResult.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated ComplaintsWithStatus complaints_with_status = 7; - * @return {!Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.QueryGroupsResponse} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getComplaintsWithStatusList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.ComplaintsWithStatus, 7)); +proto.band.tss.v1beta1.QueryGroupsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.QueryGroupsResponse; + return proto.band.tss.v1beta1.QueryGroupsResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.QueryGroupsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.QueryGroupsResponse} + */ +proto.band.tss.v1beta1.QueryGroupsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tss_v1beta1_tss_pb.GroupResult; + reader.readMessage(value,band_tss_v1beta1_tss_pb.GroupResult.deserializeBinaryFromReader); + msg.addGroups(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.QueryGroupsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.QueryGroupsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.QueryGroupsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_tss_v1beta1_tss_pb.GroupResult.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated GroupResult groups = 1; + * @return {!Array} + */ +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.getGroupsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tss_v1beta1_tss_pb.GroupResult, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.QueryGroupsResponse} returns this */ -proto.tss.v1beta1.QueryGroupResponse.prototype.setComplaintsWithStatusList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.setGroupsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.tss.v1beta1.ComplaintsWithStatus=} opt_value + * @param {!proto.band.tss.v1beta1.GroupResult=} opt_value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.ComplaintsWithStatus} + * @return {!proto.band.tss.v1beta1.GroupResult} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.addComplaintsWithStatus = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.tss.v1beta1.ComplaintsWithStatus, opt_index); +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.addGroups = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tss.v1beta1.GroupResult, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryGroupsResponse} returns this */ -proto.tss.v1beta1.QueryGroupResponse.prototype.clearComplaintsWithStatusList = function() { - return this.setComplaintsWithStatusList([]); +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.clearGroupsList = function() { + return this.setGroupsList([]); }; /** - * repeated Confirm confirms = 8; - * @return {!Array} + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.getConfirmsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Confirm, 8)); +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); }; /** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.band.tss.v1beta1.QueryGroupsResponse} returns this */ -proto.tss.v1beta1.QueryGroupResponse.prototype.setConfirmsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * @param {!proto.tss.v1beta1.Confirm=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Confirm} + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.QueryGroupsResponse} returns this */ -proto.tss.v1beta1.QueryGroupResponse.prototype.addConfirms = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.tss.v1beta1.Confirm, opt_index); +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryGroupResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.tss.v1beta1.QueryGroupResponse.prototype.clearConfirmsList = function() { - return this.setConfirmsList([]); +proto.band.tss.v1beta1.QueryGroupsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -1518,8 +1429,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryMembersRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryMembersRequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryMembersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryMembersRequest.toObject(opt_includeInstance, this); }; @@ -1528,11 +1439,11 @@ proto.tss.v1beta1.QueryMembersRequest.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryMembersRequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryMembersRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryMembersRequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryMembersRequest.toObject = function(includeInstance, msg) { var f, obj = { groupId: jspb.Message.getFieldWithDefault(msg, 1, 0) }; @@ -1548,23 +1459,23 @@ proto.tss.v1beta1.QueryMembersRequest.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryMembersRequest} + * @return {!proto.band.tss.v1beta1.QueryMembersRequest} */ -proto.tss.v1beta1.QueryMembersRequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryMembersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryMembersRequest; - return proto.tss.v1beta1.QueryMembersRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryMembersRequest; + return proto.band.tss.v1beta1.QueryMembersRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryMembersRequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryMembersRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryMembersRequest} + * @return {!proto.band.tss.v1beta1.QueryMembersRequest} */ -proto.tss.v1beta1.QueryMembersRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryMembersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1588,9 +1499,9 @@ proto.tss.v1beta1.QueryMembersRequest.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryMembersRequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryMembersRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryMembersRequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryMembersRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1598,11 +1509,11 @@ proto.tss.v1beta1.QueryMembersRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryMembersRequest} message + * @param {!proto.band.tss.v1beta1.QueryMembersRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryMembersRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryMembersRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getGroupId(); if (f !== 0) { @@ -1618,16 +1529,16 @@ proto.tss.v1beta1.QueryMembersRequest.serializeBinaryToWriter = function(message * optional uint64 group_id = 1; * @return {number} */ -proto.tss.v1beta1.QueryMembersRequest.prototype.getGroupId = function() { +proto.band.tss.v1beta1.QueryMembersRequest.prototype.getGroupId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.QueryMembersRequest} returns this + * @return {!proto.band.tss.v1beta1.QueryMembersRequest} returns this */ -proto.tss.v1beta1.QueryMembersRequest.prototype.setGroupId = function(value) { +proto.band.tss.v1beta1.QueryMembersRequest.prototype.setGroupId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1638,7 +1549,7 @@ proto.tss.v1beta1.QueryMembersRequest.prototype.setGroupId = function(value) { * @private {!Array} * @const */ -proto.tss.v1beta1.QueryMembersResponse.repeatedFields_ = [1]; +proto.band.tss.v1beta1.QueryMembersResponse.repeatedFields_ = [1]; @@ -1655,8 +1566,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryMembersResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryMembersResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryMembersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryMembersResponse.toObject(opt_includeInstance, this); }; @@ -1665,14 +1576,14 @@ proto.tss.v1beta1.QueryMembersResponse.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryMembersResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryMembersResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryMembersResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryMembersResponse.toObject = function(includeInstance, msg) { var f, obj = { membersList: jspb.Message.toObjectList(msg.getMembersList(), - tss_v1beta1_tss_pb.Member.toObject, includeInstance) + band_tss_v1beta1_tss_pb.Member.toObject, includeInstance) }; if (includeInstance) { @@ -1686,23 +1597,23 @@ proto.tss.v1beta1.QueryMembersResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryMembersResponse} + * @return {!proto.band.tss.v1beta1.QueryMembersResponse} */ -proto.tss.v1beta1.QueryMembersResponse.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryMembersResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryMembersResponse; - return proto.tss.v1beta1.QueryMembersResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryMembersResponse; + return proto.band.tss.v1beta1.QueryMembersResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryMembersResponse} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryMembersResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryMembersResponse} + * @return {!proto.band.tss.v1beta1.QueryMembersResponse} */ -proto.tss.v1beta1.QueryMembersResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryMembersResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1710,8 +1621,8 @@ proto.tss.v1beta1.QueryMembersResponse.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new tss_v1beta1_tss_pb.Member; - reader.readMessage(value,tss_v1beta1_tss_pb.Member.deserializeBinaryFromReader); + var value = new band_tss_v1beta1_tss_pb.Member; + reader.readMessage(value,band_tss_v1beta1_tss_pb.Member.deserializeBinaryFromReader); msg.addMembers(value); break; default: @@ -1727,9 +1638,9 @@ proto.tss.v1beta1.QueryMembersResponse.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryMembersResponse.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryMembersResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryMembersResponse.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryMembersResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1737,18 +1648,18 @@ proto.tss.v1beta1.QueryMembersResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryMembersResponse} message + * @param {!proto.band.tss.v1beta1.QueryMembersResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryMembersResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryMembersResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMembersList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - tss_v1beta1_tss_pb.Member.serializeBinaryToWriter + band_tss_v1beta1_tss_pb.Member.serializeBinaryToWriter ); } }; @@ -1756,38 +1667,38 @@ proto.tss.v1beta1.QueryMembersResponse.serializeBinaryToWriter = function(messag /** * repeated Member members = 1; - * @return {!Array} + * @return {!Array} */ -proto.tss.v1beta1.QueryMembersResponse.prototype.getMembersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Member, 1)); +proto.band.tss.v1beta1.QueryMembersResponse.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tss_v1beta1_tss_pb.Member, 1)); }; /** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryMembersResponse} returns this + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.QueryMembersResponse} returns this */ -proto.tss.v1beta1.QueryMembersResponse.prototype.setMembersList = function(value) { +proto.band.tss.v1beta1.QueryMembersResponse.prototype.setMembersList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.tss.v1beta1.Member=} opt_value + * @param {!proto.band.tss.v1beta1.Member=} opt_value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Member} + * @return {!proto.band.tss.v1beta1.Member} */ -proto.tss.v1beta1.QueryMembersResponse.prototype.addMembers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tss.v1beta1.Member, opt_index); +proto.band.tss.v1beta1.QueryMembersResponse.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tss.v1beta1.Member, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryMembersResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryMembersResponse} returns this */ -proto.tss.v1beta1.QueryMembersResponse.prototype.clearMembersList = function() { +proto.band.tss.v1beta1.QueryMembersResponse.prototype.clearMembersList = function() { return this.setMembersList([]); }; @@ -1808,8 +1719,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryIsGranteeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryIsGranteeRequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryIsGranteeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryIsGranteeRequest.toObject(opt_includeInstance, this); }; @@ -1818,11 +1729,11 @@ proto.tss.v1beta1.QueryIsGranteeRequest.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryIsGranteeRequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryIsGranteeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryIsGranteeRequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryIsGranteeRequest.toObject = function(includeInstance, msg) { var f, obj = { granter: jspb.Message.getFieldWithDefault(msg, 1, ""), grantee: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -1839,23 +1750,23 @@ proto.tss.v1beta1.QueryIsGranteeRequest.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryIsGranteeRequest} + * @return {!proto.band.tss.v1beta1.QueryIsGranteeRequest} */ -proto.tss.v1beta1.QueryIsGranteeRequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryIsGranteeRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryIsGranteeRequest; - return proto.tss.v1beta1.QueryIsGranteeRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryIsGranteeRequest; + return proto.band.tss.v1beta1.QueryIsGranteeRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryIsGranteeRequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryIsGranteeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryIsGranteeRequest} + * @return {!proto.band.tss.v1beta1.QueryIsGranteeRequest} */ -proto.tss.v1beta1.QueryIsGranteeRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryIsGranteeRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1883,9 +1794,9 @@ proto.tss.v1beta1.QueryIsGranteeRequest.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryIsGranteeRequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryIsGranteeRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryIsGranteeRequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryIsGranteeRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1893,11 +1804,11 @@ proto.tss.v1beta1.QueryIsGranteeRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryIsGranteeRequest} message + * @param {!proto.band.tss.v1beta1.QueryIsGranteeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryIsGranteeRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryIsGranteeRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getGranter(); if (f.length > 0) { @@ -1920,16 +1831,16 @@ proto.tss.v1beta1.QueryIsGranteeRequest.serializeBinaryToWriter = function(messa * optional string granter = 1; * @return {string} */ -proto.tss.v1beta1.QueryIsGranteeRequest.prototype.getGranter = function() { +proto.band.tss.v1beta1.QueryIsGranteeRequest.prototype.getGranter = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.tss.v1beta1.QueryIsGranteeRequest} returns this + * @return {!proto.band.tss.v1beta1.QueryIsGranteeRequest} returns this */ -proto.tss.v1beta1.QueryIsGranteeRequest.prototype.setGranter = function(value) { +proto.band.tss.v1beta1.QueryIsGranteeRequest.prototype.setGranter = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1938,16 +1849,16 @@ proto.tss.v1beta1.QueryIsGranteeRequest.prototype.setGranter = function(value) { * optional string grantee = 2; * @return {string} */ -proto.tss.v1beta1.QueryIsGranteeRequest.prototype.getGrantee = function() { +proto.band.tss.v1beta1.QueryIsGranteeRequest.prototype.getGrantee = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.tss.v1beta1.QueryIsGranteeRequest} returns this + * @return {!proto.band.tss.v1beta1.QueryIsGranteeRequest} returns this */ -proto.tss.v1beta1.QueryIsGranteeRequest.prototype.setGrantee = function(value) { +proto.band.tss.v1beta1.QueryIsGranteeRequest.prototype.setGrantee = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1968,8 +1879,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryIsGranteeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryIsGranteeResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryIsGranteeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryIsGranteeResponse.toObject(opt_includeInstance, this); }; @@ -1978,11 +1889,11 @@ proto.tss.v1beta1.QueryIsGranteeResponse.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryIsGranteeResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryIsGranteeResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryIsGranteeResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryIsGranteeResponse.toObject = function(includeInstance, msg) { var f, obj = { isGrantee: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; @@ -1998,23 +1909,23 @@ proto.tss.v1beta1.QueryIsGranteeResponse.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryIsGranteeResponse} + * @return {!proto.band.tss.v1beta1.QueryIsGranteeResponse} */ -proto.tss.v1beta1.QueryIsGranteeResponse.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryIsGranteeResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryIsGranteeResponse; - return proto.tss.v1beta1.QueryIsGranteeResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryIsGranteeResponse; + return proto.band.tss.v1beta1.QueryIsGranteeResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryIsGranteeResponse} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryIsGranteeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryIsGranteeResponse} + * @return {!proto.band.tss.v1beta1.QueryIsGranteeResponse} */ -proto.tss.v1beta1.QueryIsGranteeResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryIsGranteeResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2038,9 +1949,9 @@ proto.tss.v1beta1.QueryIsGranteeResponse.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryIsGranteeResponse.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryIsGranteeResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryIsGranteeResponse.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryIsGranteeResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2048,11 +1959,11 @@ proto.tss.v1beta1.QueryIsGranteeResponse.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryIsGranteeResponse} message + * @param {!proto.band.tss.v1beta1.QueryIsGranteeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryIsGranteeResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryIsGranteeResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIsGrantee(); if (f) { @@ -2068,16 +1979,16 @@ proto.tss.v1beta1.QueryIsGranteeResponse.serializeBinaryToWriter = function(mess * optional bool is_grantee = 1; * @return {boolean} */ -proto.tss.v1beta1.QueryIsGranteeResponse.prototype.getIsGrantee = function() { +proto.band.tss.v1beta1.QueryIsGranteeResponse.prototype.getIsGrantee = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value - * @return {!proto.tss.v1beta1.QueryIsGranteeResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryIsGranteeResponse} returns this */ -proto.tss.v1beta1.QueryIsGranteeResponse.prototype.setIsGrantee = function(value) { +proto.band.tss.v1beta1.QueryIsGranteeResponse.prototype.setIsGrantee = function(value) { return jspb.Message.setProto3BooleanField(this, 1, value); }; @@ -2098,8 +2009,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryDERequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryDERequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryDERequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryDERequest.toObject(opt_includeInstance, this); }; @@ -2108,11 +2019,11 @@ proto.tss.v1beta1.QueryDERequest.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryDERequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryDERequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryDERequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryDERequest.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) @@ -2129,23 +2040,23 @@ proto.tss.v1beta1.QueryDERequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryDERequest} + * @return {!proto.band.tss.v1beta1.QueryDERequest} */ -proto.tss.v1beta1.QueryDERequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryDERequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryDERequest; - return proto.tss.v1beta1.QueryDERequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryDERequest; + return proto.band.tss.v1beta1.QueryDERequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryDERequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryDERequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryDERequest} + * @return {!proto.band.tss.v1beta1.QueryDERequest} */ -proto.tss.v1beta1.QueryDERequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryDERequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2174,9 +2085,9 @@ proto.tss.v1beta1.QueryDERequest.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryDERequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryDERequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryDERequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryDERequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2184,11 +2095,11 @@ proto.tss.v1beta1.QueryDERequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryDERequest} message + * @param {!proto.band.tss.v1beta1.QueryDERequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryDERequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryDERequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAddress(); if (f.length > 0) { @@ -2212,16 +2123,16 @@ proto.tss.v1beta1.QueryDERequest.serializeBinaryToWriter = function(message, wri * optional string address = 1; * @return {string} */ -proto.tss.v1beta1.QueryDERequest.prototype.getAddress = function() { +proto.band.tss.v1beta1.QueryDERequest.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.tss.v1beta1.QueryDERequest} returns this + * @return {!proto.band.tss.v1beta1.QueryDERequest} returns this */ -proto.tss.v1beta1.QueryDERequest.prototype.setAddress = function(value) { +proto.band.tss.v1beta1.QueryDERequest.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2230,7 +2141,7 @@ proto.tss.v1beta1.QueryDERequest.prototype.setAddress = function(value) { * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ -proto.tss.v1beta1.QueryDERequest.prototype.getPagination = function() { +proto.band.tss.v1beta1.QueryDERequest.prototype.getPagination = function() { return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); }; @@ -2238,18 +2149,18 @@ proto.tss.v1beta1.QueryDERequest.prototype.getPagination = function() { /** * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value - * @return {!proto.tss.v1beta1.QueryDERequest} returns this + * @return {!proto.band.tss.v1beta1.QueryDERequest} returns this */ -proto.tss.v1beta1.QueryDERequest.prototype.setPagination = function(value) { +proto.band.tss.v1beta1.QueryDERequest.prototype.setPagination = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QueryDERequest} returns this + * @return {!proto.band.tss.v1beta1.QueryDERequest} returns this */ -proto.tss.v1beta1.QueryDERequest.prototype.clearPagination = function() { +proto.band.tss.v1beta1.QueryDERequest.prototype.clearPagination = function() { return this.setPagination(undefined); }; @@ -2258,7 +2169,7 @@ proto.tss.v1beta1.QueryDERequest.prototype.clearPagination = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tss.v1beta1.QueryDERequest.prototype.hasPagination = function() { +proto.band.tss.v1beta1.QueryDERequest.prototype.hasPagination = function() { return jspb.Message.getField(this, 2) != null; }; @@ -2269,7 +2180,7 @@ proto.tss.v1beta1.QueryDERequest.prototype.hasPagination = function() { * @private {!Array} * @const */ -proto.tss.v1beta1.QueryDEResponse.repeatedFields_ = [1]; +proto.band.tss.v1beta1.QueryDEResponse.repeatedFields_ = [1]; @@ -2286,8 +2197,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryDEResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryDEResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryDEResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryDEResponse.toObject(opt_includeInstance, this); }; @@ -2296,14 +2207,14 @@ proto.tss.v1beta1.QueryDEResponse.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryDEResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryDEResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryDEResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryDEResponse.toObject = function(includeInstance, msg) { var f, obj = { desList: jspb.Message.toObjectList(msg.getDesList(), - tss_v1beta1_tss_pb.DE.toObject, includeInstance), + band_tss_v1beta1_tss_pb.DE.toObject, includeInstance), pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; @@ -2318,23 +2229,23 @@ proto.tss.v1beta1.QueryDEResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryDEResponse} + * @return {!proto.band.tss.v1beta1.QueryDEResponse} */ -proto.tss.v1beta1.QueryDEResponse.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryDEResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryDEResponse; - return proto.tss.v1beta1.QueryDEResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryDEResponse; + return proto.band.tss.v1beta1.QueryDEResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryDEResponse} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryDEResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryDEResponse} + * @return {!proto.band.tss.v1beta1.QueryDEResponse} */ -proto.tss.v1beta1.QueryDEResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryDEResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2342,8 +2253,8 @@ proto.tss.v1beta1.QueryDEResponse.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new tss_v1beta1_tss_pb.DE; - reader.readMessage(value,tss_v1beta1_tss_pb.DE.deserializeBinaryFromReader); + var value = new band_tss_v1beta1_tss_pb.DE; + reader.readMessage(value,band_tss_v1beta1_tss_pb.DE.deserializeBinaryFromReader); msg.addDes(value); break; case 2: @@ -2364,9 +2275,9 @@ proto.tss.v1beta1.QueryDEResponse.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryDEResponse.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryDEResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryDEResponse.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryDEResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2374,18 +2285,18 @@ proto.tss.v1beta1.QueryDEResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryDEResponse} message + * @param {!proto.band.tss.v1beta1.QueryDEResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryDEResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryDEResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - tss_v1beta1_tss_pb.DE.serializeBinaryToWriter + band_tss_v1beta1_tss_pb.DE.serializeBinaryToWriter ); } f = message.getPagination(); @@ -2401,38 +2312,38 @@ proto.tss.v1beta1.QueryDEResponse.serializeBinaryToWriter = function(message, wr /** * repeated DE des = 1; - * @return {!Array} + * @return {!Array} */ -proto.tss.v1beta1.QueryDEResponse.prototype.getDesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.DE, 1)); +proto.band.tss.v1beta1.QueryDEResponse.prototype.getDesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tss_v1beta1_tss_pb.DE, 1)); }; /** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryDEResponse} returns this + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.QueryDEResponse} returns this */ -proto.tss.v1beta1.QueryDEResponse.prototype.setDesList = function(value) { +proto.band.tss.v1beta1.QueryDEResponse.prototype.setDesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.tss.v1beta1.DE=} opt_value + * @param {!proto.band.tss.v1beta1.DE=} opt_value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.DE} + * @return {!proto.band.tss.v1beta1.DE} */ -proto.tss.v1beta1.QueryDEResponse.prototype.addDes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tss.v1beta1.DE, opt_index); +proto.band.tss.v1beta1.QueryDEResponse.prototype.addDes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tss.v1beta1.DE, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryDEResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryDEResponse} returns this */ -proto.tss.v1beta1.QueryDEResponse.prototype.clearDesList = function() { +proto.band.tss.v1beta1.QueryDEResponse.prototype.clearDesList = function() { return this.setDesList([]); }; @@ -2441,7 +2352,7 @@ proto.tss.v1beta1.QueryDEResponse.prototype.clearDesList = function() { * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ -proto.tss.v1beta1.QueryDEResponse.prototype.getPagination = function() { +proto.band.tss.v1beta1.QueryDEResponse.prototype.getPagination = function() { return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); }; @@ -2449,18 +2360,18 @@ proto.tss.v1beta1.QueryDEResponse.prototype.getPagination = function() { /** * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value - * @return {!proto.tss.v1beta1.QueryDEResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryDEResponse} returns this */ -proto.tss.v1beta1.QueryDEResponse.prototype.setPagination = function(value) { +proto.band.tss.v1beta1.QueryDEResponse.prototype.setPagination = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QueryDEResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryDEResponse} returns this */ -proto.tss.v1beta1.QueryDEResponse.prototype.clearPagination = function() { +proto.band.tss.v1beta1.QueryDEResponse.prototype.clearPagination = function() { return this.setPagination(undefined); }; @@ -2469,7 +2380,7 @@ proto.tss.v1beta1.QueryDEResponse.prototype.clearPagination = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tss.v1beta1.QueryDEResponse.prototype.hasPagination = function() { +proto.band.tss.v1beta1.QueryDEResponse.prototype.hasPagination = function() { return jspb.Message.getField(this, 2) != null; }; @@ -2490,8 +2401,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryPendingGroupsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryPendingGroupsRequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryPendingGroupsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryPendingGroupsRequest.toObject(opt_includeInstance, this); }; @@ -2500,11 +2411,11 @@ proto.tss.v1beta1.QueryPendingGroupsRequest.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryPendingGroupsRequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryPendingGroupsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryPendingGroupsRequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryPendingGroupsRequest.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -2520,23 +2431,23 @@ proto.tss.v1beta1.QueryPendingGroupsRequest.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryPendingGroupsRequest} + * @return {!proto.band.tss.v1beta1.QueryPendingGroupsRequest} */ -proto.tss.v1beta1.QueryPendingGroupsRequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryPendingGroupsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryPendingGroupsRequest; - return proto.tss.v1beta1.QueryPendingGroupsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryPendingGroupsRequest; + return proto.band.tss.v1beta1.QueryPendingGroupsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryPendingGroupsRequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryPendingGroupsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryPendingGroupsRequest} + * @return {!proto.band.tss.v1beta1.QueryPendingGroupsRequest} */ -proto.tss.v1beta1.QueryPendingGroupsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryPendingGroupsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2560,9 +2471,9 @@ proto.tss.v1beta1.QueryPendingGroupsRequest.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryPendingGroupsRequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryPendingGroupsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryPendingGroupsRequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryPendingGroupsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2570,11 +2481,11 @@ proto.tss.v1beta1.QueryPendingGroupsRequest.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryPendingGroupsRequest} message + * @param {!proto.band.tss.v1beta1.QueryPendingGroupsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryPendingGroupsRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryPendingGroupsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAddress(); if (f.length > 0) { @@ -2590,16 +2501,16 @@ proto.tss.v1beta1.QueryPendingGroupsRequest.serializeBinaryToWriter = function(m * optional string address = 1; * @return {string} */ -proto.tss.v1beta1.QueryPendingGroupsRequest.prototype.getAddress = function() { +proto.band.tss.v1beta1.QueryPendingGroupsRequest.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.tss.v1beta1.QueryPendingGroupsRequest} returns this + * @return {!proto.band.tss.v1beta1.QueryPendingGroupsRequest} returns this */ -proto.tss.v1beta1.QueryPendingGroupsRequest.prototype.setAddress = function(value) { +proto.band.tss.v1beta1.QueryPendingGroupsRequest.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2610,7 +2521,7 @@ proto.tss.v1beta1.QueryPendingGroupsRequest.prototype.setAddress = function(valu * @private {!Array} * @const */ -proto.tss.v1beta1.QueryPendingGroupsResponse.repeatedFields_ = [1]; +proto.band.tss.v1beta1.QueryPendingGroupsResponse.repeatedFields_ = [1]; @@ -2627,8 +2538,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryPendingGroupsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryPendingGroupsResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryPendingGroupsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryPendingGroupsResponse.toObject(opt_includeInstance, this); }; @@ -2637,11 +2548,11 @@ proto.tss.v1beta1.QueryPendingGroupsResponse.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryPendingGroupsResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryPendingGroupsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryPendingGroupsResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryPendingGroupsResponse.toObject = function(includeInstance, msg) { var f, obj = { pendingGroupsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; @@ -2651,794 +2562,114 @@ proto.tss.v1beta1.QueryPendingGroupsResponse.toObject = function(includeInstance } return obj; }; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryPendingGroupsResponse} - */ -proto.tss.v1beta1.QueryPendingGroupsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryPendingGroupsResponse; - return proto.tss.v1beta1.QueryPendingGroupsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryPendingGroupsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryPendingGroupsResponse} - */ -proto.tss.v1beta1.QueryPendingGroupsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addPendingGroups(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.QueryPendingGroupsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryPendingGroupsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryPendingGroupsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.QueryPendingGroupsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPendingGroupsList(); - if (f.length > 0) { - writer.writePackedUint64( - 1, - f - ); - } -}; - - -/** - * repeated uint64 pending_groups = 1; - * @return {!Array} - */ -proto.tss.v1beta1.QueryPendingGroupsResponse.prototype.getPendingGroupsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryPendingGroupsResponse} returns this - */ -proto.tss.v1beta1.QueryPendingGroupsResponse.prototype.setPendingGroupsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.QueryPendingGroupsResponse} returns this - */ -proto.tss.v1beta1.QueryPendingGroupsResponse.prototype.addPendingGroups = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryPendingGroupsResponse} returns this - */ -proto.tss.v1beta1.QueryPendingGroupsResponse.prototype.clearPendingGroupsList = function() { - return this.setPendingGroupsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.QueryPendingSigningsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryPendingSigningsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryPendingSigningsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.QueryPendingSigningsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryPendingSigningsRequest} - */ -proto.tss.v1beta1.QueryPendingSigningsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryPendingSigningsRequest; - return proto.tss.v1beta1.QueryPendingSigningsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryPendingSigningsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryPendingSigningsRequest} - */ -proto.tss.v1beta1.QueryPendingSigningsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.QueryPendingSigningsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryPendingSigningsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryPendingSigningsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.QueryPendingSigningsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.tss.v1beta1.QueryPendingSigningsRequest.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.QueryPendingSigningsRequest} returns this - */ -proto.tss.v1beta1.QueryPendingSigningsRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryPendingSigningsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryPendingSigningsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - pendingSigningsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryPendingSigningsResponse} - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryPendingSigningsResponse; - return proto.tss.v1beta1.QueryPendingSigningsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryPendingSigningsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryPendingSigningsResponse} - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addPendingSignings(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryPendingSigningsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryPendingSigningsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPendingSigningsList(); - if (f.length > 0) { - writer.writePackedUint64( - 1, - f - ); - } -}; - - -/** - * repeated uint64 pending_signings = 1; - * @return {!Array} - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.prototype.getPendingSigningsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryPendingSigningsResponse} returns this - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.prototype.setPendingSigningsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.QueryPendingSigningsResponse} returns this - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.prototype.addPendingSignings = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryPendingSigningsResponse} returns this - */ -proto.tss.v1beta1.QueryPendingSigningsResponse.prototype.clearPendingSigningsList = function() { - return this.setPendingSigningsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.QuerySigningRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QuerySigningRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QuerySigningRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.QuerySigningRequest.toObject = function(includeInstance, msg) { - var f, obj = { - signingId: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QuerySigningRequest} - */ -proto.tss.v1beta1.QuerySigningRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QuerySigningRequest; - return proto.tss.v1beta1.QuerySigningRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.QuerySigningRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QuerySigningRequest} - */ -proto.tss.v1beta1.QuerySigningRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSigningId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.QuerySigningRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QuerySigningRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QuerySigningRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.QuerySigningRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSigningId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } -}; - - -/** - * optional uint64 signing_id = 1; - * @return {number} - */ -proto.tss.v1beta1.QuerySigningRequest.prototype.getSigningId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.QuerySigningRequest} returns this - */ -proto.tss.v1beta1.QuerySigningRequest.prototype.setSigningId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.QuerySigningResponse.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.QuerySigningResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QuerySigningResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QuerySigningResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.QuerySigningResponse.toObject = function(includeInstance, msg) { - var f, obj = { - signing: (f = msg.getSigning()) && tss_v1beta1_tss_pb.Signing.toObject(includeInstance, f), - evmSignature: (f = msg.getEvmSignature()) && tss_v1beta1_tss_pb.EVMSignature.toObject(includeInstance, f), - receivedPartialSignaturesList: jspb.Message.toObjectList(msg.getReceivedPartialSignaturesList(), - tss_v1beta1_tss_pb.PartialSignature.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QuerySigningResponse} - */ -proto.tss.v1beta1.QuerySigningResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QuerySigningResponse; - return proto.tss.v1beta1.QuerySigningResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.QuerySigningResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QuerySigningResponse} - */ -proto.tss.v1beta1.QuerySigningResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new tss_v1beta1_tss_pb.Signing; - reader.readMessage(value,tss_v1beta1_tss_pb.Signing.deserializeBinaryFromReader); - msg.setSigning(value); - break; - case 2: - var value = new tss_v1beta1_tss_pb.EVMSignature; - reader.readMessage(value,tss_v1beta1_tss_pb.EVMSignature.deserializeBinaryFromReader); - msg.setEvmSignature(value); - break; - case 3: - var value = new tss_v1beta1_tss_pb.PartialSignature; - reader.readMessage(value,tss_v1beta1_tss_pb.PartialSignature.deserializeBinaryFromReader); - msg.addReceivedPartialSignatures(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.QuerySigningResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QuerySigningResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QuerySigningResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.QuerySigningResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSigning(); - if (f != null) { - writer.writeMessage( - 1, - f, - tss_v1beta1_tss_pb.Signing.serializeBinaryToWriter - ); - } - f = message.getEvmSignature(); - if (f != null) { - writer.writeMessage( - 2, - f, - tss_v1beta1_tss_pb.EVMSignature.serializeBinaryToWriter - ); - } - f = message.getReceivedPartialSignaturesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - tss_v1beta1_tss_pb.PartialSignature.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Signing signing = 1; - * @return {?proto.tss.v1beta1.Signing} - */ -proto.tss.v1beta1.QuerySigningResponse.prototype.getSigning = function() { - return /** @type{?proto.tss.v1beta1.Signing} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_tss_pb.Signing, 1)); -}; - - -/** - * @param {?proto.tss.v1beta1.Signing|undefined} value - * @return {!proto.tss.v1beta1.QuerySigningResponse} returns this -*/ -proto.tss.v1beta1.QuerySigningResponse.prototype.setSigning = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QuerySigningResponse} returns this - */ -proto.tss.v1beta1.QuerySigningResponse.prototype.clearSigning = function() { - return this.setSigning(undefined); -}; +} /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.QueryPendingGroupsResponse} */ -proto.tss.v1beta1.QuerySigningResponse.prototype.hasSigning = function() { - return jspb.Message.getField(this, 1) != null; +proto.band.tss.v1beta1.QueryPendingGroupsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.QueryPendingGroupsResponse; + return proto.band.tss.v1beta1.QueryPendingGroupsResponse.deserializeBinaryFromReader(msg, reader); }; /** - * optional EVMSignature evm_signature = 2; - * @return {?proto.tss.v1beta1.EVMSignature} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.QueryPendingGroupsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.QueryPendingGroupsResponse} */ -proto.tss.v1beta1.QuerySigningResponse.prototype.getEvmSignature = function() { - return /** @type{?proto.tss.v1beta1.EVMSignature} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_tss_pb.EVMSignature, 2)); -}; - - -/** - * @param {?proto.tss.v1beta1.EVMSignature|undefined} value - * @return {!proto.tss.v1beta1.QuerySigningResponse} returns this -*/ -proto.tss.v1beta1.QuerySigningResponse.prototype.setEvmSignature = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.band.tss.v1beta1.QueryPendingGroupsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addPendingGroups(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QuerySigningResponse} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.tss.v1beta1.QuerySigningResponse.prototype.clearEvmSignature = function() { - return this.setEvmSignature(undefined); +proto.band.tss.v1beta1.QueryPendingGroupsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.QueryPendingGroupsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.QueryPendingGroupsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QuerySigningResponse.prototype.hasEvmSignature = function() { - return jspb.Message.getField(this, 2) != null; +proto.band.tss.v1beta1.QueryPendingGroupsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPendingGroupsList(); + if (f.length > 0) { + writer.writePackedUint64( + 1, + f + ); + } }; /** - * repeated PartialSignature received_partial_signatures = 3; - * @return {!Array} + * repeated uint64 pending_groups = 1; + * @return {!Array} */ -proto.tss.v1beta1.QuerySigningResponse.prototype.getReceivedPartialSignaturesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.PartialSignature, 3)); +proto.band.tss.v1beta1.QueryPendingGroupsResponse.prototype.getPendingGroupsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QuerySigningResponse} returns this -*/ -proto.tss.v1beta1.QuerySigningResponse.prototype.setReceivedPartialSignaturesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.QueryPendingGroupsResponse} returns this + */ +proto.band.tss.v1beta1.QueryPendingGroupsResponse.prototype.setPendingGroupsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * @param {!proto.tss.v1beta1.PartialSignature=} opt_value + * @param {number} value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.PartialSignature} + * @return {!proto.band.tss.v1beta1.QueryPendingGroupsResponse} returns this */ -proto.tss.v1beta1.QuerySigningResponse.prototype.addReceivedPartialSignatures = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tss.v1beta1.PartialSignature, opt_index); +proto.band.tss.v1beta1.QueryPendingGroupsResponse.prototype.addPendingGroups = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QuerySigningResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryPendingGroupsResponse} returns this */ -proto.tss.v1beta1.QuerySigningResponse.prototype.clearReceivedPartialSignaturesList = function() { - return this.setReceivedPartialSignaturesList([]); +proto.band.tss.v1beta1.QueryPendingGroupsResponse.prototype.clearPendingGroupsList = function() { + return this.setPendingGroupsList([]); }; @@ -3458,8 +2689,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryStatusesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryStatusesRequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryPendingSigningsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryPendingSigningsRequest.toObject(opt_includeInstance, this); }; @@ -3468,14 +2699,13 @@ proto.tss.v1beta1.QueryStatusesRequest.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryStatusesRequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryPendingSigningsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryStatusesRequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryPendingSigningsRequest.toObject = function(includeInstance, msg) { var f, obj = { - status: jspb.Message.getFieldWithDefault(msg, 1, 0), - pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + address: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -3489,23 +2719,23 @@ proto.tss.v1beta1.QueryStatusesRequest.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryStatusesRequest} + * @return {!proto.band.tss.v1beta1.QueryPendingSigningsRequest} */ -proto.tss.v1beta1.QueryStatusesRequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryPendingSigningsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryStatusesRequest; - return proto.tss.v1beta1.QueryStatusesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryPendingSigningsRequest; + return proto.band.tss.v1beta1.QueryPendingSigningsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryStatusesRequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryPendingSigningsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryStatusesRequest} + * @return {!proto.band.tss.v1beta1.QueryPendingSigningsRequest} */ -proto.tss.v1beta1.QueryStatusesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryPendingSigningsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3513,13 +2743,8 @@ proto.tss.v1beta1.QueryStatusesRequest.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.tss.v1beta1.MemberStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 2: - var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; - reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); - msg.setPagination(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); break; default: reader.skipField(); @@ -3534,9 +2759,9 @@ proto.tss.v1beta1.QueryStatusesRequest.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryStatusesRequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryPendingSigningsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryStatusesRequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryPendingSigningsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3544,82 +2769,37 @@ proto.tss.v1beta1.QueryStatusesRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryStatusesRequest} message + * @param {!proto.band.tss.v1beta1.QueryPendingSigningsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryStatusesRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryPendingSigningsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getPagination(); - if (f != null) { - writer.writeMessage( - 2, - f, - cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter - ); - } -}; - - -/** - * optional MemberStatus status = 1; - * @return {!proto.tss.v1beta1.MemberStatus} - */ -proto.tss.v1beta1.QueryStatusesRequest.prototype.getStatus = function() { - return /** @type {!proto.tss.v1beta1.MemberStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.tss.v1beta1.MemberStatus} value - * @return {!proto.tss.v1beta1.QueryStatusesRequest} returns this - */ -proto.tss.v1beta1.QueryStatusesRequest.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; - * @return {?proto.cosmos.base.query.v1beta1.PageRequest} - */ -proto.tss.v1beta1.QueryStatusesRequest.prototype.getPagination = function() { - return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); -}; - - -/** - * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value - * @return {!proto.tss.v1beta1.QueryStatusesRequest} returns this -*/ -proto.tss.v1beta1.QueryStatusesRequest.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QueryStatusesRequest} returns this + * optional string address = 1; + * @return {string} */ -proto.tss.v1beta1.QueryStatusesRequest.prototype.clearPagination = function() { - return this.setPagination(undefined); +proto.band.tss.v1beta1.QueryPendingSigningsRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.band.tss.v1beta1.QueryPendingSigningsRequest} returns this */ -proto.tss.v1beta1.QueryStatusesRequest.prototype.hasPagination = function() { - return jspb.Message.getField(this, 2) != null; +proto.band.tss.v1beta1.QueryPendingSigningsRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3629,7 +2809,7 @@ proto.tss.v1beta1.QueryStatusesRequest.prototype.hasPagination = function() { * @private {!Array} * @const */ -proto.tss.v1beta1.QueryStatusesResponse.repeatedFields_ = [1]; +proto.band.tss.v1beta1.QueryPendingSigningsResponse.repeatedFields_ = [1]; @@ -3646,8 +2826,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryStatusesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryStatusesResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryPendingSigningsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryPendingSigningsResponse.toObject(opt_includeInstance, this); }; @@ -3656,15 +2836,13 @@ proto.tss.v1beta1.QueryStatusesResponse.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryStatusesResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryPendingSigningsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryStatusesResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryPendingSigningsResponse.toObject = function(includeInstance, msg) { var f, obj = { - statusesList: jspb.Message.toObjectList(msg.getStatusesList(), - tss_v1beta1_tss_pb.Status.toObject, includeInstance), - pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + pendingSigningsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -3678,23 +2856,23 @@ proto.tss.v1beta1.QueryStatusesResponse.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryStatusesResponse} + * @return {!proto.band.tss.v1beta1.QueryPendingSigningsResponse} */ -proto.tss.v1beta1.QueryStatusesResponse.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryPendingSigningsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryStatusesResponse; - return proto.tss.v1beta1.QueryStatusesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryPendingSigningsResponse; + return proto.band.tss.v1beta1.QueryPendingSigningsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryStatusesResponse} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryPendingSigningsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryStatusesResponse} + * @return {!proto.band.tss.v1beta1.QueryPendingSigningsResponse} */ -proto.tss.v1beta1.QueryStatusesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryPendingSigningsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3702,14 +2880,10 @@ proto.tss.v1beta1.QueryStatusesResponse.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new tss_v1beta1_tss_pb.Status; - reader.readMessage(value,tss_v1beta1_tss_pb.Status.deserializeBinaryFromReader); - msg.addStatuses(value); - break; - case 2: - var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; - reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); - msg.setPagination(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addPendingSignings(values[i]); + } break; default: reader.skipField(); @@ -3724,9 +2898,9 @@ proto.tss.v1beta1.QueryStatusesResponse.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryStatusesResponse.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryPendingSigningsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryStatusesResponse.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryPendingSigningsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3734,103 +2908,56 @@ proto.tss.v1beta1.QueryStatusesResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryStatusesResponse} message + * @param {!proto.band.tss.v1beta1.QueryPendingSigningsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryStatusesResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryPendingSigningsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStatusesList(); + f = message.getPendingSigningsList(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writePackedUint64( 1, - f, - tss_v1beta1_tss_pb.Status.serializeBinaryToWriter - ); - } - f = message.getPagination(); - if (f != null) { - writer.writeMessage( - 2, - f, - cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + f ); } }; /** - * repeated Status statuses = 1; - * @return {!Array} + * repeated uint64 pending_signings = 1; + * @return {!Array} */ -proto.tss.v1beta1.QueryStatusesResponse.prototype.getStatusesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Status, 1)); +proto.band.tss.v1beta1.QueryPendingSigningsResponse.prototype.getPendingSigningsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryStatusesResponse} returns this -*/ -proto.tss.v1beta1.QueryStatusesResponse.prototype.setStatusesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.QueryPendingSigningsResponse} returns this + */ +proto.band.tss.v1beta1.QueryPendingSigningsResponse.prototype.setPendingSigningsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * @param {!proto.tss.v1beta1.Status=} opt_value + * @param {number} value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Status} + * @return {!proto.band.tss.v1beta1.QueryPendingSigningsResponse} returns this */ -proto.tss.v1beta1.QueryStatusesResponse.prototype.addStatuses = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tss.v1beta1.Status, opt_index); +proto.band.tss.v1beta1.QueryPendingSigningsResponse.prototype.addPendingSignings = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryStatusesResponse} returns this - */ -proto.tss.v1beta1.QueryStatusesResponse.prototype.clearStatusesList = function() { - return this.setStatusesList([]); -}; - - -/** - * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; - * @return {?proto.cosmos.base.query.v1beta1.PageResponse} - */ -proto.tss.v1beta1.QueryStatusesResponse.prototype.getPagination = function() { - return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); -}; - - -/** - * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value - * @return {!proto.tss.v1beta1.QueryStatusesResponse} returns this -*/ -proto.tss.v1beta1.QueryStatusesResponse.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QueryStatusesResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryPendingSigningsResponse} returns this */ -proto.tss.v1beta1.QueryStatusesResponse.prototype.clearPagination = function() { - return this.setPagination(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.QueryStatusesResponse.prototype.hasPagination = function() { - return jspb.Message.getField(this, 2) != null; +proto.band.tss.v1beta1.QueryPendingSigningsResponse.prototype.clearPendingSigningsList = function() { + return this.setPendingSigningsList([]); }; @@ -3850,8 +2977,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryStatusRequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QuerySigningRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QuerySigningRequest.toObject(opt_includeInstance, this); }; @@ -3860,13 +2987,13 @@ proto.tss.v1beta1.QueryStatusRequest.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryStatusRequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QuerySigningRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryStatusRequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QuerySigningRequest.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") + signingId: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -3880,23 +3007,23 @@ proto.tss.v1beta1.QueryStatusRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryStatusRequest} + * @return {!proto.band.tss.v1beta1.QuerySigningRequest} */ -proto.tss.v1beta1.QueryStatusRequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QuerySigningRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryStatusRequest; - return proto.tss.v1beta1.QueryStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QuerySigningRequest; + return proto.band.tss.v1beta1.QuerySigningRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryStatusRequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QuerySigningRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryStatusRequest} + * @return {!proto.band.tss.v1beta1.QuerySigningRequest} */ -proto.tss.v1beta1.QueryStatusRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QuerySigningRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3904,8 +3031,8 @@ proto.tss.v1beta1.QueryStatusRequest.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningId(value); break; default: reader.skipField(); @@ -3920,9 +3047,9 @@ proto.tss.v1beta1.QueryStatusRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryStatusRequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QuerySigningRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryStatusRequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QuerySigningRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3930,15 +3057,15 @@ proto.tss.v1beta1.QueryStatusRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryStatusRequest} message + * @param {!proto.band.tss.v1beta1.QuerySigningRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QuerySigningRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( + f = message.getSigningId(); + if (f !== 0) { + writer.writeUint64( 1, f ); @@ -3947,20 +3074,20 @@ proto.tss.v1beta1.QueryStatusRequest.serializeBinaryToWriter = function(message, /** - * optional string address = 1; - * @return {string} + * optional uint64 signing_id = 1; + * @return {number} */ -proto.tss.v1beta1.QueryStatusRequest.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.band.tss.v1beta1.QuerySigningRequest.prototype.getSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.tss.v1beta1.QueryStatusRequest} returns this + * @param {number} value + * @return {!proto.band.tss.v1beta1.QuerySigningRequest} returns this */ -proto.tss.v1beta1.QueryStatusRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.band.tss.v1beta1.QuerySigningRequest.prototype.setSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3980,8 +3107,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryStatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryStatusResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QuerySigningResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QuerySigningResponse.toObject(opt_includeInstance, this); }; @@ -3990,13 +3117,13 @@ proto.tss.v1beta1.QueryStatusResponse.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryStatusResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QuerySigningResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryStatusResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QuerySigningResponse.toObject = function(includeInstance, msg) { var f, obj = { - status: (f = msg.getStatus()) && tss_v1beta1_tss_pb.Status.toObject(includeInstance, f) + signingResult: (f = msg.getSigningResult()) && band_tss_v1beta1_tss_pb.SigningResult.toObject(includeInstance, f) }; if (includeInstance) { @@ -4010,23 +3137,23 @@ proto.tss.v1beta1.QueryStatusResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryStatusResponse} + * @return {!proto.band.tss.v1beta1.QuerySigningResponse} */ -proto.tss.v1beta1.QueryStatusResponse.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QuerySigningResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryStatusResponse; - return proto.tss.v1beta1.QueryStatusResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QuerySigningResponse; + return proto.band.tss.v1beta1.QuerySigningResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryStatusResponse} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QuerySigningResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryStatusResponse} + * @return {!proto.band.tss.v1beta1.QuerySigningResponse} */ -proto.tss.v1beta1.QueryStatusResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QuerySigningResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4034,9 +3161,9 @@ proto.tss.v1beta1.QueryStatusResponse.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new tss_v1beta1_tss_pb.Status; - reader.readMessage(value,tss_v1beta1_tss_pb.Status.deserializeBinaryFromReader); - msg.setStatus(value); + var value = new band_tss_v1beta1_tss_pb.SigningResult; + reader.readMessage(value,band_tss_v1beta1_tss_pb.SigningResult.deserializeBinaryFromReader); + msg.setSigningResult(value); break; default: reader.skipField(); @@ -4051,9 +3178,9 @@ proto.tss.v1beta1.QueryStatusResponse.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryStatusResponse.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QuerySigningResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryStatusResponse.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QuerySigningResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4061,48 +3188,48 @@ proto.tss.v1beta1.QueryStatusResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryStatusResponse} message + * @param {!proto.band.tss.v1beta1.QuerySigningResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryStatusResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QuerySigningResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStatus(); + f = message.getSigningResult(); if (f != null) { writer.writeMessage( 1, f, - tss_v1beta1_tss_pb.Status.serializeBinaryToWriter + band_tss_v1beta1_tss_pb.SigningResult.serializeBinaryToWriter ); } }; /** - * optional Status status = 1; - * @return {?proto.tss.v1beta1.Status} + * optional SigningResult signing_result = 1; + * @return {?proto.band.tss.v1beta1.SigningResult} */ -proto.tss.v1beta1.QueryStatusResponse.prototype.getStatus = function() { - return /** @type{?proto.tss.v1beta1.Status} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_tss_pb.Status, 1)); +proto.band.tss.v1beta1.QuerySigningResponse.prototype.getSigningResult = function() { + return /** @type{?proto.band.tss.v1beta1.SigningResult} */ ( + jspb.Message.getWrapperField(this, band_tss_v1beta1_tss_pb.SigningResult, 1)); }; /** - * @param {?proto.tss.v1beta1.Status|undefined} value - * @return {!proto.tss.v1beta1.QueryStatusResponse} returns this + * @param {?proto.band.tss.v1beta1.SigningResult|undefined} value + * @return {!proto.band.tss.v1beta1.QuerySigningResponse} returns this */ -proto.tss.v1beta1.QueryStatusResponse.prototype.setStatus = function(value) { +proto.band.tss.v1beta1.QuerySigningResponse.prototype.setSigningResult = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QueryStatusResponse} returns this + * @return {!proto.band.tss.v1beta1.QuerySigningResponse} returns this */ -proto.tss.v1beta1.QueryStatusResponse.prototype.clearStatus = function() { - return this.setStatus(undefined); +proto.band.tss.v1beta1.QuerySigningResponse.prototype.clearSigningResult = function() { + return this.setSigningResult(undefined); }; @@ -4110,7 +3237,7 @@ proto.tss.v1beta1.QueryStatusResponse.prototype.clearStatus = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tss.v1beta1.QueryStatusResponse.prototype.hasStatus = function() { +proto.band.tss.v1beta1.QuerySigningResponse.prototype.hasSigningResult = function() { return jspb.Message.getField(this, 1) != null; }; @@ -4131,8 +3258,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryReplacementsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryReplacementsRequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QuerySigningsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QuerySigningsRequest.toObject(opt_includeInstance, this); }; @@ -4141,13 +3268,12 @@ proto.tss.v1beta1.QueryReplacementsRequest.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryReplacementsRequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QuerySigningsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryReplacementsRequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QuerySigningsRequest.toObject = function(includeInstance, msg) { var f, obj = { - status: jspb.Message.getFieldWithDefault(msg, 1, 0), pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; @@ -4162,23 +3288,23 @@ proto.tss.v1beta1.QueryReplacementsRequest.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryReplacementsRequest} + * @return {!proto.band.tss.v1beta1.QuerySigningsRequest} */ -proto.tss.v1beta1.QueryReplacementsRequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QuerySigningsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryReplacementsRequest; - return proto.tss.v1beta1.QueryReplacementsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QuerySigningsRequest; + return proto.band.tss.v1beta1.QuerySigningsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryReplacementsRequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QuerySigningsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryReplacementsRequest} + * @return {!proto.band.tss.v1beta1.QuerySigningsRequest} */ -proto.tss.v1beta1.QueryReplacementsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QuerySigningsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4186,10 +3312,6 @@ proto.tss.v1beta1.QueryReplacementsRequest.deserializeBinaryFromReader = functio var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.tss.v1beta1.ReplacementStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 2: var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); msg.setPagination(value); @@ -4207,9 +3329,9 @@ proto.tss.v1beta1.QueryReplacementsRequest.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryReplacementsRequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QuerySigningsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryReplacementsRequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QuerySigningsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4217,23 +3339,16 @@ proto.tss.v1beta1.QueryReplacementsRequest.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryReplacementsRequest} message + * @param {!proto.band.tss.v1beta1.QuerySigningsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryReplacementsRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QuerySigningsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } f = message.getPagination(); if (f != null) { writer.writeMessage( - 2, + 1, f, cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter ); @@ -4242,47 +3357,29 @@ proto.tss.v1beta1.QueryReplacementsRequest.serializeBinaryToWriter = function(me /** - * optional ReplacementStatus status = 1; - * @return {!proto.tss.v1beta1.ReplacementStatus} - */ -proto.tss.v1beta1.QueryReplacementsRequest.prototype.getStatus = function() { - return /** @type {!proto.tss.v1beta1.ReplacementStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.tss.v1beta1.ReplacementStatus} value - * @return {!proto.tss.v1beta1.QueryReplacementsRequest} returns this - */ -proto.tss.v1beta1.QueryReplacementsRequest.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ -proto.tss.v1beta1.QueryReplacementsRequest.prototype.getPagination = function() { +proto.band.tss.v1beta1.QuerySigningsRequest.prototype.getPagination = function() { return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); }; /** * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value - * @return {!proto.tss.v1beta1.QueryReplacementsRequest} returns this + * @return {!proto.band.tss.v1beta1.QuerySigningsRequest} returns this */ -proto.tss.v1beta1.QueryReplacementsRequest.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.band.tss.v1beta1.QuerySigningsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QueryReplacementsRequest} returns this + * @return {!proto.band.tss.v1beta1.QuerySigningsRequest} returns this */ -proto.tss.v1beta1.QueryReplacementsRequest.prototype.clearPagination = function() { +proto.band.tss.v1beta1.QuerySigningsRequest.prototype.clearPagination = function() { return this.setPagination(undefined); }; @@ -4291,8 +3388,8 @@ proto.tss.v1beta1.QueryReplacementsRequest.prototype.clearPagination = function( * Returns whether this field is set. * @return {boolean} */ -proto.tss.v1beta1.QueryReplacementsRequest.prototype.hasPagination = function() { - return jspb.Message.getField(this, 2) != null; +proto.band.tss.v1beta1.QuerySigningsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -4302,7 +3399,7 @@ proto.tss.v1beta1.QueryReplacementsRequest.prototype.hasPagination = function() * @private {!Array} * @const */ -proto.tss.v1beta1.QueryReplacementsResponse.repeatedFields_ = [1]; +proto.band.tss.v1beta1.QuerySigningsResponse.repeatedFields_ = [1]; @@ -4319,8 +3416,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryReplacementsResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QuerySigningsResponse.toObject(opt_includeInstance, this); }; @@ -4329,14 +3426,14 @@ proto.tss.v1beta1.QueryReplacementsResponse.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryReplacementsResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QuerySigningsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryReplacementsResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QuerySigningsResponse.toObject = function(includeInstance, msg) { var f, obj = { - replacementsList: jspb.Message.toObjectList(msg.getReplacementsList(), - tss_v1beta1_tss_pb.Replacement.toObject, includeInstance), + signingResultsList: jspb.Message.toObjectList(msg.getSigningResultsList(), + band_tss_v1beta1_tss_pb.SigningResult.toObject, includeInstance), pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; @@ -4351,23 +3448,23 @@ proto.tss.v1beta1.QueryReplacementsResponse.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryReplacementsResponse} + * @return {!proto.band.tss.v1beta1.QuerySigningsResponse} */ -proto.tss.v1beta1.QueryReplacementsResponse.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QuerySigningsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryReplacementsResponse; - return proto.tss.v1beta1.QueryReplacementsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QuerySigningsResponse; + return proto.band.tss.v1beta1.QuerySigningsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryReplacementsResponse} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QuerySigningsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryReplacementsResponse} + * @return {!proto.band.tss.v1beta1.QuerySigningsResponse} */ -proto.tss.v1beta1.QueryReplacementsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QuerySigningsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4375,9 +3472,9 @@ proto.tss.v1beta1.QueryReplacementsResponse.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new tss_v1beta1_tss_pb.Replacement; - reader.readMessage(value,tss_v1beta1_tss_pb.Replacement.deserializeBinaryFromReader); - msg.addReplacements(value); + var value = new band_tss_v1beta1_tss_pb.SigningResult; + reader.readMessage(value,band_tss_v1beta1_tss_pb.SigningResult.deserializeBinaryFromReader); + msg.addSigningResults(value); break; case 2: var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; @@ -4397,9 +3494,9 @@ proto.tss.v1beta1.QueryReplacementsResponse.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryReplacementsResponse.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QuerySigningsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4407,18 +3504,18 @@ proto.tss.v1beta1.QueryReplacementsResponse.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryReplacementsResponse} message + * @param {!proto.band.tss.v1beta1.QuerySigningsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryReplacementsResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QuerySigningsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getReplacementsList(); + f = message.getSigningResultsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - tss_v1beta1_tss_pb.Replacement.serializeBinaryToWriter + band_tss_v1beta1_tss_pb.SigningResult.serializeBinaryToWriter ); } f = message.getPagination(); @@ -4433,40 +3530,40 @@ proto.tss.v1beta1.QueryReplacementsResponse.serializeBinaryToWriter = function(m /** - * repeated Replacement replacements = 1; - * @return {!Array} + * repeated SigningResult signing_results = 1; + * @return {!Array} */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.getReplacementsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Replacement, 1)); +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.getSigningResultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tss_v1beta1_tss_pb.SigningResult, 1)); }; /** - * @param {!Array} value - * @return {!proto.tss.v1beta1.QueryReplacementsResponse} returns this + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.QuerySigningsResponse} returns this */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.setReplacementsList = function(value) { +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.setSigningResultsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.tss.v1beta1.Replacement=} opt_value + * @param {!proto.band.tss.v1beta1.SigningResult=} opt_value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Replacement} + * @return {!proto.band.tss.v1beta1.SigningResult} */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.addReplacements = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tss.v1beta1.Replacement, opt_index); +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.addSigningResults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tss.v1beta1.SigningResult, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.QueryReplacementsResponse} returns this + * @return {!proto.band.tss.v1beta1.QuerySigningsResponse} returns this */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.clearReplacementsList = function() { - return this.setReplacementsList([]); +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.clearSigningResultsList = function() { + return this.setSigningResultsList([]); }; @@ -4474,7 +3571,7 @@ proto.tss.v1beta1.QueryReplacementsResponse.prototype.clearReplacementsList = fu * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.getPagination = function() { +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.getPagination = function() { return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); }; @@ -4482,18 +3579,18 @@ proto.tss.v1beta1.QueryReplacementsResponse.prototype.getPagination = function() /** * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value - * @return {!proto.tss.v1beta1.QueryReplacementsResponse} returns this + * @return {!proto.band.tss.v1beta1.QuerySigningsResponse} returns this */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.setPagination = function(value) { +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.setPagination = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QueryReplacementsResponse} returns this + * @return {!proto.band.tss.v1beta1.QuerySigningsResponse} returns this */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.clearPagination = function() { +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.clearPagination = function() { return this.setPagination(undefined); }; @@ -4502,7 +3599,7 @@ proto.tss.v1beta1.QueryReplacementsResponse.prototype.clearPagination = function * Returns whether this field is set. * @return {boolean} */ -proto.tss.v1beta1.QueryReplacementsResponse.prototype.hasPagination = function() { +proto.band.tss.v1beta1.QuerySigningsResponse.prototype.hasPagination = function() { return jspb.Message.getField(this, 2) != null; }; @@ -4523,8 +3620,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryReplacementRequest.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryReplacementRequest.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryParamsRequest.toObject(opt_includeInstance, this); }; @@ -4533,13 +3630,13 @@ proto.tss.v1beta1.QueryReplacementRequest.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryReplacementRequest} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryParamsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryReplacementRequest.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; if (includeInstance) { @@ -4553,33 +3650,29 @@ proto.tss.v1beta1.QueryReplacementRequest.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryReplacementRequest} + * @return {!proto.band.tss.v1beta1.QueryParamsRequest} */ -proto.tss.v1beta1.QueryReplacementRequest.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryReplacementRequest; - return proto.tss.v1beta1.QueryReplacementRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryParamsRequest; + return proto.band.tss.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryReplacementRequest} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryParamsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryReplacementRequest} + * @return {!proto.band.tss.v1beta1.QueryParamsRequest} */ -proto.tss.v1beta1.QueryReplacementRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; default: reader.skipField(); break; @@ -4593,9 +3686,9 @@ proto.tss.v1beta1.QueryReplacementRequest.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryReplacementRequest.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryReplacementRequest.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryParamsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4603,37 +3696,12 @@ proto.tss.v1beta1.QueryReplacementRequest.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryReplacementRequest} message + * @param {!proto.band.tss.v1beta1.QueryParamsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryReplacementRequest.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.tss.v1beta1.QueryReplacementRequest.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.QueryReplacementRequest} returns this - */ -proto.tss.v1beta1.QueryReplacementRequest.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); }; @@ -4653,8 +3721,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.QueryReplacementResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.QueryReplacementResponse.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.QueryParamsResponse.toObject(opt_includeInstance, this); }; @@ -4663,13 +3731,13 @@ proto.tss.v1beta1.QueryReplacementResponse.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.QueryReplacementResponse} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.QueryParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryReplacementResponse.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { var f, obj = { - replacement: (f = msg.getReplacement()) && tss_v1beta1_tss_pb.Replacement.toObject(includeInstance, f) + params: (f = msg.getParams()) && band_tss_v1beta1_genesis_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -4683,23 +3751,23 @@ proto.tss.v1beta1.QueryReplacementResponse.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.QueryReplacementResponse} + * @return {!proto.band.tss.v1beta1.QueryParamsResponse} */ -proto.tss.v1beta1.QueryReplacementResponse.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.QueryReplacementResponse; - return proto.tss.v1beta1.QueryReplacementResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.QueryParamsResponse; + return proto.band.tss.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.QueryReplacementResponse} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.QueryParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.QueryReplacementResponse} + * @return {!proto.band.tss.v1beta1.QueryParamsResponse} */ -proto.tss.v1beta1.QueryReplacementResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4707,9 +3775,9 @@ proto.tss.v1beta1.QueryReplacementResponse.deserializeBinaryFromReader = functio var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new tss_v1beta1_tss_pb.Replacement; - reader.readMessage(value,tss_v1beta1_tss_pb.Replacement.deserializeBinaryFromReader); - msg.setReplacement(value); + var value = new band_tss_v1beta1_genesis_pb.Params; + reader.readMessage(value,band_tss_v1beta1_genesis_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); break; default: reader.skipField(); @@ -4724,9 +3792,9 @@ proto.tss.v1beta1.QueryReplacementResponse.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.QueryReplacementResponse.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.QueryReplacementResponse.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.QueryParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4734,48 +3802,48 @@ proto.tss.v1beta1.QueryReplacementResponse.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.QueryReplacementResponse} message + * @param {!proto.band.tss.v1beta1.QueryParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.QueryReplacementResponse.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getReplacement(); + f = message.getParams(); if (f != null) { writer.writeMessage( 1, f, - tss_v1beta1_tss_pb.Replacement.serializeBinaryToWriter + band_tss_v1beta1_genesis_pb.Params.serializeBinaryToWriter ); } }; /** - * optional Replacement replacement = 1; - * @return {?proto.tss.v1beta1.Replacement} + * optional Params params = 1; + * @return {?proto.band.tss.v1beta1.Params} */ -proto.tss.v1beta1.QueryReplacementResponse.prototype.getReplacement = function() { - return /** @type{?proto.tss.v1beta1.Replacement} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_tss_pb.Replacement, 1)); +proto.band.tss.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.band.tss.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_tss_v1beta1_genesis_pb.Params, 1)); }; /** - * @param {?proto.tss.v1beta1.Replacement|undefined} value - * @return {!proto.tss.v1beta1.QueryReplacementResponse} returns this + * @param {?proto.band.tss.v1beta1.Params|undefined} value + * @return {!proto.band.tss.v1beta1.QueryParamsResponse} returns this */ -proto.tss.v1beta1.QueryReplacementResponse.prototype.setReplacement = function(value) { +proto.band.tss.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.QueryReplacementResponse} returns this + * @return {!proto.band.tss.v1beta1.QueryParamsResponse} returns this */ -proto.tss.v1beta1.QueryReplacementResponse.prototype.clearReplacement = function() { - return this.setReplacement(undefined); +proto.band.tss.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); }; @@ -4783,9 +3851,9 @@ proto.tss.v1beta1.QueryReplacementResponse.prototype.clearReplacement = function * Returns whether this field is set. * @return {boolean} */ -proto.tss.v1beta1.QueryReplacementResponse.prototype.hasReplacement = function() { +proto.band.tss.v1beta1.QueryParamsResponse.prototype.hasParams = function() { return jspb.Message.getField(this, 1) != null; }; -goog.object.extend(exports, proto.tss.v1beta1); +goog.object.extend(exports, proto.band.tss.v1beta1); diff --git a/codegen/band/tss/v1beta1/query_pb_service.d.ts b/codegen/band/tss/v1beta1/query_pb_service.d.ts new file mode 100644 index 0000000..0ad59d4 --- /dev/null +++ b/codegen/band/tss/v1beta1/query_pb_service.d.ts @@ -0,0 +1,253 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/query.proto + +import * as band_tss_v1beta1_query_pb from "../../../band/tss/v1beta1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryCounts = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QueryCountsRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QueryCountsResponse; +}; + +type QueryGroups = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QueryGroupsRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QueryGroupsResponse; +}; + +type QueryGroup = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QueryGroupRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QueryGroupResponse; +}; + +type QueryMembers = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QueryMembersRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QueryMembersResponse; +}; + +type QueryIsGrantee = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QueryIsGranteeRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QueryIsGranteeResponse; +}; + +type QueryDE = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QueryDERequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QueryDEResponse; +}; + +type QueryPendingGroups = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QueryPendingGroupsRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QueryPendingGroupsResponse; +}; + +type QueryPendingSignings = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QueryPendingSigningsRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QueryPendingSigningsResponse; +}; + +type QuerySigning = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QuerySigningRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QuerySigningResponse; +}; + +type QuerySignings = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QuerySigningsRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QuerySigningsResponse; +}; + +type QueryParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_query_pb.QueryParamsRequest; + readonly responseType: typeof band_tss_v1beta1_query_pb.QueryParamsResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly Counts: QueryCounts; + static readonly Groups: QueryGroups; + static readonly Group: QueryGroup; + static readonly Members: QueryMembers; + static readonly IsGrantee: QueryIsGrantee; + static readonly DE: QueryDE; + static readonly PendingGroups: QueryPendingGroups; + static readonly PendingSignings: QueryPendingSignings; + static readonly Signing: QuerySigning; + static readonly Signings: QuerySignings; + static readonly Params: QueryParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + counts( + requestMessage: band_tss_v1beta1_query_pb.QueryCountsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryCountsResponse|null) => void + ): UnaryResponse; + counts( + requestMessage: band_tss_v1beta1_query_pb.QueryCountsRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryCountsResponse|null) => void + ): UnaryResponse; + groups( + requestMessage: band_tss_v1beta1_query_pb.QueryGroupsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryGroupsResponse|null) => void + ): UnaryResponse; + groups( + requestMessage: band_tss_v1beta1_query_pb.QueryGroupsRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryGroupsResponse|null) => void + ): UnaryResponse; + group( + requestMessage: band_tss_v1beta1_query_pb.QueryGroupRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryGroupResponse|null) => void + ): UnaryResponse; + group( + requestMessage: band_tss_v1beta1_query_pb.QueryGroupRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryGroupResponse|null) => void + ): UnaryResponse; + members( + requestMessage: band_tss_v1beta1_query_pb.QueryMembersRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryMembersResponse|null) => void + ): UnaryResponse; + members( + requestMessage: band_tss_v1beta1_query_pb.QueryMembersRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryMembersResponse|null) => void + ): UnaryResponse; + isGrantee( + requestMessage: band_tss_v1beta1_query_pb.QueryIsGranteeRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryIsGranteeResponse|null) => void + ): UnaryResponse; + isGrantee( + requestMessage: band_tss_v1beta1_query_pb.QueryIsGranteeRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryIsGranteeResponse|null) => void + ): UnaryResponse; + dE( + requestMessage: band_tss_v1beta1_query_pb.QueryDERequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryDEResponse|null) => void + ): UnaryResponse; + dE( + requestMessage: band_tss_v1beta1_query_pb.QueryDERequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryDEResponse|null) => void + ): UnaryResponse; + pendingGroups( + requestMessage: band_tss_v1beta1_query_pb.QueryPendingGroupsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryPendingGroupsResponse|null) => void + ): UnaryResponse; + pendingGroups( + requestMessage: band_tss_v1beta1_query_pb.QueryPendingGroupsRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryPendingGroupsResponse|null) => void + ): UnaryResponse; + pendingSignings( + requestMessage: band_tss_v1beta1_query_pb.QueryPendingSigningsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryPendingSigningsResponse|null) => void + ): UnaryResponse; + pendingSignings( + requestMessage: band_tss_v1beta1_query_pb.QueryPendingSigningsRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryPendingSigningsResponse|null) => void + ): UnaryResponse; + signing( + requestMessage: band_tss_v1beta1_query_pb.QuerySigningRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QuerySigningResponse|null) => void + ): UnaryResponse; + signing( + requestMessage: band_tss_v1beta1_query_pb.QuerySigningRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QuerySigningResponse|null) => void + ): UnaryResponse; + signings( + requestMessage: band_tss_v1beta1_query_pb.QuerySigningsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QuerySigningsResponse|null) => void + ): UnaryResponse; + signings( + requestMessage: band_tss_v1beta1_query_pb.QuerySigningsRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QuerySigningsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_tss_v1beta1_query_pb.QueryParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_tss_v1beta1_query_pb.QueryParamsRequest, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/proto/tss/v1beta1/query_pb_service.js b/codegen/band/tss/v1beta1/query_pb_service.js similarity index 76% rename from proto/tss/v1beta1/query_pb_service.js rename to codegen/band/tss/v1beta1/query_pb_service.js index 67ad711..5d35c4d 100644 --- a/proto/tss/v1beta1/query_pb_service.js +++ b/codegen/band/tss/v1beta1/query_pb_service.js @@ -1,12 +1,12 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/query.proto +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/query.proto -var tss_v1beta1_query_pb = require("../../tss/v1beta1/query_pb"); +var band_tss_v1beta1_query_pb = require("../../../band/tss/v1beta1/query_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; var Query = (function () { function Query() {} - Query.serviceName = "tss.v1beta1.Query"; + Query.serviceName = "band.tss.v1beta1.Query"; return Query; }()); @@ -15,8 +15,17 @@ Query.Counts = { service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QueryCountsRequest, - responseType: tss_v1beta1_query_pb.QueryCountsResponse + requestType: band_tss_v1beta1_query_pb.QueryCountsRequest, + responseType: band_tss_v1beta1_query_pb.QueryCountsResponse +}; + +Query.Groups = { + methodName: "Groups", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_tss_v1beta1_query_pb.QueryGroupsRequest, + responseType: band_tss_v1beta1_query_pb.QueryGroupsResponse }; Query.Group = { @@ -24,8 +33,8 @@ Query.Group = { service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QueryGroupRequest, - responseType: tss_v1beta1_query_pb.QueryGroupResponse + requestType: band_tss_v1beta1_query_pb.QueryGroupRequest, + responseType: band_tss_v1beta1_query_pb.QueryGroupResponse }; Query.Members = { @@ -33,8 +42,8 @@ Query.Members = { service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QueryMembersRequest, - responseType: tss_v1beta1_query_pb.QueryMembersResponse + requestType: band_tss_v1beta1_query_pb.QueryMembersRequest, + responseType: band_tss_v1beta1_query_pb.QueryMembersResponse }; Query.IsGrantee = { @@ -42,8 +51,8 @@ Query.IsGrantee = { service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QueryIsGranteeRequest, - responseType: tss_v1beta1_query_pb.QueryIsGranteeResponse + requestType: band_tss_v1beta1_query_pb.QueryIsGranteeRequest, + responseType: band_tss_v1beta1_query_pb.QueryIsGranteeResponse }; Query.DE = { @@ -51,8 +60,8 @@ Query.DE = { service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QueryDERequest, - responseType: tss_v1beta1_query_pb.QueryDEResponse + requestType: band_tss_v1beta1_query_pb.QueryDERequest, + responseType: band_tss_v1beta1_query_pb.QueryDEResponse }; Query.PendingGroups = { @@ -60,8 +69,8 @@ Query.PendingGroups = { service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QueryPendingGroupsRequest, - responseType: tss_v1beta1_query_pb.QueryPendingGroupsResponse + requestType: band_tss_v1beta1_query_pb.QueryPendingGroupsRequest, + responseType: band_tss_v1beta1_query_pb.QueryPendingGroupsResponse }; Query.PendingSignings = { @@ -69,8 +78,8 @@ Query.PendingSignings = { service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QueryPendingSigningsRequest, - responseType: tss_v1beta1_query_pb.QueryPendingSigningsResponse + requestType: band_tss_v1beta1_query_pb.QueryPendingSigningsRequest, + responseType: band_tss_v1beta1_query_pb.QueryPendingSigningsResponse }; Query.Signing = { @@ -78,44 +87,26 @@ Query.Signing = { service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QuerySigningRequest, - responseType: tss_v1beta1_query_pb.QuerySigningResponse -}; - -Query.Statuses = { - methodName: "Statuses", - service: Query, - requestStream: false, - responseStream: false, - requestType: tss_v1beta1_query_pb.QueryStatusesRequest, - responseType: tss_v1beta1_query_pb.QueryStatusesResponse + requestType: band_tss_v1beta1_query_pb.QuerySigningRequest, + responseType: band_tss_v1beta1_query_pb.QuerySigningResponse }; -Query.Status = { - methodName: "Status", +Query.Signings = { + methodName: "Signings", service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QueryStatusRequest, - responseType: tss_v1beta1_query_pb.QueryStatusResponse + requestType: band_tss_v1beta1_query_pb.QuerySigningsRequest, + responseType: band_tss_v1beta1_query_pb.QuerySigningsResponse }; -Query.Replacements = { - methodName: "Replacements", +Query.Params = { + methodName: "Params", service: Query, requestStream: false, responseStream: false, - requestType: tss_v1beta1_query_pb.QueryReplacementsRequest, - responseType: tss_v1beta1_query_pb.QueryReplacementsResponse -}; - -Query.Replacement = { - methodName: "Replacement", - service: Query, - requestStream: false, - responseStream: false, - requestType: tss_v1beta1_query_pb.QueryReplacementRequest, - responseType: tss_v1beta1_query_pb.QueryReplacementResponse + requestType: band_tss_v1beta1_query_pb.QueryParamsRequest, + responseType: band_tss_v1beta1_query_pb.QueryParamsResponse }; exports.Query = Query; @@ -156,42 +147,11 @@ QueryClient.prototype.counts = function counts(requestMessage, metadata, callbac }; }; -QueryClient.prototype.group = function group(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Query.Group, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -QueryClient.prototype.members = function members(requestMessage, metadata, callback) { +QueryClient.prototype.groups = function groups(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Members, { + var client = grpc.unary(Query.Groups, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -218,11 +178,11 @@ QueryClient.prototype.members = function members(requestMessage, metadata, callb }; }; -QueryClient.prototype.isGrantee = function isGrantee(requestMessage, metadata, callback) { +QueryClient.prototype.group = function group(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.IsGrantee, { + var client = grpc.unary(Query.Group, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -249,11 +209,11 @@ QueryClient.prototype.isGrantee = function isGrantee(requestMessage, metadata, c }; }; -QueryClient.prototype.dE = function dE(requestMessage, metadata, callback) { +QueryClient.prototype.members = function members(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.DE, { + var client = grpc.unary(Query.Members, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -280,11 +240,11 @@ QueryClient.prototype.dE = function dE(requestMessage, metadata, callback) { }; }; -QueryClient.prototype.pendingGroups = function pendingGroups(requestMessage, metadata, callback) { +QueryClient.prototype.isGrantee = function isGrantee(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.PendingGroups, { + var client = grpc.unary(Query.IsGrantee, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -311,11 +271,11 @@ QueryClient.prototype.pendingGroups = function pendingGroups(requestMessage, met }; }; -QueryClient.prototype.pendingSignings = function pendingSignings(requestMessage, metadata, callback) { +QueryClient.prototype.dE = function dE(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.PendingSignings, { + var client = grpc.unary(Query.DE, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -342,11 +302,11 @@ QueryClient.prototype.pendingSignings = function pendingSignings(requestMessage, }; }; -QueryClient.prototype.signing = function signing(requestMessage, metadata, callback) { +QueryClient.prototype.pendingGroups = function pendingGroups(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Signing, { + var client = grpc.unary(Query.PendingGroups, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -373,11 +333,11 @@ QueryClient.prototype.signing = function signing(requestMessage, metadata, callb }; }; -QueryClient.prototype.statuses = function statuses(requestMessage, metadata, callback) { +QueryClient.prototype.pendingSignings = function pendingSignings(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Statuses, { + var client = grpc.unary(Query.PendingSignings, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -404,11 +364,11 @@ QueryClient.prototype.statuses = function statuses(requestMessage, metadata, cal }; }; -QueryClient.prototype.status = function status(requestMessage, metadata, callback) { +QueryClient.prototype.signing = function signing(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Status, { + var client = grpc.unary(Query.Signing, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -435,11 +395,11 @@ QueryClient.prototype.status = function status(requestMessage, metadata, callbac }; }; -QueryClient.prototype.replacements = function replacements(requestMessage, metadata, callback) { +QueryClient.prototype.signings = function signings(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Replacements, { + var client = grpc.unary(Query.Signings, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -466,11 +426,11 @@ QueryClient.prototype.replacements = function replacements(requestMessage, metad }; }; -QueryClient.prototype.replacement = function replacement(requestMessage, metadata, callback) { +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Replacement, { + var client = grpc.unary(Query.Params, { request: requestMessage, host: this.serviceHost, metadata: metadata, diff --git a/codegen/band/tss/v1beta1/tss.ts b/codegen/band/tss/v1beta1/tss.ts new file mode 100644 index 0000000..9e742f7 --- /dev/null +++ b/codegen/band/tss/v1beta1/tss.ts @@ -0,0 +1,2878 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tss/v1beta1/tss.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../../google/protobuf/timestamp"; +import * as pb_1 from "google-protobuf"; +export namespace band.tss.v1beta1 { + export enum SigningStatus { + SIGNING_STATUS_UNSPECIFIED = 0, + SIGNING_STATUS_WAITING = 1, + SIGNING_STATUS_SUCCESS = 2, + SIGNING_STATUS_FALLEN = 3 + } + export enum GroupStatus { + GROUP_STATUS_UNSPECIFIED = 0, + GROUP_STATUS_ROUND_1 = 1, + GROUP_STATUS_ROUND_2 = 2, + GROUP_STATUS_ROUND_3 = 3, + GROUP_STATUS_ACTIVE = 4, + GROUP_STATUS_EXPIRED = 5, + GROUP_STATUS_FALLEN = 6 + } + export enum ComplaintStatus { + COMPLAINT_STATUS_UNSPECIFIED = 0, + COMPLAINT_STATUS_SUCCESS = 1, + COMPLAINT_STATUS_FAILED = 2 + } + export class Group extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + size?: number; + threshold?: number; + pub_key?: Uint8Array; + status?: GroupStatus; + created_height?: number; + module_owner?: 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 ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("size" in data && data.size != undefined) { + this.size = data.size; + } + if ("threshold" in data && data.threshold != undefined) { + this.threshold = data.threshold; + } + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("created_height" in data && data.created_height != undefined) { + this.created_height = data.created_height; + } + if ("module_owner" in data && data.module_owner != undefined) { + this.module_owner = data.module_owner; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get size() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set size(value: number) { + pb_1.Message.setField(this, 2, value); + } + get threshold() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set threshold(value: number) { + pb_1.Message.setField(this, 3, value); + } + get pub_key() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, GroupStatus.GROUP_STATUS_UNSPECIFIED) as GroupStatus; + } + set status(value: GroupStatus) { + pb_1.Message.setField(this, 5, value); + } + get created_height() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set created_height(value: number) { + pb_1.Message.setField(this, 6, value); + } + get module_owner() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set module_owner(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + id?: number; + size?: number; + threshold?: number; + pub_key?: Uint8Array; + status?: GroupStatus; + created_height?: number; + module_owner?: string; + }): Group { + const message = new Group({}); + if (data.id != null) { + message.id = data.id; + } + if (data.size != null) { + message.size = data.size; + } + if (data.threshold != null) { + message.threshold = data.threshold; + } + if (data.pub_key != null) { + message.pub_key = data.pub_key; + } + if (data.status != null) { + message.status = data.status; + } + if (data.created_height != null) { + message.created_height = data.created_height; + } + if (data.module_owner != null) { + message.module_owner = data.module_owner; + } + return message; + } + toObject() { + const data: { + id?: number; + size?: number; + threshold?: number; + pub_key?: Uint8Array; + status?: GroupStatus; + created_height?: number; + module_owner?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.size != null) { + data.size = this.size; + } + if (this.threshold != null) { + data.threshold = this.threshold; + } + if (this.pub_key != null) { + data.pub_key = this.pub_key; + } + if (this.status != null) { + data.status = this.status; + } + if (this.created_height != null) { + data.created_height = this.created_height; + } + if (this.module_owner != null) { + data.module_owner = this.module_owner; + } + 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.id != 0) + writer.writeUint64(1, this.id); + if (this.size != 0) + writer.writeUint64(2, this.size); + if (this.threshold != 0) + writer.writeUint64(3, this.threshold); + if (this.pub_key.length) + writer.writeBytes(4, this.pub_key); + if (this.status != GroupStatus.GROUP_STATUS_UNSPECIFIED) + writer.writeEnum(5, this.status); + if (this.created_height != 0) + writer.writeUint64(6, this.created_height); + if (this.module_owner.length) + writer.writeString(7, this.module_owner); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Group { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Group(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64(); + break; + case 2: + message.size = reader.readUint64(); + break; + case 3: + message.threshold = reader.readUint64(); + break; + case 4: + message.pub_key = reader.readBytes(); + break; + case 5: + message.status = reader.readEnum(); + break; + case 6: + message.created_height = reader.readUint64(); + break; + case 7: + message.module_owner = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Group { + return Group.deserialize(bytes); + } + } + export class GroupResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group?: Group; + dkg_context?: Uint8Array; + members?: Member[]; + round1_infos?: Round1Info[]; + round2_infos?: Round2Info[]; + complaints_with_status?: ComplaintsWithStatus[]; + confirms?: Confirm[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4, 5, 6, 7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group" in data && data.group != undefined) { + this.group = data.group; + } + if ("dkg_context" in data && data.dkg_context != undefined) { + this.dkg_context = data.dkg_context; + } + if ("members" in data && data.members != undefined) { + this.members = data.members; + } + if ("round1_infos" in data && data.round1_infos != undefined) { + this.round1_infos = data.round1_infos; + } + if ("round2_infos" in data && data.round2_infos != undefined) { + this.round2_infos = data.round2_infos; + } + if ("complaints_with_status" in data && data.complaints_with_status != undefined) { + this.complaints_with_status = data.complaints_with_status; + } + if ("confirms" in data && data.confirms != undefined) { + this.confirms = data.confirms; + } + } + } + get group() { + return pb_1.Message.getWrapperField(this, Group, 1) as Group; + } + set group(value: Group) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_group() { + return pb_1.Message.getField(this, 1) != null; + } + get dkg_context() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set dkg_context(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get members() { + return pb_1.Message.getRepeatedWrapperField(this, Member, 3) as Member[]; + } + set members(value: Member[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get round1_infos() { + return pb_1.Message.getRepeatedWrapperField(this, Round1Info, 4) as Round1Info[]; + } + set round1_infos(value: Round1Info[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get round2_infos() { + return pb_1.Message.getRepeatedWrapperField(this, Round2Info, 5) as Round2Info[]; + } + set round2_infos(value: Round2Info[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get complaints_with_status() { + return pb_1.Message.getRepeatedWrapperField(this, ComplaintsWithStatus, 6) as ComplaintsWithStatus[]; + } + set complaints_with_status(value: ComplaintsWithStatus[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get confirms() { + return pb_1.Message.getRepeatedWrapperField(this, Confirm, 7) as Confirm[]; + } + set confirms(value: Confirm[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + static fromObject(data: { + group?: ReturnType; + dkg_context?: Uint8Array; + members?: ReturnType[]; + round1_infos?: ReturnType[]; + round2_infos?: ReturnType[]; + complaints_with_status?: ReturnType[]; + confirms?: ReturnType[]; + }): GroupResult { + const message = new GroupResult({}); + if (data.group != null) { + message.group = Group.fromObject(data.group); + } + if (data.dkg_context != null) { + message.dkg_context = data.dkg_context; + } + if (data.members != null) { + message.members = data.members.map(item => Member.fromObject(item)); + } + if (data.round1_infos != null) { + message.round1_infos = data.round1_infos.map(item => Round1Info.fromObject(item)); + } + if (data.round2_infos != null) { + message.round2_infos = data.round2_infos.map(item => Round2Info.fromObject(item)); + } + if (data.complaints_with_status != null) { + message.complaints_with_status = data.complaints_with_status.map(item => ComplaintsWithStatus.fromObject(item)); + } + if (data.confirms != null) { + message.confirms = data.confirms.map(item => Confirm.fromObject(item)); + } + return message; + } + toObject() { + const data: { + group?: ReturnType; + dkg_context?: Uint8Array; + members?: ReturnType[]; + round1_infos?: ReturnType[]; + round2_infos?: ReturnType[]; + complaints_with_status?: ReturnType[]; + confirms?: ReturnType[]; + } = {}; + if (this.group != null) { + data.group = this.group.toObject(); + } + if (this.dkg_context != null) { + data.dkg_context = this.dkg_context; + } + if (this.members != null) { + data.members = this.members.map((item: Member) => item.toObject()); + } + if (this.round1_infos != null) { + data.round1_infos = this.round1_infos.map((item: Round1Info) => item.toObject()); + } + if (this.round2_infos != null) { + data.round2_infos = this.round2_infos.map((item: Round2Info) => item.toObject()); + } + if (this.complaints_with_status != null) { + data.complaints_with_status = this.complaints_with_status.map((item: ComplaintsWithStatus) => item.toObject()); + } + if (this.confirms != null) { + data.confirms = this.confirms.map((item: Confirm) => item.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_group) + writer.writeMessage(1, this.group, () => this.group.serialize(writer)); + if (this.dkg_context.length) + writer.writeBytes(2, this.dkg_context); + if (this.members.length) + writer.writeRepeatedMessage(3, this.members, (item: Member) => item.serialize(writer)); + if (this.round1_infos.length) + writer.writeRepeatedMessage(4, this.round1_infos, (item: Round1Info) => item.serialize(writer)); + if (this.round2_infos.length) + writer.writeRepeatedMessage(5, this.round2_infos, (item: Round2Info) => item.serialize(writer)); + if (this.complaints_with_status.length) + writer.writeRepeatedMessage(6, this.complaints_with_status, (item: ComplaintsWithStatus) => item.serialize(writer)); + if (this.confirms.length) + writer.writeRepeatedMessage(7, this.confirms, (item: Confirm) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GroupResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GroupResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.group, () => message.group = Group.deserialize(reader)); + break; + case 2: + message.dkg_context = reader.readBytes(); + break; + case 3: + reader.readMessage(message.members, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Member.deserialize(reader), Member)); + break; + case 4: + reader.readMessage(message.round1_infos, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Round1Info.deserialize(reader), Round1Info)); + break; + case 5: + reader.readMessage(message.round2_infos, () => pb_1.Message.addToRepeatedWrapperField(message, 5, Round2Info.deserialize(reader), Round2Info)); + break; + case 6: + reader.readMessage(message.complaints_with_status, () => pb_1.Message.addToRepeatedWrapperField(message, 6, ComplaintsWithStatus.deserialize(reader), ComplaintsWithStatus)); + break; + case 7: + reader.readMessage(message.confirms, () => pb_1.Message.addToRepeatedWrapperField(message, 7, Confirm.deserialize(reader), Confirm)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GroupResult { + return GroupResult.deserialize(bytes); + } + } + export class Round1Info extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + member_id?: number; + coefficient_commits?: Uint8Array[]; + one_time_pub_key?: Uint8Array; + a0_signature?: Uint8Array; + one_time_signature?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("member_id" in data && data.member_id != undefined) { + this.member_id = data.member_id; + } + if ("coefficient_commits" in data && data.coefficient_commits != undefined) { + this.coefficient_commits = data.coefficient_commits; + } + if ("one_time_pub_key" in data && data.one_time_pub_key != undefined) { + this.one_time_pub_key = data.one_time_pub_key; + } + if ("a0_signature" in data && data.a0_signature != undefined) { + this.a0_signature = data.a0_signature; + } + if ("one_time_signature" in data && data.one_time_signature != undefined) { + this.one_time_signature = data.one_time_signature; + } + } + } + get member_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set member_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get coefficient_commits() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as Uint8Array[]; + } + set coefficient_commits(value: Uint8Array[]) { + pb_1.Message.setField(this, 2, value); + } + get one_time_pub_key() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set one_time_pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get a0_signature() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set a0_signature(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get one_time_signature() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set one_time_signature(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + member_id?: number; + coefficient_commits?: Uint8Array[]; + one_time_pub_key?: Uint8Array; + a0_signature?: Uint8Array; + one_time_signature?: Uint8Array; + }): Round1Info { + const message = new Round1Info({}); + if (data.member_id != null) { + message.member_id = data.member_id; + } + if (data.coefficient_commits != null) { + message.coefficient_commits = data.coefficient_commits; + } + if (data.one_time_pub_key != null) { + message.one_time_pub_key = data.one_time_pub_key; + } + if (data.a0_signature != null) { + message.a0_signature = data.a0_signature; + } + if (data.one_time_signature != null) { + message.one_time_signature = data.one_time_signature; + } + return message; + } + toObject() { + const data: { + member_id?: number; + coefficient_commits?: Uint8Array[]; + one_time_pub_key?: Uint8Array; + a0_signature?: Uint8Array; + one_time_signature?: Uint8Array; + } = {}; + if (this.member_id != null) { + data.member_id = this.member_id; + } + if (this.coefficient_commits != null) { + data.coefficient_commits = this.coefficient_commits; + } + if (this.one_time_pub_key != null) { + data.one_time_pub_key = this.one_time_pub_key; + } + if (this.a0_signature != null) { + data.a0_signature = this.a0_signature; + } + if (this.one_time_signature != null) { + data.one_time_signature = this.one_time_signature; + } + 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.member_id != 0) + writer.writeUint64(1, this.member_id); + if (this.coefficient_commits.length) + writer.writeRepeatedBytes(2, this.coefficient_commits); + if (this.one_time_pub_key.length) + writer.writeBytes(3, this.one_time_pub_key); + if (this.a0_signature.length) + writer.writeBytes(4, this.a0_signature); + if (this.one_time_signature.length) + writer.writeBytes(5, this.one_time_signature); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Round1Info { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Round1Info(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.member_id = reader.readUint64(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readBytes()); + break; + case 3: + message.one_time_pub_key = reader.readBytes(); + break; + case 4: + message.a0_signature = reader.readBytes(); + break; + case 5: + message.one_time_signature = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Round1Info { + return Round1Info.deserialize(bytes); + } + } + export class Round2Info extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + member_id?: number; + encrypted_secret_shares?: Uint8Array[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("member_id" in data && data.member_id != undefined) { + this.member_id = data.member_id; + } + if ("encrypted_secret_shares" in data && data.encrypted_secret_shares != undefined) { + this.encrypted_secret_shares = data.encrypted_secret_shares; + } + } + } + get member_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set member_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get encrypted_secret_shares() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as Uint8Array[]; + } + set encrypted_secret_shares(value: Uint8Array[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + member_id?: number; + encrypted_secret_shares?: Uint8Array[]; + }): Round2Info { + const message = new Round2Info({}); + if (data.member_id != null) { + message.member_id = data.member_id; + } + if (data.encrypted_secret_shares != null) { + message.encrypted_secret_shares = data.encrypted_secret_shares; + } + return message; + } + toObject() { + const data: { + member_id?: number; + encrypted_secret_shares?: Uint8Array[]; + } = {}; + if (this.member_id != null) { + data.member_id = this.member_id; + } + if (this.encrypted_secret_shares != null) { + data.encrypted_secret_shares = this.encrypted_secret_shares; + } + 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.member_id != 0) + writer.writeUint64(1, this.member_id); + if (this.encrypted_secret_shares.length) + writer.writeRepeatedBytes(2, this.encrypted_secret_shares); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Round2Info { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Round2Info(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.member_id = reader.readUint64(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Round2Info { + return Round2Info.deserialize(bytes); + } + } + export class DE extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pub_d?: Uint8Array; + pub_e?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("pub_d" in data && data.pub_d != undefined) { + this.pub_d = data.pub_d; + } + if ("pub_e" in data && data.pub_e != undefined) { + this.pub_e = data.pub_e; + } + } + } + get pub_d() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set pub_d(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get pub_e() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set pub_e(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + pub_d?: Uint8Array; + pub_e?: Uint8Array; + }): DE { + const message = new DE({}); + if (data.pub_d != null) { + message.pub_d = data.pub_d; + } + if (data.pub_e != null) { + message.pub_e = data.pub_e; + } + return message; + } + toObject() { + const data: { + pub_d?: Uint8Array; + pub_e?: Uint8Array; + } = {}; + if (this.pub_d != null) { + data.pub_d = this.pub_d; + } + if (this.pub_e != null) { + data.pub_e = this.pub_e; + } + 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.pub_d.length) + writer.writeBytes(1, this.pub_d); + if (this.pub_e.length) + writer.writeBytes(2, this.pub_e); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DE { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DE(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.pub_d = reader.readBytes(); + break; + case 2: + message.pub_e = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DE { + return DE.deserialize(bytes); + } + } + export class DEQueue extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + head?: number; + tail?: 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 ("head" in data && data.head != undefined) { + this.head = data.head; + } + if ("tail" in data && data.tail != undefined) { + this.tail = data.tail; + } + } + } + get head() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set head(value: number) { + pb_1.Message.setField(this, 1, value); + } + get tail() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set tail(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + head?: number; + tail?: number; + }): DEQueue { + const message = new DEQueue({}); + if (data.head != null) { + message.head = data.head; + } + if (data.tail != null) { + message.tail = data.tail; + } + return message; + } + toObject() { + const data: { + head?: number; + tail?: number; + } = {}; + if (this.head != null) { + data.head = this.head; + } + if (this.tail != null) { + data.tail = this.tail; + } + 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.head != 0) + writer.writeUint64(1, this.head); + if (this.tail != 0) + writer.writeUint64(2, this.tail); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DEQueue { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DEQueue(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.head = reader.readUint64(); + break; + case 2: + message.tail = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DEQueue { + return DEQueue.deserialize(bytes); + } + } + export class Signing extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + current_attempt?: number; + group_id?: number; + group_pub_key?: Uint8Array; + message?: Uint8Array; + group_pub_nonce?: Uint8Array; + signature?: Uint8Array; + status?: SigningStatus; + created_height?: number; + created_timestamp?: dependency_3.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("current_attempt" in data && data.current_attempt != undefined) { + this.current_attempt = data.current_attempt; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("group_pub_key" in data && data.group_pub_key != undefined) { + this.group_pub_key = data.group_pub_key; + } + if ("message" in data && data.message != undefined) { + this.message = data.message; + } + if ("group_pub_nonce" in data && data.group_pub_nonce != undefined) { + this.group_pub_nonce = data.group_pub_nonce; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("created_height" in data && data.created_height != undefined) { + this.created_height = data.created_height; + } + if ("created_timestamp" in data && data.created_timestamp != undefined) { + this.created_timestamp = data.created_timestamp; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get current_attempt() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set current_attempt(value: number) { + pb_1.Message.setField(this, 2, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 3, value); + } + get group_pub_key() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set group_pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get message() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set message(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get group_pub_nonce() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set group_pub_nonce(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 8, SigningStatus.SIGNING_STATUS_UNSPECIFIED) as SigningStatus; + } + set status(value: SigningStatus) { + pb_1.Message.setField(this, 8, value); + } + get created_height() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set created_height(value: number) { + pb_1.Message.setField(this, 9, value); + } + get created_timestamp() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 10) as dependency_3.google.protobuf.Timestamp; + } + set created_timestamp(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_created_timestamp() { + return pb_1.Message.getField(this, 10) != null; + } + static fromObject(data: { + id?: number; + current_attempt?: number; + group_id?: number; + group_pub_key?: Uint8Array; + message?: Uint8Array; + group_pub_nonce?: Uint8Array; + signature?: Uint8Array; + status?: SigningStatus; + created_height?: number; + created_timestamp?: ReturnType; + }): Signing { + const message = new Signing({}); + if (data.id != null) { + message.id = data.id; + } + if (data.current_attempt != null) { + message.current_attempt = data.current_attempt; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.group_pub_key != null) { + message.group_pub_key = data.group_pub_key; + } + if (data.message != null) { + message.message = data.message; + } + if (data.group_pub_nonce != null) { + message.group_pub_nonce = data.group_pub_nonce; + } + if (data.signature != null) { + message.signature = data.signature; + } + if (data.status != null) { + message.status = data.status; + } + if (data.created_height != null) { + message.created_height = data.created_height; + } + if (data.created_timestamp != null) { + message.created_timestamp = dependency_3.google.protobuf.Timestamp.fromObject(data.created_timestamp); + } + return message; + } + toObject() { + const data: { + id?: number; + current_attempt?: number; + group_id?: number; + group_pub_key?: Uint8Array; + message?: Uint8Array; + group_pub_nonce?: Uint8Array; + signature?: Uint8Array; + status?: SigningStatus; + created_height?: number; + created_timestamp?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.current_attempt != null) { + data.current_attempt = this.current_attempt; + } + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.group_pub_key != null) { + data.group_pub_key = this.group_pub_key; + } + if (this.message != null) { + data.message = this.message; + } + if (this.group_pub_nonce != null) { + data.group_pub_nonce = this.group_pub_nonce; + } + if (this.signature != null) { + data.signature = this.signature; + } + if (this.status != null) { + data.status = this.status; + } + if (this.created_height != null) { + data.created_height = this.created_height; + } + if (this.created_timestamp != null) { + data.created_timestamp = this.created_timestamp.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.id != 0) + writer.writeUint64(1, this.id); + if (this.current_attempt != 0) + writer.writeUint64(2, this.current_attempt); + if (this.group_id != 0) + writer.writeUint64(3, this.group_id); + if (this.group_pub_key.length) + writer.writeBytes(4, this.group_pub_key); + if (this.message.length) + writer.writeBytes(5, this.message); + if (this.group_pub_nonce.length) + writer.writeBytes(6, this.group_pub_nonce); + if (this.signature.length) + writer.writeBytes(7, this.signature); + if (this.status != SigningStatus.SIGNING_STATUS_UNSPECIFIED) + writer.writeEnum(8, this.status); + if (this.created_height != 0) + writer.writeUint64(9, this.created_height); + if (this.has_created_timestamp) + writer.writeMessage(10, this.created_timestamp, () => this.created_timestamp.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Signing { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Signing(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64(); + break; + case 2: + message.current_attempt = reader.readUint64(); + break; + case 3: + message.group_id = reader.readUint64(); + break; + case 4: + message.group_pub_key = reader.readBytes(); + break; + case 5: + message.message = reader.readBytes(); + break; + case 6: + message.group_pub_nonce = reader.readBytes(); + break; + case 7: + message.signature = reader.readBytes(); + break; + case 8: + message.status = reader.readEnum(); + break; + case 9: + message.created_height = reader.readUint64(); + break; + case 10: + reader.readMessage(message.created_timestamp, () => message.created_timestamp = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Signing { + return Signing.deserialize(bytes); + } + } + export class SigningAttempt extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_id?: number; + attempt?: number; + expired_height?: number; + assigned_members?: AssignedMember[]; + }) { + 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 ("signing_id" in data && data.signing_id != undefined) { + this.signing_id = data.signing_id; + } + if ("attempt" in data && data.attempt != undefined) { + this.attempt = data.attempt; + } + if ("expired_height" in data && data.expired_height != undefined) { + this.expired_height = data.expired_height; + } + if ("assigned_members" in data && data.assigned_members != undefined) { + this.assigned_members = data.assigned_members; + } + } + } + get signing_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get attempt() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set attempt(value: number) { + pb_1.Message.setField(this, 2, value); + } + get expired_height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set expired_height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get assigned_members() { + return pb_1.Message.getRepeatedWrapperField(this, AssignedMember, 4) as AssignedMember[]; + } + set assigned_members(value: AssignedMember[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + signing_id?: number; + attempt?: number; + expired_height?: number; + assigned_members?: ReturnType[]; + }): SigningAttempt { + const message = new SigningAttempt({}); + if (data.signing_id != null) { + message.signing_id = data.signing_id; + } + if (data.attempt != null) { + message.attempt = data.attempt; + } + if (data.expired_height != null) { + message.expired_height = data.expired_height; + } + if (data.assigned_members != null) { + message.assigned_members = data.assigned_members.map(item => AssignedMember.fromObject(item)); + } + return message; + } + toObject() { + const data: { + signing_id?: number; + attempt?: number; + expired_height?: number; + assigned_members?: ReturnType[]; + } = {}; + if (this.signing_id != null) { + data.signing_id = this.signing_id; + } + if (this.attempt != null) { + data.attempt = this.attempt; + } + if (this.expired_height != null) { + data.expired_height = this.expired_height; + } + if (this.assigned_members != null) { + data.assigned_members = this.assigned_members.map((item: AssignedMember) => item.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.signing_id != 0) + writer.writeUint64(1, this.signing_id); + if (this.attempt != 0) + writer.writeUint64(2, this.attempt); + if (this.expired_height != 0) + writer.writeUint64(3, this.expired_height); + if (this.assigned_members.length) + writer.writeRepeatedMessage(4, this.assigned_members, (item: AssignedMember) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SigningAttempt { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SigningAttempt(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_id = reader.readUint64(); + break; + case 2: + message.attempt = reader.readUint64(); + break; + case 3: + message.expired_height = reader.readUint64(); + break; + case 4: + reader.readMessage(message.assigned_members, () => pb_1.Message.addToRepeatedWrapperField(message, 4, AssignedMember.deserialize(reader), AssignedMember)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SigningAttempt { + return SigningAttempt.deserialize(bytes); + } + } + export class AssignedMember extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + member_id?: number; + address?: string; + pub_key?: Uint8Array; + pub_d?: Uint8Array; + pub_e?: Uint8Array; + binding_factor?: Uint8Array; + pub_nonce?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("member_id" in data && data.member_id != undefined) { + this.member_id = data.member_id; + } + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("pub_d" in data && data.pub_d != undefined) { + this.pub_d = data.pub_d; + } + if ("pub_e" in data && data.pub_e != undefined) { + this.pub_e = data.pub_e; + } + if ("binding_factor" in data && data.binding_factor != undefined) { + this.binding_factor = data.binding_factor; + } + if ("pub_nonce" in data && data.pub_nonce != undefined) { + this.pub_nonce = data.pub_nonce; + } + } + } + get member_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set member_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get pub_key() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get pub_d() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set pub_d(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get pub_e() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set pub_e(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get binding_factor() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set binding_factor(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get pub_nonce() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set pub_nonce(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + member_id?: number; + address?: string; + pub_key?: Uint8Array; + pub_d?: Uint8Array; + pub_e?: Uint8Array; + binding_factor?: Uint8Array; + pub_nonce?: Uint8Array; + }): AssignedMember { + const message = new AssignedMember({}); + if (data.member_id != null) { + message.member_id = data.member_id; + } + if (data.address != null) { + message.address = data.address; + } + if (data.pub_key != null) { + message.pub_key = data.pub_key; + } + if (data.pub_d != null) { + message.pub_d = data.pub_d; + } + if (data.pub_e != null) { + message.pub_e = data.pub_e; + } + if (data.binding_factor != null) { + message.binding_factor = data.binding_factor; + } + if (data.pub_nonce != null) { + message.pub_nonce = data.pub_nonce; + } + return message; + } + toObject() { + const data: { + member_id?: number; + address?: string; + pub_key?: Uint8Array; + pub_d?: Uint8Array; + pub_e?: Uint8Array; + binding_factor?: Uint8Array; + pub_nonce?: Uint8Array; + } = {}; + if (this.member_id != null) { + data.member_id = this.member_id; + } + if (this.address != null) { + data.address = this.address; + } + if (this.pub_key != null) { + data.pub_key = this.pub_key; + } + if (this.pub_d != null) { + data.pub_d = this.pub_d; + } + if (this.pub_e != null) { + data.pub_e = this.pub_e; + } + if (this.binding_factor != null) { + data.binding_factor = this.binding_factor; + } + if (this.pub_nonce != null) { + data.pub_nonce = this.pub_nonce; + } + 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.member_id != 0) + writer.writeUint64(1, this.member_id); + if (this.address.length) + writer.writeString(2, this.address); + if (this.pub_key.length) + writer.writeBytes(3, this.pub_key); + if (this.pub_d.length) + writer.writeBytes(4, this.pub_d); + if (this.pub_e.length) + writer.writeBytes(5, this.pub_e); + if (this.binding_factor.length) + writer.writeBytes(6, this.binding_factor); + if (this.pub_nonce.length) + writer.writeBytes(7, this.pub_nonce); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssignedMember { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssignedMember(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.member_id = reader.readUint64(); + break; + case 2: + message.address = reader.readString(); + break; + case 3: + message.pub_key = reader.readBytes(); + break; + case 4: + message.pub_d = reader.readBytes(); + break; + case 5: + message.pub_e = reader.readBytes(); + break; + case 6: + message.binding_factor = reader.readBytes(); + break; + case 7: + message.pub_nonce = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssignedMember { + return AssignedMember.deserialize(bytes); + } + } + export class PendingSignings extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_ids?: number[]; + }) { + 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 ("signing_ids" in data && data.signing_ids != undefined) { + this.signing_ids = data.signing_ids; + } + } + } + get signing_ids() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set signing_ids(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + signing_ids?: number[]; + }): PendingSignings { + const message = new PendingSignings({}); + if (data.signing_ids != null) { + message.signing_ids = data.signing_ids; + } + return message; + } + toObject() { + const data: { + signing_ids?: number[]; + } = {}; + if (this.signing_ids != null) { + data.signing_ids = this.signing_ids; + } + 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.signing_ids.length) + writer.writePackedUint64(1, this.signing_ids); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PendingSignings { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PendingSignings(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_ids = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PendingSignings { + return PendingSignings.deserialize(bytes); + } + } + export class Member extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + group_id?: number; + address?: string; + pub_key?: Uint8Array; + is_malicious?: boolean; + is_active?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("is_malicious" in data && data.is_malicious != undefined) { + this.is_malicious = data.is_malicious; + } + if ("is_active" in data && data.is_active != undefined) { + this.is_active = data.is_active; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 3, value); + } + get pub_key() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set pub_key(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get is_malicious() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set is_malicious(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + get is_active() { + return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean; + } + set is_active(value: boolean) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + id?: number; + group_id?: number; + address?: string; + pub_key?: Uint8Array; + is_malicious?: boolean; + is_active?: boolean; + }): Member { + const message = new Member({}); + if (data.id != null) { + message.id = data.id; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.address != null) { + message.address = data.address; + } + if (data.pub_key != null) { + message.pub_key = data.pub_key; + } + if (data.is_malicious != null) { + message.is_malicious = data.is_malicious; + } + if (data.is_active != null) { + message.is_active = data.is_active; + } + return message; + } + toObject() { + const data: { + id?: number; + group_id?: number; + address?: string; + pub_key?: Uint8Array; + is_malicious?: boolean; + is_active?: boolean; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.address != null) { + data.address = this.address; + } + if (this.pub_key != null) { + data.pub_key = this.pub_key; + } + if (this.is_malicious != null) { + data.is_malicious = this.is_malicious; + } + if (this.is_active != null) { + data.is_active = this.is_active; + } + 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.id != 0) + writer.writeUint64(1, this.id); + if (this.group_id != 0) + writer.writeUint64(2, this.group_id); + if (this.address.length) + writer.writeString(3, this.address); + if (this.pub_key.length) + writer.writeBytes(4, this.pub_key); + if (this.is_malicious != false) + writer.writeBool(5, this.is_malicious); + if (this.is_active != false) + writer.writeBool(6, this.is_active); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Member { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Member(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64(); + break; + case 2: + message.group_id = reader.readUint64(); + break; + case 3: + message.address = reader.readString(); + break; + case 4: + message.pub_key = reader.readBytes(); + break; + case 5: + message.is_malicious = reader.readBool(); + break; + case 6: + message.is_active = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Member { + return Member.deserialize(bytes); + } + } + export class Confirm extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + member_id?: number; + own_pub_key_sig?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("member_id" in data && data.member_id != undefined) { + this.member_id = data.member_id; + } + if ("own_pub_key_sig" in data && data.own_pub_key_sig != undefined) { + this.own_pub_key_sig = data.own_pub_key_sig; + } + } + } + get member_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set member_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get own_pub_key_sig() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set own_pub_key_sig(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + member_id?: number; + own_pub_key_sig?: Uint8Array; + }): Confirm { + const message = new Confirm({}); + if (data.member_id != null) { + message.member_id = data.member_id; + } + if (data.own_pub_key_sig != null) { + message.own_pub_key_sig = data.own_pub_key_sig; + } + return message; + } + toObject() { + const data: { + member_id?: number; + own_pub_key_sig?: Uint8Array; + } = {}; + if (this.member_id != null) { + data.member_id = this.member_id; + } + if (this.own_pub_key_sig != null) { + data.own_pub_key_sig = this.own_pub_key_sig; + } + 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.member_id != 0) + writer.writeUint64(1, this.member_id); + if (this.own_pub_key_sig.length) + writer.writeBytes(2, this.own_pub_key_sig); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Confirm { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Confirm(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.member_id = reader.readUint64(); + break; + case 2: + message.own_pub_key_sig = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Confirm { + return Confirm.deserialize(bytes); + } + } + export class Complaint extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + complainant?: number; + respondent?: number; + key_sym?: Uint8Array; + signature?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("complainant" in data && data.complainant != undefined) { + this.complainant = data.complainant; + } + if ("respondent" in data && data.respondent != undefined) { + this.respondent = data.respondent; + } + if ("key_sym" in data && data.key_sym != undefined) { + this.key_sym = data.key_sym; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + } + } + get complainant() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set complainant(value: number) { + pb_1.Message.setField(this, 1, value); + } + get respondent() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set respondent(value: number) { + pb_1.Message.setField(this, 2, value); + } + get key_sym() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set key_sym(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + complainant?: number; + respondent?: number; + key_sym?: Uint8Array; + signature?: Uint8Array; + }): Complaint { + const message = new Complaint({}); + if (data.complainant != null) { + message.complainant = data.complainant; + } + if (data.respondent != null) { + message.respondent = data.respondent; + } + if (data.key_sym != null) { + message.key_sym = data.key_sym; + } + if (data.signature != null) { + message.signature = data.signature; + } + return message; + } + toObject() { + const data: { + complainant?: number; + respondent?: number; + key_sym?: Uint8Array; + signature?: Uint8Array; + } = {}; + if (this.complainant != null) { + data.complainant = this.complainant; + } + if (this.respondent != null) { + data.respondent = this.respondent; + } + if (this.key_sym != null) { + data.key_sym = this.key_sym; + } + if (this.signature != null) { + data.signature = this.signature; + } + 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.complainant != 0) + writer.writeUint64(1, this.complainant); + if (this.respondent != 0) + writer.writeUint64(2, this.respondent); + if (this.key_sym.length) + writer.writeBytes(3, this.key_sym); + if (this.signature.length) + writer.writeBytes(4, this.signature); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Complaint { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Complaint(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.complainant = reader.readUint64(); + break; + case 2: + message.respondent = reader.readUint64(); + break; + case 3: + message.key_sym = reader.readBytes(); + break; + case 4: + message.signature = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Complaint { + return Complaint.deserialize(bytes); + } + } + export class ComplaintWithStatus extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + complaint?: Complaint; + complaint_status?: ComplaintStatus; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("complaint" in data && data.complaint != undefined) { + this.complaint = data.complaint; + } + if ("complaint_status" in data && data.complaint_status != undefined) { + this.complaint_status = data.complaint_status; + } + } + } + get complaint() { + return pb_1.Message.getWrapperField(this, Complaint, 1) as Complaint; + } + set complaint(value: Complaint) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_complaint() { + return pb_1.Message.getField(this, 1) != null; + } + get complaint_status() { + return pb_1.Message.getFieldWithDefault(this, 2, ComplaintStatus.COMPLAINT_STATUS_UNSPECIFIED) as ComplaintStatus; + } + set complaint_status(value: ComplaintStatus) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + complaint?: ReturnType; + complaint_status?: ComplaintStatus; + }): ComplaintWithStatus { + const message = new ComplaintWithStatus({}); + if (data.complaint != null) { + message.complaint = Complaint.fromObject(data.complaint); + } + if (data.complaint_status != null) { + message.complaint_status = data.complaint_status; + } + return message; + } + toObject() { + const data: { + complaint?: ReturnType; + complaint_status?: ComplaintStatus; + } = {}; + if (this.complaint != null) { + data.complaint = this.complaint.toObject(); + } + if (this.complaint_status != null) { + data.complaint_status = this.complaint_status; + } + 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_complaint) + writer.writeMessage(1, this.complaint, () => this.complaint.serialize(writer)); + if (this.complaint_status != ComplaintStatus.COMPLAINT_STATUS_UNSPECIFIED) + writer.writeEnum(2, this.complaint_status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ComplaintWithStatus { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ComplaintWithStatus(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.complaint, () => message.complaint = Complaint.deserialize(reader)); + break; + case 2: + message.complaint_status = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ComplaintWithStatus { + return ComplaintWithStatus.deserialize(bytes); + } + } + export class ComplaintsWithStatus extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + member_id?: number; + complaints_with_status?: ComplaintWithStatus[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("member_id" in data && data.member_id != undefined) { + this.member_id = data.member_id; + } + if ("complaints_with_status" in data && data.complaints_with_status != undefined) { + this.complaints_with_status = data.complaints_with_status; + } + } + } + get member_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set member_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get complaints_with_status() { + return pb_1.Message.getRepeatedWrapperField(this, ComplaintWithStatus, 2) as ComplaintWithStatus[]; + } + set complaints_with_status(value: ComplaintWithStatus[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + member_id?: number; + complaints_with_status?: ReturnType[]; + }): ComplaintsWithStatus { + const message = new ComplaintsWithStatus({}); + if (data.member_id != null) { + message.member_id = data.member_id; + } + if (data.complaints_with_status != null) { + message.complaints_with_status = data.complaints_with_status.map(item => ComplaintWithStatus.fromObject(item)); + } + return message; + } + toObject() { + const data: { + member_id?: number; + complaints_with_status?: ReturnType[]; + } = {}; + if (this.member_id != null) { + data.member_id = this.member_id; + } + if (this.complaints_with_status != null) { + data.complaints_with_status = this.complaints_with_status.map((item: ComplaintWithStatus) => item.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.member_id != 0) + writer.writeUint64(1, this.member_id); + if (this.complaints_with_status.length) + writer.writeRepeatedMessage(2, this.complaints_with_status, (item: ComplaintWithStatus) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ComplaintsWithStatus { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ComplaintsWithStatus(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.member_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.complaints_with_status, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ComplaintWithStatus.deserialize(reader), ComplaintWithStatus)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ComplaintsWithStatus { + return ComplaintsWithStatus.deserialize(bytes); + } + } + export class PendingProcessGroups extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_ids?: number[]; + }) { + 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 ("group_ids" in data && data.group_ids != undefined) { + this.group_ids = data.group_ids; + } + } + } + get group_ids() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set group_ids(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + group_ids?: number[]; + }): PendingProcessGroups { + const message = new PendingProcessGroups({}); + if (data.group_ids != null) { + message.group_ids = data.group_ids; + } + return message; + } + toObject() { + const data: { + group_ids?: number[]; + } = {}; + if (this.group_ids != null) { + data.group_ids = this.group_ids; + } + 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.group_ids.length) + writer.writePackedUint64(1, this.group_ids); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PendingProcessGroups { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PendingProcessGroups(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_ids = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PendingProcessGroups { + return PendingProcessGroups.deserialize(bytes); + } + } + export class PendingProcessSignings extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_ids?: number[]; + }) { + 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 ("signing_ids" in data && data.signing_ids != undefined) { + this.signing_ids = data.signing_ids; + } + } + } + get signing_ids() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set signing_ids(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + signing_ids?: number[]; + }): PendingProcessSignings { + const message = new PendingProcessSignings({}); + if (data.signing_ids != null) { + message.signing_ids = data.signing_ids; + } + return message; + } + toObject() { + const data: { + signing_ids?: number[]; + } = {}; + if (this.signing_ids != null) { + data.signing_ids = this.signing_ids; + } + 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.signing_ids.length) + writer.writePackedUint64(1, this.signing_ids); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PendingProcessSignings { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PendingProcessSignings(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_ids = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PendingProcessSignings { + return PendingProcessSignings.deserialize(bytes); + } + } + export class PartialSignature extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_id?: number; + signing_attempt?: number; + member_id?: number; + signature?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signing_id" in data && data.signing_id != undefined) { + this.signing_id = data.signing_id; + } + if ("signing_attempt" in data && data.signing_attempt != undefined) { + this.signing_attempt = data.signing_attempt; + } + if ("member_id" in data && data.member_id != undefined) { + this.member_id = data.member_id; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + } + } + get signing_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get signing_attempt() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set signing_attempt(value: number) { + pb_1.Message.setField(this, 2, value); + } + get member_id() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set member_id(value: number) { + pb_1.Message.setField(this, 3, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + signing_id?: number; + signing_attempt?: number; + member_id?: number; + signature?: Uint8Array; + }): PartialSignature { + const message = new PartialSignature({}); + if (data.signing_id != null) { + message.signing_id = data.signing_id; + } + if (data.signing_attempt != null) { + message.signing_attempt = data.signing_attempt; + } + if (data.member_id != null) { + message.member_id = data.member_id; + } + if (data.signature != null) { + message.signature = data.signature; + } + return message; + } + toObject() { + const data: { + signing_id?: number; + signing_attempt?: number; + member_id?: number; + signature?: Uint8Array; + } = {}; + if (this.signing_id != null) { + data.signing_id = this.signing_id; + } + if (this.signing_attempt != null) { + data.signing_attempt = this.signing_attempt; + } + if (this.member_id != null) { + data.member_id = this.member_id; + } + if (this.signature != null) { + data.signature = this.signature; + } + 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.signing_id != 0) + writer.writeUint64(1, this.signing_id); + if (this.signing_attempt != 0) + writer.writeUint64(2, this.signing_attempt); + if (this.member_id != 0) + writer.writeUint64(3, this.member_id); + if (this.signature.length) + writer.writeBytes(4, this.signature); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PartialSignature { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PartialSignature(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_id = reader.readUint64(); + break; + case 2: + message.signing_attempt = reader.readUint64(); + break; + case 3: + message.member_id = reader.readUint64(); + break; + case 4: + message.signature = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PartialSignature { + return PartialSignature.deserialize(bytes); + } + } + export class TextSignatureOrder extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + message?: Uint8Array; + }) { + 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, new Uint8Array(0)) as Uint8Array; + } + set message(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + message?: Uint8Array; + }): TextSignatureOrder { + const message = new TextSignatureOrder({}); + if (data.message != null) { + message.message = data.message; + } + return message; + } + toObject() { + const data: { + message?: Uint8Array; + } = {}; + 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.writeBytes(1, this.message); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TextSignatureOrder { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TextSignatureOrder(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.message = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TextSignatureOrder { + return TextSignatureOrder.deserialize(bytes); + } + } + export class EVMSignature extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + r_address?: Uint8Array; + signature?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("r_address" in data && data.r_address != undefined) { + this.r_address = data.r_address; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + } + } + get r_address() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set r_address(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + r_address?: Uint8Array; + signature?: Uint8Array; + }): EVMSignature { + const message = new EVMSignature({}); + if (data.r_address != null) { + message.r_address = data.r_address; + } + if (data.signature != null) { + message.signature = data.signature; + } + return message; + } + toObject() { + const data: { + r_address?: Uint8Array; + signature?: Uint8Array; + } = {}; + if (this.r_address != null) { + data.r_address = this.r_address; + } + if (this.signature != null) { + data.signature = this.signature; + } + 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.r_address.length) + writer.writeBytes(1, this.r_address); + if (this.signature.length) + writer.writeBytes(2, this.signature); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EVMSignature { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EVMSignature(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.r_address = reader.readBytes(); + break; + case 2: + message.signature = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EVMSignature { + return EVMSignature.deserialize(bytes); + } + } + export class SigningResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing?: Signing; + current_signing_attempt?: SigningAttempt; + evm_signature?: EVMSignature; + received_partial_signatures?: PartialSignature[]; + }) { + 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 ("signing" in data && data.signing != undefined) { + this.signing = data.signing; + } + if ("current_signing_attempt" in data && data.current_signing_attempt != undefined) { + this.current_signing_attempt = data.current_signing_attempt; + } + if ("evm_signature" in data && data.evm_signature != undefined) { + this.evm_signature = data.evm_signature; + } + if ("received_partial_signatures" in data && data.received_partial_signatures != undefined) { + this.received_partial_signatures = data.received_partial_signatures; + } + } + } + get signing() { + return pb_1.Message.getWrapperField(this, Signing, 1) as Signing; + } + set signing(value: Signing) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_signing() { + return pb_1.Message.getField(this, 1) != null; + } + get current_signing_attempt() { + return pb_1.Message.getWrapperField(this, SigningAttempt, 2) as SigningAttempt; + } + set current_signing_attempt(value: SigningAttempt) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_current_signing_attempt() { + return pb_1.Message.getField(this, 2) != null; + } + get evm_signature() { + return pb_1.Message.getWrapperField(this, EVMSignature, 3) as EVMSignature; + } + set evm_signature(value: EVMSignature) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_evm_signature() { + return pb_1.Message.getField(this, 3) != null; + } + get received_partial_signatures() { + return pb_1.Message.getRepeatedWrapperField(this, PartialSignature, 4) as PartialSignature[]; + } + set received_partial_signatures(value: PartialSignature[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + signing?: ReturnType; + current_signing_attempt?: ReturnType; + evm_signature?: ReturnType; + received_partial_signatures?: ReturnType[]; + }): SigningResult { + const message = new SigningResult({}); + if (data.signing != null) { + message.signing = Signing.fromObject(data.signing); + } + if (data.current_signing_attempt != null) { + message.current_signing_attempt = SigningAttempt.fromObject(data.current_signing_attempt); + } + if (data.evm_signature != null) { + message.evm_signature = EVMSignature.fromObject(data.evm_signature); + } + if (data.received_partial_signatures != null) { + message.received_partial_signatures = data.received_partial_signatures.map(item => PartialSignature.fromObject(item)); + } + return message; + } + toObject() { + const data: { + signing?: ReturnType; + current_signing_attempt?: ReturnType; + evm_signature?: ReturnType; + received_partial_signatures?: ReturnType[]; + } = {}; + if (this.signing != null) { + data.signing = this.signing.toObject(); + } + if (this.current_signing_attempt != null) { + data.current_signing_attempt = this.current_signing_attempt.toObject(); + } + if (this.evm_signature != null) { + data.evm_signature = this.evm_signature.toObject(); + } + if (this.received_partial_signatures != null) { + data.received_partial_signatures = this.received_partial_signatures.map((item: PartialSignature) => item.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_signing) + writer.writeMessage(1, this.signing, () => this.signing.serialize(writer)); + if (this.has_current_signing_attempt) + writer.writeMessage(2, this.current_signing_attempt, () => this.current_signing_attempt.serialize(writer)); + if (this.has_evm_signature) + writer.writeMessage(3, this.evm_signature, () => this.evm_signature.serialize(writer)); + if (this.received_partial_signatures.length) + writer.writeRepeatedMessage(4, this.received_partial_signatures, (item: PartialSignature) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SigningResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SigningResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signing, () => message.signing = Signing.deserialize(reader)); + break; + case 2: + reader.readMessage(message.current_signing_attempt, () => message.current_signing_attempt = SigningAttempt.deserialize(reader)); + break; + case 3: + reader.readMessage(message.evm_signature, () => message.evm_signature = EVMSignature.deserialize(reader)); + break; + case 4: + reader.readMessage(message.received_partial_signatures, () => pb_1.Message.addToRepeatedWrapperField(message, 4, PartialSignature.deserialize(reader), PartialSignature)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SigningResult { + return SigningResult.deserialize(bytes); + } + } + export class SigningExpiration extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_id?: number; + signing_attempt?: 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 ("signing_id" in data && data.signing_id != undefined) { + this.signing_id = data.signing_id; + } + if ("signing_attempt" in data && data.signing_attempt != undefined) { + this.signing_attempt = data.signing_attempt; + } + } + } + get signing_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get signing_attempt() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set signing_attempt(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + signing_id?: number; + signing_attempt?: number; + }): SigningExpiration { + const message = new SigningExpiration({}); + if (data.signing_id != null) { + message.signing_id = data.signing_id; + } + if (data.signing_attempt != null) { + message.signing_attempt = data.signing_attempt; + } + return message; + } + toObject() { + const data: { + signing_id?: number; + signing_attempt?: number; + } = {}; + if (this.signing_id != null) { + data.signing_id = this.signing_id; + } + if (this.signing_attempt != null) { + data.signing_attempt = this.signing_attempt; + } + 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.signing_id != 0) + writer.writeUint64(1, this.signing_id); + if (this.signing_attempt != 0) + writer.writeUint64(2, this.signing_attempt); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SigningExpiration { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SigningExpiration(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_id = reader.readUint64(); + break; + case 2: + message.signing_attempt = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SigningExpiration { + return SigningExpiration.deserialize(bytes); + } + } + export class SigningExpirations extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_expirations?: SigningExpiration[]; + }) { + 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 ("signing_expirations" in data && data.signing_expirations != undefined) { + this.signing_expirations = data.signing_expirations; + } + } + } + get signing_expirations() { + return pb_1.Message.getRepeatedWrapperField(this, SigningExpiration, 1) as SigningExpiration[]; + } + set signing_expirations(value: SigningExpiration[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + signing_expirations?: ReturnType[]; + }): SigningExpirations { + const message = new SigningExpirations({}); + if (data.signing_expirations != null) { + message.signing_expirations = data.signing_expirations.map(item => SigningExpiration.fromObject(item)); + } + return message; + } + toObject() { + const data: { + signing_expirations?: ReturnType[]; + } = {}; + if (this.signing_expirations != null) { + data.signing_expirations = this.signing_expirations.map((item: SigningExpiration) => item.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.signing_expirations.length) + writer.writeRepeatedMessage(1, this.signing_expirations, (item: SigningExpiration) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SigningExpirations { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SigningExpirations(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signing_expirations, () => pb_1.Message.addToRepeatedWrapperField(message, 1, SigningExpiration.deserialize(reader), SigningExpiration)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SigningExpirations { + return SigningExpirations.deserialize(bytes); + } + } +} diff --git a/proto/tss/v1beta1/tss_pb.d.ts b/codegen/band/tss/v1beta1/tss_pb.d.ts similarity index 74% rename from proto/tss/v1beta1/tss_pb.d.ts rename to codegen/band/tss/v1beta1/tss_pb.d.ts index a4762e3..f4a0cac 100644 --- a/proto/tss/v1beta1/tss_pb.d.ts +++ b/codegen/band/tss/v1beta1/tss_pb.d.ts @@ -1,15 +1,14 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/tss.proto +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/tss.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as cosmos_base_v1beta1_coin_pb from "../../cosmos/base/v1beta1/coin_pb"; -import * as cosmos_proto_cosmos_pb from "../../cosmos_proto/cosmos_pb"; export class Group extends jspb.Message { - getGroupId(): number; - setGroupId(value: number): void; + getId(): number; + setId(value: number): void; getSize(): number; setSize(value: number): void; @@ -25,17 +24,12 @@ export class Group extends jspb.Message { getStatus(): GroupStatusMap[keyof GroupStatusMap]; setStatus(value: GroupStatusMap[keyof GroupStatusMap]): void; - clearFeeList(): void; - getFeeList(): Array; - setFeeList(value: Array): void; - addFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; - - getLatestReplacementId(): number; - setLatestReplacementId(value: number): void; - getCreatedHeight(): number; setCreatedHeight(value: number): void; + getModuleOwner(): string; + setModuleOwner(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Group.AsObject; static toObject(includeInstance: boolean, msg: Group): Group.AsObject; @@ -48,68 +42,71 @@ export class Group extends jspb.Message { export namespace Group { export type AsObject = { - groupId: number, + id: number, size: number, threshold: number, pubKey: Uint8Array | string, status: GroupStatusMap[keyof GroupStatusMap], - feeList: Array, - latestReplacementId: number, createdHeight: number, + moduleOwner: string, } } -export class Replacement extends jspb.Message { - getId(): number; - setId(value: number): void; +export class GroupResult extends jspb.Message { + hasGroup(): boolean; + clearGroup(): void; + getGroup(): Group | undefined; + setGroup(value?: Group): void; - getSigningId(): number; - setSigningId(value: number): void; - - getFromGroupId(): number; - setFromGroupId(value: number): void; + getDkgContext(): Uint8Array | string; + getDkgContext_asU8(): Uint8Array; + getDkgContext_asB64(): string; + setDkgContext(value: Uint8Array | string): void; - getFromPubKey(): Uint8Array | string; - getFromPubKey_asU8(): Uint8Array; - getFromPubKey_asB64(): string; - setFromPubKey(value: Uint8Array | string): void; + clearMembersList(): void; + getMembersList(): Array; + setMembersList(value: Array): void; + addMembers(value?: Member, index?: number): Member; - getToGroupId(): number; - setToGroupId(value: number): void; + clearRound1InfosList(): void; + getRound1InfosList(): Array; + setRound1InfosList(value: Array): void; + addRound1Infos(value?: Round1Info, index?: number): Round1Info; - getToPubKey(): Uint8Array | string; - getToPubKey_asU8(): Uint8Array; - getToPubKey_asB64(): string; - setToPubKey(value: Uint8Array | string): void; + clearRound2InfosList(): void; + getRound2InfosList(): Array; + setRound2InfosList(value: Array): void; + addRound2Infos(value?: Round2Info, index?: number): Round2Info; - getStatus(): ReplacementStatusMap[keyof ReplacementStatusMap]; - setStatus(value: ReplacementStatusMap[keyof ReplacementStatusMap]): void; + clearComplaintsWithStatusList(): void; + getComplaintsWithStatusList(): Array; + setComplaintsWithStatusList(value: Array): void; + addComplaintsWithStatus(value?: ComplaintsWithStatus, index?: number): ComplaintsWithStatus; - hasExecTime(): boolean; - clearExecTime(): void; - getExecTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setExecTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + clearConfirmsList(): void; + getConfirmsList(): Array; + setConfirmsList(value: Array): void; + addConfirms(value?: Confirm, index?: number): Confirm; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Replacement.AsObject; - static toObject(includeInstance: boolean, msg: Replacement): Replacement.AsObject; + toObject(includeInstance?: boolean): GroupResult.AsObject; + static toObject(includeInstance: boolean, msg: GroupResult): GroupResult.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Replacement, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Replacement; - static deserializeBinaryFromReader(message: Replacement, reader: jspb.BinaryReader): Replacement; + static serializeBinaryToWriter(message: GroupResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupResult; + static deserializeBinaryFromReader(message: GroupResult, reader: jspb.BinaryReader): GroupResult; } -export namespace Replacement { +export namespace GroupResult { export type AsObject = { - id: number, - signingId: number, - fromGroupId: number, - fromPubKey: Uint8Array | string, - toGroupId: number, - toPubKey: Uint8Array | string, - status: ReplacementStatusMap[keyof ReplacementStatusMap], - execTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + group?: Group.AsObject, + dkgContext: Uint8Array | string, + membersList: Array, + round1InfosList: Array, + round2InfosList: Array, + complaintsWithStatusList: Array, + confirmsList: Array, } } @@ -240,8 +237,11 @@ export namespace DEQueue { } export class Signing extends jspb.Message { - getSigningId(): number; - setSigningId(value: number): void; + getId(): number; + setId(value: number): void; + + getCurrentAttempt(): number; + setCurrentAttempt(value: number): void; getGroupId(): number; setGroupId(value: number): void; @@ -251,11 +251,6 @@ export class Signing extends jspb.Message { getGroupPubKey_asB64(): string; setGroupPubKey(value: Uint8Array | string): void; - clearAssignedMembersList(): void; - getAssignedMembersList(): Array; - setAssignedMembersList(value: Array): void; - addAssignedMembers(value?: AssignedMember, index?: number): AssignedMember; - getMessage(): Uint8Array | string; getMessage_asU8(): Uint8Array; getMessage_asB64(): string; @@ -271,19 +266,16 @@ export class Signing extends jspb.Message { getSignature_asB64(): string; setSignature(value: Uint8Array | string): void; - clearFeeList(): void; - getFeeList(): Array; - setFeeList(value: Array): void; - addFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; - getStatus(): SigningStatusMap[keyof SigningStatusMap]; setStatus(value: SigningStatusMap[keyof SigningStatusMap]): void; getCreatedHeight(): number; setCreatedHeight(value: number): void; - getRequester(): string; - setRequester(value: string): void; + hasCreatedTimestamp(): boolean; + clearCreatedTimestamp(): void; + getCreatedTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreatedTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Signing.AsObject; @@ -297,17 +289,50 @@ export class Signing extends jspb.Message { export namespace Signing { export type AsObject = { - signingId: number, + id: number, + currentAttempt: number, groupId: number, groupPubKey: Uint8Array | string, - assignedMembersList: Array, message: Uint8Array | string, groupPubNonce: Uint8Array | string, signature: Uint8Array | string, - feeList: Array, status: SigningStatusMap[keyof SigningStatusMap], createdHeight: number, - requester: string, + createdTimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class SigningAttempt extends jspb.Message { + getSigningId(): number; + setSigningId(value: number): void; + + getAttempt(): number; + setAttempt(value: number): void; + + getExpiredHeight(): number; + setExpiredHeight(value: number): void; + + clearAssignedMembersList(): void; + getAssignedMembersList(): Array; + setAssignedMembersList(value: Array): void; + addAssignedMembers(value?: AssignedMember, index?: number): AssignedMember; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigningAttempt.AsObject; + static toObject(includeInstance: boolean, msg: SigningAttempt): SigningAttempt.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SigningAttempt, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SigningAttempt; + static deserializeBinaryFromReader(message: SigningAttempt, reader: jspb.BinaryReader): SigningAttempt; +} + +export namespace SigningAttempt { + export type AsObject = { + signingId: number, + attempt: number, + expiredHeight: number, + assignedMembersList: Array, } } @@ -391,6 +416,9 @@ export class Member extends jspb.Message { getId(): number; setId(value: number): void; + getGroupId(): number; + setGroupId(value: number): void; + getAddress(): string; setAddress(value: string): void; @@ -402,6 +430,9 @@ export class Member extends jspb.Message { getIsMalicious(): boolean; setIsMalicious(value: boolean): void; + getIsActive(): boolean; + setIsActive(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Member.AsObject; static toObject(includeInstance: boolean, msg: Member): Member.AsObject; @@ -415,45 +446,11 @@ export class Member extends jspb.Message { export namespace Member { export type AsObject = { id: number, + groupId: number, address: string, pubKey: Uint8Array | string, isMalicious: boolean, - } -} - -export class Status extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - getStatus(): MemberStatusMap[keyof MemberStatusMap]; - setStatus(value: MemberStatusMap[keyof MemberStatusMap]): void; - - hasSince(): boolean; - clearSince(): void; - getSince(): google_protobuf_timestamp_pb.Timestamp | undefined; - setSince(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasLastActive(): boolean; - clearLastActive(): void; - getLastActive(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastActive(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Status.AsObject; - static toObject(includeInstance: boolean, msg: Status): Status.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Status; - static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; -} - -export namespace Status { - export type AsObject = { - address: string, - status: MemberStatusMap[keyof MemberStatusMap], - since?: google_protobuf_timestamp_pb.Timestamp.AsObject, - lastActive?: google_protobuf_timestamp_pb.Timestamp.AsObject, + isActive: boolean, } } @@ -616,6 +613,12 @@ export namespace PendingProcessSignings { } export class PartialSignature extends jspb.Message { + getSigningId(): number; + setSigningId(value: number): void; + + getSigningAttempt(): number; + setSigningAttempt(value: number): void; + getMemberId(): number; setMemberId(value: number): void; @@ -636,28 +639,30 @@ export class PartialSignature extends jspb.Message { export namespace PartialSignature { export type AsObject = { + signingId: number, + signingAttempt: number, memberId: number, signature: Uint8Array | string, } } -export class TextRequestingSignature extends jspb.Message { +export class TextSignatureOrder extends jspb.Message { getMessage(): Uint8Array | string; getMessage_asU8(): Uint8Array; getMessage_asB64(): string; setMessage(value: Uint8Array | string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TextRequestingSignature.AsObject; - static toObject(includeInstance: boolean, msg: TextRequestingSignature): TextRequestingSignature.AsObject; + toObject(includeInstance?: boolean): TextSignatureOrder.AsObject; + static toObject(includeInstance: boolean, msg: TextSignatureOrder): TextSignatureOrder.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TextRequestingSignature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TextRequestingSignature; - static deserializeBinaryFromReader(message: TextRequestingSignature, reader: jspb.BinaryReader): TextRequestingSignature; + static serializeBinaryToWriter(message: TextSignatureOrder, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TextSignatureOrder; + static deserializeBinaryFromReader(message: TextSignatureOrder, reader: jspb.BinaryReader): TextSignatureOrder; } -export namespace TextRequestingSignature { +export namespace TextSignatureOrder { export type AsObject = { message: Uint8Array | string, } @@ -691,34 +696,101 @@ export namespace EVMSignature { } } -export interface ReplacementStatusMap { - REPLACEMENT_STATUS_UNSPECIFIED: 0; - REPLACEMENT_STATUS_WAITING: 1; - REPLACEMENT_STATUS_SUCCESS: 2; - REPLACEMENT_STATUS_FALLEN: 3; +export class SigningResult extends jspb.Message { + hasSigning(): boolean; + clearSigning(): void; + getSigning(): Signing | undefined; + setSigning(value?: Signing): void; + + hasCurrentSigningAttempt(): boolean; + clearCurrentSigningAttempt(): void; + getCurrentSigningAttempt(): SigningAttempt | undefined; + setCurrentSigningAttempt(value?: SigningAttempt): void; + + hasEvmSignature(): boolean; + clearEvmSignature(): void; + getEvmSignature(): EVMSignature | undefined; + setEvmSignature(value?: EVMSignature): void; + + clearReceivedPartialSignaturesList(): void; + getReceivedPartialSignaturesList(): Array; + setReceivedPartialSignaturesList(value: Array): void; + addReceivedPartialSignatures(value?: PartialSignature, index?: number): PartialSignature; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigningResult.AsObject; + static toObject(includeInstance: boolean, msg: SigningResult): SigningResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SigningResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SigningResult; + static deserializeBinaryFromReader(message: SigningResult, reader: jspb.BinaryReader): SigningResult; } -export const ReplacementStatus: ReplacementStatusMap; +export namespace SigningResult { + export type AsObject = { + signing?: Signing.AsObject, + currentSigningAttempt?: SigningAttempt.AsObject, + evmSignature?: EVMSignature.AsObject, + receivedPartialSignaturesList: Array, + } +} + +export class SigningExpiration extends jspb.Message { + getSigningId(): number; + setSigningId(value: number): void; + + getSigningAttempt(): number; + setSigningAttempt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigningExpiration.AsObject; + static toObject(includeInstance: boolean, msg: SigningExpiration): SigningExpiration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SigningExpiration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SigningExpiration; + static deserializeBinaryFromReader(message: SigningExpiration, reader: jspb.BinaryReader): SigningExpiration; +} + +export namespace SigningExpiration { + export type AsObject = { + signingId: number, + signingAttempt: number, + } +} + +export class SigningExpirations extends jspb.Message { + clearSigningExpirationsList(): void; + getSigningExpirationsList(): Array; + setSigningExpirationsList(value: Array): void; + addSigningExpirations(value?: SigningExpiration, index?: number): SigningExpiration; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigningExpirations.AsObject; + static toObject(includeInstance: boolean, msg: SigningExpirations): SigningExpirations.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SigningExpirations, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SigningExpirations; + static deserializeBinaryFromReader(message: SigningExpirations, reader: jspb.BinaryReader): SigningExpirations; +} + +export namespace SigningExpirations { + export type AsObject = { + signingExpirationsList: Array, + } +} export interface SigningStatusMap { SIGNING_STATUS_UNSPECIFIED: 0; SIGNING_STATUS_WAITING: 1; SIGNING_STATUS_SUCCESS: 2; - SIGNING_STATUS_EXPIRED: 3; - SIGNING_STATUS_FALLEN: 4; + SIGNING_STATUS_FALLEN: 3; } export const SigningStatus: SigningStatusMap; -export interface MemberStatusMap { - MEMBER_STATUS_UNSPECIFIED: 0; - MEMBER_STATUS_ACTIVE: 1; - MEMBER_STATUS_INACTIVE: 2; - MEMBER_STATUS_JAIL: 3; -} - -export const MemberStatus: MemberStatusMap; - export interface GroupStatusMap { GROUP_STATUS_UNSPECIFIED: 0; GROUP_STATUS_ROUND_1: 1; @@ -739,12 +811,3 @@ export interface ComplaintStatusMap { export const ComplaintStatus: ComplaintStatusMap; -export interface PrefixMsgTypeMap { - PREFIX_UNSPECIFIED_MSG: 0; - PREFIX_TEXT_MSG: 1; - PREFIX_REPLACE_GROUP_MSG: 2; - PREFIX_ORACLE_MSG: 3; -} - -export const PrefixMsgType: PrefixMsgTypeMap; - diff --git a/proto/tss/v1beta1/tss_pb.js b/codegen/band/tss/v1beta1/tss_pb.js similarity index 55% rename from proto/tss/v1beta1/tss_pb.js rename to codegen/band/tss/v1beta1/tss_pb.js index 956ae30..e8d676a 100644 --- a/proto/tss/v1beta1/tss_pb.js +++ b/codegen/band/tss/v1beta1/tss_pb.js @@ -1,4 +1,4 @@ -// source: tss/v1beta1/tss.proto +// source: band/tss/v1beta1/tss.proto /** * @fileoverview * @enhanceable @@ -15,40 +15,38 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); -var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); -goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js'); -goog.object.extend(proto, cosmos_proto_cosmos_pb); -goog.exportSymbol('proto.tss.v1beta1.AssignedMember', null, global); -goog.exportSymbol('proto.tss.v1beta1.Complaint', null, global); -goog.exportSymbol('proto.tss.v1beta1.ComplaintStatus', null, global); -goog.exportSymbol('proto.tss.v1beta1.ComplaintWithStatus', null, global); -goog.exportSymbol('proto.tss.v1beta1.ComplaintsWithStatus', null, global); -goog.exportSymbol('proto.tss.v1beta1.Confirm', null, global); -goog.exportSymbol('proto.tss.v1beta1.DE', null, global); -goog.exportSymbol('proto.tss.v1beta1.DEQueue', null, global); -goog.exportSymbol('proto.tss.v1beta1.EVMSignature', null, global); -goog.exportSymbol('proto.tss.v1beta1.Group', null, global); -goog.exportSymbol('proto.tss.v1beta1.GroupStatus', null, global); -goog.exportSymbol('proto.tss.v1beta1.Member', null, global); -goog.exportSymbol('proto.tss.v1beta1.MemberStatus', null, global); -goog.exportSymbol('proto.tss.v1beta1.PartialSignature', null, global); -goog.exportSymbol('proto.tss.v1beta1.PendingProcessGroups', null, global); -goog.exportSymbol('proto.tss.v1beta1.PendingProcessSignings', null, global); -goog.exportSymbol('proto.tss.v1beta1.PendingSignings', null, global); -goog.exportSymbol('proto.tss.v1beta1.PrefixMsgType', null, global); -goog.exportSymbol('proto.tss.v1beta1.Replacement', null, global); -goog.exportSymbol('proto.tss.v1beta1.ReplacementStatus', null, global); -goog.exportSymbol('proto.tss.v1beta1.Round1Info', null, global); -goog.exportSymbol('proto.tss.v1beta1.Round2Info', null, global); -goog.exportSymbol('proto.tss.v1beta1.Signing', null, global); -goog.exportSymbol('proto.tss.v1beta1.SigningStatus', null, global); -goog.exportSymbol('proto.tss.v1beta1.Status', null, global); -goog.exportSymbol('proto.tss.v1beta1.TextRequestingSignature', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.AssignedMember', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.Complaint', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.ComplaintStatus', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.ComplaintWithStatus', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.ComplaintsWithStatus', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.Confirm', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.DE', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.DEQueue', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.EVMSignature', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.Group', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.GroupResult', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.GroupStatus', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.Member', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.PartialSignature', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.PendingProcessGroups', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.PendingProcessSignings', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.PendingSignings', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.Round1Info', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.Round2Info', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.Signing', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.SigningAttempt', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.SigningExpiration', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.SigningExpirations', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.SigningResult', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.SigningStatus', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.TextSignatureOrder', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -59,16 +57,16 @@ goog.exportSymbol('proto.tss.v1beta1.TextRequestingSignature', null, global); * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.Group = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.Group.repeatedFields_, null); +proto.band.tss.v1beta1.Group = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.Group, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.Group, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.Group.displayName = 'proto.tss.v1beta1.Group'; + proto.band.tss.v1beta1.Group.displayName = 'proto.band.tss.v1beta1.Group'; } /** * Generated by JsPbCodeGenerator. @@ -80,16 +78,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.Replacement = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.band.tss.v1beta1.GroupResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.GroupResult.repeatedFields_, null); +}; +goog.inherits(proto.band.tss.v1beta1.GroupResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.GroupResult.displayName = 'proto.band.tss.v1beta1.GroupResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.Round1Info = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.Round1Info.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.Replacement, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.Round1Info, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.Replacement.displayName = 'proto.tss.v1beta1.Replacement'; + proto.band.tss.v1beta1.Round1Info.displayName = 'proto.band.tss.v1beta1.Round1Info'; } /** * Generated by JsPbCodeGenerator. @@ -101,16 +120,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.Round1Info = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.Round1Info.repeatedFields_, null); +proto.band.tss.v1beta1.Round2Info = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.Round2Info.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.Round1Info, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.Round2Info, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.Round1Info.displayName = 'proto.tss.v1beta1.Round1Info'; + proto.band.tss.v1beta1.Round2Info.displayName = 'proto.band.tss.v1beta1.Round2Info'; } /** * Generated by JsPbCodeGenerator. @@ -122,16 +141,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.Round2Info = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.Round2Info.repeatedFields_, null); +proto.band.tss.v1beta1.DE = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.Round2Info, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.DE, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.Round2Info.displayName = 'proto.tss.v1beta1.Round2Info'; + proto.band.tss.v1beta1.DE.displayName = 'proto.band.tss.v1beta1.DE'; } /** * Generated by JsPbCodeGenerator. @@ -143,16 +162,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.DE = function(opt_data) { +proto.band.tss.v1beta1.DEQueue = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.DE, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.DEQueue, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.DE.displayName = 'proto.tss.v1beta1.DE'; + proto.band.tss.v1beta1.DEQueue.displayName = 'proto.band.tss.v1beta1.DEQueue'; } /** * Generated by JsPbCodeGenerator. @@ -164,16 +183,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.DEQueue = function(opt_data) { +proto.band.tss.v1beta1.Signing = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.DEQueue, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.Signing, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.DEQueue.displayName = 'proto.tss.v1beta1.DEQueue'; + proto.band.tss.v1beta1.Signing.displayName = 'proto.band.tss.v1beta1.Signing'; } /** * Generated by JsPbCodeGenerator. @@ -185,16 +204,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.Signing = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.Signing.repeatedFields_, null); +proto.band.tss.v1beta1.SigningAttempt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.SigningAttempt.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.Signing, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.SigningAttempt, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.Signing.displayName = 'proto.tss.v1beta1.Signing'; + proto.band.tss.v1beta1.SigningAttempt.displayName = 'proto.band.tss.v1beta1.SigningAttempt'; } /** * Generated by JsPbCodeGenerator. @@ -206,16 +225,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.AssignedMember = function(opt_data) { +proto.band.tss.v1beta1.AssignedMember = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.AssignedMember, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.AssignedMember, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.AssignedMember.displayName = 'proto.tss.v1beta1.AssignedMember'; + proto.band.tss.v1beta1.AssignedMember.displayName = 'proto.band.tss.v1beta1.AssignedMember'; } /** * Generated by JsPbCodeGenerator. @@ -227,16 +246,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.PendingSignings = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.PendingSignings.repeatedFields_, null); +proto.band.tss.v1beta1.PendingSignings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.PendingSignings.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.PendingSignings, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.PendingSignings, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.PendingSignings.displayName = 'proto.tss.v1beta1.PendingSignings'; + proto.band.tss.v1beta1.PendingSignings.displayName = 'proto.band.tss.v1beta1.PendingSignings'; } /** * Generated by JsPbCodeGenerator. @@ -248,16 +267,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.Member = function(opt_data) { +proto.band.tss.v1beta1.Member = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.Member, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.Member, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.Member.displayName = 'proto.tss.v1beta1.Member'; + proto.band.tss.v1beta1.Member.displayName = 'proto.band.tss.v1beta1.Member'; } /** * Generated by JsPbCodeGenerator. @@ -269,16 +288,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.Status = function(opt_data) { +proto.band.tss.v1beta1.Confirm = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.Status, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.Confirm, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.Status.displayName = 'proto.tss.v1beta1.Status'; + proto.band.tss.v1beta1.Confirm.displayName = 'proto.band.tss.v1beta1.Confirm'; } /** * Generated by JsPbCodeGenerator. @@ -290,16 +309,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.Confirm = function(opt_data) { +proto.band.tss.v1beta1.Complaint = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.Confirm, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.Complaint, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.Confirm.displayName = 'proto.tss.v1beta1.Confirm'; + proto.band.tss.v1beta1.Complaint.displayName = 'proto.band.tss.v1beta1.Complaint'; } /** * Generated by JsPbCodeGenerator. @@ -311,16 +330,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.Complaint = function(opt_data) { +proto.band.tss.v1beta1.ComplaintWithStatus = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.Complaint, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.ComplaintWithStatus, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.Complaint.displayName = 'proto.tss.v1beta1.Complaint'; + proto.band.tss.v1beta1.ComplaintWithStatus.displayName = 'proto.band.tss.v1beta1.ComplaintWithStatus'; } /** * Generated by JsPbCodeGenerator. @@ -332,16 +351,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.ComplaintWithStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.band.tss.v1beta1.ComplaintsWithStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.ComplaintsWithStatus.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.ComplaintWithStatus, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.ComplaintsWithStatus, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.ComplaintWithStatus.displayName = 'proto.tss.v1beta1.ComplaintWithStatus'; + proto.band.tss.v1beta1.ComplaintsWithStatus.displayName = 'proto.band.tss.v1beta1.ComplaintsWithStatus'; } /** * Generated by JsPbCodeGenerator. @@ -353,16 +372,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.ComplaintsWithStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.ComplaintsWithStatus.repeatedFields_, null); +proto.band.tss.v1beta1.PendingProcessGroups = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.PendingProcessGroups.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.ComplaintsWithStatus, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.PendingProcessGroups, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.ComplaintsWithStatus.displayName = 'proto.tss.v1beta1.ComplaintsWithStatus'; + proto.band.tss.v1beta1.PendingProcessGroups.displayName = 'proto.band.tss.v1beta1.PendingProcessGroups'; } /** * Generated by JsPbCodeGenerator. @@ -374,16 +393,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.PendingProcessGroups = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.PendingProcessGroups.repeatedFields_, null); +proto.band.tss.v1beta1.PendingProcessSignings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.PendingProcessSignings.repeatedFields_, null); }; -goog.inherits(proto.tss.v1beta1.PendingProcessGroups, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.PendingProcessSignings, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.PendingProcessGroups.displayName = 'proto.tss.v1beta1.PendingProcessGroups'; + proto.band.tss.v1beta1.PendingProcessSignings.displayName = 'proto.band.tss.v1beta1.PendingProcessSignings'; } /** * Generated by JsPbCodeGenerator. @@ -395,16 +414,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.PendingProcessSignings = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.PendingProcessSignings.repeatedFields_, null); +proto.band.tss.v1beta1.PartialSignature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.PendingProcessSignings, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.PartialSignature, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.PendingProcessSignings.displayName = 'proto.tss.v1beta1.PendingProcessSignings'; + proto.band.tss.v1beta1.PartialSignature.displayName = 'proto.band.tss.v1beta1.PartialSignature'; } /** * Generated by JsPbCodeGenerator. @@ -416,16 +435,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.PartialSignature = function(opt_data) { +proto.band.tss.v1beta1.TextSignatureOrder = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.PartialSignature, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.TextSignatureOrder, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.PartialSignature.displayName = 'proto.tss.v1beta1.PartialSignature'; + proto.band.tss.v1beta1.TextSignatureOrder.displayName = 'proto.band.tss.v1beta1.TextSignatureOrder'; } /** * Generated by JsPbCodeGenerator. @@ -437,16 +456,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.TextRequestingSignature = function(opt_data) { +proto.band.tss.v1beta1.EVMSignature = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.TextRequestingSignature, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.EVMSignature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.EVMSignature.displayName = 'proto.band.tss.v1beta1.EVMSignature'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.SigningResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.SigningResult.repeatedFields_, null); +}; +goog.inherits(proto.band.tss.v1beta1.SigningResult, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.TextRequestingSignature.displayName = 'proto.tss.v1beta1.TextRequestingSignature'; + proto.band.tss.v1beta1.SigningResult.displayName = 'proto.band.tss.v1beta1.SigningResult'; } /** * Generated by JsPbCodeGenerator. @@ -458,24 +498,38 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tss.v1beta1.EVMSignature = function(opt_data) { +proto.band.tss.v1beta1.SigningExpiration = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tss.v1beta1.EVMSignature, jspb.Message); +goog.inherits(proto.band.tss.v1beta1.SigningExpiration, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tss.v1beta1.EVMSignature.displayName = 'proto.tss.v1beta1.EVMSignature'; + proto.band.tss.v1beta1.SigningExpiration.displayName = 'proto.band.tss.v1beta1.SigningExpiration'; } - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.tss.v1beta1.Group.repeatedFields_ = [6]; +proto.band.tss.v1beta1.SigningExpirations = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.SigningExpirations.repeatedFields_, null); +}; +goog.inherits(proto.band.tss.v1beta1.SigningExpirations, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.SigningExpirations.displayName = 'proto.band.tss.v1beta1.SigningExpirations'; +} @@ -492,8 +546,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.Group.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Group.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.Group.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.Group.toObject(opt_includeInstance, this); }; @@ -502,21 +556,19 @@ proto.tss.v1beta1.Group.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Group} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.Group} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Group.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.Group.toObject = function(includeInstance, msg) { var f, obj = { - groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), + id: jspb.Message.getFieldWithDefault(msg, 1, 0), size: jspb.Message.getFieldWithDefault(msg, 2, 0), threshold: jspb.Message.getFieldWithDefault(msg, 3, 0), pubKey: msg.getPubKey_asB64(), status: jspb.Message.getFieldWithDefault(msg, 5, 0), - feeList: jspb.Message.toObjectList(msg.getFeeList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), - latestReplacementId: jspb.Message.getFieldWithDefault(msg, 7, 0), - createdHeight: jspb.Message.getFieldWithDefault(msg, 8, 0) + createdHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), + moduleOwner: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { @@ -530,23 +582,23 @@ proto.tss.v1beta1.Group.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Group} + * @return {!proto.band.tss.v1beta1.Group} */ -proto.tss.v1beta1.Group.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.Group.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Group; - return proto.tss.v1beta1.Group.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.Group; + return proto.band.tss.v1beta1.Group.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.Group} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.Group} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Group} + * @return {!proto.band.tss.v1beta1.Group} */ -proto.tss.v1beta1.Group.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.Group.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -555,7 +607,7 @@ proto.tss.v1beta1.Group.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); - msg.setGroupId(value); + msg.setId(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); @@ -570,22 +622,17 @@ proto.tss.v1beta1.Group.deserializeBinaryFromReader = function(msg, reader) { msg.setPubKey(value); break; case 5: - var value = /** @type {!proto.tss.v1beta1.GroupStatus} */ (reader.readEnum()); + var value = /** @type {!proto.band.tss.v1beta1.GroupStatus} */ (reader.readEnum()); msg.setStatus(value); break; case 6: - var value = new cosmos_base_v1beta1_coin_pb.Coin; - reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.addFee(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLatestReplacementId(value); - break; - case 8: var value = /** @type {number} */ (reader.readUint64()); msg.setCreatedHeight(value); break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setModuleOwner(value); + break; default: reader.skipField(); break; @@ -599,9 +646,9 @@ proto.tss.v1beta1.Group.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.Group.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.Group.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Group.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.Group.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -609,13 +656,13 @@ proto.tss.v1beta1.Group.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Group} message + * @param {!proto.band.tss.v1beta1.Group} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Group.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.Group.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getGroupId(); + f = message.getId(); if (f !== 0) { writer.writeUint64( 1, @@ -650,25 +697,17 @@ proto.tss.v1beta1.Group.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getFeeList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter - ); - } - f = message.getLatestReplacementId(); + f = message.getCreatedHeight(); if (f !== 0) { writer.writeUint64( - 7, + 6, f ); } - f = message.getCreatedHeight(); - if (f !== 0) { - writer.writeUint64( - 8, + f = message.getModuleOwner(); + if (f.length > 0) { + writer.writeString( + 7, f ); } @@ -676,19 +715,19 @@ proto.tss.v1beta1.Group.serializeBinaryToWriter = function(message, writer) { /** - * optional uint64 group_id = 1; + * optional uint64 id = 1; * @return {number} */ -proto.tss.v1beta1.Group.prototype.getGroupId = function() { +proto.band.tss.v1beta1.Group.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Group} returns this + * @return {!proto.band.tss.v1beta1.Group} returns this */ -proto.tss.v1beta1.Group.prototype.setGroupId = function(value) { +proto.band.tss.v1beta1.Group.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -697,16 +736,16 @@ proto.tss.v1beta1.Group.prototype.setGroupId = function(value) { * optional uint64 size = 2; * @return {number} */ -proto.tss.v1beta1.Group.prototype.getSize = function() { +proto.band.tss.v1beta1.Group.prototype.getSize = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Group} returns this + * @return {!proto.band.tss.v1beta1.Group} returns this */ -proto.tss.v1beta1.Group.prototype.setSize = function(value) { +proto.band.tss.v1beta1.Group.prototype.setSize = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; @@ -715,16 +754,16 @@ proto.tss.v1beta1.Group.prototype.setSize = function(value) { * optional uint64 threshold = 3; * @return {number} */ -proto.tss.v1beta1.Group.prototype.getThreshold = function() { +proto.band.tss.v1beta1.Group.prototype.getThreshold = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Group} returns this + * @return {!proto.band.tss.v1beta1.Group} returns this */ -proto.tss.v1beta1.Group.prototype.setThreshold = function(value) { +proto.band.tss.v1beta1.Group.prototype.setThreshold = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -733,7 +772,7 @@ proto.tss.v1beta1.Group.prototype.setThreshold = function(value) { * optional bytes pub_key = 4; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Group.prototype.getPubKey = function() { +proto.band.tss.v1beta1.Group.prototype.getPubKey = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; @@ -743,7 +782,7 @@ proto.tss.v1beta1.Group.prototype.getPubKey = function() { * This is a type-conversion wrapper around `getPubKey()` * @return {string} */ -proto.tss.v1beta1.Group.prototype.getPubKey_asB64 = function() { +proto.band.tss.v1beta1.Group.prototype.getPubKey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPubKey())); }; @@ -756,7 +795,7 @@ proto.tss.v1beta1.Group.prototype.getPubKey_asB64 = function() { * This is a type-conversion wrapper around `getPubKey()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Group.prototype.getPubKey_asU8 = function() { +proto.band.tss.v1beta1.Group.prototype.getPubKey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPubKey())); }; @@ -764,105 +803,74 @@ proto.tss.v1beta1.Group.prototype.getPubKey_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Group} returns this + * @return {!proto.band.tss.v1beta1.Group} returns this */ -proto.tss.v1beta1.Group.prototype.setPubKey = function(value) { +proto.band.tss.v1beta1.Group.prototype.setPubKey = function(value) { return jspb.Message.setProto3BytesField(this, 4, value); }; /** * optional GroupStatus status = 5; - * @return {!proto.tss.v1beta1.GroupStatus} + * @return {!proto.band.tss.v1beta1.GroupStatus} */ -proto.tss.v1beta1.Group.prototype.getStatus = function() { - return /** @type {!proto.tss.v1beta1.GroupStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.band.tss.v1beta1.Group.prototype.getStatus = function() { + return /** @type {!proto.band.tss.v1beta1.GroupStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * @param {!proto.tss.v1beta1.GroupStatus} value - * @return {!proto.tss.v1beta1.Group} returns this + * @param {!proto.band.tss.v1beta1.GroupStatus} value + * @return {!proto.band.tss.v1beta1.Group} returns this */ -proto.tss.v1beta1.Group.prototype.setStatus = function(value) { +proto.band.tss.v1beta1.Group.prototype.setStatus = function(value) { return jspb.Message.setProto3EnumField(this, 5, value); }; /** - * repeated cosmos.base.v1beta1.Coin fee = 6; - * @return {!Array} - */ -proto.tss.v1beta1.Group.prototype.getFeeList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.Group} returns this -*/ -proto.tss.v1beta1.Group.prototype.setFeeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); -}; - - -/** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} + * optional uint64 created_height = 6; + * @return {number} */ -proto.tss.v1beta1.Group.prototype.addFee = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +proto.band.tss.v1beta1.Group.prototype.getCreatedHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.Group} returns this + * @param {number} value + * @return {!proto.band.tss.v1beta1.Group} returns this */ -proto.tss.v1beta1.Group.prototype.clearFeeList = function() { - return this.setFeeList([]); +proto.band.tss.v1beta1.Group.prototype.setCreatedHeight = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional uint64 latest_replacement_id = 7; - * @return {number} + * optional string module_owner = 7; + * @return {string} */ -proto.tss.v1beta1.Group.prototype.getLatestReplacementId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.band.tss.v1beta1.Group.prototype.getModuleOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * @param {number} value - * @return {!proto.tss.v1beta1.Group} returns this + * @param {string} value + * @return {!proto.band.tss.v1beta1.Group} returns this */ -proto.tss.v1beta1.Group.prototype.setLatestReplacementId = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.band.tss.v1beta1.Group.prototype.setModuleOwner = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); }; -/** - * optional uint64 created_height = 8; - * @return {number} - */ -proto.tss.v1beta1.Group.prototype.getCreatedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - /** - * @param {number} value - * @return {!proto.tss.v1beta1.Group} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.tss.v1beta1.Group.prototype.setCreatedHeight = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - +proto.band.tss.v1beta1.GroupResult.repeatedFields_ = [3,4,5,6,7]; @@ -879,8 +887,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.Replacement.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Replacement.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.GroupResult.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.GroupResult.toObject(opt_includeInstance, this); }; @@ -889,20 +897,24 @@ proto.tss.v1beta1.Replacement.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Replacement} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.GroupResult} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Replacement.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.GroupResult.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - signingId: jspb.Message.getFieldWithDefault(msg, 2, 0), - fromGroupId: jspb.Message.getFieldWithDefault(msg, 3, 0), - fromPubKey: msg.getFromPubKey_asB64(), - toGroupId: jspb.Message.getFieldWithDefault(msg, 5, 0), - toPubKey: msg.getToPubKey_asB64(), - status: jspb.Message.getFieldWithDefault(msg, 7, 0), - execTime: (f = msg.getExecTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + group: (f = msg.getGroup()) && proto.band.tss.v1beta1.Group.toObject(includeInstance, f), + dkgContext: msg.getDkgContext_asB64(), + membersList: jspb.Message.toObjectList(msg.getMembersList(), + proto.band.tss.v1beta1.Member.toObject, includeInstance), + round1InfosList: jspb.Message.toObjectList(msg.getRound1InfosList(), + proto.band.tss.v1beta1.Round1Info.toObject, includeInstance), + round2InfosList: jspb.Message.toObjectList(msg.getRound2InfosList(), + proto.band.tss.v1beta1.Round2Info.toObject, includeInstance), + complaintsWithStatusList: jspb.Message.toObjectList(msg.getComplaintsWithStatusList(), + proto.band.tss.v1beta1.ComplaintsWithStatus.toObject, includeInstance), + confirmsList: jspb.Message.toObjectList(msg.getConfirmsList(), + proto.band.tss.v1beta1.Confirm.toObject, includeInstance) }; if (includeInstance) { @@ -916,23 +928,23 @@ proto.tss.v1beta1.Replacement.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Replacement} + * @return {!proto.band.tss.v1beta1.GroupResult} */ -proto.tss.v1beta1.Replacement.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.GroupResult.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Replacement; - return proto.tss.v1beta1.Replacement.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.GroupResult; + return proto.band.tss.v1beta1.GroupResult.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.Replacement} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.GroupResult} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Replacement} + * @return {!proto.band.tss.v1beta1.GroupResult} */ -proto.tss.v1beta1.Replacement.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.GroupResult.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -940,37 +952,38 @@ proto.tss.v1beta1.Replacement.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); + var value = new proto.band.tss.v1beta1.Group; + reader.readMessage(value,proto.band.tss.v1beta1.Group.deserializeBinaryFromReader); + msg.setGroup(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSigningId(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDkgContext(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFromGroupId(value); + var value = new proto.band.tss.v1beta1.Member; + reader.readMessage(value,proto.band.tss.v1beta1.Member.deserializeBinaryFromReader); + msg.addMembers(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFromPubKey(value); + var value = new proto.band.tss.v1beta1.Round1Info; + reader.readMessage(value,proto.band.tss.v1beta1.Round1Info.deserializeBinaryFromReader); + msg.addRound1Infos(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setToGroupId(value); + var value = new proto.band.tss.v1beta1.Round2Info; + reader.readMessage(value,proto.band.tss.v1beta1.Round2Info.deserializeBinaryFromReader); + msg.addRound2Infos(value); break; case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToPubKey(value); + var value = new proto.band.tss.v1beta1.ComplaintsWithStatus; + reader.readMessage(value,proto.band.tss.v1beta1.ComplaintsWithStatus.deserializeBinaryFromReader); + msg.addComplaintsWithStatus(value); break; case 7: - var value = /** @type {!proto.tss.v1beta1.ReplacementStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 8: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setExecTime(value); + var value = new proto.band.tss.v1beta1.Confirm; + reader.readMessage(value,proto.band.tss.v1beta1.Confirm.deserializeBinaryFromReader); + msg.addConfirms(value); break; default: reader.skipField(); @@ -985,9 +998,9 @@ proto.tss.v1beta1.Replacement.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.Replacement.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.GroupResult.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Replacement.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.GroupResult.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -995,298 +1008,354 @@ proto.tss.v1beta1.Replacement.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Replacement} message + * @param {!proto.band.tss.v1beta1.GroupResult} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Replacement.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.GroupResult.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( + f = message.getGroup(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.band.tss.v1beta1.Group.serializeBinaryToWriter ); } - f = message.getSigningId(); - if (f !== 0) { - writer.writeUint64( + f = message.getDkgContext_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, f ); } - f = message.getFromGroupId(); - if (f !== 0) { - writer.writeUint64( + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 3, - f + f, + proto.band.tss.v1beta1.Member.serializeBinaryToWriter ); } - f = message.getFromPubKey_asU8(); + f = message.getRound1InfosList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 4, - f + f, + proto.band.tss.v1beta1.Round1Info.serializeBinaryToWriter ); } - f = message.getToGroupId(); - if (f !== 0) { - writer.writeUint64( + f = message.getRound2InfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 5, - f + f, + proto.band.tss.v1beta1.Round2Info.serializeBinaryToWriter ); } - f = message.getToPubKey_asU8(); + f = message.getComplaintsWithStatusList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 6, - f + f, + proto.band.tss.v1beta1.ComplaintsWithStatus.serializeBinaryToWriter ); } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getConfirmsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 7, - f - ); - } - f = message.getExecTime(); - if (f != null) { - writer.writeMessage( - 8, f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + proto.band.tss.v1beta1.Confirm.serializeBinaryToWriter ); } }; /** - * optional uint64 id = 1; - * @return {number} - */ -proto.tss.v1beta1.Replacement.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.Replacement} returns this - */ -proto.tss.v1beta1.Replacement.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 signing_id = 2; - * @return {number} + * optional Group group = 1; + * @return {?proto.band.tss.v1beta1.Group} */ -proto.tss.v1beta1.Replacement.prototype.getSigningId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.band.tss.v1beta1.GroupResult.prototype.getGroup = function() { + return /** @type{?proto.band.tss.v1beta1.Group} */ ( + jspb.Message.getWrapperField(this, proto.band.tss.v1beta1.Group, 1)); }; /** - * @param {number} value - * @return {!proto.tss.v1beta1.Replacement} returns this - */ -proto.tss.v1beta1.Replacement.prototype.setSigningId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + * @param {?proto.band.tss.v1beta1.Group|undefined} value + * @return {!proto.band.tss.v1beta1.GroupResult} returns this +*/ +proto.band.tss.v1beta1.GroupResult.prototype.setGroup = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * optional uint64 from_group_id = 3; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.GroupResult} returns this */ -proto.tss.v1beta1.Replacement.prototype.getFromGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.band.tss.v1beta1.GroupResult.prototype.clearGroup = function() { + return this.setGroup(undefined); }; /** - * @param {number} value - * @return {!proto.tss.v1beta1.Replacement} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.tss.v1beta1.Replacement.prototype.setFromGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.band.tss.v1beta1.GroupResult.prototype.hasGroup = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes from_pub_key = 4; + * optional bytes dkg_context = 2; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Replacement.prototype.getFromPubKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.band.tss.v1beta1.GroupResult.prototype.getDkgContext = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes from_pub_key = 4; - * This is a type-conversion wrapper around `getFromPubKey()` + * optional bytes dkg_context = 2; + * This is a type-conversion wrapper around `getDkgContext()` * @return {string} */ -proto.tss.v1beta1.Replacement.prototype.getFromPubKey_asB64 = function() { +proto.band.tss.v1beta1.GroupResult.prototype.getDkgContext_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFromPubKey())); + this.getDkgContext())); }; /** - * optional bytes from_pub_key = 4; + * optional bytes dkg_context = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFromPubKey()` + * This is a type-conversion wrapper around `getDkgContext()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Replacement.prototype.getFromPubKey_asU8 = function() { +proto.band.tss.v1beta1.GroupResult.prototype.getDkgContext_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFromPubKey())); + this.getDkgContext())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Replacement} returns this + * @return {!proto.band.tss.v1beta1.GroupResult} returns this */ -proto.tss.v1beta1.Replacement.prototype.setFromPubKey = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.band.tss.v1beta1.GroupResult.prototype.setDkgContext = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional uint64 to_group_id = 5; - * @return {number} + * repeated Member members = 3; + * @return {!Array} */ -proto.tss.v1beta1.Replacement.prototype.getToGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.band.tss.v1beta1.GroupResult.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.Member, 3)); }; /** - * @param {number} value - * @return {!proto.tss.v1beta1.Replacement} returns this - */ -proto.tss.v1beta1.Replacement.prototype.setToGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.GroupResult} returns this +*/ +proto.band.tss.v1beta1.GroupResult.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * optional bytes to_pub_key = 6; - * @return {!(string|Uint8Array)} + * @param {!proto.band.tss.v1beta1.Member=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.Member} */ -proto.tss.v1beta1.Replacement.prototype.getToPubKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.band.tss.v1beta1.GroupResult.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.tss.v1beta1.Member, opt_index); }; /** - * optional bytes to_pub_key = 6; - * This is a type-conversion wrapper around `getToPubKey()` - * @return {string} + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.GroupResult} returns this */ -proto.tss.v1beta1.Replacement.prototype.getToPubKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToPubKey())); +proto.band.tss.v1beta1.GroupResult.prototype.clearMembersList = function() { + return this.setMembersList([]); }; /** - * optional bytes to_pub_key = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToPubKey()` - * @return {!Uint8Array} + * repeated Round1Info round1_infos = 4; + * @return {!Array} */ -proto.tss.v1beta1.Replacement.prototype.getToPubKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToPubKey())); +proto.band.tss.v1beta1.GroupResult.prototype.getRound1InfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.Round1Info, 4)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Replacement} returns this - */ -proto.tss.v1beta1.Replacement.prototype.setToPubKey = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.GroupResult} returns this +*/ +proto.band.tss.v1beta1.GroupResult.prototype.setRound1InfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * optional ReplacementStatus status = 7; - * @return {!proto.tss.v1beta1.ReplacementStatus} + * @param {!proto.band.tss.v1beta1.Round1Info=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.Round1Info} */ -proto.tss.v1beta1.Replacement.prototype.getStatus = function() { - return /** @type {!proto.tss.v1beta1.ReplacementStatus} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.band.tss.v1beta1.GroupResult.prototype.addRound1Infos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.band.tss.v1beta1.Round1Info, opt_index); }; /** - * @param {!proto.tss.v1beta1.ReplacementStatus} value - * @return {!proto.tss.v1beta1.Replacement} returns this + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.GroupResult} returns this */ -proto.tss.v1beta1.Replacement.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); +proto.band.tss.v1beta1.GroupResult.prototype.clearRound1InfosList = function() { + return this.setRound1InfosList([]); }; /** - * optional google.protobuf.Timestamp exec_time = 8; - * @return {?proto.google.protobuf.Timestamp} + * repeated Round2Info round2_infos = 5; + * @return {!Array} */ -proto.tss.v1beta1.Replacement.prototype.getExecTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); +proto.band.tss.v1beta1.GroupResult.prototype.getRound2InfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.Round2Info, 5)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.tss.v1beta1.Replacement} returns this + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.GroupResult} returns this */ -proto.tss.v1beta1.Replacement.prototype.setExecTime = function(value) { - return jspb.Message.setWrapperField(this, 8, value); +proto.band.tss.v1beta1.GroupResult.prototype.setRound2InfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.Replacement} returns this + * @param {!proto.band.tss.v1beta1.Round2Info=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.Round2Info} */ -proto.tss.v1beta1.Replacement.prototype.clearExecTime = function() { - return this.setExecTime(undefined); +proto.band.tss.v1beta1.GroupResult.prototype.addRound2Infos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.band.tss.v1beta1.Round2Info, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.GroupResult} returns this */ -proto.tss.v1beta1.Replacement.prototype.hasExecTime = function() { - return jspb.Message.getField(this, 8) != null; +proto.band.tss.v1beta1.GroupResult.prototype.clearRound2InfosList = function() { + return this.setRound2InfosList([]); }; - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * repeated ComplaintsWithStatus complaints_with_status = 6; + * @return {!Array} */ -proto.tss.v1beta1.Round1Info.repeatedFields_ = [2]; - +proto.band.tss.v1beta1.GroupResult.prototype.getComplaintsWithStatusList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.ComplaintsWithStatus, 6)); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.GroupResult} returns this +*/ +proto.band.tss.v1beta1.GroupResult.prototype.setComplaintsWithStatusList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.ComplaintsWithStatus=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.ComplaintsWithStatus} + */ +proto.band.tss.v1beta1.GroupResult.prototype.addComplaintsWithStatus = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.band.tss.v1beta1.ComplaintsWithStatus, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.GroupResult} returns this + */ +proto.band.tss.v1beta1.GroupResult.prototype.clearComplaintsWithStatusList = function() { + return this.setComplaintsWithStatusList([]); +}; + + +/** + * repeated Confirm confirms = 7; + * @return {!Array} + */ +proto.band.tss.v1beta1.GroupResult.prototype.getConfirmsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.Confirm, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.GroupResult} returns this +*/ +proto.band.tss.v1beta1.GroupResult.prototype.setConfirmsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.Confirm=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.Confirm} + */ +proto.band.tss.v1beta1.GroupResult.prototype.addConfirms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.band.tss.v1beta1.Confirm, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.GroupResult} returns this + */ +proto.band.tss.v1beta1.GroupResult.prototype.clearConfirmsList = function() { + return this.setConfirmsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tss.v1beta1.Round1Info.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. @@ -1295,8 +1364,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.Round1Info.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Round1Info.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.Round1Info.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.Round1Info.toObject(opt_includeInstance, this); }; @@ -1305,11 +1374,11 @@ proto.tss.v1beta1.Round1Info.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Round1Info} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.Round1Info} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Round1Info.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.Round1Info.toObject = function(includeInstance, msg) { var f, obj = { memberId: jspb.Message.getFieldWithDefault(msg, 1, 0), coefficientCommitsList: msg.getCoefficientCommitsList_asB64(), @@ -1329,23 +1398,23 @@ proto.tss.v1beta1.Round1Info.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Round1Info} + * @return {!proto.band.tss.v1beta1.Round1Info} */ -proto.tss.v1beta1.Round1Info.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.Round1Info.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Round1Info; - return proto.tss.v1beta1.Round1Info.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.Round1Info; + return proto.band.tss.v1beta1.Round1Info.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.Round1Info} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.Round1Info} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Round1Info} + * @return {!proto.band.tss.v1beta1.Round1Info} */ -proto.tss.v1beta1.Round1Info.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.Round1Info.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1385,9 +1454,9 @@ proto.tss.v1beta1.Round1Info.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.Round1Info.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.Round1Info.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Round1Info.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.Round1Info.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1395,11 +1464,11 @@ proto.tss.v1beta1.Round1Info.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Round1Info} message + * @param {!proto.band.tss.v1beta1.Round1Info} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Round1Info.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.Round1Info.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMemberId(); if (f !== 0) { @@ -1443,16 +1512,16 @@ proto.tss.v1beta1.Round1Info.serializeBinaryToWriter = function(message, writer) * optional uint64 member_id = 1; * @return {number} */ -proto.tss.v1beta1.Round1Info.prototype.getMemberId = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getMemberId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Round1Info} returns this + * @return {!proto.band.tss.v1beta1.Round1Info} returns this */ -proto.tss.v1beta1.Round1Info.prototype.setMemberId = function(value) { +proto.band.tss.v1beta1.Round1Info.prototype.setMemberId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1461,7 +1530,7 @@ proto.tss.v1beta1.Round1Info.prototype.setMemberId = function(value) { * repeated bytes coefficient_commits = 2; * @return {!(Array|Array)} */ -proto.tss.v1beta1.Round1Info.prototype.getCoefficientCommitsList = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getCoefficientCommitsList = function() { return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); }; @@ -1471,7 +1540,7 @@ proto.tss.v1beta1.Round1Info.prototype.getCoefficientCommitsList = function() { * This is a type-conversion wrapper around `getCoefficientCommitsList()` * @return {!Array} */ -proto.tss.v1beta1.Round1Info.prototype.getCoefficientCommitsList_asB64 = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getCoefficientCommitsList_asB64 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsB64( this.getCoefficientCommitsList())); }; @@ -1484,7 +1553,7 @@ proto.tss.v1beta1.Round1Info.prototype.getCoefficientCommitsList_asB64 = functio * This is a type-conversion wrapper around `getCoefficientCommitsList()` * @return {!Array} */ -proto.tss.v1beta1.Round1Info.prototype.getCoefficientCommitsList_asU8 = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getCoefficientCommitsList_asU8 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsU8( this.getCoefficientCommitsList())); }; @@ -1492,9 +1561,9 @@ proto.tss.v1beta1.Round1Info.prototype.getCoefficientCommitsList_asU8 = function /** * @param {!(Array|Array)} value - * @return {!proto.tss.v1beta1.Round1Info} returns this + * @return {!proto.band.tss.v1beta1.Round1Info} returns this */ -proto.tss.v1beta1.Round1Info.prototype.setCoefficientCommitsList = function(value) { +proto.band.tss.v1beta1.Round1Info.prototype.setCoefficientCommitsList = function(value) { return jspb.Message.setField(this, 2, value || []); }; @@ -1502,18 +1571,18 @@ proto.tss.v1beta1.Round1Info.prototype.setCoefficientCommitsList = function(valu /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Round1Info} returns this + * @return {!proto.band.tss.v1beta1.Round1Info} returns this */ -proto.tss.v1beta1.Round1Info.prototype.addCoefficientCommits = function(value, opt_index) { +proto.band.tss.v1beta1.Round1Info.prototype.addCoefficientCommits = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.Round1Info} returns this + * @return {!proto.band.tss.v1beta1.Round1Info} returns this */ -proto.tss.v1beta1.Round1Info.prototype.clearCoefficientCommitsList = function() { +proto.band.tss.v1beta1.Round1Info.prototype.clearCoefficientCommitsList = function() { return this.setCoefficientCommitsList([]); }; @@ -1522,7 +1591,7 @@ proto.tss.v1beta1.Round1Info.prototype.clearCoefficientCommitsList = function() * optional bytes one_time_pub_key = 3; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Round1Info.prototype.getOneTimePubKey = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getOneTimePubKey = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -1532,7 +1601,7 @@ proto.tss.v1beta1.Round1Info.prototype.getOneTimePubKey = function() { * This is a type-conversion wrapper around `getOneTimePubKey()` * @return {string} */ -proto.tss.v1beta1.Round1Info.prototype.getOneTimePubKey_asB64 = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getOneTimePubKey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOneTimePubKey())); }; @@ -1545,7 +1614,7 @@ proto.tss.v1beta1.Round1Info.prototype.getOneTimePubKey_asB64 = function() { * This is a type-conversion wrapper around `getOneTimePubKey()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Round1Info.prototype.getOneTimePubKey_asU8 = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getOneTimePubKey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOneTimePubKey())); }; @@ -1553,9 +1622,9 @@ proto.tss.v1beta1.Round1Info.prototype.getOneTimePubKey_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Round1Info} returns this + * @return {!proto.band.tss.v1beta1.Round1Info} returns this */ -proto.tss.v1beta1.Round1Info.prototype.setOneTimePubKey = function(value) { +proto.band.tss.v1beta1.Round1Info.prototype.setOneTimePubKey = function(value) { return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -1564,7 +1633,7 @@ proto.tss.v1beta1.Round1Info.prototype.setOneTimePubKey = function(value) { * optional bytes a0_signature = 4; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Round1Info.prototype.getA0Signature = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getA0Signature = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; @@ -1574,7 +1643,7 @@ proto.tss.v1beta1.Round1Info.prototype.getA0Signature = function() { * This is a type-conversion wrapper around `getA0Signature()` * @return {string} */ -proto.tss.v1beta1.Round1Info.prototype.getA0Signature_asB64 = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getA0Signature_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getA0Signature())); }; @@ -1587,7 +1656,7 @@ proto.tss.v1beta1.Round1Info.prototype.getA0Signature_asB64 = function() { * This is a type-conversion wrapper around `getA0Signature()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Round1Info.prototype.getA0Signature_asU8 = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getA0Signature_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getA0Signature())); }; @@ -1595,9 +1664,9 @@ proto.tss.v1beta1.Round1Info.prototype.getA0Signature_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Round1Info} returns this + * @return {!proto.band.tss.v1beta1.Round1Info} returns this */ -proto.tss.v1beta1.Round1Info.prototype.setA0Signature = function(value) { +proto.band.tss.v1beta1.Round1Info.prototype.setA0Signature = function(value) { return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -1606,7 +1675,7 @@ proto.tss.v1beta1.Round1Info.prototype.setA0Signature = function(value) { * optional bytes one_time_signature = 5; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Round1Info.prototype.getOneTimeSignature = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getOneTimeSignature = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; @@ -1616,7 +1685,7 @@ proto.tss.v1beta1.Round1Info.prototype.getOneTimeSignature = function() { * This is a type-conversion wrapper around `getOneTimeSignature()` * @return {string} */ -proto.tss.v1beta1.Round1Info.prototype.getOneTimeSignature_asB64 = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getOneTimeSignature_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOneTimeSignature())); }; @@ -1629,7 +1698,7 @@ proto.tss.v1beta1.Round1Info.prototype.getOneTimeSignature_asB64 = function() { * This is a type-conversion wrapper around `getOneTimeSignature()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Round1Info.prototype.getOneTimeSignature_asU8 = function() { +proto.band.tss.v1beta1.Round1Info.prototype.getOneTimeSignature_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOneTimeSignature())); }; @@ -1637,9 +1706,9 @@ proto.tss.v1beta1.Round1Info.prototype.getOneTimeSignature_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Round1Info} returns this + * @return {!proto.band.tss.v1beta1.Round1Info} returns this */ -proto.tss.v1beta1.Round1Info.prototype.setOneTimeSignature = function(value) { +proto.band.tss.v1beta1.Round1Info.prototype.setOneTimeSignature = function(value) { return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -1650,7 +1719,7 @@ proto.tss.v1beta1.Round1Info.prototype.setOneTimeSignature = function(value) { * @private {!Array} * @const */ -proto.tss.v1beta1.Round2Info.repeatedFields_ = [2]; +proto.band.tss.v1beta1.Round2Info.repeatedFields_ = [2]; @@ -1667,8 +1736,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.Round2Info.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Round2Info.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.Round2Info.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.Round2Info.toObject(opt_includeInstance, this); }; @@ -1677,11 +1746,11 @@ proto.tss.v1beta1.Round2Info.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Round2Info} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.Round2Info} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Round2Info.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.Round2Info.toObject = function(includeInstance, msg) { var f, obj = { memberId: jspb.Message.getFieldWithDefault(msg, 1, 0), encryptedSecretSharesList: msg.getEncryptedSecretSharesList_asB64() @@ -1698,23 +1767,23 @@ proto.tss.v1beta1.Round2Info.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Round2Info} + * @return {!proto.band.tss.v1beta1.Round2Info} */ -proto.tss.v1beta1.Round2Info.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.Round2Info.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Round2Info; - return proto.tss.v1beta1.Round2Info.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.Round2Info; + return proto.band.tss.v1beta1.Round2Info.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.Round2Info} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.Round2Info} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Round2Info} + * @return {!proto.band.tss.v1beta1.Round2Info} */ -proto.tss.v1beta1.Round2Info.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.Round2Info.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1742,9 +1811,9 @@ proto.tss.v1beta1.Round2Info.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.Round2Info.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.Round2Info.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Round2Info.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.Round2Info.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1752,11 +1821,11 @@ proto.tss.v1beta1.Round2Info.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Round2Info} message + * @param {!proto.band.tss.v1beta1.Round2Info} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Round2Info.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.Round2Info.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMemberId(); if (f !== 0) { @@ -1779,16 +1848,16 @@ proto.tss.v1beta1.Round2Info.serializeBinaryToWriter = function(message, writer) * optional uint64 member_id = 1; * @return {number} */ -proto.tss.v1beta1.Round2Info.prototype.getMemberId = function() { +proto.band.tss.v1beta1.Round2Info.prototype.getMemberId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Round2Info} returns this + * @return {!proto.band.tss.v1beta1.Round2Info} returns this */ -proto.tss.v1beta1.Round2Info.prototype.setMemberId = function(value) { +proto.band.tss.v1beta1.Round2Info.prototype.setMemberId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1797,7 +1866,7 @@ proto.tss.v1beta1.Round2Info.prototype.setMemberId = function(value) { * repeated bytes encrypted_secret_shares = 2; * @return {!(Array|Array)} */ -proto.tss.v1beta1.Round2Info.prototype.getEncryptedSecretSharesList = function() { +proto.band.tss.v1beta1.Round2Info.prototype.getEncryptedSecretSharesList = function() { return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); }; @@ -1807,7 +1876,7 @@ proto.tss.v1beta1.Round2Info.prototype.getEncryptedSecretSharesList = function() * This is a type-conversion wrapper around `getEncryptedSecretSharesList()` * @return {!Array} */ -proto.tss.v1beta1.Round2Info.prototype.getEncryptedSecretSharesList_asB64 = function() { +proto.band.tss.v1beta1.Round2Info.prototype.getEncryptedSecretSharesList_asB64 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsB64( this.getEncryptedSecretSharesList())); }; @@ -1820,7 +1889,7 @@ proto.tss.v1beta1.Round2Info.prototype.getEncryptedSecretSharesList_asB64 = func * This is a type-conversion wrapper around `getEncryptedSecretSharesList()` * @return {!Array} */ -proto.tss.v1beta1.Round2Info.prototype.getEncryptedSecretSharesList_asU8 = function() { +proto.band.tss.v1beta1.Round2Info.prototype.getEncryptedSecretSharesList_asU8 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsU8( this.getEncryptedSecretSharesList())); }; @@ -1828,9 +1897,9 @@ proto.tss.v1beta1.Round2Info.prototype.getEncryptedSecretSharesList_asU8 = funct /** * @param {!(Array|Array)} value - * @return {!proto.tss.v1beta1.Round2Info} returns this + * @return {!proto.band.tss.v1beta1.Round2Info} returns this */ -proto.tss.v1beta1.Round2Info.prototype.setEncryptedSecretSharesList = function(value) { +proto.band.tss.v1beta1.Round2Info.prototype.setEncryptedSecretSharesList = function(value) { return jspb.Message.setField(this, 2, value || []); }; @@ -1838,18 +1907,18 @@ proto.tss.v1beta1.Round2Info.prototype.setEncryptedSecretSharesList = function(v /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Round2Info} returns this + * @return {!proto.band.tss.v1beta1.Round2Info} returns this */ -proto.tss.v1beta1.Round2Info.prototype.addEncryptedSecretShares = function(value, opt_index) { +proto.band.tss.v1beta1.Round2Info.prototype.addEncryptedSecretShares = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.Round2Info} returns this + * @return {!proto.band.tss.v1beta1.Round2Info} returns this */ -proto.tss.v1beta1.Round2Info.prototype.clearEncryptedSecretSharesList = function() { +proto.band.tss.v1beta1.Round2Info.prototype.clearEncryptedSecretSharesList = function() { return this.setEncryptedSecretSharesList([]); }; @@ -1870,8 +1939,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.DE.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.DE.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.DE.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.DE.toObject(opt_includeInstance, this); }; @@ -1880,11 +1949,11 @@ proto.tss.v1beta1.DE.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.DE} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.DE} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.DE.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.DE.toObject = function(includeInstance, msg) { var f, obj = { pubD: msg.getPubD_asB64(), pubE: msg.getPubE_asB64() @@ -1901,23 +1970,23 @@ proto.tss.v1beta1.DE.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.DE} + * @return {!proto.band.tss.v1beta1.DE} */ -proto.tss.v1beta1.DE.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.DE.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.DE; - return proto.tss.v1beta1.DE.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.DE; + return proto.band.tss.v1beta1.DE.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.DE} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.DE} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.DE} + * @return {!proto.band.tss.v1beta1.DE} */ -proto.tss.v1beta1.DE.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.DE.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1945,9 +2014,9 @@ proto.tss.v1beta1.DE.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.DE.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.DE.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.DE.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.DE.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1955,11 +2024,11 @@ proto.tss.v1beta1.DE.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.DE} message + * @param {!proto.band.tss.v1beta1.DE} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.DE.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.DE.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPubD_asU8(); if (f.length > 0) { @@ -1982,7 +2051,7 @@ proto.tss.v1beta1.DE.serializeBinaryToWriter = function(message, writer) { * optional bytes pub_d = 1; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.DE.prototype.getPubD = function() { +proto.band.tss.v1beta1.DE.prototype.getPubD = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -1992,7 +2061,7 @@ proto.tss.v1beta1.DE.prototype.getPubD = function() { * This is a type-conversion wrapper around `getPubD()` * @return {string} */ -proto.tss.v1beta1.DE.prototype.getPubD_asB64 = function() { +proto.band.tss.v1beta1.DE.prototype.getPubD_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPubD())); }; @@ -2005,7 +2074,7 @@ proto.tss.v1beta1.DE.prototype.getPubD_asB64 = function() { * This is a type-conversion wrapper around `getPubD()` * @return {!Uint8Array} */ -proto.tss.v1beta1.DE.prototype.getPubD_asU8 = function() { +proto.band.tss.v1beta1.DE.prototype.getPubD_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPubD())); }; @@ -2013,9 +2082,9 @@ proto.tss.v1beta1.DE.prototype.getPubD_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.DE} returns this + * @return {!proto.band.tss.v1beta1.DE} returns this */ -proto.tss.v1beta1.DE.prototype.setPubD = function(value) { +proto.band.tss.v1beta1.DE.prototype.setPubD = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2024,7 +2093,7 @@ proto.tss.v1beta1.DE.prototype.setPubD = function(value) { * optional bytes pub_e = 2; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.DE.prototype.getPubE = function() { +proto.band.tss.v1beta1.DE.prototype.getPubE = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -2034,7 +2103,7 @@ proto.tss.v1beta1.DE.prototype.getPubE = function() { * This is a type-conversion wrapper around `getPubE()` * @return {string} */ -proto.tss.v1beta1.DE.prototype.getPubE_asB64 = function() { +proto.band.tss.v1beta1.DE.prototype.getPubE_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPubE())); }; @@ -2047,7 +2116,7 @@ proto.tss.v1beta1.DE.prototype.getPubE_asB64 = function() { * This is a type-conversion wrapper around `getPubE()` * @return {!Uint8Array} */ -proto.tss.v1beta1.DE.prototype.getPubE_asU8 = function() { +proto.band.tss.v1beta1.DE.prototype.getPubE_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPubE())); }; @@ -2055,9 +2124,9 @@ proto.tss.v1beta1.DE.prototype.getPubE_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.DE} returns this + * @return {!proto.band.tss.v1beta1.DE} returns this */ -proto.tss.v1beta1.DE.prototype.setPubE = function(value) { +proto.band.tss.v1beta1.DE.prototype.setPubE = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -2078,8 +2147,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.DEQueue.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.DEQueue.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.DEQueue.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.DEQueue.toObject(opt_includeInstance, this); }; @@ -2088,11 +2157,11 @@ proto.tss.v1beta1.DEQueue.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.DEQueue} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.DEQueue} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.DEQueue.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.DEQueue.toObject = function(includeInstance, msg) { var f, obj = { head: jspb.Message.getFieldWithDefault(msg, 1, 0), tail: jspb.Message.getFieldWithDefault(msg, 2, 0) @@ -2109,23 +2178,23 @@ proto.tss.v1beta1.DEQueue.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.DEQueue} + * @return {!proto.band.tss.v1beta1.DEQueue} */ -proto.tss.v1beta1.DEQueue.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.DEQueue.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.DEQueue; - return proto.tss.v1beta1.DEQueue.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.DEQueue; + return proto.band.tss.v1beta1.DEQueue.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.DEQueue} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.DEQueue} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.DEQueue} + * @return {!proto.band.tss.v1beta1.DEQueue} */ -proto.tss.v1beta1.DEQueue.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.DEQueue.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2153,9 +2222,9 @@ proto.tss.v1beta1.DEQueue.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.DEQueue.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.DEQueue.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.DEQueue.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.DEQueue.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2163,11 +2232,11 @@ proto.tss.v1beta1.DEQueue.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.DEQueue} message + * @param {!proto.band.tss.v1beta1.DEQueue} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.DEQueue.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.DEQueue.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHead(); if (f !== 0) { @@ -2190,16 +2259,16 @@ proto.tss.v1beta1.DEQueue.serializeBinaryToWriter = function(message, writer) { * optional uint64 head = 1; * @return {number} */ -proto.tss.v1beta1.DEQueue.prototype.getHead = function() { +proto.band.tss.v1beta1.DEQueue.prototype.getHead = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.DEQueue} returns this + * @return {!proto.band.tss.v1beta1.DEQueue} returns this */ -proto.tss.v1beta1.DEQueue.prototype.setHead = function(value) { +proto.band.tss.v1beta1.DEQueue.prototype.setHead = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2208,28 +2277,21 @@ proto.tss.v1beta1.DEQueue.prototype.setHead = function(value) { * optional uint64 tail = 2; * @return {number} */ -proto.tss.v1beta1.DEQueue.prototype.getTail = function() { +proto.band.tss.v1beta1.DEQueue.prototype.getTail = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.DEQueue} returns this + * @return {!proto.band.tss.v1beta1.DEQueue} returns this */ -proto.tss.v1beta1.DEQueue.prototype.setTail = function(value) { +proto.band.tss.v1beta1.DEQueue.prototype.setTail = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.Signing.repeatedFields_ = [4,8]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2245,8 +2307,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.Signing.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Signing.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.Signing.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.Signing.toObject(opt_includeInstance, this); }; @@ -2255,25 +2317,22 @@ proto.tss.v1beta1.Signing.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Signing} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.Signing} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Signing.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.Signing.toObject = function(includeInstance, msg) { var f, obj = { - signingId: jspb.Message.getFieldWithDefault(msg, 1, 0), - groupId: jspb.Message.getFieldWithDefault(msg, 2, 0), + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + currentAttempt: jspb.Message.getFieldWithDefault(msg, 2, 0), + groupId: jspb.Message.getFieldWithDefault(msg, 3, 0), groupPubKey: msg.getGroupPubKey_asB64(), - assignedMembersList: jspb.Message.toObjectList(msg.getAssignedMembersList(), - proto.tss.v1beta1.AssignedMember.toObject, includeInstance), message: msg.getMessage_asB64(), groupPubNonce: msg.getGroupPubNonce_asB64(), signature: msg.getSignature_asB64(), - feeList: jspb.Message.toObjectList(msg.getFeeList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), - status: jspb.Message.getFieldWithDefault(msg, 9, 0), - createdHeight: jspb.Message.getFieldWithDefault(msg, 10, 0), - requester: jspb.Message.getFieldWithDefault(msg, 11, "") + status: jspb.Message.getFieldWithDefault(msg, 8, 0), + createdHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), + createdTimestamp: (f = msg.getCreatedTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { @@ -2287,23 +2346,23 @@ proto.tss.v1beta1.Signing.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Signing} + * @return {!proto.band.tss.v1beta1.Signing} */ -proto.tss.v1beta1.Signing.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.Signing.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Signing; - return proto.tss.v1beta1.Signing.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.Signing; + return proto.band.tss.v1beta1.Signing.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.Signing} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.Signing} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Signing} + * @return {!proto.band.tss.v1beta1.Signing} */ -proto.tss.v1beta1.Signing.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.Signing.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2312,20 +2371,19 @@ proto.tss.v1beta1.Signing.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); - msg.setSigningId(value); + msg.setId(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); - msg.setGroupId(value); + msg.setCurrentAttempt(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGroupPubKey(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); break; case 4: - var value = new proto.tss.v1beta1.AssignedMember; - reader.readMessage(value,proto.tss.v1beta1.AssignedMember.deserializeBinaryFromReader); - msg.addAssignedMembers(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setGroupPubKey(value); break; case 5: var value = /** @type {!Uint8Array} */ (reader.readBytes()); @@ -2340,21 +2398,17 @@ proto.tss.v1beta1.Signing.deserializeBinaryFromReader = function(msg, reader) { msg.setSignature(value); break; case 8: - var value = new cosmos_base_v1beta1_coin_pb.Coin; - reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.addFee(value); - break; - case 9: - var value = /** @type {!proto.tss.v1beta1.SigningStatus} */ (reader.readEnum()); + var value = /** @type {!proto.band.tss.v1beta1.SigningStatus} */ (reader.readEnum()); msg.setStatus(value); break; - case 10: + case 9: var value = /** @type {number} */ (reader.readUint64()); msg.setCreatedHeight(value); break; - case 11: - var value = /** @type {string} */ (reader.readString()); - msg.setRequester(value); + case 10: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreatedTimestamp(value); break; default: reader.skipField(); @@ -2369,9 +2423,9 @@ proto.tss.v1beta1.Signing.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.Signing.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.Signing.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Signing.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.Signing.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2379,39 +2433,38 @@ proto.tss.v1beta1.Signing.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Signing} message + * @param {!proto.band.tss.v1beta1.Signing} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Signing.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.Signing.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSigningId(); + f = message.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } - f = message.getGroupId(); + f = message.getCurrentAttempt(); if (f !== 0) { writer.writeUint64( 2, f ); } - f = message.getGroupPubKey_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( 3, f ); } - f = message.getAssignedMembersList(); + f = message.getGroupPubKey_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 4, - f, - proto.tss.v1beta1.AssignedMember.serializeBinaryToWriter + f ); } f = message.getMessage_asU8(); @@ -2435,102 +2488,113 @@ proto.tss.v1beta1.Signing.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getFeeList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter - ); - } f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( - 9, + 8, f ); } f = message.getCreatedHeight(); if (f !== 0) { writer.writeUint64( - 10, + 9, f ); } - f = message.getRequester(); - if (f.length > 0) { - writer.writeString( - 11, - f + f = message.getCreatedTimestamp(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** - * optional uint64 signing_id = 1; + * optional uint64 id = 1; * @return {number} */ -proto.tss.v1beta1.Signing.prototype.getSigningId = function() { +proto.band.tss.v1beta1.Signing.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Signing} returns this + * @return {!proto.band.tss.v1beta1.Signing} returns this */ -proto.tss.v1beta1.Signing.prototype.setSigningId = function(value) { +proto.band.tss.v1beta1.Signing.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint64 group_id = 2; + * optional uint64 current_attempt = 2; * @return {number} */ -proto.tss.v1beta1.Signing.prototype.getGroupId = function() { +proto.band.tss.v1beta1.Signing.prototype.getCurrentAttempt = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Signing} returns this + * @return {!proto.band.tss.v1beta1.Signing} returns this */ -proto.tss.v1beta1.Signing.prototype.setGroupId = function(value) { +proto.band.tss.v1beta1.Signing.prototype.setCurrentAttempt = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bytes group_pub_key = 3; + * optional uint64 group_id = 3; + * @return {number} + */ +proto.band.tss.v1beta1.Signing.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.Signing} returns this + */ +proto.band.tss.v1beta1.Signing.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes group_pub_key = 4; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Signing.prototype.getGroupPubKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.band.tss.v1beta1.Signing.prototype.getGroupPubKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional bytes group_pub_key = 3; + * optional bytes group_pub_key = 4; * This is a type-conversion wrapper around `getGroupPubKey()` * @return {string} */ -proto.tss.v1beta1.Signing.prototype.getGroupPubKey_asB64 = function() { +proto.band.tss.v1beta1.Signing.prototype.getGroupPubKey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGroupPubKey())); }; /** - * optional bytes group_pub_key = 3; + * optional bytes group_pub_key = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGroupPubKey()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Signing.prototype.getGroupPubKey_asU8 = function() { +proto.band.tss.v1beta1.Signing.prototype.getGroupPubKey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGroupPubKey())); }; @@ -2538,48 +2602,10 @@ proto.tss.v1beta1.Signing.prototype.getGroupPubKey_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Signing} returns this - */ -proto.tss.v1beta1.Signing.prototype.setGroupPubKey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * repeated AssignedMember assigned_members = 4; - * @return {!Array} - */ -proto.tss.v1beta1.Signing.prototype.getAssignedMembersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tss.v1beta1.AssignedMember, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.Signing} returns this -*/ -proto.tss.v1beta1.Signing.prototype.setAssignedMembersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.tss.v1beta1.AssignedMember=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.AssignedMember} - */ -proto.tss.v1beta1.Signing.prototype.addAssignedMembers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tss.v1beta1.AssignedMember, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.Signing} returns this + * @return {!proto.band.tss.v1beta1.Signing} returns this */ -proto.tss.v1beta1.Signing.prototype.clearAssignedMembersList = function() { - return this.setAssignedMembersList([]); +proto.band.tss.v1beta1.Signing.prototype.setGroupPubKey = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -2587,7 +2613,7 @@ proto.tss.v1beta1.Signing.prototype.clearAssignedMembersList = function() { * optional bytes message = 5; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Signing.prototype.getMessage = function() { +proto.band.tss.v1beta1.Signing.prototype.getMessage = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; @@ -2597,7 +2623,7 @@ proto.tss.v1beta1.Signing.prototype.getMessage = function() { * This is a type-conversion wrapper around `getMessage()` * @return {string} */ -proto.tss.v1beta1.Signing.prototype.getMessage_asB64 = function() { +proto.band.tss.v1beta1.Signing.prototype.getMessage_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getMessage())); }; @@ -2610,7 +2636,7 @@ proto.tss.v1beta1.Signing.prototype.getMessage_asB64 = function() { * This is a type-conversion wrapper around `getMessage()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Signing.prototype.getMessage_asU8 = function() { +proto.band.tss.v1beta1.Signing.prototype.getMessage_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getMessage())); }; @@ -2618,9 +2644,9 @@ proto.tss.v1beta1.Signing.prototype.getMessage_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Signing} returns this + * @return {!proto.band.tss.v1beta1.Signing} returns this */ -proto.tss.v1beta1.Signing.prototype.setMessage = function(value) { +proto.band.tss.v1beta1.Signing.prototype.setMessage = function(value) { return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -2629,7 +2655,7 @@ proto.tss.v1beta1.Signing.prototype.setMessage = function(value) { * optional bytes group_pub_nonce = 6; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Signing.prototype.getGroupPubNonce = function() { +proto.band.tss.v1beta1.Signing.prototype.getGroupPubNonce = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; @@ -2639,7 +2665,7 @@ proto.tss.v1beta1.Signing.prototype.getGroupPubNonce = function() { * This is a type-conversion wrapper around `getGroupPubNonce()` * @return {string} */ -proto.tss.v1beta1.Signing.prototype.getGroupPubNonce_asB64 = function() { +proto.band.tss.v1beta1.Signing.prototype.getGroupPubNonce_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGroupPubNonce())); }; @@ -2652,7 +2678,7 @@ proto.tss.v1beta1.Signing.prototype.getGroupPubNonce_asB64 = function() { * This is a type-conversion wrapper around `getGroupPubNonce()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Signing.prototype.getGroupPubNonce_asU8 = function() { +proto.band.tss.v1beta1.Signing.prototype.getGroupPubNonce_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGroupPubNonce())); }; @@ -2660,9 +2686,9 @@ proto.tss.v1beta1.Signing.prototype.getGroupPubNonce_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Signing} returns this + * @return {!proto.band.tss.v1beta1.Signing} returns this */ -proto.tss.v1beta1.Signing.prototype.setGroupPubNonce = function(value) { +proto.band.tss.v1beta1.Signing.prototype.setGroupPubNonce = function(value) { return jspb.Message.setProto3BytesField(this, 6, value); }; @@ -2671,7 +2697,7 @@ proto.tss.v1beta1.Signing.prototype.setGroupPubNonce = function(value) { * optional bytes signature = 7; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Signing.prototype.getSignature = function() { +proto.band.tss.v1beta1.Signing.prototype.getSignature = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; @@ -2681,7 +2707,7 @@ proto.tss.v1beta1.Signing.prototype.getSignature = function() { * This is a type-conversion wrapper around `getSignature()` * @return {string} */ -proto.tss.v1beta1.Signing.prototype.getSignature_asB64 = function() { +proto.band.tss.v1beta1.Signing.prototype.getSignature_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getSignature())); }; @@ -2694,7 +2720,7 @@ proto.tss.v1beta1.Signing.prototype.getSignature_asB64 = function() { * This is a type-conversion wrapper around `getSignature()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Signing.prototype.getSignature_asU8 = function() { +proto.band.tss.v1beta1.Signing.prototype.getSignature_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getSignature())); }; @@ -2702,105 +2728,93 @@ proto.tss.v1beta1.Signing.prototype.getSignature_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Signing} returns this + * @return {!proto.band.tss.v1beta1.Signing} returns this */ -proto.tss.v1beta1.Signing.prototype.setSignature = function(value) { +proto.band.tss.v1beta1.Signing.prototype.setSignature = function(value) { return jspb.Message.setProto3BytesField(this, 7, value); }; /** - * repeated cosmos.base.v1beta1.Coin fee = 8; - * @return {!Array} + * optional SigningStatus status = 8; + * @return {!proto.band.tss.v1beta1.SigningStatus} */ -proto.tss.v1beta1.Signing.prototype.getFeeList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.Signing} returns this -*/ -proto.tss.v1beta1.Signing.prototype.setFeeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); +proto.band.tss.v1beta1.Signing.prototype.getStatus = function() { + return /** @type {!proto.band.tss.v1beta1.SigningStatus} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} + * @param {!proto.band.tss.v1beta1.SigningStatus} value + * @return {!proto.band.tss.v1beta1.Signing} returns this */ -proto.tss.v1beta1.Signing.prototype.addFee = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +proto.band.tss.v1beta1.Signing.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 8, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.Signing} returns this + * optional uint64 created_height = 9; + * @return {number} */ -proto.tss.v1beta1.Signing.prototype.clearFeeList = function() { - return this.setFeeList([]); +proto.band.tss.v1beta1.Signing.prototype.getCreatedHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * optional SigningStatus status = 9; - * @return {!proto.tss.v1beta1.SigningStatus} + * @param {number} value + * @return {!proto.band.tss.v1beta1.Signing} returns this */ -proto.tss.v1beta1.Signing.prototype.getStatus = function() { - return /** @type {!proto.tss.v1beta1.SigningStatus} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.band.tss.v1beta1.Signing.prototype.setCreatedHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * @param {!proto.tss.v1beta1.SigningStatus} value - * @return {!proto.tss.v1beta1.Signing} returns this + * optional google.protobuf.Timestamp created_timestamp = 10; + * @return {?proto.google.protobuf.Timestamp} */ -proto.tss.v1beta1.Signing.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); +proto.band.tss.v1beta1.Signing.prototype.getCreatedTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); }; /** - * optional uint64 created_height = 10; - * @return {number} - */ -proto.tss.v1beta1.Signing.prototype.getCreatedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.band.tss.v1beta1.Signing} returns this +*/ +proto.band.tss.v1beta1.Signing.prototype.setCreatedTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 10, value); }; /** - * @param {number} value - * @return {!proto.tss.v1beta1.Signing} returns this + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.Signing} returns this */ -proto.tss.v1beta1.Signing.prototype.setCreatedHeight = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); +proto.band.tss.v1beta1.Signing.prototype.clearCreatedTimestamp = function() { + return this.setCreatedTimestamp(undefined); }; /** - * optional string requester = 11; - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.tss.v1beta1.Signing.prototype.getRequester = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +proto.band.tss.v1beta1.Signing.prototype.hasCreatedTimestamp = function() { + return jspb.Message.getField(this, 10) != null; }; + /** - * @param {string} value - * @return {!proto.tss.v1beta1.Signing} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.tss.v1beta1.Signing.prototype.setRequester = function(value) { - return jspb.Message.setProto3StringField(this, 11, value); -}; - - +proto.band.tss.v1beta1.SigningAttempt.repeatedFields_ = [4]; @@ -2817,8 +2831,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.AssignedMember.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.AssignedMember.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.SigningAttempt.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.SigningAttempt.toObject(opt_includeInstance, this); }; @@ -2827,19 +2841,17 @@ proto.tss.v1beta1.AssignedMember.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.AssignedMember} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.SigningAttempt} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.AssignedMember.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.SigningAttempt.toObject = function(includeInstance, msg) { var f, obj = { - memberId: jspb.Message.getFieldWithDefault(msg, 1, 0), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - pubKey: msg.getPubKey_asB64(), - pubD: msg.getPubD_asB64(), - pubE: msg.getPubE_asB64(), - bindingFactor: msg.getBindingFactor_asB64(), - pubNonce: msg.getPubNonce_asB64() + signingId: jspb.Message.getFieldWithDefault(msg, 1, 0), + attempt: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiredHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + assignedMembersList: jspb.Message.toObjectList(msg.getAssignedMembersList(), + proto.band.tss.v1beta1.AssignedMember.toObject, includeInstance) }; if (includeInstance) { @@ -2853,23 +2865,23 @@ proto.tss.v1beta1.AssignedMember.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.AssignedMember} + * @return {!proto.band.tss.v1beta1.SigningAttempt} */ -proto.tss.v1beta1.AssignedMember.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.SigningAttempt.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.AssignedMember; - return proto.tss.v1beta1.AssignedMember.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.SigningAttempt; + return proto.band.tss.v1beta1.SigningAttempt.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.AssignedMember} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.SigningAttempt} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.AssignedMember} + * @return {!proto.band.tss.v1beta1.SigningAttempt} */ -proto.tss.v1beta1.AssignedMember.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.SigningAttempt.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2878,31 +2890,20 @@ proto.tss.v1beta1.AssignedMember.deserializeBinaryFromReader = function(msg, rea switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); - msg.setMemberId(value); + msg.setSigningId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAttempt(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubKey(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiredHeight(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubD(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubE(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBindingFactor(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubNonce(value); + var value = new proto.band.tss.v1beta1.AssignedMember; + reader.readMessage(value,proto.band.tss.v1beta1.AssignedMember.deserializeBinaryFromReader); + msg.addAssignedMembers(value); break; default: reader.skipField(); @@ -2917,9 +2918,9 @@ proto.tss.v1beta1.AssignedMember.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.AssignedMember.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.SigningAttempt.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.AssignedMember.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.SigningAttempt.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2927,57 +2928,313 @@ proto.tss.v1beta1.AssignedMember.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.AssignedMember} message + * @param {!proto.band.tss.v1beta1.SigningAttempt} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.AssignedMember.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.SigningAttempt.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMemberId(); + f = message.getSigningId(); if (f !== 0) { writer.writeUint64( 1, f ); } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( + f = message.getAttempt(); + if (f !== 0) { + writer.writeUint64( 2, f ); } - f = message.getPubKey_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getExpiredHeight(); + if (f !== 0) { + writer.writeUint64( 3, f ); } - f = message.getPubD_asU8(); + f = message.getAssignedMembersList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 4, - f - ); - } - f = message.getPubE_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getBindingFactor_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f + f, + proto.band.tss.v1beta1.AssignedMember.serializeBinaryToWriter ); } - f = message.getPubNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( +}; + + +/** + * optional uint64 signing_id = 1; + * @return {number} + */ +proto.band.tss.v1beta1.SigningAttempt.prototype.getSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.SigningAttempt} returns this + */ +proto.band.tss.v1beta1.SigningAttempt.prototype.setSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 attempt = 2; + * @return {number} + */ +proto.band.tss.v1beta1.SigningAttempt.prototype.getAttempt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.SigningAttempt} returns this + */ +proto.band.tss.v1beta1.SigningAttempt.prototype.setAttempt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 expired_height = 3; + * @return {number} + */ +proto.band.tss.v1beta1.SigningAttempt.prototype.getExpiredHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.SigningAttempt} returns this + */ +proto.band.tss.v1beta1.SigningAttempt.prototype.setExpiredHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated AssignedMember assigned_members = 4; + * @return {!Array} + */ +proto.band.tss.v1beta1.SigningAttempt.prototype.getAssignedMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.AssignedMember, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.SigningAttempt} returns this +*/ +proto.band.tss.v1beta1.SigningAttempt.prototype.setAssignedMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.AssignedMember=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.AssignedMember} + */ +proto.band.tss.v1beta1.SigningAttempt.prototype.addAssignedMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.band.tss.v1beta1.AssignedMember, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.SigningAttempt} returns this + */ +proto.band.tss.v1beta1.SigningAttempt.prototype.clearAssignedMembersList = function() { + return this.setAssignedMembersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.AssignedMember.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.AssignedMember.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.AssignedMember} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.AssignedMember.toObject = function(includeInstance, msg) { + var f, obj = { + memberId: jspb.Message.getFieldWithDefault(msg, 1, 0), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + pubKey: msg.getPubKey_asB64(), + pubD: msg.getPubD_asB64(), + pubE: msg.getPubE_asB64(), + bindingFactor: msg.getBindingFactor_asB64(), + pubNonce: msg.getPubNonce_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.AssignedMember} + */ +proto.band.tss.v1beta1.AssignedMember.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.AssignedMember; + return proto.band.tss.v1beta1.AssignedMember.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.AssignedMember} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.AssignedMember} + */ +proto.band.tss.v1beta1.AssignedMember.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMemberId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubKey(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubD(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubE(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBindingFactor(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubNonce(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.AssignedMember.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.AssignedMember.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.AssignedMember} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.AssignedMember.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMemberId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPubKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getPubD_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getPubE_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getBindingFactor_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getPubNonce_asU8(); + if (f.length > 0) { + writer.writeBytes( 7, f ); @@ -2989,16 +3246,16 @@ proto.tss.v1beta1.AssignedMember.serializeBinaryToWriter = function(message, wri * optional uint64 member_id = 1; * @return {number} */ -proto.tss.v1beta1.AssignedMember.prototype.getMemberId = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getMemberId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.AssignedMember} returns this + * @return {!proto.band.tss.v1beta1.AssignedMember} returns this */ -proto.tss.v1beta1.AssignedMember.prototype.setMemberId = function(value) { +proto.band.tss.v1beta1.AssignedMember.prototype.setMemberId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3007,16 +3264,16 @@ proto.tss.v1beta1.AssignedMember.prototype.setMemberId = function(value) { * optional string address = 2; * @return {string} */ -proto.tss.v1beta1.AssignedMember.prototype.getAddress = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.tss.v1beta1.AssignedMember} returns this + * @return {!proto.band.tss.v1beta1.AssignedMember} returns this */ -proto.tss.v1beta1.AssignedMember.prototype.setAddress = function(value) { +proto.band.tss.v1beta1.AssignedMember.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3025,7 +3282,7 @@ proto.tss.v1beta1.AssignedMember.prototype.setAddress = function(value) { * optional bytes pub_key = 3; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubKey = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubKey = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -3035,7 +3292,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubKey = function() { * This is a type-conversion wrapper around `getPubKey()` * @return {string} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubKey_asB64 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubKey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPubKey())); }; @@ -3048,7 +3305,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubKey_asB64 = function() { * This is a type-conversion wrapper around `getPubKey()` * @return {!Uint8Array} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubKey_asU8 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubKey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPubKey())); }; @@ -3056,9 +3313,9 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubKey_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.AssignedMember} returns this + * @return {!proto.band.tss.v1beta1.AssignedMember} returns this */ -proto.tss.v1beta1.AssignedMember.prototype.setPubKey = function(value) { +proto.band.tss.v1beta1.AssignedMember.prototype.setPubKey = function(value) { return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -3067,7 +3324,7 @@ proto.tss.v1beta1.AssignedMember.prototype.setPubKey = function(value) { * optional bytes pub_d = 4; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubD = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubD = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; @@ -3077,7 +3334,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubD = function() { * This is a type-conversion wrapper around `getPubD()` * @return {string} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubD_asB64 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubD_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPubD())); }; @@ -3090,7 +3347,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubD_asB64 = function() { * This is a type-conversion wrapper around `getPubD()` * @return {!Uint8Array} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubD_asU8 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubD_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPubD())); }; @@ -3098,9 +3355,9 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubD_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.AssignedMember} returns this + * @return {!proto.band.tss.v1beta1.AssignedMember} returns this */ -proto.tss.v1beta1.AssignedMember.prototype.setPubD = function(value) { +proto.band.tss.v1beta1.AssignedMember.prototype.setPubD = function(value) { return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -3109,7 +3366,7 @@ proto.tss.v1beta1.AssignedMember.prototype.setPubD = function(value) { * optional bytes pub_e = 5; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubE = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubE = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; @@ -3119,7 +3376,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubE = function() { * This is a type-conversion wrapper around `getPubE()` * @return {string} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubE_asB64 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubE_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPubE())); }; @@ -3132,7 +3389,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubE_asB64 = function() { * This is a type-conversion wrapper around `getPubE()` * @return {!Uint8Array} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubE_asU8 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubE_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPubE())); }; @@ -3140,9 +3397,9 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubE_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.AssignedMember} returns this + * @return {!proto.band.tss.v1beta1.AssignedMember} returns this */ -proto.tss.v1beta1.AssignedMember.prototype.setPubE = function(value) { +proto.band.tss.v1beta1.AssignedMember.prototype.setPubE = function(value) { return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -3151,7 +3408,7 @@ proto.tss.v1beta1.AssignedMember.prototype.setPubE = function(value) { * optional bytes binding_factor = 6; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.AssignedMember.prototype.getBindingFactor = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getBindingFactor = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; @@ -3161,7 +3418,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getBindingFactor = function() { * This is a type-conversion wrapper around `getBindingFactor()` * @return {string} */ -proto.tss.v1beta1.AssignedMember.prototype.getBindingFactor_asB64 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getBindingFactor_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getBindingFactor())); }; @@ -3174,7 +3431,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getBindingFactor_asB64 = function() { * This is a type-conversion wrapper around `getBindingFactor()` * @return {!Uint8Array} */ -proto.tss.v1beta1.AssignedMember.prototype.getBindingFactor_asU8 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getBindingFactor_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getBindingFactor())); }; @@ -3182,9 +3439,9 @@ proto.tss.v1beta1.AssignedMember.prototype.getBindingFactor_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.AssignedMember} returns this + * @return {!proto.band.tss.v1beta1.AssignedMember} returns this */ -proto.tss.v1beta1.AssignedMember.prototype.setBindingFactor = function(value) { +proto.band.tss.v1beta1.AssignedMember.prototype.setBindingFactor = function(value) { return jspb.Message.setProto3BytesField(this, 6, value); }; @@ -3193,7 +3450,7 @@ proto.tss.v1beta1.AssignedMember.prototype.setBindingFactor = function(value) { * optional bytes pub_nonce = 7; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubNonce = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubNonce = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; @@ -3203,7 +3460,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubNonce = function() { * This is a type-conversion wrapper around `getPubNonce()` * @return {string} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubNonce_asB64 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubNonce_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPubNonce())); }; @@ -3216,7 +3473,7 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubNonce_asB64 = function() { * This is a type-conversion wrapper around `getPubNonce()` * @return {!Uint8Array} */ -proto.tss.v1beta1.AssignedMember.prototype.getPubNonce_asU8 = function() { +proto.band.tss.v1beta1.AssignedMember.prototype.getPubNonce_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPubNonce())); }; @@ -3224,9 +3481,9 @@ proto.tss.v1beta1.AssignedMember.prototype.getPubNonce_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.AssignedMember} returns this + * @return {!proto.band.tss.v1beta1.AssignedMember} returns this */ -proto.tss.v1beta1.AssignedMember.prototype.setPubNonce = function(value) { +proto.band.tss.v1beta1.AssignedMember.prototype.setPubNonce = function(value) { return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -3237,7 +3494,7 @@ proto.tss.v1beta1.AssignedMember.prototype.setPubNonce = function(value) { * @private {!Array} * @const */ -proto.tss.v1beta1.PendingSignings.repeatedFields_ = [1]; +proto.band.tss.v1beta1.PendingSignings.repeatedFields_ = [1]; @@ -3254,8 +3511,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.PendingSignings.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.PendingSignings.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.PendingSignings.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.PendingSignings.toObject(opt_includeInstance, this); }; @@ -3264,11 +3521,11 @@ proto.tss.v1beta1.PendingSignings.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.PendingSignings} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.PendingSignings} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.PendingSignings.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.PendingSignings.toObject = function(includeInstance, msg) { var f, obj = { signingIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; @@ -3284,23 +3541,23 @@ proto.tss.v1beta1.PendingSignings.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.PendingSignings} + * @return {!proto.band.tss.v1beta1.PendingSignings} */ -proto.tss.v1beta1.PendingSignings.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.PendingSignings.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.PendingSignings; - return proto.tss.v1beta1.PendingSignings.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.PendingSignings; + return proto.band.tss.v1beta1.PendingSignings.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.PendingSignings} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.PendingSignings} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.PendingSignings} + * @return {!proto.band.tss.v1beta1.PendingSignings} */ -proto.tss.v1beta1.PendingSignings.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.PendingSignings.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3326,9 +3583,9 @@ proto.tss.v1beta1.PendingSignings.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.PendingSignings.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.PendingSignings.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.PendingSignings.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.PendingSignings.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3336,11 +3593,11 @@ proto.tss.v1beta1.PendingSignings.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.PendingSignings} message + * @param {!proto.band.tss.v1beta1.PendingSignings} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.PendingSignings.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.PendingSignings.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSigningIdsList(); if (f.length > 0) { @@ -3356,16 +3613,16 @@ proto.tss.v1beta1.PendingSignings.serializeBinaryToWriter = function(message, wr * repeated uint64 signing_ids = 1; * @return {!Array} */ -proto.tss.v1beta1.PendingSignings.prototype.getSigningIdsList = function() { +proto.band.tss.v1beta1.PendingSignings.prototype.getSigningIdsList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array} value - * @return {!proto.tss.v1beta1.PendingSignings} returns this + * @return {!proto.band.tss.v1beta1.PendingSignings} returns this */ -proto.tss.v1beta1.PendingSignings.prototype.setSigningIdsList = function(value) { +proto.band.tss.v1beta1.PendingSignings.prototype.setSigningIdsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; @@ -3373,18 +3630,18 @@ proto.tss.v1beta1.PendingSignings.prototype.setSigningIdsList = function(value) /** * @param {number} value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.PendingSignings} returns this + * @return {!proto.band.tss.v1beta1.PendingSignings} returns this */ -proto.tss.v1beta1.PendingSignings.prototype.addSigningIds = function(value, opt_index) { +proto.band.tss.v1beta1.PendingSignings.prototype.addSigningIds = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.PendingSignings} returns this + * @return {!proto.band.tss.v1beta1.PendingSignings} returns this */ -proto.tss.v1beta1.PendingSignings.prototype.clearSigningIdsList = function() { +proto.band.tss.v1beta1.PendingSignings.prototype.clearSigningIdsList = function() { return this.setSigningIdsList([]); }; @@ -3405,8 +3662,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.Member.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Member.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.Member.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.Member.toObject(opt_includeInstance, this); }; @@ -3415,16 +3672,18 @@ proto.tss.v1beta1.Member.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Member} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.Member} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Member.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.Member.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, 0), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), + groupId: jspb.Message.getFieldWithDefault(msg, 2, 0), + address: jspb.Message.getFieldWithDefault(msg, 3, ""), pubKey: msg.getPubKey_asB64(), - isMalicious: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + isMalicious: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + isActive: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -3438,23 +3697,23 @@ proto.tss.v1beta1.Member.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Member} + * @return {!proto.band.tss.v1beta1.Member} */ -proto.tss.v1beta1.Member.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.Member.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Member; - return proto.tss.v1beta1.Member.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.Member; + return proto.band.tss.v1beta1.Member.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.Member} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.Member} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Member} + * @return {!proto.band.tss.v1beta1.Member} */ -proto.tss.v1beta1.Member.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.Member.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3466,17 +3725,25 @@ proto.tss.v1beta1.Member.deserializeBinaryFromReader = function(msg, reader) { msg.setId(value); break; case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + case 3: var value = /** @type {string} */ (reader.readString()); msg.setAddress(value); break; - case 3: + case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setPubKey(value); break; - case 4: + case 5: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsMalicious(value); break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsActive(value); + break; default: reader.skipField(); break; @@ -3490,9 +3757,9 @@ proto.tss.v1beta1.Member.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.Member.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.Member.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Member.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.Member.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3500,11 +3767,11 @@ proto.tss.v1beta1.Member.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Member} message + * @param {!proto.band.tss.v1beta1.Member} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Member.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.Member.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f !== 0) { @@ -3513,24 +3780,38 @@ proto.tss.v1beta1.Member.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( 2, f ); } - f = message.getPubKey_asU8(); + f = message.getAddress(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 3, f ); } + f = message.getPubKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } f = message.getIsMalicious(); if (f) { writer.writeBool( - 4, + 5, + f + ); + } + f = message.getIsActive(); + if (f) { + writer.writeBool( + 6, f ); } @@ -3541,66 +3822,84 @@ proto.tss.v1beta1.Member.serializeBinaryToWriter = function(message, writer) { * optional uint64 id = 1; * @return {number} */ -proto.tss.v1beta1.Member.prototype.getId = function() { +proto.band.tss.v1beta1.Member.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Member} returns this + * @return {!proto.band.tss.v1beta1.Member} returns this */ -proto.tss.v1beta1.Member.prototype.setId = function(value) { +proto.band.tss.v1beta1.Member.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional string address = 2; + * optional uint64 group_id = 2; + * @return {number} + */ +proto.band.tss.v1beta1.Member.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.Member} returns this + */ +proto.band.tss.v1beta1.Member.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string address = 3; * @return {string} */ -proto.tss.v1beta1.Member.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.band.tss.v1beta1.Member.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.tss.v1beta1.Member} returns this + * @return {!proto.band.tss.v1beta1.Member} returns this */ -proto.tss.v1beta1.Member.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.band.tss.v1beta1.Member.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional bytes pub_key = 3; + * optional bytes pub_key = 4; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Member.prototype.getPubKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.band.tss.v1beta1.Member.prototype.getPubKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional bytes pub_key = 3; + * optional bytes pub_key = 4; * This is a type-conversion wrapper around `getPubKey()` * @return {string} */ -proto.tss.v1beta1.Member.prototype.getPubKey_asB64 = function() { +proto.band.tss.v1beta1.Member.prototype.getPubKey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPubKey())); }; /** - * optional bytes pub_key = 3; + * optional bytes pub_key = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getPubKey()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Member.prototype.getPubKey_asU8 = function() { +proto.band.tss.v1beta1.Member.prototype.getPubKey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPubKey())); }; @@ -3608,290 +3907,46 @@ proto.tss.v1beta1.Member.prototype.getPubKey_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Member} returns this + * @return {!proto.band.tss.v1beta1.Member} returns this */ -proto.tss.v1beta1.Member.prototype.setPubKey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.band.tss.v1beta1.Member.prototype.setPubKey = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; /** - * optional bool is_malicious = 4; + * optional bool is_malicious = 5; * @return {boolean} */ -proto.tss.v1beta1.Member.prototype.getIsMalicious = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +proto.band.tss.v1beta1.Member.prototype.getIsMalicious = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** * @param {boolean} value - * @return {!proto.tss.v1beta1.Member} returns this - */ -proto.tss.v1beta1.Member.prototype.setIsMalicious = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.Status.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Status.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Status} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.Status.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0), - since: (f = msg.getSince()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - lastActive: (f = msg.getLastActive()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Status} - */ -proto.tss.v1beta1.Status.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Status; - return proto.tss.v1beta1.Status.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.Status} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Status} - */ -proto.tss.v1beta1.Status.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {!proto.tss.v1beta1.MemberStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSince(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastActive(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.Status.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Status.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Status} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.Status.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getSince(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getLastActive(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.tss.v1beta1.Status.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.Status} returns this - */ -proto.tss.v1beta1.Status.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional MemberStatus status = 2; - * @return {!proto.tss.v1beta1.MemberStatus} - */ -proto.tss.v1beta1.Status.prototype.getStatus = function() { - return /** @type {!proto.tss.v1beta1.MemberStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.tss.v1beta1.MemberStatus} value - * @return {!proto.tss.v1beta1.Status} returns this - */ -proto.tss.v1beta1.Status.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp since = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.tss.v1beta1.Status.prototype.getSince = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.tss.v1beta1.Status} returns this -*/ -proto.tss.v1beta1.Status.prototype.setSince = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.Status} returns this + * @return {!proto.band.tss.v1beta1.Member} returns this */ -proto.tss.v1beta1.Status.prototype.clearSince = function() { - return this.setSince(undefined); +proto.band.tss.v1beta1.Member.prototype.setIsMalicious = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * Returns whether this field is set. + * optional bool is_active = 6; * @return {boolean} */ -proto.tss.v1beta1.Status.prototype.hasSince = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional google.protobuf.Timestamp last_active = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.tss.v1beta1.Status.prototype.getLastActive = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.tss.v1beta1.Status} returns this -*/ -proto.tss.v1beta1.Status.prototype.setLastActive = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.Status} returns this - */ -proto.tss.v1beta1.Status.prototype.clearLastActive = function() { - return this.setLastActive(undefined); +proto.band.tss.v1beta1.Member.prototype.getIsActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.band.tss.v1beta1.Member} returns this */ -proto.tss.v1beta1.Status.prototype.hasLastActive = function() { - return jspb.Message.getField(this, 4) != null; +proto.band.tss.v1beta1.Member.prototype.setIsActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; @@ -3911,8 +3966,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.Confirm.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Confirm.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.Confirm.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.Confirm.toObject(opt_includeInstance, this); }; @@ -3921,11 +3976,11 @@ proto.tss.v1beta1.Confirm.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Confirm} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.Confirm} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Confirm.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.Confirm.toObject = function(includeInstance, msg) { var f, obj = { memberId: jspb.Message.getFieldWithDefault(msg, 1, 0), ownPubKeySig: msg.getOwnPubKeySig_asB64() @@ -3942,23 +3997,23 @@ proto.tss.v1beta1.Confirm.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Confirm} + * @return {!proto.band.tss.v1beta1.Confirm} */ -proto.tss.v1beta1.Confirm.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.Confirm.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Confirm; - return proto.tss.v1beta1.Confirm.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.Confirm; + return proto.band.tss.v1beta1.Confirm.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.Confirm} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.Confirm} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Confirm} + * @return {!proto.band.tss.v1beta1.Confirm} */ -proto.tss.v1beta1.Confirm.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.Confirm.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3986,9 +4041,9 @@ proto.tss.v1beta1.Confirm.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.Confirm.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.Confirm.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Confirm.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.Confirm.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3996,11 +4051,11 @@ proto.tss.v1beta1.Confirm.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Confirm} message + * @param {!proto.band.tss.v1beta1.Confirm} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Confirm.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.Confirm.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMemberId(); if (f !== 0) { @@ -4023,16 +4078,16 @@ proto.tss.v1beta1.Confirm.serializeBinaryToWriter = function(message, writer) { * optional uint64 member_id = 1; * @return {number} */ -proto.tss.v1beta1.Confirm.prototype.getMemberId = function() { +proto.band.tss.v1beta1.Confirm.prototype.getMemberId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Confirm} returns this + * @return {!proto.band.tss.v1beta1.Confirm} returns this */ -proto.tss.v1beta1.Confirm.prototype.setMemberId = function(value) { +proto.band.tss.v1beta1.Confirm.prototype.setMemberId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -4041,7 +4096,7 @@ proto.tss.v1beta1.Confirm.prototype.setMemberId = function(value) { * optional bytes own_pub_key_sig = 2; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Confirm.prototype.getOwnPubKeySig = function() { +proto.band.tss.v1beta1.Confirm.prototype.getOwnPubKeySig = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -4051,7 +4106,7 @@ proto.tss.v1beta1.Confirm.prototype.getOwnPubKeySig = function() { * This is a type-conversion wrapper around `getOwnPubKeySig()` * @return {string} */ -proto.tss.v1beta1.Confirm.prototype.getOwnPubKeySig_asB64 = function() { +proto.band.tss.v1beta1.Confirm.prototype.getOwnPubKeySig_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOwnPubKeySig())); }; @@ -4064,7 +4119,7 @@ proto.tss.v1beta1.Confirm.prototype.getOwnPubKeySig_asB64 = function() { * This is a type-conversion wrapper around `getOwnPubKeySig()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Confirm.prototype.getOwnPubKeySig_asU8 = function() { +proto.band.tss.v1beta1.Confirm.prototype.getOwnPubKeySig_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOwnPubKeySig())); }; @@ -4072,9 +4127,9 @@ proto.tss.v1beta1.Confirm.prototype.getOwnPubKeySig_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Confirm} returns this + * @return {!proto.band.tss.v1beta1.Confirm} returns this */ -proto.tss.v1beta1.Confirm.prototype.setOwnPubKeySig = function(value) { +proto.band.tss.v1beta1.Confirm.prototype.setOwnPubKeySig = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4095,8 +4150,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.Complaint.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Complaint.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.Complaint.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.Complaint.toObject(opt_includeInstance, this); }; @@ -4105,11 +4160,11 @@ proto.tss.v1beta1.Complaint.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Complaint} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.Complaint} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Complaint.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.Complaint.toObject = function(includeInstance, msg) { var f, obj = { complainant: jspb.Message.getFieldWithDefault(msg, 1, 0), respondent: jspb.Message.getFieldWithDefault(msg, 2, 0), @@ -4128,23 +4183,23 @@ proto.tss.v1beta1.Complaint.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Complaint} + * @return {!proto.band.tss.v1beta1.Complaint} */ -proto.tss.v1beta1.Complaint.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.Complaint.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Complaint; - return proto.tss.v1beta1.Complaint.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.Complaint; + return proto.band.tss.v1beta1.Complaint.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.Complaint} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.Complaint} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Complaint} + * @return {!proto.band.tss.v1beta1.Complaint} */ -proto.tss.v1beta1.Complaint.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.Complaint.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4180,9 +4235,9 @@ proto.tss.v1beta1.Complaint.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.Complaint.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.Complaint.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Complaint.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.Complaint.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4190,11 +4245,11 @@ proto.tss.v1beta1.Complaint.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Complaint} message + * @param {!proto.band.tss.v1beta1.Complaint} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.Complaint.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.Complaint.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getComplainant(); if (f !== 0) { @@ -4231,16 +4286,16 @@ proto.tss.v1beta1.Complaint.serializeBinaryToWriter = function(message, writer) * optional uint64 complainant = 1; * @return {number} */ -proto.tss.v1beta1.Complaint.prototype.getComplainant = function() { +proto.band.tss.v1beta1.Complaint.prototype.getComplainant = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Complaint} returns this + * @return {!proto.band.tss.v1beta1.Complaint} returns this */ -proto.tss.v1beta1.Complaint.prototype.setComplainant = function(value) { +proto.band.tss.v1beta1.Complaint.prototype.setComplainant = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -4249,16 +4304,16 @@ proto.tss.v1beta1.Complaint.prototype.setComplainant = function(value) { * optional uint64 respondent = 2; * @return {number} */ -proto.tss.v1beta1.Complaint.prototype.getRespondent = function() { +proto.band.tss.v1beta1.Complaint.prototype.getRespondent = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.Complaint} returns this + * @return {!proto.band.tss.v1beta1.Complaint} returns this */ -proto.tss.v1beta1.Complaint.prototype.setRespondent = function(value) { +proto.band.tss.v1beta1.Complaint.prototype.setRespondent = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; @@ -4267,7 +4322,7 @@ proto.tss.v1beta1.Complaint.prototype.setRespondent = function(value) { * optional bytes key_sym = 3; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Complaint.prototype.getKeySym = function() { +proto.band.tss.v1beta1.Complaint.prototype.getKeySym = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -4277,7 +4332,7 @@ proto.tss.v1beta1.Complaint.prototype.getKeySym = function() { * This is a type-conversion wrapper around `getKeySym()` * @return {string} */ -proto.tss.v1beta1.Complaint.prototype.getKeySym_asB64 = function() { +proto.band.tss.v1beta1.Complaint.prototype.getKeySym_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getKeySym())); }; @@ -4290,7 +4345,7 @@ proto.tss.v1beta1.Complaint.prototype.getKeySym_asB64 = function() { * This is a type-conversion wrapper around `getKeySym()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Complaint.prototype.getKeySym_asU8 = function() { +proto.band.tss.v1beta1.Complaint.prototype.getKeySym_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getKeySym())); }; @@ -4298,9 +4353,9 @@ proto.tss.v1beta1.Complaint.prototype.getKeySym_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Complaint} returns this + * @return {!proto.band.tss.v1beta1.Complaint} returns this */ -proto.tss.v1beta1.Complaint.prototype.setKeySym = function(value) { +proto.band.tss.v1beta1.Complaint.prototype.setKeySym = function(value) { return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -4309,7 +4364,7 @@ proto.tss.v1beta1.Complaint.prototype.setKeySym = function(value) { * optional bytes signature = 4; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.Complaint.prototype.getSignature = function() { +proto.band.tss.v1beta1.Complaint.prototype.getSignature = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; @@ -4319,7 +4374,7 @@ proto.tss.v1beta1.Complaint.prototype.getSignature = function() { * This is a type-conversion wrapper around `getSignature()` * @return {string} */ -proto.tss.v1beta1.Complaint.prototype.getSignature_asB64 = function() { +proto.band.tss.v1beta1.Complaint.prototype.getSignature_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getSignature())); }; @@ -4332,7 +4387,7 @@ proto.tss.v1beta1.Complaint.prototype.getSignature_asB64 = function() { * This is a type-conversion wrapper around `getSignature()` * @return {!Uint8Array} */ -proto.tss.v1beta1.Complaint.prototype.getSignature_asU8 = function() { +proto.band.tss.v1beta1.Complaint.prototype.getSignature_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getSignature())); }; @@ -4340,9 +4395,9 @@ proto.tss.v1beta1.Complaint.prototype.getSignature_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.Complaint} returns this + * @return {!proto.band.tss.v1beta1.Complaint} returns this */ -proto.tss.v1beta1.Complaint.prototype.setSignature = function(value) { +proto.band.tss.v1beta1.Complaint.prototype.setSignature = function(value) { return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -4363,8 +4418,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.ComplaintWithStatus.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.ComplaintWithStatus.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.ComplaintWithStatus.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.ComplaintWithStatus.toObject(opt_includeInstance, this); }; @@ -4373,13 +4428,13 @@ proto.tss.v1beta1.ComplaintWithStatus.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.ComplaintWithStatus} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.ComplaintWithStatus} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.ComplaintWithStatus.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.ComplaintWithStatus.toObject = function(includeInstance, msg) { var f, obj = { - complaint: (f = msg.getComplaint()) && proto.tss.v1beta1.Complaint.toObject(includeInstance, f), + complaint: (f = msg.getComplaint()) && proto.band.tss.v1beta1.Complaint.toObject(includeInstance, f), complaintStatus: jspb.Message.getFieldWithDefault(msg, 2, 0) }; @@ -4394,23 +4449,23 @@ proto.tss.v1beta1.ComplaintWithStatus.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.ComplaintWithStatus} + * @return {!proto.band.tss.v1beta1.ComplaintWithStatus} */ -proto.tss.v1beta1.ComplaintWithStatus.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.ComplaintWithStatus.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.ComplaintWithStatus; - return proto.tss.v1beta1.ComplaintWithStatus.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.ComplaintWithStatus; + return proto.band.tss.v1beta1.ComplaintWithStatus.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.ComplaintWithStatus} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.ComplaintWithStatus} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.ComplaintWithStatus} + * @return {!proto.band.tss.v1beta1.ComplaintWithStatus} */ -proto.tss.v1beta1.ComplaintWithStatus.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.ComplaintWithStatus.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4418,12 +4473,12 @@ proto.tss.v1beta1.ComplaintWithStatus.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.tss.v1beta1.Complaint; - reader.readMessage(value,proto.tss.v1beta1.Complaint.deserializeBinaryFromReader); + var value = new proto.band.tss.v1beta1.Complaint; + reader.readMessage(value,proto.band.tss.v1beta1.Complaint.deserializeBinaryFromReader); msg.setComplaint(value); break; case 2: - var value = /** @type {!proto.tss.v1beta1.ComplaintStatus} */ (reader.readEnum()); + var value = /** @type {!proto.band.tss.v1beta1.ComplaintStatus} */ (reader.readEnum()); msg.setComplaintStatus(value); break; default: @@ -4439,9 +4494,9 @@ proto.tss.v1beta1.ComplaintWithStatus.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.ComplaintWithStatus.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.ComplaintWithStatus.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.ComplaintWithStatus.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.ComplaintWithStatus.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4449,18 +4504,18 @@ proto.tss.v1beta1.ComplaintWithStatus.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.ComplaintWithStatus} message + * @param {!proto.band.tss.v1beta1.ComplaintWithStatus} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.ComplaintWithStatus.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.ComplaintWithStatus.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getComplaint(); if (f != null) { writer.writeMessage( 1, f, - proto.tss.v1beta1.Complaint.serializeBinaryToWriter + proto.band.tss.v1beta1.Complaint.serializeBinaryToWriter ); } f = message.getComplaintStatus(); @@ -4475,28 +4530,28 @@ proto.tss.v1beta1.ComplaintWithStatus.serializeBinaryToWriter = function(message /** * optional Complaint complaint = 1; - * @return {?proto.tss.v1beta1.Complaint} + * @return {?proto.band.tss.v1beta1.Complaint} */ -proto.tss.v1beta1.ComplaintWithStatus.prototype.getComplaint = function() { - return /** @type{?proto.tss.v1beta1.Complaint} */ ( - jspb.Message.getWrapperField(this, proto.tss.v1beta1.Complaint, 1)); +proto.band.tss.v1beta1.ComplaintWithStatus.prototype.getComplaint = function() { + return /** @type{?proto.band.tss.v1beta1.Complaint} */ ( + jspb.Message.getWrapperField(this, proto.band.tss.v1beta1.Complaint, 1)); }; /** - * @param {?proto.tss.v1beta1.Complaint|undefined} value - * @return {!proto.tss.v1beta1.ComplaintWithStatus} returns this + * @param {?proto.band.tss.v1beta1.Complaint|undefined} value + * @return {!proto.band.tss.v1beta1.ComplaintWithStatus} returns this */ -proto.tss.v1beta1.ComplaintWithStatus.prototype.setComplaint = function(value) { +proto.band.tss.v1beta1.ComplaintWithStatus.prototype.setComplaint = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.ComplaintWithStatus} returns this + * @return {!proto.band.tss.v1beta1.ComplaintWithStatus} returns this */ -proto.tss.v1beta1.ComplaintWithStatus.prototype.clearComplaint = function() { +proto.band.tss.v1beta1.ComplaintWithStatus.prototype.clearComplaint = function() { return this.setComplaint(undefined); }; @@ -4505,25 +4560,25 @@ proto.tss.v1beta1.ComplaintWithStatus.prototype.clearComplaint = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tss.v1beta1.ComplaintWithStatus.prototype.hasComplaint = function() { +proto.band.tss.v1beta1.ComplaintWithStatus.prototype.hasComplaint = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional ComplaintStatus complaint_status = 2; - * @return {!proto.tss.v1beta1.ComplaintStatus} + * @return {!proto.band.tss.v1beta1.ComplaintStatus} */ -proto.tss.v1beta1.ComplaintWithStatus.prototype.getComplaintStatus = function() { - return /** @type {!proto.tss.v1beta1.ComplaintStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.band.tss.v1beta1.ComplaintWithStatus.prototype.getComplaintStatus = function() { + return /** @type {!proto.band.tss.v1beta1.ComplaintStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!proto.tss.v1beta1.ComplaintStatus} value - * @return {!proto.tss.v1beta1.ComplaintWithStatus} returns this + * @param {!proto.band.tss.v1beta1.ComplaintStatus} value + * @return {!proto.band.tss.v1beta1.ComplaintWithStatus} returns this */ -proto.tss.v1beta1.ComplaintWithStatus.prototype.setComplaintStatus = function(value) { +proto.band.tss.v1beta1.ComplaintWithStatus.prototype.setComplaintStatus = function(value) { return jspb.Message.setProto3EnumField(this, 2, value); }; @@ -4534,7 +4589,7 @@ proto.tss.v1beta1.ComplaintWithStatus.prototype.setComplaintStatus = function(va * @private {!Array} * @const */ -proto.tss.v1beta1.ComplaintsWithStatus.repeatedFields_ = [2]; +proto.band.tss.v1beta1.ComplaintsWithStatus.repeatedFields_ = [2]; @@ -4551,8 +4606,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.ComplaintsWithStatus.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.ComplaintsWithStatus.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.ComplaintsWithStatus.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.ComplaintsWithStatus.toObject(opt_includeInstance, this); }; @@ -4561,15 +4616,15 @@ proto.tss.v1beta1.ComplaintsWithStatus.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.ComplaintsWithStatus} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.ComplaintsWithStatus} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.ComplaintsWithStatus.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.ComplaintsWithStatus.toObject = function(includeInstance, msg) { var f, obj = { memberId: jspb.Message.getFieldWithDefault(msg, 1, 0), complaintsWithStatusList: jspb.Message.toObjectList(msg.getComplaintsWithStatusList(), - proto.tss.v1beta1.ComplaintWithStatus.toObject, includeInstance) + proto.band.tss.v1beta1.ComplaintWithStatus.toObject, includeInstance) }; if (includeInstance) { @@ -4583,23 +4638,23 @@ proto.tss.v1beta1.ComplaintsWithStatus.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.ComplaintsWithStatus} + * @return {!proto.band.tss.v1beta1.ComplaintsWithStatus} */ -proto.tss.v1beta1.ComplaintsWithStatus.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.ComplaintsWithStatus.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.ComplaintsWithStatus; - return proto.tss.v1beta1.ComplaintsWithStatus.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.ComplaintsWithStatus; + return proto.band.tss.v1beta1.ComplaintsWithStatus.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.ComplaintsWithStatus} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.ComplaintsWithStatus} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.ComplaintsWithStatus} + * @return {!proto.band.tss.v1beta1.ComplaintsWithStatus} */ -proto.tss.v1beta1.ComplaintsWithStatus.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.ComplaintsWithStatus.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4611,8 +4666,8 @@ proto.tss.v1beta1.ComplaintsWithStatus.deserializeBinaryFromReader = function(ms msg.setMemberId(value); break; case 2: - var value = new proto.tss.v1beta1.ComplaintWithStatus; - reader.readMessage(value,proto.tss.v1beta1.ComplaintWithStatus.deserializeBinaryFromReader); + var value = new proto.band.tss.v1beta1.ComplaintWithStatus; + reader.readMessage(value,proto.band.tss.v1beta1.ComplaintWithStatus.deserializeBinaryFromReader); msg.addComplaintsWithStatus(value); break; default: @@ -4628,9 +4683,9 @@ proto.tss.v1beta1.ComplaintsWithStatus.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.ComplaintsWithStatus.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.ComplaintsWithStatus.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.ComplaintsWithStatus.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.ComplaintsWithStatus.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4638,11 +4693,11 @@ proto.tss.v1beta1.ComplaintsWithStatus.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.ComplaintsWithStatus} message + * @param {!proto.band.tss.v1beta1.ComplaintsWithStatus} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.ComplaintsWithStatus.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.ComplaintsWithStatus.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMemberId(); if (f !== 0) { @@ -4656,7 +4711,7 @@ proto.tss.v1beta1.ComplaintsWithStatus.serializeBinaryToWriter = function(messag writer.writeRepeatedMessage( 2, f, - proto.tss.v1beta1.ComplaintWithStatus.serializeBinaryToWriter + proto.band.tss.v1beta1.ComplaintWithStatus.serializeBinaryToWriter ); } }; @@ -4666,54 +4721,54 @@ proto.tss.v1beta1.ComplaintsWithStatus.serializeBinaryToWriter = function(messag * optional uint64 member_id = 1; * @return {number} */ -proto.tss.v1beta1.ComplaintsWithStatus.prototype.getMemberId = function() { +proto.band.tss.v1beta1.ComplaintsWithStatus.prototype.getMemberId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.ComplaintsWithStatus} returns this + * @return {!proto.band.tss.v1beta1.ComplaintsWithStatus} returns this */ -proto.tss.v1beta1.ComplaintsWithStatus.prototype.setMemberId = function(value) { +proto.band.tss.v1beta1.ComplaintsWithStatus.prototype.setMemberId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * repeated ComplaintWithStatus complaints_with_status = 2; - * @return {!Array} + * @return {!Array} */ -proto.tss.v1beta1.ComplaintsWithStatus.prototype.getComplaintsWithStatusList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tss.v1beta1.ComplaintWithStatus, 2)); +proto.band.tss.v1beta1.ComplaintsWithStatus.prototype.getComplaintsWithStatusList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.ComplaintWithStatus, 2)); }; /** - * @param {!Array} value - * @return {!proto.tss.v1beta1.ComplaintsWithStatus} returns this + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.ComplaintsWithStatus} returns this */ -proto.tss.v1beta1.ComplaintsWithStatus.prototype.setComplaintsWithStatusList = function(value) { +proto.band.tss.v1beta1.ComplaintsWithStatus.prototype.setComplaintsWithStatusList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {!proto.tss.v1beta1.ComplaintWithStatus=} opt_value + * @param {!proto.band.tss.v1beta1.ComplaintWithStatus=} opt_value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.ComplaintWithStatus} + * @return {!proto.band.tss.v1beta1.ComplaintWithStatus} */ -proto.tss.v1beta1.ComplaintsWithStatus.prototype.addComplaintsWithStatus = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tss.v1beta1.ComplaintWithStatus, opt_index); +proto.band.tss.v1beta1.ComplaintsWithStatus.prototype.addComplaintsWithStatus = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.tss.v1beta1.ComplaintWithStatus, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.ComplaintsWithStatus} returns this + * @return {!proto.band.tss.v1beta1.ComplaintsWithStatus} returns this */ -proto.tss.v1beta1.ComplaintsWithStatus.prototype.clearComplaintsWithStatusList = function() { +proto.band.tss.v1beta1.ComplaintsWithStatus.prototype.clearComplaintsWithStatusList = function() { return this.setComplaintsWithStatusList([]); }; @@ -4724,7 +4779,7 @@ proto.tss.v1beta1.ComplaintsWithStatus.prototype.clearComplaintsWithStatusList = * @private {!Array} * @const */ -proto.tss.v1beta1.PendingProcessGroups.repeatedFields_ = [1]; +proto.band.tss.v1beta1.PendingProcessGroups.repeatedFields_ = [1]; @@ -4741,8 +4796,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.PendingProcessGroups.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.PendingProcessGroups.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.PendingProcessGroups.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.PendingProcessGroups.toObject(opt_includeInstance, this); }; @@ -4751,11 +4806,11 @@ proto.tss.v1beta1.PendingProcessGroups.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.PendingProcessGroups} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.PendingProcessGroups} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.PendingProcessGroups.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.PendingProcessGroups.toObject = function(includeInstance, msg) { var f, obj = { groupIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; @@ -4771,23 +4826,23 @@ proto.tss.v1beta1.PendingProcessGroups.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.PendingProcessGroups} + * @return {!proto.band.tss.v1beta1.PendingProcessGroups} */ -proto.tss.v1beta1.PendingProcessGroups.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.PendingProcessGroups.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.PendingProcessGroups; - return proto.tss.v1beta1.PendingProcessGroups.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.PendingProcessGroups; + return proto.band.tss.v1beta1.PendingProcessGroups.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.PendingProcessGroups} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.PendingProcessGroups} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.PendingProcessGroups} + * @return {!proto.band.tss.v1beta1.PendingProcessGroups} */ -proto.tss.v1beta1.PendingProcessGroups.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.PendingProcessGroups.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4813,9 +4868,9 @@ proto.tss.v1beta1.PendingProcessGroups.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.PendingProcessGroups.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.PendingProcessGroups.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.PendingProcessGroups.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.PendingProcessGroups.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4823,11 +4878,11 @@ proto.tss.v1beta1.PendingProcessGroups.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.PendingProcessGroups} message + * @param {!proto.band.tss.v1beta1.PendingProcessGroups} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.PendingProcessGroups.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.PendingProcessGroups.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getGroupIdsList(); if (f.length > 0) { @@ -4843,16 +4898,16 @@ proto.tss.v1beta1.PendingProcessGroups.serializeBinaryToWriter = function(messag * repeated uint64 group_ids = 1; * @return {!Array} */ -proto.tss.v1beta1.PendingProcessGroups.prototype.getGroupIdsList = function() { +proto.band.tss.v1beta1.PendingProcessGroups.prototype.getGroupIdsList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array} value - * @return {!proto.tss.v1beta1.PendingProcessGroups} returns this + * @return {!proto.band.tss.v1beta1.PendingProcessGroups} returns this */ -proto.tss.v1beta1.PendingProcessGroups.prototype.setGroupIdsList = function(value) { +proto.band.tss.v1beta1.PendingProcessGroups.prototype.setGroupIdsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; @@ -4860,18 +4915,18 @@ proto.tss.v1beta1.PendingProcessGroups.prototype.setGroupIdsList = function(valu /** * @param {number} value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.PendingProcessGroups} returns this + * @return {!proto.band.tss.v1beta1.PendingProcessGroups} returns this */ -proto.tss.v1beta1.PendingProcessGroups.prototype.addGroupIds = function(value, opt_index) { +proto.band.tss.v1beta1.PendingProcessGroups.prototype.addGroupIds = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.PendingProcessGroups} returns this + * @return {!proto.band.tss.v1beta1.PendingProcessGroups} returns this */ -proto.tss.v1beta1.PendingProcessGroups.prototype.clearGroupIdsList = function() { +proto.band.tss.v1beta1.PendingProcessGroups.prototype.clearGroupIdsList = function() { return this.setGroupIdsList([]); }; @@ -4882,7 +4937,7 @@ proto.tss.v1beta1.PendingProcessGroups.prototype.clearGroupIdsList = function() * @private {!Array} * @const */ -proto.tss.v1beta1.PendingProcessSignings.repeatedFields_ = [1]; +proto.band.tss.v1beta1.PendingProcessSignings.repeatedFields_ = [1]; @@ -4899,8 +4954,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.PendingProcessSignings.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.PendingProcessSignings.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.PendingProcessSignings.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.PendingProcessSignings.toObject(opt_includeInstance, this); }; @@ -4909,11 +4964,11 @@ proto.tss.v1beta1.PendingProcessSignings.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.PendingProcessSignings} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.PendingProcessSignings} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.PendingProcessSignings.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.PendingProcessSignings.toObject = function(includeInstance, msg) { var f, obj = { signingIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; @@ -4929,23 +4984,23 @@ proto.tss.v1beta1.PendingProcessSignings.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.PendingProcessSignings} + * @return {!proto.band.tss.v1beta1.PendingProcessSignings} */ -proto.tss.v1beta1.PendingProcessSignings.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.PendingProcessSignings.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.PendingProcessSignings; - return proto.tss.v1beta1.PendingProcessSignings.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.PendingProcessSignings; + return proto.band.tss.v1beta1.PendingProcessSignings.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.PendingProcessSignings} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.PendingProcessSignings} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.PendingProcessSignings} + * @return {!proto.band.tss.v1beta1.PendingProcessSignings} */ -proto.tss.v1beta1.PendingProcessSignings.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.PendingProcessSignings.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4971,9 +5026,9 @@ proto.tss.v1beta1.PendingProcessSignings.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.PendingProcessSignings.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.PendingProcessSignings.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.PendingProcessSignings.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.PendingProcessSignings.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4981,11 +5036,11 @@ proto.tss.v1beta1.PendingProcessSignings.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.PendingProcessSignings} message + * @param {!proto.band.tss.v1beta1.PendingProcessSignings} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.PendingProcessSignings.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.PendingProcessSignings.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSigningIdsList(); if (f.length > 0) { @@ -5001,16 +5056,16 @@ proto.tss.v1beta1.PendingProcessSignings.serializeBinaryToWriter = function(mess * repeated uint64 signing_ids = 1; * @return {!Array} */ -proto.tss.v1beta1.PendingProcessSignings.prototype.getSigningIdsList = function() { +proto.band.tss.v1beta1.PendingProcessSignings.prototype.getSigningIdsList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array} value - * @return {!proto.tss.v1beta1.PendingProcessSignings} returns this + * @return {!proto.band.tss.v1beta1.PendingProcessSignings} returns this */ -proto.tss.v1beta1.PendingProcessSignings.prototype.setSigningIdsList = function(value) { +proto.band.tss.v1beta1.PendingProcessSignings.prototype.setSigningIdsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; @@ -5018,18 +5073,18 @@ proto.tss.v1beta1.PendingProcessSignings.prototype.setSigningIdsList = function( /** * @param {number} value * @param {number=} opt_index - * @return {!proto.tss.v1beta1.PendingProcessSignings} returns this + * @return {!proto.band.tss.v1beta1.PendingProcessSignings} returns this */ -proto.tss.v1beta1.PendingProcessSignings.prototype.addSigningIds = function(value, opt_index) { +proto.band.tss.v1beta1.PendingProcessSignings.prototype.addSigningIds = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.PendingProcessSignings} returns this + * @return {!proto.band.tss.v1beta1.PendingProcessSignings} returns this */ -proto.tss.v1beta1.PendingProcessSignings.prototype.clearSigningIdsList = function() { +proto.band.tss.v1beta1.PendingProcessSignings.prototype.clearSigningIdsList = function() { return this.setSigningIdsList([]); }; @@ -5050,8 +5105,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.PartialSignature.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.PartialSignature.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.PartialSignature.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.PartialSignature.toObject(opt_includeInstance, this); }; @@ -5060,13 +5115,15 @@ proto.tss.v1beta1.PartialSignature.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.PartialSignature} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.PartialSignature} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.PartialSignature.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.PartialSignature.toObject = function(includeInstance, msg) { var f, obj = { - memberId: jspb.Message.getFieldWithDefault(msg, 1, 0), + signingId: jspb.Message.getFieldWithDefault(msg, 1, 0), + signingAttempt: jspb.Message.getFieldWithDefault(msg, 2, 0), + memberId: jspb.Message.getFieldWithDefault(msg, 3, 0), signature: msg.getSignature_asB64() }; @@ -5081,23 +5138,23 @@ proto.tss.v1beta1.PartialSignature.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.PartialSignature} + * @return {!proto.band.tss.v1beta1.PartialSignature} */ -proto.tss.v1beta1.PartialSignature.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.PartialSignature.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.PartialSignature; - return proto.tss.v1beta1.PartialSignature.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.PartialSignature; + return proto.band.tss.v1beta1.PartialSignature.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.PartialSignature} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.PartialSignature} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.PartialSignature} + * @return {!proto.band.tss.v1beta1.PartialSignature} */ -proto.tss.v1beta1.PartialSignature.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.PartialSignature.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5106,9 +5163,17 @@ proto.tss.v1beta1.PartialSignature.deserializeBinaryFromReader = function(msg, r switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); - msg.setMemberId(value); + msg.setSigningId(value); break; case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningAttempt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMemberId(value); + break; + case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setSignature(value); break; @@ -5125,9 +5190,9 @@ proto.tss.v1beta1.PartialSignature.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.PartialSignature.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.PartialSignature.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.PartialSignature.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.PartialSignature.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5135,75 +5200,125 @@ proto.tss.v1beta1.PartialSignature.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.PartialSignature} message + * @param {!proto.band.tss.v1beta1.PartialSignature} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.PartialSignature.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.PartialSignature.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMemberId(); + f = message.getSigningId(); if (f !== 0) { writer.writeUint64( 1, f ); } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getSigningAttempt(); + if (f !== 0) { + writer.writeUint64( 2, f ); } + f = message.getMemberId(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } }; /** - * optional uint64 member_id = 1; + * optional uint64 signing_id = 1; * @return {number} */ -proto.tss.v1beta1.PartialSignature.prototype.getMemberId = function() { +proto.band.tss.v1beta1.PartialSignature.prototype.getSigningId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tss.v1beta1.PartialSignature} returns this + * @return {!proto.band.tss.v1beta1.PartialSignature} returns this */ -proto.tss.v1beta1.PartialSignature.prototype.setMemberId = function(value) { +proto.band.tss.v1beta1.PartialSignature.prototype.setSigningId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional bytes signature = 2; + * optional uint64 signing_attempt = 2; + * @return {number} + */ +proto.band.tss.v1beta1.PartialSignature.prototype.getSigningAttempt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.PartialSignature} returns this + */ +proto.band.tss.v1beta1.PartialSignature.prototype.setSigningAttempt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 member_id = 3; + * @return {number} + */ +proto.band.tss.v1beta1.PartialSignature.prototype.getMemberId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.PartialSignature} returns this + */ +proto.band.tss.v1beta1.PartialSignature.prototype.setMemberId = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes signature = 4; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.PartialSignature.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.band.tss.v1beta1.PartialSignature.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional bytes signature = 2; + * optional bytes signature = 4; * This is a type-conversion wrapper around `getSignature()` * @return {string} */ -proto.tss.v1beta1.PartialSignature.prototype.getSignature_asB64 = function() { +proto.band.tss.v1beta1.PartialSignature.prototype.getSignature_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getSignature())); }; /** - * optional bytes signature = 2; + * optional bytes signature = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getSignature()` * @return {!Uint8Array} */ -proto.tss.v1beta1.PartialSignature.prototype.getSignature_asU8 = function() { +proto.band.tss.v1beta1.PartialSignature.prototype.getSignature_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getSignature())); }; @@ -5211,10 +5326,10 @@ proto.tss.v1beta1.PartialSignature.prototype.getSignature_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.PartialSignature} returns this + * @return {!proto.band.tss.v1beta1.PartialSignature} returns this */ -proto.tss.v1beta1.PartialSignature.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.band.tss.v1beta1.PartialSignature.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -5234,8 +5349,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.TextRequestingSignature.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.TextRequestingSignature.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.TextSignatureOrder.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.TextSignatureOrder.toObject(opt_includeInstance, this); }; @@ -5244,11 +5359,11 @@ proto.tss.v1beta1.TextRequestingSignature.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.TextRequestingSignature} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.TextSignatureOrder} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.TextRequestingSignature.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.TextSignatureOrder.toObject = function(includeInstance, msg) { var f, obj = { message: msg.getMessage_asB64() }; @@ -5264,23 +5379,23 @@ proto.tss.v1beta1.TextRequestingSignature.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.TextRequestingSignature} + * @return {!proto.band.tss.v1beta1.TextSignatureOrder} */ -proto.tss.v1beta1.TextRequestingSignature.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.TextSignatureOrder.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.TextRequestingSignature; - return proto.tss.v1beta1.TextRequestingSignature.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.TextSignatureOrder; + return proto.band.tss.v1beta1.TextSignatureOrder.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.TextRequestingSignature} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.TextSignatureOrder} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.TextRequestingSignature} + * @return {!proto.band.tss.v1beta1.TextSignatureOrder} */ -proto.tss.v1beta1.TextRequestingSignature.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.TextSignatureOrder.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5304,9 +5419,9 @@ proto.tss.v1beta1.TextRequestingSignature.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.TextRequestingSignature.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.TextSignatureOrder.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.TextRequestingSignature.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.TextSignatureOrder.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5314,11 +5429,11 @@ proto.tss.v1beta1.TextRequestingSignature.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.TextRequestingSignature} message + * @param {!proto.band.tss.v1beta1.TextSignatureOrder} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.TextRequestingSignature.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.TextSignatureOrder.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMessage_asU8(); if (f.length > 0) { @@ -5334,7 +5449,7 @@ proto.tss.v1beta1.TextRequestingSignature.serializeBinaryToWriter = function(mes * optional bytes message = 1; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.TextRequestingSignature.prototype.getMessage = function() { +proto.band.tss.v1beta1.TextSignatureOrder.prototype.getMessage = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -5344,7 +5459,7 @@ proto.tss.v1beta1.TextRequestingSignature.prototype.getMessage = function() { * This is a type-conversion wrapper around `getMessage()` * @return {string} */ -proto.tss.v1beta1.TextRequestingSignature.prototype.getMessage_asB64 = function() { +proto.band.tss.v1beta1.TextSignatureOrder.prototype.getMessage_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getMessage())); }; @@ -5357,7 +5472,7 @@ proto.tss.v1beta1.TextRequestingSignature.prototype.getMessage_asB64 = function( * This is a type-conversion wrapper around `getMessage()` * @return {!Uint8Array} */ -proto.tss.v1beta1.TextRequestingSignature.prototype.getMessage_asU8 = function() { +proto.band.tss.v1beta1.TextSignatureOrder.prototype.getMessage_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getMessage())); }; @@ -5365,9 +5480,9 @@ proto.tss.v1beta1.TextRequestingSignature.prototype.getMessage_asU8 = function() /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.TextRequestingSignature} returns this + * @return {!proto.band.tss.v1beta1.TextSignatureOrder} returns this */ -proto.tss.v1beta1.TextRequestingSignature.prototype.setMessage = function(value) { +proto.band.tss.v1beta1.TextSignatureOrder.prototype.setMessage = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5388,8 +5503,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tss.v1beta1.EVMSignature.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.EVMSignature.toObject(opt_includeInstance, this); +proto.band.tss.v1beta1.EVMSignature.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.EVMSignature.toObject(opt_includeInstance, this); }; @@ -5398,11 +5513,11 @@ proto.tss.v1beta1.EVMSignature.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.EVMSignature} msg The msg instance to transform. + * @param {!proto.band.tss.v1beta1.EVMSignature} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.EVMSignature.toObject = function(includeInstance, msg) { +proto.band.tss.v1beta1.EVMSignature.toObject = function(includeInstance, msg) { var f, obj = { rAddress: msg.getRAddress_asB64(), signature: msg.getSignature_asB64() @@ -5419,23 +5534,23 @@ proto.tss.v1beta1.EVMSignature.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.EVMSignature} + * @return {!proto.band.tss.v1beta1.EVMSignature} */ -proto.tss.v1beta1.EVMSignature.deserializeBinary = function(bytes) { +proto.band.tss.v1beta1.EVMSignature.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.EVMSignature; - return proto.tss.v1beta1.EVMSignature.deserializeBinaryFromReader(msg, reader); + var msg = new proto.band.tss.v1beta1.EVMSignature; + return proto.band.tss.v1beta1.EVMSignature.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tss.v1beta1.EVMSignature} msg The message object to deserialize into. + * @param {!proto.band.tss.v1beta1.EVMSignature} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.EVMSignature} + * @return {!proto.band.tss.v1beta1.EVMSignature} */ -proto.tss.v1beta1.EVMSignature.deserializeBinaryFromReader = function(msg, reader) { +proto.band.tss.v1beta1.EVMSignature.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5463,9 +5578,9 @@ proto.tss.v1beta1.EVMSignature.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tss.v1beta1.EVMSignature.prototype.serializeBinary = function() { +proto.band.tss.v1beta1.EVMSignature.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.EVMSignature.serializeBinaryToWriter(this, writer); + proto.band.tss.v1beta1.EVMSignature.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5473,11 +5588,11 @@ proto.tss.v1beta1.EVMSignature.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.EVMSignature} message + * @param {!proto.band.tss.v1beta1.EVMSignature} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.EVMSignature.serializeBinaryToWriter = function(message, writer) { +proto.band.tss.v1beta1.EVMSignature.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRAddress_asU8(); if (f.length > 0) { @@ -5500,7 +5615,7 @@ proto.tss.v1beta1.EVMSignature.serializeBinaryToWriter = function(message, write * optional bytes r_address = 1; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.EVMSignature.prototype.getRAddress = function() { +proto.band.tss.v1beta1.EVMSignature.prototype.getRAddress = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -5510,7 +5625,7 @@ proto.tss.v1beta1.EVMSignature.prototype.getRAddress = function() { * This is a type-conversion wrapper around `getRAddress()` * @return {string} */ -proto.tss.v1beta1.EVMSignature.prototype.getRAddress_asB64 = function() { +proto.band.tss.v1beta1.EVMSignature.prototype.getRAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getRAddress())); }; @@ -5523,7 +5638,7 @@ proto.tss.v1beta1.EVMSignature.prototype.getRAddress_asB64 = function() { * This is a type-conversion wrapper around `getRAddress()` * @return {!Uint8Array} */ -proto.tss.v1beta1.EVMSignature.prototype.getRAddress_asU8 = function() { +proto.band.tss.v1beta1.EVMSignature.prototype.getRAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getRAddress())); }; @@ -5531,9 +5646,9 @@ proto.tss.v1beta1.EVMSignature.prototype.getRAddress_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.EVMSignature} returns this + * @return {!proto.band.tss.v1beta1.EVMSignature} returns this */ -proto.tss.v1beta1.EVMSignature.prototype.setRAddress = function(value) { +proto.band.tss.v1beta1.EVMSignature.prototype.setRAddress = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5542,7 +5657,7 @@ proto.tss.v1beta1.EVMSignature.prototype.setRAddress = function(value) { * optional bytes signature = 2; * @return {!(string|Uint8Array)} */ -proto.tss.v1beta1.EVMSignature.prototype.getSignature = function() { +proto.band.tss.v1beta1.EVMSignature.prototype.getSignature = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -5552,7 +5667,7 @@ proto.tss.v1beta1.EVMSignature.prototype.getSignature = function() { * This is a type-conversion wrapper around `getSignature()` * @return {string} */ -proto.tss.v1beta1.EVMSignature.prototype.getSignature_asB64 = function() { +proto.band.tss.v1beta1.EVMSignature.prototype.getSignature_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getSignature())); }; @@ -5565,7 +5680,7 @@ proto.tss.v1beta1.EVMSignature.prototype.getSignature_asB64 = function() { * This is a type-conversion wrapper around `getSignature()` * @return {!Uint8Array} */ -proto.tss.v1beta1.EVMSignature.prototype.getSignature_asU8 = function() { +proto.band.tss.v1beta1.EVMSignature.prototype.getSignature_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getSignature())); }; @@ -5573,74 +5688,676 @@ proto.tss.v1beta1.EVMSignature.prototype.getSignature_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.EVMSignature} returns this + * @return {!proto.band.tss.v1beta1.EVMSignature} returns this */ -proto.tss.v1beta1.EVMSignature.prototype.setSignature = function(value) { +proto.band.tss.v1beta1.EVMSignature.prototype.setSignature = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; + /** - * @enum {number} + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tss.v1beta1.SigningResult.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.tss.v1beta1.ReplacementStatus = { - REPLACEMENT_STATUS_UNSPECIFIED: 0, - REPLACEMENT_STATUS_WAITING: 1, - REPLACEMENT_STATUS_SUCCESS: 2, - REPLACEMENT_STATUS_FALLEN: 3 +proto.band.tss.v1beta1.SigningResult.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.SigningResult.toObject(opt_includeInstance, this); }; + /** - * @enum {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.SigningResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tss.v1beta1.SigningStatus = { - SIGNING_STATUS_UNSPECIFIED: 0, - SIGNING_STATUS_WAITING: 1, - SIGNING_STATUS_SUCCESS: 2, - SIGNING_STATUS_EXPIRED: 3, - SIGNING_STATUS_FALLEN: 4 +proto.band.tss.v1beta1.SigningResult.toObject = function(includeInstance, msg) { + var f, obj = { + signing: (f = msg.getSigning()) && proto.band.tss.v1beta1.Signing.toObject(includeInstance, f), + currentSigningAttempt: (f = msg.getCurrentSigningAttempt()) && proto.band.tss.v1beta1.SigningAttempt.toObject(includeInstance, f), + evmSignature: (f = msg.getEvmSignature()) && proto.band.tss.v1beta1.EVMSignature.toObject(includeInstance, f), + receivedPartialSignaturesList: jspb.Message.toObjectList(msg.getReceivedPartialSignaturesList(), + proto.band.tss.v1beta1.PartialSignature.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} + /** - * @enum {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.SigningResult} */ -proto.tss.v1beta1.MemberStatus = { - MEMBER_STATUS_UNSPECIFIED: 0, - MEMBER_STATUS_ACTIVE: 1, - MEMBER_STATUS_INACTIVE: 2, - MEMBER_STATUS_JAIL: 3 +proto.band.tss.v1beta1.SigningResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.SigningResult; + return proto.band.tss.v1beta1.SigningResult.deserializeBinaryFromReader(msg, reader); }; + /** - * @enum {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.SigningResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.SigningResult} */ -proto.tss.v1beta1.GroupStatus = { - GROUP_STATUS_UNSPECIFIED: 0, - GROUP_STATUS_ROUND_1: 1, - GROUP_STATUS_ROUND_2: 2, - GROUP_STATUS_ROUND_3: 3, - GROUP_STATUS_ACTIVE: 4, - GROUP_STATUS_EXPIRED: 5, - GROUP_STATUS_FALLEN: 6 +proto.band.tss.v1beta1.SigningResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.tss.v1beta1.Signing; + reader.readMessage(value,proto.band.tss.v1beta1.Signing.deserializeBinaryFromReader); + msg.setSigning(value); + break; + case 2: + var value = new proto.band.tss.v1beta1.SigningAttempt; + reader.readMessage(value,proto.band.tss.v1beta1.SigningAttempt.deserializeBinaryFromReader); + msg.setCurrentSigningAttempt(value); + break; + case 3: + var value = new proto.band.tss.v1beta1.EVMSignature; + reader.readMessage(value,proto.band.tss.v1beta1.EVMSignature.deserializeBinaryFromReader); + msg.setEvmSignature(value); + break; + case 4: + var value = new proto.band.tss.v1beta1.PartialSignature; + reader.readMessage(value,proto.band.tss.v1beta1.PartialSignature.deserializeBinaryFromReader); + msg.addReceivedPartialSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** - * @enum {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.tss.v1beta1.ComplaintStatus = { - COMPLAINT_STATUS_UNSPECIFIED: 0, - COMPLAINT_STATUS_SUCCESS: 1, - COMPLAINT_STATUS_FAILED: 2 +proto.band.tss.v1beta1.SigningResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.SigningResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * @enum {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.SigningResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.SigningResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigning(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.band.tss.v1beta1.Signing.serializeBinaryToWriter + ); + } + f = message.getCurrentSigningAttempt(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.band.tss.v1beta1.SigningAttempt.serializeBinaryToWriter + ); + } + f = message.getEvmSignature(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.band.tss.v1beta1.EVMSignature.serializeBinaryToWriter + ); + } + f = message.getReceivedPartialSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.band.tss.v1beta1.PartialSignature.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Signing signing = 1; + * @return {?proto.band.tss.v1beta1.Signing} + */ +proto.band.tss.v1beta1.SigningResult.prototype.getSigning = function() { + return /** @type{?proto.band.tss.v1beta1.Signing} */ ( + jspb.Message.getWrapperField(this, proto.band.tss.v1beta1.Signing, 1)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.Signing|undefined} value + * @return {!proto.band.tss.v1beta1.SigningResult} returns this +*/ +proto.band.tss.v1beta1.SigningResult.prototype.setSigning = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.SigningResult} returns this + */ +proto.band.tss.v1beta1.SigningResult.prototype.clearSigning = function() { + return this.setSigning(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tss.v1beta1.SigningResult.prototype.hasSigning = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SigningAttempt current_signing_attempt = 2; + * @return {?proto.band.tss.v1beta1.SigningAttempt} + */ +proto.band.tss.v1beta1.SigningResult.prototype.getCurrentSigningAttempt = function() { + return /** @type{?proto.band.tss.v1beta1.SigningAttempt} */ ( + jspb.Message.getWrapperField(this, proto.band.tss.v1beta1.SigningAttempt, 2)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.SigningAttempt|undefined} value + * @return {!proto.band.tss.v1beta1.SigningResult} returns this +*/ +proto.band.tss.v1beta1.SigningResult.prototype.setCurrentSigningAttempt = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.SigningResult} returns this + */ +proto.band.tss.v1beta1.SigningResult.prototype.clearCurrentSigningAttempt = function() { + return this.setCurrentSigningAttempt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tss.v1beta1.SigningResult.prototype.hasCurrentSigningAttempt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional EVMSignature evm_signature = 3; + * @return {?proto.band.tss.v1beta1.EVMSignature} */ -proto.tss.v1beta1.PrefixMsgType = { - PREFIX_UNSPECIFIED_MSG: 0, - PREFIX_TEXT_MSG: 1, - PREFIX_REPLACE_GROUP_MSG: 2, - PREFIX_ORACLE_MSG: 3 +proto.band.tss.v1beta1.SigningResult.prototype.getEvmSignature = function() { + return /** @type{?proto.band.tss.v1beta1.EVMSignature} */ ( + jspb.Message.getWrapperField(this, proto.band.tss.v1beta1.EVMSignature, 3)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.EVMSignature|undefined} value + * @return {!proto.band.tss.v1beta1.SigningResult} returns this +*/ +proto.band.tss.v1beta1.SigningResult.prototype.setEvmSignature = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.SigningResult} returns this + */ +proto.band.tss.v1beta1.SigningResult.prototype.clearEvmSignature = function() { + return this.setEvmSignature(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tss.v1beta1.SigningResult.prototype.hasEvmSignature = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated PartialSignature received_partial_signatures = 4; + * @return {!Array} + */ +proto.band.tss.v1beta1.SigningResult.prototype.getReceivedPartialSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.PartialSignature, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.SigningResult} returns this +*/ +proto.band.tss.v1beta1.SigningResult.prototype.setReceivedPartialSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.PartialSignature=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.PartialSignature} + */ +proto.band.tss.v1beta1.SigningResult.prototype.addReceivedPartialSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.band.tss.v1beta1.PartialSignature, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.SigningResult} returns this + */ +proto.band.tss.v1beta1.SigningResult.prototype.clearReceivedPartialSignaturesList = function() { + return this.setReceivedPartialSignaturesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.SigningExpiration.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.SigningExpiration.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.SigningExpiration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.SigningExpiration.toObject = function(includeInstance, msg) { + var f, obj = { + signingId: jspb.Message.getFieldWithDefault(msg, 1, 0), + signingAttempt: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.SigningExpiration} + */ +proto.band.tss.v1beta1.SigningExpiration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.SigningExpiration; + return proto.band.tss.v1beta1.SigningExpiration.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.SigningExpiration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.SigningExpiration} + */ +proto.band.tss.v1beta1.SigningExpiration.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningAttempt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.SigningExpiration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.SigningExpiration.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.SigningExpiration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.SigningExpiration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigningId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSigningAttempt(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 signing_id = 1; + * @return {number} + */ +proto.band.tss.v1beta1.SigningExpiration.prototype.getSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.SigningExpiration} returns this + */ +proto.band.tss.v1beta1.SigningExpiration.prototype.setSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 signing_attempt = 2; + * @return {number} + */ +proto.band.tss.v1beta1.SigningExpiration.prototype.getSigningAttempt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.SigningExpiration} returns this + */ +proto.band.tss.v1beta1.SigningExpiration.prototype.setSigningAttempt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tss.v1beta1.SigningExpirations.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.SigningExpirations.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.SigningExpirations.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.SigningExpirations} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.SigningExpirations.toObject = function(includeInstance, msg) { + var f, obj = { + signingExpirationsList: jspb.Message.toObjectList(msg.getSigningExpirationsList(), + proto.band.tss.v1beta1.SigningExpiration.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.SigningExpirations} + */ +proto.band.tss.v1beta1.SigningExpirations.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.SigningExpirations; + return proto.band.tss.v1beta1.SigningExpirations.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.SigningExpirations} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.SigningExpirations} + */ +proto.band.tss.v1beta1.SigningExpirations.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.band.tss.v1beta1.SigningExpiration; + reader.readMessage(value,proto.band.tss.v1beta1.SigningExpiration.deserializeBinaryFromReader); + msg.addSigningExpirations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.SigningExpirations.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.SigningExpirations.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.SigningExpirations} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.SigningExpirations.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigningExpirationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.band.tss.v1beta1.SigningExpiration.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SigningExpiration signing_expirations = 1; + * @return {!Array} + */ +proto.band.tss.v1beta1.SigningExpirations.prototype.getSigningExpirationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tss.v1beta1.SigningExpiration, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.SigningExpirations} returns this +*/ +proto.band.tss.v1beta1.SigningExpirations.prototype.setSigningExpirationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.SigningExpiration=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.SigningExpiration} + */ +proto.band.tss.v1beta1.SigningExpirations.prototype.addSigningExpirations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tss.v1beta1.SigningExpiration, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.SigningExpirations} returns this + */ +proto.band.tss.v1beta1.SigningExpirations.prototype.clearSigningExpirationsList = function() { + return this.setSigningExpirationsList([]); +}; + + +/** + * @enum {number} + */ +proto.band.tss.v1beta1.SigningStatus = { + SIGNING_STATUS_UNSPECIFIED: 0, + SIGNING_STATUS_WAITING: 1, + SIGNING_STATUS_SUCCESS: 2, + SIGNING_STATUS_FALLEN: 3 +}; + +/** + * @enum {number} + */ +proto.band.tss.v1beta1.GroupStatus = { + GROUP_STATUS_UNSPECIFIED: 0, + GROUP_STATUS_ROUND_1: 1, + GROUP_STATUS_ROUND_2: 2, + GROUP_STATUS_ROUND_3: 3, + GROUP_STATUS_ACTIVE: 4, + GROUP_STATUS_EXPIRED: 5, + GROUP_STATUS_FALLEN: 6 +}; + +/** + * @enum {number} + */ +proto.band.tss.v1beta1.ComplaintStatus = { + COMPLAINT_STATUS_UNSPECIFIED: 0, + COMPLAINT_STATUS_SUCCESS: 1, + COMPLAINT_STATUS_FAILED: 2 }; -goog.object.extend(exports, proto.tss.v1beta1); +goog.object.extend(exports, proto.band.tss.v1beta1); diff --git a/codegen/band/tss/v1beta1/tss_pb_service.d.ts b/codegen/band/tss/v1beta1/tss_pb_service.d.ts new file mode 100644 index 0000000..012e216 --- /dev/null +++ b/codegen/band/tss/v1beta1/tss_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/tss.proto + diff --git a/codegen/band/tss/v1beta1/tss_pb_service.js b/codegen/band/tss/v1beta1/tss_pb_service.js new file mode 100644 index 0000000..012e216 --- /dev/null +++ b/codegen/band/tss/v1beta1/tss_pb_service.js @@ -0,0 +1,3 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/tss.proto + diff --git a/codegen/band/tss/v1beta1/tx.ts b/codegen/band/tss/v1beta1/tx.ts new file mode 100644 index 0000000..60f6a42 --- /dev/null +++ b/codegen/band/tss/v1beta1/tx.ts @@ -0,0 +1,1340 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tss/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../amino/amino"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../../cosmos/msg/v1/msg"; +import * as dependency_5 from "./tss"; +import * as dependency_6 from "./genesis"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.tss.v1beta1 { + export class MsgSubmitDKGRound1 extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + round1_info?: dependency_5.band.tss.v1beta1.Round1Info; + sender?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("round1_info" in data && data.round1_info != undefined) { + this.round1_info = data.round1_info; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get round1_info() { + return pb_1.Message.getWrapperField(this, dependency_5.band.tss.v1beta1.Round1Info, 2) as dependency_5.band.tss.v1beta1.Round1Info; + } + set round1_info(value: dependency_5.band.tss.v1beta1.Round1Info) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_round1_info() { + return pb_1.Message.getField(this, 2) != null; + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + group_id?: number; + round1_info?: ReturnType; + sender?: string; + }): MsgSubmitDKGRound1 { + const message = new MsgSubmitDKGRound1({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.round1_info != null) { + message.round1_info = dependency_5.band.tss.v1beta1.Round1Info.fromObject(data.round1_info); + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + group_id?: number; + round1_info?: ReturnType; + sender?: string; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.round1_info != null) { + data.round1_info = this.round1_info.toObject(); + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.has_round1_info) + writer.writeMessage(2, this.round1_info, () => this.round1_info.serialize(writer)); + if (this.sender.length) + writer.writeString(3, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitDKGRound1 { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitDKGRound1(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.round1_info, () => message.round1_info = dependency_5.band.tss.v1beta1.Round1Info.deserialize(reader)); + break; + case 3: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound1 { + return MsgSubmitDKGRound1.deserialize(bytes); + } + } + export class MsgSubmitDKGRound1Response 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: {}): MsgSubmitDKGRound1Response { + const message = new MsgSubmitDKGRound1Response({}); + 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): MsgSubmitDKGRound1Response { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitDKGRound1Response(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound1Response { + return MsgSubmitDKGRound1Response.deserialize(bytes); + } + } + export class MsgSubmitDKGRound2 extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + round2_info?: dependency_5.band.tss.v1beta1.Round2Info; + sender?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("round2_info" in data && data.round2_info != undefined) { + this.round2_info = data.round2_info; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get round2_info() { + return pb_1.Message.getWrapperField(this, dependency_5.band.tss.v1beta1.Round2Info, 2) as dependency_5.band.tss.v1beta1.Round2Info; + } + set round2_info(value: dependency_5.band.tss.v1beta1.Round2Info) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_round2_info() { + return pb_1.Message.getField(this, 2) != null; + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + group_id?: number; + round2_info?: ReturnType; + sender?: string; + }): MsgSubmitDKGRound2 { + const message = new MsgSubmitDKGRound2({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.round2_info != null) { + message.round2_info = dependency_5.band.tss.v1beta1.Round2Info.fromObject(data.round2_info); + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + group_id?: number; + round2_info?: ReturnType; + sender?: string; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.round2_info != null) { + data.round2_info = this.round2_info.toObject(); + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.has_round2_info) + writer.writeMessage(2, this.round2_info, () => this.round2_info.serialize(writer)); + if (this.sender.length) + writer.writeString(3, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitDKGRound2 { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitDKGRound2(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.round2_info, () => message.round2_info = dependency_5.band.tss.v1beta1.Round2Info.deserialize(reader)); + break; + case 3: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound2 { + return MsgSubmitDKGRound2.deserialize(bytes); + } + } + export class MsgSubmitDKGRound2Response 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: {}): MsgSubmitDKGRound2Response { + const message = new MsgSubmitDKGRound2Response({}); + 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): MsgSubmitDKGRound2Response { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitDKGRound2Response(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound2Response { + return MsgSubmitDKGRound2Response.deserialize(bytes); + } + } + export class MsgComplain extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + complaints?: dependency_5.band.tss.v1beta1.Complaint[]; + sender?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("complaints" in data && data.complaints != undefined) { + this.complaints = data.complaints; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get complaints() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.tss.v1beta1.Complaint, 2) as dependency_5.band.tss.v1beta1.Complaint[]; + } + set complaints(value: dependency_5.band.tss.v1beta1.Complaint[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + group_id?: number; + complaints?: ReturnType[]; + sender?: string; + }): MsgComplain { + const message = new MsgComplain({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.complaints != null) { + message.complaints = data.complaints.map(item => dependency_5.band.tss.v1beta1.Complaint.fromObject(item)); + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + group_id?: number; + complaints?: ReturnType[]; + sender?: string; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.complaints != null) { + data.complaints = this.complaints.map((item: dependency_5.band.tss.v1beta1.Complaint) => item.toObject()); + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.complaints.length) + writer.writeRepeatedMessage(2, this.complaints, (item: dependency_5.band.tss.v1beta1.Complaint) => item.serialize(writer)); + if (this.sender.length) + writer.writeString(3, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgComplain { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgComplain(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.complaints, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_5.band.tss.v1beta1.Complaint.deserialize(reader), dependency_5.band.tss.v1beta1.Complaint)); + break; + case 3: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgComplain { + return MsgComplain.deserialize(bytes); + } + } + export class MsgComplainResponse 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: {}): MsgComplainResponse { + const message = new MsgComplainResponse({}); + 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): MsgComplainResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgComplainResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgComplainResponse { + return MsgComplainResponse.deserialize(bytes); + } + } + export class MsgConfirm extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + member_id?: number; + own_pub_key_sig?: Uint8Array; + sender?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("member_id" in data && data.member_id != undefined) { + this.member_id = data.member_id; + } + if ("own_pub_key_sig" in data && data.own_pub_key_sig != undefined) { + this.own_pub_key_sig = data.own_pub_key_sig; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get member_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set member_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get own_pub_key_sig() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set own_pub_key_sig(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + group_id?: number; + member_id?: number; + own_pub_key_sig?: Uint8Array; + sender?: string; + }): MsgConfirm { + const message = new MsgConfirm({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.member_id != null) { + message.member_id = data.member_id; + } + if (data.own_pub_key_sig != null) { + message.own_pub_key_sig = data.own_pub_key_sig; + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + group_id?: number; + member_id?: number; + own_pub_key_sig?: Uint8Array; + sender?: string; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.member_id != null) { + data.member_id = this.member_id; + } + if (this.own_pub_key_sig != null) { + data.own_pub_key_sig = this.own_pub_key_sig; + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.member_id != 0) + writer.writeUint64(2, this.member_id); + if (this.own_pub_key_sig.length) + writer.writeBytes(3, this.own_pub_key_sig); + if (this.sender.length) + writer.writeString(4, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgConfirm { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConfirm(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + message.member_id = reader.readUint64(); + break; + case 3: + message.own_pub_key_sig = reader.readBytes(); + break; + case 4: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConfirm { + return MsgConfirm.deserialize(bytes); + } + } + export class MsgConfirmResponse 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: {}): MsgConfirmResponse { + const message = new MsgConfirmResponse({}); + 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): MsgConfirmResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConfirmResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConfirmResponse { + return MsgConfirmResponse.deserialize(bytes); + } + } + export class MsgSubmitDEs extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + des?: dependency_5.band.tss.v1beta1.DE[]; + sender?: string; + }) { + 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 ("des" in data && data.des != undefined) { + this.des = data.des; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get des() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.tss.v1beta1.DE, 1) as dependency_5.band.tss.v1beta1.DE[]; + } + set des(value: dependency_5.band.tss.v1beta1.DE[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + des?: ReturnType[]; + sender?: string; + }): MsgSubmitDEs { + const message = new MsgSubmitDEs({}); + if (data.des != null) { + message.des = data.des.map(item => dependency_5.band.tss.v1beta1.DE.fromObject(item)); + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + des?: ReturnType[]; + sender?: string; + } = {}; + if (this.des != null) { + data.des = this.des.map((item: dependency_5.band.tss.v1beta1.DE) => item.toObject()); + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.des.length) + writer.writeRepeatedMessage(1, this.des, (item: dependency_5.band.tss.v1beta1.DE) => item.serialize(writer)); + if (this.sender.length) + writer.writeString(2, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitDEs { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitDEs(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.des, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.tss.v1beta1.DE.deserialize(reader), dependency_5.band.tss.v1beta1.DE)); + break; + case 2: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitDEs { + return MsgSubmitDEs.deserialize(bytes); + } + } + export class MsgSubmitDEsResponse 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: {}): MsgSubmitDEsResponse { + const message = new MsgSubmitDEsResponse({}); + 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): MsgSubmitDEsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitDEsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitDEsResponse { + return MsgSubmitDEsResponse.deserialize(bytes); + } + } + export class MsgResetDE extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sender?: 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 ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + sender?: string; + }): MsgResetDE { + const message = new MsgResetDE({}); + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + sender?: string; + } = {}; + if (this.sender != null) { + data.sender = this.sender; + } + 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.sender.length) + writer.writeString(1, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgResetDE { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgResetDE(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgResetDE { + return MsgResetDE.deserialize(bytes); + } + } + export class MsgResetDEResponse 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: {}): MsgResetDEResponse { + const message = new MsgResetDEResponse({}); + 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): MsgResetDEResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgResetDEResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgResetDEResponse { + return MsgResetDEResponse.deserialize(bytes); + } + } + export class MsgSubmitSignature extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_id?: number; + member_id?: number; + signature?: Uint8Array; + signer?: 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 ("signing_id" in data && data.signing_id != undefined) { + this.signing_id = data.signing_id; + } + if ("member_id" in data && data.member_id != undefined) { + this.member_id = data.member_id; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get signing_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get member_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set member_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + signing_id?: number; + member_id?: number; + signature?: Uint8Array; + signer?: string; + }): MsgSubmitSignature { + const message = new MsgSubmitSignature({}); + if (data.signing_id != null) { + message.signing_id = data.signing_id; + } + if (data.member_id != null) { + message.member_id = data.member_id; + } + if (data.signature != null) { + message.signature = data.signature; + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + signing_id?: number; + member_id?: number; + signature?: Uint8Array; + signer?: string; + } = {}; + if (this.signing_id != null) { + data.signing_id = this.signing_id; + } + if (this.member_id != null) { + data.member_id = this.member_id; + } + if (this.signature != null) { + data.signature = this.signature; + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.signing_id != 0) + writer.writeUint64(1, this.signing_id); + if (this.member_id != 0) + writer.writeUint64(2, this.member_id); + if (this.signature.length) + writer.writeBytes(3, this.signature); + if (this.signer.length) + writer.writeString(4, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitSignature { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitSignature(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_id = reader.readUint64(); + break; + case 2: + message.member_id = reader.readUint64(); + break; + case 3: + message.signature = reader.readBytes(); + break; + case 4: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitSignature { + return MsgSubmitSignature.deserialize(bytes); + } + } + export class MsgSubmitSignatureResponse 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: {}): MsgSubmitSignatureResponse { + const message = new MsgSubmitSignatureResponse({}); + 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): MsgSubmitSignatureResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitSignatureResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitSignatureResponse { + return MsgSubmitSignatureResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_6.band.tss.v1beta1.Params; + authority?: 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 ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_6.band.tss.v1beta1.Params, 1) as dependency_6.band.tss.v1beta1.Params; + } + set params(value: dependency_6.band.tss.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + params?: ReturnType; + authority?: string; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.params != null) { + message.params = dependency_6.band.tss.v1beta1.Params.fromObject(data.params); + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + authority?: string; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.authority != null) { + data.authority = this.authority; + } + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.authority.length) + writer.writeString(2, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_6.band.tss.v1beta1.Params.deserialize(reader)); + break; + case 2: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + SubmitDKGRound1: { + path: "/band.tss.v1beta1.Msg/SubmitDKGRound1", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitDKGRound1) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitDKGRound1.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitDKGRound1Response) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitDKGRound1Response.deserialize(new Uint8Array(bytes)) + }, + SubmitDKGRound2: { + path: "/band.tss.v1beta1.Msg/SubmitDKGRound2", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitDKGRound2) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitDKGRound2.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitDKGRound2Response) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitDKGRound2Response.deserialize(new Uint8Array(bytes)) + }, + Complain: { + path: "/band.tss.v1beta1.Msg/Complain", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgComplain) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgComplain.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgComplainResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgComplainResponse.deserialize(new Uint8Array(bytes)) + }, + Confirm: { + path: "/band.tss.v1beta1.Msg/Confirm", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgConfirm) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgConfirm.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgConfirmResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgConfirmResponse.deserialize(new Uint8Array(bytes)) + }, + SubmitDEs: { + path: "/band.tss.v1beta1.Msg/SubmitDEs", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitDEs) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitDEs.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitDEsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitDEsResponse.deserialize(new Uint8Array(bytes)) + }, + ResetDE: { + path: "/band.tss.v1beta1.Msg/ResetDE", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgResetDE) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgResetDE.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgResetDEResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgResetDEResponse.deserialize(new Uint8Array(bytes)) + }, + SubmitSignature: { + path: "/band.tss.v1beta1.Msg/SubmitSignature", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitSignature) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitSignature.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitSignatureResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitSignatureResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/band.tss.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract SubmitDKGRound1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SubmitDKGRound2(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Complain(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Confirm(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SubmitDEs(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ResetDE(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SubmitSignature(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + SubmitDKGRound1: GrpcUnaryServiceInterface = (message: MsgSubmitDKGRound1, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitDKGRound1(message, metadata, options, callback); + }; + SubmitDKGRound2: GrpcUnaryServiceInterface = (message: MsgSubmitDKGRound2, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitDKGRound2(message, metadata, options, callback); + }; + Complain: GrpcUnaryServiceInterface = (message: MsgComplain, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Complain(message, metadata, options, callback); + }; + Confirm: GrpcUnaryServiceInterface = (message: MsgConfirm, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Confirm(message, metadata, options, callback); + }; + SubmitDEs: GrpcUnaryServiceInterface = (message: MsgSubmitDEs, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitDEs(message, metadata, options, callback); + }; + ResetDE: GrpcUnaryServiceInterface = (message: MsgResetDE, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ResetDE(message, metadata, options, callback); + }; + SubmitSignature: GrpcUnaryServiceInterface = (message: MsgSubmitSignature, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitSignature(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/tss/v1beta1/tx_pb.d.ts b/codegen/band/tss/v1beta1/tx_pb.d.ts new file mode 100644 index 0000000..8f9e5c8 --- /dev/null +++ b/codegen/band/tss/v1beta1/tx_pb.d.ts @@ -0,0 +1,369 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/tx.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; +import * as band_tss_v1beta1_tss_pb from "../../../band/tss/v1beta1/tss_pb"; +import * as band_tss_v1beta1_genesis_pb from "../../../band/tss/v1beta1/genesis_pb"; + +export class MsgSubmitDKGRound1 extends jspb.Message { + getGroupId(): number; + setGroupId(value: number): void; + + hasRound1Info(): boolean; + clearRound1Info(): void; + getRound1Info(): band_tss_v1beta1_tss_pb.Round1Info | undefined; + setRound1Info(value?: band_tss_v1beta1_tss_pb.Round1Info): void; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSubmitDKGRound1.AsObject; + static toObject(includeInstance: boolean, msg: MsgSubmitDKGRound1): MsgSubmitDKGRound1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSubmitDKGRound1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound1; + static deserializeBinaryFromReader(message: MsgSubmitDKGRound1, reader: jspb.BinaryReader): MsgSubmitDKGRound1; +} + +export namespace MsgSubmitDKGRound1 { + export type AsObject = { + groupId: number, + round1Info?: band_tss_v1beta1_tss_pb.Round1Info.AsObject, + sender: string, + } +} + +export class MsgSubmitDKGRound1Response extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSubmitDKGRound1Response.AsObject; + static toObject(includeInstance: boolean, msg: MsgSubmitDKGRound1Response): MsgSubmitDKGRound1Response.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSubmitDKGRound1Response, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound1Response; + static deserializeBinaryFromReader(message: MsgSubmitDKGRound1Response, reader: jspb.BinaryReader): MsgSubmitDKGRound1Response; +} + +export namespace MsgSubmitDKGRound1Response { + export type AsObject = { + } +} + +export class MsgSubmitDKGRound2 extends jspb.Message { + getGroupId(): number; + setGroupId(value: number): void; + + hasRound2Info(): boolean; + clearRound2Info(): void; + getRound2Info(): band_tss_v1beta1_tss_pb.Round2Info | undefined; + setRound2Info(value?: band_tss_v1beta1_tss_pb.Round2Info): void; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSubmitDKGRound2.AsObject; + static toObject(includeInstance: boolean, msg: MsgSubmitDKGRound2): MsgSubmitDKGRound2.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSubmitDKGRound2, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound2; + static deserializeBinaryFromReader(message: MsgSubmitDKGRound2, reader: jspb.BinaryReader): MsgSubmitDKGRound2; +} + +export namespace MsgSubmitDKGRound2 { + export type AsObject = { + groupId: number, + round2Info?: band_tss_v1beta1_tss_pb.Round2Info.AsObject, + sender: string, + } +} + +export class MsgSubmitDKGRound2Response extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSubmitDKGRound2Response.AsObject; + static toObject(includeInstance: boolean, msg: MsgSubmitDKGRound2Response): MsgSubmitDKGRound2Response.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSubmitDKGRound2Response, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound2Response; + static deserializeBinaryFromReader(message: MsgSubmitDKGRound2Response, reader: jspb.BinaryReader): MsgSubmitDKGRound2Response; +} + +export namespace MsgSubmitDKGRound2Response { + export type AsObject = { + } +} + +export class MsgComplain extends jspb.Message { + getGroupId(): number; + setGroupId(value: number): void; + + clearComplaintsList(): void; + getComplaintsList(): Array; + setComplaintsList(value: Array): void; + addComplaints(value?: band_tss_v1beta1_tss_pb.Complaint, index?: number): band_tss_v1beta1_tss_pb.Complaint; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgComplain.AsObject; + static toObject(includeInstance: boolean, msg: MsgComplain): MsgComplain.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgComplain, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgComplain; + static deserializeBinaryFromReader(message: MsgComplain, reader: jspb.BinaryReader): MsgComplain; +} + +export namespace MsgComplain { + export type AsObject = { + groupId: number, + complaintsList: Array, + sender: string, + } +} + +export class MsgComplainResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgComplainResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgComplainResponse): MsgComplainResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgComplainResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgComplainResponse; + static deserializeBinaryFromReader(message: MsgComplainResponse, reader: jspb.BinaryReader): MsgComplainResponse; +} + +export namespace MsgComplainResponse { + export type AsObject = { + } +} + +export class MsgConfirm extends jspb.Message { + getGroupId(): number; + setGroupId(value: number): void; + + getMemberId(): number; + setMemberId(value: number): void; + + getOwnPubKeySig(): Uint8Array | string; + getOwnPubKeySig_asU8(): Uint8Array; + getOwnPubKeySig_asB64(): string; + setOwnPubKeySig(value: Uint8Array | string): void; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgConfirm.AsObject; + static toObject(includeInstance: boolean, msg: MsgConfirm): MsgConfirm.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgConfirm, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgConfirm; + static deserializeBinaryFromReader(message: MsgConfirm, reader: jspb.BinaryReader): MsgConfirm; +} + +export namespace MsgConfirm { + export type AsObject = { + groupId: number, + memberId: number, + ownPubKeySig: Uint8Array | string, + sender: string, + } +} + +export class MsgConfirmResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgConfirmResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgConfirmResponse): MsgConfirmResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgConfirmResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgConfirmResponse; + static deserializeBinaryFromReader(message: MsgConfirmResponse, reader: jspb.BinaryReader): MsgConfirmResponse; +} + +export namespace MsgConfirmResponse { + export type AsObject = { + } +} + +export class MsgSubmitDEs extends jspb.Message { + clearDesList(): void; + getDesList(): Array; + setDesList(value: Array): void; + addDes(value?: band_tss_v1beta1_tss_pb.DE, index?: number): band_tss_v1beta1_tss_pb.DE; + + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSubmitDEs.AsObject; + static toObject(includeInstance: boolean, msg: MsgSubmitDEs): MsgSubmitDEs.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSubmitDEs, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSubmitDEs; + static deserializeBinaryFromReader(message: MsgSubmitDEs, reader: jspb.BinaryReader): MsgSubmitDEs; +} + +export namespace MsgSubmitDEs { + export type AsObject = { + desList: Array, + sender: string, + } +} + +export class MsgSubmitDEsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSubmitDEsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgSubmitDEsResponse): MsgSubmitDEsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSubmitDEsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSubmitDEsResponse; + static deserializeBinaryFromReader(message: MsgSubmitDEsResponse, reader: jspb.BinaryReader): MsgSubmitDEsResponse; +} + +export namespace MsgSubmitDEsResponse { + export type AsObject = { + } +} + +export class MsgResetDE extends jspb.Message { + getSender(): string; + setSender(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgResetDE.AsObject; + static toObject(includeInstance: boolean, msg: MsgResetDE): MsgResetDE.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgResetDE, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgResetDE; + static deserializeBinaryFromReader(message: MsgResetDE, reader: jspb.BinaryReader): MsgResetDE; +} + +export namespace MsgResetDE { + export type AsObject = { + sender: string, + } +} + +export class MsgResetDEResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgResetDEResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgResetDEResponse): MsgResetDEResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgResetDEResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgResetDEResponse; + static deserializeBinaryFromReader(message: MsgResetDEResponse, reader: jspb.BinaryReader): MsgResetDEResponse; +} + +export namespace MsgResetDEResponse { + export type AsObject = { + } +} + +export class MsgSubmitSignature extends jspb.Message { + getSigningId(): number; + setSigningId(value: number): void; + + getMemberId(): number; + setMemberId(value: number): void; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSubmitSignature.AsObject; + static toObject(includeInstance: boolean, msg: MsgSubmitSignature): MsgSubmitSignature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSubmitSignature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSubmitSignature; + static deserializeBinaryFromReader(message: MsgSubmitSignature, reader: jspb.BinaryReader): MsgSubmitSignature; +} + +export namespace MsgSubmitSignature { + export type AsObject = { + signingId: number, + memberId: number, + signature: Uint8Array | string, + signer: string, + } +} + +export class MsgSubmitSignatureResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSubmitSignatureResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgSubmitSignatureResponse): MsgSubmitSignatureResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSubmitSignatureResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSubmitSignatureResponse; + static deserializeBinaryFromReader(message: MsgSubmitSignatureResponse, reader: jspb.BinaryReader): MsgSubmitSignatureResponse; +} + +export namespace MsgSubmitSignatureResponse { + export type AsObject = { + } +} + +export class MsgUpdateParams extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_tss_v1beta1_genesis_pb.Params | undefined; + setParams(value?: band_tss_v1beta1_genesis_pb.Params): void; + + getAuthority(): string; + setAuthority(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + params?: band_tss_v1beta1_genesis_pb.Params.AsObject, + authority: string, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + diff --git a/codegen/band/tss/v1beta1/tx_pb.js b/codegen/band/tss/v1beta1/tx_pb.js new file mode 100644 index 0000000..edc626d --- /dev/null +++ b/codegen/band/tss/v1beta1/tx_pb.js @@ -0,0 +1,2821 @@ +// source: band/tss/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var amino_amino_pb = require('../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var band_tss_v1beta1_tss_pb = require('../../../band/tss/v1beta1/tss_pb.js'); +goog.object.extend(proto, band_tss_v1beta1_tss_pb); +var band_tss_v1beta1_genesis_pb = require('../../../band/tss/v1beta1/genesis_pb.js'); +goog.object.extend(proto, band_tss_v1beta1_genesis_pb); +goog.exportSymbol('proto.band.tss.v1beta1.MsgComplain', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgComplainResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgConfirm', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgConfirmResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgResetDE', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgResetDEResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgSubmitDEs', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgSubmitDEsResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgSubmitDKGRound1', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgSubmitDKGRound1Response', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgSubmitDKGRound2', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgSubmitDKGRound2Response', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgSubmitSignature', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgSubmitSignatureResponse', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.band.tss.v1beta1.MsgUpdateParamsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgSubmitDKGRound1, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgSubmitDKGRound1.displayName = 'proto.band.tss.v1beta1.MsgSubmitDKGRound1'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgSubmitDKGRound1Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.displayName = 'proto.band.tss.v1beta1.MsgSubmitDKGRound1Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgSubmitDKGRound2, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgSubmitDKGRound2.displayName = 'proto.band.tss.v1beta1.MsgSubmitDKGRound2'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgSubmitDKGRound2Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.displayName = 'proto.band.tss.v1beta1.MsgSubmitDKGRound2Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgComplain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.MsgComplain.repeatedFields_, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgComplain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgComplain.displayName = 'proto.band.tss.v1beta1.MsgComplain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgComplainResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgComplainResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgComplainResponse.displayName = 'proto.band.tss.v1beta1.MsgComplainResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgConfirm = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgConfirm, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgConfirm.displayName = 'proto.band.tss.v1beta1.MsgConfirm'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgConfirmResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgConfirmResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgConfirmResponse.displayName = 'proto.band.tss.v1beta1.MsgConfirmResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgSubmitDEs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tss.v1beta1.MsgSubmitDEs.repeatedFields_, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgSubmitDEs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgSubmitDEs.displayName = 'proto.band.tss.v1beta1.MsgSubmitDEs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgSubmitDEsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgSubmitDEsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgSubmitDEsResponse.displayName = 'proto.band.tss.v1beta1.MsgSubmitDEsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgResetDE = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgResetDE, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgResetDE.displayName = 'proto.band.tss.v1beta1.MsgResetDE'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgResetDEResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgResetDEResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgResetDEResponse.displayName = 'proto.band.tss.v1beta1.MsgResetDEResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgSubmitSignature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgSubmitSignature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgSubmitSignature.displayName = 'proto.band.tss.v1beta1.MsgSubmitSignature'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgSubmitSignatureResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgSubmitSignatureResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgSubmitSignatureResponse.displayName = 'proto.band.tss.v1beta1.MsgSubmitSignatureResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgUpdateParams.displayName = 'proto.band.tss.v1beta1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tss.v1beta1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tss.v1beta1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tss.v1beta1.MsgUpdateParamsResponse.displayName = 'proto.band.tss.v1beta1.MsgUpdateParamsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgSubmitDKGRound1.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound1} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), + round1Info: (f = msg.getRound1Info()) && band_tss_v1beta1_tss_pb.Round1Info.toObject(includeInstance, f), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound1} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgSubmitDKGRound1; + return proto.band.tss.v1beta1.MsgSubmitDKGRound1.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound1} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound1} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + case 2: + var value = new band_tss_v1beta1_tss_pb.Round1Info; + reader.readMessage(value,band_tss_v1beta1_tss_pb.Round1Info.deserializeBinaryFromReader); + msg.setRound1Info(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgSubmitDKGRound1.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound1} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRound1Info(); + if (f != null) { + writer.writeMessage( + 2, + f, + band_tss_v1beta1_tss_pb.Round1Info.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint64 group_id = 1; + * @return {number} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound1} returns this + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional Round1Info round1_info = 2; + * @return {?proto.band.tss.v1beta1.Round1Info} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.getRound1Info = function() { + return /** @type{?proto.band.tss.v1beta1.Round1Info} */ ( + jspb.Message.getWrapperField(this, band_tss_v1beta1_tss_pb.Round1Info, 2)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.Round1Info|undefined} value + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound1} returns this +*/ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.setRound1Info = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound1} returns this + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.clearRound1Info = function() { + return this.setRound1Info(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.hasRound1Info = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound1} returns this + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound1Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound1Response} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgSubmitDKGRound1Response; + return proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound1Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound1Response} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound1Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound1Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgSubmitDKGRound2.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound2} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), + round2Info: (f = msg.getRound2Info()) && band_tss_v1beta1_tss_pb.Round2Info.toObject(includeInstance, f), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound2} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgSubmitDKGRound2; + return proto.band.tss.v1beta1.MsgSubmitDKGRound2.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound2} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound2} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + case 2: + var value = new band_tss_v1beta1_tss_pb.Round2Info; + reader.readMessage(value,band_tss_v1beta1_tss_pb.Round2Info.deserializeBinaryFromReader); + msg.setRound2Info(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgSubmitDKGRound2.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound2} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRound2Info(); + if (f != null) { + writer.writeMessage( + 2, + f, + band_tss_v1beta1_tss_pb.Round2Info.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint64 group_id = 1; + * @return {number} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound2} returns this + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional Round2Info round2_info = 2; + * @return {?proto.band.tss.v1beta1.Round2Info} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.getRound2Info = function() { + return /** @type{?proto.band.tss.v1beta1.Round2Info} */ ( + jspb.Message.getWrapperField(this, band_tss_v1beta1_tss_pb.Round2Info, 2)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.Round2Info|undefined} value + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound2} returns this +*/ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.setRound2Info = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound2} returns this + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.clearRound2Info = function() { + return this.setRound2Info(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.hasRound2Info = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound2} returns this + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound2Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound2Response} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgSubmitDKGRound2Response; + return proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound2Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgSubmitDKGRound2Response} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgSubmitDKGRound2Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDKGRound2Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tss.v1beta1.MsgComplain.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgComplain.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgComplain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgComplain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgComplain.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), + complaintsList: jspb.Message.toObjectList(msg.getComplaintsList(), + band_tss_v1beta1_tss_pb.Complaint.toObject, includeInstance), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgComplain} + */ +proto.band.tss.v1beta1.MsgComplain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgComplain; + return proto.band.tss.v1beta1.MsgComplain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgComplain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgComplain} + */ +proto.band.tss.v1beta1.MsgComplain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + case 2: + var value = new band_tss_v1beta1_tss_pb.Complaint; + reader.readMessage(value,band_tss_v1beta1_tss_pb.Complaint.deserializeBinaryFromReader); + msg.addComplaints(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgComplain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgComplain.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgComplain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgComplain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getComplaintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_tss_v1beta1_tss_pb.Complaint.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint64 group_id = 1; + * @return {number} + */ +proto.band.tss.v1beta1.MsgComplain.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.MsgComplain} returns this + */ +proto.band.tss.v1beta1.MsgComplain.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated Complaint complaints = 2; + * @return {!Array} + */ +proto.band.tss.v1beta1.MsgComplain.prototype.getComplaintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tss_v1beta1_tss_pb.Complaint, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.MsgComplain} returns this +*/ +proto.band.tss.v1beta1.MsgComplain.prototype.setComplaintsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.Complaint=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.Complaint} + */ +proto.band.tss.v1beta1.MsgComplain.prototype.addComplaints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.tss.v1beta1.Complaint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.MsgComplain} returns this + */ +proto.band.tss.v1beta1.MsgComplain.prototype.clearComplaintsList = function() { + return this.setComplaintsList([]); +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.band.tss.v1beta1.MsgComplain.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.MsgComplain} returns this + */ +proto.band.tss.v1beta1.MsgComplain.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgComplainResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgComplainResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgComplainResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgComplainResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgComplainResponse} + */ +proto.band.tss.v1beta1.MsgComplainResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgComplainResponse; + return proto.band.tss.v1beta1.MsgComplainResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgComplainResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgComplainResponse} + */ +proto.band.tss.v1beta1.MsgComplainResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgComplainResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgComplainResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgComplainResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgComplainResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgConfirm.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgConfirm} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgConfirm.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), + memberId: jspb.Message.getFieldWithDefault(msg, 2, 0), + ownPubKeySig: msg.getOwnPubKeySig_asB64(), + sender: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgConfirm} + */ +proto.band.tss.v1beta1.MsgConfirm.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgConfirm; + return proto.band.tss.v1beta1.MsgConfirm.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgConfirm} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgConfirm} + */ +proto.band.tss.v1beta1.MsgConfirm.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMemberId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwnPubKeySig(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgConfirm.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgConfirm} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgConfirm.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getMemberId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getOwnPubKeySig_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint64 group_id = 1; + * @return {number} + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.getGroupId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.MsgConfirm} returns this + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.setGroupId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 member_id = 2; + * @return {number} + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.getMemberId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.MsgConfirm} returns this + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.setMemberId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes own_pub_key_sig = 3; + * @return {!(string|Uint8Array)} + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.getOwnPubKeySig = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes own_pub_key_sig = 3; + * This is a type-conversion wrapper around `getOwnPubKeySig()` + * @return {string} + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.getOwnPubKeySig_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwnPubKeySig())); +}; + + +/** + * optional bytes own_pub_key_sig = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwnPubKeySig()` + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.getOwnPubKeySig_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwnPubKeySig())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.tss.v1beta1.MsgConfirm} returns this + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.setOwnPubKeySig = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.MsgConfirm} returns this + */ +proto.band.tss.v1beta1.MsgConfirm.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgConfirmResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgConfirmResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgConfirmResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgConfirmResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgConfirmResponse} + */ +proto.band.tss.v1beta1.MsgConfirmResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgConfirmResponse; + return proto.band.tss.v1beta1.MsgConfirmResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgConfirmResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgConfirmResponse} + */ +proto.band.tss.v1beta1.MsgConfirmResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgConfirmResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgConfirmResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgConfirmResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgConfirmResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tss.v1beta1.MsgSubmitDEs.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgSubmitDEs.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgSubmitDEs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgSubmitDEs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDEs.toObject = function(includeInstance, msg) { + var f, obj = { + desList: jspb.Message.toObjectList(msg.getDesList(), + band_tss_v1beta1_tss_pb.DE.toObject, includeInstance), + sender: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgSubmitDEs} + */ +proto.band.tss.v1beta1.MsgSubmitDEs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgSubmitDEs; + return proto.band.tss.v1beta1.MsgSubmitDEs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgSubmitDEs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgSubmitDEs} + */ +proto.band.tss.v1beta1.MsgSubmitDEs.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tss_v1beta1_tss_pb.DE; + reader.readMessage(value,band_tss_v1beta1_tss_pb.DE.deserializeBinaryFromReader); + msg.addDes(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgSubmitDEs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgSubmitDEs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgSubmitDEs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDEs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_tss_v1beta1_tss_pb.DE.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * repeated DE des = 1; + * @return {!Array} + */ +proto.band.tss.v1beta1.MsgSubmitDEs.prototype.getDesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tss_v1beta1_tss_pb.DE, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tss.v1beta1.MsgSubmitDEs} returns this +*/ +proto.band.tss.v1beta1.MsgSubmitDEs.prototype.setDesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.tss.v1beta1.DE=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tss.v1beta1.DE} + */ +proto.band.tss.v1beta1.MsgSubmitDEs.prototype.addDes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tss.v1beta1.DE, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tss.v1beta1.MsgSubmitDEs} returns this + */ +proto.band.tss.v1beta1.MsgSubmitDEs.prototype.clearDesList = function() { + return this.setDesList([]); +}; + + +/** + * optional string sender = 2; + * @return {string} + */ +proto.band.tss.v1beta1.MsgSubmitDEs.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.MsgSubmitDEs} returns this + */ +proto.band.tss.v1beta1.MsgSubmitDEs.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgSubmitDEsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgSubmitDEsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgSubmitDEsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDEsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgSubmitDEsResponse} + */ +proto.band.tss.v1beta1.MsgSubmitDEsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgSubmitDEsResponse; + return proto.band.tss.v1beta1.MsgSubmitDEsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgSubmitDEsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgSubmitDEsResponse} + */ +proto.band.tss.v1beta1.MsgSubmitDEsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgSubmitDEsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgSubmitDEsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgSubmitDEsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitDEsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgResetDE.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgResetDE.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgResetDE} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgResetDE.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgResetDE} + */ +proto.band.tss.v1beta1.MsgResetDE.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgResetDE; + return proto.band.tss.v1beta1.MsgResetDE.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgResetDE} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgResetDE} + */ +proto.band.tss.v1beta1.MsgResetDE.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgResetDE.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgResetDE.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgResetDE} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgResetDE.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.band.tss.v1beta1.MsgResetDE.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.MsgResetDE} returns this + */ +proto.band.tss.v1beta1.MsgResetDE.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgResetDEResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgResetDEResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgResetDEResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgResetDEResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgResetDEResponse} + */ +proto.band.tss.v1beta1.MsgResetDEResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgResetDEResponse; + return proto.band.tss.v1beta1.MsgResetDEResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgResetDEResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgResetDEResponse} + */ +proto.band.tss.v1beta1.MsgResetDEResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgResetDEResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgResetDEResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgResetDEResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgResetDEResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgSubmitSignature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgSubmitSignature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitSignature.toObject = function(includeInstance, msg) { + var f, obj = { + signingId: jspb.Message.getFieldWithDefault(msg, 1, 0), + memberId: jspb.Message.getFieldWithDefault(msg, 2, 0), + signature: msg.getSignature_asB64(), + signer: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgSubmitSignature} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgSubmitSignature; + return proto.band.tss.v1beta1.MsgSubmitSignature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgSubmitSignature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgSubmitSignature} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMemberId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgSubmitSignature.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgSubmitSignature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitSignature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigningId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getMemberId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint64 signing_id = 1; + * @return {number} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.getSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.MsgSubmitSignature} returns this + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.setSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 member_id = 2; + * @return {number} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.getMemberId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tss.v1beta1.MsgSubmitSignature} returns this + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.setMemberId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes signature = 3; + * @return {!(string|Uint8Array)} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes signature = 3; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.band.tss.v1beta1.MsgSubmitSignature} returns this + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string signer = 4; + * @return {string} + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.MsgSubmitSignature} returns this + */ +proto.band.tss.v1beta1.MsgSubmitSignature.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgSubmitSignatureResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgSubmitSignatureResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgSubmitSignatureResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitSignatureResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgSubmitSignatureResponse} + */ +proto.band.tss.v1beta1.MsgSubmitSignatureResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgSubmitSignatureResponse; + return proto.band.tss.v1beta1.MsgSubmitSignatureResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgSubmitSignatureResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgSubmitSignatureResponse} + */ +proto.band.tss.v1beta1.MsgSubmitSignatureResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgSubmitSignatureResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgSubmitSignatureResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgSubmitSignatureResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgSubmitSignatureResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && band_tss_v1beta1_genesis_pb.Params.toObject(includeInstance, f), + authority: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgUpdateParams} + */ +proto.band.tss.v1beta1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgUpdateParams; + return proto.band.tss.v1beta1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgUpdateParams} + */ +proto.band.tss.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tss_v1beta1_genesis_pb.Params; + reader.readMessage(value,band_tss_v1beta1_genesis_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_tss_v1beta1_genesis_pb.Params.serializeBinaryToWriter + ); + } + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.tss.v1beta1.Params} + */ +proto.band.tss.v1beta1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.band.tss.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_tss_v1beta1_genesis_pb.Params, 1)); +}; + + +/** + * @param {?proto.band.tss.v1beta1.Params|undefined} value + * @return {!proto.band.tss.v1beta1.MsgUpdateParams} returns this +*/ +proto.band.tss.v1beta1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tss.v1beta1.MsgUpdateParams} returns this + */ +proto.band.tss.v1beta1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tss.v1beta1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string authority = 2; + * @return {string} + */ +proto.band.tss.v1beta1.MsgUpdateParams.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tss.v1beta1.MsgUpdateParams} returns this + */ +proto.band.tss.v1beta1.MsgUpdateParams.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tss.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tss.v1beta1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tss.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tss.v1beta1.MsgUpdateParamsResponse} + */ +proto.band.tss.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tss.v1beta1.MsgUpdateParamsResponse; + return proto.band.tss.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tss.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tss.v1beta1.MsgUpdateParamsResponse} + */ +proto.band.tss.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tss.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tss.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tss.v1beta1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tss.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.band.tss.v1beta1); diff --git a/codegen/band/tss/v1beta1/tx_pb_service.d.ts b/codegen/band/tss/v1beta1/tx_pb_service.d.ts new file mode 100644 index 0000000..36998ec --- /dev/null +++ b/codegen/band/tss/v1beta1/tx_pb_service.d.ts @@ -0,0 +1,196 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/tx.proto + +import * as band_tss_v1beta1_tx_pb from "../../../band/tss/v1beta1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgSubmitDKGRound1 = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_tx_pb.MsgSubmitDKGRound1; + readonly responseType: typeof band_tss_v1beta1_tx_pb.MsgSubmitDKGRound1Response; +}; + +type MsgSubmitDKGRound2 = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_tx_pb.MsgSubmitDKGRound2; + readonly responseType: typeof band_tss_v1beta1_tx_pb.MsgSubmitDKGRound2Response; +}; + +type MsgComplain = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_tx_pb.MsgComplain; + readonly responseType: typeof band_tss_v1beta1_tx_pb.MsgComplainResponse; +}; + +type MsgConfirm = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_tx_pb.MsgConfirm; + readonly responseType: typeof band_tss_v1beta1_tx_pb.MsgConfirmResponse; +}; + +type MsgSubmitDEs = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_tx_pb.MsgSubmitDEs; + readonly responseType: typeof band_tss_v1beta1_tx_pb.MsgSubmitDEsResponse; +}; + +type MsgResetDE = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_tx_pb.MsgResetDE; + readonly responseType: typeof band_tss_v1beta1_tx_pb.MsgResetDEResponse; +}; + +type MsgSubmitSignature = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_tx_pb.MsgSubmitSignature; + readonly responseType: typeof band_tss_v1beta1_tx_pb.MsgSubmitSignatureResponse; +}; + +type MsgUpdateParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tss_v1beta1_tx_pb.MsgUpdateParams; + readonly responseType: typeof band_tss_v1beta1_tx_pb.MsgUpdateParamsResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly SubmitDKGRound1: MsgSubmitDKGRound1; + static readonly SubmitDKGRound2: MsgSubmitDKGRound2; + static readonly Complain: MsgComplain; + static readonly Confirm: MsgConfirm; + static readonly SubmitDEs: MsgSubmitDEs; + static readonly ResetDE: MsgResetDE; + static readonly SubmitSignature: MsgSubmitSignature; + static readonly UpdateParams: MsgUpdateParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + submitDKGRound1( + requestMessage: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound1, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound1Response|null) => void + ): UnaryResponse; + submitDKGRound1( + requestMessage: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound1, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound1Response|null) => void + ): UnaryResponse; + submitDKGRound2( + requestMessage: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound2, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound2Response|null) => void + ): UnaryResponse; + submitDKGRound2( + requestMessage: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound2, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound2Response|null) => void + ): UnaryResponse; + complain( + requestMessage: band_tss_v1beta1_tx_pb.MsgComplain, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgComplainResponse|null) => void + ): UnaryResponse; + complain( + requestMessage: band_tss_v1beta1_tx_pb.MsgComplain, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgComplainResponse|null) => void + ): UnaryResponse; + confirm( + requestMessage: band_tss_v1beta1_tx_pb.MsgConfirm, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgConfirmResponse|null) => void + ): UnaryResponse; + confirm( + requestMessage: band_tss_v1beta1_tx_pb.MsgConfirm, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgConfirmResponse|null) => void + ): UnaryResponse; + submitDEs( + requestMessage: band_tss_v1beta1_tx_pb.MsgSubmitDEs, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgSubmitDEsResponse|null) => void + ): UnaryResponse; + submitDEs( + requestMessage: band_tss_v1beta1_tx_pb.MsgSubmitDEs, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgSubmitDEsResponse|null) => void + ): UnaryResponse; + resetDE( + requestMessage: band_tss_v1beta1_tx_pb.MsgResetDE, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgResetDEResponse|null) => void + ): UnaryResponse; + resetDE( + requestMessage: band_tss_v1beta1_tx_pb.MsgResetDE, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgResetDEResponse|null) => void + ): UnaryResponse; + submitSignature( + requestMessage: band_tss_v1beta1_tx_pb.MsgSubmitSignature, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgSubmitSignatureResponse|null) => void + ): UnaryResponse; + submitSignature( + requestMessage: band_tss_v1beta1_tx_pb.MsgSubmitSignature, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgSubmitSignatureResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: band_tss_v1beta1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: band_tss_v1beta1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: band_tss_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/tss/v1beta1/tx_pb_service.js b/codegen/band/tss/v1beta1/tx_pb_service.js new file mode 100644 index 0000000..c913523 --- /dev/null +++ b/codegen/band/tss/v1beta1/tx_pb_service.js @@ -0,0 +1,341 @@ +// package: band.tss.v1beta1 +// file: band/tss/v1beta1/tx.proto + +var band_tss_v1beta1_tx_pb = require("../../../band/tss/v1beta1/tx_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Msg = (function () { + function Msg() {} + Msg.serviceName = "band.tss.v1beta1.Msg"; + return Msg; +}()); + +Msg.SubmitDKGRound1 = { + methodName: "SubmitDKGRound1", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound1, + responseType: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound1Response +}; + +Msg.SubmitDKGRound2 = { + methodName: "SubmitDKGRound2", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound2, + responseType: band_tss_v1beta1_tx_pb.MsgSubmitDKGRound2Response +}; + +Msg.Complain = { + methodName: "Complain", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tss_v1beta1_tx_pb.MsgComplain, + responseType: band_tss_v1beta1_tx_pb.MsgComplainResponse +}; + +Msg.Confirm = { + methodName: "Confirm", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tss_v1beta1_tx_pb.MsgConfirm, + responseType: band_tss_v1beta1_tx_pb.MsgConfirmResponse +}; + +Msg.SubmitDEs = { + methodName: "SubmitDEs", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tss_v1beta1_tx_pb.MsgSubmitDEs, + responseType: band_tss_v1beta1_tx_pb.MsgSubmitDEsResponse +}; + +Msg.ResetDE = { + methodName: "ResetDE", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tss_v1beta1_tx_pb.MsgResetDE, + responseType: band_tss_v1beta1_tx_pb.MsgResetDEResponse +}; + +Msg.SubmitSignature = { + methodName: "SubmitSignature", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tss_v1beta1_tx_pb.MsgSubmitSignature, + responseType: band_tss_v1beta1_tx_pb.MsgSubmitSignatureResponse +}; + +Msg.UpdateParams = { + methodName: "UpdateParams", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tss_v1beta1_tx_pb.MsgUpdateParams, + responseType: band_tss_v1beta1_tx_pb.MsgUpdateParamsResponse +}; + +exports.Msg = Msg; + +function MsgClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MsgClient.prototype.submitDKGRound1 = function submitDKGRound1(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.SubmitDKGRound1, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.submitDKGRound2 = function submitDKGRound2(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.SubmitDKGRound2, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.complain = function complain(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.Complain, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.confirm = function confirm(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.Confirm, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.submitDEs = function submitDEs(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.SubmitDEs, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.resetDE = function resetDE(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ResetDE, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.submitSignature = function submitSignature(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.SubmitSignature, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.updateParams = function updateParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MsgClient = MsgClient; + diff --git a/codegen/band/tunnel/v1beta1/genesis.ts b/codegen/band/tunnel/v1beta1/genesis.ts new file mode 100644 index 0000000..2cda116 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/genesis.ts @@ -0,0 +1,176 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tunnel/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./params"; +import * as dependency_3 from "./tunnel"; +import * as pb_1 from "google-protobuf"; +export namespace band.tunnel.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_2.band.tunnel.v1beta1.Params; + tunnel_count?: number; + tunnels?: dependency_3.band.tunnel.v1beta1.Tunnel[]; + deposits?: dependency_3.band.tunnel.v1beta1.Deposit[]; + total_fees?: dependency_3.band.tunnel.v1beta1.TotalFees; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("tunnel_count" in data && data.tunnel_count != undefined) { + this.tunnel_count = data.tunnel_count; + } + if ("tunnels" in data && data.tunnels != undefined) { + this.tunnels = data.tunnels; + } + if ("deposits" in data && data.deposits != undefined) { + this.deposits = data.deposits; + } + if ("total_fees" in data && data.total_fees != undefined) { + this.total_fees = data.total_fees; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.band.tunnel.v1beta1.Params, 1) as dependency_2.band.tunnel.v1beta1.Params; + } + set params(value: dependency_2.band.tunnel.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get tunnel_count() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set tunnel_count(value: number) { + pb_1.Message.setField(this, 2, value); + } + get tunnels() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.band.tunnel.v1beta1.Tunnel, 3) as dependency_3.band.tunnel.v1beta1.Tunnel[]; + } + set tunnels(value: dependency_3.band.tunnel.v1beta1.Tunnel[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get deposits() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.band.tunnel.v1beta1.Deposit, 4) as dependency_3.band.tunnel.v1beta1.Deposit[]; + } + set deposits(value: dependency_3.band.tunnel.v1beta1.Deposit[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get total_fees() { + return pb_1.Message.getWrapperField(this, dependency_3.band.tunnel.v1beta1.TotalFees, 5) as dependency_3.band.tunnel.v1beta1.TotalFees; + } + set total_fees(value: dependency_3.band.tunnel.v1beta1.TotalFees) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_total_fees() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + params?: ReturnType; + tunnel_count?: number; + tunnels?: ReturnType[]; + deposits?: ReturnType[]; + total_fees?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = dependency_2.band.tunnel.v1beta1.Params.fromObject(data.params); + } + if (data.tunnel_count != null) { + message.tunnel_count = data.tunnel_count; + } + if (data.tunnels != null) { + message.tunnels = data.tunnels.map(item => dependency_3.band.tunnel.v1beta1.Tunnel.fromObject(item)); + } + if (data.deposits != null) { + message.deposits = data.deposits.map(item => dependency_3.band.tunnel.v1beta1.Deposit.fromObject(item)); + } + if (data.total_fees != null) { + message.total_fees = dependency_3.band.tunnel.v1beta1.TotalFees.fromObject(data.total_fees); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + tunnel_count?: number; + tunnels?: ReturnType[]; + deposits?: ReturnType[]; + total_fees?: ReturnType; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.tunnel_count != null) { + data.tunnel_count = this.tunnel_count; + } + if (this.tunnels != null) { + data.tunnels = this.tunnels.map((item: dependency_3.band.tunnel.v1beta1.Tunnel) => item.toObject()); + } + if (this.deposits != null) { + data.deposits = this.deposits.map((item: dependency_3.band.tunnel.v1beta1.Deposit) => item.toObject()); + } + if (this.total_fees != null) { + data.total_fees = this.total_fees.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.tunnel_count != 0) + writer.writeUint64(2, this.tunnel_count); + if (this.tunnels.length) + writer.writeRepeatedMessage(3, this.tunnels, (item: dependency_3.band.tunnel.v1beta1.Tunnel) => item.serialize(writer)); + if (this.deposits.length) + writer.writeRepeatedMessage(4, this.deposits, (item: dependency_3.band.tunnel.v1beta1.Deposit) => item.serialize(writer)); + if (this.has_total_fees) + writer.writeMessage(5, this.total_fees, () => this.total_fees.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_2.band.tunnel.v1beta1.Params.deserialize(reader)); + break; + case 2: + message.tunnel_count = reader.readUint64(); + break; + case 3: + reader.readMessage(message.tunnels, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_3.band.tunnel.v1beta1.Tunnel.deserialize(reader), dependency_3.band.tunnel.v1beta1.Tunnel)); + break; + case 4: + reader.readMessage(message.deposits, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_3.band.tunnel.v1beta1.Deposit.deserialize(reader), dependency_3.band.tunnel.v1beta1.Deposit)); + break; + case 5: + reader.readMessage(message.total_fees, () => message.total_fees = dependency_3.band.tunnel.v1beta1.TotalFees.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/codegen/band/tunnel/v1beta1/genesis_pb.d.ts b/codegen/band/tunnel/v1beta1/genesis_pb.d.ts new file mode 100644 index 0000000..913b628 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/genesis_pb.d.ts @@ -0,0 +1,52 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as band_tunnel_v1beta1_params_pb from "../../../band/tunnel/v1beta1/params_pb"; +import * as band_tunnel_v1beta1_tunnel_pb from "../../../band/tunnel/v1beta1/tunnel_pb"; + +export class GenesisState extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_tunnel_v1beta1_params_pb.Params | undefined; + setParams(value?: band_tunnel_v1beta1_params_pb.Params): void; + + getTunnelCount(): number; + setTunnelCount(value: number): void; + + clearTunnelsList(): void; + getTunnelsList(): Array; + setTunnelsList(value: Array): void; + addTunnels(value?: band_tunnel_v1beta1_tunnel_pb.Tunnel, index?: number): band_tunnel_v1beta1_tunnel_pb.Tunnel; + + clearDepositsList(): void; + getDepositsList(): Array; + setDepositsList(value: Array): void; + addDeposits(value?: band_tunnel_v1beta1_tunnel_pb.Deposit, index?: number): band_tunnel_v1beta1_tunnel_pb.Deposit; + + hasTotalFees(): boolean; + clearTotalFees(): void; + getTotalFees(): band_tunnel_v1beta1_tunnel_pb.TotalFees | undefined; + setTotalFees(value?: band_tunnel_v1beta1_tunnel_pb.TotalFees): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + params?: band_tunnel_v1beta1_params_pb.Params.AsObject, + tunnelCount: number, + tunnelsList: Array, + depositsList: Array, + totalFees?: band_tunnel_v1beta1_tunnel_pb.TotalFees.AsObject, + } +} + diff --git a/codegen/band/tunnel/v1beta1/genesis_pb.js b/codegen/band/tunnel/v1beta1/genesis_pb.js new file mode 100644 index 0000000..fb9a1a9 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/genesis_pb.js @@ -0,0 +1,391 @@ +// source: band/tunnel/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var band_tunnel_v1beta1_params_pb = require('../../../band/tunnel/v1beta1/params_pb.js'); +goog.object.extend(proto, band_tunnel_v1beta1_params_pb); +var band_tunnel_v1beta1_tunnel_pb = require('../../../band/tunnel/v1beta1/tunnel_pb.js'); +goog.object.extend(proto, band_tunnel_v1beta1_tunnel_pb); +goog.exportSymbol('proto.band.tunnel.v1beta1.GenesisState', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.GenesisState.displayName = 'proto.band.tunnel.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.GenesisState.repeatedFields_ = [3,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && band_tunnel_v1beta1_params_pb.Params.toObject(includeInstance, f), + tunnelCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + tunnelsList: jspb.Message.toObjectList(msg.getTunnelsList(), + band_tunnel_v1beta1_tunnel_pb.Tunnel.toObject, includeInstance), + depositsList: jspb.Message.toObjectList(msg.getDepositsList(), + band_tunnel_v1beta1_tunnel_pb.Deposit.toObject, includeInstance), + totalFees: (f = msg.getTotalFees()) && band_tunnel_v1beta1_tunnel_pb.TotalFees.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.GenesisState} + */ +proto.band.tunnel.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.GenesisState; + return proto.band.tunnel.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.GenesisState} + */ +proto.band.tunnel.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_params_pb.Params; + reader.readMessage(value,band_tunnel_v1beta1_params_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelCount(value); + break; + case 3: + var value = new band_tunnel_v1beta1_tunnel_pb.Tunnel; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.Tunnel.deserializeBinaryFromReader); + msg.addTunnels(value); + break; + case 4: + var value = new band_tunnel_v1beta1_tunnel_pb.Deposit; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.Deposit.deserializeBinaryFromReader); + msg.addDeposits(value); + break; + case 5: + var value = new band_tunnel_v1beta1_tunnel_pb.TotalFees; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.TotalFees.deserializeBinaryFromReader); + msg.setTotalFees(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_tunnel_v1beta1_params_pb.Params.serializeBinaryToWriter + ); + } + f = message.getTunnelCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getTunnelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + band_tunnel_v1beta1_tunnel_pb.Tunnel.serializeBinaryToWriter + ); + } + f = message.getDepositsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + band_tunnel_v1beta1_tunnel_pb.Deposit.serializeBinaryToWriter + ); + } + f = message.getTotalFees(); + if (f != null) { + writer.writeMessage( + 5, + f, + band_tunnel_v1beta1_tunnel_pb.TotalFees.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.tunnel.v1beta1.Params} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.band.tunnel.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_tunnel_v1beta1_params_pb.Params, 1)); +}; + + +/** + * @param {?proto.band.tunnel.v1beta1.Params|undefined} value + * @return {!proto.band.tunnel.v1beta1.GenesisState} returns this +*/ +proto.band.tunnel.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.GenesisState} returns this + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 tunnel_count = 2; + * @return {number} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.getTunnelCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.GenesisState} returns this + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.setTunnelCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated Tunnel tunnels = 3; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.getTunnelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tunnel_v1beta1_tunnel_pb.Tunnel, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.GenesisState} returns this +*/ +proto.band.tunnel.v1beta1.GenesisState.prototype.setTunnelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.band.tunnel.v1beta1.Tunnel=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tunnel.v1beta1.Tunnel} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.addTunnels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.tunnel.v1beta1.Tunnel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.GenesisState} returns this + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.clearTunnelsList = function() { + return this.setTunnelsList([]); +}; + + +/** + * repeated Deposit deposits = 4; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.getDepositsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tunnel_v1beta1_tunnel_pb.Deposit, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.GenesisState} returns this +*/ +proto.band.tunnel.v1beta1.GenesisState.prototype.setDepositsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.band.tunnel.v1beta1.Deposit=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tunnel.v1beta1.Deposit} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.addDeposits = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.band.tunnel.v1beta1.Deposit, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.GenesisState} returns this + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.clearDepositsList = function() { + return this.setDepositsList([]); +}; + + +/** + * optional TotalFees total_fees = 5; + * @return {?proto.band.tunnel.v1beta1.TotalFees} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.getTotalFees = function() { + return /** @type{?proto.band.tunnel.v1beta1.TotalFees} */ ( + jspb.Message.getWrapperField(this, band_tunnel_v1beta1_tunnel_pb.TotalFees, 5)); +}; + + +/** + * @param {?proto.band.tunnel.v1beta1.TotalFees|undefined} value + * @return {!proto.band.tunnel.v1beta1.GenesisState} returns this +*/ +proto.band.tunnel.v1beta1.GenesisState.prototype.setTotalFees = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.GenesisState} returns this + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.clearTotalFees = function() { + return this.setTotalFees(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.GenesisState.prototype.hasTotalFees = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +goog.object.extend(exports, proto.band.tunnel.v1beta1); diff --git a/codegen/band/tunnel/v1beta1/genesis_pb_service.d.ts b/codegen/band/tunnel/v1beta1/genesis_pb_service.d.ts new file mode 100644 index 0000000..4cffbbf --- /dev/null +++ b/codegen/band/tunnel/v1beta1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/genesis.proto + diff --git a/codegen/band/tunnel/v1beta1/genesis_pb_service.js b/codegen/band/tunnel/v1beta1/genesis_pb_service.js new file mode 100644 index 0000000..4cffbbf --- /dev/null +++ b/codegen/band/tunnel/v1beta1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/genesis.proto + diff --git a/codegen/band/tunnel/v1beta1/params.ts b/codegen/band/tunnel/v1beta1/params.ts new file mode 100644 index 0000000..a29659c --- /dev/null +++ b/codegen/band/tunnel/v1beta1/params.ts @@ -0,0 +1,215 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tunnel/v1beta1/params.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos/base/v1beta1/coin"; +import * as pb_1 from "google-protobuf"; +export namespace band.tunnel.v1beta1 { + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + min_deposit?: dependency_2.cosmos.base.v1beta1.Coin[]; + min_interval?: number; + max_interval?: number; + min_deviation_bps?: number; + max_deviation_bps?: number; + max_signals?: number; + base_packet_fee?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("min_deposit" in data && data.min_deposit != undefined) { + this.min_deposit = data.min_deposit; + } + if ("min_interval" in data && data.min_interval != undefined) { + this.min_interval = data.min_interval; + } + if ("max_interval" in data && data.max_interval != undefined) { + this.max_interval = data.max_interval; + } + if ("min_deviation_bps" in data && data.min_deviation_bps != undefined) { + this.min_deviation_bps = data.min_deviation_bps; + } + if ("max_deviation_bps" in data && data.max_deviation_bps != undefined) { + this.max_deviation_bps = data.max_deviation_bps; + } + if ("max_signals" in data && data.max_signals != undefined) { + this.max_signals = data.max_signals; + } + if ("base_packet_fee" in data && data.base_packet_fee != undefined) { + this.base_packet_fee = data.base_packet_fee; + } + } + } + get min_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 1) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set min_deposit(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get min_interval() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set min_interval(value: number) { + pb_1.Message.setField(this, 2, value); + } + get max_interval() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set max_interval(value: number) { + pb_1.Message.setField(this, 3, value); + } + get min_deviation_bps() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set min_deviation_bps(value: number) { + pb_1.Message.setField(this, 4, value); + } + get max_deviation_bps() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set max_deviation_bps(value: number) { + pb_1.Message.setField(this, 5, value); + } + get max_signals() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set max_signals(value: number) { + pb_1.Message.setField(this, 6, value); + } + get base_packet_fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 7) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set base_packet_fee(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + static fromObject(data: { + min_deposit?: ReturnType[]; + min_interval?: number; + max_interval?: number; + min_deviation_bps?: number; + max_deviation_bps?: number; + max_signals?: number; + base_packet_fee?: ReturnType[]; + }): Params { + const message = new Params({}); + if (data.min_deposit != null) { + message.min_deposit = data.min_deposit.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.min_interval != null) { + message.min_interval = data.min_interval; + } + if (data.max_interval != null) { + message.max_interval = data.max_interval; + } + if (data.min_deviation_bps != null) { + message.min_deviation_bps = data.min_deviation_bps; + } + if (data.max_deviation_bps != null) { + message.max_deviation_bps = data.max_deviation_bps; + } + if (data.max_signals != null) { + message.max_signals = data.max_signals; + } + if (data.base_packet_fee != null) { + message.base_packet_fee = data.base_packet_fee.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + min_deposit?: ReturnType[]; + min_interval?: number; + max_interval?: number; + min_deviation_bps?: number; + max_deviation_bps?: number; + max_signals?: number; + base_packet_fee?: ReturnType[]; + } = {}; + if (this.min_deposit != null) { + data.min_deposit = this.min_deposit.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.min_interval != null) { + data.min_interval = this.min_interval; + } + if (this.max_interval != null) { + data.max_interval = this.max_interval; + } + if (this.min_deviation_bps != null) { + data.min_deviation_bps = this.min_deviation_bps; + } + if (this.max_deviation_bps != null) { + data.max_deviation_bps = this.max_deviation_bps; + } + if (this.max_signals != null) { + data.max_signals = this.max_signals; + } + if (this.base_packet_fee != null) { + data.base_packet_fee = this.base_packet_fee.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.min_deposit.length) + writer.writeRepeatedMessage(1, this.min_deposit, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.min_interval != 0) + writer.writeUint64(2, this.min_interval); + if (this.max_interval != 0) + writer.writeUint64(3, this.max_interval); + if (this.min_deviation_bps != 0) + writer.writeUint64(4, this.min_deviation_bps); + if (this.max_deviation_bps != 0) + writer.writeUint64(5, this.max_deviation_bps); + if (this.max_signals != 0) + writer.writeUint64(6, this.max_signals); + if (this.base_packet_fee.length) + writer.writeRepeatedMessage(7, this.base_packet_fee, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.min_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + case 2: + message.min_interval = reader.readUint64(); + break; + case 3: + message.max_interval = reader.readUint64(); + break; + case 4: + message.min_deviation_bps = reader.readUint64(); + break; + case 5: + message.max_deviation_bps = reader.readUint64(); + break; + case 6: + message.max_signals = reader.readUint64(); + break; + case 7: + reader.readMessage(message.base_packet_fee, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/codegen/band/tunnel/v1beta1/params_pb.d.ts b/codegen/band/tunnel/v1beta1/params_pb.d.ts new file mode 100644 index 0000000..fced577 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/params_pb.d.ts @@ -0,0 +1,55 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/params.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; + +export class Params extends jspb.Message { + clearMinDepositList(): void; + getMinDepositList(): Array; + setMinDepositList(value: Array): void; + addMinDeposit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getMinInterval(): number; + setMinInterval(value: number): void; + + getMaxInterval(): number; + setMaxInterval(value: number): void; + + getMinDeviationBps(): number; + setMinDeviationBps(value: number): void; + + getMaxDeviationBps(): number; + setMaxDeviationBps(value: number): void; + + getMaxSignals(): number; + setMaxSignals(value: number): void; + + clearBasePacketFeeList(): void; + getBasePacketFeeList(): Array; + setBasePacketFeeList(value: Array): void; + addBasePacketFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + minDepositList: Array, + minInterval: number, + maxInterval: number, + minDeviationBps: number, + maxDeviationBps: number, + maxSignals: number, + basePacketFeeList: Array, + } +} + diff --git a/codegen/band/tunnel/v1beta1/params_pb.js b/codegen/band/tunnel/v1beta1/params_pb.js new file mode 100644 index 0000000..e24b122 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/params_pb.js @@ -0,0 +1,407 @@ +// source: band/tunnel/v1beta1/params.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.band.tunnel.v1beta1.Params', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.Params.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.Params.displayName = 'proto.band.tunnel.v1beta1.Params'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.Params.repeatedFields_ = [1,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + minDepositList: jspb.Message.toObjectList(msg.getMinDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + minInterval: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxInterval: jspb.Message.getFieldWithDefault(msg, 3, 0), + minDeviationBps: jspb.Message.getFieldWithDefault(msg, 4, 0), + maxDeviationBps: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxSignals: jspb.Message.getFieldWithDefault(msg, 6, 0), + basePacketFeeList: jspb.Message.toObjectList(msg.getBasePacketFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.Params} + */ +proto.band.tunnel.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.Params; + return proto.band.tunnel.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.Params} + */ +proto.band.tunnel.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addMinDeposit(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinInterval(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxInterval(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinDeviationBps(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxDeviationBps(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxSignals(value); + break; + case 7: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addBasePacketFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMinDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getMinInterval(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getMaxInterval(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getMinDeviationBps(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getMaxDeviationBps(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getMaxSignals(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getBasePacketFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin min_deposit = 1; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.Params.prototype.getMinDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.Params} returns this +*/ +proto.band.tunnel.v1beta1.Params.prototype.setMinDepositList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.Params.prototype.addMinDeposit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.Params} returns this + */ +proto.band.tunnel.v1beta1.Params.prototype.clearMinDepositList = function() { + return this.setMinDepositList([]); +}; + + +/** + * optional uint64 min_interval = 2; + * @return {number} + */ +proto.band.tunnel.v1beta1.Params.prototype.getMinInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Params} returns this + */ +proto.band.tunnel.v1beta1.Params.prototype.setMinInterval = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 max_interval = 3; + * @return {number} + */ +proto.band.tunnel.v1beta1.Params.prototype.getMaxInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Params} returns this + */ +proto.band.tunnel.v1beta1.Params.prototype.setMaxInterval = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 min_deviation_bps = 4; + * @return {number} + */ +proto.band.tunnel.v1beta1.Params.prototype.getMinDeviationBps = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Params} returns this + */ +proto.band.tunnel.v1beta1.Params.prototype.setMinDeviationBps = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 max_deviation_bps = 5; + * @return {number} + */ +proto.band.tunnel.v1beta1.Params.prototype.getMaxDeviationBps = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Params} returns this + */ +proto.band.tunnel.v1beta1.Params.prototype.setMaxDeviationBps = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 max_signals = 6; + * @return {number} + */ +proto.band.tunnel.v1beta1.Params.prototype.getMaxSignals = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Params} returns this + */ +proto.band.tunnel.v1beta1.Params.prototype.setMaxSignals = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin base_packet_fee = 7; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.Params.prototype.getBasePacketFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.Params} returns this +*/ +proto.band.tunnel.v1beta1.Params.prototype.setBasePacketFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.Params.prototype.addBasePacketFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.Params} returns this + */ +proto.band.tunnel.v1beta1.Params.prototype.clearBasePacketFeeList = function() { + return this.setBasePacketFeeList([]); +}; + + +goog.object.extend(exports, proto.band.tunnel.v1beta1); diff --git a/codegen/band/tunnel/v1beta1/params_pb_service.d.ts b/codegen/band/tunnel/v1beta1/params_pb_service.d.ts new file mode 100644 index 0000000..45a4ef7 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/params_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/params.proto + diff --git a/codegen/band/tunnel/v1beta1/params_pb_service.js b/codegen/band/tunnel/v1beta1/params_pb_service.js new file mode 100644 index 0000000..45a4ef7 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/params_pb_service.js @@ -0,0 +1,3 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/params.proto + diff --git a/codegen/band/tunnel/v1beta1/query.ts b/codegen/band/tunnel/v1beta1/query.ts new file mode 100644 index 0000000..51c6c84 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/query.ts @@ -0,0 +1,1392 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tunnel/v1beta1/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 "./../../../google/api/annotations"; +import * as dependency_4 from "./params"; +import * as dependency_5 from "./tunnel"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.tunnel.v1beta1 { + export enum TunnelStatusFilter { + TUNNEL_STATUS_FILTER_UNSPECIFIED = 0, + TUNNEL_STATUS_FILTER_ACTIVE = 1, + TUNNEL_STATUS_FILTER_INACTIVE = 2 + } + export class QueryTunnelsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + status_filter?: TunnelStatusFilter; + 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 ("status_filter" in data && data.status_filter != undefined) { + this.status_filter = data.status_filter; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get status_filter() { + return pb_1.Message.getFieldWithDefault(this, 1, TunnelStatusFilter.TUNNEL_STATUS_FILTER_UNSPECIFIED) as TunnelStatusFilter; + } + set status_filter(value: TunnelStatusFilter) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + status_filter?: TunnelStatusFilter; + pagination?: ReturnType; + }): QueryTunnelsRequest { + const message = new QueryTunnelsRequest({}); + if (data.status_filter != null) { + message.status_filter = data.status_filter; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + status_filter?: TunnelStatusFilter; + pagination?: ReturnType; + } = {}; + if (this.status_filter != null) { + data.status_filter = this.status_filter; + } + 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.status_filter != TunnelStatusFilter.TUNNEL_STATUS_FILTER_UNSPECIFIED) + writer.writeEnum(1, this.status_filter); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTunnelsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTunnelsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.status_filter = reader.readEnum(); + break; + case 2: + 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): QueryTunnelsRequest { + return QueryTunnelsRequest.deserialize(bytes); + } + } + export class QueryTunnelsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnels?: dependency_5.band.tunnel.v1beta1.Tunnel[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("tunnels" in data && data.tunnels != undefined) { + this.tunnels = data.tunnels; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get tunnels() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.tunnel.v1beta1.Tunnel, 1) as dependency_5.band.tunnel.v1beta1.Tunnel[]; + } + set tunnels(value: dependency_5.band.tunnel.v1beta1.Tunnel[]) { + 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; + } + static fromObject(data: { + tunnels?: ReturnType[]; + pagination?: ReturnType; + }): QueryTunnelsResponse { + const message = new QueryTunnelsResponse({}); + if (data.tunnels != null) { + message.tunnels = data.tunnels.map(item => dependency_5.band.tunnel.v1beta1.Tunnel.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + tunnels?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.tunnels != null) { + data.tunnels = this.tunnels.map((item: dependency_5.band.tunnel.v1beta1.Tunnel) => item.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.tunnels.length) + writer.writeRepeatedMessage(1, this.tunnels, (item: dependency_5.band.tunnel.v1beta1.Tunnel) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTunnelsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTunnelsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tunnels, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.tunnel.v1beta1.Tunnel.deserialize(reader), dependency_5.band.tunnel.v1beta1.Tunnel)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTunnelsResponse { + return QueryTunnelsResponse.deserialize(bytes); + } + } + export class QueryTunnelRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: 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 ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + tunnel_id?: number; + }): QueryTunnelRequest { + const message = new QueryTunnelRequest({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTunnelRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTunnelRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTunnelRequest { + return QueryTunnelRequest.deserialize(bytes); + } + } + export class QueryTunnelResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel?: dependency_5.band.tunnel.v1beta1.Tunnel; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tunnel" in data && data.tunnel != undefined) { + this.tunnel = data.tunnel; + } + } + } + get tunnel() { + return pb_1.Message.getWrapperField(this, dependency_5.band.tunnel.v1beta1.Tunnel, 1) as dependency_5.band.tunnel.v1beta1.Tunnel; + } + set tunnel(value: dependency_5.band.tunnel.v1beta1.Tunnel) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tunnel() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + tunnel?: ReturnType; + }): QueryTunnelResponse { + const message = new QueryTunnelResponse({}); + if (data.tunnel != null) { + message.tunnel = dependency_5.band.tunnel.v1beta1.Tunnel.fromObject(data.tunnel); + } + return message; + } + toObject() { + const data: { + tunnel?: ReturnType; + } = {}; + if (this.tunnel != null) { + data.tunnel = this.tunnel.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_tunnel) + writer.writeMessage(1, this.tunnel, () => this.tunnel.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTunnelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTunnelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tunnel, () => message.tunnel = dependency_5.band.tunnel.v1beta1.Tunnel.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTunnelResponse { + return QueryTunnelResponse.deserialize(bytes); + } + } + export class QueryDepositsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + 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 ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + tunnel_id?: number; + pagination?: ReturnType; + }): QueryDepositsRequest { + const message = new QueryDepositsRequest({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + pagination?: ReturnType; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + 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): QueryDepositsRequest { + return QueryDepositsRequest.deserialize(bytes); + } + } + export class QueryDepositsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + deposits?: dependency_5.band.tunnel.v1beta1.Deposit[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("deposits" in data && data.deposits != undefined) { + this.deposits = data.deposits; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get deposits() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.tunnel.v1beta1.Deposit, 1) as dependency_5.band.tunnel.v1beta1.Deposit[]; + } + set deposits(value: dependency_5.band.tunnel.v1beta1.Deposit[]) { + 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; + } + static fromObject(data: { + deposits?: ReturnType[]; + pagination?: ReturnType; + }): QueryDepositsResponse { + const message = new QueryDepositsResponse({}); + if (data.deposits != null) { + message.deposits = data.deposits.map(item => dependency_5.band.tunnel.v1beta1.Deposit.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + deposits?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.deposits != null) { + data.deposits = this.deposits.map((item: dependency_5.band.tunnel.v1beta1.Deposit) => item.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.deposits.length) + writer.writeRepeatedMessage(1, this.deposits, (item: dependency_5.band.tunnel.v1beta1.Deposit) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.deposits, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.tunnel.v1beta1.Deposit.deserialize(reader), dependency_5.band.tunnel.v1beta1.Deposit)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositsResponse { + return QueryDepositsResponse.deserialize(bytes); + } + } + export class QueryDepositRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + depositor?: 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 ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tunnel_id?: number; + depositor?: string; + }): QueryDepositRequest { + const message = new QueryDepositRequest({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + depositor?: string; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.depositor.length) + writer.writeString(2, this.depositor); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + message.depositor = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositRequest { + return QueryDepositRequest.deserialize(bytes); + } + } + export class QueryDepositResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + deposit?: dependency_5.band.tunnel.v1beta1.Deposit; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("deposit" in data && data.deposit != undefined) { + this.deposit = data.deposit; + } + } + } + get deposit() { + return pb_1.Message.getWrapperField(this, dependency_5.band.tunnel.v1beta1.Deposit, 1) as dependency_5.band.tunnel.v1beta1.Deposit; + } + set deposit(value: dependency_5.band.tunnel.v1beta1.Deposit) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_deposit() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + deposit?: ReturnType; + }): QueryDepositResponse { + const message = new QueryDepositResponse({}); + if (data.deposit != null) { + message.deposit = dependency_5.band.tunnel.v1beta1.Deposit.fromObject(data.deposit); + } + return message; + } + toObject() { + const data: { + deposit?: ReturnType; + } = {}; + if (this.deposit != null) { + data.deposit = this.deposit.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_deposit) + writer.writeMessage(1, this.deposit, () => this.deposit.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.deposit, () => message.deposit = dependency_5.band.tunnel.v1beta1.Deposit.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositResponse { + return QueryDepositResponse.deserialize(bytes); + } + } + export class QueryPacketsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + 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 ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + tunnel_id?: number; + pagination?: ReturnType; + }): QueryPacketsRequest { + const message = new QueryPacketsRequest({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + pagination?: ReturnType; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPacketsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + 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): QueryPacketsRequest { + return QueryPacketsRequest.deserialize(bytes); + } + } + export class QueryPacketsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packets?: dependency_5.band.tunnel.v1beta1.Packet[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("packets" in data && data.packets != undefined) { + this.packets = data.packets; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get packets() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.band.tunnel.v1beta1.Packet, 1) as dependency_5.band.tunnel.v1beta1.Packet[]; + } + set packets(value: dependency_5.band.tunnel.v1beta1.Packet[]) { + 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; + } + static fromObject(data: { + packets?: ReturnType[]; + pagination?: ReturnType; + }): QueryPacketsResponse { + const message = new QueryPacketsResponse({}); + if (data.packets != null) { + message.packets = data.packets.map(item => dependency_5.band.tunnel.v1beta1.Packet.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + packets?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.packets != null) { + data.packets = this.packets.map((item: dependency_5.band.tunnel.v1beta1.Packet) => item.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.packets.length) + writer.writeRepeatedMessage(1, this.packets, (item: dependency_5.band.tunnel.v1beta1.Packet) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPacketsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packets, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.band.tunnel.v1beta1.Packet.deserialize(reader), dependency_5.band.tunnel.v1beta1.Packet)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketsResponse { + return QueryPacketsResponse.deserialize(bytes); + } + } + export class QueryPacketRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + sequence?: 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 ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tunnel_id?: number; + sequence?: number; + }): QueryPacketRequest { + const message = new QueryPacketRequest({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + sequence?: number; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.sequence != 0) + writer.writeUint64(2, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPacketRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketRequest { + return QueryPacketRequest.deserialize(bytes); + } + } + export class QueryPacketResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet?: dependency_5.band.tunnel.v1beta1.Packet; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("packet" in data && data.packet != undefined) { + this.packet = data.packet; + } + } + } + get packet() { + return pb_1.Message.getWrapperField(this, dependency_5.band.tunnel.v1beta1.Packet, 1) as dependency_5.band.tunnel.v1beta1.Packet; + } + set packet(value: dependency_5.band.tunnel.v1beta1.Packet) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + packet?: ReturnType; + }): QueryPacketResponse { + const message = new QueryPacketResponse({}); + if (data.packet != null) { + message.packet = dependency_5.band.tunnel.v1beta1.Packet.fromObject(data.packet); + } + return message; + } + toObject() { + const data: { + packet?: ReturnType; + } = {}; + if (this.packet != null) { + data.packet = this.packet.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_packet) + writer.writeMessage(1, this.packet, () => this.packet.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPacketResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet, () => message.packet = dependency_5.band.tunnel.v1beta1.Packet.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketResponse { + return QueryPacketResponse.deserialize(bytes); + } + } + export class QueryTotalFeesRequest 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: {}): QueryTotalFeesRequest { + const message = new QueryTotalFeesRequest({}); + 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): QueryTotalFeesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalFeesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalFeesRequest { + return QueryTotalFeesRequest.deserialize(bytes); + } + } + export class QueryTotalFeesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + total_fees?: dependency_5.band.tunnel.v1beta1.TotalFees; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("total_fees" in data && data.total_fees != undefined) { + this.total_fees = data.total_fees; + } + } + } + get total_fees() { + return pb_1.Message.getWrapperField(this, dependency_5.band.tunnel.v1beta1.TotalFees, 1) as dependency_5.band.tunnel.v1beta1.TotalFees; + } + set total_fees(value: dependency_5.band.tunnel.v1beta1.TotalFees) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_total_fees() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + total_fees?: ReturnType; + }): QueryTotalFeesResponse { + const message = new QueryTotalFeesResponse({}); + if (data.total_fees != null) { + message.total_fees = dependency_5.band.tunnel.v1beta1.TotalFees.fromObject(data.total_fees); + } + return message; + } + toObject() { + const data: { + total_fees?: ReturnType; + } = {}; + if (this.total_fees != null) { + data.total_fees = this.total_fees.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_total_fees) + writer.writeMessage(1, this.total_fees, () => this.total_fees.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalFeesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalFeesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.total_fees, () => message.total_fees = dependency_5.band.tunnel.v1beta1.TotalFees.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalFeesResponse { + return QueryTotalFeesResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_4.band.tunnel.v1beta1.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.band.tunnel.v1beta1.Params, 1) as dependency_4.band.tunnel.v1beta1.Params; + } + set params(value: dependency_4.band.tunnel.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_4.band.tunnel.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_4.band.tunnel.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Tunnels: { + path: "/band.tunnel.v1beta1.Query/Tunnels", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTunnelsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTunnelsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTunnelsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTunnelsResponse.deserialize(new Uint8Array(bytes)) + }, + Tunnel: { + path: "/band.tunnel.v1beta1.Query/Tunnel", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTunnelRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTunnelRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTunnelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTunnelResponse.deserialize(new Uint8Array(bytes)) + }, + Deposits: { + path: "/band.tunnel.v1beta1.Query/Deposits", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDepositsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDepositsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDepositsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDepositsResponse.deserialize(new Uint8Array(bytes)) + }, + Deposit: { + path: "/band.tunnel.v1beta1.Query/Deposit", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDepositRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDepositRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDepositResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDepositResponse.deserialize(new Uint8Array(bytes)) + }, + Packets: { + path: "/band.tunnel.v1beta1.Query/Packets", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPacketsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPacketsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPacketsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPacketsResponse.deserialize(new Uint8Array(bytes)) + }, + Packet: { + path: "/band.tunnel.v1beta1.Query/Packet", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPacketRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPacketRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPacketResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPacketResponse.deserialize(new Uint8Array(bytes)) + }, + TotalFees: { + path: "/band.tunnel.v1beta1.Query/TotalFees", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTotalFeesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTotalFeesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTotalFeesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTotalFeesResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/band.tunnel.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Tunnels(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Tunnel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Deposits(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Deposit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Packets(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Packet(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TotalFees(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Tunnels: GrpcUnaryServiceInterface = (message: QueryTunnelsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Tunnels(message, metadata, options, callback); + }; + Tunnel: GrpcUnaryServiceInterface = (message: QueryTunnelRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Tunnel(message, metadata, options, callback); + }; + Deposits: GrpcUnaryServiceInterface = (message: QueryDepositsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Deposits(message, metadata, options, callback); + }; + Deposit: GrpcUnaryServiceInterface = (message: QueryDepositRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Deposit(message, metadata, options, callback); + }; + Packets: GrpcUnaryServiceInterface = (message: QueryPacketsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Packets(message, metadata, options, callback); + }; + Packet: GrpcUnaryServiceInterface = (message: QueryPacketRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Packet(message, metadata, options, callback); + }; + TotalFees: GrpcUnaryServiceInterface = (message: QueryTotalFeesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TotalFees(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/tunnel/v1beta1/query_pb.d.ts b/codegen/band/tunnel/v1beta1/query_pb.d.ts new file mode 100644 index 0000000..aa7147f --- /dev/null +++ b/codegen/band/tunnel/v1beta1/query_pb.d.ts @@ -0,0 +1,390 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/query.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_base_query_v1beta1_pagination_pb from "../../../cosmos/base/query/v1beta1/pagination_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as band_tunnel_v1beta1_params_pb from "../../../band/tunnel/v1beta1/params_pb"; +import * as band_tunnel_v1beta1_tunnel_pb from "../../../band/tunnel/v1beta1/tunnel_pb"; + +export class QueryTunnelsRequest extends jspb.Message { + getStatusFilter(): TunnelStatusFilterMap[keyof TunnelStatusFilterMap]; + setStatusFilter(value: TunnelStatusFilterMap[keyof TunnelStatusFilterMap]): void; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTunnelsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryTunnelsRequest): QueryTunnelsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTunnelsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTunnelsRequest; + static deserializeBinaryFromReader(message: QueryTunnelsRequest, reader: jspb.BinaryReader): QueryTunnelsRequest; +} + +export namespace QueryTunnelsRequest { + export type AsObject = { + statusFilter: TunnelStatusFilterMap[keyof TunnelStatusFilterMap], + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryTunnelsResponse extends jspb.Message { + clearTunnelsList(): void; + getTunnelsList(): Array; + setTunnelsList(value: Array): void; + addTunnels(value?: band_tunnel_v1beta1_tunnel_pb.Tunnel, index?: number): band_tunnel_v1beta1_tunnel_pb.Tunnel; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTunnelsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryTunnelsResponse): QueryTunnelsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTunnelsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTunnelsResponse; + static deserializeBinaryFromReader(message: QueryTunnelsResponse, reader: jspb.BinaryReader): QueryTunnelsResponse; +} + +export namespace QueryTunnelsResponse { + export type AsObject = { + tunnelsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryTunnelRequest extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTunnelRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryTunnelRequest): QueryTunnelRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTunnelRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTunnelRequest; + static deserializeBinaryFromReader(message: QueryTunnelRequest, reader: jspb.BinaryReader): QueryTunnelRequest; +} + +export namespace QueryTunnelRequest { + export type AsObject = { + tunnelId: number, + } +} + +export class QueryTunnelResponse extends jspb.Message { + hasTunnel(): boolean; + clearTunnel(): void; + getTunnel(): band_tunnel_v1beta1_tunnel_pb.Tunnel | undefined; + setTunnel(value?: band_tunnel_v1beta1_tunnel_pb.Tunnel): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTunnelResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryTunnelResponse): QueryTunnelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTunnelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTunnelResponse; + static deserializeBinaryFromReader(message: QueryTunnelResponse, reader: jspb.BinaryReader): QueryTunnelResponse; +} + +export namespace QueryTunnelResponse { + export type AsObject = { + tunnel?: band_tunnel_v1beta1_tunnel_pb.Tunnel.AsObject, + } +} + +export class QueryDepositsRequest extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDepositsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryDepositsRequest): QueryDepositsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDepositsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDepositsRequest; + static deserializeBinaryFromReader(message: QueryDepositsRequest, reader: jspb.BinaryReader): QueryDepositsRequest; +} + +export namespace QueryDepositsRequest { + export type AsObject = { + tunnelId: number, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryDepositsResponse extends jspb.Message { + clearDepositsList(): void; + getDepositsList(): Array; + setDepositsList(value: Array): void; + addDeposits(value?: band_tunnel_v1beta1_tunnel_pb.Deposit, index?: number): band_tunnel_v1beta1_tunnel_pb.Deposit; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDepositsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryDepositsResponse): QueryDepositsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDepositsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDepositsResponse; + static deserializeBinaryFromReader(message: QueryDepositsResponse, reader: jspb.BinaryReader): QueryDepositsResponse; +} + +export namespace QueryDepositsResponse { + export type AsObject = { + depositsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryDepositRequest extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + getDepositor(): string; + setDepositor(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDepositRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryDepositRequest): QueryDepositRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDepositRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDepositRequest; + static deserializeBinaryFromReader(message: QueryDepositRequest, reader: jspb.BinaryReader): QueryDepositRequest; +} + +export namespace QueryDepositRequest { + export type AsObject = { + tunnelId: number, + depositor: string, + } +} + +export class QueryDepositResponse extends jspb.Message { + hasDeposit(): boolean; + clearDeposit(): void; + getDeposit(): band_tunnel_v1beta1_tunnel_pb.Deposit | undefined; + setDeposit(value?: band_tunnel_v1beta1_tunnel_pb.Deposit): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDepositResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryDepositResponse): QueryDepositResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDepositResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDepositResponse; + static deserializeBinaryFromReader(message: QueryDepositResponse, reader: jspb.BinaryReader): QueryDepositResponse; +} + +export namespace QueryDepositResponse { + export type AsObject = { + deposit?: band_tunnel_v1beta1_tunnel_pb.Deposit.AsObject, + } +} + +export class QueryPacketsRequest extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryPacketsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryPacketsRequest): QueryPacketsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryPacketsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPacketsRequest; + static deserializeBinaryFromReader(message: QueryPacketsRequest, reader: jspb.BinaryReader): QueryPacketsRequest; +} + +export namespace QueryPacketsRequest { + export type AsObject = { + tunnelId: number, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryPacketsResponse extends jspb.Message { + clearPacketsList(): void; + getPacketsList(): Array; + setPacketsList(value: Array): void; + addPackets(value?: band_tunnel_v1beta1_tunnel_pb.Packet, index?: number): band_tunnel_v1beta1_tunnel_pb.Packet; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryPacketsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryPacketsResponse): QueryPacketsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryPacketsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPacketsResponse; + static deserializeBinaryFromReader(message: QueryPacketsResponse, reader: jspb.BinaryReader): QueryPacketsResponse; +} + +export namespace QueryPacketsResponse { + export type AsObject = { + packetsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryPacketRequest extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + getSequence(): number; + setSequence(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryPacketRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryPacketRequest): QueryPacketRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryPacketRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPacketRequest; + static deserializeBinaryFromReader(message: QueryPacketRequest, reader: jspb.BinaryReader): QueryPacketRequest; +} + +export namespace QueryPacketRequest { + export type AsObject = { + tunnelId: number, + sequence: number, + } +} + +export class QueryPacketResponse extends jspb.Message { + hasPacket(): boolean; + clearPacket(): void; + getPacket(): band_tunnel_v1beta1_tunnel_pb.Packet | undefined; + setPacket(value?: band_tunnel_v1beta1_tunnel_pb.Packet): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryPacketResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryPacketResponse): QueryPacketResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryPacketResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPacketResponse; + static deserializeBinaryFromReader(message: QueryPacketResponse, reader: jspb.BinaryReader): QueryPacketResponse; +} + +export namespace QueryPacketResponse { + export type AsObject = { + packet?: band_tunnel_v1beta1_tunnel_pb.Packet.AsObject, + } +} + +export class QueryTotalFeesRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalFeesRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalFeesRequest): QueryTotalFeesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalFeesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalFeesRequest; + static deserializeBinaryFromReader(message: QueryTotalFeesRequest, reader: jspb.BinaryReader): QueryTotalFeesRequest; +} + +export namespace QueryTotalFeesRequest { + export type AsObject = { + } +} + +export class QueryTotalFeesResponse extends jspb.Message { + hasTotalFees(): boolean; + clearTotalFees(): void; + getTotalFees(): band_tunnel_v1beta1_tunnel_pb.TotalFees | undefined; + setTotalFees(value?: band_tunnel_v1beta1_tunnel_pb.TotalFees): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalFeesResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalFeesResponse): QueryTotalFeesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalFeesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalFeesResponse; + static deserializeBinaryFromReader(message: QueryTotalFeesResponse, reader: jspb.BinaryReader): QueryTotalFeesResponse; +} + +export namespace QueryTotalFeesResponse { + export type AsObject = { + totalFees?: band_tunnel_v1beta1_tunnel_pb.TotalFees.AsObject, + } +} + +export class QueryParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; + static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; +} + +export namespace QueryParamsRequest { + export type AsObject = { + } +} + +export class QueryParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): band_tunnel_v1beta1_params_pb.Params | undefined; + setParams(value?: band_tunnel_v1beta1_params_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; + static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; +} + +export namespace QueryParamsResponse { + export type AsObject = { + params?: band_tunnel_v1beta1_params_pb.Params.AsObject, + } +} + +export interface TunnelStatusFilterMap { + TUNNEL_STATUS_FILTER_UNSPECIFIED: 0; + TUNNEL_STATUS_FILTER_ACTIVE: 1; + TUNNEL_STATUS_FILTER_INACTIVE: 2; +} + +export const TunnelStatusFilter: TunnelStatusFilterMap; + diff --git a/codegen/band/tunnel/v1beta1/query_pb.js b/codegen/band/tunnel/v1beta1/query_pb.js new file mode 100644 index 0000000..98c4cf8 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/query_pb.js @@ -0,0 +1,2973 @@ +// source: band/tunnel/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js'); +goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var band_tunnel_v1beta1_params_pb = require('../../../band/tunnel/v1beta1/params_pb.js'); +goog.object.extend(proto, band_tunnel_v1beta1_params_pb); +var band_tunnel_v1beta1_tunnel_pb = require('../../../band/tunnel/v1beta1/tunnel_pb.js'); +goog.object.extend(proto, band_tunnel_v1beta1_tunnel_pb); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryDepositRequest', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryDepositResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryDepositsRequest', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryDepositsResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryPacketRequest', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryPacketResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryPacketsRequest', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryPacketsResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryTotalFeesRequest', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryTotalFeesResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryTunnelRequest', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryTunnelResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryTunnelsRequest', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.QueryTunnelsResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.TunnelStatusFilter', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryTunnelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryTunnelsRequest.displayName = 'proto.band.tunnel.v1beta1.QueryTunnelsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.QueryTunnelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryTunnelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryTunnelsResponse.displayName = 'proto.band.tunnel.v1beta1.QueryTunnelsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryTunnelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryTunnelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryTunnelRequest.displayName = 'proto.band.tunnel.v1beta1.QueryTunnelRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryTunnelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryTunnelResponse.displayName = 'proto.band.tunnel.v1beta1.QueryTunnelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryDepositsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryDepositsRequest.displayName = 'proto.band.tunnel.v1beta1.QueryDepositsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.QueryDepositsResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryDepositsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryDepositsResponse.displayName = 'proto.band.tunnel.v1beta1.QueryDepositsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryDepositRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryDepositRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryDepositRequest.displayName = 'proto.band.tunnel.v1beta1.QueryDepositRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryDepositResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryDepositResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryDepositResponse.displayName = 'proto.band.tunnel.v1beta1.QueryDepositResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryPacketsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryPacketsRequest.displayName = 'proto.band.tunnel.v1beta1.QueryPacketsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.QueryPacketsResponse.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryPacketsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryPacketsResponse.displayName = 'proto.band.tunnel.v1beta1.QueryPacketsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryPacketRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryPacketRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryPacketRequest.displayName = 'proto.band.tunnel.v1beta1.QueryPacketRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryPacketResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryPacketResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryPacketResponse.displayName = 'proto.band.tunnel.v1beta1.QueryPacketResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryTotalFeesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryTotalFeesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryTotalFeesRequest.displayName = 'proto.band.tunnel.v1beta1.QueryTotalFeesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryTotalFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryTotalFeesResponse.displayName = 'proto.band.tunnel.v1beta1.QueryTotalFeesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryParamsRequest.displayName = 'proto.band.tunnel.v1beta1.QueryParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.QueryParamsResponse.displayName = 'proto.band.tunnel.v1beta1.QueryParamsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryTunnelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryTunnelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + statusFilter: jspb.Message.getFieldWithDefault(msg, 1, 0), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsRequest} + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryTunnelsRequest; + return proto.band.tunnel.v1beta1.QueryTunnelsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryTunnelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsRequest} + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.band.tunnel.v1beta1.TunnelStatusFilter} */ (reader.readEnum()); + msg.setStatusFilter(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryTunnelsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryTunnelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatusFilter(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TunnelStatusFilter status_filter = 1; + * @return {!proto.band.tunnel.v1beta1.TunnelStatusFilter} + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.prototype.getStatusFilter = function() { + return /** @type {!proto.band.tunnel.v1beta1.TunnelStatusFilter} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.band.tunnel.v1beta1.TunnelStatusFilter} value + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.prototype.setStatusFilter = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsRequest} returns this +*/ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryTunnelsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryTunnelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryTunnelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelsList: jspb.Message.toObjectList(msg.getTunnelsList(), + band_tunnel_v1beta1_tunnel_pb.Tunnel.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsResponse} + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryTunnelsResponse; + return proto.band.tunnel.v1beta1.QueryTunnelsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryTunnelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsResponse} + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_tunnel_pb.Tunnel; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.Tunnel.deserializeBinaryFromReader); + msg.addTunnels(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryTunnelsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryTunnelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_tunnel_v1beta1_tunnel_pb.Tunnel.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Tunnel tunnels = 1; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.getTunnelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tunnel_v1beta1_tunnel_pb.Tunnel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.setTunnelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.tunnel.v1beta1.Tunnel=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tunnel.v1beta1.Tunnel} + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.addTunnels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tunnel.v1beta1.Tunnel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.clearTunnelsList = function() { + return this.setTunnelsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelsResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryTunnelsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryTunnelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryTunnelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryTunnelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTunnelRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelRequest} + */ +proto.band.tunnel.v1beta1.QueryTunnelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryTunnelRequest; + return proto.band.tunnel.v1beta1.QueryTunnelRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryTunnelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelRequest} + */ +proto.band.tunnel.v1beta1.QueryTunnelRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryTunnelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryTunnelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryTunnelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTunnelRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.QueryTunnelRequest.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.QueryTunnelRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryTunnelRequest.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryTunnelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryTunnelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tunnel: (f = msg.getTunnel()) && band_tunnel_v1beta1_tunnel_pb.Tunnel.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelResponse} + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryTunnelResponse; + return proto.band.tunnel.v1beta1.QueryTunnelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryTunnelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelResponse} + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_tunnel_pb.Tunnel; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.Tunnel.deserializeBinaryFromReader); + msg.setTunnel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryTunnelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryTunnelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnel(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_tunnel_v1beta1_tunnel_pb.Tunnel.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Tunnel tunnel = 1; + * @return {?proto.band.tunnel.v1beta1.Tunnel} + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse.prototype.getTunnel = function() { + return /** @type{?proto.band.tunnel.v1beta1.Tunnel} */ ( + jspb.Message.getWrapperField(this, band_tunnel_v1beta1_tunnel_pb.Tunnel, 1)); +}; + + +/** + * @param {?proto.band.tunnel.v1beta1.Tunnel|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryTunnelResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryTunnelResponse.prototype.setTunnel = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryTunnelResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse.prototype.clearTunnel = function() { + return this.setTunnel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryTunnelResponse.prototype.hasTunnel = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryDepositsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryDepositsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryDepositsRequest} + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryDepositsRequest; + return proto.band.tunnel.v1beta1.QueryDepositsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryDepositsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryDepositsRequest} + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryDepositsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryDepositsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.QueryDepositsRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryDepositsRequest} returns this +*/ +proto.band.tunnel.v1beta1.QueryDepositsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryDepositsRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryDepositsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryDepositsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryDepositsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + depositsList: jspb.Message.toObjectList(msg.getDepositsList(), + band_tunnel_v1beta1_tunnel_pb.Deposit.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryDepositsResponse} + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryDepositsResponse; + return proto.band.tunnel.v1beta1.QueryDepositsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryDepositsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryDepositsResponse} + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_tunnel_pb.Deposit; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.Deposit.deserializeBinaryFromReader); + msg.addDeposits(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryDepositsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryDepositsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDepositsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_tunnel_v1beta1_tunnel_pb.Deposit.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Deposit deposits = 1; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.getDepositsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tunnel_v1beta1_tunnel_pb.Deposit, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.QueryDepositsResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.setDepositsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.tunnel.v1beta1.Deposit=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tunnel.v1beta1.Deposit} + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.addDeposits = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tunnel.v1beta1.Deposit, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.QueryDepositsResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.clearDepositsList = function() { + return this.setDepositsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryDepositsResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryDepositsResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryDepositsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryDepositRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryDepositRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + depositor: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryDepositRequest} + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryDepositRequest; + return proto.band.tunnel.v1beta1.QueryDepositRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryDepositRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryDepositRequest} + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDepositor(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryDepositRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryDepositRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDepositor(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.QueryDepositRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.QueryDepositRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryDepositRequest.prototype.setDepositor = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryDepositResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryDepositResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryDepositResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryDepositResponse.toObject = function(includeInstance, msg) { + var f, obj = { + deposit: (f = msg.getDeposit()) && band_tunnel_v1beta1_tunnel_pb.Deposit.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryDepositResponse} + */ +proto.band.tunnel.v1beta1.QueryDepositResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryDepositResponse; + return proto.band.tunnel.v1beta1.QueryDepositResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryDepositResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryDepositResponse} + */ +proto.band.tunnel.v1beta1.QueryDepositResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_tunnel_pb.Deposit; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.Deposit.deserializeBinaryFromReader); + msg.setDeposit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryDepositResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryDepositResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryDepositResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryDepositResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDeposit(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_tunnel_v1beta1_tunnel_pb.Deposit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Deposit deposit = 1; + * @return {?proto.band.tunnel.v1beta1.Deposit} + */ +proto.band.tunnel.v1beta1.QueryDepositResponse.prototype.getDeposit = function() { + return /** @type{?proto.band.tunnel.v1beta1.Deposit} */ ( + jspb.Message.getWrapperField(this, band_tunnel_v1beta1_tunnel_pb.Deposit, 1)); +}; + + +/** + * @param {?proto.band.tunnel.v1beta1.Deposit|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryDepositResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryDepositResponse.prototype.setDeposit = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryDepositResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryDepositResponse.prototype.clearDeposit = function() { + return this.setDeposit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryDepositResponse.prototype.hasDeposit = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryPacketsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryPacketsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryPacketsRequest} + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryPacketsRequest; + return proto.band.tunnel.v1beta1.QueryPacketsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryPacketsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryPacketsRequest} + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryPacketsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryPacketsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.QueryPacketsRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryPacketsRequest} returns this +*/ +proto.band.tunnel.v1beta1.QueryPacketsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryPacketsRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryPacketsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryPacketsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryPacketsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + packetsList: jspb.Message.toObjectList(msg.getPacketsList(), + band_tunnel_v1beta1_tunnel_pb.Packet.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryPacketsResponse} + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryPacketsResponse; + return proto.band.tunnel.v1beta1.QueryPacketsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryPacketsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryPacketsResponse} + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_tunnel_pb.Packet; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.Packet.deserializeBinaryFromReader); + msg.addPackets(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryPacketsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryPacketsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacketsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_tunnel_v1beta1_tunnel_pb.Packet.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Packet packets = 1; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.getPacketsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tunnel_v1beta1_tunnel_pb.Packet, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.QueryPacketsResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.setPacketsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.tunnel.v1beta1.Packet=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tunnel.v1beta1.Packet} + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.addPackets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tunnel.v1beta1.Packet, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.QueryPacketsResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.clearPacketsList = function() { + return this.setPacketsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryPacketsResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryPacketsResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryPacketsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryPacketRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryPacketRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + sequence: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryPacketRequest} + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryPacketRequest; + return proto.band.tunnel.v1beta1.QueryPacketRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryPacketRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryPacketRequest} + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryPacketRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryPacketRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.QueryPacketRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 sequence = 2; + * @return {number} + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.QueryPacketRequest} returns this + */ +proto.band.tunnel.v1beta1.QueryPacketRequest.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryPacketResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryPacketResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryPacketResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryPacketResponse.toObject = function(includeInstance, msg) { + var f, obj = { + packet: (f = msg.getPacket()) && band_tunnel_v1beta1_tunnel_pb.Packet.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryPacketResponse} + */ +proto.band.tunnel.v1beta1.QueryPacketResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryPacketResponse; + return proto.band.tunnel.v1beta1.QueryPacketResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryPacketResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryPacketResponse} + */ +proto.band.tunnel.v1beta1.QueryPacketResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_tunnel_pb.Packet; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.Packet.deserializeBinaryFromReader); + msg.setPacket(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryPacketResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryPacketResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryPacketResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryPacketResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacket(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_tunnel_v1beta1_tunnel_pb.Packet.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Packet packet = 1; + * @return {?proto.band.tunnel.v1beta1.Packet} + */ +proto.band.tunnel.v1beta1.QueryPacketResponse.prototype.getPacket = function() { + return /** @type{?proto.band.tunnel.v1beta1.Packet} */ ( + jspb.Message.getWrapperField(this, band_tunnel_v1beta1_tunnel_pb.Packet, 1)); +}; + + +/** + * @param {?proto.band.tunnel.v1beta1.Packet|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryPacketResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryPacketResponse.prototype.setPacket = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryPacketResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryPacketResponse.prototype.clearPacket = function() { + return this.setPacket(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryPacketResponse.prototype.hasPacket = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryTotalFeesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryTotalFeesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTotalFeesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryTotalFeesRequest} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryTotalFeesRequest; + return proto.band.tunnel.v1beta1.QueryTotalFeesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryTotalFeesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryTotalFeesRequest} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryTotalFeesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryTotalFeesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTotalFeesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryTotalFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryTotalFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + totalFees: (f = msg.getTotalFees()) && band_tunnel_v1beta1_tunnel_pb.TotalFees.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryTotalFeesResponse} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryTotalFeesResponse; + return proto.band.tunnel.v1beta1.QueryTotalFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryTotalFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryTotalFeesResponse} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_tunnel_pb.TotalFees; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.TotalFees.deserializeBinaryFromReader); + msg.setTotalFees(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryTotalFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryTotalFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalFees(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_tunnel_v1beta1_tunnel_pb.TotalFees.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TotalFees total_fees = 1; + * @return {?proto.band.tunnel.v1beta1.TotalFees} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.prototype.getTotalFees = function() { + return /** @type{?proto.band.tunnel.v1beta1.TotalFees} */ ( + jspb.Message.getWrapperField(this, band_tunnel_v1beta1_tunnel_pb.TotalFees, 1)); +}; + + +/** + * @param {?proto.band.tunnel.v1beta1.TotalFees|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryTotalFeesResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.prototype.setTotalFees = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryTotalFeesResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.prototype.clearTotalFees = function() { + return this.setTotalFees(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryTotalFeesResponse.prototype.hasTotalFees = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryParamsRequest} + */ +proto.band.tunnel.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryParamsRequest; + return proto.band.tunnel.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryParamsRequest} + */ +proto.band.tunnel.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.QueryParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && band_tunnel_v1beta1_params_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.QueryParamsResponse} + */ +proto.band.tunnel.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.QueryParamsResponse; + return proto.band.tunnel.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.QueryParamsResponse} + */ +proto.band.tunnel.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_params_pb.Params; + reader.readMessage(value,band_tunnel_v1beta1_params_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.QueryParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + band_tunnel_v1beta1_params_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.band.tunnel.v1beta1.Params} + */ +proto.band.tunnel.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.band.tunnel.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_tunnel_v1beta1_params_pb.Params, 1)); +}; + + +/** + * @param {?proto.band.tunnel.v1beta1.Params|undefined} value + * @return {!proto.band.tunnel.v1beta1.QueryParamsResponse} returns this +*/ +proto.band.tunnel.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.QueryParamsResponse} returns this + */ +proto.band.tunnel.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * @enum {number} + */ +proto.band.tunnel.v1beta1.TunnelStatusFilter = { + TUNNEL_STATUS_FILTER_UNSPECIFIED: 0, + TUNNEL_STATUS_FILTER_ACTIVE: 1, + TUNNEL_STATUS_FILTER_INACTIVE: 2 +}; + +goog.object.extend(exports, proto.band.tunnel.v1beta1); diff --git a/codegen/band/tunnel/v1beta1/query_pb_service.d.ts b/codegen/band/tunnel/v1beta1/query_pb_service.d.ts new file mode 100644 index 0000000..c877acd --- /dev/null +++ b/codegen/band/tunnel/v1beta1/query_pb_service.d.ts @@ -0,0 +1,196 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/query.proto + +import * as band_tunnel_v1beta1_query_pb from "../../../band/tunnel/v1beta1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryTunnels = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_query_pb.QueryTunnelsRequest; + readonly responseType: typeof band_tunnel_v1beta1_query_pb.QueryTunnelsResponse; +}; + +type QueryTunnel = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_query_pb.QueryTunnelRequest; + readonly responseType: typeof band_tunnel_v1beta1_query_pb.QueryTunnelResponse; +}; + +type QueryDeposits = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_query_pb.QueryDepositsRequest; + readonly responseType: typeof band_tunnel_v1beta1_query_pb.QueryDepositsResponse; +}; + +type QueryDeposit = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_query_pb.QueryDepositRequest; + readonly responseType: typeof band_tunnel_v1beta1_query_pb.QueryDepositResponse; +}; + +type QueryPackets = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_query_pb.QueryPacketsRequest; + readonly responseType: typeof band_tunnel_v1beta1_query_pb.QueryPacketsResponse; +}; + +type QueryPacket = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_query_pb.QueryPacketRequest; + readonly responseType: typeof band_tunnel_v1beta1_query_pb.QueryPacketResponse; +}; + +type QueryTotalFees = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_query_pb.QueryTotalFeesRequest; + readonly responseType: typeof band_tunnel_v1beta1_query_pb.QueryTotalFeesResponse; +}; + +type QueryParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_query_pb.QueryParamsRequest; + readonly responseType: typeof band_tunnel_v1beta1_query_pb.QueryParamsResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly Tunnels: QueryTunnels; + static readonly Tunnel: QueryTunnel; + static readonly Deposits: QueryDeposits; + static readonly Deposit: QueryDeposit; + static readonly Packets: QueryPackets; + static readonly Packet: QueryPacket; + static readonly TotalFees: QueryTotalFees; + static readonly Params: QueryParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + tunnels( + requestMessage: band_tunnel_v1beta1_query_pb.QueryTunnelsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryTunnelsResponse|null) => void + ): UnaryResponse; + tunnels( + requestMessage: band_tunnel_v1beta1_query_pb.QueryTunnelsRequest, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryTunnelsResponse|null) => void + ): UnaryResponse; + tunnel( + requestMessage: band_tunnel_v1beta1_query_pb.QueryTunnelRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryTunnelResponse|null) => void + ): UnaryResponse; + tunnel( + requestMessage: band_tunnel_v1beta1_query_pb.QueryTunnelRequest, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryTunnelResponse|null) => void + ): UnaryResponse; + deposits( + requestMessage: band_tunnel_v1beta1_query_pb.QueryDepositsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryDepositsResponse|null) => void + ): UnaryResponse; + deposits( + requestMessage: band_tunnel_v1beta1_query_pb.QueryDepositsRequest, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryDepositsResponse|null) => void + ): UnaryResponse; + deposit( + requestMessage: band_tunnel_v1beta1_query_pb.QueryDepositRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryDepositResponse|null) => void + ): UnaryResponse; + deposit( + requestMessage: band_tunnel_v1beta1_query_pb.QueryDepositRequest, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryDepositResponse|null) => void + ): UnaryResponse; + packets( + requestMessage: band_tunnel_v1beta1_query_pb.QueryPacketsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryPacketsResponse|null) => void + ): UnaryResponse; + packets( + requestMessage: band_tunnel_v1beta1_query_pb.QueryPacketsRequest, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryPacketsResponse|null) => void + ): UnaryResponse; + packet( + requestMessage: band_tunnel_v1beta1_query_pb.QueryPacketRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryPacketResponse|null) => void + ): UnaryResponse; + packet( + requestMessage: band_tunnel_v1beta1_query_pb.QueryPacketRequest, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryPacketResponse|null) => void + ): UnaryResponse; + totalFees( + requestMessage: band_tunnel_v1beta1_query_pb.QueryTotalFeesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryTotalFeesResponse|null) => void + ): UnaryResponse; + totalFees( + requestMessage: band_tunnel_v1beta1_query_pb.QueryTotalFeesRequest, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryTotalFeesResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_tunnel_v1beta1_query_pb.QueryParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: band_tunnel_v1beta1_query_pb.QueryParamsRequest, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/tunnel/v1beta1/query_pb_service.js b/codegen/band/tunnel/v1beta1/query_pb_service.js new file mode 100644 index 0000000..27fb8a9 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/query_pb_service.js @@ -0,0 +1,341 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/query.proto + +var band_tunnel_v1beta1_query_pb = require("../../../band/tunnel/v1beta1/query_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Query = (function () { + function Query() {} + Query.serviceName = "band.tunnel.v1beta1.Query"; + return Query; +}()); + +Query.Tunnels = { + methodName: "Tunnels", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_query_pb.QueryTunnelsRequest, + responseType: band_tunnel_v1beta1_query_pb.QueryTunnelsResponse +}; + +Query.Tunnel = { + methodName: "Tunnel", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_query_pb.QueryTunnelRequest, + responseType: band_tunnel_v1beta1_query_pb.QueryTunnelResponse +}; + +Query.Deposits = { + methodName: "Deposits", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_query_pb.QueryDepositsRequest, + responseType: band_tunnel_v1beta1_query_pb.QueryDepositsResponse +}; + +Query.Deposit = { + methodName: "Deposit", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_query_pb.QueryDepositRequest, + responseType: band_tunnel_v1beta1_query_pb.QueryDepositResponse +}; + +Query.Packets = { + methodName: "Packets", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_query_pb.QueryPacketsRequest, + responseType: band_tunnel_v1beta1_query_pb.QueryPacketsResponse +}; + +Query.Packet = { + methodName: "Packet", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_query_pb.QueryPacketRequest, + responseType: band_tunnel_v1beta1_query_pb.QueryPacketResponse +}; + +Query.TotalFees = { + methodName: "TotalFees", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_query_pb.QueryTotalFeesRequest, + responseType: band_tunnel_v1beta1_query_pb.QueryTotalFeesResponse +}; + +Query.Params = { + methodName: "Params", + service: Query, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_query_pb.QueryParamsRequest, + responseType: band_tunnel_v1beta1_query_pb.QueryParamsResponse +}; + +exports.Query = Query; + +function QueryClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +QueryClient.prototype.tunnels = function tunnels(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Tunnels, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.tunnel = function tunnel(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Tunnel, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.deposits = function deposits(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Deposits, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.deposit = function deposit(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Deposit, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.packets = function packets(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Packets, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.packet = function packet(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Packet, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.totalFees = function totalFees(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.TotalFees, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Params, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.QueryClient = QueryClient; + diff --git a/codegen/band/tunnel/v1beta1/route.ts b/codegen/band/tunnel/v1beta1/route.ts new file mode 100644 index 0000000..5ffd5d2 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/route.ts @@ -0,0 +1,462 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tunnel/v1beta1/route.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../cosmos_proto/cosmos"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../feeds/v1beta1/encoder"; +import * as dependency_4 from "./../../feeds/v1beta1/feeds"; +import * as pb_1 from "google-protobuf"; +export namespace band.tunnel.v1beta1 { + export class TSSRoute extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + destination_chain_id?: string; + destination_contract_address?: string; + encoder?: dependency_3.band.feeds.v1beta1.Encoder; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("destination_chain_id" in data && data.destination_chain_id != undefined) { + this.destination_chain_id = data.destination_chain_id; + } + if ("destination_contract_address" in data && data.destination_contract_address != undefined) { + this.destination_contract_address = data.destination_contract_address; + } + if ("encoder" in data && data.encoder != undefined) { + this.encoder = data.encoder; + } + } + } + get destination_chain_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set destination_chain_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get destination_contract_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set destination_contract_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get encoder() { + return pb_1.Message.getFieldWithDefault(this, 3, dependency_3.band.feeds.v1beta1.Encoder.ENCODER_UNSPECIFIED) as dependency_3.band.feeds.v1beta1.Encoder; + } + set encoder(value: dependency_3.band.feeds.v1beta1.Encoder) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + destination_chain_id?: string; + destination_contract_address?: string; + encoder?: dependency_3.band.feeds.v1beta1.Encoder; + }): TSSRoute { + const message = new TSSRoute({}); + if (data.destination_chain_id != null) { + message.destination_chain_id = data.destination_chain_id; + } + if (data.destination_contract_address != null) { + message.destination_contract_address = data.destination_contract_address; + } + if (data.encoder != null) { + message.encoder = data.encoder; + } + return message; + } + toObject() { + const data: { + destination_chain_id?: string; + destination_contract_address?: string; + encoder?: dependency_3.band.feeds.v1beta1.Encoder; + } = {}; + if (this.destination_chain_id != null) { + data.destination_chain_id = this.destination_chain_id; + } + if (this.destination_contract_address != null) { + data.destination_contract_address = this.destination_contract_address; + } + if (this.encoder != null) { + data.encoder = this.encoder; + } + 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.destination_chain_id.length) + writer.writeString(1, this.destination_chain_id); + if (this.destination_contract_address.length) + writer.writeString(2, this.destination_contract_address); + if (this.encoder != dependency_3.band.feeds.v1beta1.Encoder.ENCODER_UNSPECIFIED) + writer.writeEnum(3, this.encoder); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TSSRoute { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TSSRoute(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.destination_chain_id = reader.readString(); + break; + case 2: + message.destination_contract_address = reader.readString(); + break; + case 3: + message.encoder = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TSSRoute { + return TSSRoute.deserialize(bytes); + } + } + export class TSSPacketReceipt extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signing_id?: 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 ("signing_id" in data && data.signing_id != undefined) { + this.signing_id = data.signing_id; + } + } + } + get signing_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signing_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + signing_id?: number; + }): TSSPacketReceipt { + const message = new TSSPacketReceipt({}); + if (data.signing_id != null) { + message.signing_id = data.signing_id; + } + return message; + } + toObject() { + const data: { + signing_id?: number; + } = {}; + if (this.signing_id != null) { + data.signing_id = this.signing_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.signing_id != 0) + writer.writeUint64(1, this.signing_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TSSPacketReceipt { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TSSPacketReceipt(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signing_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TSSPacketReceipt { + return TSSPacketReceipt.deserialize(bytes); + } + } + export class IBCRoute extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channel_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 ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + channel_id?: string; + }): IBCRoute { + const message = new IBCRoute({}); + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + channel_id?: string; + } = {}; + if (this.channel_id != null) { + data.channel_id = this.channel_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.channel_id.length) + writer.writeString(1, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IBCRoute { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IBCRoute(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IBCRoute { + return IBCRoute.deserialize(bytes); + } + } + export class IBCPacketReceipt extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: 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 ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + sequence?: number; + }): IBCPacketReceipt { + const message = new IBCPacketReceipt({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + sequence?: number; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IBCPacketReceipt { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IBCPacketReceipt(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IBCPacketReceipt { + return IBCPacketReceipt.deserialize(bytes); + } + } + export class TunnelPricesPacketData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + sequence?: number; + prices?: dependency_4.band.feeds.v1beta1.Price[]; + created_at?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("prices" in data && data.prices != undefined) { + this.prices = data.prices; + } + if ("created_at" in data && data.created_at != undefined) { + this.created_at = data.created_at; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 2, value); + } + get prices() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.band.feeds.v1beta1.Price, 3) as dependency_4.band.feeds.v1beta1.Price[]; + } + set prices(value: dependency_4.band.feeds.v1beta1.Price[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get created_at() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set created_at(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + tunnel_id?: number; + sequence?: number; + prices?: ReturnType[]; + created_at?: number; + }): TunnelPricesPacketData { + const message = new TunnelPricesPacketData({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.prices != null) { + message.prices = data.prices.map(item => dependency_4.band.feeds.v1beta1.Price.fromObject(item)); + } + if (data.created_at != null) { + message.created_at = data.created_at; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + sequence?: number; + prices?: ReturnType[]; + created_at?: number; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.prices != null) { + data.prices = this.prices.map((item: dependency_4.band.feeds.v1beta1.Price) => item.toObject()); + } + if (this.created_at != null) { + data.created_at = this.created_at; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.sequence != 0) + writer.writeUint64(2, this.sequence); + if (this.prices.length) + writer.writeRepeatedMessage(3, this.prices, (item: dependency_4.band.feeds.v1beta1.Price) => item.serialize(writer)); + if (this.created_at != 0) + writer.writeInt64(4, this.created_at); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TunnelPricesPacketData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TunnelPricesPacketData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + message.sequence = reader.readUint64(); + break; + case 3: + reader.readMessage(message.prices, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_4.band.feeds.v1beta1.Price.deserialize(reader), dependency_4.band.feeds.v1beta1.Price)); + break; + case 4: + message.created_at = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TunnelPricesPacketData { + return TunnelPricesPacketData.deserialize(bytes); + } + } +} diff --git a/codegen/band/tunnel/v1beta1/route_pb.d.ts b/codegen/band/tunnel/v1beta1/route_pb.d.ts new file mode 100644 index 0000000..49748e7 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/route_pb.d.ts @@ -0,0 +1,131 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/route.proto + +import * as jspb from "google-protobuf"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as band_feeds_v1beta1_encoder_pb from "../../../band/feeds/v1beta1/encoder_pb"; +import * as band_feeds_v1beta1_feeds_pb from "../../../band/feeds/v1beta1/feeds_pb"; + +export class TSSRoute extends jspb.Message { + getDestinationChainId(): string; + setDestinationChainId(value: string): void; + + getDestinationContractAddress(): string; + setDestinationContractAddress(value: string): void; + + getEncoder(): band_feeds_v1beta1_encoder_pb.EncoderMap[keyof band_feeds_v1beta1_encoder_pb.EncoderMap]; + setEncoder(value: band_feeds_v1beta1_encoder_pb.EncoderMap[keyof band_feeds_v1beta1_encoder_pb.EncoderMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TSSRoute.AsObject; + static toObject(includeInstance: boolean, msg: TSSRoute): TSSRoute.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TSSRoute, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TSSRoute; + static deserializeBinaryFromReader(message: TSSRoute, reader: jspb.BinaryReader): TSSRoute; +} + +export namespace TSSRoute { + export type AsObject = { + destinationChainId: string, + destinationContractAddress: string, + encoder: band_feeds_v1beta1_encoder_pb.EncoderMap[keyof band_feeds_v1beta1_encoder_pb.EncoderMap], + } +} + +export class TSSPacketReceipt extends jspb.Message { + getSigningId(): number; + setSigningId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TSSPacketReceipt.AsObject; + static toObject(includeInstance: boolean, msg: TSSPacketReceipt): TSSPacketReceipt.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TSSPacketReceipt, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TSSPacketReceipt; + static deserializeBinaryFromReader(message: TSSPacketReceipt, reader: jspb.BinaryReader): TSSPacketReceipt; +} + +export namespace TSSPacketReceipt { + export type AsObject = { + signingId: number, + } +} + +export class IBCRoute extends jspb.Message { + getChannelId(): string; + setChannelId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IBCRoute.AsObject; + static toObject(includeInstance: boolean, msg: IBCRoute): IBCRoute.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IBCRoute, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IBCRoute; + static deserializeBinaryFromReader(message: IBCRoute, reader: jspb.BinaryReader): IBCRoute; +} + +export namespace IBCRoute { + export type AsObject = { + channelId: string, + } +} + +export class IBCPacketReceipt extends jspb.Message { + getSequence(): number; + setSequence(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IBCPacketReceipt.AsObject; + static toObject(includeInstance: boolean, msg: IBCPacketReceipt): IBCPacketReceipt.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IBCPacketReceipt, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IBCPacketReceipt; + static deserializeBinaryFromReader(message: IBCPacketReceipt, reader: jspb.BinaryReader): IBCPacketReceipt; +} + +export namespace IBCPacketReceipt { + export type AsObject = { + sequence: number, + } +} + +export class TunnelPricesPacketData extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + getSequence(): number; + setSequence(value: number): void; + + clearPricesList(): void; + getPricesList(): Array; + setPricesList(value: Array): void; + addPrices(value?: band_feeds_v1beta1_feeds_pb.Price, index?: number): band_feeds_v1beta1_feeds_pb.Price; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TunnelPricesPacketData.AsObject; + static toObject(includeInstance: boolean, msg: TunnelPricesPacketData): TunnelPricesPacketData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TunnelPricesPacketData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TunnelPricesPacketData; + static deserializeBinaryFromReader(message: TunnelPricesPacketData, reader: jspb.BinaryReader): TunnelPricesPacketData; +} + +export namespace TunnelPricesPacketData { + export type AsObject = { + tunnelId: number, + sequence: number, + pricesList: Array, + createdAt: number, + } +} + diff --git a/codegen/band/tunnel/v1beta1/route_pb.js b/codegen/band/tunnel/v1beta1/route_pb.js new file mode 100644 index 0000000..5f910bb --- /dev/null +++ b/codegen/band/tunnel/v1beta1/route_pb.js @@ -0,0 +1,966 @@ +// source: band/tunnel/v1beta1/route.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var band_feeds_v1beta1_encoder_pb = require('../../../band/feeds/v1beta1/encoder_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_encoder_pb); +var band_feeds_v1beta1_feeds_pb = require('../../../band/feeds/v1beta1/feeds_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_feeds_pb); +goog.exportSymbol('proto.band.tunnel.v1beta1.IBCPacketReceipt', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.IBCRoute', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.TSSPacketReceipt', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.TSSRoute', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.TunnelPricesPacketData', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.TSSRoute = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.TSSRoute, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.TSSRoute.displayName = 'proto.band.tunnel.v1beta1.TSSRoute'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.TSSPacketReceipt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.TSSPacketReceipt, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.TSSPacketReceipt.displayName = 'proto.band.tunnel.v1beta1.TSSPacketReceipt'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.IBCRoute = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.IBCRoute, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.IBCRoute.displayName = 'proto.band.tunnel.v1beta1.IBCRoute'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.IBCPacketReceipt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.IBCPacketReceipt, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.IBCPacketReceipt.displayName = 'proto.band.tunnel.v1beta1.IBCPacketReceipt'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.TunnelPricesPacketData.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.TunnelPricesPacketData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.TunnelPricesPacketData.displayName = 'proto.band.tunnel.v1beta1.TunnelPricesPacketData'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.TSSRoute.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.TSSRoute.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.TSSRoute} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TSSRoute.toObject = function(includeInstance, msg) { + var f, obj = { + destinationChainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + destinationContractAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + encoder: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.TSSRoute} + */ +proto.band.tunnel.v1beta1.TSSRoute.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.TSSRoute; + return proto.band.tunnel.v1beta1.TSSRoute.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.TSSRoute} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.TSSRoute} + */ +proto.band.tunnel.v1beta1.TSSRoute.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDestinationChainId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDestinationContractAddress(value); + break; + case 3: + var value = /** @type {!proto.band.feeds.v1beta1.Encoder} */ (reader.readEnum()); + msg.setEncoder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.TSSRoute.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.TSSRoute.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.TSSRoute} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TSSRoute.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDestinationChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDestinationContractAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEncoder(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } +}; + + +/** + * optional string destination_chain_id = 1; + * @return {string} + */ +proto.band.tunnel.v1beta1.TSSRoute.prototype.getDestinationChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.TSSRoute} returns this + */ +proto.band.tunnel.v1beta1.TSSRoute.prototype.setDestinationChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string destination_contract_address = 2; + * @return {string} + */ +proto.band.tunnel.v1beta1.TSSRoute.prototype.getDestinationContractAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.TSSRoute} returns this + */ +proto.band.tunnel.v1beta1.TSSRoute.prototype.setDestinationContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional band.feeds.v1beta1.Encoder encoder = 3; + * @return {!proto.band.feeds.v1beta1.Encoder} + */ +proto.band.tunnel.v1beta1.TSSRoute.prototype.getEncoder = function() { + return /** @type {!proto.band.feeds.v1beta1.Encoder} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Encoder} value + * @return {!proto.band.tunnel.v1beta1.TSSRoute} returns this + */ +proto.band.tunnel.v1beta1.TSSRoute.prototype.setEncoder = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.TSSPacketReceipt.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.TSSPacketReceipt.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.TSSPacketReceipt} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TSSPacketReceipt.toObject = function(includeInstance, msg) { + var f, obj = { + signingId: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.TSSPacketReceipt} + */ +proto.band.tunnel.v1beta1.TSSPacketReceipt.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.TSSPacketReceipt; + return proto.band.tunnel.v1beta1.TSSPacketReceipt.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.TSSPacketReceipt} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.TSSPacketReceipt} + */ +proto.band.tunnel.v1beta1.TSSPacketReceipt.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigningId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.TSSPacketReceipt.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.TSSPacketReceipt.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.TSSPacketReceipt} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TSSPacketReceipt.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigningId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 signing_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.TSSPacketReceipt.prototype.getSigningId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.TSSPacketReceipt} returns this + */ +proto.band.tunnel.v1beta1.TSSPacketReceipt.prototype.setSigningId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.IBCRoute.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.IBCRoute.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.IBCRoute} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.IBCRoute.toObject = function(includeInstance, msg) { + var f, obj = { + channelId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.IBCRoute} + */ +proto.band.tunnel.v1beta1.IBCRoute.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.IBCRoute; + return proto.band.tunnel.v1beta1.IBCRoute.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.IBCRoute} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.IBCRoute} + */ +proto.band.tunnel.v1beta1.IBCRoute.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.IBCRoute.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.IBCRoute.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.IBCRoute} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.IBCRoute.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string channel_id = 1; + * @return {string} + */ +proto.band.tunnel.v1beta1.IBCRoute.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.IBCRoute} returns this + */ +proto.band.tunnel.v1beta1.IBCRoute.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.IBCPacketReceipt.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.IBCPacketReceipt.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.IBCPacketReceipt} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.IBCPacketReceipt.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.IBCPacketReceipt} + */ +proto.band.tunnel.v1beta1.IBCPacketReceipt.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.IBCPacketReceipt; + return proto.band.tunnel.v1beta1.IBCPacketReceipt.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.IBCPacketReceipt} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.IBCPacketReceipt} + */ +proto.band.tunnel.v1beta1.IBCPacketReceipt.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.IBCPacketReceipt.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.IBCPacketReceipt.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.IBCPacketReceipt} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.IBCPacketReceipt.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.IBCPacketReceipt.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.IBCPacketReceipt} returns this + */ +proto.band.tunnel.v1beta1.IBCPacketReceipt.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.TunnelPricesPacketData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + sequence: jspb.Message.getFieldWithDefault(msg, 2, 0), + pricesList: jspb.Message.toObjectList(msg.getPricesList(), + band_feeds_v1beta1_feeds_pb.Price.toObject, includeInstance), + createdAt: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.TunnelPricesPacketData; + return proto.band.tunnel.v1beta1.TunnelPricesPacketData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 3: + var value = new band_feeds_v1beta1_feeds_pb.Price; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Price.deserializeBinaryFromReader); + msg.addPrices(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.TunnelPricesPacketData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPricesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + band_feeds_v1beta1_feeds_pb.Price.serializeBinaryToWriter + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} returns this + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 sequence = 2; + * @return {number} + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} returns this + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated band.feeds.v1beta1.Price prices = 3; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.getPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Price, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} returns this +*/ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.setPricesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Price=} opt_value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.Price} + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.addPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.feeds.v1beta1.Price, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} returns this + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.clearPricesList = function() { + return this.setPricesList([]); +}; + + +/** + * optional int64 created_at = 4; + * @return {number} + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.TunnelPricesPacketData} returns this + */ +proto.band.tunnel.v1beta1.TunnelPricesPacketData.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +goog.object.extend(exports, proto.band.tunnel.v1beta1); diff --git a/codegen/band/tunnel/v1beta1/route_pb_service.d.ts b/codegen/band/tunnel/v1beta1/route_pb_service.d.ts new file mode 100644 index 0000000..b382ce4 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/route_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/route.proto + diff --git a/codegen/band/tunnel/v1beta1/route_pb_service.js b/codegen/band/tunnel/v1beta1/route_pb_service.js new file mode 100644 index 0000000..b382ce4 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/route_pb_service.js @@ -0,0 +1,3 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/route.proto + diff --git a/codegen/band/tunnel/v1beta1/tunnel.ts b/codegen/band/tunnel/v1beta1/tunnel.ts new file mode 100644 index 0000000..d56dde3 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tunnel.ts @@ -0,0 +1,1042 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tunnel/v1beta1/tunnel.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../cosmos/base/v1beta1/coin"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../../gogoproto/gogo"; +import * as dependency_5 from "./../../../google/protobuf/any"; +import * as dependency_6 from "./../../feeds/v1beta1/encoder"; +import * as dependency_7 from "./../../feeds/v1beta1/feeds"; +import * as pb_1 from "google-protobuf"; +export namespace band.tunnel.v1beta1 { + export class Tunnel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + sequence?: number; + route?: dependency_5.google.protobuf.Any; + fee_payer?: string; + signal_deviations?: SignalDeviation[]; + interval?: number; + total_deposit?: dependency_2.cosmos.base.v1beta1.Coin[]; + is_active?: boolean; + created_at?: number; + creator?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5, 7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("route" in data && data.route != undefined) { + this.route = data.route; + } + if ("fee_payer" in data && data.fee_payer != undefined) { + this.fee_payer = data.fee_payer; + } + if ("signal_deviations" in data && data.signal_deviations != undefined) { + this.signal_deviations = data.signal_deviations; + } + if ("interval" in data && data.interval != undefined) { + this.interval = data.interval; + } + if ("total_deposit" in data && data.total_deposit != undefined) { + this.total_deposit = data.total_deposit; + } + if ("is_active" in data && data.is_active != undefined) { + this.is_active = data.is_active; + } + if ("created_at" in data && data.created_at != undefined) { + this.created_at = data.created_at; + } + if ("creator" in data && data.creator != undefined) { + this.creator = data.creator; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 2, value); + } + get route() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 3) as dependency_5.google.protobuf.Any; + } + set route(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_route() { + return pb_1.Message.getField(this, 3) != null; + } + get fee_payer() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set fee_payer(value: string) { + pb_1.Message.setField(this, 4, value); + } + get signal_deviations() { + return pb_1.Message.getRepeatedWrapperField(this, SignalDeviation, 5) as SignalDeviation[]; + } + set signal_deviations(value: SignalDeviation[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get interval() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set interval(value: number) { + pb_1.Message.setField(this, 6, value); + } + get total_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 7) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set total_deposit(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get is_active() { + return pb_1.Message.getFieldWithDefault(this, 8, false) as boolean; + } + set is_active(value: boolean) { + pb_1.Message.setField(this, 8, value); + } + get created_at() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set created_at(value: number) { + pb_1.Message.setField(this, 9, value); + } + get creator() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set creator(value: string) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + id?: number; + sequence?: number; + route?: ReturnType; + fee_payer?: string; + signal_deviations?: ReturnType[]; + interval?: number; + total_deposit?: ReturnType[]; + is_active?: boolean; + created_at?: number; + creator?: string; + }): Tunnel { + const message = new Tunnel({}); + if (data.id != null) { + message.id = data.id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.route != null) { + message.route = dependency_5.google.protobuf.Any.fromObject(data.route); + } + if (data.fee_payer != null) { + message.fee_payer = data.fee_payer; + } + if (data.signal_deviations != null) { + message.signal_deviations = data.signal_deviations.map(item => SignalDeviation.fromObject(item)); + } + if (data.interval != null) { + message.interval = data.interval; + } + if (data.total_deposit != null) { + message.total_deposit = data.total_deposit.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.is_active != null) { + message.is_active = data.is_active; + } + if (data.created_at != null) { + message.created_at = data.created_at; + } + if (data.creator != null) { + message.creator = data.creator; + } + return message; + } + toObject() { + const data: { + id?: number; + sequence?: number; + route?: ReturnType; + fee_payer?: string; + signal_deviations?: ReturnType[]; + interval?: number; + total_deposit?: ReturnType[]; + is_active?: boolean; + created_at?: number; + creator?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.route != null) { + data.route = this.route.toObject(); + } + if (this.fee_payer != null) { + data.fee_payer = this.fee_payer; + } + if (this.signal_deviations != null) { + data.signal_deviations = this.signal_deviations.map((item: SignalDeviation) => item.toObject()); + } + if (this.interval != null) { + data.interval = this.interval; + } + if (this.total_deposit != null) { + data.total_deposit = this.total_deposit.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.is_active != null) { + data.is_active = this.is_active; + } + if (this.created_at != null) { + data.created_at = this.created_at; + } + if (this.creator != null) { + data.creator = this.creator; + } + 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.id != 0) + writer.writeUint64(1, this.id); + if (this.sequence != 0) + writer.writeUint64(2, this.sequence); + if (this.has_route) + writer.writeMessage(3, this.route, () => this.route.serialize(writer)); + if (this.fee_payer.length) + writer.writeString(4, this.fee_payer); + if (this.signal_deviations.length) + writer.writeRepeatedMessage(5, this.signal_deviations, (item: SignalDeviation) => item.serialize(writer)); + if (this.interval != 0) + writer.writeUint64(6, this.interval); + if (this.total_deposit.length) + writer.writeRepeatedMessage(7, this.total_deposit, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.is_active != false) + writer.writeBool(8, this.is_active); + if (this.created_at != 0) + writer.writeInt64(9, this.created_at); + if (this.creator.length) + writer.writeString(10, this.creator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Tunnel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Tunnel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64(); + break; + case 2: + message.sequence = reader.readUint64(); + break; + case 3: + reader.readMessage(message.route, () => message.route = dependency_5.google.protobuf.Any.deserialize(reader)); + break; + case 4: + message.fee_payer = reader.readString(); + break; + case 5: + reader.readMessage(message.signal_deviations, () => pb_1.Message.addToRepeatedWrapperField(message, 5, SignalDeviation.deserialize(reader), SignalDeviation)); + break; + case 6: + message.interval = reader.readUint64(); + break; + case 7: + reader.readMessage(message.total_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + case 8: + message.is_active = reader.readBool(); + break; + case 9: + message.created_at = reader.readInt64(); + break; + case 10: + message.creator = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Tunnel { + return Tunnel.deserialize(bytes); + } + } + export class LatestPrices extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + prices?: dependency_7.band.feeds.v1beta1.Price[]; + last_interval?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("prices" in data && data.prices != undefined) { + this.prices = data.prices; + } + if ("last_interval" in data && data.last_interval != undefined) { + this.last_interval = data.last_interval; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get prices() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_7.band.feeds.v1beta1.Price, 2) as dependency_7.band.feeds.v1beta1.Price[]; + } + set prices(value: dependency_7.band.feeds.v1beta1.Price[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get last_interval() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set last_interval(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + tunnel_id?: number; + prices?: ReturnType[]; + last_interval?: number; + }): LatestPrices { + const message = new LatestPrices({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.prices != null) { + message.prices = data.prices.map(item => dependency_7.band.feeds.v1beta1.Price.fromObject(item)); + } + if (data.last_interval != null) { + message.last_interval = data.last_interval; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + prices?: ReturnType[]; + last_interval?: number; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.prices != null) { + data.prices = this.prices.map((item: dependency_7.band.feeds.v1beta1.Price) => item.toObject()); + } + if (this.last_interval != null) { + data.last_interval = this.last_interval; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.prices.length) + writer.writeRepeatedMessage(2, this.prices, (item: dependency_7.band.feeds.v1beta1.Price) => item.serialize(writer)); + if (this.last_interval != 0) + writer.writeInt64(3, this.last_interval); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LatestPrices { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LatestPrices(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.prices, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_7.band.feeds.v1beta1.Price.deserialize(reader), dependency_7.band.feeds.v1beta1.Price)); + break; + case 3: + message.last_interval = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): LatestPrices { + return LatestPrices.deserialize(bytes); + } + } + export class TotalFees extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + total_base_packet_fee?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + 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 ("total_base_packet_fee" in data && data.total_base_packet_fee != undefined) { + this.total_base_packet_fee = data.total_base_packet_fee; + } + } + } + get total_base_packet_fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 1) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set total_base_packet_fee(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + total_base_packet_fee?: ReturnType[]; + }): TotalFees { + const message = new TotalFees({}); + if (data.total_base_packet_fee != null) { + message.total_base_packet_fee = data.total_base_packet_fee.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + total_base_packet_fee?: ReturnType[]; + } = {}; + if (this.total_base_packet_fee != null) { + data.total_base_packet_fee = this.total_base_packet_fee.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.total_base_packet_fee.length) + writer.writeRepeatedMessage(1, this.total_base_packet_fee, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TotalFees { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TotalFees(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.total_base_packet_fee, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TotalFees { + return TotalFees.deserialize(bytes); + } + } + export class Packet extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + sequence?: number; + prices?: dependency_7.band.feeds.v1beta1.Price[]; + receipt?: dependency_5.google.protobuf.Any; + base_fee?: dependency_2.cosmos.base.v1beta1.Coin[]; + route_fee?: dependency_2.cosmos.base.v1beta1.Coin[]; + created_at?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 5, 6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("prices" in data && data.prices != undefined) { + this.prices = data.prices; + } + if ("receipt" in data && data.receipt != undefined) { + this.receipt = data.receipt; + } + if ("base_fee" in data && data.base_fee != undefined) { + this.base_fee = data.base_fee; + } + if ("route_fee" in data && data.route_fee != undefined) { + this.route_fee = data.route_fee; + } + if ("created_at" in data && data.created_at != undefined) { + this.created_at = data.created_at; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 2, value); + } + get prices() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_7.band.feeds.v1beta1.Price, 3) as dependency_7.band.feeds.v1beta1.Price[]; + } + set prices(value: dependency_7.band.feeds.v1beta1.Price[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get receipt() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 4) as dependency_5.google.protobuf.Any; + } + set receipt(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_receipt() { + return pb_1.Message.getField(this, 4) != null; + } + get base_fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 5) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set base_fee(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get route_fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 6) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set route_fee(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get created_at() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set created_at(value: number) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + tunnel_id?: number; + sequence?: number; + prices?: ReturnType[]; + receipt?: ReturnType; + base_fee?: ReturnType[]; + route_fee?: ReturnType[]; + created_at?: number; + }): Packet { + const message = new Packet({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.prices != null) { + message.prices = data.prices.map(item => dependency_7.band.feeds.v1beta1.Price.fromObject(item)); + } + if (data.receipt != null) { + message.receipt = dependency_5.google.protobuf.Any.fromObject(data.receipt); + } + if (data.base_fee != null) { + message.base_fee = data.base_fee.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.route_fee != null) { + message.route_fee = data.route_fee.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.created_at != null) { + message.created_at = data.created_at; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + sequence?: number; + prices?: ReturnType[]; + receipt?: ReturnType; + base_fee?: ReturnType[]; + route_fee?: ReturnType[]; + created_at?: number; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.prices != null) { + data.prices = this.prices.map((item: dependency_7.band.feeds.v1beta1.Price) => item.toObject()); + } + if (this.receipt != null) { + data.receipt = this.receipt.toObject(); + } + if (this.base_fee != null) { + data.base_fee = this.base_fee.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.route_fee != null) { + data.route_fee = this.route_fee.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.created_at != null) { + data.created_at = this.created_at; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.sequence != 0) + writer.writeUint64(2, this.sequence); + if (this.prices.length) + writer.writeRepeatedMessage(3, this.prices, (item: dependency_7.band.feeds.v1beta1.Price) => item.serialize(writer)); + if (this.has_receipt) + writer.writeMessage(4, this.receipt, () => this.receipt.serialize(writer)); + if (this.base_fee.length) + writer.writeRepeatedMessage(5, this.base_fee, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.route_fee.length) + writer.writeRepeatedMessage(6, this.route_fee, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.created_at != 0) + writer.writeInt64(7, this.created_at); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Packet { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Packet(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + message.sequence = reader.readUint64(); + break; + case 3: + reader.readMessage(message.prices, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_7.band.feeds.v1beta1.Price.deserialize(reader), dependency_7.band.feeds.v1beta1.Price)); + break; + case 4: + reader.readMessage(message.receipt, () => message.receipt = dependency_5.google.protobuf.Any.deserialize(reader)); + break; + case 5: + reader.readMessage(message.base_fee, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + case 6: + reader.readMessage(message.route_fee, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + case 7: + message.created_at = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Packet { + return Packet.deserialize(bytes); + } + } + export class Deposit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + depositor?: string; + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + tunnel_id?: number; + depositor?: string; + amount?: ReturnType[]; + }): Deposit { + const message = new Deposit({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + depositor?: string; + amount?: ReturnType[]; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.depositor.length) + writer.writeString(2, this.depositor); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Deposit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Deposit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + message.depositor = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Deposit { + return Deposit.deserialize(bytes); + } + } + export class SignalDeviation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_id?: string; + soft_deviation_bps?: number; + hard_deviation_bps?: 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 ("signal_id" in data && data.signal_id != undefined) { + this.signal_id = data.signal_id; + } + if ("soft_deviation_bps" in data && data.soft_deviation_bps != undefined) { + this.soft_deviation_bps = data.soft_deviation_bps; + } + if ("hard_deviation_bps" in data && data.hard_deviation_bps != undefined) { + this.hard_deviation_bps = data.hard_deviation_bps; + } + } + } + get signal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signal_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get soft_deviation_bps() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set soft_deviation_bps(value: number) { + pb_1.Message.setField(this, 2, value); + } + get hard_deviation_bps() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set hard_deviation_bps(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + signal_id?: string; + soft_deviation_bps?: number; + hard_deviation_bps?: number; + }): SignalDeviation { + const message = new SignalDeviation({}); + if (data.signal_id != null) { + message.signal_id = data.signal_id; + } + if (data.soft_deviation_bps != null) { + message.soft_deviation_bps = data.soft_deviation_bps; + } + if (data.hard_deviation_bps != null) { + message.hard_deviation_bps = data.hard_deviation_bps; + } + return message; + } + toObject() { + const data: { + signal_id?: string; + soft_deviation_bps?: number; + hard_deviation_bps?: number; + } = {}; + if (this.signal_id != null) { + data.signal_id = this.signal_id; + } + if (this.soft_deviation_bps != null) { + data.soft_deviation_bps = this.soft_deviation_bps; + } + if (this.hard_deviation_bps != null) { + data.hard_deviation_bps = this.hard_deviation_bps; + } + 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.signal_id.length) + writer.writeString(1, this.signal_id); + if (this.soft_deviation_bps != 0) + writer.writeUint64(2, this.soft_deviation_bps); + if (this.hard_deviation_bps != 0) + writer.writeUint64(3, this.hard_deviation_bps); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignalDeviation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignalDeviation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signal_id = reader.readString(); + break; + case 2: + message.soft_deviation_bps = reader.readUint64(); + break; + case 3: + message.hard_deviation_bps = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignalDeviation { + return SignalDeviation.deserialize(bytes); + } + } + export class TunnelSignatureOrder extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: number; + prices?: dependency_7.band.feeds.v1beta1.Price[]; + created_at?: number; + encoder?: dependency_6.band.feeds.v1beta1.Encoder; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("prices" in data && data.prices != undefined) { + this.prices = data.prices; + } + if ("created_at" in data && data.created_at != undefined) { + this.created_at = data.created_at; + } + if ("encoder" in data && data.encoder != undefined) { + this.encoder = data.encoder; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + get prices() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_7.band.feeds.v1beta1.Price, 2) as dependency_7.band.feeds.v1beta1.Price[]; + } + set prices(value: dependency_7.band.feeds.v1beta1.Price[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get created_at() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set created_at(value: number) { + pb_1.Message.setField(this, 3, value); + } + get encoder() { + return pb_1.Message.getFieldWithDefault(this, 4, dependency_6.band.feeds.v1beta1.Encoder.ENCODER_UNSPECIFIED) as dependency_6.band.feeds.v1beta1.Encoder; + } + set encoder(value: dependency_6.band.feeds.v1beta1.Encoder) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + sequence?: number; + prices?: ReturnType[]; + created_at?: number; + encoder?: dependency_6.band.feeds.v1beta1.Encoder; + }): TunnelSignatureOrder { + const message = new TunnelSignatureOrder({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.prices != null) { + message.prices = data.prices.map(item => dependency_7.band.feeds.v1beta1.Price.fromObject(item)); + } + if (data.created_at != null) { + message.created_at = data.created_at; + } + if (data.encoder != null) { + message.encoder = data.encoder; + } + return message; + } + toObject() { + const data: { + sequence?: number; + prices?: ReturnType[]; + created_at?: number; + encoder?: dependency_6.band.feeds.v1beta1.Encoder; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.prices != null) { + data.prices = this.prices.map((item: dependency_7.band.feeds.v1beta1.Price) => item.toObject()); + } + if (this.created_at != null) { + data.created_at = this.created_at; + } + if (this.encoder != null) { + data.encoder = this.encoder; + } + 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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (this.prices.length) + writer.writeRepeatedMessage(2, this.prices, (item: dependency_7.band.feeds.v1beta1.Price) => item.serialize(writer)); + if (this.created_at != 0) + writer.writeInt64(3, this.created_at); + if (this.encoder != dependency_6.band.feeds.v1beta1.Encoder.ENCODER_UNSPECIFIED) + writer.writeEnum(4, this.encoder); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TunnelSignatureOrder { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TunnelSignatureOrder(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + case 2: + reader.readMessage(message.prices, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_7.band.feeds.v1beta1.Price.deserialize(reader), dependency_7.band.feeds.v1beta1.Price)); + break; + case 3: + message.created_at = reader.readInt64(); + break; + case 4: + message.encoder = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TunnelSignatureOrder { + return TunnelSignatureOrder.deserialize(bytes); + } + } +} diff --git a/codegen/band/tunnel/v1beta1/tunnel_pb.d.ts b/codegen/band/tunnel/v1beta1/tunnel_pb.d.ts new file mode 100644 index 0000000..8a12aaa --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tunnel_pb.d.ts @@ -0,0 +1,270 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/tunnel.proto + +import * as jspb from "google-protobuf"; +import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as band_feeds_v1beta1_encoder_pb from "../../../band/feeds/v1beta1/encoder_pb"; +import * as band_feeds_v1beta1_feeds_pb from "../../../band/feeds/v1beta1/feeds_pb"; + +export class Tunnel extends jspb.Message { + getId(): number; + setId(value: number): void; + + getSequence(): number; + setSequence(value: number): void; + + hasRoute(): boolean; + clearRoute(): void; + getRoute(): google_protobuf_any_pb.Any | undefined; + setRoute(value?: google_protobuf_any_pb.Any): void; + + getFeePayer(): string; + setFeePayer(value: string): void; + + clearSignalDeviationsList(): void; + getSignalDeviationsList(): Array; + setSignalDeviationsList(value: Array): void; + addSignalDeviations(value?: SignalDeviation, index?: number): SignalDeviation; + + getInterval(): number; + setInterval(value: number): void; + + clearTotalDepositList(): void; + getTotalDepositList(): Array; + setTotalDepositList(value: Array): void; + addTotalDeposit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getIsActive(): boolean; + setIsActive(value: boolean): void; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + getCreator(): string; + setCreator(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Tunnel.AsObject; + static toObject(includeInstance: boolean, msg: Tunnel): Tunnel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Tunnel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Tunnel; + static deserializeBinaryFromReader(message: Tunnel, reader: jspb.BinaryReader): Tunnel; +} + +export namespace Tunnel { + export type AsObject = { + id: number, + sequence: number, + route?: google_protobuf_any_pb.Any.AsObject, + feePayer: string, + signalDeviationsList: Array, + interval: number, + totalDepositList: Array, + isActive: boolean, + createdAt: number, + creator: string, + } +} + +export class LatestPrices extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + clearPricesList(): void; + getPricesList(): Array; + setPricesList(value: Array): void; + addPrices(value?: band_feeds_v1beta1_feeds_pb.Price, index?: number): band_feeds_v1beta1_feeds_pb.Price; + + getLastInterval(): number; + setLastInterval(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LatestPrices.AsObject; + static toObject(includeInstance: boolean, msg: LatestPrices): LatestPrices.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LatestPrices, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LatestPrices; + static deserializeBinaryFromReader(message: LatestPrices, reader: jspb.BinaryReader): LatestPrices; +} + +export namespace LatestPrices { + export type AsObject = { + tunnelId: number, + pricesList: Array, + lastInterval: number, + } +} + +export class TotalFees extends jspb.Message { + clearTotalBasePacketFeeList(): void; + getTotalBasePacketFeeList(): Array; + setTotalBasePacketFeeList(value: Array): void; + addTotalBasePacketFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TotalFees.AsObject; + static toObject(includeInstance: boolean, msg: TotalFees): TotalFees.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TotalFees, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TotalFees; + static deserializeBinaryFromReader(message: TotalFees, reader: jspb.BinaryReader): TotalFees; +} + +export namespace TotalFees { + export type AsObject = { + totalBasePacketFeeList: Array, + } +} + +export class Packet extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + getSequence(): number; + setSequence(value: number): void; + + clearPricesList(): void; + getPricesList(): Array; + setPricesList(value: Array): void; + addPrices(value?: band_feeds_v1beta1_feeds_pb.Price, index?: number): band_feeds_v1beta1_feeds_pb.Price; + + hasReceipt(): boolean; + clearReceipt(): void; + getReceipt(): google_protobuf_any_pb.Any | undefined; + setReceipt(value?: google_protobuf_any_pb.Any): void; + + clearBaseFeeList(): void; + getBaseFeeList(): Array; + setBaseFeeList(value: Array): void; + addBaseFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + clearRouteFeeList(): void; + getRouteFeeList(): Array; + setRouteFeeList(value: Array): void; + addRouteFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Packet.AsObject; + static toObject(includeInstance: boolean, msg: Packet): Packet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Packet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Packet; + static deserializeBinaryFromReader(message: Packet, reader: jspb.BinaryReader): Packet; +} + +export namespace Packet { + export type AsObject = { + tunnelId: number, + sequence: number, + pricesList: Array, + receipt?: google_protobuf_any_pb.Any.AsObject, + baseFeeList: Array, + routeFeeList: Array, + createdAt: number, + } +} + +export class Deposit extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + getDepositor(): string; + setDepositor(value: string): void; + + clearAmountList(): void; + getAmountList(): Array; + setAmountList(value: Array): void; + addAmount(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Deposit.AsObject; + static toObject(includeInstance: boolean, msg: Deposit): Deposit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Deposit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Deposit; + static deserializeBinaryFromReader(message: Deposit, reader: jspb.BinaryReader): Deposit; +} + +export namespace Deposit { + export type AsObject = { + tunnelId: number, + depositor: string, + amountList: Array, + } +} + +export class SignalDeviation extends jspb.Message { + getSignalId(): string; + setSignalId(value: string): void; + + getSoftDeviationBps(): number; + setSoftDeviationBps(value: number): void; + + getHardDeviationBps(): number; + setHardDeviationBps(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignalDeviation.AsObject; + static toObject(includeInstance: boolean, msg: SignalDeviation): SignalDeviation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignalDeviation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignalDeviation; + static deserializeBinaryFromReader(message: SignalDeviation, reader: jspb.BinaryReader): SignalDeviation; +} + +export namespace SignalDeviation { + export type AsObject = { + signalId: string, + softDeviationBps: number, + hardDeviationBps: number, + } +} + +export class TunnelSignatureOrder extends jspb.Message { + getSequence(): number; + setSequence(value: number): void; + + clearPricesList(): void; + getPricesList(): Array; + setPricesList(value: Array): void; + addPrices(value?: band_feeds_v1beta1_feeds_pb.Price, index?: number): band_feeds_v1beta1_feeds_pb.Price; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + getEncoder(): band_feeds_v1beta1_encoder_pb.EncoderMap[keyof band_feeds_v1beta1_encoder_pb.EncoderMap]; + setEncoder(value: band_feeds_v1beta1_encoder_pb.EncoderMap[keyof band_feeds_v1beta1_encoder_pb.EncoderMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TunnelSignatureOrder.AsObject; + static toObject(includeInstance: boolean, msg: TunnelSignatureOrder): TunnelSignatureOrder.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TunnelSignatureOrder, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TunnelSignatureOrder; + static deserializeBinaryFromReader(message: TunnelSignatureOrder, reader: jspb.BinaryReader): TunnelSignatureOrder; +} + +export namespace TunnelSignatureOrder { + export type AsObject = { + sequence: number, + pricesList: Array, + createdAt: number, + encoder: band_feeds_v1beta1_encoder_pb.EncoderMap[keyof band_feeds_v1beta1_encoder_pb.EncoderMap], + } +} + diff --git a/codegen/band/tunnel/v1beta1/tunnel_pb.js b/codegen/band/tunnel/v1beta1/tunnel_pb.js new file mode 100644 index 0000000..02b0bf8 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tunnel_pb.js @@ -0,0 +1,2107 @@ +// source: band/tunnel/v1beta1/tunnel.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var amino_amino_pb = require('../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var band_feeds_v1beta1_encoder_pb = require('../../../band/feeds/v1beta1/encoder_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_encoder_pb); +var band_feeds_v1beta1_feeds_pb = require('../../../band/feeds/v1beta1/feeds_pb.js'); +goog.object.extend(proto, band_feeds_v1beta1_feeds_pb); +goog.exportSymbol('proto.band.tunnel.v1beta1.Deposit', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.LatestPrices', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.Packet', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.SignalDeviation', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.TotalFees', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.Tunnel', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.TunnelSignatureOrder', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.Tunnel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.Tunnel.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.Tunnel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.Tunnel.displayName = 'proto.band.tunnel.v1beta1.Tunnel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.LatestPrices = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.LatestPrices.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.LatestPrices, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.LatestPrices.displayName = 'proto.band.tunnel.v1beta1.LatestPrices'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.TotalFees = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.TotalFees.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.TotalFees, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.TotalFees.displayName = 'proto.band.tunnel.v1beta1.TotalFees'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.Packet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.Packet.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.Packet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.Packet.displayName = 'proto.band.tunnel.v1beta1.Packet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.Deposit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.Deposit.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.Deposit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.Deposit.displayName = 'proto.band.tunnel.v1beta1.Deposit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.SignalDeviation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.SignalDeviation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.SignalDeviation.displayName = 'proto.band.tunnel.v1beta1.SignalDeviation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.TunnelSignatureOrder.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.TunnelSignatureOrder, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.TunnelSignatureOrder.displayName = 'proto.band.tunnel.v1beta1.TunnelSignatureOrder'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.Tunnel.repeatedFields_ = [5,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.Tunnel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.Tunnel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.Tunnel.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + sequence: jspb.Message.getFieldWithDefault(msg, 2, 0), + route: (f = msg.getRoute()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + feePayer: jspb.Message.getFieldWithDefault(msg, 4, ""), + signalDeviationsList: jspb.Message.toObjectList(msg.getSignalDeviationsList(), + proto.band.tunnel.v1beta1.SignalDeviation.toObject, includeInstance), + interval: jspb.Message.getFieldWithDefault(msg, 6, 0), + totalDepositList: jspb.Message.toObjectList(msg.getTotalDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + isActive: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + createdAt: jspb.Message.getFieldWithDefault(msg, 9, 0), + creator: jspb.Message.getFieldWithDefault(msg, 10, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.Tunnel} + */ +proto.band.tunnel.v1beta1.Tunnel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.Tunnel; + return proto.band.tunnel.v1beta1.Tunnel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.Tunnel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.Tunnel} + */ +proto.band.tunnel.v1beta1.Tunnel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setRoute(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFeePayer(value); + break; + case 5: + var value = new proto.band.tunnel.v1beta1.SignalDeviation; + reader.readMessage(value,proto.band.tunnel.v1beta1.SignalDeviation.deserializeBinaryFromReader); + msg.addSignalDeviations(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInterval(value); + break; + case 7: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addTotalDeposit(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsActive(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreatedAt(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.Tunnel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.Tunnel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.Tunnel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getRoute(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getFeePayer(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSignalDeviationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.band.tunnel.v1beta1.SignalDeviation.serializeBinaryToWriter + ); + } + f = message.getInterval(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getTotalDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getIsActive(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional uint64 id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 sequence = 2; + * @return {number} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional google.protobuf.Any route = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getRoute = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this +*/ +proto.band.tunnel.v1beta1.Tunnel.prototype.setRoute = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.clearRoute = function() { + return this.setRoute(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.hasRoute = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string fee_payer = 4; + * @return {string} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getFeePayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.setFeePayer = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated SignalDeviation signal_deviations = 5; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getSignalDeviationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.band.tunnel.v1beta1.SignalDeviation, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this +*/ +proto.band.tunnel.v1beta1.Tunnel.prototype.setSignalDeviationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.band.tunnel.v1beta1.SignalDeviation=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tunnel.v1beta1.SignalDeviation} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.addSignalDeviations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.band.tunnel.v1beta1.SignalDeviation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.clearSignalDeviationsList = function() { + return this.setSignalDeviationsList([]); +}; + + +/** + * optional uint64 interval = 6; + * @return {number} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total_deposit = 7; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getTotalDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this +*/ +proto.band.tunnel.v1beta1.Tunnel.prototype.setTotalDepositList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.addTotalDeposit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.clearTotalDepositList = function() { + return this.setTotalDepositList([]); +}; + + +/** + * optional bool is_active = 8; + * @return {boolean} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getIsActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.setIsActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional int64 created_at = 9; + * @return {number} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional string creator = 10; + * @return {string} + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.Tunnel} returns this + */ +proto.band.tunnel.v1beta1.Tunnel.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.LatestPrices.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.LatestPrices.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.LatestPrices.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.LatestPrices} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.LatestPrices.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + pricesList: jspb.Message.toObjectList(msg.getPricesList(), + band_feeds_v1beta1_feeds_pb.Price.toObject, includeInstance), + lastInterval: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.LatestPrices} + */ +proto.band.tunnel.v1beta1.LatestPrices.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.LatestPrices; + return proto.band.tunnel.v1beta1.LatestPrices.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.LatestPrices} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.LatestPrices} + */ +proto.band.tunnel.v1beta1.LatestPrices.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = new band_feeds_v1beta1_feeds_pb.Price; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Price.deserializeBinaryFromReader); + msg.addPrices(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastInterval(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.LatestPrices.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.LatestPrices.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.LatestPrices} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.LatestPrices.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getPricesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_feeds_v1beta1_feeds_pb.Price.serializeBinaryToWriter + ); + } + f = message.getLastInterval(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.LatestPrices.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.LatestPrices} returns this + */ +proto.band.tunnel.v1beta1.LatestPrices.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated band.feeds.v1beta1.Price prices = 2; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.LatestPrices.prototype.getPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Price, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.LatestPrices} returns this +*/ +proto.band.tunnel.v1beta1.LatestPrices.prototype.setPricesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Price=} opt_value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.Price} + */ +proto.band.tunnel.v1beta1.LatestPrices.prototype.addPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.feeds.v1beta1.Price, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.LatestPrices} returns this + */ +proto.band.tunnel.v1beta1.LatestPrices.prototype.clearPricesList = function() { + return this.setPricesList([]); +}; + + +/** + * optional int64 last_interval = 3; + * @return {number} + */ +proto.band.tunnel.v1beta1.LatestPrices.prototype.getLastInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.LatestPrices} returns this + */ +proto.band.tunnel.v1beta1.LatestPrices.prototype.setLastInterval = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.TotalFees.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.TotalFees.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.TotalFees.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.TotalFees} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TotalFees.toObject = function(includeInstance, msg) { + var f, obj = { + totalBasePacketFeeList: jspb.Message.toObjectList(msg.getTotalBasePacketFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.TotalFees} + */ +proto.band.tunnel.v1beta1.TotalFees.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.TotalFees; + return proto.band.tunnel.v1beta1.TotalFees.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.TotalFees} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.TotalFees} + */ +proto.band.tunnel.v1beta1.TotalFees.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addTotalBasePacketFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.TotalFees.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.TotalFees.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.TotalFees} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TotalFees.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalBasePacketFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total_base_packet_fee = 1; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.TotalFees.prototype.getTotalBasePacketFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.TotalFees} returns this +*/ +proto.band.tunnel.v1beta1.TotalFees.prototype.setTotalBasePacketFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.TotalFees.prototype.addTotalBasePacketFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.TotalFees} returns this + */ +proto.band.tunnel.v1beta1.TotalFees.prototype.clearTotalBasePacketFeeList = function() { + return this.setTotalBasePacketFeeList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.Packet.repeatedFields_ = [3,5,6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.Packet.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.Packet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.Packet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.Packet.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + sequence: jspb.Message.getFieldWithDefault(msg, 2, 0), + pricesList: jspb.Message.toObjectList(msg.getPricesList(), + band_feeds_v1beta1_feeds_pb.Price.toObject, includeInstance), + receipt: (f = msg.getReceipt()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + baseFeeList: jspb.Message.toObjectList(msg.getBaseFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + routeFeeList: jspb.Message.toObjectList(msg.getRouteFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.Packet} + */ +proto.band.tunnel.v1beta1.Packet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.Packet; + return proto.band.tunnel.v1beta1.Packet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.Packet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.Packet} + */ +proto.band.tunnel.v1beta1.Packet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 3: + var value = new band_feeds_v1beta1_feeds_pb.Price; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Price.deserializeBinaryFromReader); + msg.addPrices(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setReceipt(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addBaseFee(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRouteFee(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.Packet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.Packet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.Packet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.Packet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPricesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + band_feeds_v1beta1_feeds_pb.Price.serializeBinaryToWriter + ); + } + f = message.getReceipt(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getBaseFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRouteFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.Packet.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Packet} returns this + */ +proto.band.tunnel.v1beta1.Packet.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 sequence = 2; + * @return {number} + */ +proto.band.tunnel.v1beta1.Packet.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Packet} returns this + */ +proto.band.tunnel.v1beta1.Packet.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated band.feeds.v1beta1.Price prices = 3; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.Packet.prototype.getPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Price, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.Packet} returns this +*/ +proto.band.tunnel.v1beta1.Packet.prototype.setPricesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Price=} opt_value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.Price} + */ +proto.band.tunnel.v1beta1.Packet.prototype.addPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.band.feeds.v1beta1.Price, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.Packet} returns this + */ +proto.band.tunnel.v1beta1.Packet.prototype.clearPricesList = function() { + return this.setPricesList([]); +}; + + +/** + * optional google.protobuf.Any receipt = 4; + * @return {?proto.google.protobuf.Any} + */ +proto.band.tunnel.v1beta1.Packet.prototype.getReceipt = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.band.tunnel.v1beta1.Packet} returns this +*/ +proto.band.tunnel.v1beta1.Packet.prototype.setReceipt = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.Packet} returns this + */ +proto.band.tunnel.v1beta1.Packet.prototype.clearReceipt = function() { + return this.setReceipt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.Packet.prototype.hasReceipt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin base_fee = 5; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.Packet.prototype.getBaseFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.Packet} returns this +*/ +proto.band.tunnel.v1beta1.Packet.prototype.setBaseFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.Packet.prototype.addBaseFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.Packet} returns this + */ +proto.band.tunnel.v1beta1.Packet.prototype.clearBaseFeeList = function() { + return this.setBaseFeeList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin route_fee = 6; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.Packet.prototype.getRouteFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.Packet} returns this +*/ +proto.band.tunnel.v1beta1.Packet.prototype.setRouteFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.Packet.prototype.addRouteFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.Packet} returns this + */ +proto.band.tunnel.v1beta1.Packet.prototype.clearRouteFeeList = function() { + return this.setRouteFeeList([]); +}; + + +/** + * optional int64 created_at = 7; + * @return {number} + */ +proto.band.tunnel.v1beta1.Packet.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Packet} returns this + */ +proto.band.tunnel.v1beta1.Packet.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.Deposit.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.Deposit.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.Deposit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.Deposit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.Deposit.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + depositor: jspb.Message.getFieldWithDefault(msg, 2, ""), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.Deposit} + */ +proto.band.tunnel.v1beta1.Deposit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.Deposit; + return proto.band.tunnel.v1beta1.Deposit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.Deposit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.Deposit} + */ +proto.band.tunnel.v1beta1.Deposit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDepositor(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.Deposit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.Deposit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.Deposit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.Deposit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDepositor(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.Deposit.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.Deposit} returns this + */ +proto.band.tunnel.v1beta1.Deposit.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.band.tunnel.v1beta1.Deposit.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.Deposit} returns this + */ +proto.band.tunnel.v1beta1.Deposit.prototype.setDepositor = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.Deposit.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.Deposit} returns this +*/ +proto.band.tunnel.v1beta1.Deposit.prototype.setAmountList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.Deposit.prototype.addAmount = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.Deposit} returns this + */ +proto.band.tunnel.v1beta1.Deposit.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.SignalDeviation.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.SignalDeviation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.SignalDeviation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.SignalDeviation.toObject = function(includeInstance, msg) { + var f, obj = { + signalId: jspb.Message.getFieldWithDefault(msg, 1, ""), + softDeviationBps: jspb.Message.getFieldWithDefault(msg, 2, 0), + hardDeviationBps: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.SignalDeviation} + */ +proto.band.tunnel.v1beta1.SignalDeviation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.SignalDeviation; + return proto.band.tunnel.v1beta1.SignalDeviation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.SignalDeviation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.SignalDeviation} + */ +proto.band.tunnel.v1beta1.SignalDeviation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSignalId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSoftDeviationBps(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHardDeviationBps(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.SignalDeviation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.SignalDeviation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.SignalDeviation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.SignalDeviation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignalId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSoftDeviationBps(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getHardDeviationBps(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string signal_id = 1; + * @return {string} + */ +proto.band.tunnel.v1beta1.SignalDeviation.prototype.getSignalId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.SignalDeviation} returns this + */ +proto.band.tunnel.v1beta1.SignalDeviation.prototype.setSignalId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 soft_deviation_bps = 2; + * @return {number} + */ +proto.band.tunnel.v1beta1.SignalDeviation.prototype.getSoftDeviationBps = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.SignalDeviation} returns this + */ +proto.band.tunnel.v1beta1.SignalDeviation.prototype.setSoftDeviationBps = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 hard_deviation_bps = 3; + * @return {number} + */ +proto.band.tunnel.v1beta1.SignalDeviation.prototype.getHardDeviationBps = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.SignalDeviation} returns this + */ +proto.band.tunnel.v1beta1.SignalDeviation.prototype.setHardDeviationBps = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.TunnelSignatureOrder.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + pricesList: jspb.Message.toObjectList(msg.getPricesList(), + band_feeds_v1beta1_feeds_pb.Price.toObject, includeInstance), + createdAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + encoder: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.TunnelSignatureOrder; + return proto.band.tunnel.v1beta1.TunnelSignatureOrder.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = new band_feeds_v1beta1_feeds_pb.Price; + reader.readMessage(value,band_feeds_v1beta1_feeds_pb.Price.deserializeBinaryFromReader); + msg.addPrices(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreatedAt(value); + break; + case 4: + var value = /** @type {!proto.band.feeds.v1beta1.Encoder} */ (reader.readEnum()); + msg.setEncoder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.TunnelSignatureOrder.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getPricesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_feeds_v1beta1_feeds_pb.Price.serializeBinaryToWriter + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getEncoder(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} returns this + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated band.feeds.v1beta1.Price prices = 2; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.getPricesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_feeds_v1beta1_feeds_pb.Price, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} returns this +*/ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.setPricesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Price=} opt_value + * @param {number=} opt_index + * @return {!proto.band.feeds.v1beta1.Price} + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.addPrices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.feeds.v1beta1.Price, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} returns this + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.clearPricesList = function() { + return this.setPricesList([]); +}; + + +/** + * optional int64 created_at = 3; + * @return {number} + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} returns this + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional band.feeds.v1beta1.Encoder encoder = 4; + * @return {!proto.band.feeds.v1beta1.Encoder} + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.getEncoder = function() { + return /** @type {!proto.band.feeds.v1beta1.Encoder} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.band.feeds.v1beta1.Encoder} value + * @return {!proto.band.tunnel.v1beta1.TunnelSignatureOrder} returns this + */ +proto.band.tunnel.v1beta1.TunnelSignatureOrder.prototype.setEncoder = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +goog.object.extend(exports, proto.band.tunnel.v1beta1); diff --git a/codegen/band/tunnel/v1beta1/tunnel_pb_service.d.ts b/codegen/band/tunnel/v1beta1/tunnel_pb_service.d.ts new file mode 100644 index 0000000..c371b74 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tunnel_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/tunnel.proto + diff --git a/codegen/band/tunnel/v1beta1/tunnel_pb_service.js b/codegen/band/tunnel/v1beta1/tunnel_pb_service.js new file mode 100644 index 0000000..c371b74 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tunnel_pb_service.js @@ -0,0 +1,3 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/tunnel.proto + diff --git a/codegen/band/tunnel/v1beta1/tx.ts b/codegen/band/tunnel/v1beta1/tx.ts new file mode 100644 index 0000000..a151f12 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tx.ts @@ -0,0 +1,1389 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: band/tunnel/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/any"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../../cosmos/base/v1beta1/coin"; +import * as dependency_5 from "./../../../cosmos/msg/v1/msg"; +import * as dependency_6 from "./../../../amino/amino"; +import * as dependency_7 from "./params"; +import * as dependency_8 from "./tunnel"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace band.tunnel.v1beta1 { + export class MsgCreateTunnel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signal_deviations?: dependency_8.band.tunnel.v1beta1.SignalDeviation[]; + interval?: number; + route?: dependency_1.google.protobuf.Any; + initial_deposit?: dependency_4.cosmos.base.v1beta1.Coin[]; + creator?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signal_deviations" in data && data.signal_deviations != undefined) { + this.signal_deviations = data.signal_deviations; + } + if ("interval" in data && data.interval != undefined) { + this.interval = data.interval; + } + if ("route" in data && data.route != undefined) { + this.route = data.route; + } + if ("initial_deposit" in data && data.initial_deposit != undefined) { + this.initial_deposit = data.initial_deposit; + } + if ("creator" in data && data.creator != undefined) { + this.creator = data.creator; + } + } + } + get signal_deviations() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_8.band.tunnel.v1beta1.SignalDeviation, 1) as dependency_8.band.tunnel.v1beta1.SignalDeviation[]; + } + set signal_deviations(value: dependency_8.band.tunnel.v1beta1.SignalDeviation[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get interval() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set interval(value: number) { + pb_1.Message.setField(this, 2, value); + } + get route() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 3) as dependency_1.google.protobuf.Any; + } + set route(value: dependency_1.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_route() { + return pb_1.Message.getField(this, 3) != null; + } + get initial_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 4) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set initial_deposit(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get creator() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set creator(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + signal_deviations?: ReturnType[]; + interval?: number; + route?: ReturnType; + initial_deposit?: ReturnType[]; + creator?: string; + }): MsgCreateTunnel { + const message = new MsgCreateTunnel({}); + if (data.signal_deviations != null) { + message.signal_deviations = data.signal_deviations.map(item => dependency_8.band.tunnel.v1beta1.SignalDeviation.fromObject(item)); + } + if (data.interval != null) { + message.interval = data.interval; + } + if (data.route != null) { + message.route = dependency_1.google.protobuf.Any.fromObject(data.route); + } + if (data.initial_deposit != null) { + message.initial_deposit = data.initial_deposit.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.creator != null) { + message.creator = data.creator; + } + return message; + } + toObject() { + const data: { + signal_deviations?: ReturnType[]; + interval?: number; + route?: ReturnType; + initial_deposit?: ReturnType[]; + creator?: string; + } = {}; + if (this.signal_deviations != null) { + data.signal_deviations = this.signal_deviations.map((item: dependency_8.band.tunnel.v1beta1.SignalDeviation) => item.toObject()); + } + if (this.interval != null) { + data.interval = this.interval; + } + if (this.route != null) { + data.route = this.route.toObject(); + } + if (this.initial_deposit != null) { + data.initial_deposit = this.initial_deposit.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.creator != null) { + data.creator = this.creator; + } + 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.signal_deviations.length) + writer.writeRepeatedMessage(1, this.signal_deviations, (item: dependency_8.band.tunnel.v1beta1.SignalDeviation) => item.serialize(writer)); + if (this.interval != 0) + writer.writeUint64(2, this.interval); + if (this.has_route) + writer.writeMessage(3, this.route, () => this.route.serialize(writer)); + if (this.initial_deposit.length) + writer.writeRepeatedMessage(4, this.initial_deposit, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.creator.length) + writer.writeString(5, this.creator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateTunnel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateTunnel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signal_deviations, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_8.band.tunnel.v1beta1.SignalDeviation.deserialize(reader), dependency_8.band.tunnel.v1beta1.SignalDeviation)); + break; + case 2: + message.interval = reader.readUint64(); + break; + case 3: + reader.readMessage(message.route, () => message.route = dependency_1.google.protobuf.Any.deserialize(reader)); + break; + case 4: + reader.readMessage(message.initial_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 5: + message.creator = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateTunnel { + return MsgCreateTunnel.deserialize(bytes); + } + } + export class MsgCreateTunnelResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: 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 ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + tunnel_id?: number; + }): MsgCreateTunnelResponse { + const message = new MsgCreateTunnelResponse({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateTunnelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateTunnelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateTunnelResponse { + return MsgCreateTunnelResponse.deserialize(bytes); + } + } + export class MsgUpdateAndResetTunnel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + signal_deviations?: dependency_8.band.tunnel.v1beta1.SignalDeviation[]; + interval?: number; + creator?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("signal_deviations" in data && data.signal_deviations != undefined) { + this.signal_deviations = data.signal_deviations; + } + if ("interval" in data && data.interval != undefined) { + this.interval = data.interval; + } + if ("creator" in data && data.creator != undefined) { + this.creator = data.creator; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get signal_deviations() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_8.band.tunnel.v1beta1.SignalDeviation, 2) as dependency_8.band.tunnel.v1beta1.SignalDeviation[]; + } + set signal_deviations(value: dependency_8.band.tunnel.v1beta1.SignalDeviation[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get interval() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set interval(value: number) { + pb_1.Message.setField(this, 3, value); + } + get creator() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set creator(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + tunnel_id?: number; + signal_deviations?: ReturnType[]; + interval?: number; + creator?: string; + }): MsgUpdateAndResetTunnel { + const message = new MsgUpdateAndResetTunnel({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.signal_deviations != null) { + message.signal_deviations = data.signal_deviations.map(item => dependency_8.band.tunnel.v1beta1.SignalDeviation.fromObject(item)); + } + if (data.interval != null) { + message.interval = data.interval; + } + if (data.creator != null) { + message.creator = data.creator; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + signal_deviations?: ReturnType[]; + interval?: number; + creator?: string; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.signal_deviations != null) { + data.signal_deviations = this.signal_deviations.map((item: dependency_8.band.tunnel.v1beta1.SignalDeviation) => item.toObject()); + } + if (this.interval != null) { + data.interval = this.interval; + } + if (this.creator != null) { + data.creator = this.creator; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.signal_deviations.length) + writer.writeRepeatedMessage(2, this.signal_deviations, (item: dependency_8.band.tunnel.v1beta1.SignalDeviation) => item.serialize(writer)); + if (this.interval != 0) + writer.writeUint64(3, this.interval); + if (this.creator.length) + writer.writeString(4, this.creator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateAndResetTunnel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateAndResetTunnel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.signal_deviations, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_8.band.tunnel.v1beta1.SignalDeviation.deserialize(reader), dependency_8.band.tunnel.v1beta1.SignalDeviation)); + break; + case 3: + message.interval = reader.readUint64(); + break; + case 4: + message.creator = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateAndResetTunnel { + return MsgUpdateAndResetTunnel.deserialize(bytes); + } + } + export class MsgUpdateAndResetTunnelResponse 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: {}): MsgUpdateAndResetTunnelResponse { + const message = new MsgUpdateAndResetTunnelResponse({}); + 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): MsgUpdateAndResetTunnelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateAndResetTunnelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateAndResetTunnelResponse { + return MsgUpdateAndResetTunnelResponse.deserialize(bytes); + } + } + export class MsgActivate extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + creator?: 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 ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("creator" in data && data.creator != undefined) { + this.creator = data.creator; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get creator() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set creator(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tunnel_id?: number; + creator?: string; + }): MsgActivate { + const message = new MsgActivate({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.creator != null) { + message.creator = data.creator; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + creator?: string; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.creator != null) { + data.creator = this.creator; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.creator.length) + writer.writeString(2, this.creator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgActivate { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgActivate(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + message.creator = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgActivate { + return MsgActivate.deserialize(bytes); + } + } + export class MsgActivateResponse 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: {}): MsgActivateResponse { + const message = new MsgActivateResponse({}); + 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): MsgActivateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgActivateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgActivateResponse { + return MsgActivateResponse.deserialize(bytes); + } + } + export class MsgDeactivate extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + creator?: 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 ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("creator" in data && data.creator != undefined) { + this.creator = data.creator; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get creator() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set creator(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tunnel_id?: number; + creator?: string; + }): MsgDeactivate { + const message = new MsgDeactivate({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.creator != null) { + message.creator = data.creator; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + creator?: string; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.creator != null) { + data.creator = this.creator; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.creator.length) + writer.writeString(2, this.creator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDeactivate { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDeactivate(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + message.creator = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDeactivate { + return MsgDeactivate.deserialize(bytes); + } + } + export class MsgDeactivateResponse 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: {}): MsgDeactivateResponse { + const message = new MsgDeactivateResponse({}); + 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): MsgDeactivateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDeactivateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDeactivateResponse { + return MsgDeactivateResponse.deserialize(bytes); + } + } + export class MsgTriggerTunnel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + creator?: 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 ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("creator" in data && data.creator != undefined) { + this.creator = data.creator; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get creator() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set creator(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tunnel_id?: number; + creator?: string; + }): MsgTriggerTunnel { + const message = new MsgTriggerTunnel({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.creator != null) { + message.creator = data.creator; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + creator?: string; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.creator != null) { + data.creator = this.creator; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.creator.length) + writer.writeString(2, this.creator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTriggerTunnel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTriggerTunnel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + message.creator = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTriggerTunnel { + return MsgTriggerTunnel.deserialize(bytes); + } + } + export class MsgTriggerTunnelResponse 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: {}): MsgTriggerTunnelResponse { + const message = new MsgTriggerTunnelResponse({}); + 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): MsgTriggerTunnelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTriggerTunnelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTriggerTunnelResponse { + return MsgTriggerTunnelResponse.deserialize(bytes); + } + } + export class MsgDepositToTunnel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + amount?: dependency_4.cosmos.base.v1beta1.Coin[]; + depositor?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 2) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + tunnel_id?: number; + amount?: ReturnType[]; + depositor?: string; + }): MsgDepositToTunnel { + const message = new MsgDepositToTunnel({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + amount?: ReturnType[]; + depositor?: string; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.amount.length) + writer.writeRepeatedMessage(2, this.amount, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.depositor.length) + writer.writeString(3, this.depositor); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDepositToTunnel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDepositToTunnel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 3: + message.depositor = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDepositToTunnel { + return MsgDepositToTunnel.deserialize(bytes); + } + } + export class MsgDepositToTunnelResponse 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: {}): MsgDepositToTunnelResponse { + const message = new MsgDepositToTunnelResponse({}); + 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): MsgDepositToTunnelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDepositToTunnelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDepositToTunnelResponse { + return MsgDepositToTunnelResponse.deserialize(bytes); + } + } + export class MsgWithdrawFromTunnel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tunnel_id?: number; + amount?: dependency_4.cosmos.base.v1beta1.Coin[]; + withdrawer?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tunnel_id" in data && data.tunnel_id != undefined) { + this.tunnel_id = data.tunnel_id; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("withdrawer" in data && data.withdrawer != undefined) { + this.withdrawer = data.withdrawer; + } + } + } + get tunnel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set tunnel_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 2) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get withdrawer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set withdrawer(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + tunnel_id?: number; + amount?: ReturnType[]; + withdrawer?: string; + }): MsgWithdrawFromTunnel { + const message = new MsgWithdrawFromTunnel({}); + if (data.tunnel_id != null) { + message.tunnel_id = data.tunnel_id; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.withdrawer != null) { + message.withdrawer = data.withdrawer; + } + return message; + } + toObject() { + const data: { + tunnel_id?: number; + amount?: ReturnType[]; + withdrawer?: string; + } = {}; + if (this.tunnel_id != null) { + data.tunnel_id = this.tunnel_id; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.withdrawer != null) { + data.withdrawer = this.withdrawer; + } + 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.tunnel_id != 0) + writer.writeUint64(1, this.tunnel_id); + if (this.amount.length) + writer.writeRepeatedMessage(2, this.amount, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.withdrawer.length) + writer.writeString(3, this.withdrawer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawFromTunnel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawFromTunnel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tunnel_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 3: + message.withdrawer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgWithdrawFromTunnel { + return MsgWithdrawFromTunnel.deserialize(bytes); + } + } + export class MsgWithdrawFromTunnelResponse 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: {}): MsgWithdrawFromTunnelResponse { + const message = new MsgWithdrawFromTunnelResponse({}); + 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): MsgWithdrawFromTunnelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawFromTunnelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgWithdrawFromTunnelResponse { + return MsgWithdrawFromTunnelResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_7.band.tunnel.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_7.band.tunnel.v1beta1.Params, 2) as dependency_7.band.tunnel.v1beta1.Params; + } + set params(value: dependency_7.band.tunnel.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_7.band.tunnel.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_7.band.tunnel.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + CreateTunnel: { + path: "/band.tunnel.v1beta1.Msg/CreateTunnel", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreateTunnel) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreateTunnel.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreateTunnelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreateTunnelResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateAndResetTunnel: { + path: "/band.tunnel.v1beta1.Msg/UpdateAndResetTunnel", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateAndResetTunnel) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateAndResetTunnel.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateAndResetTunnelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateAndResetTunnelResponse.deserialize(new Uint8Array(bytes)) + }, + Activate: { + path: "/band.tunnel.v1beta1.Msg/Activate", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgActivate) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgActivate.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgActivateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgActivateResponse.deserialize(new Uint8Array(bytes)) + }, + Deactivate: { + path: "/band.tunnel.v1beta1.Msg/Deactivate", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgDeactivate) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgDeactivate.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgDeactivateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgDeactivateResponse.deserialize(new Uint8Array(bytes)) + }, + TriggerTunnel: { + path: "/band.tunnel.v1beta1.Msg/TriggerTunnel", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgTriggerTunnel) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgTriggerTunnel.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgTriggerTunnelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgTriggerTunnelResponse.deserialize(new Uint8Array(bytes)) + }, + DepositToTunnel: { + path: "/band.tunnel.v1beta1.Msg/DepositToTunnel", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgDepositToTunnel) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgDepositToTunnel.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgDepositToTunnelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgDepositToTunnelResponse.deserialize(new Uint8Array(bytes)) + }, + WithdrawFromTunnel: { + path: "/band.tunnel.v1beta1.Msg/WithdrawFromTunnel", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgWithdrawFromTunnel) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgWithdrawFromTunnel.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgWithdrawFromTunnelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgWithdrawFromTunnelResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/band.tunnel.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CreateTunnel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateAndResetTunnel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Activate(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Deactivate(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TriggerTunnel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DepositToTunnel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract WithdrawFromTunnel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CreateTunnel: GrpcUnaryServiceInterface = (message: MsgCreateTunnel, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateTunnel(message, metadata, options, callback); + }; + UpdateAndResetTunnel: GrpcUnaryServiceInterface = (message: MsgUpdateAndResetTunnel, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateAndResetTunnel(message, metadata, options, callback); + }; + Activate: GrpcUnaryServiceInterface = (message: MsgActivate, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Activate(message, metadata, options, callback); + }; + Deactivate: GrpcUnaryServiceInterface = (message: MsgDeactivate, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Deactivate(message, metadata, options, callback); + }; + TriggerTunnel: GrpcUnaryServiceInterface = (message: MsgTriggerTunnel, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TriggerTunnel(message, metadata, options, callback); + }; + DepositToTunnel: GrpcUnaryServiceInterface = (message: MsgDepositToTunnel, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DepositToTunnel(message, metadata, options, callback); + }; + WithdrawFromTunnel: GrpcUnaryServiceInterface = (message: MsgWithdrawFromTunnel, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.WithdrawFromTunnel(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/codegen/band/tunnel/v1beta1/tx_pb.d.ts b/codegen/band/tunnel/v1beta1/tx_pb.d.ts new file mode 100644 index 0000000..0be3687 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tx_pb.d.ts @@ -0,0 +1,379 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/tx.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; +import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as band_tunnel_v1beta1_params_pb from "../../../band/tunnel/v1beta1/params_pb"; +import * as band_tunnel_v1beta1_tunnel_pb from "../../../band/tunnel/v1beta1/tunnel_pb"; + +export class MsgCreateTunnel extends jspb.Message { + clearSignalDeviationsList(): void; + getSignalDeviationsList(): Array; + setSignalDeviationsList(value: Array): void; + addSignalDeviations(value?: band_tunnel_v1beta1_tunnel_pb.SignalDeviation, index?: number): band_tunnel_v1beta1_tunnel_pb.SignalDeviation; + + getInterval(): number; + setInterval(value: number): void; + + hasRoute(): boolean; + clearRoute(): void; + getRoute(): google_protobuf_any_pb.Any | undefined; + setRoute(value?: google_protobuf_any_pb.Any): void; + + clearInitialDepositList(): void; + getInitialDepositList(): Array; + setInitialDepositList(value: Array): void; + addInitialDeposit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getCreator(): string; + setCreator(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgCreateTunnel.AsObject; + static toObject(includeInstance: boolean, msg: MsgCreateTunnel): MsgCreateTunnel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgCreateTunnel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgCreateTunnel; + static deserializeBinaryFromReader(message: MsgCreateTunnel, reader: jspb.BinaryReader): MsgCreateTunnel; +} + +export namespace MsgCreateTunnel { + export type AsObject = { + signalDeviationsList: Array, + interval: number, + route?: google_protobuf_any_pb.Any.AsObject, + initialDepositList: Array, + creator: string, + } +} + +export class MsgCreateTunnelResponse extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgCreateTunnelResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgCreateTunnelResponse): MsgCreateTunnelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgCreateTunnelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgCreateTunnelResponse; + static deserializeBinaryFromReader(message: MsgCreateTunnelResponse, reader: jspb.BinaryReader): MsgCreateTunnelResponse; +} + +export namespace MsgCreateTunnelResponse { + export type AsObject = { + tunnelId: number, + } +} + +export class MsgUpdateAndResetTunnel extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + clearSignalDeviationsList(): void; + getSignalDeviationsList(): Array; + setSignalDeviationsList(value: Array): void; + addSignalDeviations(value?: band_tunnel_v1beta1_tunnel_pb.SignalDeviation, index?: number): band_tunnel_v1beta1_tunnel_pb.SignalDeviation; + + getInterval(): number; + setInterval(value: number): void; + + getCreator(): string; + setCreator(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateAndResetTunnel.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateAndResetTunnel): MsgUpdateAndResetTunnel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateAndResetTunnel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateAndResetTunnel; + static deserializeBinaryFromReader(message: MsgUpdateAndResetTunnel, reader: jspb.BinaryReader): MsgUpdateAndResetTunnel; +} + +export namespace MsgUpdateAndResetTunnel { + export type AsObject = { + tunnelId: number, + signalDeviationsList: Array, + interval: number, + creator: string, + } +} + +export class MsgUpdateAndResetTunnelResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateAndResetTunnelResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateAndResetTunnelResponse): MsgUpdateAndResetTunnelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateAndResetTunnelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateAndResetTunnelResponse; + static deserializeBinaryFromReader(message: MsgUpdateAndResetTunnelResponse, reader: jspb.BinaryReader): MsgUpdateAndResetTunnelResponse; +} + +export namespace MsgUpdateAndResetTunnelResponse { + export type AsObject = { + } +} + +export class MsgActivate extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + getCreator(): string; + setCreator(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgActivate.AsObject; + static toObject(includeInstance: boolean, msg: MsgActivate): MsgActivate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgActivate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgActivate; + static deserializeBinaryFromReader(message: MsgActivate, reader: jspb.BinaryReader): MsgActivate; +} + +export namespace MsgActivate { + export type AsObject = { + tunnelId: number, + creator: string, + } +} + +export class MsgActivateResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgActivateResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgActivateResponse): MsgActivateResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgActivateResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgActivateResponse; + static deserializeBinaryFromReader(message: MsgActivateResponse, reader: jspb.BinaryReader): MsgActivateResponse; +} + +export namespace MsgActivateResponse { + export type AsObject = { + } +} + +export class MsgDeactivate extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + getCreator(): string; + setCreator(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgDeactivate.AsObject; + static toObject(includeInstance: boolean, msg: MsgDeactivate): MsgDeactivate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgDeactivate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgDeactivate; + static deserializeBinaryFromReader(message: MsgDeactivate, reader: jspb.BinaryReader): MsgDeactivate; +} + +export namespace MsgDeactivate { + export type AsObject = { + tunnelId: number, + creator: string, + } +} + +export class MsgDeactivateResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgDeactivateResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgDeactivateResponse): MsgDeactivateResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgDeactivateResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgDeactivateResponse; + static deserializeBinaryFromReader(message: MsgDeactivateResponse, reader: jspb.BinaryReader): MsgDeactivateResponse; +} + +export namespace MsgDeactivateResponse { + export type AsObject = { + } +} + +export class MsgTriggerTunnel extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + getCreator(): string; + setCreator(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTriggerTunnel.AsObject; + static toObject(includeInstance: boolean, msg: MsgTriggerTunnel): MsgTriggerTunnel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTriggerTunnel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTriggerTunnel; + static deserializeBinaryFromReader(message: MsgTriggerTunnel, reader: jspb.BinaryReader): MsgTriggerTunnel; +} + +export namespace MsgTriggerTunnel { + export type AsObject = { + tunnelId: number, + creator: string, + } +} + +export class MsgTriggerTunnelResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTriggerTunnelResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgTriggerTunnelResponse): MsgTriggerTunnelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTriggerTunnelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTriggerTunnelResponse; + static deserializeBinaryFromReader(message: MsgTriggerTunnelResponse, reader: jspb.BinaryReader): MsgTriggerTunnelResponse; +} + +export namespace MsgTriggerTunnelResponse { + export type AsObject = { + } +} + +export class MsgDepositToTunnel extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + clearAmountList(): void; + getAmountList(): Array; + setAmountList(value: Array): void; + addAmount(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getDepositor(): string; + setDepositor(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgDepositToTunnel.AsObject; + static toObject(includeInstance: boolean, msg: MsgDepositToTunnel): MsgDepositToTunnel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgDepositToTunnel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgDepositToTunnel; + static deserializeBinaryFromReader(message: MsgDepositToTunnel, reader: jspb.BinaryReader): MsgDepositToTunnel; +} + +export namespace MsgDepositToTunnel { + export type AsObject = { + tunnelId: number, + amountList: Array, + depositor: string, + } +} + +export class MsgDepositToTunnelResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgDepositToTunnelResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgDepositToTunnelResponse): MsgDepositToTunnelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgDepositToTunnelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgDepositToTunnelResponse; + static deserializeBinaryFromReader(message: MsgDepositToTunnelResponse, reader: jspb.BinaryReader): MsgDepositToTunnelResponse; +} + +export namespace MsgDepositToTunnelResponse { + export type AsObject = { + } +} + +export class MsgWithdrawFromTunnel extends jspb.Message { + getTunnelId(): number; + setTunnelId(value: number): void; + + clearAmountList(): void; + getAmountList(): Array; + setAmountList(value: Array): void; + addAmount(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + getWithdrawer(): string; + setWithdrawer(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgWithdrawFromTunnel.AsObject; + static toObject(includeInstance: boolean, msg: MsgWithdrawFromTunnel): MsgWithdrawFromTunnel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgWithdrawFromTunnel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgWithdrawFromTunnel; + static deserializeBinaryFromReader(message: MsgWithdrawFromTunnel, reader: jspb.BinaryReader): MsgWithdrawFromTunnel; +} + +export namespace MsgWithdrawFromTunnel { + export type AsObject = { + tunnelId: number, + amountList: Array, + withdrawer: string, + } +} + +export class MsgWithdrawFromTunnelResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgWithdrawFromTunnelResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgWithdrawFromTunnelResponse): MsgWithdrawFromTunnelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgWithdrawFromTunnelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgWithdrawFromTunnelResponse; + static deserializeBinaryFromReader(message: MsgWithdrawFromTunnelResponse, reader: jspb.BinaryReader): MsgWithdrawFromTunnelResponse; +} + +export namespace MsgWithdrawFromTunnelResponse { + export type AsObject = { + } +} + +export class MsgUpdateParams extends jspb.Message { + getAuthority(): string; + setAuthority(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): band_tunnel_v1beta1_params_pb.Params | undefined; + setParams(value?: band_tunnel_v1beta1_params_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + authority: string, + params?: band_tunnel_v1beta1_params_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + diff --git a/codegen/band/tunnel/v1beta1/tx_pb.js b/codegen/band/tunnel/v1beta1/tx_pb.js new file mode 100644 index 0000000..e4af709 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tx_pb.js @@ -0,0 +1,2898 @@ +// source: band/tunnel/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var amino_amino_pb = require('../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); +var band_tunnel_v1beta1_params_pb = require('../../../band/tunnel/v1beta1/params_pb.js'); +goog.object.extend(proto, band_tunnel_v1beta1_params_pb); +var band_tunnel_v1beta1_tunnel_pb = require('../../../band/tunnel/v1beta1/tunnel_pb.js'); +goog.object.extend(proto, band_tunnel_v1beta1_tunnel_pb); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgActivate', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgActivateResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgCreateTunnel', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgCreateTunnelResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgDeactivate', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgDeactivateResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgDepositToTunnel', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgTriggerTunnel', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgUpdateParamsResponse', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel', null, global); +goog.exportSymbol('proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.MsgCreateTunnel.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgCreateTunnel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgCreateTunnel.displayName = 'proto.band.tunnel.v1beta1.MsgCreateTunnel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgCreateTunnelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgCreateTunnelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.displayName = 'proto.band.tunnel.v1beta1.MsgCreateTunnelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.displayName = 'proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.displayName = 'proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgActivate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgActivate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgActivate.displayName = 'proto.band.tunnel.v1beta1.MsgActivate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgActivateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgActivateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgActivateResponse.displayName = 'proto.band.tunnel.v1beta1.MsgActivateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgDeactivate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgDeactivate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgDeactivate.displayName = 'proto.band.tunnel.v1beta1.MsgDeactivate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgDeactivateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgDeactivateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgDeactivateResponse.displayName = 'proto.band.tunnel.v1beta1.MsgDeactivateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgTriggerTunnel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgTriggerTunnel.displayName = 'proto.band.tunnel.v1beta1.MsgTriggerTunnel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.displayName = 'proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.MsgDepositToTunnel.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgDepositToTunnel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgDepositToTunnel.displayName = 'proto.band.tunnel.v1beta1.MsgDepositToTunnel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.displayName = 'proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.repeatedFields_, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.displayName = 'proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.displayName = 'proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgUpdateParams.displayName = 'proto.band.tunnel.v1beta1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.band.tunnel.v1beta1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.band.tunnel.v1beta1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.displayName = 'proto.band.tunnel.v1beta1.MsgUpdateParamsResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.repeatedFields_ = [1,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgCreateTunnel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgCreateTunnel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.toObject = function(includeInstance, msg) { + var f, obj = { + signalDeviationsList: jspb.Message.toObjectList(msg.getSignalDeviationsList(), + band_tunnel_v1beta1_tunnel_pb.SignalDeviation.toObject, includeInstance), + interval: jspb.Message.getFieldWithDefault(msg, 2, 0), + route: (f = msg.getRoute()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + initialDepositList: jspb.Message.toObjectList(msg.getInitialDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + creator: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgCreateTunnel; + return proto.band.tunnel.v1beta1.MsgCreateTunnel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgCreateTunnel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new band_tunnel_v1beta1_tunnel_pb.SignalDeviation; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.SignalDeviation.deserializeBinaryFromReader); + msg.addSignalDeviations(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInterval(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setRoute(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addInitialDeposit(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgCreateTunnel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgCreateTunnel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignalDeviationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + band_tunnel_v1beta1_tunnel_pb.SignalDeviation.serializeBinaryToWriter + ); + } + f = message.getInterval(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getRoute(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getInitialDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * repeated SignalDeviation signal_deviations = 1; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.getSignalDeviationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tunnel_v1beta1_tunnel_pb.SignalDeviation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} returns this +*/ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.setSignalDeviationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.band.tunnel.v1beta1.SignalDeviation=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tunnel.v1beta1.SignalDeviation} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.addSignalDeviations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.band.tunnel.v1beta1.SignalDeviation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.clearSignalDeviationsList = function() { + return this.setSignalDeviationsList([]); +}; + + +/** + * optional uint64 interval = 2; + * @return {number} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.getInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional google.protobuf.Any route = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.getRoute = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} returns this +*/ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.setRoute = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.clearRoute = function() { + return this.setRoute(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.hasRoute = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin initial_deposit = 4; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.getInitialDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} returns this +*/ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.setInitialDepositList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.addInitialDeposit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.clearInitialDepositList = function() { + return this.setInitialDepositList([]); +}; + + +/** + * optional string creator = 5; + * @return {string} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgCreateTunnel.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgCreateTunnelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgCreateTunnelResponse; + return proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgCreateTunnelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgCreateTunnelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.MsgCreateTunnelResponse} returns this + */ +proto.band.tunnel.v1beta1.MsgCreateTunnelResponse.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + signalDeviationsList: jspb.Message.toObjectList(msg.getSignalDeviationsList(), + band_tunnel_v1beta1_tunnel_pb.SignalDeviation.toObject, includeInstance), + interval: jspb.Message.getFieldWithDefault(msg, 3, 0), + creator: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel; + return proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = new band_tunnel_v1beta1_tunnel_pb.SignalDeviation; + reader.readMessage(value,band_tunnel_v1beta1_tunnel_pb.SignalDeviation.deserializeBinaryFromReader); + msg.addSignalDeviations(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInterval(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSignalDeviationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + band_tunnel_v1beta1_tunnel_pb.SignalDeviation.serializeBinaryToWriter + ); + } + f = message.getInterval(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated SignalDeviation signal_deviations = 2; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.getSignalDeviationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, band_tunnel_v1beta1_tunnel_pb.SignalDeviation, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} returns this +*/ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.setSignalDeviationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.band.tunnel.v1beta1.SignalDeviation=} opt_value + * @param {number=} opt_index + * @return {!proto.band.tunnel.v1beta1.SignalDeviation} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.addSignalDeviations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.band.tunnel.v1beta1.SignalDeviation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.clearSignalDeviationsList = function() { + return this.setSignalDeviationsList([]); +}; + + +/** + * optional uint64 interval = 3; + * @return {number} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.getInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string creator = 4; + * @return {string} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnel.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse; + return proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgActivate.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgActivate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgActivate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgActivate.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + creator: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgActivate} + */ +proto.band.tunnel.v1beta1.MsgActivate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgActivate; + return proto.band.tunnel.v1beta1.MsgActivate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgActivate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgActivate} + */ +proto.band.tunnel.v1beta1.MsgActivate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgActivate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgActivate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgActivate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgActivate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.MsgActivate.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.MsgActivate} returns this + */ +proto.band.tunnel.v1beta1.MsgActivate.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.band.tunnel.v1beta1.MsgActivate.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.MsgActivate} returns this + */ +proto.band.tunnel.v1beta1.MsgActivate.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgActivateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgActivateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgActivateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgActivateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgActivateResponse} + */ +proto.band.tunnel.v1beta1.MsgActivateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgActivateResponse; + return proto.band.tunnel.v1beta1.MsgActivateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgActivateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgActivateResponse} + */ +proto.band.tunnel.v1beta1.MsgActivateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgActivateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgActivateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgActivateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgActivateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgDeactivate.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgDeactivate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgDeactivate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgDeactivate.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + creator: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgDeactivate} + */ +proto.band.tunnel.v1beta1.MsgDeactivate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgDeactivate; + return proto.band.tunnel.v1beta1.MsgDeactivate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgDeactivate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgDeactivate} + */ +proto.band.tunnel.v1beta1.MsgDeactivate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgDeactivate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgDeactivate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgDeactivate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgDeactivate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.MsgDeactivate.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.MsgDeactivate} returns this + */ +proto.band.tunnel.v1beta1.MsgDeactivate.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.band.tunnel.v1beta1.MsgDeactivate.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.MsgDeactivate} returns this + */ +proto.band.tunnel.v1beta1.MsgDeactivate.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgDeactivateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgDeactivateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgDeactivateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgDeactivateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgDeactivateResponse} + */ +proto.band.tunnel.v1beta1.MsgDeactivateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgDeactivateResponse; + return proto.band.tunnel.v1beta1.MsgDeactivateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgDeactivateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgDeactivateResponse} + */ +proto.band.tunnel.v1beta1.MsgDeactivateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgDeactivateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgDeactivateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgDeactivateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgDeactivateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgTriggerTunnel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgTriggerTunnel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + creator: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgTriggerTunnel} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgTriggerTunnel; + return proto.band.tunnel.v1beta1.MsgTriggerTunnel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgTriggerTunnel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgTriggerTunnel} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgTriggerTunnel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgTriggerTunnel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.MsgTriggerTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.MsgTriggerTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnel.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse; + return proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgTriggerTunnelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgDepositToTunnel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgDepositToTunnel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + depositor: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgDepositToTunnel} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgDepositToTunnel; + return proto.band.tunnel.v1beta1.MsgDepositToTunnel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgDepositToTunnel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgDepositToTunnel} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDepositor(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgDepositToTunnel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgDepositToTunnel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getDepositor(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.MsgDepositToTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 2; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.MsgDepositToTunnel} returns this +*/ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.setAmountList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.addAmount = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.MsgDepositToTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional string depositor = 3; + * @return {string} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.MsgDepositToTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnel.prototype.setDepositor = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse; + return proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgDepositToTunnelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.toObject = function(includeInstance, msg) { + var f, obj = { + tunnelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + withdrawer: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel; + return proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTunnelId(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setWithdrawer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTunnelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getWithdrawer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint64 tunnel_id = 1; + * @return {number} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.getTunnelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.setTunnelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 2; + * @return {!Array} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel} returns this +*/ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.setAmountList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.addAmount = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional string withdrawer = 3; + * @return {string} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.getWithdrawer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel} returns this + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnel.prototype.setWithdrawer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse; + return proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + authority: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && band_tunnel_v1beta1_params_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateParams} + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgUpdateParams; + return proto.band.tunnel.v1beta1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateParams} + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + case 2: + var value = new band_tunnel_v1beta1_params_pb.Params; + reader.readMessage(value,band_tunnel_v1beta1_params_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + band_tunnel_v1beta1_params_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string authority = 1; + * @return {string} + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.band.tunnel.v1beta1.MsgUpdateParams} returns this + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Params params = 2; + * @return {?proto.band.tunnel.v1beta1.Params} + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.band.tunnel.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, band_tunnel_v1beta1_params_pb.Params, 2)); +}; + + +/** + * @param {?proto.band.tunnel.v1beta1.Params|undefined} value + * @return {!proto.band.tunnel.v1beta1.MsgUpdateParams} returns this +*/ +proto.band.tunnel.v1beta1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateParams} returns this + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.band.tunnel.v1beta1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.band.tunnel.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateParamsResponse} + */ +proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.band.tunnel.v1beta1.MsgUpdateParamsResponse; + return proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.band.tunnel.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.band.tunnel.v1beta1.MsgUpdateParamsResponse} + */ +proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.band.tunnel.v1beta1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.band.tunnel.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.band.tunnel.v1beta1); diff --git a/codegen/band/tunnel/v1beta1/tx_pb_service.d.ts b/codegen/band/tunnel/v1beta1/tx_pb_service.d.ts new file mode 100644 index 0000000..54281f5 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tx_pb_service.d.ts @@ -0,0 +1,196 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/tx.proto + +import * as band_tunnel_v1beta1_tx_pb from "../../../band/tunnel/v1beta1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgCreateTunnel = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_tx_pb.MsgCreateTunnel; + readonly responseType: typeof band_tunnel_v1beta1_tx_pb.MsgCreateTunnelResponse; +}; + +type MsgUpdateAndResetTunnel = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_tx_pb.MsgUpdateAndResetTunnel; + readonly responseType: typeof band_tunnel_v1beta1_tx_pb.MsgUpdateAndResetTunnelResponse; +}; + +type MsgActivate = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_tx_pb.MsgActivate; + readonly responseType: typeof band_tunnel_v1beta1_tx_pb.MsgActivateResponse; +}; + +type MsgDeactivate = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_tx_pb.MsgDeactivate; + readonly responseType: typeof band_tunnel_v1beta1_tx_pb.MsgDeactivateResponse; +}; + +type MsgTriggerTunnel = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_tx_pb.MsgTriggerTunnel; + readonly responseType: typeof band_tunnel_v1beta1_tx_pb.MsgTriggerTunnelResponse; +}; + +type MsgDepositToTunnel = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_tx_pb.MsgDepositToTunnel; + readonly responseType: typeof band_tunnel_v1beta1_tx_pb.MsgDepositToTunnelResponse; +}; + +type MsgWithdrawFromTunnel = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_tx_pb.MsgWithdrawFromTunnel; + readonly responseType: typeof band_tunnel_v1beta1_tx_pb.MsgWithdrawFromTunnelResponse; +}; + +type MsgUpdateParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof band_tunnel_v1beta1_tx_pb.MsgUpdateParams; + readonly responseType: typeof band_tunnel_v1beta1_tx_pb.MsgUpdateParamsResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly CreateTunnel: MsgCreateTunnel; + static readonly UpdateAndResetTunnel: MsgUpdateAndResetTunnel; + static readonly Activate: MsgActivate; + static readonly Deactivate: MsgDeactivate; + static readonly TriggerTunnel: MsgTriggerTunnel; + static readonly DepositToTunnel: MsgDepositToTunnel; + static readonly WithdrawFromTunnel: MsgWithdrawFromTunnel; + static readonly UpdateParams: MsgUpdateParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + createTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgCreateTunnel, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgCreateTunnelResponse|null) => void + ): UnaryResponse; + createTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgCreateTunnel, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgCreateTunnelResponse|null) => void + ): UnaryResponse; + updateAndResetTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgUpdateAndResetTunnel, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgUpdateAndResetTunnelResponse|null) => void + ): UnaryResponse; + updateAndResetTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgUpdateAndResetTunnel, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgUpdateAndResetTunnelResponse|null) => void + ): UnaryResponse; + activate( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgActivate, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgActivateResponse|null) => void + ): UnaryResponse; + activate( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgActivate, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgActivateResponse|null) => void + ): UnaryResponse; + deactivate( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgDeactivate, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgDeactivateResponse|null) => void + ): UnaryResponse; + deactivate( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgDeactivate, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgDeactivateResponse|null) => void + ): UnaryResponse; + triggerTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgTriggerTunnel, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgTriggerTunnelResponse|null) => void + ): UnaryResponse; + triggerTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgTriggerTunnel, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgTriggerTunnelResponse|null) => void + ): UnaryResponse; + depositToTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgDepositToTunnel, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgDepositToTunnelResponse|null) => void + ): UnaryResponse; + depositToTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgDepositToTunnel, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgDepositToTunnelResponse|null) => void + ): UnaryResponse; + withdrawFromTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgWithdrawFromTunnel, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgWithdrawFromTunnelResponse|null) => void + ): UnaryResponse; + withdrawFromTunnel( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgWithdrawFromTunnel, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgWithdrawFromTunnelResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: band_tunnel_v1beta1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: band_tunnel_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/band/tunnel/v1beta1/tx_pb_service.js b/codegen/band/tunnel/v1beta1/tx_pb_service.js new file mode 100644 index 0000000..4901847 --- /dev/null +++ b/codegen/band/tunnel/v1beta1/tx_pb_service.js @@ -0,0 +1,341 @@ +// package: band.tunnel.v1beta1 +// file: band/tunnel/v1beta1/tx.proto + +var band_tunnel_v1beta1_tx_pb = require("../../../band/tunnel/v1beta1/tx_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Msg = (function () { + function Msg() {} + Msg.serviceName = "band.tunnel.v1beta1.Msg"; + return Msg; +}()); + +Msg.CreateTunnel = { + methodName: "CreateTunnel", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_tx_pb.MsgCreateTunnel, + responseType: band_tunnel_v1beta1_tx_pb.MsgCreateTunnelResponse +}; + +Msg.UpdateAndResetTunnel = { + methodName: "UpdateAndResetTunnel", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_tx_pb.MsgUpdateAndResetTunnel, + responseType: band_tunnel_v1beta1_tx_pb.MsgUpdateAndResetTunnelResponse +}; + +Msg.Activate = { + methodName: "Activate", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_tx_pb.MsgActivate, + responseType: band_tunnel_v1beta1_tx_pb.MsgActivateResponse +}; + +Msg.Deactivate = { + methodName: "Deactivate", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_tx_pb.MsgDeactivate, + responseType: band_tunnel_v1beta1_tx_pb.MsgDeactivateResponse +}; + +Msg.TriggerTunnel = { + methodName: "TriggerTunnel", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_tx_pb.MsgTriggerTunnel, + responseType: band_tunnel_v1beta1_tx_pb.MsgTriggerTunnelResponse +}; + +Msg.DepositToTunnel = { + methodName: "DepositToTunnel", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_tx_pb.MsgDepositToTunnel, + responseType: band_tunnel_v1beta1_tx_pb.MsgDepositToTunnelResponse +}; + +Msg.WithdrawFromTunnel = { + methodName: "WithdrawFromTunnel", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_tx_pb.MsgWithdrawFromTunnel, + responseType: band_tunnel_v1beta1_tx_pb.MsgWithdrawFromTunnelResponse +}; + +Msg.UpdateParams = { + methodName: "UpdateParams", + service: Msg, + requestStream: false, + responseStream: false, + requestType: band_tunnel_v1beta1_tx_pb.MsgUpdateParams, + responseType: band_tunnel_v1beta1_tx_pb.MsgUpdateParamsResponse +}; + +exports.Msg = Msg; + +function MsgClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MsgClient.prototype.createTunnel = function createTunnel(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.CreateTunnel, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.updateAndResetTunnel = function updateAndResetTunnel(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateAndResetTunnel, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.activate = function activate(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.Activate, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.deactivate = function deactivate(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.Deactivate, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.triggerTunnel = function triggerTunnel(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.TriggerTunnel, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.depositToTunnel = function depositToTunnel(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.DepositToTunnel, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.withdrawFromTunnel = function withdrawFromTunnel(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.WithdrawFromTunnel, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.updateParams = function updateParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MsgClient = MsgClient; + diff --git a/codegen/capability/v1/capability.ts b/codegen/capability/v1/capability.ts new file mode 100644 index 0000000..1cb5a49 --- /dev/null +++ b/codegen/capability/v1/capability.ts @@ -0,0 +1,234 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: capability/v1/capability.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as dependency_2 from "./../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace capability.v1 { + export class Capability extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + index?: 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 ("index" in data && data.index != undefined) { + this.index = data.index; + } + } + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + index?: number; + }): Capability { + const message = new Capability({}); + if (data.index != null) { + message.index = data.index; + } + return message; + } + toObject() { + const data: { + index?: number; + } = {}; + if (this.index != null) { + data.index = this.index; + } + 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.index != 0) + writer.writeUint64(1, this.index); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Capability { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Capability(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.index = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Capability { + return Capability.deserialize(bytes); + } + } + export class Owner extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + module?: string; + name?: 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 ("module" in data && data.module != undefined) { + this.module = data.module; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + } + } + get module() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set module(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + module?: string; + name?: string; + }): Owner { + const message = new Owner({}); + if (data.module != null) { + message.module = data.module; + } + if (data.name != null) { + message.name = data.name; + } + return message; + } + toObject() { + const data: { + module?: string; + name?: string; + } = {}; + if (this.module != null) { + data.module = this.module; + } + if (this.name != null) { + data.name = this.name; + } + 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.module.length) + writer.writeString(1, this.module); + if (this.name.length) + writer.writeString(2, this.name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Owner { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Owner(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.module = reader.readString(); + break; + case 2: + message.name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Owner { + return Owner.deserialize(bytes); + } + } + export class CapabilityOwners extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + owners?: Owner[]; + }) { + 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 ("owners" in data && data.owners != undefined) { + this.owners = data.owners; + } + } + } + get owners() { + return pb_1.Message.getRepeatedWrapperField(this, Owner, 1) as Owner[]; + } + set owners(value: Owner[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + owners?: ReturnType[]; + }): CapabilityOwners { + const message = new CapabilityOwners({}); + if (data.owners != null) { + message.owners = data.owners.map(item => Owner.fromObject(item)); + } + return message; + } + toObject() { + const data: { + owners?: ReturnType[]; + } = {}; + if (this.owners != null) { + data.owners = this.owners.map((item: Owner) => item.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.owners.length) + writer.writeRepeatedMessage(1, this.owners, (item: Owner) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CapabilityOwners { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CapabilityOwners(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.owners, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Owner.deserialize(reader), Owner)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CapabilityOwners { + return CapabilityOwners.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/capability/v1beta1/capability_pb.d.ts b/codegen/capability/v1/capability_pb.d.ts similarity index 92% rename from proto/cosmos/capability/v1beta1/capability_pb.d.ts rename to codegen/capability/v1/capability_pb.d.ts index 92125bb..dff5b51 100644 --- a/proto/cosmos/capability/v1beta1/capability_pb.d.ts +++ b/codegen/capability/v1/capability_pb.d.ts @@ -1,9 +1,9 @@ -// package: cosmos.capability.v1beta1 -// file: cosmos/capability/v1beta1/capability.proto +// package: capability.v1 +// file: capability/v1/capability.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; -import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as amino_amino_pb from "../../amino/amino_pb"; export class Capability extends jspb.Message { getIndex(): number; diff --git a/proto/cosmos/capability/v1beta1/capability_pb.js b/codegen/capability/v1/capability_pb.js similarity index 59% rename from proto/cosmos/capability/v1beta1/capability_pb.js rename to codegen/capability/v1/capability_pb.js index 23e9564..3c02c5b 100644 --- a/proto/cosmos/capability/v1beta1/capability_pb.js +++ b/codegen/capability/v1/capability_pb.js @@ -1,4 +1,4 @@ -// source: cosmos/capability/v1beta1/capability.proto +// source: capability/v1/capability.proto /** * @fileoverview * @enhanceable @@ -15,13 +15,13 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -var amino_amino_pb = require('../../../amino/amino_pb.js'); +var amino_amino_pb = require('../../amino/amino_pb.js'); goog.object.extend(proto, amino_amino_pb); -goog.exportSymbol('proto.cosmos.capability.v1beta1.Capability', null, global); -goog.exportSymbol('proto.cosmos.capability.v1beta1.CapabilityOwners', null, global); -goog.exportSymbol('proto.cosmos.capability.v1beta1.Owner', null, global); +goog.exportSymbol('proto.capability.v1.Capability', null, global); +goog.exportSymbol('proto.capability.v1.CapabilityOwners', null, global); +goog.exportSymbol('proto.capability.v1.Owner', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,16 +32,16 @@ goog.exportSymbol('proto.cosmos.capability.v1beta1.Owner', null, global); * @extends {jspb.Message} * @constructor */ -proto.cosmos.capability.v1beta1.Capability = function(opt_data) { +proto.capability.v1.Capability = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.capability.v1beta1.Capability, jspb.Message); +goog.inherits(proto.capability.v1.Capability, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.capability.v1beta1.Capability.displayName = 'proto.cosmos.capability.v1beta1.Capability'; + proto.capability.v1.Capability.displayName = 'proto.capability.v1.Capability'; } /** * Generated by JsPbCodeGenerator. @@ -53,16 +53,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.cosmos.capability.v1beta1.Owner = function(opt_data) { +proto.capability.v1.Owner = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.capability.v1beta1.Owner, jspb.Message); +goog.inherits(proto.capability.v1.Owner, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.capability.v1beta1.Owner.displayName = 'proto.cosmos.capability.v1beta1.Owner'; + proto.capability.v1.Owner.displayName = 'proto.capability.v1.Owner'; } /** * Generated by JsPbCodeGenerator. @@ -74,16 +74,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.cosmos.capability.v1beta1.CapabilityOwners = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.capability.v1beta1.CapabilityOwners.repeatedFields_, null); +proto.capability.v1.CapabilityOwners = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.capability.v1.CapabilityOwners.repeatedFields_, null); }; -goog.inherits(proto.cosmos.capability.v1beta1.CapabilityOwners, jspb.Message); +goog.inherits(proto.capability.v1.CapabilityOwners, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.capability.v1beta1.CapabilityOwners.displayName = 'proto.cosmos.capability.v1beta1.CapabilityOwners'; + proto.capability.v1.CapabilityOwners.displayName = 'proto.capability.v1.CapabilityOwners'; } @@ -101,8 +101,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.capability.v1beta1.Capability.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.capability.v1beta1.Capability.toObject(opt_includeInstance, this); +proto.capability.v1.Capability.prototype.toObject = function(opt_includeInstance) { + return proto.capability.v1.Capability.toObject(opt_includeInstance, this); }; @@ -111,11 +111,11 @@ proto.cosmos.capability.v1beta1.Capability.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.capability.v1beta1.Capability} msg The msg instance to transform. + * @param {!proto.capability.v1.Capability} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.Capability.toObject = function(includeInstance, msg) { +proto.capability.v1.Capability.toObject = function(includeInstance, msg) { var f, obj = { index: jspb.Message.getFieldWithDefault(msg, 1, 0) }; @@ -131,23 +131,23 @@ proto.cosmos.capability.v1beta1.Capability.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.capability.v1beta1.Capability} + * @return {!proto.capability.v1.Capability} */ -proto.cosmos.capability.v1beta1.Capability.deserializeBinary = function(bytes) { +proto.capability.v1.Capability.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.capability.v1beta1.Capability; - return proto.cosmos.capability.v1beta1.Capability.deserializeBinaryFromReader(msg, reader); + var msg = new proto.capability.v1.Capability; + return proto.capability.v1.Capability.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.capability.v1beta1.Capability} msg The message object to deserialize into. + * @param {!proto.capability.v1.Capability} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.capability.v1beta1.Capability} + * @return {!proto.capability.v1.Capability} */ -proto.cosmos.capability.v1beta1.Capability.deserializeBinaryFromReader = function(msg, reader) { +proto.capability.v1.Capability.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -171,9 +171,9 @@ proto.cosmos.capability.v1beta1.Capability.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.capability.v1beta1.Capability.prototype.serializeBinary = function() { +proto.capability.v1.Capability.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.capability.v1beta1.Capability.serializeBinaryToWriter(this, writer); + proto.capability.v1.Capability.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -181,11 +181,11 @@ proto.cosmos.capability.v1beta1.Capability.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.capability.v1beta1.Capability} message + * @param {!proto.capability.v1.Capability} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.Capability.serializeBinaryToWriter = function(message, writer) { +proto.capability.v1.Capability.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIndex(); if (f !== 0) { @@ -201,16 +201,16 @@ proto.cosmos.capability.v1beta1.Capability.serializeBinaryToWriter = function(me * optional uint64 index = 1; * @return {number} */ -proto.cosmos.capability.v1beta1.Capability.prototype.getIndex = function() { +proto.capability.v1.Capability.prototype.getIndex = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.cosmos.capability.v1beta1.Capability} returns this + * @return {!proto.capability.v1.Capability} returns this */ -proto.cosmos.capability.v1beta1.Capability.prototype.setIndex = function(value) { +proto.capability.v1.Capability.prototype.setIndex = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -231,8 +231,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.capability.v1beta1.Owner.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.capability.v1beta1.Owner.toObject(opt_includeInstance, this); +proto.capability.v1.Owner.prototype.toObject = function(opt_includeInstance) { + return proto.capability.v1.Owner.toObject(opt_includeInstance, this); }; @@ -241,11 +241,11 @@ proto.cosmos.capability.v1beta1.Owner.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.capability.v1beta1.Owner} msg The msg instance to transform. + * @param {!proto.capability.v1.Owner} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.Owner.toObject = function(includeInstance, msg) { +proto.capability.v1.Owner.toObject = function(includeInstance, msg) { var f, obj = { module: jspb.Message.getFieldWithDefault(msg, 1, ""), name: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -262,23 +262,23 @@ proto.cosmos.capability.v1beta1.Owner.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.capability.v1beta1.Owner} + * @return {!proto.capability.v1.Owner} */ -proto.cosmos.capability.v1beta1.Owner.deserializeBinary = function(bytes) { +proto.capability.v1.Owner.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.capability.v1beta1.Owner; - return proto.cosmos.capability.v1beta1.Owner.deserializeBinaryFromReader(msg, reader); + var msg = new proto.capability.v1.Owner; + return proto.capability.v1.Owner.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.capability.v1beta1.Owner} msg The message object to deserialize into. + * @param {!proto.capability.v1.Owner} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.capability.v1beta1.Owner} + * @return {!proto.capability.v1.Owner} */ -proto.cosmos.capability.v1beta1.Owner.deserializeBinaryFromReader = function(msg, reader) { +proto.capability.v1.Owner.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -306,9 +306,9 @@ proto.cosmos.capability.v1beta1.Owner.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.capability.v1beta1.Owner.prototype.serializeBinary = function() { +proto.capability.v1.Owner.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.capability.v1beta1.Owner.serializeBinaryToWriter(this, writer); + proto.capability.v1.Owner.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -316,11 +316,11 @@ proto.cosmos.capability.v1beta1.Owner.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.capability.v1beta1.Owner} message + * @param {!proto.capability.v1.Owner} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.Owner.serializeBinaryToWriter = function(message, writer) { +proto.capability.v1.Owner.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getModule(); if (f.length > 0) { @@ -343,16 +343,16 @@ proto.cosmos.capability.v1beta1.Owner.serializeBinaryToWriter = function(message * optional string module = 1; * @return {string} */ -proto.cosmos.capability.v1beta1.Owner.prototype.getModule = function() { +proto.capability.v1.Owner.prototype.getModule = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.cosmos.capability.v1beta1.Owner} returns this + * @return {!proto.capability.v1.Owner} returns this */ -proto.cosmos.capability.v1beta1.Owner.prototype.setModule = function(value) { +proto.capability.v1.Owner.prototype.setModule = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -361,16 +361,16 @@ proto.cosmos.capability.v1beta1.Owner.prototype.setModule = function(value) { * optional string name = 2; * @return {string} */ -proto.cosmos.capability.v1beta1.Owner.prototype.getName = function() { +proto.capability.v1.Owner.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.cosmos.capability.v1beta1.Owner} returns this + * @return {!proto.capability.v1.Owner} returns this */ -proto.cosmos.capability.v1beta1.Owner.prototype.setName = function(value) { +proto.capability.v1.Owner.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -381,7 +381,7 @@ proto.cosmos.capability.v1beta1.Owner.prototype.setName = function(value) { * @private {!Array} * @const */ -proto.cosmos.capability.v1beta1.CapabilityOwners.repeatedFields_ = [1]; +proto.capability.v1.CapabilityOwners.repeatedFields_ = [1]; @@ -398,8 +398,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.capability.v1beta1.CapabilityOwners.toObject(opt_includeInstance, this); +proto.capability.v1.CapabilityOwners.prototype.toObject = function(opt_includeInstance) { + return proto.capability.v1.CapabilityOwners.toObject(opt_includeInstance, this); }; @@ -408,14 +408,14 @@ proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.toObject = function(o * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.capability.v1beta1.CapabilityOwners} msg The msg instance to transform. + * @param {!proto.capability.v1.CapabilityOwners} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.CapabilityOwners.toObject = function(includeInstance, msg) { +proto.capability.v1.CapabilityOwners.toObject = function(includeInstance, msg) { var f, obj = { ownersList: jspb.Message.toObjectList(msg.getOwnersList(), - proto.cosmos.capability.v1beta1.Owner.toObject, includeInstance) + proto.capability.v1.Owner.toObject, includeInstance) }; if (includeInstance) { @@ -429,23 +429,23 @@ proto.cosmos.capability.v1beta1.CapabilityOwners.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} + * @return {!proto.capability.v1.CapabilityOwners} */ -proto.cosmos.capability.v1beta1.CapabilityOwners.deserializeBinary = function(bytes) { +proto.capability.v1.CapabilityOwners.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.capability.v1beta1.CapabilityOwners; - return proto.cosmos.capability.v1beta1.CapabilityOwners.deserializeBinaryFromReader(msg, reader); + var msg = new proto.capability.v1.CapabilityOwners; + return proto.capability.v1.CapabilityOwners.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.capability.v1beta1.CapabilityOwners} msg The message object to deserialize into. + * @param {!proto.capability.v1.CapabilityOwners} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} + * @return {!proto.capability.v1.CapabilityOwners} */ -proto.cosmos.capability.v1beta1.CapabilityOwners.deserializeBinaryFromReader = function(msg, reader) { +proto.capability.v1.CapabilityOwners.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -453,8 +453,8 @@ proto.cosmos.capability.v1beta1.CapabilityOwners.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.cosmos.capability.v1beta1.Owner; - reader.readMessage(value,proto.cosmos.capability.v1beta1.Owner.deserializeBinaryFromReader); + var value = new proto.capability.v1.Owner; + reader.readMessage(value,proto.capability.v1.Owner.deserializeBinaryFromReader); msg.addOwners(value); break; default: @@ -470,9 +470,9 @@ proto.cosmos.capability.v1beta1.CapabilityOwners.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.serializeBinary = function() { +proto.capability.v1.CapabilityOwners.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.capability.v1beta1.CapabilityOwners.serializeBinaryToWriter(this, writer); + proto.capability.v1.CapabilityOwners.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -480,18 +480,18 @@ proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.capability.v1beta1.CapabilityOwners} message + * @param {!proto.capability.v1.CapabilityOwners} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.CapabilityOwners.serializeBinaryToWriter = function(message, writer) { +proto.capability.v1.CapabilityOwners.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOwnersList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.cosmos.capability.v1beta1.Owner.serializeBinaryToWriter + proto.capability.v1.Owner.serializeBinaryToWriter ); } }; @@ -499,40 +499,40 @@ proto.cosmos.capability.v1beta1.CapabilityOwners.serializeBinaryToWriter = funct /** * repeated Owner owners = 1; - * @return {!Array} + * @return {!Array} */ -proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.getOwnersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cosmos.capability.v1beta1.Owner, 1)); +proto.capability.v1.CapabilityOwners.prototype.getOwnersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.capability.v1.Owner, 1)); }; /** - * @param {!Array} value - * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} returns this + * @param {!Array} value + * @return {!proto.capability.v1.CapabilityOwners} returns this */ -proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.setOwnersList = function(value) { +proto.capability.v1.CapabilityOwners.prototype.setOwnersList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.cosmos.capability.v1beta1.Owner=} opt_value + * @param {!proto.capability.v1.Owner=} opt_value * @param {number=} opt_index - * @return {!proto.cosmos.capability.v1beta1.Owner} + * @return {!proto.capability.v1.Owner} */ -proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.addOwners = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.capability.v1beta1.Owner, opt_index); +proto.capability.v1.CapabilityOwners.prototype.addOwners = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.capability.v1.Owner, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} returns this + * @return {!proto.capability.v1.CapabilityOwners} returns this */ -proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.clearOwnersList = function() { +proto.capability.v1.CapabilityOwners.prototype.clearOwnersList = function() { return this.setOwnersList([]); }; -goog.object.extend(exports, proto.cosmos.capability.v1beta1); +goog.object.extend(exports, proto.capability.v1); diff --git a/codegen/capability/v1/capability_pb_service.d.ts b/codegen/capability/v1/capability_pb_service.d.ts new file mode 100644 index 0000000..ffbb6ff --- /dev/null +++ b/codegen/capability/v1/capability_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: capability.v1 +// file: capability/v1/capability.proto + diff --git a/codegen/capability/v1/capability_pb_service.js b/codegen/capability/v1/capability_pb_service.js new file mode 100644 index 0000000..ffbb6ff --- /dev/null +++ b/codegen/capability/v1/capability_pb_service.js @@ -0,0 +1,3 @@ +// package: capability.v1 +// file: capability/v1/capability.proto + diff --git a/codegen/capability/v1/genesis.ts b/codegen/capability/v1/genesis.ts new file mode 100644 index 0000000..2921970 --- /dev/null +++ b/codegen/capability/v1/genesis.ts @@ -0,0 +1,194 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: capability/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as dependency_2 from "./capability"; +import * as dependency_3 from "./../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace capability.v1 { + export class GenesisOwners extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + index?: number; + index_owners?: dependency_2.capability.v1.CapabilityOwners; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("index_owners" in data && data.index_owners != undefined) { + this.index_owners = data.index_owners; + } + } + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 1, value); + } + get index_owners() { + return pb_1.Message.getWrapperField(this, dependency_2.capability.v1.CapabilityOwners, 2) as dependency_2.capability.v1.CapabilityOwners; + } + set index_owners(value: dependency_2.capability.v1.CapabilityOwners) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_index_owners() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + index?: number; + index_owners?: ReturnType; + }): GenesisOwners { + const message = new GenesisOwners({}); + if (data.index != null) { + message.index = data.index; + } + if (data.index_owners != null) { + message.index_owners = dependency_2.capability.v1.CapabilityOwners.fromObject(data.index_owners); + } + return message; + } + toObject() { + const data: { + index?: number; + index_owners?: ReturnType; + } = {}; + if (this.index != null) { + data.index = this.index; + } + if (this.index_owners != null) { + data.index_owners = this.index_owners.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.index != 0) + writer.writeUint64(1, this.index); + if (this.has_index_owners) + writer.writeMessage(2, this.index_owners, () => this.index_owners.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisOwners { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisOwners(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.index = reader.readUint64(); + break; + case 2: + reader.readMessage(message.index_owners, () => message.index_owners = dependency_2.capability.v1.CapabilityOwners.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisOwners { + return GenesisOwners.deserialize(bytes); + } + } + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + index?: number; + owners?: GenesisOwners[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("owners" in data && data.owners != undefined) { + this.owners = data.owners; + } + } + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 1, value); + } + get owners() { + return pb_1.Message.getRepeatedWrapperField(this, GenesisOwners, 2) as GenesisOwners[]; + } + set owners(value: GenesisOwners[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + index?: number; + owners?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.index != null) { + message.index = data.index; + } + if (data.owners != null) { + message.owners = data.owners.map(item => GenesisOwners.fromObject(item)); + } + return message; + } + toObject() { + const data: { + index?: number; + owners?: ReturnType[]; + } = {}; + if (this.index != null) { + data.index = this.index; + } + if (this.owners != null) { + data.owners = this.owners.map((item: GenesisOwners) => item.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.index != 0) + writer.writeUint64(1, this.index); + if (this.owners.length) + writer.writeRepeatedMessage(2, this.owners, (item: GenesisOwners) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.index = reader.readUint64(); + break; + case 2: + reader.readMessage(message.owners, () => pb_1.Message.addToRepeatedWrapperField(message, 2, GenesisOwners.deserialize(reader), GenesisOwners)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/capability/v1beta1/genesis_pb.d.ts b/codegen/capability/v1/genesis_pb.d.ts similarity index 76% rename from proto/cosmos/capability/v1beta1/genesis_pb.d.ts rename to codegen/capability/v1/genesis_pb.d.ts index 81db8e6..d3b7034 100644 --- a/proto/cosmos/capability/v1beta1/genesis_pb.d.ts +++ b/codegen/capability/v1/genesis_pb.d.ts @@ -1,10 +1,10 @@ -// package: cosmos.capability.v1beta1 -// file: cosmos/capability/v1beta1/genesis.proto +// package: capability.v1 +// file: capability/v1/genesis.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; -import * as cosmos_capability_v1beta1_capability_pb from "../../../cosmos/capability/v1beta1/capability_pb"; -import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as capability_v1_capability_pb from "../../capability/v1/capability_pb"; +import * as amino_amino_pb from "../../amino/amino_pb"; export class GenesisOwners extends jspb.Message { getIndex(): number; @@ -12,8 +12,8 @@ export class GenesisOwners extends jspb.Message { hasIndexOwners(): boolean; clearIndexOwners(): void; - getIndexOwners(): cosmos_capability_v1beta1_capability_pb.CapabilityOwners | undefined; - setIndexOwners(value?: cosmos_capability_v1beta1_capability_pb.CapabilityOwners): void; + getIndexOwners(): capability_v1_capability_pb.CapabilityOwners | undefined; + setIndexOwners(value?: capability_v1_capability_pb.CapabilityOwners): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GenesisOwners.AsObject; @@ -28,7 +28,7 @@ export class GenesisOwners extends jspb.Message { export namespace GenesisOwners { export type AsObject = { index: number, - indexOwners?: cosmos_capability_v1beta1_capability_pb.CapabilityOwners.AsObject, + indexOwners?: capability_v1_capability_pb.CapabilityOwners.AsObject, } } diff --git a/proto/cosmos/capability/v1beta1/genesis_pb.js b/codegen/capability/v1/genesis_pb.js similarity index 53% rename from proto/cosmos/capability/v1beta1/genesis_pb.js rename to codegen/capability/v1/genesis_pb.js index 6e240e2..3a6abb3 100644 --- a/proto/cosmos/capability/v1beta1/genesis_pb.js +++ b/codegen/capability/v1/genesis_pb.js @@ -1,4 +1,4 @@ -// source: cosmos/capability/v1beta1/genesis.proto +// source: capability/v1/genesis.proto /** * @fileoverview * @enhanceable @@ -15,14 +15,14 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -var cosmos_capability_v1beta1_capability_pb = require('../../../cosmos/capability/v1beta1/capability_pb.js'); -goog.object.extend(proto, cosmos_capability_v1beta1_capability_pb); -var amino_amino_pb = require('../../../amino/amino_pb.js'); +var capability_v1_capability_pb = require('../../capability/v1/capability_pb.js'); +goog.object.extend(proto, capability_v1_capability_pb); +var amino_amino_pb = require('../../amino/amino_pb.js'); goog.object.extend(proto, amino_amino_pb); -goog.exportSymbol('proto.cosmos.capability.v1beta1.GenesisOwners', null, global); -goog.exportSymbol('proto.cosmos.capability.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.capability.v1.GenesisOwners', null, global); +goog.exportSymbol('proto.capability.v1.GenesisState', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -33,16 +33,16 @@ goog.exportSymbol('proto.cosmos.capability.v1beta1.GenesisState', null, global); * @extends {jspb.Message} * @constructor */ -proto.cosmos.capability.v1beta1.GenesisOwners = function(opt_data) { +proto.capability.v1.GenesisOwners = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.capability.v1beta1.GenesisOwners, jspb.Message); +goog.inherits(proto.capability.v1.GenesisOwners, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.capability.v1beta1.GenesisOwners.displayName = 'proto.cosmos.capability.v1beta1.GenesisOwners'; + proto.capability.v1.GenesisOwners.displayName = 'proto.capability.v1.GenesisOwners'; } /** * Generated by JsPbCodeGenerator. @@ -54,16 +54,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.cosmos.capability.v1beta1.GenesisState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.capability.v1beta1.GenesisState.repeatedFields_, null); +proto.capability.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.capability.v1.GenesisState.repeatedFields_, null); }; -goog.inherits(proto.cosmos.capability.v1beta1.GenesisState, jspb.Message); +goog.inherits(proto.capability.v1.GenesisState, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.capability.v1beta1.GenesisState.displayName = 'proto.cosmos.capability.v1beta1.GenesisState'; + proto.capability.v1.GenesisState.displayName = 'proto.capability.v1.GenesisState'; } @@ -81,8 +81,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.capability.v1beta1.GenesisOwners.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.capability.v1beta1.GenesisOwners.toObject(opt_includeInstance, this); +proto.capability.v1.GenesisOwners.prototype.toObject = function(opt_includeInstance) { + return proto.capability.v1.GenesisOwners.toObject(opt_includeInstance, this); }; @@ -91,14 +91,14 @@ proto.cosmos.capability.v1beta1.GenesisOwners.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.capability.v1beta1.GenesisOwners} msg The msg instance to transform. + * @param {!proto.capability.v1.GenesisOwners} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.GenesisOwners.toObject = function(includeInstance, msg) { +proto.capability.v1.GenesisOwners.toObject = function(includeInstance, msg) { var f, obj = { index: jspb.Message.getFieldWithDefault(msg, 1, 0), - indexOwners: (f = msg.getIndexOwners()) && cosmos_capability_v1beta1_capability_pb.CapabilityOwners.toObject(includeInstance, f) + indexOwners: (f = msg.getIndexOwners()) && capability_v1_capability_pb.CapabilityOwners.toObject(includeInstance, f) }; if (includeInstance) { @@ -112,23 +112,23 @@ proto.cosmos.capability.v1beta1.GenesisOwners.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} + * @return {!proto.capability.v1.GenesisOwners} */ -proto.cosmos.capability.v1beta1.GenesisOwners.deserializeBinary = function(bytes) { +proto.capability.v1.GenesisOwners.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.capability.v1beta1.GenesisOwners; - return proto.cosmos.capability.v1beta1.GenesisOwners.deserializeBinaryFromReader(msg, reader); + var msg = new proto.capability.v1.GenesisOwners; + return proto.capability.v1.GenesisOwners.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.capability.v1beta1.GenesisOwners} msg The message object to deserialize into. + * @param {!proto.capability.v1.GenesisOwners} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} + * @return {!proto.capability.v1.GenesisOwners} */ -proto.cosmos.capability.v1beta1.GenesisOwners.deserializeBinaryFromReader = function(msg, reader) { +proto.capability.v1.GenesisOwners.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -140,8 +140,8 @@ proto.cosmos.capability.v1beta1.GenesisOwners.deserializeBinaryFromReader = func msg.setIndex(value); break; case 2: - var value = new cosmos_capability_v1beta1_capability_pb.CapabilityOwners; - reader.readMessage(value,cosmos_capability_v1beta1_capability_pb.CapabilityOwners.deserializeBinaryFromReader); + var value = new capability_v1_capability_pb.CapabilityOwners; + reader.readMessage(value,capability_v1_capability_pb.CapabilityOwners.deserializeBinaryFromReader); msg.setIndexOwners(value); break; default: @@ -157,9 +157,9 @@ proto.cosmos.capability.v1beta1.GenesisOwners.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.capability.v1beta1.GenesisOwners.prototype.serializeBinary = function() { +proto.capability.v1.GenesisOwners.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.capability.v1beta1.GenesisOwners.serializeBinaryToWriter(this, writer); + proto.capability.v1.GenesisOwners.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -167,11 +167,11 @@ proto.cosmos.capability.v1beta1.GenesisOwners.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.capability.v1beta1.GenesisOwners} message + * @param {!proto.capability.v1.GenesisOwners} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.GenesisOwners.serializeBinaryToWriter = function(message, writer) { +proto.capability.v1.GenesisOwners.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIndex(); if (f !== 0) { @@ -185,7 +185,7 @@ proto.cosmos.capability.v1beta1.GenesisOwners.serializeBinaryToWriter = function writer.writeMessage( 2, f, - cosmos_capability_v1beta1_capability_pb.CapabilityOwners.serializeBinaryToWriter + capability_v1_capability_pb.CapabilityOwners.serializeBinaryToWriter ); } }; @@ -195,44 +195,44 @@ proto.cosmos.capability.v1beta1.GenesisOwners.serializeBinaryToWriter = function * optional uint64 index = 1; * @return {number} */ -proto.cosmos.capability.v1beta1.GenesisOwners.prototype.getIndex = function() { +proto.capability.v1.GenesisOwners.prototype.getIndex = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} returns this + * @return {!proto.capability.v1.GenesisOwners} returns this */ -proto.cosmos.capability.v1beta1.GenesisOwners.prototype.setIndex = function(value) { +proto.capability.v1.GenesisOwners.prototype.setIndex = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional CapabilityOwners index_owners = 2; - * @return {?proto.cosmos.capability.v1beta1.CapabilityOwners} + * @return {?proto.capability.v1.CapabilityOwners} */ -proto.cosmos.capability.v1beta1.GenesisOwners.prototype.getIndexOwners = function() { - return /** @type{?proto.cosmos.capability.v1beta1.CapabilityOwners} */ ( - jspb.Message.getWrapperField(this, cosmos_capability_v1beta1_capability_pb.CapabilityOwners, 2)); +proto.capability.v1.GenesisOwners.prototype.getIndexOwners = function() { + return /** @type{?proto.capability.v1.CapabilityOwners} */ ( + jspb.Message.getWrapperField(this, capability_v1_capability_pb.CapabilityOwners, 2)); }; /** - * @param {?proto.cosmos.capability.v1beta1.CapabilityOwners|undefined} value - * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} returns this + * @param {?proto.capability.v1.CapabilityOwners|undefined} value + * @return {!proto.capability.v1.GenesisOwners} returns this */ -proto.cosmos.capability.v1beta1.GenesisOwners.prototype.setIndexOwners = function(value) { +proto.capability.v1.GenesisOwners.prototype.setIndexOwners = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} returns this + * @return {!proto.capability.v1.GenesisOwners} returns this */ -proto.cosmos.capability.v1beta1.GenesisOwners.prototype.clearIndexOwners = function() { +proto.capability.v1.GenesisOwners.prototype.clearIndexOwners = function() { return this.setIndexOwners(undefined); }; @@ -241,7 +241,7 @@ proto.cosmos.capability.v1beta1.GenesisOwners.prototype.clearIndexOwners = funct * Returns whether this field is set. * @return {boolean} */ -proto.cosmos.capability.v1beta1.GenesisOwners.prototype.hasIndexOwners = function() { +proto.capability.v1.GenesisOwners.prototype.hasIndexOwners = function() { return jspb.Message.getField(this, 2) != null; }; @@ -252,7 +252,7 @@ proto.cosmos.capability.v1beta1.GenesisOwners.prototype.hasIndexOwners = functio * @private {!Array} * @const */ -proto.cosmos.capability.v1beta1.GenesisState.repeatedFields_ = [2]; +proto.capability.v1.GenesisState.repeatedFields_ = [2]; @@ -269,8 +269,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.capability.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.capability.v1beta1.GenesisState.toObject(opt_includeInstance, this); +proto.capability.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.capability.v1.GenesisState.toObject(opt_includeInstance, this); }; @@ -279,15 +279,15 @@ proto.cosmos.capability.v1beta1.GenesisState.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.capability.v1beta1.GenesisState} msg The msg instance to transform. + * @param {!proto.capability.v1.GenesisState} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.GenesisState.toObject = function(includeInstance, msg) { +proto.capability.v1.GenesisState.toObject = function(includeInstance, msg) { var f, obj = { index: jspb.Message.getFieldWithDefault(msg, 1, 0), ownersList: jspb.Message.toObjectList(msg.getOwnersList(), - proto.cosmos.capability.v1beta1.GenesisOwners.toObject, includeInstance) + proto.capability.v1.GenesisOwners.toObject, includeInstance) }; if (includeInstance) { @@ -301,23 +301,23 @@ proto.cosmos.capability.v1beta1.GenesisState.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.capability.v1beta1.GenesisState} + * @return {!proto.capability.v1.GenesisState} */ -proto.cosmos.capability.v1beta1.GenesisState.deserializeBinary = function(bytes) { +proto.capability.v1.GenesisState.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.capability.v1beta1.GenesisState; - return proto.cosmos.capability.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); + var msg = new proto.capability.v1.GenesisState; + return proto.capability.v1.GenesisState.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.capability.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!proto.capability.v1.GenesisState} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.capability.v1beta1.GenesisState} + * @return {!proto.capability.v1.GenesisState} */ -proto.cosmos.capability.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { +proto.capability.v1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -329,8 +329,8 @@ proto.cosmos.capability.v1beta1.GenesisState.deserializeBinaryFromReader = funct msg.setIndex(value); break; case 2: - var value = new proto.cosmos.capability.v1beta1.GenesisOwners; - reader.readMessage(value,proto.cosmos.capability.v1beta1.GenesisOwners.deserializeBinaryFromReader); + var value = new proto.capability.v1.GenesisOwners; + reader.readMessage(value,proto.capability.v1.GenesisOwners.deserializeBinaryFromReader); msg.addOwners(value); break; default: @@ -346,9 +346,9 @@ proto.cosmos.capability.v1beta1.GenesisState.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.capability.v1beta1.GenesisState.prototype.serializeBinary = function() { +proto.capability.v1.GenesisState.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.capability.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); + proto.capability.v1.GenesisState.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -356,11 +356,11 @@ proto.cosmos.capability.v1beta1.GenesisState.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.capability.v1beta1.GenesisState} message + * @param {!proto.capability.v1.GenesisState} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { +proto.capability.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIndex(); if (f !== 0) { @@ -374,7 +374,7 @@ proto.cosmos.capability.v1beta1.GenesisState.serializeBinaryToWriter = function( writer.writeRepeatedMessage( 2, f, - proto.cosmos.capability.v1beta1.GenesisOwners.serializeBinaryToWriter + proto.capability.v1.GenesisOwners.serializeBinaryToWriter ); } }; @@ -384,56 +384,56 @@ proto.cosmos.capability.v1beta1.GenesisState.serializeBinaryToWriter = function( * optional uint64 index = 1; * @return {number} */ -proto.cosmos.capability.v1beta1.GenesisState.prototype.getIndex = function() { +proto.capability.v1.GenesisState.prototype.getIndex = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.cosmos.capability.v1beta1.GenesisState} returns this + * @return {!proto.capability.v1.GenesisState} returns this */ -proto.cosmos.capability.v1beta1.GenesisState.prototype.setIndex = function(value) { +proto.capability.v1.GenesisState.prototype.setIndex = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * repeated GenesisOwners owners = 2; - * @return {!Array} + * @return {!Array} */ -proto.cosmos.capability.v1beta1.GenesisState.prototype.getOwnersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cosmos.capability.v1beta1.GenesisOwners, 2)); +proto.capability.v1.GenesisState.prototype.getOwnersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.capability.v1.GenesisOwners, 2)); }; /** - * @param {!Array} value - * @return {!proto.cosmos.capability.v1beta1.GenesisState} returns this + * @param {!Array} value + * @return {!proto.capability.v1.GenesisState} returns this */ -proto.cosmos.capability.v1beta1.GenesisState.prototype.setOwnersList = function(value) { +proto.capability.v1.GenesisState.prototype.setOwnersList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {!proto.cosmos.capability.v1beta1.GenesisOwners=} opt_value + * @param {!proto.capability.v1.GenesisOwners=} opt_value * @param {number=} opt_index - * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} + * @return {!proto.capability.v1.GenesisOwners} */ -proto.cosmos.capability.v1beta1.GenesisState.prototype.addOwners = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.capability.v1beta1.GenesisOwners, opt_index); +proto.capability.v1.GenesisState.prototype.addOwners = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.capability.v1.GenesisOwners, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.cosmos.capability.v1beta1.GenesisState} returns this + * @return {!proto.capability.v1.GenesisState} returns this */ -proto.cosmos.capability.v1beta1.GenesisState.prototype.clearOwnersList = function() { +proto.capability.v1.GenesisState.prototype.clearOwnersList = function() { return this.setOwnersList([]); }; -goog.object.extend(exports, proto.cosmos.capability.v1beta1); +goog.object.extend(exports, proto.capability.v1); diff --git a/codegen/capability/v1/genesis_pb_service.d.ts b/codegen/capability/v1/genesis_pb_service.d.ts new file mode 100644 index 0000000..da94fe2 --- /dev/null +++ b/codegen/capability/v1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: capability.v1 +// file: capability/v1/genesis.proto + diff --git a/codegen/capability/v1/genesis_pb_service.js b/codegen/capability/v1/genesis_pb_service.js new file mode 100644 index 0000000..da94fe2 --- /dev/null +++ b/codegen/capability/v1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: capability.v1 +// file: capability/v1/genesis.proto + diff --git a/codegen/cosmos/app/runtime/v1alpha1/module.ts b/codegen/cosmos/app/runtime/v1alpha1/module.ts new file mode 100644 index 0000000..8f735d7 --- /dev/null +++ b/codegen/cosmos/app/runtime/v1alpha1/module.ts @@ -0,0 +1,350 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/app/runtime/v1alpha1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.app.runtime.v1alpha1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + app_name?: string; + begin_blockers?: string[]; + end_blockers?: string[]; + init_genesis?: string[]; + export_genesis?: string[]; + override_store_keys?: StoreKeyConfig[]; + order_migrations?: string[]; + precommiters?: string[]; + prepare_check_staters?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4, 5, 6, 7, 8, 9], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("app_name" in data && data.app_name != undefined) { + this.app_name = data.app_name; + } + if ("begin_blockers" in data && data.begin_blockers != undefined) { + this.begin_blockers = data.begin_blockers; + } + if ("end_blockers" in data && data.end_blockers != undefined) { + this.end_blockers = data.end_blockers; + } + if ("init_genesis" in data && data.init_genesis != undefined) { + this.init_genesis = data.init_genesis; + } + if ("export_genesis" in data && data.export_genesis != undefined) { + this.export_genesis = data.export_genesis; + } + if ("override_store_keys" in data && data.override_store_keys != undefined) { + this.override_store_keys = data.override_store_keys; + } + if ("order_migrations" in data && data.order_migrations != undefined) { + this.order_migrations = data.order_migrations; + } + if ("precommiters" in data && data.precommiters != undefined) { + this.precommiters = data.precommiters; + } + if ("prepare_check_staters" in data && data.prepare_check_staters != undefined) { + this.prepare_check_staters = data.prepare_check_staters; + } + } + } + get app_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set app_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get begin_blockers() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set begin_blockers(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + get end_blockers() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set end_blockers(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + get init_genesis() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as string[]; + } + set init_genesis(value: string[]) { + pb_1.Message.setField(this, 4, value); + } + get export_genesis() { + return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; + } + set export_genesis(value: string[]) { + pb_1.Message.setField(this, 5, value); + } + get override_store_keys() { + return pb_1.Message.getRepeatedWrapperField(this, StoreKeyConfig, 6) as StoreKeyConfig[]; + } + set override_store_keys(value: StoreKeyConfig[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get order_migrations() { + return pb_1.Message.getFieldWithDefault(this, 7, []) as string[]; + } + set order_migrations(value: string[]) { + pb_1.Message.setField(this, 7, value); + } + get precommiters() { + return pb_1.Message.getFieldWithDefault(this, 8, []) as string[]; + } + set precommiters(value: string[]) { + pb_1.Message.setField(this, 8, value); + } + get prepare_check_staters() { + return pb_1.Message.getFieldWithDefault(this, 9, []) as string[]; + } + set prepare_check_staters(value: string[]) { + pb_1.Message.setField(this, 9, value); + } + static fromObject(data: { + app_name?: string; + begin_blockers?: string[]; + end_blockers?: string[]; + init_genesis?: string[]; + export_genesis?: string[]; + override_store_keys?: ReturnType[]; + order_migrations?: string[]; + precommiters?: string[]; + prepare_check_staters?: string[]; + }): Module { + const message = new Module({}); + if (data.app_name != null) { + message.app_name = data.app_name; + } + if (data.begin_blockers != null) { + message.begin_blockers = data.begin_blockers; + } + if (data.end_blockers != null) { + message.end_blockers = data.end_blockers; + } + if (data.init_genesis != null) { + message.init_genesis = data.init_genesis; + } + if (data.export_genesis != null) { + message.export_genesis = data.export_genesis; + } + if (data.override_store_keys != null) { + message.override_store_keys = data.override_store_keys.map(item => StoreKeyConfig.fromObject(item)); + } + if (data.order_migrations != null) { + message.order_migrations = data.order_migrations; + } + if (data.precommiters != null) { + message.precommiters = data.precommiters; + } + if (data.prepare_check_staters != null) { + message.prepare_check_staters = data.prepare_check_staters; + } + return message; + } + toObject() { + const data: { + app_name?: string; + begin_blockers?: string[]; + end_blockers?: string[]; + init_genesis?: string[]; + export_genesis?: string[]; + override_store_keys?: ReturnType[]; + order_migrations?: string[]; + precommiters?: string[]; + prepare_check_staters?: string[]; + } = {}; + if (this.app_name != null) { + data.app_name = this.app_name; + } + if (this.begin_blockers != null) { + data.begin_blockers = this.begin_blockers; + } + if (this.end_blockers != null) { + data.end_blockers = this.end_blockers; + } + if (this.init_genesis != null) { + data.init_genesis = this.init_genesis; + } + if (this.export_genesis != null) { + data.export_genesis = this.export_genesis; + } + if (this.override_store_keys != null) { + data.override_store_keys = this.override_store_keys.map((item: StoreKeyConfig) => item.toObject()); + } + if (this.order_migrations != null) { + data.order_migrations = this.order_migrations; + } + if (this.precommiters != null) { + data.precommiters = this.precommiters; + } + if (this.prepare_check_staters != null) { + data.prepare_check_staters = this.prepare_check_staters; + } + 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.app_name.length) + writer.writeString(1, this.app_name); + if (this.begin_blockers.length) + writer.writeRepeatedString(2, this.begin_blockers); + if (this.end_blockers.length) + writer.writeRepeatedString(3, this.end_blockers); + if (this.init_genesis.length) + writer.writeRepeatedString(4, this.init_genesis); + if (this.export_genesis.length) + writer.writeRepeatedString(5, this.export_genesis); + if (this.override_store_keys.length) + writer.writeRepeatedMessage(6, this.override_store_keys, (item: StoreKeyConfig) => item.serialize(writer)); + if (this.order_migrations.length) + writer.writeRepeatedString(7, this.order_migrations); + if (this.precommiters.length) + writer.writeRepeatedString(8, this.precommiters); + if (this.prepare_check_staters.length) + writer.writeRepeatedString(9, this.prepare_check_staters); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.app_name = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readString()); + break; + case 5: + pb_1.Message.addToRepeatedField(message, 5, reader.readString()); + break; + case 6: + reader.readMessage(message.override_store_keys, () => pb_1.Message.addToRepeatedWrapperField(message, 6, StoreKeyConfig.deserialize(reader), StoreKeyConfig)); + break; + case 7: + pb_1.Message.addToRepeatedField(message, 7, reader.readString()); + break; + case 8: + pb_1.Message.addToRepeatedField(message, 8, reader.readString()); + break; + case 9: + pb_1.Message.addToRepeatedField(message, 9, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } + export class StoreKeyConfig extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + module_name?: string; + kv_store_key?: 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 ("module_name" in data && data.module_name != undefined) { + this.module_name = data.module_name; + } + if ("kv_store_key" in data && data.kv_store_key != undefined) { + this.kv_store_key = data.kv_store_key; + } + } + } + get module_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set module_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get kv_store_key() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set kv_store_key(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + module_name?: string; + kv_store_key?: string; + }): StoreKeyConfig { + const message = new StoreKeyConfig({}); + if (data.module_name != null) { + message.module_name = data.module_name; + } + if (data.kv_store_key != null) { + message.kv_store_key = data.kv_store_key; + } + return message; + } + toObject() { + const data: { + module_name?: string; + kv_store_key?: string; + } = {}; + if (this.module_name != null) { + data.module_name = this.module_name; + } + if (this.kv_store_key != null) { + data.kv_store_key = this.kv_store_key; + } + 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.module_name.length) + writer.writeString(1, this.module_name); + if (this.kv_store_key.length) + writer.writeString(2, this.kv_store_key); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StoreKeyConfig { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StoreKeyConfig(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.module_name = reader.readString(); + break; + case 2: + message.kv_store_key = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): StoreKeyConfig { + return StoreKeyConfig.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/app/runtime/v1alpha1/module_pb.d.ts b/codegen/cosmos/app/runtime/v1alpha1/module_pb.d.ts similarity index 81% rename from proto/cosmos/app/runtime/v1alpha1/module_pb.d.ts rename to codegen/cosmos/app/runtime/v1alpha1/module_pb.d.ts index adde90b..eed4993 100644 --- a/proto/cosmos/app/runtime/v1alpha1/module_pb.d.ts +++ b/codegen/cosmos/app/runtime/v1alpha1/module_pb.d.ts @@ -33,6 +33,21 @@ export class Module extends jspb.Message { setOverrideStoreKeysList(value: Array): void; addOverrideStoreKeys(value?: StoreKeyConfig, index?: number): StoreKeyConfig; + clearOrderMigrationsList(): void; + getOrderMigrationsList(): Array; + setOrderMigrationsList(value: Array): void; + addOrderMigrations(value: string, index?: number): string; + + clearPrecommitersList(): void; + getPrecommitersList(): Array; + setPrecommitersList(value: Array): void; + addPrecommiters(value: string, index?: number): string; + + clearPrepareCheckStatersList(): void; + getPrepareCheckStatersList(): Array; + setPrepareCheckStatersList(value: Array): void; + addPrepareCheckStaters(value: string, index?: number): string; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Module.AsObject; static toObject(includeInstance: boolean, msg: Module): Module.AsObject; @@ -51,6 +66,9 @@ export namespace Module { initGenesisList: Array, exportGenesisList: Array, overrideStoreKeysList: Array, + orderMigrationsList: Array, + precommitersList: Array, + prepareCheckStatersList: Array, } } diff --git a/proto/cosmos/app/runtime/v1alpha1/module_pb.js b/codegen/cosmos/app/runtime/v1alpha1/module_pb.js similarity index 81% rename from proto/cosmos/app/runtime/v1alpha1/module_pb.js rename to codegen/cosmos/app/runtime/v1alpha1/module_pb.js index d399a96..4326eee 100644 --- a/proto/cosmos/app/runtime/v1alpha1/module_pb.js +++ b/codegen/cosmos/app/runtime/v1alpha1/module_pb.js @@ -67,7 +67,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.cosmos.app.runtime.v1alpha1.Module.repeatedFields_ = [2,3,4,5,6]; +proto.cosmos.app.runtime.v1alpha1.Module.repeatedFields_ = [2,3,4,5,6,7,8,9]; @@ -106,7 +106,10 @@ proto.cosmos.app.runtime.v1alpha1.Module.toObject = function(includeInstance, ms initGenesisList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, exportGenesisList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, overrideStoreKeysList: jspb.Message.toObjectList(msg.getOverrideStoreKeysList(), - proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.toObject, includeInstance) + proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.toObject, includeInstance), + orderMigrationsList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + precommitersList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, + prepareCheckStatersList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f }; if (includeInstance) { @@ -168,6 +171,18 @@ proto.cosmos.app.runtime.v1alpha1.Module.deserializeBinaryFromReader = function( reader.readMessage(value,proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.deserializeBinaryFromReader); msg.addOverrideStoreKeys(value); break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.addOrderMigrations(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.addPrecommiters(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.addPrepareCheckStaters(value); + break; default: reader.skipField(); break; @@ -240,6 +255,27 @@ proto.cosmos.app.runtime.v1alpha1.Module.serializeBinaryToWriter = function(mess proto.cosmos.app.runtime.v1alpha1.StoreKeyConfig.serializeBinaryToWriter ); } + f = message.getOrderMigrationsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 7, + f + ); + } + f = message.getPrecommitersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 8, + f + ); + } + f = message.getPrepareCheckStatersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 9, + f + ); + } }; @@ -447,6 +483,117 @@ proto.cosmos.app.runtime.v1alpha1.Module.prototype.clearOverrideStoreKeysList = }; +/** + * repeated string order_migrations = 7; + * @return {!Array} + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.getOrderMigrationsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.setOrderMigrationsList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.addOrderMigrations = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.clearOrderMigrationsList = function() { + return this.setOrderMigrationsList([]); +}; + + +/** + * repeated string precommiters = 8; + * @return {!Array} + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.getPrecommitersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.setPrecommitersList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.addPrecommiters = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.clearPrecommitersList = function() { + return this.setPrecommitersList([]); +}; + + +/** + * repeated string prepare_check_staters = 9; + * @return {!Array} + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.getPrepareCheckStatersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.setPrepareCheckStatersList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.addPrepareCheckStaters = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.app.runtime.v1alpha1.Module} returns this + */ +proto.cosmos.app.runtime.v1alpha1.Module.prototype.clearPrepareCheckStatersList = function() { + return this.setPrepareCheckStatersList([]); +}; + + diff --git a/proto/cosmos/app/runtime/v1alpha1/module_pb_service.d.ts b/codegen/cosmos/app/runtime/v1alpha1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/app/runtime/v1alpha1/module_pb_service.d.ts rename to codegen/cosmos/app/runtime/v1alpha1/module_pb_service.d.ts diff --git a/proto/cosmos/app/runtime/v1alpha1/module_pb_service.js b/codegen/cosmos/app/runtime/v1alpha1/module_pb_service.js similarity index 100% rename from proto/cosmos/app/runtime/v1alpha1/module_pb_service.js rename to codegen/cosmos/app/runtime/v1alpha1/module_pb_service.js diff --git a/codegen/cosmos/app/v1alpha1/config.ts b/codegen/cosmos/app/v1alpha1/config.ts new file mode 100644 index 0000000..31199cf --- /dev/null +++ b/codegen/cosmos/app/v1alpha1/config.ts @@ -0,0 +1,305 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/app/v1alpha1/config.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.app.v1alpha1 { + export class Config extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + modules?: ModuleConfig[]; + golang_bindings?: GolangBinding[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("modules" in data && data.modules != undefined) { + this.modules = data.modules; + } + if ("golang_bindings" in data && data.golang_bindings != undefined) { + this.golang_bindings = data.golang_bindings; + } + } + } + get modules() { + return pb_1.Message.getRepeatedWrapperField(this, ModuleConfig, 1) as ModuleConfig[]; + } + set modules(value: ModuleConfig[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get golang_bindings() { + return pb_1.Message.getRepeatedWrapperField(this, GolangBinding, 2) as GolangBinding[]; + } + set golang_bindings(value: GolangBinding[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + modules?: ReturnType[]; + golang_bindings?: ReturnType[]; + }): Config { + const message = new Config({}); + if (data.modules != null) { + message.modules = data.modules.map(item => ModuleConfig.fromObject(item)); + } + if (data.golang_bindings != null) { + message.golang_bindings = data.golang_bindings.map(item => GolangBinding.fromObject(item)); + } + return message; + } + toObject() { + const data: { + modules?: ReturnType[]; + golang_bindings?: ReturnType[]; + } = {}; + if (this.modules != null) { + data.modules = this.modules.map((item: ModuleConfig) => item.toObject()); + } + if (this.golang_bindings != null) { + data.golang_bindings = this.golang_bindings.map((item: GolangBinding) => item.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.modules.length) + writer.writeRepeatedMessage(1, this.modules, (item: ModuleConfig) => item.serialize(writer)); + if (this.golang_bindings.length) + writer.writeRepeatedMessage(2, this.golang_bindings, (item: GolangBinding) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Config { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Config(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.modules, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ModuleConfig.deserialize(reader), ModuleConfig)); + break; + case 2: + reader.readMessage(message.golang_bindings, () => pb_1.Message.addToRepeatedWrapperField(message, 2, GolangBinding.deserialize(reader), GolangBinding)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Config { + return Config.deserialize(bytes); + } + } + export class ModuleConfig extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + config?: dependency_1.google.protobuf.Any; + golang_bindings?: GolangBinding[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("config" in data && data.config != undefined) { + this.config = data.config; + } + if ("golang_bindings" in data && data.golang_bindings != undefined) { + this.golang_bindings = data.golang_bindings; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get config() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 2) as dependency_1.google.protobuf.Any; + } + set config(value: dependency_1.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_config() { + return pb_1.Message.getField(this, 2) != null; + } + get golang_bindings() { + return pb_1.Message.getRepeatedWrapperField(this, GolangBinding, 3) as GolangBinding[]; + } + set golang_bindings(value: GolangBinding[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + name?: string; + config?: ReturnType; + golang_bindings?: ReturnType[]; + }): ModuleConfig { + const message = new ModuleConfig({}); + if (data.name != null) { + message.name = data.name; + } + if (data.config != null) { + message.config = dependency_1.google.protobuf.Any.fromObject(data.config); + } + if (data.golang_bindings != null) { + message.golang_bindings = data.golang_bindings.map(item => GolangBinding.fromObject(item)); + } + return message; + } + toObject() { + const data: { + name?: string; + config?: ReturnType; + golang_bindings?: ReturnType[]; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.config != null) { + data.config = this.config.toObject(); + } + if (this.golang_bindings != null) { + data.golang_bindings = this.golang_bindings.map((item: GolangBinding) => item.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.name.length) + writer.writeString(1, this.name); + if (this.has_config) + writer.writeMessage(2, this.config, () => this.config.serialize(writer)); + if (this.golang_bindings.length) + writer.writeRepeatedMessage(3, this.golang_bindings, (item: GolangBinding) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModuleConfig { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModuleConfig(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + reader.readMessage(message.config, () => message.config = dependency_1.google.protobuf.Any.deserialize(reader)); + break; + case 3: + reader.readMessage(message.golang_bindings, () => pb_1.Message.addToRepeatedWrapperField(message, 3, GolangBinding.deserialize(reader), GolangBinding)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ModuleConfig { + return ModuleConfig.deserialize(bytes); + } + } + export class GolangBinding extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + interface_type?: string; + implementation?: 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 ("interface_type" in data && data.interface_type != undefined) { + this.interface_type = data.interface_type; + } + if ("implementation" in data && data.implementation != undefined) { + this.implementation = data.implementation; + } + } + } + get interface_type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set interface_type(value: string) { + pb_1.Message.setField(this, 1, value); + } + get implementation() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set implementation(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + interface_type?: string; + implementation?: string; + }): GolangBinding { + const message = new GolangBinding({}); + if (data.interface_type != null) { + message.interface_type = data.interface_type; + } + if (data.implementation != null) { + message.implementation = data.implementation; + } + return message; + } + toObject() { + const data: { + interface_type?: string; + implementation?: string; + } = {}; + if (this.interface_type != null) { + data.interface_type = this.interface_type; + } + if (this.implementation != null) { + data.implementation = this.implementation; + } + 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.interface_type.length) + writer.writeString(1, this.interface_type); + if (this.implementation.length) + writer.writeString(2, this.implementation); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GolangBinding { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GolangBinding(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.interface_type = reader.readString(); + break; + case 2: + message.implementation = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GolangBinding { + return GolangBinding.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/app/v1alpha1/config_pb.d.ts b/codegen/cosmos/app/v1alpha1/config_pb.d.ts similarity index 100% rename from proto/cosmos/app/v1alpha1/config_pb.d.ts rename to codegen/cosmos/app/v1alpha1/config_pb.d.ts diff --git a/proto/cosmos/app/v1alpha1/config_pb.js b/codegen/cosmos/app/v1alpha1/config_pb.js similarity index 100% rename from proto/cosmos/app/v1alpha1/config_pb.js rename to codegen/cosmos/app/v1alpha1/config_pb.js diff --git a/proto/cosmos/app/v1alpha1/config_pb_service.d.ts b/codegen/cosmos/app/v1alpha1/config_pb_service.d.ts similarity index 100% rename from proto/cosmos/app/v1alpha1/config_pb_service.d.ts rename to codegen/cosmos/app/v1alpha1/config_pb_service.d.ts diff --git a/proto/cosmos/app/v1alpha1/config_pb_service.js b/codegen/cosmos/app/v1alpha1/config_pb_service.js similarity index 100% rename from proto/cosmos/app/v1alpha1/config_pb_service.js rename to codegen/cosmos/app/v1alpha1/config_pb_service.js diff --git a/codegen/cosmos/app/v1alpha1/module.ts b/codegen/cosmos/app/v1alpha1/module.ts new file mode 100644 index 0000000..50de51f --- /dev/null +++ b/codegen/cosmos/app/v1alpha1/module.ts @@ -0,0 +1,279 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/app/v1alpha1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/descriptor"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.app.v1alpha1 { + export class ModuleDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + go_import?: string; + use_package?: PackageReference[]; + can_migrate_from?: MigrateFromInfo[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("go_import" in data && data.go_import != undefined) { + this.go_import = data.go_import; + } + if ("use_package" in data && data.use_package != undefined) { + this.use_package = data.use_package; + } + if ("can_migrate_from" in data && data.can_migrate_from != undefined) { + this.can_migrate_from = data.can_migrate_from; + } + } + } + get go_import() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set go_import(value: string) { + pb_1.Message.setField(this, 1, value); + } + get use_package() { + return pb_1.Message.getRepeatedWrapperField(this, PackageReference, 2) as PackageReference[]; + } + set use_package(value: PackageReference[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get can_migrate_from() { + return pb_1.Message.getRepeatedWrapperField(this, MigrateFromInfo, 3) as MigrateFromInfo[]; + } + set can_migrate_from(value: MigrateFromInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + go_import?: string; + use_package?: ReturnType[]; + can_migrate_from?: ReturnType[]; + }): ModuleDescriptor { + const message = new ModuleDescriptor({}); + if (data.go_import != null) { + message.go_import = data.go_import; + } + if (data.use_package != null) { + message.use_package = data.use_package.map(item => PackageReference.fromObject(item)); + } + if (data.can_migrate_from != null) { + message.can_migrate_from = data.can_migrate_from.map(item => MigrateFromInfo.fromObject(item)); + } + return message; + } + toObject() { + const data: { + go_import?: string; + use_package?: ReturnType[]; + can_migrate_from?: ReturnType[]; + } = {}; + if (this.go_import != null) { + data.go_import = this.go_import; + } + if (this.use_package != null) { + data.use_package = this.use_package.map((item: PackageReference) => item.toObject()); + } + if (this.can_migrate_from != null) { + data.can_migrate_from = this.can_migrate_from.map((item: MigrateFromInfo) => item.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.go_import.length) + writer.writeString(1, this.go_import); + if (this.use_package.length) + writer.writeRepeatedMessage(2, this.use_package, (item: PackageReference) => item.serialize(writer)); + if (this.can_migrate_from.length) + writer.writeRepeatedMessage(3, this.can_migrate_from, (item: MigrateFromInfo) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModuleDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModuleDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.go_import = reader.readString(); + break; + case 2: + reader.readMessage(message.use_package, () => pb_1.Message.addToRepeatedWrapperField(message, 2, PackageReference.deserialize(reader), PackageReference)); + break; + case 3: + reader.readMessage(message.can_migrate_from, () => pb_1.Message.addToRepeatedWrapperField(message, 3, MigrateFromInfo.deserialize(reader), MigrateFromInfo)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ModuleDescriptor { + return ModuleDescriptor.deserialize(bytes); + } + } + export class PackageReference extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + revision?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("revision" in data && data.revision != undefined) { + this.revision = data.revision; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get revision() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set revision(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + name?: string; + revision?: number; + }): PackageReference { + const message = new PackageReference({}); + if (data.name != null) { + message.name = data.name; + } + if (data.revision != null) { + message.revision = data.revision; + } + return message; + } + toObject() { + const data: { + name?: string; + revision?: number; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.revision != null) { + data.revision = this.revision; + } + 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.name.length) + writer.writeString(1, this.name); + if (this.revision != 0) + writer.writeUint32(2, this.revision); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PackageReference { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PackageReference(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.revision = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PackageReference { + return PackageReference.deserialize(bytes); + } + } + export class MigrateFromInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + module?: 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 ("module" in data && data.module != undefined) { + this.module = data.module; + } + } + } + get module() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set module(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + module?: string; + }): MigrateFromInfo { + const message = new MigrateFromInfo({}); + if (data.module != null) { + message.module = data.module; + } + return message; + } + toObject() { + const data: { + module?: string; + } = {}; + if (this.module != null) { + data.module = this.module; + } + 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.module.length) + writer.writeString(1, this.module); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MigrateFromInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MigrateFromInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.module = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MigrateFromInfo { + return MigrateFromInfo.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/app/v1alpha1/module_pb.d.ts b/codegen/cosmos/app/v1alpha1/module_pb.d.ts similarity index 100% rename from proto/cosmos/app/v1alpha1/module_pb.d.ts rename to codegen/cosmos/app/v1alpha1/module_pb.d.ts diff --git a/proto/cosmos/app/v1alpha1/module_pb.js b/codegen/cosmos/app/v1alpha1/module_pb.js similarity index 100% rename from proto/cosmos/app/v1alpha1/module_pb.js rename to codegen/cosmos/app/v1alpha1/module_pb.js diff --git a/proto/cosmos/app/v1alpha1/module_pb_service.d.ts b/codegen/cosmos/app/v1alpha1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/app/v1alpha1/module_pb_service.d.ts rename to codegen/cosmos/app/v1alpha1/module_pb_service.d.ts diff --git a/proto/cosmos/app/v1alpha1/module_pb_service.js b/codegen/cosmos/app/v1alpha1/module_pb_service.js similarity index 100% rename from proto/cosmos/app/v1alpha1/module_pb_service.js rename to codegen/cosmos/app/v1alpha1/module_pb_service.js diff --git a/codegen/cosmos/app/v1alpha1/query.ts b/codegen/cosmos/app/v1alpha1/query.ts new file mode 100644 index 0000000..3ce0fdb --- /dev/null +++ b/codegen/cosmos/app/v1alpha1/query.ts @@ -0,0 +1,167 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/app/v1alpha1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./config"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.app.v1alpha1 { + export class QueryConfigRequest 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: {}): QueryConfigRequest { + const message = new QueryConfigRequest({}); + 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): QueryConfigRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConfigRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConfigRequest { + return QueryConfigRequest.deserialize(bytes); + } + } + export class QueryConfigResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + config?: dependency_1.cosmos.app.v1alpha1.Config; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("config" in data && data.config != undefined) { + this.config = data.config; + } + } + } + get config() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.app.v1alpha1.Config, 1) as dependency_1.cosmos.app.v1alpha1.Config; + } + set config(value: dependency_1.cosmos.app.v1alpha1.Config) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_config() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + config?: ReturnType; + }): QueryConfigResponse { + const message = new QueryConfigResponse({}); + if (data.config != null) { + message.config = dependency_1.cosmos.app.v1alpha1.Config.fromObject(data.config); + } + return message; + } + toObject() { + const data: { + config?: ReturnType; + } = {}; + if (this.config != null) { + data.config = this.config.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_config) + writer.writeMessage(1, this.config, () => this.config.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConfigResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConfigResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.config, () => message.config = dependency_1.cosmos.app.v1alpha1.Config.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConfigResponse { + return QueryConfigResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Config: { + path: "/cosmos.app.v1alpha1.Query/Config", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConfigRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConfigRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConfigResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConfigResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Config(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Config: GrpcUnaryServiceInterface = (message: QueryConfigRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Config(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/app/v1alpha1/query_pb.d.ts b/codegen/cosmos/app/v1alpha1/query_pb.d.ts similarity index 100% rename from proto/cosmos/app/v1alpha1/query_pb.d.ts rename to codegen/cosmos/app/v1alpha1/query_pb.d.ts diff --git a/proto/cosmos/app/v1alpha1/query_pb.js b/codegen/cosmos/app/v1alpha1/query_pb.js similarity index 100% rename from proto/cosmos/app/v1alpha1/query_pb.js rename to codegen/cosmos/app/v1alpha1/query_pb.js diff --git a/proto/cosmos/app/v1alpha1/query_pb_service.d.ts b/codegen/cosmos/app/v1alpha1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/app/v1alpha1/query_pb_service.d.ts rename to codegen/cosmos/app/v1alpha1/query_pb_service.d.ts diff --git a/proto/cosmos/app/v1alpha1/query_pb_service.js b/codegen/cosmos/app/v1alpha1/query_pb_service.js similarity index 100% rename from proto/cosmos/app/v1alpha1/query_pb_service.js rename to codegen/cosmos/app/v1alpha1/query_pb_service.js diff --git a/codegen/cosmos/auth/module/v1/module.ts b/codegen/cosmos/auth/module/v1/module.ts new file mode 100644 index 0000000..80810a0 --- /dev/null +++ b/codegen/cosmos/auth/module/v1/module.ts @@ -0,0 +1,212 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/auth/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.auth.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + bech32_prefix?: string; + module_account_permissions?: ModuleAccountPermission[]; + authority?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("bech32_prefix" in data && data.bech32_prefix != undefined) { + this.bech32_prefix = data.bech32_prefix; + } + if ("module_account_permissions" in data && data.module_account_permissions != undefined) { + this.module_account_permissions = data.module_account_permissions; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get bech32_prefix() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set bech32_prefix(value: string) { + pb_1.Message.setField(this, 1, value); + } + get module_account_permissions() { + return pb_1.Message.getRepeatedWrapperField(this, ModuleAccountPermission, 2) as ModuleAccountPermission[]; + } + set module_account_permissions(value: ModuleAccountPermission[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + bech32_prefix?: string; + module_account_permissions?: ReturnType[]; + authority?: string; + }): Module { + const message = new Module({}); + if (data.bech32_prefix != null) { + message.bech32_prefix = data.bech32_prefix; + } + if (data.module_account_permissions != null) { + message.module_account_permissions = data.module_account_permissions.map(item => ModuleAccountPermission.fromObject(item)); + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + bech32_prefix?: string; + module_account_permissions?: ReturnType[]; + authority?: string; + } = {}; + if (this.bech32_prefix != null) { + data.bech32_prefix = this.bech32_prefix; + } + if (this.module_account_permissions != null) { + data.module_account_permissions = this.module_account_permissions.map((item: ModuleAccountPermission) => item.toObject()); + } + if (this.authority != null) { + data.authority = this.authority; + } + 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.bech32_prefix.length) + writer.writeString(1, this.bech32_prefix); + if (this.module_account_permissions.length) + writer.writeRepeatedMessage(2, this.module_account_permissions, (item: ModuleAccountPermission) => item.serialize(writer)); + if (this.authority.length) + writer.writeString(3, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.bech32_prefix = reader.readString(); + break; + case 2: + reader.readMessage(message.module_account_permissions, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ModuleAccountPermission.deserialize(reader), ModuleAccountPermission)); + break; + case 3: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } + export class ModuleAccountPermission extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + account?: string; + permissions?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("account" in data && data.account != undefined) { + this.account = data.account; + } + if ("permissions" in data && data.permissions != undefined) { + this.permissions = data.permissions; + } + } + } + get account() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set account(value: string) { + pb_1.Message.setField(this, 1, value); + } + get permissions() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set permissions(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + account?: string; + permissions?: string[]; + }): ModuleAccountPermission { + const message = new ModuleAccountPermission({}); + if (data.account != null) { + message.account = data.account; + } + if (data.permissions != null) { + message.permissions = data.permissions; + } + return message; + } + toObject() { + const data: { + account?: string; + permissions?: string[]; + } = {}; + if (this.account != null) { + data.account = this.account; + } + if (this.permissions != null) { + data.permissions = this.permissions; + } + 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.account.length) + writer.writeString(1, this.account); + if (this.permissions.length) + writer.writeRepeatedString(2, this.permissions); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModuleAccountPermission { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModuleAccountPermission(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.account = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ModuleAccountPermission { + return ModuleAccountPermission.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/auth/module/v1/module_pb.d.ts b/codegen/cosmos/auth/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/auth/module/v1/module_pb.d.ts rename to codegen/cosmos/auth/module/v1/module_pb.d.ts diff --git a/proto/cosmos/auth/module/v1/module_pb.js b/codegen/cosmos/auth/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/auth/module/v1/module_pb.js rename to codegen/cosmos/auth/module/v1/module_pb.js diff --git a/proto/cosmos/auth/module/v1/module_pb_service.d.ts b/codegen/cosmos/auth/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/auth/module/v1/module_pb_service.d.ts rename to codegen/cosmos/auth/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/auth/module/v1/module_pb_service.js b/codegen/cosmos/auth/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/auth/module/v1/module_pb_service.js rename to codegen/cosmos/auth/module/v1/module_pb_service.js diff --git a/codegen/cosmos/auth/v1beta1/auth.ts b/codegen/cosmos/auth/v1beta1/auth.ts new file mode 100644 index 0000000..14ffb4c --- /dev/null +++ b/codegen/cosmos/auth/v1beta1/auth.ts @@ -0,0 +1,516 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/auth/v1beta1/auth.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../../gogoproto/gogo"; +import * as dependency_4 from "./../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.auth.v1beta1 { + export class BaseAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + pub_key?: dependency_4.google.protobuf.Any; + account_number?: number; + sequence?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("account_number" in data && data.account_number != undefined) { + this.account_number = data.account_number; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pub_key() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set pub_key(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pub_key() { + return pb_1.Message.getField(this, 2) != null; + } + get account_number() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set account_number(value: number) { + pb_1.Message.setField(this, 3, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + address?: string; + pub_key?: ReturnType; + account_number?: number; + sequence?: number; + }): BaseAccount { + const message = new BaseAccount({}); + if (data.address != null) { + message.address = data.address; + } + if (data.pub_key != null) { + message.pub_key = dependency_4.google.protobuf.Any.fromObject(data.pub_key); + } + if (data.account_number != null) { + message.account_number = data.account_number; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + address?: string; + pub_key?: ReturnType; + account_number?: number; + sequence?: number; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.pub_key != null) { + data.pub_key = this.pub_key.toObject(); + } + if (this.account_number != null) { + data.account_number = this.account_number; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.has_pub_key) + writer.writeMessage(2, this.pub_key, () => this.pub_key.serialize(writer)); + if (this.account_number != 0) + writer.writeUint64(3, this.account_number); + if (this.sequence != 0) + writer.writeUint64(4, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BaseAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BaseAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.pub_key, () => message.pub_key = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 3: + message.account_number = reader.readUint64(); + break; + case 4: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BaseAccount { + return BaseAccount.deserialize(bytes); + } + } + export class ModuleAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + base_account?: BaseAccount; + name?: string; + permissions?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("base_account" in data && data.base_account != undefined) { + this.base_account = data.base_account; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("permissions" in data && data.permissions != undefined) { + this.permissions = data.permissions; + } + } + } + get base_account() { + return pb_1.Message.getWrapperField(this, BaseAccount, 1) as BaseAccount; + } + set base_account(value: BaseAccount) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_base_account() { + return pb_1.Message.getField(this, 1) != null; + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get permissions() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set permissions(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + base_account?: ReturnType; + name?: string; + permissions?: string[]; + }): ModuleAccount { + const message = new ModuleAccount({}); + if (data.base_account != null) { + message.base_account = BaseAccount.fromObject(data.base_account); + } + if (data.name != null) { + message.name = data.name; + } + if (data.permissions != null) { + message.permissions = data.permissions; + } + return message; + } + toObject() { + const data: { + base_account?: ReturnType; + name?: string; + permissions?: string[]; + } = {}; + if (this.base_account != null) { + data.base_account = this.base_account.toObject(); + } + if (this.name != null) { + data.name = this.name; + } + if (this.permissions != null) { + data.permissions = this.permissions; + } + 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_base_account) + writer.writeMessage(1, this.base_account, () => this.base_account.serialize(writer)); + if (this.name.length) + writer.writeString(2, this.name); + if (this.permissions.length) + writer.writeRepeatedString(3, this.permissions); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModuleAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModuleAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.base_account, () => message.base_account = BaseAccount.deserialize(reader)); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ModuleAccount { + return ModuleAccount.deserialize(bytes); + } + } + export class ModuleCredential extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + module_name?: string; + derivation_keys?: Uint8Array[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("module_name" in data && data.module_name != undefined) { + this.module_name = data.module_name; + } + if ("derivation_keys" in data && data.derivation_keys != undefined) { + this.derivation_keys = data.derivation_keys; + } + } + } + get module_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set module_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get derivation_keys() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as Uint8Array[]; + } + set derivation_keys(value: Uint8Array[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + module_name?: string; + derivation_keys?: Uint8Array[]; + }): ModuleCredential { + const message = new ModuleCredential({}); + if (data.module_name != null) { + message.module_name = data.module_name; + } + if (data.derivation_keys != null) { + message.derivation_keys = data.derivation_keys; + } + return message; + } + toObject() { + const data: { + module_name?: string; + derivation_keys?: Uint8Array[]; + } = {}; + if (this.module_name != null) { + data.module_name = this.module_name; + } + if (this.derivation_keys != null) { + data.derivation_keys = this.derivation_keys; + } + 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.module_name.length) + writer.writeString(1, this.module_name); + if (this.derivation_keys.length) + writer.writeRepeatedBytes(2, this.derivation_keys); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModuleCredential { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModuleCredential(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.module_name = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ModuleCredential { + return ModuleCredential.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + max_memo_characters?: number; + tx_sig_limit?: number; + tx_size_cost_per_byte?: number; + sig_verify_cost_ed25519?: number; + sig_verify_cost_secp256k1?: 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 ("max_memo_characters" in data && data.max_memo_characters != undefined) { + this.max_memo_characters = data.max_memo_characters; + } + if ("tx_sig_limit" in data && data.tx_sig_limit != undefined) { + this.tx_sig_limit = data.tx_sig_limit; + } + if ("tx_size_cost_per_byte" in data && data.tx_size_cost_per_byte != undefined) { + this.tx_size_cost_per_byte = data.tx_size_cost_per_byte; + } + if ("sig_verify_cost_ed25519" in data && data.sig_verify_cost_ed25519 != undefined) { + this.sig_verify_cost_ed25519 = data.sig_verify_cost_ed25519; + } + if ("sig_verify_cost_secp256k1" in data && data.sig_verify_cost_secp256k1 != undefined) { + this.sig_verify_cost_secp256k1 = data.sig_verify_cost_secp256k1; + } + } + } + get max_memo_characters() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set max_memo_characters(value: number) { + pb_1.Message.setField(this, 1, value); + } + get tx_sig_limit() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set tx_sig_limit(value: number) { + pb_1.Message.setField(this, 2, value); + } + get tx_size_cost_per_byte() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set tx_size_cost_per_byte(value: number) { + pb_1.Message.setField(this, 3, value); + } + get sig_verify_cost_ed25519() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set sig_verify_cost_ed25519(value: number) { + pb_1.Message.setField(this, 4, value); + } + get sig_verify_cost_secp256k1() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set sig_verify_cost_secp256k1(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + max_memo_characters?: number; + tx_sig_limit?: number; + tx_size_cost_per_byte?: number; + sig_verify_cost_ed25519?: number; + sig_verify_cost_secp256k1?: number; + }): Params { + const message = new Params({}); + if (data.max_memo_characters != null) { + message.max_memo_characters = data.max_memo_characters; + } + if (data.tx_sig_limit != null) { + message.tx_sig_limit = data.tx_sig_limit; + } + if (data.tx_size_cost_per_byte != null) { + message.tx_size_cost_per_byte = data.tx_size_cost_per_byte; + } + if (data.sig_verify_cost_ed25519 != null) { + message.sig_verify_cost_ed25519 = data.sig_verify_cost_ed25519; + } + if (data.sig_verify_cost_secp256k1 != null) { + message.sig_verify_cost_secp256k1 = data.sig_verify_cost_secp256k1; + } + return message; + } + toObject() { + const data: { + max_memo_characters?: number; + tx_sig_limit?: number; + tx_size_cost_per_byte?: number; + sig_verify_cost_ed25519?: number; + sig_verify_cost_secp256k1?: number; + } = {}; + if (this.max_memo_characters != null) { + data.max_memo_characters = this.max_memo_characters; + } + if (this.tx_sig_limit != null) { + data.tx_sig_limit = this.tx_sig_limit; + } + if (this.tx_size_cost_per_byte != null) { + data.tx_size_cost_per_byte = this.tx_size_cost_per_byte; + } + if (this.sig_verify_cost_ed25519 != null) { + data.sig_verify_cost_ed25519 = this.sig_verify_cost_ed25519; + } + if (this.sig_verify_cost_secp256k1 != null) { + data.sig_verify_cost_secp256k1 = this.sig_verify_cost_secp256k1; + } + 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.max_memo_characters != 0) + writer.writeUint64(1, this.max_memo_characters); + if (this.tx_sig_limit != 0) + writer.writeUint64(2, this.tx_sig_limit); + if (this.tx_size_cost_per_byte != 0) + writer.writeUint64(3, this.tx_size_cost_per_byte); + if (this.sig_verify_cost_ed25519 != 0) + writer.writeUint64(4, this.sig_verify_cost_ed25519); + if (this.sig_verify_cost_secp256k1 != 0) + writer.writeUint64(5, this.sig_verify_cost_secp256k1); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.max_memo_characters = reader.readUint64(); + break; + case 2: + message.tx_sig_limit = reader.readUint64(); + break; + case 3: + message.tx_size_cost_per_byte = reader.readUint64(); + break; + case 4: + message.sig_verify_cost_ed25519 = reader.readUint64(); + break; + case 5: + message.sig_verify_cost_secp256k1 = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/auth/v1beta1/auth_pb.d.ts b/codegen/cosmos/auth/v1beta1/auth_pb.d.ts similarity index 100% rename from proto/cosmos/auth/v1beta1/auth_pb.d.ts rename to codegen/cosmos/auth/v1beta1/auth_pb.d.ts diff --git a/proto/cosmos/auth/v1beta1/auth_pb.js b/codegen/cosmos/auth/v1beta1/auth_pb.js similarity index 100% rename from proto/cosmos/auth/v1beta1/auth_pb.js rename to codegen/cosmos/auth/v1beta1/auth_pb.js diff --git a/proto/cosmos/auth/v1beta1/auth_pb_service.d.ts b/codegen/cosmos/auth/v1beta1/auth_pb_service.d.ts similarity index 100% rename from proto/cosmos/auth/v1beta1/auth_pb_service.d.ts rename to codegen/cosmos/auth/v1beta1/auth_pb_service.d.ts diff --git a/proto/cosmos/auth/v1beta1/auth_pb_service.js b/codegen/cosmos/auth/v1beta1/auth_pb_service.js similarity index 100% rename from proto/cosmos/auth/v1beta1/auth_pb_service.js rename to codegen/cosmos/auth/v1beta1/auth_pb_service.js diff --git a/codegen/cosmos/auth/v1beta1/genesis.ts b/codegen/cosmos/auth/v1beta1/genesis.ts new file mode 100644 index 0000000..19f5677 --- /dev/null +++ b/codegen/cosmos/auth/v1beta1/genesis.ts @@ -0,0 +1,105 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/auth/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/any"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./auth"; +import * as dependency_4 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.auth.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_3.cosmos.auth.v1beta1.Params; + accounts?: dependency_1.google.protobuf.Any[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("accounts" in data && data.accounts != undefined) { + this.accounts = data.accounts; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.auth.v1beta1.Params, 1) as dependency_3.cosmos.auth.v1beta1.Params; + } + set params(value: dependency_3.cosmos.auth.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get accounts() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 2) as dependency_1.google.protobuf.Any[]; + } + set accounts(value: dependency_1.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + params?: ReturnType; + accounts?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = dependency_3.cosmos.auth.v1beta1.Params.fromObject(data.params); + } + if (data.accounts != null) { + message.accounts = data.accounts.map(item => dependency_1.google.protobuf.Any.fromObject(item)); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + accounts?: ReturnType[]; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.accounts != null) { + data.accounts = this.accounts.map((item: dependency_1.google.protobuf.Any) => item.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.accounts.length) + writer.writeRepeatedMessage(2, this.accounts, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_3.cosmos.auth.v1beta1.Params.deserialize(reader)); + break; + case 2: + reader.readMessage(message.accounts, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/auth/v1beta1/genesis_pb.d.ts b/codegen/cosmos/auth/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/auth/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/auth/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/auth/v1beta1/genesis_pb.js b/codegen/cosmos/auth/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/auth/v1beta1/genesis_pb.js rename to codegen/cosmos/auth/v1beta1/genesis_pb.js diff --git a/proto/cosmos/auth/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/auth/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/auth/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/auth/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/auth/v1beta1/genesis_pb_service.js b/codegen/cosmos/auth/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/auth/v1beta1/genesis_pb_service.js rename to codegen/cosmos/auth/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/auth/v1beta1/query.ts b/codegen/cosmos/auth/v1beta1/query.ts new file mode 100644 index 0000000..8473734 --- /dev/null +++ b/codegen/cosmos/auth/v1beta1/query.ts @@ -0,0 +1,1506 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/auth/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/protobuf/any"; +import * as dependency_4 from "./../../../google/api/annotations"; +import * as dependency_5 from "./auth"; +import * as dependency_6 from "./../../../cosmos_proto/cosmos"; +import * as dependency_7 from "./../../query/v1/query"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.auth.v1beta1 { + export class QueryAccountsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_1.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_1.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.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; + }): QueryAccountsRequest { + const message = new QueryAccountsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryAccountsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountsRequest { + return QueryAccountsRequest.deserialize(bytes); + } + } + export class QueryAccountsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + accounts?: dependency_3.google.protobuf.Any[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("accounts" in data && data.accounts != undefined) { + this.accounts = data.accounts; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get accounts() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.google.protobuf.Any, 1) as dependency_3.google.protobuf.Any[]; + } + set accounts(value: dependency_3.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + accounts?: ReturnType[]; + pagination?: ReturnType; + }): QueryAccountsResponse { + const message = new QueryAccountsResponse({}); + if (data.accounts != null) { + message.accounts = data.accounts.map(item => dependency_3.google.protobuf.Any.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + accounts?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.accounts != null) { + data.accounts = this.accounts.map((item: dependency_3.google.protobuf.Any) => item.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.accounts.length) + writer.writeRepeatedMessage(1, this.accounts, (item: dependency_3.google.protobuf.Any) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAccountsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.accounts, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.google.protobuf.Any.deserialize(reader), dependency_3.google.protobuf.Any)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountsResponse { + return QueryAccountsResponse.deserialize(bytes); + } + } + export class QueryAccountRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): QueryAccountRequest { + const message = new QueryAccountRequest({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAccountRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountRequest { + return QueryAccountRequest.deserialize(bytes); + } + } + export class QueryAccountResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + account?: dependency_3.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("account" in data && data.account != undefined) { + this.account = data.account; + } + } + } + get account() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Any, 1) as dependency_3.google.protobuf.Any; + } + set account(value: dependency_3.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_account() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + account?: ReturnType; + }): QueryAccountResponse { + const message = new QueryAccountResponse({}); + if (data.account != null) { + message.account = dependency_3.google.protobuf.Any.fromObject(data.account); + } + return message; + } + toObject() { + const data: { + account?: ReturnType; + } = {}; + if (this.account != null) { + data.account = this.account.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_account) + writer.writeMessage(1, this.account, () => this.account.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAccountResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.account, () => message.account = dependency_3.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountResponse { + return QueryAccountResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_5.cosmos.auth.v1beta1.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_5.cosmos.auth.v1beta1.Params, 1) as dependency_5.cosmos.auth.v1beta1.Params; + } + set params(value: dependency_5.cosmos.auth.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_5.cosmos.auth.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_5.cosmos.auth.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QueryModuleAccountsRequest 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: {}): QueryModuleAccountsRequest { + const message = new QueryModuleAccountsRequest({}); + 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): QueryModuleAccountsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryModuleAccountsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryModuleAccountsRequest { + return QueryModuleAccountsRequest.deserialize(bytes); + } + } + export class QueryModuleAccountsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + accounts?: dependency_3.google.protobuf.Any[]; + }) { + 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 ("accounts" in data && data.accounts != undefined) { + this.accounts = data.accounts; + } + } + } + get accounts() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.google.protobuf.Any, 1) as dependency_3.google.protobuf.Any[]; + } + set accounts(value: dependency_3.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + accounts?: ReturnType[]; + }): QueryModuleAccountsResponse { + const message = new QueryModuleAccountsResponse({}); + if (data.accounts != null) { + message.accounts = data.accounts.map(item => dependency_3.google.protobuf.Any.fromObject(item)); + } + return message; + } + toObject() { + const data: { + accounts?: ReturnType[]; + } = {}; + if (this.accounts != null) { + data.accounts = this.accounts.map((item: dependency_3.google.protobuf.Any) => item.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.accounts.length) + writer.writeRepeatedMessage(1, this.accounts, (item: dependency_3.google.protobuf.Any) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryModuleAccountsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryModuleAccountsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.accounts, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.google.protobuf.Any.deserialize(reader), dependency_3.google.protobuf.Any)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryModuleAccountsResponse { + return QueryModuleAccountsResponse.deserialize(bytes); + } + } + export class QueryModuleAccountByNameRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + name?: string; + }): QueryModuleAccountByNameRequest { + const message = new QueryModuleAccountByNameRequest({}); + if (data.name != null) { + message.name = data.name; + } + return message; + } + toObject() { + const data: { + name?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + 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.name.length) + writer.writeString(1, this.name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryModuleAccountByNameRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryModuleAccountByNameRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryModuleAccountByNameRequest { + return QueryModuleAccountByNameRequest.deserialize(bytes); + } + } + export class QueryModuleAccountByNameResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + account?: dependency_3.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("account" in data && data.account != undefined) { + this.account = data.account; + } + } + } + get account() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Any, 1) as dependency_3.google.protobuf.Any; + } + set account(value: dependency_3.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_account() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + account?: ReturnType; + }): QueryModuleAccountByNameResponse { + const message = new QueryModuleAccountByNameResponse({}); + if (data.account != null) { + message.account = dependency_3.google.protobuf.Any.fromObject(data.account); + } + return message; + } + toObject() { + const data: { + account?: ReturnType; + } = {}; + if (this.account != null) { + data.account = this.account.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_account) + writer.writeMessage(1, this.account, () => this.account.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryModuleAccountByNameResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryModuleAccountByNameResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.account, () => message.account = dependency_3.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryModuleAccountByNameResponse { + return QueryModuleAccountByNameResponse.deserialize(bytes); + } + } + export class Bech32PrefixRequest 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: {}): Bech32PrefixRequest { + const message = new Bech32PrefixRequest({}); + 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): Bech32PrefixRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Bech32PrefixRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Bech32PrefixRequest { + return Bech32PrefixRequest.deserialize(bytes); + } + } + export class Bech32PrefixResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + bech32_prefix?: 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 ("bech32_prefix" in data && data.bech32_prefix != undefined) { + this.bech32_prefix = data.bech32_prefix; + } + } + } + get bech32_prefix() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set bech32_prefix(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + bech32_prefix?: string; + }): Bech32PrefixResponse { + const message = new Bech32PrefixResponse({}); + if (data.bech32_prefix != null) { + message.bech32_prefix = data.bech32_prefix; + } + return message; + } + toObject() { + const data: { + bech32_prefix?: string; + } = {}; + if (this.bech32_prefix != null) { + data.bech32_prefix = this.bech32_prefix; + } + 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.bech32_prefix.length) + writer.writeString(1, this.bech32_prefix); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Bech32PrefixResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Bech32PrefixResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.bech32_prefix = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Bech32PrefixResponse { + return Bech32PrefixResponse.deserialize(bytes); + } + } + export class AddressBytesToStringRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address_bytes?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address_bytes" in data && data.address_bytes != undefined) { + this.address_bytes = data.address_bytes; + } + } + } + get address_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set address_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address_bytes?: Uint8Array; + }): AddressBytesToStringRequest { + const message = new AddressBytesToStringRequest({}); + if (data.address_bytes != null) { + message.address_bytes = data.address_bytes; + } + return message; + } + toObject() { + const data: { + address_bytes?: Uint8Array; + } = {}; + if (this.address_bytes != null) { + data.address_bytes = this.address_bytes; + } + 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.address_bytes.length) + writer.writeBytes(1, this.address_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AddressBytesToStringRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AddressBytesToStringRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address_bytes = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AddressBytesToStringRequest { + return AddressBytesToStringRequest.deserialize(bytes); + } + } + export class AddressBytesToStringResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address_string?: 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 ("address_string" in data && data.address_string != undefined) { + this.address_string = data.address_string; + } + } + } + get address_string() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address_string(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address_string?: string; + }): AddressBytesToStringResponse { + const message = new AddressBytesToStringResponse({}); + if (data.address_string != null) { + message.address_string = data.address_string; + } + return message; + } + toObject() { + const data: { + address_string?: string; + } = {}; + if (this.address_string != null) { + data.address_string = this.address_string; + } + 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.address_string.length) + writer.writeString(1, this.address_string); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AddressBytesToStringResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AddressBytesToStringResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address_string = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AddressBytesToStringResponse { + return AddressBytesToStringResponse.deserialize(bytes); + } + } + export class AddressStringToBytesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address_string?: 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 ("address_string" in data && data.address_string != undefined) { + this.address_string = data.address_string; + } + } + } + get address_string() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address_string(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address_string?: string; + }): AddressStringToBytesRequest { + const message = new AddressStringToBytesRequest({}); + if (data.address_string != null) { + message.address_string = data.address_string; + } + return message; + } + toObject() { + const data: { + address_string?: string; + } = {}; + if (this.address_string != null) { + data.address_string = this.address_string; + } + 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.address_string.length) + writer.writeString(1, this.address_string); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AddressStringToBytesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AddressStringToBytesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address_string = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AddressStringToBytesRequest { + return AddressStringToBytesRequest.deserialize(bytes); + } + } + export class AddressStringToBytesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address_bytes?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address_bytes" in data && data.address_bytes != undefined) { + this.address_bytes = data.address_bytes; + } + } + } + get address_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set address_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address_bytes?: Uint8Array; + }): AddressStringToBytesResponse { + const message = new AddressStringToBytesResponse({}); + if (data.address_bytes != null) { + message.address_bytes = data.address_bytes; + } + return message; + } + toObject() { + const data: { + address_bytes?: Uint8Array; + } = {}; + if (this.address_bytes != null) { + data.address_bytes = this.address_bytes; + } + 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.address_bytes.length) + writer.writeBytes(1, this.address_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AddressStringToBytesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AddressStringToBytesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address_bytes = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AddressStringToBytesResponse { + return AddressStringToBytesResponse.deserialize(bytes); + } + } + export class QueryAccountAddressByIDRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + /** @deprecated*/ + id?: number; + account_id?: 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 ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("account_id" in data && data.account_id != undefined) { + this.account_id = data.account_id; + } + } + } + /** @deprecated*/ + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + /** @deprecated*/ + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get account_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set account_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: number; + account_id?: number; + }): QueryAccountAddressByIDRequest { + const message = new QueryAccountAddressByIDRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.account_id != null) { + message.account_id = data.account_id; + } + return message; + } + toObject() { + const data: { + id?: number; + account_id?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.account_id != null) { + data.account_id = this.account_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.id != 0) + writer.writeInt64(1, this.id); + if (this.account_id != 0) + writer.writeUint64(2, this.account_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAccountAddressByIDRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountAddressByIDRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readInt64(); + break; + case 2: + message.account_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountAddressByIDRequest { + return QueryAccountAddressByIDRequest.deserialize(bytes); + } + } + export class QueryAccountAddressByIDResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + account_address?: 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 ("account_address" in data && data.account_address != undefined) { + this.account_address = data.account_address; + } + } + } + get account_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set account_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + account_address?: string; + }): QueryAccountAddressByIDResponse { + const message = new QueryAccountAddressByIDResponse({}); + if (data.account_address != null) { + message.account_address = data.account_address; + } + return message; + } + toObject() { + const data: { + account_address?: string; + } = {}; + if (this.account_address != null) { + data.account_address = this.account_address; + } + 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.account_address.length) + writer.writeString(1, this.account_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAccountAddressByIDResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountAddressByIDResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.account_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountAddressByIDResponse { + return QueryAccountAddressByIDResponse.deserialize(bytes); + } + } + export class QueryAccountInfoRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): QueryAccountInfoRequest { + const message = new QueryAccountInfoRequest({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAccountInfoRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountInfoRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountInfoRequest { + return QueryAccountInfoRequest.deserialize(bytes); + } + } + export class QueryAccountInfoResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + info?: dependency_5.cosmos.auth.v1beta1.BaseAccount; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("info" in data && data.info != undefined) { + this.info = data.info; + } + } + } + get info() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.auth.v1beta1.BaseAccount, 1) as dependency_5.cosmos.auth.v1beta1.BaseAccount; + } + set info(value: dependency_5.cosmos.auth.v1beta1.BaseAccount) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_info() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + info?: ReturnType; + }): QueryAccountInfoResponse { + const message = new QueryAccountInfoResponse({}); + if (data.info != null) { + message.info = dependency_5.cosmos.auth.v1beta1.BaseAccount.fromObject(data.info); + } + return message; + } + toObject() { + const data: { + info?: ReturnType; + } = {}; + if (this.info != null) { + data.info = this.info.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_info) + writer.writeMessage(1, this.info, () => this.info.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAccountInfoResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountInfoResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.info, () => message.info = dependency_5.cosmos.auth.v1beta1.BaseAccount.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountInfoResponse { + return QueryAccountInfoResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Accounts: { + path: "/cosmos.auth.v1beta1.Query/Accounts", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAccountsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAccountsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAccountsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAccountsResponse.deserialize(new Uint8Array(bytes)) + }, + Account: { + path: "/cosmos.auth.v1beta1.Query/Account", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAccountRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAccountRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAccountResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAccountResponse.deserialize(new Uint8Array(bytes)) + }, + AccountAddressByID: { + path: "/cosmos.auth.v1beta1.Query/AccountAddressByID", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAccountAddressByIDRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAccountAddressByIDRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAccountAddressByIDResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAccountAddressByIDResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/cosmos.auth.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + ModuleAccounts: { + path: "/cosmos.auth.v1beta1.Query/ModuleAccounts", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryModuleAccountsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryModuleAccountsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryModuleAccountsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryModuleAccountsResponse.deserialize(new Uint8Array(bytes)) + }, + ModuleAccountByName: { + path: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryModuleAccountByNameRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryModuleAccountByNameRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryModuleAccountByNameResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryModuleAccountByNameResponse.deserialize(new Uint8Array(bytes)) + }, + Bech32Prefix: { + path: "/cosmos.auth.v1beta1.Query/Bech32Prefix", + requestStream: false, + responseStream: false, + requestSerialize: (message: Bech32PrefixRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => Bech32PrefixRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: Bech32PrefixResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => Bech32PrefixResponse.deserialize(new Uint8Array(bytes)) + }, + AddressBytesToString: { + path: "/cosmos.auth.v1beta1.Query/AddressBytesToString", + requestStream: false, + responseStream: false, + requestSerialize: (message: AddressBytesToStringRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AddressBytesToStringRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AddressBytesToStringResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AddressBytesToStringResponse.deserialize(new Uint8Array(bytes)) + }, + AddressStringToBytes: { + path: "/cosmos.auth.v1beta1.Query/AddressStringToBytes", + requestStream: false, + responseStream: false, + requestSerialize: (message: AddressStringToBytesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AddressStringToBytesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AddressStringToBytesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AddressStringToBytesResponse.deserialize(new Uint8Array(bytes)) + }, + AccountInfo: { + path: "/cosmos.auth.v1beta1.Query/AccountInfo", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAccountInfoRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAccountInfoRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAccountInfoResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAccountInfoResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Accounts(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Account(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AccountAddressByID(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ModuleAccounts(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ModuleAccountByName(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Bech32Prefix(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AddressBytesToString(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AddressStringToBytes(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AccountInfo(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Accounts: GrpcUnaryServiceInterface = (message: QueryAccountsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Accounts(message, metadata, options, callback); + }; + Account: GrpcUnaryServiceInterface = (message: QueryAccountRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Account(message, metadata, options, callback); + }; + AccountAddressByID: GrpcUnaryServiceInterface = (message: QueryAccountAddressByIDRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AccountAddressByID(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + ModuleAccounts: GrpcUnaryServiceInterface = (message: QueryModuleAccountsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ModuleAccounts(message, metadata, options, callback); + }; + ModuleAccountByName: GrpcUnaryServiceInterface = (message: QueryModuleAccountByNameRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ModuleAccountByName(message, metadata, options, callback); + }; + Bech32Prefix: GrpcUnaryServiceInterface = (message: Bech32PrefixRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Bech32Prefix(message, metadata, options, callback); + }; + AddressBytesToString: GrpcUnaryServiceInterface = (message: AddressBytesToStringRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AddressBytesToString(message, metadata, options, callback); + }; + AddressStringToBytes: GrpcUnaryServiceInterface = (message: AddressStringToBytesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AddressStringToBytes(message, metadata, options, callback); + }; + AccountInfo: GrpcUnaryServiceInterface = (message: QueryAccountInfoRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AccountInfo(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/auth/v1beta1/query_pb.d.ts b/codegen/cosmos/auth/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/auth/v1beta1/query_pb.d.ts rename to codegen/cosmos/auth/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/auth/v1beta1/query_pb.js b/codegen/cosmos/auth/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/auth/v1beta1/query_pb.js rename to codegen/cosmos/auth/v1beta1/query_pb.js diff --git a/proto/cosmos/auth/v1beta1/query_pb_service.d.ts b/codegen/cosmos/auth/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/auth/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/auth/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/auth/v1beta1/query_pb_service.js b/codegen/cosmos/auth/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/auth/v1beta1/query_pb_service.js rename to codegen/cosmos/auth/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/auth/v1beta1/tx.ts b/codegen/cosmos/auth/v1beta1/tx.ts new file mode 100644 index 0000000..47693ae --- /dev/null +++ b/codegen/cosmos/auth/v1beta1/tx.ts @@ -0,0 +1,194 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/auth/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../msg/v1/msg"; +import * as dependency_4 from "./../../../amino/amino"; +import * as dependency_5 from "./auth"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.auth.v1beta1 { + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_5.cosmos.auth.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.auth.v1beta1.Params, 2) as dependency_5.cosmos.auth.v1beta1.Params; + } + set params(value: dependency_5.cosmos.auth.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_5.cosmos.auth.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_5.cosmos.auth.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + UpdateParams: { + path: "/cosmos.auth.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/auth/v1beta1/tx_pb.d.ts b/codegen/cosmos/auth/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/auth/v1beta1/tx_pb.d.ts rename to codegen/cosmos/auth/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/auth/v1beta1/tx_pb.js b/codegen/cosmos/auth/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/auth/v1beta1/tx_pb.js rename to codegen/cosmos/auth/v1beta1/tx_pb.js diff --git a/proto/cosmos/auth/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/auth/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/auth/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/auth/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/auth/v1beta1/tx_pb_service.js b/codegen/cosmos/auth/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/auth/v1beta1/tx_pb_service.js rename to codegen/cosmos/auth/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/authz/module/v1/module.ts b/codegen/cosmos/authz/module/v1/module.ts new file mode 100644 index 0000000..ea25a1b --- /dev/null +++ b/codegen/cosmos/authz/module/v1/module.ts @@ -0,0 +1,49 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/authz/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.authz.module.v1 { + export class Module 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: {}): Module { + const message = new Module({}); + 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): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/authz/module/v1/module_pb.d.ts b/codegen/cosmos/authz/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/authz/module/v1/module_pb.d.ts rename to codegen/cosmos/authz/module/v1/module_pb.d.ts diff --git a/proto/cosmos/authz/module/v1/module_pb.js b/codegen/cosmos/authz/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/authz/module/v1/module_pb.js rename to codegen/cosmos/authz/module/v1/module_pb.js diff --git a/proto/cosmos/authz/module/v1/module_pb_service.d.ts b/codegen/cosmos/authz/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/authz/module/v1/module_pb_service.d.ts rename to codegen/cosmos/authz/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/authz/module/v1/module_pb_service.js b/codegen/cosmos/authz/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/authz/module/v1/module_pb_service.js rename to codegen/cosmos/authz/module/v1/module_pb_service.js diff --git a/codegen/cosmos/authz/v1beta1/authz.ts b/codegen/cosmos/authz/v1beta1/authz.ts new file mode 100644 index 0000000..890c10d --- /dev/null +++ b/codegen/cosmos/authz/v1beta1/authz.ts @@ -0,0 +1,385 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/authz/v1beta1/authz.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../../google/protobuf/timestamp"; +import * as dependency_4 from "./../../../gogoproto/gogo"; +import * as dependency_5 from "./../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.authz.v1beta1 { + export class GenericAuthorization extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + msg?: 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 ("msg" in data && data.msg != undefined) { + this.msg = data.msg; + } + } + } + get msg() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set msg(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + msg?: string; + }): GenericAuthorization { + const message = new GenericAuthorization({}); + if (data.msg != null) { + message.msg = data.msg; + } + return message; + } + toObject() { + const data: { + msg?: string; + } = {}; + if (this.msg != null) { + data.msg = this.msg; + } + 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.msg.length) + writer.writeString(1, this.msg); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenericAuthorization { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenericAuthorization(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.msg = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenericAuthorization { + return GenericAuthorization.deserialize(bytes); + } + } + export class Grant extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authorization?: dependency_5.google.protobuf.Any; + expiration?: dependency_3.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authorization" in data && data.authorization != undefined) { + this.authorization = data.authorization; + } + if ("expiration" in data && data.expiration != undefined) { + this.expiration = data.expiration; + } + } + } + get authorization() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 1) as dependency_5.google.protobuf.Any; + } + set authorization(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_authorization() { + return pb_1.Message.getField(this, 1) != null; + } + get expiration() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 2) as dependency_3.google.protobuf.Timestamp; + } + set expiration(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_expiration() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authorization?: ReturnType; + expiration?: ReturnType; + }): Grant { + const message = new Grant({}); + if (data.authorization != null) { + message.authorization = dependency_5.google.protobuf.Any.fromObject(data.authorization); + } + if (data.expiration != null) { + message.expiration = dependency_3.google.protobuf.Timestamp.fromObject(data.expiration); + } + return message; + } + toObject() { + const data: { + authorization?: ReturnType; + expiration?: ReturnType; + } = {}; + if (this.authorization != null) { + data.authorization = this.authorization.toObject(); + } + if (this.expiration != null) { + data.expiration = this.expiration.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_authorization) + writer.writeMessage(1, this.authorization, () => this.authorization.serialize(writer)); + if (this.has_expiration) + writer.writeMessage(2, this.expiration, () => this.expiration.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Grant { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Grant(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.authorization, () => message.authorization = dependency_5.google.protobuf.Any.deserialize(reader)); + break; + case 2: + reader.readMessage(message.expiration, () => message.expiration = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Grant { + return Grant.deserialize(bytes); + } + } + export class GrantAuthorization extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: string; + authorization?: dependency_5.google.protobuf.Any; + expiration?: dependency_3.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("authorization" in data && data.authorization != undefined) { + this.authorization = data.authorization; + } + if ("expiration" in data && data.expiration != undefined) { + this.expiration = data.expiration; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + get authorization() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 3) as dependency_5.google.protobuf.Any; + } + set authorization(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_authorization() { + return pb_1.Message.getField(this, 3) != null; + } + get expiration() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 4) as dependency_3.google.protobuf.Timestamp; + } + set expiration(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_expiration() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + granter?: string; + grantee?: string; + authorization?: ReturnType; + expiration?: ReturnType; + }): GrantAuthorization { + const message = new GrantAuthorization({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.authorization != null) { + message.authorization = dependency_5.google.protobuf.Any.fromObject(data.authorization); + } + if (data.expiration != null) { + message.expiration = dependency_3.google.protobuf.Timestamp.fromObject(data.expiration); + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + authorization?: ReturnType; + expiration?: ReturnType; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + if (this.authorization != null) { + data.authorization = this.authorization.toObject(); + } + if (this.expiration != null) { + data.expiration = this.expiration.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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (this.has_authorization) + writer.writeMessage(3, this.authorization, () => this.authorization.serialize(writer)); + if (this.has_expiration) + writer.writeMessage(4, this.expiration, () => this.expiration.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GrantAuthorization { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GrantAuthorization(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + case 3: + reader.readMessage(message.authorization, () => message.authorization = dependency_5.google.protobuf.Any.deserialize(reader)); + break; + case 4: + reader.readMessage(message.expiration, () => message.expiration = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GrantAuthorization { + return GrantAuthorization.deserialize(bytes); + } + } + export class GrantQueueItem extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + msg_type_urls?: string[]; + }) { + 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 ("msg_type_urls" in data && data.msg_type_urls != undefined) { + this.msg_type_urls = data.msg_type_urls; + } + } + } + get msg_type_urls() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set msg_type_urls(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + msg_type_urls?: string[]; + }): GrantQueueItem { + const message = new GrantQueueItem({}); + if (data.msg_type_urls != null) { + message.msg_type_urls = data.msg_type_urls; + } + return message; + } + toObject() { + const data: { + msg_type_urls?: string[]; + } = {}; + if (this.msg_type_urls != null) { + data.msg_type_urls = this.msg_type_urls; + } + 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.msg_type_urls.length) + writer.writeRepeatedString(1, this.msg_type_urls); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GrantQueueItem { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GrantQueueItem(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GrantQueueItem { + return GrantQueueItem.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/authz/v1beta1/authz_pb.d.ts b/codegen/cosmos/authz/v1beta1/authz_pb.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/authz_pb.d.ts rename to codegen/cosmos/authz/v1beta1/authz_pb.d.ts diff --git a/proto/cosmos/authz/v1beta1/authz_pb.js b/codegen/cosmos/authz/v1beta1/authz_pb.js similarity index 100% rename from proto/cosmos/authz/v1beta1/authz_pb.js rename to codegen/cosmos/authz/v1beta1/authz_pb.js diff --git a/proto/cosmos/authz/v1beta1/authz_pb_service.d.ts b/codegen/cosmos/authz/v1beta1/authz_pb_service.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/authz_pb_service.d.ts rename to codegen/cosmos/authz/v1beta1/authz_pb_service.d.ts diff --git a/proto/cosmos/authz/v1beta1/authz_pb_service.js b/codegen/cosmos/authz/v1beta1/authz_pb_service.js similarity index 100% rename from proto/cosmos/authz/v1beta1/authz_pb_service.js rename to codegen/cosmos/authz/v1beta1/authz_pb_service.js diff --git a/codegen/cosmos/authz/v1beta1/event.ts b/codegen/cosmos/authz/v1beta1/event.ts new file mode 100644 index 0000000..9c2a9cc --- /dev/null +++ b/codegen/cosmos/authz/v1beta1/event.ts @@ -0,0 +1,235 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/authz/v1beta1/event.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.authz.v1beta1 { + export class EventGrant extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + msg_type_url?: string; + granter?: string; + grantee?: 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 ("msg_type_url" in data && data.msg_type_url != undefined) { + this.msg_type_url = data.msg_type_url; + } + if ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + } + } + get msg_type_url() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set msg_type_url(value: string) { + pb_1.Message.setField(this, 2, value); + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 3, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + msg_type_url?: string; + granter?: string; + grantee?: string; + }): EventGrant { + const message = new EventGrant({}); + if (data.msg_type_url != null) { + message.msg_type_url = data.msg_type_url; + } + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + return message; + } + toObject() { + const data: { + msg_type_url?: string; + granter?: string; + grantee?: string; + } = {}; + if (this.msg_type_url != null) { + data.msg_type_url = this.msg_type_url; + } + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + 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.msg_type_url.length) + writer.writeString(2, this.msg_type_url); + if (this.granter.length) + writer.writeString(3, this.granter); + if (this.grantee.length) + writer.writeString(4, this.grantee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventGrant { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventGrant(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.msg_type_url = reader.readString(); + break; + case 3: + message.granter = reader.readString(); + break; + case 4: + message.grantee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventGrant { + return EventGrant.deserialize(bytes); + } + } + export class EventRevoke extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + msg_type_url?: string; + granter?: string; + grantee?: 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 ("msg_type_url" in data && data.msg_type_url != undefined) { + this.msg_type_url = data.msg_type_url; + } + if ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + } + } + get msg_type_url() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set msg_type_url(value: string) { + pb_1.Message.setField(this, 2, value); + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 3, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + msg_type_url?: string; + granter?: string; + grantee?: string; + }): EventRevoke { + const message = new EventRevoke({}); + if (data.msg_type_url != null) { + message.msg_type_url = data.msg_type_url; + } + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + return message; + } + toObject() { + const data: { + msg_type_url?: string; + granter?: string; + grantee?: string; + } = {}; + if (this.msg_type_url != null) { + data.msg_type_url = this.msg_type_url; + } + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + 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.msg_type_url.length) + writer.writeString(2, this.msg_type_url); + if (this.granter.length) + writer.writeString(3, this.granter); + if (this.grantee.length) + writer.writeString(4, this.grantee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventRevoke { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventRevoke(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.msg_type_url = reader.readString(); + break; + case 3: + message.granter = reader.readString(); + break; + case 4: + message.grantee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventRevoke { + return EventRevoke.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/authz/v1beta1/event_pb.d.ts b/codegen/cosmos/authz/v1beta1/event_pb.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/event_pb.d.ts rename to codegen/cosmos/authz/v1beta1/event_pb.d.ts diff --git a/proto/cosmos/authz/v1beta1/event_pb.js b/codegen/cosmos/authz/v1beta1/event_pb.js similarity index 100% rename from proto/cosmos/authz/v1beta1/event_pb.js rename to codegen/cosmos/authz/v1beta1/event_pb.js diff --git a/proto/cosmos/authz/v1beta1/event_pb_service.d.ts b/codegen/cosmos/authz/v1beta1/event_pb_service.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/event_pb_service.d.ts rename to codegen/cosmos/authz/v1beta1/event_pb_service.d.ts diff --git a/proto/cosmos/authz/v1beta1/event_pb_service.js b/codegen/cosmos/authz/v1beta1/event_pb_service.js similarity index 100% rename from proto/cosmos/authz/v1beta1/event_pb_service.js rename to codegen/cosmos/authz/v1beta1/event_pb_service.js diff --git a/codegen/cosmos/authz/v1beta1/genesis.ts b/codegen/cosmos/authz/v1beta1/genesis.ts new file mode 100644 index 0000000..0436ac6 --- /dev/null +++ b/codegen/cosmos/authz/v1beta1/genesis.ts @@ -0,0 +1,78 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/authz/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./authz"; +import * as dependency_3 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.authz.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authorization?: dependency_2.cosmos.authz.v1beta1.GrantAuthorization[]; + }) { + 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 ("authorization" in data && data.authorization != undefined) { + this.authorization = data.authorization; + } + } + } + get authorization() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.authz.v1beta1.GrantAuthorization, 1) as dependency_2.cosmos.authz.v1beta1.GrantAuthorization[]; + } + set authorization(value: dependency_2.cosmos.authz.v1beta1.GrantAuthorization[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + authorization?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.authorization != null) { + message.authorization = data.authorization.map(item => dependency_2.cosmos.authz.v1beta1.GrantAuthorization.fromObject(item)); + } + return message; + } + toObject() { + const data: { + authorization?: ReturnType[]; + } = {}; + if (this.authorization != null) { + data.authorization = this.authorization.map((item: dependency_2.cosmos.authz.v1beta1.GrantAuthorization) => item.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.authorization.length) + writer.writeRepeatedMessage(1, this.authorization, (item: dependency_2.cosmos.authz.v1beta1.GrantAuthorization) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.authorization, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.authz.v1beta1.GrantAuthorization.deserialize(reader), dependency_2.cosmos.authz.v1beta1.GrantAuthorization)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/authz/v1beta1/genesis_pb.d.ts b/codegen/cosmos/authz/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/authz/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/authz/v1beta1/genesis_pb.js b/codegen/cosmos/authz/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/authz/v1beta1/genesis_pb.js rename to codegen/cosmos/authz/v1beta1/genesis_pb.js diff --git a/proto/cosmos/authz/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/authz/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/authz/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/authz/v1beta1/genesis_pb_service.js b/codegen/cosmos/authz/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/authz/v1beta1/genesis_pb_service.js rename to codegen/cosmos/authz/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/authz/v1beta1/query.ts b/codegen/cosmos/authz/v1beta1/query.ts new file mode 100644 index 0000000..d1e09d4 --- /dev/null +++ b/codegen/cosmos/authz/v1beta1/query.ts @@ -0,0 +1,690 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/authz/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/api/annotations"; +import * as dependency_2 from "./../../base/query/v1beta1/pagination"; +import * as dependency_3 from "./authz"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.authz.v1beta1 { + export class QueryGrantsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: string; + msg_type_url?: string; + 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 ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("msg_type_url" in data && data.msg_type_url != undefined) { + this.msg_type_url = data.msg_type_url; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + get msg_type_url() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set msg_type_url(value: string) { + pb_1.Message.setField(this, 3, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 4) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + granter?: string; + grantee?: string; + msg_type_url?: string; + pagination?: ReturnType; + }): QueryGrantsRequest { + const message = new QueryGrantsRequest({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.msg_type_url != null) { + message.msg_type_url = data.msg_type_url; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + msg_type_url?: string; + pagination?: ReturnType; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + if (this.msg_type_url != null) { + data.msg_type_url = this.msg_type_url; + } + 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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (this.msg_type_url.length) + writer.writeString(3, this.msg_type_url); + if (this.has_pagination) + writer.writeMessage(4, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGrantsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGrantsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + case 3: + message.msg_type_url = reader.readString(); + break; + case 4: + 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): QueryGrantsRequest { + return QueryGrantsRequest.deserialize(bytes); + } + } + export class QueryGrantsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + grants?: dependency_3.cosmos.authz.v1beta1.Grant[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("grants" in data && data.grants != undefined) { + this.grants = data.grants; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get grants() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.authz.v1beta1.Grant, 1) as dependency_3.cosmos.authz.v1beta1.Grant[]; + } + set grants(value: dependency_3.cosmos.authz.v1beta1.Grant[]) { + 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; + } + static fromObject(data: { + grants?: ReturnType[]; + pagination?: ReturnType; + }): QueryGrantsResponse { + const message = new QueryGrantsResponse({}); + if (data.grants != null) { + message.grants = data.grants.map(item => dependency_3.cosmos.authz.v1beta1.Grant.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + grants?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.grants != null) { + data.grants = this.grants.map((item: dependency_3.cosmos.authz.v1beta1.Grant) => item.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.grants.length) + writer.writeRepeatedMessage(1, this.grants, (item: dependency_3.cosmos.authz.v1beta1.Grant) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGrantsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGrantsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.grants, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.authz.v1beta1.Grant.deserialize(reader), dependency_3.cosmos.authz.v1beta1.Grant)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGrantsResponse { + return QueryGrantsResponse.deserialize(bytes); + } + } + export class QueryGranterGrantsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + 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 ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + granter?: string; + pagination?: ReturnType; + }): QueryGranterGrantsRequest { + const message = new QueryGranterGrantsRequest({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + granter?: string; + pagination?: ReturnType; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + 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.granter.length) + writer.writeString(1, this.granter); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGranterGrantsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGranterGrantsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + 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): QueryGranterGrantsRequest { + return QueryGranterGrantsRequest.deserialize(bytes); + } + } + export class QueryGranterGrantsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + grants?: dependency_3.cosmos.authz.v1beta1.GrantAuthorization[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("grants" in data && data.grants != undefined) { + this.grants = data.grants; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get grants() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.authz.v1beta1.GrantAuthorization, 1) as dependency_3.cosmos.authz.v1beta1.GrantAuthorization[]; + } + set grants(value: dependency_3.cosmos.authz.v1beta1.GrantAuthorization[]) { + 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; + } + static fromObject(data: { + grants?: ReturnType[]; + pagination?: ReturnType; + }): QueryGranterGrantsResponse { + const message = new QueryGranterGrantsResponse({}); + if (data.grants != null) { + message.grants = data.grants.map(item => dependency_3.cosmos.authz.v1beta1.GrantAuthorization.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + grants?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.grants != null) { + data.grants = this.grants.map((item: dependency_3.cosmos.authz.v1beta1.GrantAuthorization) => item.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.grants.length) + writer.writeRepeatedMessage(1, this.grants, (item: dependency_3.cosmos.authz.v1beta1.GrantAuthorization) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGranterGrantsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGranterGrantsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.grants, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.authz.v1beta1.GrantAuthorization.deserialize(reader), dependency_3.cosmos.authz.v1beta1.GrantAuthorization)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGranterGrantsResponse { + return QueryGranterGrantsResponse.deserialize(bytes); + } + } + export class QueryGranteeGrantsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + grantee?: string; + 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 ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + grantee?: string; + pagination?: ReturnType; + }): QueryGranteeGrantsRequest { + const message = new QueryGranteeGrantsRequest({}); + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + grantee?: string; + pagination?: ReturnType; + } = {}; + if (this.grantee != null) { + data.grantee = this.grantee; + } + 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.grantee.length) + writer.writeString(1, this.grantee); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGranteeGrantsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGranteeGrantsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.grantee = reader.readString(); + break; + case 2: + 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): QueryGranteeGrantsRequest { + return QueryGranteeGrantsRequest.deserialize(bytes); + } + } + export class QueryGranteeGrantsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + grants?: dependency_3.cosmos.authz.v1beta1.GrantAuthorization[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("grants" in data && data.grants != undefined) { + this.grants = data.grants; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get grants() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.authz.v1beta1.GrantAuthorization, 1) as dependency_3.cosmos.authz.v1beta1.GrantAuthorization[]; + } + set grants(value: dependency_3.cosmos.authz.v1beta1.GrantAuthorization[]) { + 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; + } + static fromObject(data: { + grants?: ReturnType[]; + pagination?: ReturnType; + }): QueryGranteeGrantsResponse { + const message = new QueryGranteeGrantsResponse({}); + if (data.grants != null) { + message.grants = data.grants.map(item => dependency_3.cosmos.authz.v1beta1.GrantAuthorization.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + grants?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.grants != null) { + data.grants = this.grants.map((item: dependency_3.cosmos.authz.v1beta1.GrantAuthorization) => item.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.grants.length) + writer.writeRepeatedMessage(1, this.grants, (item: dependency_3.cosmos.authz.v1beta1.GrantAuthorization) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGranteeGrantsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGranteeGrantsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.grants, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.authz.v1beta1.GrantAuthorization.deserialize(reader), dependency_3.cosmos.authz.v1beta1.GrantAuthorization)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGranteeGrantsResponse { + return QueryGranteeGrantsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Grants: { + path: "/cosmos.authz.v1beta1.Query/Grants", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGrantsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGrantsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGrantsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGrantsResponse.deserialize(new Uint8Array(bytes)) + }, + GranterGrants: { + path: "/cosmos.authz.v1beta1.Query/GranterGrants", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGranterGrantsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGranterGrantsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGranterGrantsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGranterGrantsResponse.deserialize(new Uint8Array(bytes)) + }, + GranteeGrants: { + path: "/cosmos.authz.v1beta1.Query/GranteeGrants", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGranteeGrantsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGranteeGrantsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGranteeGrantsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGranteeGrantsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Grants(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GranterGrants(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GranteeGrants(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Grants: GrpcUnaryServiceInterface = (message: QueryGrantsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Grants(message, metadata, options, callback); + }; + GranterGrants: GrpcUnaryServiceInterface = (message: QueryGranterGrantsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GranterGrants(message, metadata, options, callback); + }; + GranteeGrants: GrpcUnaryServiceInterface = (message: QueryGranteeGrantsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GranteeGrants(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/authz/v1beta1/query_pb.d.ts b/codegen/cosmos/authz/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/query_pb.d.ts rename to codegen/cosmos/authz/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/authz/v1beta1/query_pb.js b/codegen/cosmos/authz/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/authz/v1beta1/query_pb.js rename to codegen/cosmos/authz/v1beta1/query_pb.js diff --git a/proto/cosmos/authz/v1beta1/query_pb_service.d.ts b/codegen/cosmos/authz/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/authz/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/authz/v1beta1/query_pb_service.js b/codegen/cosmos/authz/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/authz/v1beta1/query_pb_service.js rename to codegen/cosmos/authz/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/authz/v1beta1/tx.ts b/codegen/cosmos/authz/v1beta1/tx.ts new file mode 100644 index 0000000..e27135c --- /dev/null +++ b/codegen/cosmos/authz/v1beta1/tx.ts @@ -0,0 +1,554 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/authz/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../cosmos_proto/cosmos"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/protobuf/any"; +import * as dependency_4 from "./authz"; +import * as dependency_5 from "./../../msg/v1/msg"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.authz.v1beta1 { + export class MsgGrant extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: string; + grant?: dependency_4.cosmos.authz.v1beta1.Grant; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("grant" in data && data.grant != undefined) { + this.grant = data.grant; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + get grant() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.authz.v1beta1.Grant, 3) as dependency_4.cosmos.authz.v1beta1.Grant; + } + set grant(value: dependency_4.cosmos.authz.v1beta1.Grant) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_grant() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + granter?: string; + grantee?: string; + grant?: ReturnType; + }): MsgGrant { + const message = new MsgGrant({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.grant != null) { + message.grant = dependency_4.cosmos.authz.v1beta1.Grant.fromObject(data.grant); + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + grant?: ReturnType; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + if (this.grant != null) { + data.grant = this.grant.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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (this.has_grant) + writer.writeMessage(3, this.grant, () => this.grant.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgGrant { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgGrant(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + case 3: + reader.readMessage(message.grant, () => message.grant = dependency_4.cosmos.authz.v1beta1.Grant.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgGrant { + return MsgGrant.deserialize(bytes); + } + } + export class MsgGrantResponse 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: {}): MsgGrantResponse { + const message = new MsgGrantResponse({}); + 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): MsgGrantResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgGrantResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgGrantResponse { + return MsgGrantResponse.deserialize(bytes); + } + } + export class MsgExec extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + grantee?: string; + msgs?: dependency_3.google.protobuf.Any[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("msgs" in data && data.msgs != undefined) { + this.msgs = data.msgs; + } + } + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 1, value); + } + get msgs() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.google.protobuf.Any, 2) as dependency_3.google.protobuf.Any[]; + } + set msgs(value: dependency_3.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + grantee?: string; + msgs?: ReturnType[]; + }): MsgExec { + const message = new MsgExec({}); + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.msgs != null) { + message.msgs = data.msgs.map(item => dependency_3.google.protobuf.Any.fromObject(item)); + } + return message; + } + toObject() { + const data: { + grantee?: string; + msgs?: ReturnType[]; + } = {}; + if (this.grantee != null) { + data.grantee = this.grantee; + } + if (this.msgs != null) { + data.msgs = this.msgs.map((item: dependency_3.google.protobuf.Any) => item.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.grantee.length) + writer.writeString(1, this.grantee); + if (this.msgs.length) + writer.writeRepeatedMessage(2, this.msgs, (item: dependency_3.google.protobuf.Any) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgExec { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgExec(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.grantee = reader.readString(); + break; + case 2: + reader.readMessage(message.msgs, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.google.protobuf.Any.deserialize(reader), dependency_3.google.protobuf.Any)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgExec { + return MsgExec.deserialize(bytes); + } + } + export class MsgExecResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + results?: Uint8Array[]; + }) { + 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 ("results" in data && data.results != undefined) { + this.results = data.results; + } + } + } + get results() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as Uint8Array[]; + } + set results(value: Uint8Array[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + results?: Uint8Array[]; + }): MsgExecResponse { + const message = new MsgExecResponse({}); + if (data.results != null) { + message.results = data.results; + } + return message; + } + toObject() { + const data: { + results?: Uint8Array[]; + } = {}; + if (this.results != null) { + data.results = this.results; + } + 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.results.length) + writer.writeRepeatedBytes(1, this.results); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgExecResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgExecResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgExecResponse { + return MsgExecResponse.deserialize(bytes); + } + } + export class MsgRevoke extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: string; + msg_type_url?: 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 ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("msg_type_url" in data && data.msg_type_url != undefined) { + this.msg_type_url = data.msg_type_url; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + get msg_type_url() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set msg_type_url(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + granter?: string; + grantee?: string; + msg_type_url?: string; + }): MsgRevoke { + const message = new MsgRevoke({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.msg_type_url != null) { + message.msg_type_url = data.msg_type_url; + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + msg_type_url?: string; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + if (this.msg_type_url != null) { + data.msg_type_url = this.msg_type_url; + } + 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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (this.msg_type_url.length) + writer.writeString(3, this.msg_type_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRevoke { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRevoke(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + case 3: + message.msg_type_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRevoke { + return MsgRevoke.deserialize(bytes); + } + } + export class MsgRevokeResponse 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: {}): MsgRevokeResponse { + const message = new MsgRevokeResponse({}); + 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): MsgRevokeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRevokeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRevokeResponse { + return MsgRevokeResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + Grant: { + path: "/cosmos.authz.v1beta1.Msg/Grant", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgGrant) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgGrant.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgGrantResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgGrantResponse.deserialize(new Uint8Array(bytes)) + }, + Exec: { + path: "/cosmos.authz.v1beta1.Msg/Exec", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgExec) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgExec.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgExecResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgExecResponse.deserialize(new Uint8Array(bytes)) + }, + Revoke: { + path: "/cosmos.authz.v1beta1.Msg/Revoke", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRevoke) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRevoke.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRevokeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRevokeResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Grant(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Exec(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Revoke(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Grant: GrpcUnaryServiceInterface = (message: MsgGrant, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Grant(message, metadata, options, callback); + }; + Exec: GrpcUnaryServiceInterface = (message: MsgExec, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Exec(message, metadata, options, callback); + }; + Revoke: GrpcUnaryServiceInterface = (message: MsgRevoke, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Revoke(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/authz/v1beta1/tx_pb.d.ts b/codegen/cosmos/authz/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/tx_pb.d.ts rename to codegen/cosmos/authz/v1beta1/tx_pb.d.ts index b6b74e3..44a0e5e 100644 --- a/proto/cosmos/authz/v1beta1/tx_pb.d.ts +++ b/codegen/cosmos/authz/v1beta1/tx_pb.d.ts @@ -39,27 +39,19 @@ export namespace MsgGrant { } } -export class MsgExecResponse extends jspb.Message { - clearResultsList(): void; - getResultsList(): Array; - getResultsList_asU8(): Array; - getResultsList_asB64(): Array; - setResultsList(value: Array): void; - addResults(value: Uint8Array | string, index?: number): Uint8Array | string; - +export class MsgGrantResponse extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgExecResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgExecResponse): MsgExecResponse.AsObject; + toObject(includeInstance?: boolean): MsgGrantResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgGrantResponse): MsgGrantResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgExecResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgExecResponse; - static deserializeBinaryFromReader(message: MsgExecResponse, reader: jspb.BinaryReader): MsgExecResponse; + static serializeBinaryToWriter(message: MsgGrantResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgGrantResponse; + static deserializeBinaryFromReader(message: MsgGrantResponse, reader: jspb.BinaryReader): MsgGrantResponse; } -export namespace MsgExecResponse { +export namespace MsgGrantResponse { export type AsObject = { - resultsList: Array, } } @@ -89,19 +81,27 @@ export namespace MsgExec { } } -export class MsgGrantResponse extends jspb.Message { +export class MsgExecResponse extends jspb.Message { + clearResultsList(): void; + getResultsList(): Array; + getResultsList_asU8(): Array; + getResultsList_asB64(): Array; + setResultsList(value: Array): void; + addResults(value: Uint8Array | string, index?: number): Uint8Array | string; + serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgGrantResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgGrantResponse): MsgGrantResponse.AsObject; + toObject(includeInstance?: boolean): MsgExecResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgExecResponse): MsgExecResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgGrantResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgGrantResponse; - static deserializeBinaryFromReader(message: MsgGrantResponse, reader: jspb.BinaryReader): MsgGrantResponse; + static serializeBinaryToWriter(message: MsgExecResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgExecResponse; + static deserializeBinaryFromReader(message: MsgExecResponse, reader: jspb.BinaryReader): MsgExecResponse; } -export namespace MsgGrantResponse { +export namespace MsgExecResponse { export type AsObject = { + resultsList: Array, } } diff --git a/proto/cosmos/authz/v1beta1/tx_pb.js b/codegen/cosmos/authz/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/authz/v1beta1/tx_pb.js rename to codegen/cosmos/authz/v1beta1/tx_pb.js index 3758935..83ce5db 100644 --- a/proto/cosmos/authz/v1beta1/tx_pb.js +++ b/codegen/cosmos/authz/v1beta1/tx_pb.js @@ -64,16 +64,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.cosmos.authz.v1beta1.MsgExecResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.MsgExecResponse.repeatedFields_, null); +proto.cosmos.authz.v1beta1.MsgGrantResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.authz.v1beta1.MsgExecResponse, jspb.Message); +goog.inherits(proto.cosmos.authz.v1beta1.MsgGrantResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.authz.v1beta1.MsgExecResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgExecResponse'; + proto.cosmos.authz.v1beta1.MsgGrantResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgGrantResponse'; } /** * Generated by JsPbCodeGenerator. @@ -106,16 +106,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.cosmos.authz.v1beta1.MsgGrantResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.cosmos.authz.v1beta1.MsgExecResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.authz.v1beta1.MsgExecResponse.repeatedFields_, null); }; -goog.inherits(proto.cosmos.authz.v1beta1.MsgGrantResponse, jspb.Message); +goog.inherits(proto.cosmos.authz.v1beta1.MsgExecResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.authz.v1beta1.MsgGrantResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgGrantResponse'; + proto.cosmos.authz.v1beta1.MsgExecResponse.displayName = 'proto.cosmos.authz.v1beta1.MsgExecResponse'; } /** * Generated by JsPbCodeGenerator. @@ -371,13 +371,6 @@ proto.cosmos.authz.v1beta1.MsgGrant.prototype.hasGrant = function() { -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cosmos.authz.v1beta1.MsgExecResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -393,8 +386,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.authz.v1beta1.MsgExecResponse.toObject(opt_includeInstance, this); +proto.cosmos.authz.v1beta1.MsgGrantResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgGrantResponse.toObject(opt_includeInstance, this); }; @@ -403,13 +396,13 @@ proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.authz.v1beta1.MsgExecResponse} msg The msg instance to transform. + * @param {!proto.cosmos.authz.v1beta1.MsgGrantResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.authz.v1beta1.MsgExecResponse.toObject = function(includeInstance, msg) { +proto.cosmos.authz.v1beta1.MsgGrantResponse.toObject = function(includeInstance, msg) { var f, obj = { - resultsList: msg.getResultsList_asB64() + }; if (includeInstance) { @@ -423,33 +416,29 @@ proto.cosmos.authz.v1beta1.MsgExecResponse.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} + * @return {!proto.cosmos.authz.v1beta1.MsgGrantResponse} */ -proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinary = function(bytes) { +proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.authz.v1beta1.MsgExecResponse; - return proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.authz.v1beta1.MsgGrantResponse; + return proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.authz.v1beta1.MsgExecResponse} msg The message object to deserialize into. + * @param {!proto.cosmos.authz.v1beta1.MsgGrantResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} + * @return {!proto.cosmos.authz.v1beta1.MsgGrantResponse} */ -proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addResults(value); - break; default: reader.skipField(); break; @@ -463,9 +452,9 @@ proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.serializeBinary = function() { +proto.cosmos.authz.v1beta1.MsgGrantResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.authz.v1beta1.MsgExecResponse.serializeBinaryToWriter(this, writer); + proto.cosmos.authz.v1beta1.MsgGrantResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -473,80 +462,12 @@ proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.authz.v1beta1.MsgExecResponse} message + * @param {!proto.cosmos.authz.v1beta1.MsgGrantResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.authz.v1beta1.MsgExecResponse.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.authz.v1beta1.MsgGrantResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getResultsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } -}; - - -/** - * repeated bytes results = 1; - * @return {!(Array|Array)} - */ -proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes results = 1; - * This is a type-conversion wrapper around `getResultsList()` - * @return {!Array} - */ -proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getResultsList())); -}; - - -/** - * repeated bytes results = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getResultsList()` - * @return {!Array} - */ -proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getResultsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this - */ -proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.setResultsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this - */ -proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.addResults = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this - */ -proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.clearResultsList = function() { - return this.setResultsList([]); }; @@ -741,6 +662,13 @@ proto.cosmos.authz.v1beta1.MsgExec.prototype.clearMsgsList = function() { +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -756,8 +684,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.authz.v1beta1.MsgGrantResponse.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.authz.v1beta1.MsgGrantResponse.toObject(opt_includeInstance, this); +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.authz.v1beta1.MsgExecResponse.toObject(opt_includeInstance, this); }; @@ -766,13 +694,13 @@ proto.cosmos.authz.v1beta1.MsgGrantResponse.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.authz.v1beta1.MsgGrantResponse} msg The msg instance to transform. + * @param {!proto.cosmos.authz.v1beta1.MsgExecResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.authz.v1beta1.MsgGrantResponse.toObject = function(includeInstance, msg) { +proto.cosmos.authz.v1beta1.MsgExecResponse.toObject = function(includeInstance, msg) { var f, obj = { - + resultsList: msg.getResultsList_asB64() }; if (includeInstance) { @@ -786,29 +714,33 @@ proto.cosmos.authz.v1beta1.MsgGrantResponse.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.authz.v1beta1.MsgGrantResponse} + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} */ -proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinary = function(bytes) { +proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.authz.v1beta1.MsgGrantResponse; - return proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.authz.v1beta1.MsgExecResponse; + return proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.authz.v1beta1.MsgGrantResponse} msg The message object to deserialize into. + * @param {!proto.cosmos.authz.v1beta1.MsgExecResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.authz.v1beta1.MsgGrantResponse} + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} */ -proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.authz.v1beta1.MsgExecResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addResults(value); + break; default: reader.skipField(); break; @@ -822,9 +754,9 @@ proto.cosmos.authz.v1beta1.MsgGrantResponse.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.authz.v1beta1.MsgGrantResponse.prototype.serializeBinary = function() { +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.authz.v1beta1.MsgGrantResponse.serializeBinaryToWriter(this, writer); + proto.cosmos.authz.v1beta1.MsgExecResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -832,12 +764,80 @@ proto.cosmos.authz.v1beta1.MsgGrantResponse.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.authz.v1beta1.MsgGrantResponse} message + * @param {!proto.cosmos.authz.v1beta1.MsgExecResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.authz.v1beta1.MsgGrantResponse.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.authz.v1beta1.MsgExecResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getResultsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes results = 1; + * @return {!(Array|Array)} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes results = 1; + * This is a type-conversion wrapper around `getResultsList()` + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getResultsList())); +}; + + +/** + * repeated bytes results = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResultsList()` + * @return {!Array} + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.getResultsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getResultsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.setResultsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.addResults = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.authz.v1beta1.MsgExecResponse} returns this + */ +proto.cosmos.authz.v1beta1.MsgExecResponse.prototype.clearResultsList = function() { + return this.setResultsList([]); }; diff --git a/proto/cosmos/authz/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/authz/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/authz/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/authz/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/authz/v1beta1/tx_pb_service.js b/codegen/cosmos/authz/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/authz/v1beta1/tx_pb_service.js rename to codegen/cosmos/authz/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/autocli/v1/options.ts b/codegen/cosmos/autocli/v1/options.ts new file mode 100644 index 0000000..bfee8a2 --- /dev/null +++ b/codegen/cosmos/autocli/v1/options.ts @@ -0,0 +1,860 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/autocli/v1/options.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace cosmos.autocli.v1 { + export class ModuleOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx?: ServiceCommandDescriptor; + query?: ServiceCommandDescriptor; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + if ("query" in data && data.query != undefined) { + this.query = data.query; + } + } + } + get tx() { + return pb_1.Message.getWrapperField(this, ServiceCommandDescriptor, 1) as ServiceCommandDescriptor; + } + set tx(value: ServiceCommandDescriptor) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tx() { + return pb_1.Message.getField(this, 1) != null; + } + get query() { + return pb_1.Message.getWrapperField(this, ServiceCommandDescriptor, 2) as ServiceCommandDescriptor; + } + set query(value: ServiceCommandDescriptor) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_query() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + tx?: ReturnType; + query?: ReturnType; + }): ModuleOptions { + const message = new ModuleOptions({}); + if (data.tx != null) { + message.tx = ServiceCommandDescriptor.fromObject(data.tx); + } + if (data.query != null) { + message.query = ServiceCommandDescriptor.fromObject(data.query); + } + return message; + } + toObject() { + const data: { + tx?: ReturnType; + query?: ReturnType; + } = {}; + if (this.tx != null) { + data.tx = this.tx.toObject(); + } + if (this.query != null) { + data.query = this.query.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_tx) + writer.writeMessage(1, this.tx, () => this.tx.serialize(writer)); + if (this.has_query) + writer.writeMessage(2, this.query, () => this.query.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModuleOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModuleOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tx, () => message.tx = ServiceCommandDescriptor.deserialize(reader)); + break; + case 2: + reader.readMessage(message.query, () => message.query = ServiceCommandDescriptor.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ModuleOptions { + return ModuleOptions.deserialize(bytes); + } + } + export class ServiceCommandDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + service?: string; + rpc_command_options?: RpcCommandOptions[]; + sub_commands?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("service" in data && data.service != undefined) { + this.service = data.service; + } + if ("rpc_command_options" in data && data.rpc_command_options != undefined) { + this.rpc_command_options = data.rpc_command_options; + } + if ("sub_commands" in data && data.sub_commands != undefined) { + this.sub_commands = data.sub_commands; + } + } + if (!this.sub_commands) + this.sub_commands = new Map(); + } + get service() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set service(value: string) { + pb_1.Message.setField(this, 1, value); + } + get rpc_command_options() { + return pb_1.Message.getRepeatedWrapperField(this, RpcCommandOptions, 2) as RpcCommandOptions[]; + } + set rpc_command_options(value: RpcCommandOptions[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get sub_commands() { + return pb_1.Message.getField(this, 3) as any as Map; + } + set sub_commands(value: Map) { + pb_1.Message.setField(this, 3, value as any); + } + static fromObject(data: { + service?: string; + rpc_command_options?: ReturnType[]; + sub_commands?: { + [key: string]: ReturnType; + }; + }): ServiceCommandDescriptor { + const message = new ServiceCommandDescriptor({}); + if (data.service != null) { + message.service = data.service; + } + if (data.rpc_command_options != null) { + message.rpc_command_options = data.rpc_command_options.map(item => RpcCommandOptions.fromObject(item)); + } + if (typeof data.sub_commands == "object") { + message.sub_commands = new Map(Object.entries(data.sub_commands).map(([key, value]) => [key, ServiceCommandDescriptor.fromObject(value)])); + } + return message; + } + toObject() { + const data: { + service?: string; + rpc_command_options?: ReturnType[]; + sub_commands?: { + [key: string]: ReturnType; + }; + } = {}; + if (this.service != null) { + data.service = this.service; + } + if (this.rpc_command_options != null) { + data.rpc_command_options = this.rpc_command_options.map((item: RpcCommandOptions) => item.toObject()); + } + if (this.sub_commands != null) { + data.sub_commands = (Object.fromEntries)((Array.from)(this.sub_commands).map(([key, value]) => [key, value.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.service.length) + writer.writeString(1, this.service); + if (this.rpc_command_options.length) + writer.writeRepeatedMessage(2, this.rpc_command_options, (item: RpcCommandOptions) => item.serialize(writer)); + for (const [key, value] of this.sub_commands) { + writer.writeMessage(3, this.sub_commands, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ServiceCommandDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ServiceCommandDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.service = reader.readString(); + break; + case 2: + reader.readMessage(message.rpc_command_options, () => pb_1.Message.addToRepeatedWrapperField(message, 2, RpcCommandOptions.deserialize(reader), RpcCommandOptions)); + break; + case 3: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.sub_commands as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = ServiceCommandDescriptor.deserialize(reader)); + return value; + })); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ServiceCommandDescriptor { + return ServiceCommandDescriptor.deserialize(bytes); + } + } + export class RpcCommandOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + rpc_method?: string; + use?: string; + long?: string; + short?: string; + example?: string; + alias?: string[]; + suggest_for?: string[]; + deprecated?: string; + version?: string; + flag_options?: Map; + positional_args?: PositionalArgDescriptor[]; + skip?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6, 7, 11], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("rpc_method" in data && data.rpc_method != undefined) { + this.rpc_method = data.rpc_method; + } + if ("use" in data && data.use != undefined) { + this.use = data.use; + } + if ("long" in data && data.long != undefined) { + this.long = data.long; + } + if ("short" in data && data.short != undefined) { + this.short = data.short; + } + if ("example" in data && data.example != undefined) { + this.example = data.example; + } + if ("alias" in data && data.alias != undefined) { + this.alias = data.alias; + } + if ("suggest_for" in data && data.suggest_for != undefined) { + this.suggest_for = data.suggest_for; + } + if ("deprecated" in data && data.deprecated != undefined) { + this.deprecated = data.deprecated; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("flag_options" in data && data.flag_options != undefined) { + this.flag_options = data.flag_options; + } + if ("positional_args" in data && data.positional_args != undefined) { + this.positional_args = data.positional_args; + } + if ("skip" in data && data.skip != undefined) { + this.skip = data.skip; + } + } + if (!this.flag_options) + this.flag_options = new Map(); + } + get rpc_method() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set rpc_method(value: string) { + pb_1.Message.setField(this, 1, value); + } + get use() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set use(value: string) { + pb_1.Message.setField(this, 2, value); + } + get long() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set long(value: string) { + pb_1.Message.setField(this, 3, value); + } + get short() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set short(value: string) { + pb_1.Message.setField(this, 4, value); + } + get example() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set example(value: string) { + pb_1.Message.setField(this, 5, value); + } + get alias() { + return pb_1.Message.getFieldWithDefault(this, 6, []) as string[]; + } + set alias(value: string[]) { + pb_1.Message.setField(this, 6, value); + } + get suggest_for() { + return pb_1.Message.getFieldWithDefault(this, 7, []) as string[]; + } + set suggest_for(value: string[]) { + pb_1.Message.setField(this, 7, value); + } + get deprecated() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set deprecated(value: string) { + pb_1.Message.setField(this, 8, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 9, value); + } + get flag_options() { + return pb_1.Message.getField(this, 10) as any as Map; + } + set flag_options(value: Map) { + pb_1.Message.setField(this, 10, value as any); + } + get positional_args() { + return pb_1.Message.getRepeatedWrapperField(this, PositionalArgDescriptor, 11) as PositionalArgDescriptor[]; + } + set positional_args(value: PositionalArgDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 11, value); + } + get skip() { + return pb_1.Message.getFieldWithDefault(this, 12, false) as boolean; + } + set skip(value: boolean) { + pb_1.Message.setField(this, 12, value); + } + static fromObject(data: { + rpc_method?: string; + use?: string; + long?: string; + short?: string; + example?: string; + alias?: string[]; + suggest_for?: string[]; + deprecated?: string; + version?: string; + flag_options?: { + [key: string]: ReturnType; + }; + positional_args?: ReturnType[]; + skip?: boolean; + }): RpcCommandOptions { + const message = new RpcCommandOptions({}); + if (data.rpc_method != null) { + message.rpc_method = data.rpc_method; + } + if (data.use != null) { + message.use = data.use; + } + if (data.long != null) { + message.long = data.long; + } + if (data.short != null) { + message.short = data.short; + } + if (data.example != null) { + message.example = data.example; + } + if (data.alias != null) { + message.alias = data.alias; + } + if (data.suggest_for != null) { + message.suggest_for = data.suggest_for; + } + if (data.deprecated != null) { + message.deprecated = data.deprecated; + } + if (data.version != null) { + message.version = data.version; + } + if (typeof data.flag_options == "object") { + message.flag_options = new Map(Object.entries(data.flag_options).map(([key, value]) => [key, FlagOptions.fromObject(value)])); + } + if (data.positional_args != null) { + message.positional_args = data.positional_args.map(item => PositionalArgDescriptor.fromObject(item)); + } + if (data.skip != null) { + message.skip = data.skip; + } + return message; + } + toObject() { + const data: { + rpc_method?: string; + use?: string; + long?: string; + short?: string; + example?: string; + alias?: string[]; + suggest_for?: string[]; + deprecated?: string; + version?: string; + flag_options?: { + [key: string]: ReturnType; + }; + positional_args?: ReturnType[]; + skip?: boolean; + } = {}; + if (this.rpc_method != null) { + data.rpc_method = this.rpc_method; + } + if (this.use != null) { + data.use = this.use; + } + if (this.long != null) { + data.long = this.long; + } + if (this.short != null) { + data.short = this.short; + } + if (this.example != null) { + data.example = this.example; + } + if (this.alias != null) { + data.alias = this.alias; + } + if (this.suggest_for != null) { + data.suggest_for = this.suggest_for; + } + if (this.deprecated != null) { + data.deprecated = this.deprecated; + } + if (this.version != null) { + data.version = this.version; + } + if (this.flag_options != null) { + data.flag_options = (Object.fromEntries)((Array.from)(this.flag_options).map(([key, value]) => [key, value.toObject()])); + } + if (this.positional_args != null) { + data.positional_args = this.positional_args.map((item: PositionalArgDescriptor) => item.toObject()); + } + if (this.skip != null) { + data.skip = this.skip; + } + 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.rpc_method.length) + writer.writeString(1, this.rpc_method); + if (this.use.length) + writer.writeString(2, this.use); + if (this.long.length) + writer.writeString(3, this.long); + if (this.short.length) + writer.writeString(4, this.short); + if (this.example.length) + writer.writeString(5, this.example); + if (this.alias.length) + writer.writeRepeatedString(6, this.alias); + if (this.suggest_for.length) + writer.writeRepeatedString(7, this.suggest_for); + if (this.deprecated.length) + writer.writeString(8, this.deprecated); + if (this.version.length) + writer.writeString(9, this.version); + for (const [key, value] of this.flag_options) { + writer.writeMessage(10, this.flag_options, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (this.positional_args.length) + writer.writeRepeatedMessage(11, this.positional_args, (item: PositionalArgDescriptor) => item.serialize(writer)); + if (this.skip != false) + writer.writeBool(12, this.skip); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RpcCommandOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RpcCommandOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.rpc_method = reader.readString(); + break; + case 2: + message.use = reader.readString(); + break; + case 3: + message.long = reader.readString(); + break; + case 4: + message.short = reader.readString(); + break; + case 5: + message.example = reader.readString(); + break; + case 6: + pb_1.Message.addToRepeatedField(message, 6, reader.readString()); + break; + case 7: + pb_1.Message.addToRepeatedField(message, 7, reader.readString()); + break; + case 8: + message.deprecated = reader.readString(); + break; + case 9: + message.version = reader.readString(); + break; + case 10: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.flag_options as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = FlagOptions.deserialize(reader)); + return value; + })); + break; + case 11: + reader.readMessage(message.positional_args, () => pb_1.Message.addToRepeatedWrapperField(message, 11, PositionalArgDescriptor.deserialize(reader), PositionalArgDescriptor)); + break; + case 12: + message.skip = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RpcCommandOptions { + return RpcCommandOptions.deserialize(bytes); + } + } + export class FlagOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + shorthand?: string; + usage?: string; + default_value?: string; + deprecated?: string; + shorthand_deprecated?: string; + hidden?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("shorthand" in data && data.shorthand != undefined) { + this.shorthand = data.shorthand; + } + if ("usage" in data && data.usage != undefined) { + this.usage = data.usage; + } + if ("default_value" in data && data.default_value != undefined) { + this.default_value = data.default_value; + } + if ("deprecated" in data && data.deprecated != undefined) { + this.deprecated = data.deprecated; + } + if ("shorthand_deprecated" in data && data.shorthand_deprecated != undefined) { + this.shorthand_deprecated = data.shorthand_deprecated; + } + if ("hidden" in data && data.hidden != undefined) { + this.hidden = data.hidden; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get shorthand() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set shorthand(value: string) { + pb_1.Message.setField(this, 2, value); + } + get usage() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set usage(value: string) { + pb_1.Message.setField(this, 3, value); + } + get default_value() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set default_value(value: string) { + pb_1.Message.setField(this, 4, value); + } + get deprecated() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set deprecated(value: string) { + pb_1.Message.setField(this, 6, value); + } + get shorthand_deprecated() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set shorthand_deprecated(value: string) { + pb_1.Message.setField(this, 7, value); + } + get hidden() { + return pb_1.Message.getFieldWithDefault(this, 8, false) as boolean; + } + set hidden(value: boolean) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + name?: string; + shorthand?: string; + usage?: string; + default_value?: string; + deprecated?: string; + shorthand_deprecated?: string; + hidden?: boolean; + }): FlagOptions { + const message = new FlagOptions({}); + if (data.name != null) { + message.name = data.name; + } + if (data.shorthand != null) { + message.shorthand = data.shorthand; + } + if (data.usage != null) { + message.usage = data.usage; + } + if (data.default_value != null) { + message.default_value = data.default_value; + } + if (data.deprecated != null) { + message.deprecated = data.deprecated; + } + if (data.shorthand_deprecated != null) { + message.shorthand_deprecated = data.shorthand_deprecated; + } + if (data.hidden != null) { + message.hidden = data.hidden; + } + return message; + } + toObject() { + const data: { + name?: string; + shorthand?: string; + usage?: string; + default_value?: string; + deprecated?: string; + shorthand_deprecated?: string; + hidden?: boolean; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.shorthand != null) { + data.shorthand = this.shorthand; + } + if (this.usage != null) { + data.usage = this.usage; + } + if (this.default_value != null) { + data.default_value = this.default_value; + } + if (this.deprecated != null) { + data.deprecated = this.deprecated; + } + if (this.shorthand_deprecated != null) { + data.shorthand_deprecated = this.shorthand_deprecated; + } + if (this.hidden != null) { + data.hidden = this.hidden; + } + 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.name.length) + writer.writeString(1, this.name); + if (this.shorthand.length) + writer.writeString(2, this.shorthand); + if (this.usage.length) + writer.writeString(3, this.usage); + if (this.default_value.length) + writer.writeString(4, this.default_value); + if (this.deprecated.length) + writer.writeString(6, this.deprecated); + if (this.shorthand_deprecated.length) + writer.writeString(7, this.shorthand_deprecated); + if (this.hidden != false) + writer.writeBool(8, this.hidden); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FlagOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FlagOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.shorthand = reader.readString(); + break; + case 3: + message.usage = reader.readString(); + break; + case 4: + message.default_value = reader.readString(); + break; + case 6: + message.deprecated = reader.readString(); + break; + case 7: + message.shorthand_deprecated = reader.readString(); + break; + case 8: + message.hidden = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FlagOptions { + return FlagOptions.deserialize(bytes); + } + } + export class PositionalArgDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proto_field?: string; + varargs?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proto_field" in data && data.proto_field != undefined) { + this.proto_field = data.proto_field; + } + if ("varargs" in data && data.varargs != undefined) { + this.varargs = data.varargs; + } + } + } + get proto_field() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set proto_field(value: string) { + pb_1.Message.setField(this, 1, value); + } + get varargs() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set varargs(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proto_field?: string; + varargs?: boolean; + }): PositionalArgDescriptor { + const message = new PositionalArgDescriptor({}); + if (data.proto_field != null) { + message.proto_field = data.proto_field; + } + if (data.varargs != null) { + message.varargs = data.varargs; + } + return message; + } + toObject() { + const data: { + proto_field?: string; + varargs?: boolean; + } = {}; + if (this.proto_field != null) { + data.proto_field = this.proto_field; + } + if (this.varargs != null) { + data.varargs = this.varargs; + } + 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.proto_field.length) + writer.writeString(1, this.proto_field); + if (this.varargs != false) + writer.writeBool(2, this.varargs); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PositionalArgDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PositionalArgDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proto_field = reader.readString(); + break; + case 2: + message.varargs = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PositionalArgDescriptor { + return PositionalArgDescriptor.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/autocli/v1/options_pb.d.ts b/codegen/cosmos/autocli/v1/options_pb.d.ts similarity index 98% rename from proto/cosmos/autocli/v1/options_pb.d.ts rename to codegen/cosmos/autocli/v1/options_pb.d.ts index 97349ae..535ca9a 100644 --- a/proto/cosmos/autocli/v1/options_pb.d.ts +++ b/codegen/cosmos/autocli/v1/options_pb.d.ts @@ -142,9 +142,6 @@ export class FlagOptions extends jspb.Message { getDefaultValue(): string; setDefaultValue(value: string): void; - getNoOptDefaultValue(): string; - setNoOptDefaultValue(value: string): void; - getDeprecated(): string; setDeprecated(value: string): void; @@ -170,7 +167,6 @@ export namespace FlagOptions { shorthand: string, usage: string, defaultValue: string, - noOptDefaultValue: string, deprecated: string, shorthandDeprecated: string, hidden: boolean, diff --git a/proto/cosmos/autocli/v1/options_pb.js b/codegen/cosmos/autocli/v1/options_pb.js similarity index 98% rename from proto/cosmos/autocli/v1/options_pb.js rename to codegen/cosmos/autocli/v1/options_pb.js index b60c17b..36cdd4b 100644 --- a/proto/cosmos/autocli/v1/options_pb.js +++ b/codegen/cosmos/autocli/v1/options_pb.js @@ -1117,7 +1117,6 @@ proto.cosmos.autocli.v1.FlagOptions.toObject = function(includeInstance, msg) { shorthand: jspb.Message.getFieldWithDefault(msg, 2, ""), usage: jspb.Message.getFieldWithDefault(msg, 3, ""), defaultValue: jspb.Message.getFieldWithDefault(msg, 4, ""), - noOptDefaultValue: jspb.Message.getFieldWithDefault(msg, 5, ""), deprecated: jspb.Message.getFieldWithDefault(msg, 6, ""), shorthandDeprecated: jspb.Message.getFieldWithDefault(msg, 7, ""), hidden: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) @@ -1173,10 +1172,6 @@ proto.cosmos.autocli.v1.FlagOptions.deserializeBinaryFromReader = function(msg, var value = /** @type {string} */ (reader.readString()); msg.setDefaultValue(value); break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setNoOptDefaultValue(value); - break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setDeprecated(value); @@ -1246,13 +1241,6 @@ proto.cosmos.autocli.v1.FlagOptions.serializeBinaryToWriter = function(message, f ); } - f = message.getNoOptDefaultValue(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } f = message.getDeprecated(); if (f.length > 0) { writer.writeString( @@ -1349,24 +1337,6 @@ proto.cosmos.autocli.v1.FlagOptions.prototype.setDefaultValue = function(value) }; -/** - * optional string no_opt_default_value = 5; - * @return {string} - */ -proto.cosmos.autocli.v1.FlagOptions.prototype.getNoOptDefaultValue = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cosmos.autocli.v1.FlagOptions} returns this - */ -proto.cosmos.autocli.v1.FlagOptions.prototype.setNoOptDefaultValue = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - /** * optional string deprecated = 6; * @return {string} diff --git a/proto/cosmos/autocli/v1/options_pb_service.d.ts b/codegen/cosmos/autocli/v1/options_pb_service.d.ts similarity index 100% rename from proto/cosmos/autocli/v1/options_pb_service.d.ts rename to codegen/cosmos/autocli/v1/options_pb_service.d.ts diff --git a/proto/cosmos/autocli/v1/options_pb_service.js b/codegen/cosmos/autocli/v1/options_pb_service.js similarity index 100% rename from proto/cosmos/autocli/v1/options_pb_service.js rename to codegen/cosmos/autocli/v1/options_pb_service.js diff --git a/codegen/cosmos/autocli/v1/query.ts b/codegen/cosmos/autocli/v1/query.ts new file mode 100644 index 0000000..2d72e5c --- /dev/null +++ b/codegen/cosmos/autocli/v1/query.ts @@ -0,0 +1,179 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/autocli/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./options"; +import * as dependency_2 from "./../../query/v1/query"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.autocli.v1 { + export class AppOptionsRequest 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: {}): AppOptionsRequest { + const message = new AppOptionsRequest({}); + 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): AppOptionsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AppOptionsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AppOptionsRequest { + return AppOptionsRequest.deserialize(bytes); + } + } + export class AppOptionsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + module_options?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("module_options" in data && data.module_options != undefined) { + this.module_options = data.module_options; + } + } + if (!this.module_options) + this.module_options = new Map(); + } + get module_options() { + return pb_1.Message.getField(this, 1) as any as Map; + } + set module_options(value: Map) { + pb_1.Message.setField(this, 1, value as any); + } + static fromObject(data: { + module_options?: { + [key: string]: ReturnType; + }; + }): AppOptionsResponse { + const message = new AppOptionsResponse({}); + if (typeof data.module_options == "object") { + message.module_options = new Map(Object.entries(data.module_options).map(([key, value]) => [key, dependency_1.cosmos.autocli.v1.ModuleOptions.fromObject(value)])); + } + return message; + } + toObject() { + const data: { + module_options?: { + [key: string]: ReturnType; + }; + } = {}; + if (this.module_options != null) { + data.module_options = (Object.fromEntries)((Array.from)(this.module_options).map(([key, value]) => [key, value.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(); + for (const [key, value] of this.module_options) { + writer.writeMessage(1, this.module_options, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AppOptionsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AppOptionsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.module_options as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_1.cosmos.autocli.v1.ModuleOptions.deserialize(reader)); + return value; + })); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AppOptionsResponse { + return AppOptionsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + AppOptions: { + path: "/cosmos.autocli.v1.Query/AppOptions", + requestStream: false, + responseStream: false, + requestSerialize: (message: AppOptionsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AppOptionsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AppOptionsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AppOptionsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract AppOptions(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + AppOptions: GrpcUnaryServiceInterface = (message: AppOptionsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AppOptions(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/autocli/v1/query_pb.d.ts b/codegen/cosmos/autocli/v1/query_pb.d.ts similarity index 100% rename from proto/cosmos/autocli/v1/query_pb.d.ts rename to codegen/cosmos/autocli/v1/query_pb.d.ts diff --git a/proto/cosmos/autocli/v1/query_pb.js b/codegen/cosmos/autocli/v1/query_pb.js similarity index 100% rename from proto/cosmos/autocli/v1/query_pb.js rename to codegen/cosmos/autocli/v1/query_pb.js diff --git a/proto/cosmos/autocli/v1/query_pb_service.d.ts b/codegen/cosmos/autocli/v1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/autocli/v1/query_pb_service.d.ts rename to codegen/cosmos/autocli/v1/query_pb_service.d.ts diff --git a/proto/cosmos/autocli/v1/query_pb_service.js b/codegen/cosmos/autocli/v1/query_pb_service.js similarity index 100% rename from proto/cosmos/autocli/v1/query_pb_service.js rename to codegen/cosmos/autocli/v1/query_pb_service.js diff --git a/codegen/cosmos/bank/module/v1/module.ts b/codegen/cosmos/bank/module/v1/module.ts new file mode 100644 index 0000000..43a02b7 --- /dev/null +++ b/codegen/cosmos/bank/module/v1/module.ts @@ -0,0 +1,122 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/bank/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.bank.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + blocked_module_accounts_override?: string[]; + authority?: string; + restrictions_order?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("blocked_module_accounts_override" in data && data.blocked_module_accounts_override != undefined) { + this.blocked_module_accounts_override = data.blocked_module_accounts_override; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("restrictions_order" in data && data.restrictions_order != undefined) { + this.restrictions_order = data.restrictions_order; + } + } + } + get blocked_module_accounts_override() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set blocked_module_accounts_override(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 2, value); + } + get restrictions_order() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set restrictions_order(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + blocked_module_accounts_override?: string[]; + authority?: string; + restrictions_order?: string[]; + }): Module { + const message = new Module({}); + if (data.blocked_module_accounts_override != null) { + message.blocked_module_accounts_override = data.blocked_module_accounts_override; + } + if (data.authority != null) { + message.authority = data.authority; + } + if (data.restrictions_order != null) { + message.restrictions_order = data.restrictions_order; + } + return message; + } + toObject() { + const data: { + blocked_module_accounts_override?: string[]; + authority?: string; + restrictions_order?: string[]; + } = {}; + if (this.blocked_module_accounts_override != null) { + data.blocked_module_accounts_override = this.blocked_module_accounts_override; + } + if (this.authority != null) { + data.authority = this.authority; + } + if (this.restrictions_order != null) { + data.restrictions_order = this.restrictions_order; + } + 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.blocked_module_accounts_override.length) + writer.writeRepeatedString(1, this.blocked_module_accounts_override); + if (this.authority.length) + writer.writeString(2, this.authority); + if (this.restrictions_order.length) + writer.writeRepeatedString(3, this.restrictions_order); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + message.authority = reader.readString(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/bank/module/v1/module_pb.d.ts b/codegen/cosmos/bank/module/v1/module_pb.d.ts similarity index 83% rename from proto/cosmos/bank/module/v1/module_pb.d.ts rename to codegen/cosmos/bank/module/v1/module_pb.d.ts index 5cb82e2..cdc10bd 100644 --- a/proto/cosmos/bank/module/v1/module_pb.d.ts +++ b/codegen/cosmos/bank/module/v1/module_pb.d.ts @@ -13,6 +13,11 @@ export class Module extends jspb.Message { getAuthority(): string; setAuthority(value: string): void; + clearRestrictionsOrderList(): void; + getRestrictionsOrderList(): Array; + setRestrictionsOrderList(value: Array): void; + addRestrictionsOrder(value: string, index?: number): string; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Module.AsObject; static toObject(includeInstance: boolean, msg: Module): Module.AsObject; @@ -27,6 +32,7 @@ export namespace Module { export type AsObject = { blockedModuleAccountsOverrideList: Array, authority: string, + restrictionsOrderList: Array, } } diff --git a/proto/cosmos/bank/module/v1/module_pb.js b/codegen/cosmos/bank/module/v1/module_pb.js similarity index 82% rename from proto/cosmos/bank/module/v1/module_pb.js rename to codegen/cosmos/bank/module/v1/module_pb.js index feb9f57..fb96d5d 100644 --- a/proto/cosmos/bank/module/v1/module_pb.js +++ b/codegen/cosmos/bank/module/v1/module_pb.js @@ -45,7 +45,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.cosmos.bank.module.v1.Module.repeatedFields_ = [1]; +proto.cosmos.bank.module.v1.Module.repeatedFields_ = [1,3]; @@ -79,7 +79,8 @@ proto.cosmos.bank.module.v1.Module.prototype.toObject = function(opt_includeInst proto.cosmos.bank.module.v1.Module.toObject = function(includeInstance, msg) { var f, obj = { blockedModuleAccountsOverrideList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - authority: jspb.Message.getFieldWithDefault(msg, 2, "") + authority: jspb.Message.getFieldWithDefault(msg, 2, ""), + restrictionsOrderList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f }; if (includeInstance) { @@ -124,6 +125,10 @@ proto.cosmos.bank.module.v1.Module.deserializeBinaryFromReader = function(msg, r var value = /** @type {string} */ (reader.readString()); msg.setAuthority(value); break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addRestrictionsOrder(value); + break; default: reader.skipField(); break; @@ -167,6 +172,13 @@ proto.cosmos.bank.module.v1.Module.serializeBinaryToWriter = function(message, w f ); } + f = message.getRestrictionsOrderList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } }; @@ -225,4 +237,41 @@ proto.cosmos.bank.module.v1.Module.prototype.setAuthority = function(value) { }; +/** + * repeated string restrictions_order = 3; + * @return {!Array} + */ +proto.cosmos.bank.module.v1.Module.prototype.getRestrictionsOrderList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.module.v1.Module} returns this + */ +proto.cosmos.bank.module.v1.Module.prototype.setRestrictionsOrderList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.module.v1.Module} returns this + */ +proto.cosmos.bank.module.v1.Module.prototype.addRestrictionsOrder = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.module.v1.Module} returns this + */ +proto.cosmos.bank.module.v1.Module.prototype.clearRestrictionsOrderList = function() { + return this.setRestrictionsOrderList([]); +}; + + goog.object.extend(exports, proto.cosmos.bank.module.v1); diff --git a/proto/cosmos/bank/module/v1/module_pb_service.d.ts b/codegen/cosmos/bank/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/bank/module/v1/module_pb_service.d.ts rename to codegen/cosmos/bank/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/bank/module/v1/module_pb_service.js b/codegen/cosmos/bank/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/bank/module/v1/module_pb_service.js rename to codegen/cosmos/bank/module/v1/module_pb_service.js diff --git a/codegen/cosmos/bank/v1beta1/authz.ts b/codegen/cosmos/bank/v1beta1/authz.ts new file mode 100644 index 0000000..0603fdc --- /dev/null +++ b/codegen/cosmos/bank/v1beta1/authz.ts @@ -0,0 +1,102 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/bank/v1beta1/authz.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../base/v1beta1/coin"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.bank.v1beta1 { + export class SendAuthorization extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + spend_limit?: dependency_4.cosmos.base.v1beta1.Coin[]; + allow_list?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("spend_limit" in data && data.spend_limit != undefined) { + this.spend_limit = data.spend_limit; + } + if ("allow_list" in data && data.allow_list != undefined) { + this.allow_list = data.allow_list; + } + } + } + get spend_limit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set spend_limit(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get allow_list() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set allow_list(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + spend_limit?: ReturnType[]; + allow_list?: string[]; + }): SendAuthorization { + const message = new SendAuthorization({}); + if (data.spend_limit != null) { + message.spend_limit = data.spend_limit.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.allow_list != null) { + message.allow_list = data.allow_list; + } + return message; + } + toObject() { + const data: { + spend_limit?: ReturnType[]; + allow_list?: string[]; + } = {}; + if (this.spend_limit != null) { + data.spend_limit = this.spend_limit.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.allow_list != null) { + data.allow_list = this.allow_list; + } + 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.spend_limit.length) + writer.writeRepeatedMessage(1, this.spend_limit, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.allow_list.length) + writer.writeRepeatedString(2, this.allow_list); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SendAuthorization { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SendAuthorization(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.spend_limit, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SendAuthorization { + return SendAuthorization.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/bank/v1beta1/authz_pb.d.ts b/codegen/cosmos/bank/v1beta1/authz_pb.d.ts similarity index 100% rename from proto/cosmos/bank/v1beta1/authz_pb.d.ts rename to codegen/cosmos/bank/v1beta1/authz_pb.d.ts diff --git a/proto/cosmos/bank/v1beta1/authz_pb.js b/codegen/cosmos/bank/v1beta1/authz_pb.js similarity index 100% rename from proto/cosmos/bank/v1beta1/authz_pb.js rename to codegen/cosmos/bank/v1beta1/authz_pb.js diff --git a/proto/cosmos/bank/v1beta1/authz_pb_service.d.ts b/codegen/cosmos/bank/v1beta1/authz_pb_service.d.ts similarity index 100% rename from proto/cosmos/bank/v1beta1/authz_pb_service.d.ts rename to codegen/cosmos/bank/v1beta1/authz_pb_service.d.ts diff --git a/proto/cosmos/bank/v1beta1/authz_pb_service.js b/codegen/cosmos/bank/v1beta1/authz_pb_service.js similarity index 100% rename from proto/cosmos/bank/v1beta1/authz_pb_service.js rename to codegen/cosmos/bank/v1beta1/authz_pb_service.js diff --git a/codegen/cosmos/bank/v1beta1/bank.ts b/codegen/cosmos/bank/v1beta1/bank.ts new file mode 100644 index 0000000..933545a --- /dev/null +++ b/codegen/cosmos/bank/v1beta1/bank.ts @@ -0,0 +1,785 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/bank/v1beta1/bank.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../base/v1beta1/coin"; +import * as dependency_4 from "./../../msg/v1/msg"; +import * as dependency_5 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.bank.v1beta1 { + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + /** @deprecated*/ + send_enabled?: SendEnabled[]; + default_send_enabled?: boolean; + }) { + 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 ("send_enabled" in data && data.send_enabled != undefined) { + this.send_enabled = data.send_enabled; + } + if ("default_send_enabled" in data && data.default_send_enabled != undefined) { + this.default_send_enabled = data.default_send_enabled; + } + } + } + /** @deprecated*/ + get send_enabled() { + return pb_1.Message.getRepeatedWrapperField(this, SendEnabled, 1) as SendEnabled[]; + } + /** @deprecated*/ + set send_enabled(value: SendEnabled[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get default_send_enabled() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set default_send_enabled(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + send_enabled?: ReturnType[]; + default_send_enabled?: boolean; + }): Params { + const message = new Params({}); + if (data.send_enabled != null) { + message.send_enabled = data.send_enabled.map(item => SendEnabled.fromObject(item)); + } + if (data.default_send_enabled != null) { + message.default_send_enabled = data.default_send_enabled; + } + return message; + } + toObject() { + const data: { + send_enabled?: ReturnType[]; + default_send_enabled?: boolean; + } = {}; + if (this.send_enabled != null) { + data.send_enabled = this.send_enabled.map((item: SendEnabled) => item.toObject()); + } + if (this.default_send_enabled != null) { + data.default_send_enabled = this.default_send_enabled; + } + 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.send_enabled.length) + writer.writeRepeatedMessage(1, this.send_enabled, (item: SendEnabled) => item.serialize(writer)); + if (this.default_send_enabled != false) + writer.writeBool(2, this.default_send_enabled); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.send_enabled, () => pb_1.Message.addToRepeatedWrapperField(message, 1, SendEnabled.deserialize(reader), SendEnabled)); + break; + case 2: + message.default_send_enabled = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } + export class SendEnabled extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: string; + enabled?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + if ("enabled" in data && data.enabled != undefined) { + this.enabled = data.enabled; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + get enabled() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set enabled(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + denom?: string; + enabled?: boolean; + }): SendEnabled { + const message = new SendEnabled({}); + if (data.denom != null) { + message.denom = data.denom; + } + if (data.enabled != null) { + message.enabled = data.enabled; + } + return message; + } + toObject() { + const data: { + denom?: string; + enabled?: boolean; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + if (this.enabled != null) { + data.enabled = this.enabled; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (this.enabled != false) + writer.writeBool(2, this.enabled); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SendEnabled { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SendEnabled(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + case 2: + message.enabled = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SendEnabled { + return SendEnabled.deserialize(bytes); + } + } + export class Input extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + coins?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("coins" in data && data.coins != undefined) { + this.coins = data.coins; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get coins() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 2) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set coins(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + address?: string; + coins?: ReturnType[]; + }): Input { + const message = new Input({}); + if (data.address != null) { + message.address = data.address; + } + if (data.coins != null) { + message.coins = data.coins.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + address?: string; + coins?: ReturnType[]; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.coins != null) { + data.coins = this.coins.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.address.length) + writer.writeString(1, this.address); + if (this.coins.length) + writer.writeRepeatedMessage(2, this.coins, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Input { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Input(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Input { + return Input.deserialize(bytes); + } + } + export class Output extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + coins?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("coins" in data && data.coins != undefined) { + this.coins = data.coins; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get coins() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 2) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set coins(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + address?: string; + coins?: ReturnType[]; + }): Output { + const message = new Output({}); + if (data.address != null) { + message.address = data.address; + } + if (data.coins != null) { + message.coins = data.coins.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + address?: string; + coins?: ReturnType[]; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.coins != null) { + data.coins = this.coins.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.address.length) + writer.writeString(1, this.address); + if (this.coins.length) + writer.writeRepeatedMessage(2, this.coins, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Output { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Output(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Output { + return Output.deserialize(bytes); + } + } + /** @deprecated*/ + export class Supply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + total?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + 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 ("total" in data && data.total != undefined) { + this.total = data.total; + } + } + } + get total() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 1) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set total(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + total?: ReturnType[]; + }): Supply { + const message = new Supply({}); + if (data.total != null) { + message.total = data.total.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + total?: ReturnType[]; + } = {}; + if (this.total != null) { + data.total = this.total.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.total.length) + writer.writeRepeatedMessage(1, this.total, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Supply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Supply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.total, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Supply { + return Supply.deserialize(bytes); + } + } + export class DenomUnit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: string; + exponent?: number; + aliases?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + if ("exponent" in data && data.exponent != undefined) { + this.exponent = data.exponent; + } + if ("aliases" in data && data.aliases != undefined) { + this.aliases = data.aliases; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + get exponent() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set exponent(value: number) { + pb_1.Message.setField(this, 2, value); + } + get aliases() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set aliases(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + denom?: string; + exponent?: number; + aliases?: string[]; + }): DenomUnit { + const message = new DenomUnit({}); + if (data.denom != null) { + message.denom = data.denom; + } + if (data.exponent != null) { + message.exponent = data.exponent; + } + if (data.aliases != null) { + message.aliases = data.aliases; + } + return message; + } + toObject() { + const data: { + denom?: string; + exponent?: number; + aliases?: string[]; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + if (this.exponent != null) { + data.exponent = this.exponent; + } + if (this.aliases != null) { + data.aliases = this.aliases; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (this.exponent != 0) + writer.writeUint32(2, this.exponent); + if (this.aliases.length) + writer.writeRepeatedString(3, this.aliases); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DenomUnit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DenomUnit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + case 2: + message.exponent = reader.readUint32(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DenomUnit { + return DenomUnit.deserialize(bytes); + } + } + export class Metadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + description?: string; + denom_units?: DenomUnit[]; + base?: string; + display?: string; + name?: string; + symbol?: string; + uri?: string; + uri_hash?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("denom_units" in data && data.denom_units != undefined) { + this.denom_units = data.denom_units; + } + if ("base" in data && data.base != undefined) { + this.base = data.base; + } + if ("display" in data && data.display != undefined) { + this.display = data.display; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("symbol" in data && data.symbol != undefined) { + this.symbol = data.symbol; + } + if ("uri" in data && data.uri != undefined) { + this.uri = data.uri; + } + if ("uri_hash" in data && data.uri_hash != undefined) { + this.uri_hash = data.uri_hash; + } + } + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 1, value); + } + get denom_units() { + return pb_1.Message.getRepeatedWrapperField(this, DenomUnit, 2) as DenomUnit[]; + } + set denom_units(value: DenomUnit[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get base() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set base(value: string) { + pb_1.Message.setField(this, 3, value); + } + get display() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set display(value: string) { + pb_1.Message.setField(this, 4, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 5, value); + } + get symbol() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set symbol(value: string) { + pb_1.Message.setField(this, 6, value); + } + get uri() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set uri(value: string) { + pb_1.Message.setField(this, 7, value); + } + get uri_hash() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set uri_hash(value: string) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + description?: string; + denom_units?: ReturnType[]; + base?: string; + display?: string; + name?: string; + symbol?: string; + uri?: string; + uri_hash?: string; + }): Metadata { + const message = new Metadata({}); + if (data.description != null) { + message.description = data.description; + } + if (data.denom_units != null) { + message.denom_units = data.denom_units.map(item => DenomUnit.fromObject(item)); + } + if (data.base != null) { + message.base = data.base; + } + if (data.display != null) { + message.display = data.display; + } + if (data.name != null) { + message.name = data.name; + } + if (data.symbol != null) { + message.symbol = data.symbol; + } + if (data.uri != null) { + message.uri = data.uri; + } + if (data.uri_hash != null) { + message.uri_hash = data.uri_hash; + } + return message; + } + toObject() { + const data: { + description?: string; + denom_units?: ReturnType[]; + base?: string; + display?: string; + name?: string; + symbol?: string; + uri?: string; + uri_hash?: string; + } = {}; + if (this.description != null) { + data.description = this.description; + } + if (this.denom_units != null) { + data.denom_units = this.denom_units.map((item: DenomUnit) => item.toObject()); + } + if (this.base != null) { + data.base = this.base; + } + if (this.display != null) { + data.display = this.display; + } + if (this.name != null) { + data.name = this.name; + } + if (this.symbol != null) { + data.symbol = this.symbol; + } + if (this.uri != null) { + data.uri = this.uri; + } + if (this.uri_hash != null) { + data.uri_hash = this.uri_hash; + } + 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.description.length) + writer.writeString(1, this.description); + if (this.denom_units.length) + writer.writeRepeatedMessage(2, this.denom_units, (item: DenomUnit) => item.serialize(writer)); + if (this.base.length) + writer.writeString(3, this.base); + if (this.display.length) + writer.writeString(4, this.display); + if (this.name.length) + writer.writeString(5, this.name); + if (this.symbol.length) + writer.writeString(6, this.symbol); + if (this.uri.length) + writer.writeString(7, this.uri); + if (this.uri_hash.length) + writer.writeString(8, this.uri_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Metadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Metadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.description = reader.readString(); + break; + case 2: + reader.readMessage(message.denom_units, () => pb_1.Message.addToRepeatedWrapperField(message, 2, DenomUnit.deserialize(reader), DenomUnit)); + break; + case 3: + message.base = reader.readString(); + break; + case 4: + message.display = reader.readString(); + break; + case 5: + message.name = reader.readString(); + break; + case 6: + message.symbol = reader.readString(); + break; + case 7: + message.uri = reader.readString(); + break; + case 8: + message.uri_hash = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Metadata { + return Metadata.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/bank/v1beta1/bank_pb.d.ts b/codegen/cosmos/bank/v1beta1/bank_pb.d.ts similarity index 100% rename from proto/cosmos/bank/v1beta1/bank_pb.d.ts rename to codegen/cosmos/bank/v1beta1/bank_pb.d.ts diff --git a/proto/cosmos/bank/v1beta1/bank_pb.js b/codegen/cosmos/bank/v1beta1/bank_pb.js similarity index 100% rename from proto/cosmos/bank/v1beta1/bank_pb.js rename to codegen/cosmos/bank/v1beta1/bank_pb.js diff --git a/proto/cosmos/bank/v1beta1/bank_pb_service.d.ts b/codegen/cosmos/bank/v1beta1/bank_pb_service.d.ts similarity index 100% rename from proto/cosmos/bank/v1beta1/bank_pb_service.d.ts rename to codegen/cosmos/bank/v1beta1/bank_pb_service.d.ts diff --git a/proto/cosmos/bank/v1beta1/bank_pb_service.js b/codegen/cosmos/bank/v1beta1/bank_pb_service.js similarity index 100% rename from proto/cosmos/bank/v1beta1/bank_pb_service.js rename to codegen/cosmos/bank/v1beta1/bank_pb_service.js diff --git a/codegen/cosmos/bank/v1beta1/genesis.ts b/codegen/cosmos/bank/v1beta1/genesis.ts new file mode 100644 index 0000000..069b56d --- /dev/null +++ b/codegen/cosmos/bank/v1beta1/genesis.ts @@ -0,0 +1,265 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/bank/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../base/v1beta1/coin"; +import * as dependency_3 from "./bank"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.bank.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_3.cosmos.bank.v1beta1.Params; + balances?: Balance[]; + supply?: dependency_2.cosmos.base.v1beta1.Coin[]; + denom_metadata?: dependency_3.cosmos.bank.v1beta1.Metadata[]; + send_enabled?: dependency_3.cosmos.bank.v1beta1.SendEnabled[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4, 5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("balances" in data && data.balances != undefined) { + this.balances = data.balances; + } + if ("supply" in data && data.supply != undefined) { + this.supply = data.supply; + } + if ("denom_metadata" in data && data.denom_metadata != undefined) { + this.denom_metadata = data.denom_metadata; + } + if ("send_enabled" in data && data.send_enabled != undefined) { + this.send_enabled = data.send_enabled; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.bank.v1beta1.Params, 1) as dependency_3.cosmos.bank.v1beta1.Params; + } + set params(value: dependency_3.cosmos.bank.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get balances() { + return pb_1.Message.getRepeatedWrapperField(this, Balance, 2) as Balance[]; + } + set balances(value: Balance[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get supply() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set supply(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get denom_metadata() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.bank.v1beta1.Metadata, 4) as dependency_3.cosmos.bank.v1beta1.Metadata[]; + } + set denom_metadata(value: dependency_3.cosmos.bank.v1beta1.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get send_enabled() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.bank.v1beta1.SendEnabled, 5) as dependency_3.cosmos.bank.v1beta1.SendEnabled[]; + } + set send_enabled(value: dependency_3.cosmos.bank.v1beta1.SendEnabled[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + static fromObject(data: { + params?: ReturnType; + balances?: ReturnType[]; + supply?: ReturnType[]; + denom_metadata?: ReturnType[]; + send_enabled?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = dependency_3.cosmos.bank.v1beta1.Params.fromObject(data.params); + } + if (data.balances != null) { + message.balances = data.balances.map(item => Balance.fromObject(item)); + } + if (data.supply != null) { + message.supply = data.supply.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.denom_metadata != null) { + message.denom_metadata = data.denom_metadata.map(item => dependency_3.cosmos.bank.v1beta1.Metadata.fromObject(item)); + } + if (data.send_enabled != null) { + message.send_enabled = data.send_enabled.map(item => dependency_3.cosmos.bank.v1beta1.SendEnabled.fromObject(item)); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + balances?: ReturnType[]; + supply?: ReturnType[]; + denom_metadata?: ReturnType[]; + send_enabled?: ReturnType[]; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.balances != null) { + data.balances = this.balances.map((item: Balance) => item.toObject()); + } + if (this.supply != null) { + data.supply = this.supply.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.denom_metadata != null) { + data.denom_metadata = this.denom_metadata.map((item: dependency_3.cosmos.bank.v1beta1.Metadata) => item.toObject()); + } + if (this.send_enabled != null) { + data.send_enabled = this.send_enabled.map((item: dependency_3.cosmos.bank.v1beta1.SendEnabled) => item.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.balances.length) + writer.writeRepeatedMessage(2, this.balances, (item: Balance) => item.serialize(writer)); + if (this.supply.length) + writer.writeRepeatedMessage(3, this.supply, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.denom_metadata.length) + writer.writeRepeatedMessage(4, this.denom_metadata, (item: dependency_3.cosmos.bank.v1beta1.Metadata) => item.serialize(writer)); + if (this.send_enabled.length) + writer.writeRepeatedMessage(5, this.send_enabled, (item: dependency_3.cosmos.bank.v1beta1.SendEnabled) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_3.cosmos.bank.v1beta1.Params.deserialize(reader)); + break; + case 2: + reader.readMessage(message.balances, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Balance.deserialize(reader), Balance)); + break; + case 3: + reader.readMessage(message.supply, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + case 4: + reader.readMessage(message.denom_metadata, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_3.cosmos.bank.v1beta1.Metadata.deserialize(reader), dependency_3.cosmos.bank.v1beta1.Metadata)); + break; + case 5: + reader.readMessage(message.send_enabled, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_3.cosmos.bank.v1beta1.SendEnabled.deserialize(reader), dependency_3.cosmos.bank.v1beta1.SendEnabled)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class Balance extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + coins?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("coins" in data && data.coins != undefined) { + this.coins = data.coins; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get coins() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 2) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + address?: string; + coins?: ReturnType[]; + }): Balance { + const message = new Balance({}); + if (data.address != null) { + message.address = data.address; + } + if (data.coins != null) { + message.coins = data.coins.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + address?: string; + coins?: ReturnType[]; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.coins != null) { + data.coins = this.coins.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.address.length) + writer.writeString(1, this.address); + if (this.coins.length) + writer.writeRepeatedMessage(2, this.coins, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Balance { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Balance(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Balance { + return Balance.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/bank/v1beta1/genesis_pb.d.ts b/codegen/cosmos/bank/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/bank/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/bank/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/bank/v1beta1/genesis_pb.js b/codegen/cosmos/bank/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/bank/v1beta1/genesis_pb.js rename to codegen/cosmos/bank/v1beta1/genesis_pb.js diff --git a/proto/cosmos/bank/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/bank/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/bank/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/bank/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/bank/v1beta1/genesis_pb_service.js b/codegen/cosmos/bank/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/bank/v1beta1/genesis_pb_service.js rename to codegen/cosmos/bank/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/bank/v1beta1/query.ts b/codegen/cosmos/bank/v1beta1/query.ts new file mode 100644 index 0000000..f77966b --- /dev/null +++ b/codegen/cosmos/bank/v1beta1/query.ts @@ -0,0 +1,2433 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/bank/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/api/annotations"; +import * as dependency_4 from "./../../base/v1beta1/coin"; +import * as dependency_5 from "./bank"; +import * as dependency_6 from "./../../../cosmos_proto/cosmos"; +import * as dependency_7 from "./../../query/v1/query"; +import * as dependency_8 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.bank.v1beta1 { + export class QueryBalanceRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + denom?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + address?: string; + denom?: string; + }): QueryBalanceRequest { + const message = new QueryBalanceRequest({}); + if (data.address != null) { + message.address = data.address; + } + if (data.denom != null) { + message.denom = data.denom; + } + return message; + } + toObject() { + const data: { + address?: string; + denom?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.denom != null) { + data.denom = this.denom; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.denom.length) + writer.writeString(2, this.denom); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryBalanceRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryBalanceRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.denom = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryBalanceRequest { + return QueryBalanceRequest.deserialize(bytes); + } + } + export class QueryBalanceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + balance?: dependency_4.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("balance" in data && data.balance != undefined) { + this.balance = data.balance; + } + } + } + get balance() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin; + } + set balance(value: dependency_4.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_balance() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + balance?: ReturnType; + }): QueryBalanceResponse { + const message = new QueryBalanceResponse({}); + if (data.balance != null) { + message.balance = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.balance); + } + return message; + } + toObject() { + const data: { + balance?: ReturnType; + } = {}; + if (this.balance != null) { + data.balance = this.balance.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_balance) + writer.writeMessage(1, this.balance, () => this.balance.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryBalanceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryBalanceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.balance, () => message.balance = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryBalanceResponse { + return QueryBalanceResponse.deserialize(bytes); + } + } + export class QueryAllBalancesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageRequest; + resolve_denom?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("resolve_denom" in data && data.resolve_denom != undefined) { + this.resolve_denom = data.resolve_denom; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + get resolve_denom() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set resolve_denom(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + address?: string; + pagination?: ReturnType; + resolve_denom?: boolean; + }): QueryAllBalancesRequest { + const message = new QueryAllBalancesRequest({}); + if (data.address != null) { + message.address = data.address; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + if (data.resolve_denom != null) { + message.resolve_denom = data.resolve_denom; + } + return message; + } + toObject() { + const data: { + address?: string; + pagination?: ReturnType; + resolve_denom?: boolean; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.pagination != null) { + data.pagination = this.pagination.toObject(); + } + if (this.resolve_denom != null) { + data.resolve_denom = this.resolve_denom; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (this.resolve_denom != false) + writer.writeBool(3, this.resolve_denom); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllBalancesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllBalancesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + case 3: + message.resolve_denom = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllBalancesRequest { + return QueryAllBalancesRequest.deserialize(bytes); + } + } + export class QueryAllBalancesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + balances?: dependency_4.cosmos.base.v1beta1.Coin[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("balances" in data && data.balances != undefined) { + this.balances = data.balances; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get balances() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set balances(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + balances?: ReturnType[]; + pagination?: ReturnType; + }): QueryAllBalancesResponse { + const message = new QueryAllBalancesResponse({}); + if (data.balances != null) { + message.balances = data.balances.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + balances?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.balances != null) { + data.balances = this.balances.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.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.balances.length) + writer.writeRepeatedMessage(1, this.balances, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllBalancesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllBalancesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.balances, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllBalancesResponse { + return QueryAllBalancesResponse.deserialize(bytes); + } + } + export class QuerySpendableBalancesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + pagination?: dependency_1.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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + address?: string; + pagination?: ReturnType; + }): QuerySpendableBalancesRequest { + const message = new QuerySpendableBalancesRequest({}); + if (data.address != null) { + message.address = data.address; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + address?: string; + pagination?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySpendableBalancesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySpendableBalancesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySpendableBalancesRequest { + return QuerySpendableBalancesRequest.deserialize(bytes); + } + } + export class QuerySpendableBalancesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + balances?: dependency_4.cosmos.base.v1beta1.Coin[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("balances" in data && data.balances != undefined) { + this.balances = data.balances; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get balances() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set balances(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + balances?: ReturnType[]; + pagination?: ReturnType; + }): QuerySpendableBalancesResponse { + const message = new QuerySpendableBalancesResponse({}); + if (data.balances != null) { + message.balances = data.balances.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + balances?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.balances != null) { + data.balances = this.balances.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.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.balances.length) + writer.writeRepeatedMessage(1, this.balances, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySpendableBalancesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySpendableBalancesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.balances, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySpendableBalancesResponse { + return QuerySpendableBalancesResponse.deserialize(bytes); + } + } + export class QuerySpendableBalanceByDenomRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + denom?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + address?: string; + denom?: string; + }): QuerySpendableBalanceByDenomRequest { + const message = new QuerySpendableBalanceByDenomRequest({}); + if (data.address != null) { + message.address = data.address; + } + if (data.denom != null) { + message.denom = data.denom; + } + return message; + } + toObject() { + const data: { + address?: string; + denom?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.denom != null) { + data.denom = this.denom; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.denom.length) + writer.writeString(2, this.denom); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySpendableBalanceByDenomRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySpendableBalanceByDenomRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.denom = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySpendableBalanceByDenomRequest { + return QuerySpendableBalanceByDenomRequest.deserialize(bytes); + } + } + export class QuerySpendableBalanceByDenomResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + balance?: dependency_4.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("balance" in data && data.balance != undefined) { + this.balance = data.balance; + } + } + } + get balance() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin; + } + set balance(value: dependency_4.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_balance() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + balance?: ReturnType; + }): QuerySpendableBalanceByDenomResponse { + const message = new QuerySpendableBalanceByDenomResponse({}); + if (data.balance != null) { + message.balance = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.balance); + } + return message; + } + toObject() { + const data: { + balance?: ReturnType; + } = {}; + if (this.balance != null) { + data.balance = this.balance.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_balance) + writer.writeMessage(1, this.balance, () => this.balance.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySpendableBalanceByDenomResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySpendableBalanceByDenomResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.balance, () => message.balance = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySpendableBalanceByDenomResponse { + return QuerySpendableBalanceByDenomResponse.deserialize(bytes); + } + } + export class QueryTotalSupplyRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_1.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_1.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.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; + }): QueryTotalSupplyRequest { + const message = new QueryTotalSupplyRequest({}); + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryTotalSupplyRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalSupplyRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalSupplyRequest { + return QueryTotalSupplyRequest.deserialize(bytes); + } + } + export class QueryTotalSupplyResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + supply?: dependency_4.cosmos.base.v1beta1.Coin[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("supply" in data && data.supply != undefined) { + this.supply = data.supply; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get supply() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set supply(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + supply?: ReturnType[]; + pagination?: ReturnType; + }): QueryTotalSupplyResponse { + const message = new QueryTotalSupplyResponse({}); + if (data.supply != null) { + message.supply = data.supply.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + supply?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.supply != null) { + data.supply = this.supply.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.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.supply.length) + writer.writeRepeatedMessage(1, this.supply, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalSupplyResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalSupplyResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.supply, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalSupplyResponse { + return QueryTotalSupplyResponse.deserialize(bytes); + } + } + export class QuerySupplyOfRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: 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 ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + denom?: string; + }): QuerySupplyOfRequest { + const message = new QuerySupplyOfRequest({}); + if (data.denom != null) { + message.denom = data.denom; + } + return message; + } + toObject() { + const data: { + denom?: string; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySupplyOfRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySupplyOfRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySupplyOfRequest { + return QuerySupplyOfRequest.deserialize(bytes); + } + } + export class QuerySupplyOfResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: dependency_4.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get amount() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin; + } + set amount(value: dependency_4.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_amount() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + amount?: ReturnType; + }): QuerySupplyOfResponse { + const message = new QuerySupplyOfResponse({}); + if (data.amount != null) { + message.amount = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.amount); + } + return message; + } + toObject() { + const data: { + amount?: ReturnType; + } = {}; + if (this.amount != null) { + data.amount = this.amount.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_amount) + writer.writeMessage(1, this.amount, () => this.amount.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySupplyOfResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySupplyOfResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.amount, () => message.amount = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySupplyOfResponse { + return QuerySupplyOfResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_5.cosmos.bank.v1beta1.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_5.cosmos.bank.v1beta1.Params, 1) as dependency_5.cosmos.bank.v1beta1.Params; + } + set params(value: dependency_5.cosmos.bank.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_5.cosmos.bank.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_5.cosmos.bank.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QueryDenomsMetadataRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_1.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_1.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.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; + }): QueryDenomsMetadataRequest { + const message = new QueryDenomsMetadataRequest({}); + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryDenomsMetadataRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomsMetadataRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomsMetadataRequest { + return QueryDenomsMetadataRequest.deserialize(bytes); + } + } + export class QueryDenomsMetadataResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + metadatas?: dependency_5.cosmos.bank.v1beta1.Metadata[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("metadatas" in data && data.metadatas != undefined) { + this.metadatas = data.metadatas; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get metadatas() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.bank.v1beta1.Metadata, 1) as dependency_5.cosmos.bank.v1beta1.Metadata[]; + } + set metadatas(value: dependency_5.cosmos.bank.v1beta1.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + metadatas?: ReturnType[]; + pagination?: ReturnType; + }): QueryDenomsMetadataResponse { + const message = new QueryDenomsMetadataResponse({}); + if (data.metadatas != null) { + message.metadatas = data.metadatas.map(item => dependency_5.cosmos.bank.v1beta1.Metadata.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + metadatas?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.metadatas != null) { + data.metadatas = this.metadatas.map((item: dependency_5.cosmos.bank.v1beta1.Metadata) => item.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.metadatas.length) + writer.writeRepeatedMessage(1, this.metadatas, (item: dependency_5.cosmos.bank.v1beta1.Metadata) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomsMetadataResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomsMetadataResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.metadatas, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.cosmos.bank.v1beta1.Metadata.deserialize(reader), dependency_5.cosmos.bank.v1beta1.Metadata)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomsMetadataResponse { + return QueryDenomsMetadataResponse.deserialize(bytes); + } + } + export class QueryDenomMetadataRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: 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 ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + denom?: string; + }): QueryDenomMetadataRequest { + const message = new QueryDenomMetadataRequest({}); + if (data.denom != null) { + message.denom = data.denom; + } + return message; + } + toObject() { + const data: { + denom?: string; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomMetadataRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomMetadataRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomMetadataRequest { + return QueryDenomMetadataRequest.deserialize(bytes); + } + } + export class QueryDenomMetadataResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + metadata?: dependency_5.cosmos.bank.v1beta1.Metadata; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get metadata() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.bank.v1beta1.Metadata, 1) as dependency_5.cosmos.bank.v1beta1.Metadata; + } + set metadata(value: dependency_5.cosmos.bank.v1beta1.Metadata) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_metadata() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + metadata?: ReturnType; + }): QueryDenomMetadataResponse { + const message = new QueryDenomMetadataResponse({}); + if (data.metadata != null) { + message.metadata = dependency_5.cosmos.bank.v1beta1.Metadata.fromObject(data.metadata); + } + return message; + } + toObject() { + const data: { + metadata?: ReturnType; + } = {}; + if (this.metadata != null) { + data.metadata = this.metadata.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_metadata) + writer.writeMessage(1, this.metadata, () => this.metadata.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomMetadataResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomMetadataResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.metadata, () => message.metadata = dependency_5.cosmos.bank.v1beta1.Metadata.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomMetadataResponse { + return QueryDenomMetadataResponse.deserialize(bytes); + } + } + export class QueryDenomMetadataByQueryStringRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: 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 ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + denom?: string; + }): QueryDenomMetadataByQueryStringRequest { + const message = new QueryDenomMetadataByQueryStringRequest({}); + if (data.denom != null) { + message.denom = data.denom; + } + return message; + } + toObject() { + const data: { + denom?: string; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomMetadataByQueryStringRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomMetadataByQueryStringRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomMetadataByQueryStringRequest { + return QueryDenomMetadataByQueryStringRequest.deserialize(bytes); + } + } + export class QueryDenomMetadataByQueryStringResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + metadata?: dependency_5.cosmos.bank.v1beta1.Metadata; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get metadata() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.bank.v1beta1.Metadata, 1) as dependency_5.cosmos.bank.v1beta1.Metadata; + } + set metadata(value: dependency_5.cosmos.bank.v1beta1.Metadata) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_metadata() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + metadata?: ReturnType; + }): QueryDenomMetadataByQueryStringResponse { + const message = new QueryDenomMetadataByQueryStringResponse({}); + if (data.metadata != null) { + message.metadata = dependency_5.cosmos.bank.v1beta1.Metadata.fromObject(data.metadata); + } + return message; + } + toObject() { + const data: { + metadata?: ReturnType; + } = {}; + if (this.metadata != null) { + data.metadata = this.metadata.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_metadata) + writer.writeMessage(1, this.metadata, () => this.metadata.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomMetadataByQueryStringResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomMetadataByQueryStringResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.metadata, () => message.metadata = dependency_5.cosmos.bank.v1beta1.Metadata.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomMetadataByQueryStringResponse { + return QueryDenomMetadataByQueryStringResponse.deserialize(bytes); + } + } + export class QueryDenomOwnersRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: string; + pagination?: dependency_1.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 ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + denom?: string; + pagination?: ReturnType; + }): QueryDenomOwnersRequest { + const message = new QueryDenomOwnersRequest({}); + if (data.denom != null) { + message.denom = data.denom; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + denom?: string; + pagination?: ReturnType; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomOwnersRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomOwnersRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomOwnersRequest { + return QueryDenomOwnersRequest.deserialize(bytes); + } + } + export class DenomOwner extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + balance?: dependency_4.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("balance" in data && data.balance != undefined) { + this.balance = data.balance; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get balance() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 2) as dependency_4.cosmos.base.v1beta1.Coin; + } + set balance(value: dependency_4.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_balance() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + address?: string; + balance?: ReturnType; + }): DenomOwner { + const message = new DenomOwner({}); + if (data.address != null) { + message.address = data.address; + } + if (data.balance != null) { + message.balance = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.balance); + } + return message; + } + toObject() { + const data: { + address?: string; + balance?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.balance != null) { + data.balance = this.balance.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.address.length) + writer.writeString(1, this.address); + if (this.has_balance) + writer.writeMessage(2, this.balance, () => this.balance.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DenomOwner { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DenomOwner(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.balance, () => message.balance = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DenomOwner { + return DenomOwner.deserialize(bytes); + } + } + export class QueryDenomOwnersResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom_owners?: DenomOwner[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("denom_owners" in data && data.denom_owners != undefined) { + this.denom_owners = data.denom_owners; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get denom_owners() { + return pb_1.Message.getRepeatedWrapperField(this, DenomOwner, 1) as DenomOwner[]; + } + set denom_owners(value: DenomOwner[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + denom_owners?: ReturnType[]; + pagination?: ReturnType; + }): QueryDenomOwnersResponse { + const message = new QueryDenomOwnersResponse({}); + if (data.denom_owners != null) { + message.denom_owners = data.denom_owners.map(item => DenomOwner.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + denom_owners?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.denom_owners != null) { + data.denom_owners = this.denom_owners.map((item: DenomOwner) => item.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.denom_owners.length) + writer.writeRepeatedMessage(1, this.denom_owners, (item: DenomOwner) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomOwnersResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomOwnersResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.denom_owners, () => pb_1.Message.addToRepeatedWrapperField(message, 1, DenomOwner.deserialize(reader), DenomOwner)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomOwnersResponse { + return QueryDenomOwnersResponse.deserialize(bytes); + } + } + export class QueryDenomOwnersByQueryRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: string; + pagination?: dependency_1.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 ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + denom?: string; + pagination?: ReturnType; + }): QueryDenomOwnersByQueryRequest { + const message = new QueryDenomOwnersByQueryRequest({}); + if (data.denom != null) { + message.denom = data.denom; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + denom?: string; + pagination?: ReturnType; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomOwnersByQueryRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomOwnersByQueryRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomOwnersByQueryRequest { + return QueryDenomOwnersByQueryRequest.deserialize(bytes); + } + } + export class QueryDenomOwnersByQueryResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom_owners?: DenomOwner[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("denom_owners" in data && data.denom_owners != undefined) { + this.denom_owners = data.denom_owners; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get denom_owners() { + return pb_1.Message.getRepeatedWrapperField(this, DenomOwner, 1) as DenomOwner[]; + } + set denom_owners(value: DenomOwner[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + denom_owners?: ReturnType[]; + pagination?: ReturnType; + }): QueryDenomOwnersByQueryResponse { + const message = new QueryDenomOwnersByQueryResponse({}); + if (data.denom_owners != null) { + message.denom_owners = data.denom_owners.map(item => DenomOwner.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + denom_owners?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.denom_owners != null) { + data.denom_owners = this.denom_owners.map((item: DenomOwner) => item.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.denom_owners.length) + writer.writeRepeatedMessage(1, this.denom_owners, (item: DenomOwner) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomOwnersByQueryResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomOwnersByQueryResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.denom_owners, () => pb_1.Message.addToRepeatedWrapperField(message, 1, DenomOwner.deserialize(reader), DenomOwner)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomOwnersByQueryResponse { + return QueryDenomOwnersByQueryResponse.deserialize(bytes); + } + } + export class QuerySendEnabledRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denoms?: string[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageRequest; + }) { + 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 ("denoms" in data && data.denoms != undefined) { + this.denoms = data.denoms; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get denoms() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set denoms(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 99) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 99, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 99) != null; + } + static fromObject(data: { + denoms?: string[]; + pagination?: ReturnType; + }): QuerySendEnabledRequest { + const message = new QuerySendEnabledRequest({}); + if (data.denoms != null) { + message.denoms = data.denoms; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + denoms?: string[]; + pagination?: ReturnType; + } = {}; + if (this.denoms != null) { + data.denoms = this.denoms; + } + 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.denoms.length) + writer.writeRepeatedString(1, this.denoms); + if (this.has_pagination) + writer.writeMessage(99, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySendEnabledRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySendEnabledRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 99: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySendEnabledRequest { + return QuerySendEnabledRequest.deserialize(bytes); + } + } + export class QuerySendEnabledResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + send_enabled?: dependency_5.cosmos.bank.v1beta1.SendEnabled[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("send_enabled" in data && data.send_enabled != undefined) { + this.send_enabled = data.send_enabled; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get send_enabled() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.bank.v1beta1.SendEnabled, 1) as dependency_5.cosmos.bank.v1beta1.SendEnabled[]; + } + set send_enabled(value: dependency_5.cosmos.bank.v1beta1.SendEnabled[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 99) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 99, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 99) != null; + } + static fromObject(data: { + send_enabled?: ReturnType[]; + pagination?: ReturnType; + }): QuerySendEnabledResponse { + const message = new QuerySendEnabledResponse({}); + if (data.send_enabled != null) { + message.send_enabled = data.send_enabled.map(item => dependency_5.cosmos.bank.v1beta1.SendEnabled.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + send_enabled?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.send_enabled != null) { + data.send_enabled = this.send_enabled.map((item: dependency_5.cosmos.bank.v1beta1.SendEnabled) => item.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.send_enabled.length) + writer.writeRepeatedMessage(1, this.send_enabled, (item: dependency_5.cosmos.bank.v1beta1.SendEnabled) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(99, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySendEnabledResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySendEnabledResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.send_enabled, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.cosmos.bank.v1beta1.SendEnabled.deserialize(reader), dependency_5.cosmos.bank.v1beta1.SendEnabled)); + break; + case 99: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySendEnabledResponse { + return QuerySendEnabledResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Balance: { + path: "/cosmos.bank.v1beta1.Query/Balance", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryBalanceRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryBalanceRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryBalanceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryBalanceResponse.deserialize(new Uint8Array(bytes)) + }, + AllBalances: { + path: "/cosmos.bank.v1beta1.Query/AllBalances", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAllBalancesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAllBalancesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAllBalancesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAllBalancesResponse.deserialize(new Uint8Array(bytes)) + }, + SpendableBalances: { + path: "/cosmos.bank.v1beta1.Query/SpendableBalances", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySpendableBalancesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySpendableBalancesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySpendableBalancesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySpendableBalancesResponse.deserialize(new Uint8Array(bytes)) + }, + SpendableBalanceByDenom: { + path: "/cosmos.bank.v1beta1.Query/SpendableBalanceByDenom", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySpendableBalanceByDenomRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySpendableBalanceByDenomRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySpendableBalanceByDenomResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySpendableBalanceByDenomResponse.deserialize(new Uint8Array(bytes)) + }, + TotalSupply: { + path: "/cosmos.bank.v1beta1.Query/TotalSupply", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTotalSupplyRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTotalSupplyRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTotalSupplyResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTotalSupplyResponse.deserialize(new Uint8Array(bytes)) + }, + SupplyOf: { + path: "/cosmos.bank.v1beta1.Query/SupplyOf", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySupplyOfRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySupplyOfRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySupplyOfResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySupplyOfResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/cosmos.bank.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + DenomMetadata: { + path: "/cosmos.bank.v1beta1.Query/DenomMetadata", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDenomMetadataRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDenomMetadataRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDenomMetadataResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDenomMetadataResponse.deserialize(new Uint8Array(bytes)) + }, + DenomMetadataByQueryString: { + path: "/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDenomMetadataByQueryStringRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDenomMetadataByQueryStringRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDenomMetadataByQueryStringResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDenomMetadataByQueryStringResponse.deserialize(new Uint8Array(bytes)) + }, + DenomsMetadata: { + path: "/cosmos.bank.v1beta1.Query/DenomsMetadata", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDenomsMetadataRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDenomsMetadataRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDenomsMetadataResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDenomsMetadataResponse.deserialize(new Uint8Array(bytes)) + }, + DenomOwners: { + path: "/cosmos.bank.v1beta1.Query/DenomOwners", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDenomOwnersRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDenomOwnersRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDenomOwnersResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDenomOwnersResponse.deserialize(new Uint8Array(bytes)) + }, + DenomOwnersByQuery: { + path: "/cosmos.bank.v1beta1.Query/DenomOwnersByQuery", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDenomOwnersByQueryRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDenomOwnersByQueryRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDenomOwnersByQueryResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDenomOwnersByQueryResponse.deserialize(new Uint8Array(bytes)) + }, + SendEnabled: { + path: "/cosmos.bank.v1beta1.Query/SendEnabled", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySendEnabledRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySendEnabledRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySendEnabledResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySendEnabledResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Balance(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AllBalances(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SpendableBalances(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SpendableBalanceByDenom(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TotalSupply(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SupplyOf(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DenomMetadata(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DenomMetadataByQueryString(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DenomsMetadata(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DenomOwners(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DenomOwnersByQuery(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SendEnabled(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Balance: GrpcUnaryServiceInterface = (message: QueryBalanceRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Balance(message, metadata, options, callback); + }; + AllBalances: GrpcUnaryServiceInterface = (message: QueryAllBalancesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AllBalances(message, metadata, options, callback); + }; + SpendableBalances: GrpcUnaryServiceInterface = (message: QuerySpendableBalancesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SpendableBalances(message, metadata, options, callback); + }; + SpendableBalanceByDenom: GrpcUnaryServiceInterface = (message: QuerySpendableBalanceByDenomRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SpendableBalanceByDenom(message, metadata, options, callback); + }; + TotalSupply: GrpcUnaryServiceInterface = (message: QueryTotalSupplyRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TotalSupply(message, metadata, options, callback); + }; + SupplyOf: GrpcUnaryServiceInterface = (message: QuerySupplyOfRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SupplyOf(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + DenomMetadata: GrpcUnaryServiceInterface = (message: QueryDenomMetadataRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DenomMetadata(message, metadata, options, callback); + }; + DenomMetadataByQueryString: GrpcUnaryServiceInterface = (message: QueryDenomMetadataByQueryStringRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DenomMetadataByQueryString(message, metadata, options, callback); + }; + DenomsMetadata: GrpcUnaryServiceInterface = (message: QueryDenomsMetadataRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DenomsMetadata(message, metadata, options, callback); + }; + DenomOwners: GrpcUnaryServiceInterface = (message: QueryDenomOwnersRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DenomOwners(message, metadata, options, callback); + }; + DenomOwnersByQuery: GrpcUnaryServiceInterface = (message: QueryDenomOwnersByQueryRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DenomOwnersByQuery(message, metadata, options, callback); + }; + SendEnabled: GrpcUnaryServiceInterface = (message: QuerySendEnabledRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SendEnabled(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/bank/v1beta1/query_pb.d.ts b/codegen/cosmos/bank/v1beta1/query_pb.d.ts similarity index 84% rename from proto/cosmos/bank/v1beta1/query_pb.d.ts rename to codegen/cosmos/bank/v1beta1/query_pb.d.ts index 72882e3..597427d 100644 --- a/proto/cosmos/bank/v1beta1/query_pb.d.ts +++ b/codegen/cosmos/bank/v1beta1/query_pb.d.ts @@ -66,6 +66,9 @@ export class QueryAllBalancesRequest extends jspb.Message { getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + getResolveDenom(): boolean; + setResolveDenom(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QueryAllBalancesRequest.AsObject; static toObject(includeInstance: boolean, msg: QueryAllBalancesRequest): QueryAllBalancesRequest.AsObject; @@ -80,6 +83,7 @@ export namespace QueryAllBalancesRequest { export type AsObject = { address: string, pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + resolveDenom: boolean, } } @@ -433,6 +437,48 @@ export namespace QueryDenomMetadataResponse { } } +export class QueryDenomMetadataByQueryStringRequest extends jspb.Message { + getDenom(): string; + setDenom(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDenomMetadataByQueryStringRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryDenomMetadataByQueryStringRequest): QueryDenomMetadataByQueryStringRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDenomMetadataByQueryStringRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDenomMetadataByQueryStringRequest; + static deserializeBinaryFromReader(message: QueryDenomMetadataByQueryStringRequest, reader: jspb.BinaryReader): QueryDenomMetadataByQueryStringRequest; +} + +export namespace QueryDenomMetadataByQueryStringRequest { + export type AsObject = { + denom: string, + } +} + +export class QueryDenomMetadataByQueryStringResponse extends jspb.Message { + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): cosmos_bank_v1beta1_bank_pb.Metadata | undefined; + setMetadata(value?: cosmos_bank_v1beta1_bank_pb.Metadata): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDenomMetadataByQueryStringResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryDenomMetadataByQueryStringResponse): QueryDenomMetadataByQueryStringResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDenomMetadataByQueryStringResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDenomMetadataByQueryStringResponse; + static deserializeBinaryFromReader(message: QueryDenomMetadataByQueryStringResponse, reader: jspb.BinaryReader): QueryDenomMetadataByQueryStringResponse; +} + +export namespace QueryDenomMetadataByQueryStringResponse { + export type AsObject = { + metadata?: cosmos_bank_v1beta1_bank_pb.Metadata.AsObject, + } +} + export class QueryDenomOwnersRequest extends jspb.Message { getDenom(): string; setDenom(value: string): void; @@ -513,6 +559,60 @@ export namespace QueryDenomOwnersResponse { } } +export class QueryDenomOwnersByQueryRequest extends jspb.Message { + getDenom(): string; + setDenom(value: string): void; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDenomOwnersByQueryRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryDenomOwnersByQueryRequest): QueryDenomOwnersByQueryRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDenomOwnersByQueryRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDenomOwnersByQueryRequest; + static deserializeBinaryFromReader(message: QueryDenomOwnersByQueryRequest, reader: jspb.BinaryReader): QueryDenomOwnersByQueryRequest; +} + +export namespace QueryDenomOwnersByQueryRequest { + export type AsObject = { + denom: string, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryDenomOwnersByQueryResponse extends jspb.Message { + clearDenomOwnersList(): void; + getDenomOwnersList(): Array; + setDenomOwnersList(value: Array): void; + addDenomOwners(value?: DenomOwner, index?: number): DenomOwner; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDenomOwnersByQueryResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryDenomOwnersByQueryResponse): QueryDenomOwnersByQueryResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDenomOwnersByQueryResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDenomOwnersByQueryResponse; + static deserializeBinaryFromReader(message: QueryDenomOwnersByQueryResponse, reader: jspb.BinaryReader): QueryDenomOwnersByQueryResponse; +} + +export namespace QueryDenomOwnersByQueryResponse { + export type AsObject = { + denomOwnersList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + export class QuerySendEnabledRequest extends jspb.Message { clearDenomsList(): void; getDenomsList(): Array; diff --git a/proto/cosmos/bank/v1beta1/query_pb.js b/codegen/cosmos/bank/v1beta1/query_pb.js similarity index 84% rename from proto/cosmos/bank/v1beta1/query_pb.js rename to codegen/cosmos/bank/v1beta1/query_pb.js index 183c95d..4433b23 100644 --- a/proto/cosmos/bank/v1beta1/query_pb.js +++ b/codegen/cosmos/bank/v1beta1/query_pb.js @@ -36,8 +36,12 @@ goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryAllBalancesRequest', null, glo goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryAllBalancesResponse', null, global); goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryBalanceRequest', null, global); goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryBalanceResponse', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse', null, global); goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryDenomMetadataRequest', null, global); goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryDenomMetadataResponse', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse', null, global); goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest', null, global); goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse', null, global); goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryDenomsMetadataRequest', null, global); @@ -432,6 +436,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.bank.v1beta1.QueryDenomMetadataResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryDenomMetadataResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.displayName = 'proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -495,6 +541,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.displayName = 'proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -881,7 +969,8 @@ proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.toObject = function( proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), - pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f), + resolveDenom: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -927,6 +1016,10 @@ proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.deserializeBinaryFromReader = reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); msg.setPagination(value); break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setResolveDenom(value); + break; default: reader.skipField(); break; @@ -971,6 +1064,13 @@ proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.serializeBinaryToWriter = func cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter ); } + f = message.getResolveDenom(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; @@ -1029,6 +1129,24 @@ proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.hasPagination = func }; +/** + * optional bool resolve_denom = 3; + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.getResolveDenom = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.setResolveDenom = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + /** * List of repeated fields within this message type. @@ -3497,8 +3615,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.toObject(opt_includeInstance, this); +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.toObject(opt_includeInstance, this); }; @@ -3507,14 +3625,13 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} msg The msg instance to transform. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.toObject = function(includeInstance, msg) { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.toObject = function(includeInstance, msg) { var f, obj = { - denom: jspb.Message.getFieldWithDefault(msg, 1, ""), - pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + denom: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -3528,23 +3645,23 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} + * @return {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.deserializeBinary = function(bytes) { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest; - return proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest; + return proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} msg The message object to deserialize into. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} + * @return {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3555,11 +3672,6 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.deserializeBinaryFromReader = var value = /** @type {string} */ (reader.readString()); msg.setDenom(value); break; - case 2: - var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; - reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); - msg.setPagination(value); - break; default: reader.skipField(); break; @@ -3573,9 +3685,9 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.serializeBinary = function() { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.serializeBinaryToWriter(this, writer); + proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3583,11 +3695,11 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} message + * @param {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDenom(); if (f.length > 0) { @@ -3596,14 +3708,6 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.serializeBinaryToWriter = func f ); } - f = message.getPagination(); - if (f != null) { - writer.writeMessage( - 2, - f, - cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter - ); - } }; @@ -3611,57 +3715,20 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.serializeBinaryToWriter = func * optional string denom = 1; * @return {string} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.getDenom = function() { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.prototype.getDenom = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} returns this + * @return {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest} returns this */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.setDenom = function(value) { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest.prototype.setDenom = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; - * @return {?proto.cosmos.base.query.v1beta1.PageRequest} - */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.getPagination = function() { - return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( - jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); -}; - - -/** - * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} returns this -*/ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.setPagination = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} returns this - */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.clearPagination = function() { - return this.setPagination(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.hasPagination = function() { - return jspb.Message.getField(this, 2) != null; -}; - - @@ -3678,8 +3745,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.bank.v1beta1.DenomOwner.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.bank.v1beta1.DenomOwner.toObject(opt_includeInstance, this); +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.toObject(opt_includeInstance, this); }; @@ -3688,14 +3755,13 @@ proto.cosmos.bank.v1beta1.DenomOwner.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.bank.v1beta1.DenomOwner} msg The msg instance to transform. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.bank.v1beta1.DenomOwner.toObject = function(includeInstance, msg) { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - balance: (f = msg.getBalance()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f) + metadata: (f = msg.getMetadata()) && cosmos_bank_v1beta1_bank_pb.Metadata.toObject(includeInstance, f) }; if (includeInstance) { @@ -3709,23 +3775,23 @@ proto.cosmos.bank.v1beta1.DenomOwner.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.bank.v1beta1.DenomOwner} + * @return {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse} */ -proto.cosmos.bank.v1beta1.DenomOwner.deserializeBinary = function(bytes) { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.bank.v1beta1.DenomOwner; - return proto.cosmos.bank.v1beta1.DenomOwner.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse; + return proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.bank.v1beta1.DenomOwner} msg The message object to deserialize into. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.bank.v1beta1.DenomOwner} + * @return {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse} */ -proto.cosmos.bank.v1beta1.DenomOwner.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3733,13 +3799,9 @@ proto.cosmos.bank.v1beta1.DenomOwner.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = new cosmos_base_v1beta1_coin_pb.Coin; - reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.setBalance(value); + var value = new cosmos_bank_v1beta1_bank_pb.Metadata; + reader.readMessage(value,cosmos_bank_v1beta1_bank_pb.Metadata.deserializeBinaryFromReader); + msg.setMetadata(value); break; default: reader.skipField(); @@ -3754,9 +3816,9 @@ proto.cosmos.bank.v1beta1.DenomOwner.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.bank.v1beta1.DenomOwner.prototype.serializeBinary = function() { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.bank.v1beta1.DenomOwner.serializeBinaryToWriter(this, writer); + proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3764,73 +3826,48 @@ proto.cosmos.bank.v1beta1.DenomOwner.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.bank.v1beta1.DenomOwner} message + * @param {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.bank.v1beta1.DenomOwner.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getBalance(); + f = message.getMetadata(); if (f != null) { writer.writeMessage( - 2, + 1, f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + cosmos_bank_v1beta1_bank_pb.Metadata.serializeBinaryToWriter ); } }; /** - * optional string address = 1; - * @return {string} - */ -proto.cosmos.bank.v1beta1.DenomOwner.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cosmos.bank.v1beta1.DenomOwner} returns this - */ -proto.cosmos.bank.v1beta1.DenomOwner.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional cosmos.base.v1beta1.Coin balance = 2; - * @return {?proto.cosmos.base.v1beta1.Coin} + * optional Metadata metadata = 1; + * @return {?proto.cosmos.bank.v1beta1.Metadata} */ -proto.cosmos.bank.v1beta1.DenomOwner.prototype.getBalance = function() { - return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( - jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.prototype.getMetadata = function() { + return /** @type{?proto.cosmos.bank.v1beta1.Metadata} */ ( + jspb.Message.getWrapperField(this, cosmos_bank_v1beta1_bank_pb.Metadata, 1)); }; /** - * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value - * @return {!proto.cosmos.bank.v1beta1.DenomOwner} returns this + * @param {?proto.cosmos.bank.v1beta1.Metadata|undefined} value + * @return {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse} returns this */ -proto.cosmos.bank.v1beta1.DenomOwner.prototype.setBalance = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cosmos.bank.v1beta1.DenomOwner} returns this + * @return {!proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse} returns this */ -proto.cosmos.bank.v1beta1.DenomOwner.prototype.clearBalance = function() { - return this.setBalance(undefined); +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; @@ -3838,19 +3875,12 @@ proto.cosmos.bank.v1beta1.DenomOwner.prototype.clearBalance = function() { * Returns whether this field is set. * @return {boolean} */ -proto.cosmos.bank.v1beta1.DenomOwner.prototype.hasBalance = function() { - return jspb.Message.getField(this, 2) != null; +proto.cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 1) != null; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3866,8 +3896,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.toObject(opt_includeInstance, this); +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.toObject(opt_includeInstance, this); }; @@ -3876,13 +3906,774 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} msg The msg instance to transform. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.toObject = function(includeInstance, msg) { +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.toObject = function(includeInstance, msg) { var f, obj = { - denomOwnersList: jspb.Message.toObjectList(msg.getDenomOwnersList(), + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest; + return proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDenom(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} returns this +*/ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.bank.v1beta1.DenomOwner.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.DenomOwner.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.bank.v1beta1.DenomOwner} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.DenomOwner.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + balance: (f = msg.getBalance()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.bank.v1beta1.DenomOwner} + */ +proto.cosmos.bank.v1beta1.DenomOwner.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.DenomOwner; + return proto.cosmos.bank.v1beta1.DenomOwner.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.DenomOwner} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.DenomOwner} + */ +proto.cosmos.bank.v1beta1.DenomOwner.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setBalance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.DenomOwner.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.DenomOwner.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.bank.v1beta1.DenomOwner} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.DenomOwner.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBalance(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.DenomOwner.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.DenomOwner} returns this + */ +proto.cosmos.bank.v1beta1.DenomOwner.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin balance = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.bank.v1beta1.DenomOwner.prototype.getBalance = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.bank.v1beta1.DenomOwner} returns this +*/ +proto.cosmos.bank.v1beta1.DenomOwner.prototype.setBalance = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.DenomOwner} returns this + */ +proto.cosmos.bank.v1beta1.DenomOwner.prototype.clearBalance = function() { + return this.setBalance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.DenomOwner.prototype.hasBalance = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomOwnersList: jspb.Message.toObjectList(msg.getDenomOwnersList(), + proto.cosmos.bank.v1beta1.DenomOwner.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse; + return proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.bank.v1beta1.DenomOwner; + reader.readMessage(value,proto.cosmos.bank.v1beta1.DenomOwner.deserializeBinaryFromReader); + msg.addDenomOwners(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomOwnersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.bank.v1beta1.DenomOwner.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DenomOwner denom_owners = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.getDenomOwnersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.bank.v1beta1.DenomOwner, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.setDenomOwnersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.DenomOwner=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.DenomOwner} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.addDenomOwners = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.bank.v1beta1.DenomOwner, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.clearDenomOwnersList = function() { + return this.setDenomOwnersList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest; + return proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDenom(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest} returns this +*/ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomOwnersList: jspb.Message.toObjectList(msg.getDenomOwnersList(), proto.cosmos.bank.v1beta1.DenomOwner.toObject, includeInstance), pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; @@ -3898,23 +4689,23 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.deserializeBinary = function(bytes) { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse; - return proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse; + return proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} msg The message object to deserialize into. + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3944,9 +4735,9 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.serializeBinary = function() { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.serializeBinaryToWriter(this, writer); + proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3954,11 +4745,11 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} message + * @param {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDenomOwnersList(); if (f.length > 0) { @@ -3983,7 +4774,7 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.serializeBinaryToWriter = fun * repeated DenomOwner denom_owners = 1; * @return {!Array} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.getDenomOwnersList = function() { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.getDenomOwnersList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.cosmos.bank.v1beta1.DenomOwner, 1)); }; @@ -3991,9 +4782,9 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.getDenomOwnersList /** * @param {!Array} value - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} returns this + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse} returns this */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.setDenomOwnersList = function(value) { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.setDenomOwnersList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -4003,16 +4794,16 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.setDenomOwnersList * @param {number=} opt_index * @return {!proto.cosmos.bank.v1beta1.DenomOwner} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.addDenomOwners = function(opt_value, opt_index) { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.addDenomOwners = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.bank.v1beta1.DenomOwner, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} returns this + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse} returns this */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.clearDenomOwnersList = function() { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.clearDenomOwnersList = function() { return this.setDenomOwnersList([]); }; @@ -4021,7 +4812,7 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.clearDenomOwnersLis * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.getPagination = function() { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.getPagination = function() { return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); }; @@ -4029,18 +4820,18 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.getPagination = fun /** * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} returns this + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse} returns this */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.setPagination = function(value) { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.setPagination = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse} returns this + * @return {!proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse} returns this */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.clearPagination = function() { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.clearPagination = function() { return this.setPagination(undefined); }; @@ -4049,7 +4840,7 @@ proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.clearPagination = f * Returns whether this field is set. * @return {boolean} */ -proto.cosmos.bank.v1beta1.QueryDenomOwnersResponse.prototype.hasPagination = function() { +proto.cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse.prototype.hasPagination = function() { return jspb.Message.getField(this, 2) != null; }; diff --git a/proto/cosmos/bank/v1beta1/query_pb_service.d.ts b/codegen/cosmos/bank/v1beta1/query_pb_service.d.ts similarity index 84% rename from proto/cosmos/bank/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/bank/v1beta1/query_pb_service.d.ts index 098cc11..d9e2572 100644 --- a/proto/cosmos/bank/v1beta1/query_pb_service.d.ts +++ b/codegen/cosmos/bank/v1beta1/query_pb_service.d.ts @@ -76,6 +76,15 @@ type QueryDenomMetadata = { readonly responseType: typeof cosmos_bank_v1beta1_query_pb.QueryDenomMetadataResponse; }; +type QueryDenomMetadataByQueryString = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_bank_v1beta1_query_pb.QueryDenomMetadataByQueryStringRequest; + readonly responseType: typeof cosmos_bank_v1beta1_query_pb.QueryDenomMetadataByQueryStringResponse; +}; + type QueryDenomsMetadata = { readonly methodName: string; readonly service: typeof Query; @@ -94,6 +103,15 @@ type QueryDenomOwners = { readonly responseType: typeof cosmos_bank_v1beta1_query_pb.QueryDenomOwnersResponse; }; +type QueryDenomOwnersByQuery = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_bank_v1beta1_query_pb.QueryDenomOwnersByQueryRequest; + readonly responseType: typeof cosmos_bank_v1beta1_query_pb.QueryDenomOwnersByQueryResponse; +}; + type QuerySendEnabled = { readonly methodName: string; readonly service: typeof Query; @@ -113,8 +131,10 @@ export class Query { static readonly SupplyOf: QuerySupplyOf; static readonly Params: QueryParams; static readonly DenomMetadata: QueryDenomMetadata; + static readonly DenomMetadataByQueryString: QueryDenomMetadataByQueryString; static readonly DenomsMetadata: QueryDenomsMetadata; static readonly DenomOwners: QueryDenomOwners; + static readonly DenomOwnersByQuery: QueryDenomOwnersByQuery; static readonly SendEnabled: QuerySendEnabled; } @@ -222,6 +242,15 @@ export class QueryClient { requestMessage: cosmos_bank_v1beta1_query_pb.QueryDenomMetadataRequest, callback: (error: ServiceError|null, responseMessage: cosmos_bank_v1beta1_query_pb.QueryDenomMetadataResponse|null) => void ): UnaryResponse; + denomMetadataByQueryString( + requestMessage: cosmos_bank_v1beta1_query_pb.QueryDenomMetadataByQueryStringRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_bank_v1beta1_query_pb.QueryDenomMetadataByQueryStringResponse|null) => void + ): UnaryResponse; + denomMetadataByQueryString( + requestMessage: cosmos_bank_v1beta1_query_pb.QueryDenomMetadataByQueryStringRequest, + callback: (error: ServiceError|null, responseMessage: cosmos_bank_v1beta1_query_pb.QueryDenomMetadataByQueryStringResponse|null) => void + ): UnaryResponse; denomsMetadata( requestMessage: cosmos_bank_v1beta1_query_pb.QueryDenomsMetadataRequest, metadata: grpc.Metadata, @@ -240,6 +269,15 @@ export class QueryClient { requestMessage: cosmos_bank_v1beta1_query_pb.QueryDenomOwnersRequest, callback: (error: ServiceError|null, responseMessage: cosmos_bank_v1beta1_query_pb.QueryDenomOwnersResponse|null) => void ): UnaryResponse; + denomOwnersByQuery( + requestMessage: cosmos_bank_v1beta1_query_pb.QueryDenomOwnersByQueryRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_bank_v1beta1_query_pb.QueryDenomOwnersByQueryResponse|null) => void + ): UnaryResponse; + denomOwnersByQuery( + requestMessage: cosmos_bank_v1beta1_query_pb.QueryDenomOwnersByQueryRequest, + callback: (error: ServiceError|null, responseMessage: cosmos_bank_v1beta1_query_pb.QueryDenomOwnersByQueryResponse|null) => void + ): UnaryResponse; sendEnabled( requestMessage: cosmos_bank_v1beta1_query_pb.QuerySendEnabledRequest, metadata: grpc.Metadata, diff --git a/proto/cosmos/bank/v1beta1/query_pb_service.js b/codegen/cosmos/bank/v1beta1/query_pb_service.js similarity index 84% rename from proto/cosmos/bank/v1beta1/query_pb_service.js rename to codegen/cosmos/bank/v1beta1/query_pb_service.js index 1d638b2..724129e 100644 --- a/proto/cosmos/bank/v1beta1/query_pb_service.js +++ b/codegen/cosmos/bank/v1beta1/query_pb_service.js @@ -82,6 +82,15 @@ Query.DenomMetadata = { responseType: cosmos_bank_v1beta1_query_pb.QueryDenomMetadataResponse }; +Query.DenomMetadataByQueryString = { + methodName: "DenomMetadataByQueryString", + service: Query, + requestStream: false, + responseStream: false, + requestType: cosmos_bank_v1beta1_query_pb.QueryDenomMetadataByQueryStringRequest, + responseType: cosmos_bank_v1beta1_query_pb.QueryDenomMetadataByQueryStringResponse +}; + Query.DenomsMetadata = { methodName: "DenomsMetadata", service: Query, @@ -100,6 +109,15 @@ Query.DenomOwners = { responseType: cosmos_bank_v1beta1_query_pb.QueryDenomOwnersResponse }; +Query.DenomOwnersByQuery = { + methodName: "DenomOwnersByQuery", + service: Query, + requestStream: false, + responseStream: false, + requestType: cosmos_bank_v1beta1_query_pb.QueryDenomOwnersByQueryRequest, + responseType: cosmos_bank_v1beta1_query_pb.QueryDenomOwnersByQueryResponse +}; + Query.SendEnabled = { methodName: "SendEnabled", service: Query, @@ -364,6 +382,37 @@ QueryClient.prototype.denomMetadata = function denomMetadata(requestMessage, met }; }; +QueryClient.prototype.denomMetadataByQueryString = function denomMetadataByQueryString(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.DenomMetadataByQueryString, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + QueryClient.prototype.denomsMetadata = function denomsMetadata(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; @@ -426,6 +475,37 @@ QueryClient.prototype.denomOwners = function denomOwners(requestMessage, metadat }; }; +QueryClient.prototype.denomOwnersByQuery = function denomOwnersByQuery(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.DenomOwnersByQuery, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + QueryClient.prototype.sendEnabled = function sendEnabled(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/codegen/cosmos/bank/v1beta1/tx.ts b/codegen/cosmos/bank/v1beta1/tx.ts new file mode 100644 index 0000000..308ab76 --- /dev/null +++ b/codegen/cosmos/bank/v1beta1/tx.ts @@ -0,0 +1,670 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/bank/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../base/v1beta1/coin"; +import * as dependency_3 from "./bank"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../msg/v1/msg"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.bank.v1beta1 { + export class MsgSend extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + from_address?: string; + to_address?: string; + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("from_address" in data && data.from_address != undefined) { + this.from_address = data.from_address; + } + if ("to_address" in data && data.to_address != undefined) { + this.to_address = data.to_address; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get from_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set from_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get to_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set to_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + from_address?: string; + to_address?: string; + amount?: ReturnType[]; + }): MsgSend { + const message = new MsgSend({}); + if (data.from_address != null) { + message.from_address = data.from_address; + } + if (data.to_address != null) { + message.to_address = data.to_address; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + from_address?: string; + to_address?: string; + amount?: ReturnType[]; + } = {}; + if (this.from_address != null) { + data.from_address = this.from_address; + } + if (this.to_address != null) { + data.to_address = this.to_address; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.from_address.length) + writer.writeString(1, this.from_address); + if (this.to_address.length) + writer.writeString(2, this.to_address); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSend { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSend(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.from_address = reader.readString(); + break; + case 2: + message.to_address = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSend { + return MsgSend.deserialize(bytes); + } + } + export class MsgSendResponse 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: {}): MsgSendResponse { + const message = new MsgSendResponse({}); + 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): MsgSendResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSendResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSendResponse { + return MsgSendResponse.deserialize(bytes); + } + } + export class MsgMultiSend extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + inputs?: dependency_3.cosmos.bank.v1beta1.Input[]; + outputs?: dependency_3.cosmos.bank.v1beta1.Output[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("inputs" in data && data.inputs != undefined) { + this.inputs = data.inputs; + } + if ("outputs" in data && data.outputs != undefined) { + this.outputs = data.outputs; + } + } + } + get inputs() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.bank.v1beta1.Input, 1) as dependency_3.cosmos.bank.v1beta1.Input[]; + } + set inputs(value: dependency_3.cosmos.bank.v1beta1.Input[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get outputs() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.bank.v1beta1.Output, 2) as dependency_3.cosmos.bank.v1beta1.Output[]; + } + set outputs(value: dependency_3.cosmos.bank.v1beta1.Output[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + inputs?: ReturnType[]; + outputs?: ReturnType[]; + }): MsgMultiSend { + const message = new MsgMultiSend({}); + if (data.inputs != null) { + message.inputs = data.inputs.map(item => dependency_3.cosmos.bank.v1beta1.Input.fromObject(item)); + } + if (data.outputs != null) { + message.outputs = data.outputs.map(item => dependency_3.cosmos.bank.v1beta1.Output.fromObject(item)); + } + return message; + } + toObject() { + const data: { + inputs?: ReturnType[]; + outputs?: ReturnType[]; + } = {}; + if (this.inputs != null) { + data.inputs = this.inputs.map((item: dependency_3.cosmos.bank.v1beta1.Input) => item.toObject()); + } + if (this.outputs != null) { + data.outputs = this.outputs.map((item: dependency_3.cosmos.bank.v1beta1.Output) => item.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.inputs.length) + writer.writeRepeatedMessage(1, this.inputs, (item: dependency_3.cosmos.bank.v1beta1.Input) => item.serialize(writer)); + if (this.outputs.length) + writer.writeRepeatedMessage(2, this.outputs, (item: dependency_3.cosmos.bank.v1beta1.Output) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgMultiSend { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgMultiSend(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.inputs, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.bank.v1beta1.Input.deserialize(reader), dependency_3.cosmos.bank.v1beta1.Input)); + break; + case 2: + reader.readMessage(message.outputs, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.cosmos.bank.v1beta1.Output.deserialize(reader), dependency_3.cosmos.bank.v1beta1.Output)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgMultiSend { + return MsgMultiSend.deserialize(bytes); + } + } + export class MsgMultiSendResponse 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: {}): MsgMultiSendResponse { + const message = new MsgMultiSendResponse({}); + 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): MsgMultiSendResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgMultiSendResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgMultiSendResponse { + return MsgMultiSendResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_3.cosmos.bank.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.bank.v1beta1.Params, 2) as dependency_3.cosmos.bank.v1beta1.Params; + } + set params(value: dependency_3.cosmos.bank.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_3.cosmos.bank.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_3.cosmos.bank.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + export class MsgSetSendEnabled extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + send_enabled?: dependency_3.cosmos.bank.v1beta1.SendEnabled[]; + use_default_for?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("send_enabled" in data && data.send_enabled != undefined) { + this.send_enabled = data.send_enabled; + } + if ("use_default_for" in data && data.use_default_for != undefined) { + this.use_default_for = data.use_default_for; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get send_enabled() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.bank.v1beta1.SendEnabled, 2) as dependency_3.cosmos.bank.v1beta1.SendEnabled[]; + } + set send_enabled(value: dependency_3.cosmos.bank.v1beta1.SendEnabled[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get use_default_for() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set use_default_for(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + authority?: string; + send_enabled?: ReturnType[]; + use_default_for?: string[]; + }): MsgSetSendEnabled { + const message = new MsgSetSendEnabled({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.send_enabled != null) { + message.send_enabled = data.send_enabled.map(item => dependency_3.cosmos.bank.v1beta1.SendEnabled.fromObject(item)); + } + if (data.use_default_for != null) { + message.use_default_for = data.use_default_for; + } + return message; + } + toObject() { + const data: { + authority?: string; + send_enabled?: ReturnType[]; + use_default_for?: string[]; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + if (this.send_enabled != null) { + data.send_enabled = this.send_enabled.map((item: dependency_3.cosmos.bank.v1beta1.SendEnabled) => item.toObject()); + } + if (this.use_default_for != null) { + data.use_default_for = this.use_default_for; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.send_enabled.length) + writer.writeRepeatedMessage(2, this.send_enabled, (item: dependency_3.cosmos.bank.v1beta1.SendEnabled) => item.serialize(writer)); + if (this.use_default_for.length) + writer.writeRepeatedString(3, this.use_default_for); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetSendEnabled { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetSendEnabled(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.send_enabled, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.cosmos.bank.v1beta1.SendEnabled.deserialize(reader), dependency_3.cosmos.bank.v1beta1.SendEnabled)); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSetSendEnabled { + return MsgSetSendEnabled.deserialize(bytes); + } + } + export class MsgSetSendEnabledResponse 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: {}): MsgSetSendEnabledResponse { + const message = new MsgSetSendEnabledResponse({}); + 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): MsgSetSendEnabledResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetSendEnabledResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSetSendEnabledResponse { + return MsgSetSendEnabledResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + Send: { + path: "/cosmos.bank.v1beta1.Msg/Send", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSend) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSend.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSendResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSendResponse.deserialize(new Uint8Array(bytes)) + }, + MultiSend: { + path: "/cosmos.bank.v1beta1.Msg/MultiSend", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgMultiSend) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgMultiSend.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgMultiSendResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgMultiSendResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/cosmos.bank.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + }, + SetSendEnabled: { + path: "/cosmos.bank.v1beta1.Msg/SetSendEnabled", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSetSendEnabled) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSetSendEnabled.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSetSendEnabledResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSetSendEnabledResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Send(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract MultiSend(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SetSendEnabled(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Send: GrpcUnaryServiceInterface = (message: MsgSend, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Send(message, metadata, options, callback); + }; + MultiSend: GrpcUnaryServiceInterface = (message: MsgMultiSend, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.MultiSend(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + SetSendEnabled: GrpcUnaryServiceInterface = (message: MsgSetSendEnabled, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SetSendEnabled(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/bank/v1beta1/tx_pb.d.ts b/codegen/cosmos/bank/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/bank/v1beta1/tx_pb.d.ts rename to codegen/cosmos/bank/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/bank/v1beta1/tx_pb.js b/codegen/cosmos/bank/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/bank/v1beta1/tx_pb.js rename to codegen/cosmos/bank/v1beta1/tx_pb.js diff --git a/proto/cosmos/bank/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/bank/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/bank/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/bank/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/bank/v1beta1/tx_pb_service.js b/codegen/cosmos/bank/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/bank/v1beta1/tx_pb_service.js rename to codegen/cosmos/bank/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/base/abci/v1beta1/abci.ts b/codegen/cosmos/base/abci/v1beta1/abci.ts new file mode 100644 index 0000000..aabe051 --- /dev/null +++ b/codegen/cosmos/base/abci/v1beta1/abci.ts @@ -0,0 +1,1524 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/base/abci/v1beta1/abci.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../tendermint/abci/types"; +import * as dependency_3 from "./../../../../tendermint/types/block"; +import * as dependency_4 from "./../../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.base.abci.v1beta1 { + export class TxResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + txhash?: string; + codespace?: string; + code?: number; + data?: string; + raw_log?: string; + logs?: ABCIMessageLog[]; + info?: string; + gas_wanted?: number; + gas_used?: number; + tx?: dependency_4.google.protobuf.Any; + timestamp?: string; + events?: dependency_2.tendermint.abci.Event[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7, 13], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("txhash" in data && data.txhash != undefined) { + this.txhash = data.txhash; + } + if ("codespace" in data && data.codespace != undefined) { + this.codespace = data.codespace; + } + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("raw_log" in data && data.raw_log != undefined) { + this.raw_log = data.raw_log; + } + if ("logs" in data && data.logs != undefined) { + this.logs = data.logs; + } + if ("info" in data && data.info != undefined) { + this.info = data.info; + } + if ("gas_wanted" in data && data.gas_wanted != undefined) { + this.gas_wanted = data.gas_wanted; + } + if ("gas_used" in data && data.gas_used != undefined) { + this.gas_used = data.gas_used; + } + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("events" in data && data.events != undefined) { + this.events = data.events; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get txhash() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set txhash(value: string) { + pb_1.Message.setField(this, 2, value); + } + get codespace() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set codespace(value: string) { + pb_1.Message.setField(this, 3, value); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 4, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set data(value: string) { + pb_1.Message.setField(this, 5, value); + } + get raw_log() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set raw_log(value: string) { + pb_1.Message.setField(this, 6, value); + } + get logs() { + return pb_1.Message.getRepeatedWrapperField(this, ABCIMessageLog, 7) as ABCIMessageLog[]; + } + set logs(value: ABCIMessageLog[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get info() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set info(value: string) { + pb_1.Message.setField(this, 8, value); + } + get gas_wanted() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set gas_wanted(value: number) { + pb_1.Message.setField(this, 9, value); + } + get gas_used() { + return pb_1.Message.getFieldWithDefault(this, 10, 0) as number; + } + set gas_used(value: number) { + pb_1.Message.setField(this, 10, value); + } + get tx() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 11) as dependency_4.google.protobuf.Any; + } + set tx(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 11, value); + } + get has_tx() { + return pb_1.Message.getField(this, 11) != null; + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set timestamp(value: string) { + pb_1.Message.setField(this, 12, value); + } + get events() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.tendermint.abci.Event, 13) as dependency_2.tendermint.abci.Event[]; + } + set events(value: dependency_2.tendermint.abci.Event[]) { + pb_1.Message.setRepeatedWrapperField(this, 13, value); + } + static fromObject(data: { + height?: number; + txhash?: string; + codespace?: string; + code?: number; + data?: string; + raw_log?: string; + logs?: ReturnType[]; + info?: string; + gas_wanted?: number; + gas_used?: number; + tx?: ReturnType; + timestamp?: string; + events?: ReturnType[]; + }): TxResponse { + const message = new TxResponse({}); + if (data.height != null) { + message.height = data.height; + } + if (data.txhash != null) { + message.txhash = data.txhash; + } + if (data.codespace != null) { + message.codespace = data.codespace; + } + if (data.code != null) { + message.code = data.code; + } + if (data.data != null) { + message.data = data.data; + } + if (data.raw_log != null) { + message.raw_log = data.raw_log; + } + if (data.logs != null) { + message.logs = data.logs.map(item => ABCIMessageLog.fromObject(item)); + } + if (data.info != null) { + message.info = data.info; + } + if (data.gas_wanted != null) { + message.gas_wanted = data.gas_wanted; + } + if (data.gas_used != null) { + message.gas_used = data.gas_used; + } + if (data.tx != null) { + message.tx = dependency_4.google.protobuf.Any.fromObject(data.tx); + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + if (data.events != null) { + message.events = data.events.map(item => dependency_2.tendermint.abci.Event.fromObject(item)); + } + return message; + } + toObject() { + const data: { + height?: number; + txhash?: string; + codespace?: string; + code?: number; + data?: string; + raw_log?: string; + logs?: ReturnType[]; + info?: string; + gas_wanted?: number; + gas_used?: number; + tx?: ReturnType; + timestamp?: string; + events?: ReturnType[]; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.txhash != null) { + data.txhash = this.txhash; + } + if (this.codespace != null) { + data.codespace = this.codespace; + } + if (this.code != null) { + data.code = this.code; + } + if (this.data != null) { + data.data = this.data; + } + if (this.raw_log != null) { + data.raw_log = this.raw_log; + } + if (this.logs != null) { + data.logs = this.logs.map((item: ABCIMessageLog) => item.toObject()); + } + if (this.info != null) { + data.info = this.info; + } + if (this.gas_wanted != null) { + data.gas_wanted = this.gas_wanted; + } + if (this.gas_used != null) { + data.gas_used = this.gas_used; + } + if (this.tx != null) { + data.tx = this.tx.toObject(); + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + if (this.events != null) { + data.events = this.events.map((item: dependency_2.tendermint.abci.Event) => item.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.height != 0) + writer.writeInt64(1, this.height); + if (this.txhash.length) + writer.writeString(2, this.txhash); + if (this.codespace.length) + writer.writeString(3, this.codespace); + if (this.code != 0) + writer.writeUint32(4, this.code); + if (this.data.length) + writer.writeString(5, this.data); + if (this.raw_log.length) + writer.writeString(6, this.raw_log); + if (this.logs.length) + writer.writeRepeatedMessage(7, this.logs, (item: ABCIMessageLog) => item.serialize(writer)); + if (this.info.length) + writer.writeString(8, this.info); + if (this.gas_wanted != 0) + writer.writeInt64(9, this.gas_wanted); + if (this.gas_used != 0) + writer.writeInt64(10, this.gas_used); + if (this.has_tx) + writer.writeMessage(11, this.tx, () => this.tx.serialize(writer)); + if (this.timestamp.length) + writer.writeString(12, this.timestamp); + if (this.events.length) + writer.writeRepeatedMessage(13, this.events, (item: dependency_2.tendermint.abci.Event) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + message.txhash = reader.readString(); + break; + case 3: + message.codespace = reader.readString(); + break; + case 4: + message.code = reader.readUint32(); + break; + case 5: + message.data = reader.readString(); + break; + case 6: + message.raw_log = reader.readString(); + break; + case 7: + reader.readMessage(message.logs, () => pb_1.Message.addToRepeatedWrapperField(message, 7, ABCIMessageLog.deserialize(reader), ABCIMessageLog)); + break; + case 8: + message.info = reader.readString(); + break; + case 9: + message.gas_wanted = reader.readInt64(); + break; + case 10: + message.gas_used = reader.readInt64(); + break; + case 11: + reader.readMessage(message.tx, () => message.tx = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 12: + message.timestamp = reader.readString(); + break; + case 13: + reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 13, dependency_2.tendermint.abci.Event.deserialize(reader), dependency_2.tendermint.abci.Event)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxResponse { + return TxResponse.deserialize(bytes); + } + } + export class ABCIMessageLog extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + msg_index?: number; + log?: string; + events?: StringEvent[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("msg_index" in data && data.msg_index != undefined) { + this.msg_index = data.msg_index; + } + if ("log" in data && data.log != undefined) { + this.log = data.log; + } + if ("events" in data && data.events != undefined) { + this.events = data.events; + } + } + } + get msg_index() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set msg_index(value: number) { + pb_1.Message.setField(this, 1, value); + } + get log() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set log(value: string) { + pb_1.Message.setField(this, 2, value); + } + get events() { + return pb_1.Message.getRepeatedWrapperField(this, StringEvent, 3) as StringEvent[]; + } + set events(value: StringEvent[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + msg_index?: number; + log?: string; + events?: ReturnType[]; + }): ABCIMessageLog { + const message = new ABCIMessageLog({}); + if (data.msg_index != null) { + message.msg_index = data.msg_index; + } + if (data.log != null) { + message.log = data.log; + } + if (data.events != null) { + message.events = data.events.map(item => StringEvent.fromObject(item)); + } + return message; + } + toObject() { + const data: { + msg_index?: number; + log?: string; + events?: ReturnType[]; + } = {}; + if (this.msg_index != null) { + data.msg_index = this.msg_index; + } + if (this.log != null) { + data.log = this.log; + } + if (this.events != null) { + data.events = this.events.map((item: StringEvent) => item.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.msg_index != 0) + writer.writeUint32(1, this.msg_index); + if (this.log.length) + writer.writeString(2, this.log); + if (this.events.length) + writer.writeRepeatedMessage(3, this.events, (item: StringEvent) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ABCIMessageLog { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ABCIMessageLog(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.msg_index = reader.readUint32(); + break; + case 2: + message.log = reader.readString(); + break; + case 3: + reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 3, StringEvent.deserialize(reader), StringEvent)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ABCIMessageLog { + return ABCIMessageLog.deserialize(bytes); + } + } + export class StringEvent extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type?: string; + attributes?: Attribute[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("attributes" in data && data.attributes != undefined) { + this.attributes = data.attributes; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 1, value); + } + get attributes() { + return pb_1.Message.getRepeatedWrapperField(this, Attribute, 2) as Attribute[]; + } + set attributes(value: Attribute[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + type?: string; + attributes?: ReturnType[]; + }): StringEvent { + const message = new StringEvent({}); + if (data.type != null) { + message.type = data.type; + } + if (data.attributes != null) { + message.attributes = data.attributes.map(item => Attribute.fromObject(item)); + } + return message; + } + toObject() { + const data: { + type?: string; + attributes?: ReturnType[]; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.attributes != null) { + data.attributes = this.attributes.map((item: Attribute) => item.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.type.length) + writer.writeString(1, this.type); + if (this.attributes.length) + writer.writeRepeatedMessage(2, this.attributes, (item: Attribute) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StringEvent { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StringEvent(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readString(); + break; + case 2: + reader.readMessage(message.attributes, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Attribute.deserialize(reader), Attribute)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): StringEvent { + return StringEvent.deserialize(bytes); + } + } + export class Attribute extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: string; + value?: 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 ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set value(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + key?: string; + value?: string; + }): Attribute { + const message = new Attribute({}); + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + key?: string; + value?: string; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + 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.key.length) + writer.writeString(1, this.key); + if (this.value.length) + writer.writeString(2, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Attribute { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Attribute(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readString(); + break; + case 2: + message.value = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Attribute { + return Attribute.deserialize(bytes); + } + } + export class GasInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + gas_wanted?: number; + gas_used?: 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 ("gas_wanted" in data && data.gas_wanted != undefined) { + this.gas_wanted = data.gas_wanted; + } + if ("gas_used" in data && data.gas_used != undefined) { + this.gas_used = data.gas_used; + } + } + } + get gas_wanted() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set gas_wanted(value: number) { + pb_1.Message.setField(this, 1, value); + } + get gas_used() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set gas_used(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + gas_wanted?: number; + gas_used?: number; + }): GasInfo { + const message = new GasInfo({}); + if (data.gas_wanted != null) { + message.gas_wanted = data.gas_wanted; + } + if (data.gas_used != null) { + message.gas_used = data.gas_used; + } + return message; + } + toObject() { + const data: { + gas_wanted?: number; + gas_used?: number; + } = {}; + if (this.gas_wanted != null) { + data.gas_wanted = this.gas_wanted; + } + if (this.gas_used != null) { + data.gas_used = this.gas_used; + } + 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.gas_wanted != 0) + writer.writeUint64(1, this.gas_wanted); + if (this.gas_used != 0) + writer.writeUint64(2, this.gas_used); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GasInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GasInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.gas_wanted = reader.readUint64(); + break; + case 2: + message.gas_used = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GasInfo { + return GasInfo.deserialize(bytes); + } + } + export class Result extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + /** @deprecated*/ + data?: Uint8Array; + log?: string; + events?: dependency_2.tendermint.abci.Event[]; + msg_responses?: dependency_4.google.protobuf.Any[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("log" in data && data.log != undefined) { + this.log = data.log; + } + if ("events" in data && data.events != undefined) { + this.events = data.events; + } + if ("msg_responses" in data && data.msg_responses != undefined) { + this.msg_responses = data.msg_responses; + } + } + } + /** @deprecated*/ + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + /** @deprecated*/ + set data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get log() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set log(value: string) { + pb_1.Message.setField(this, 2, value); + } + get events() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.tendermint.abci.Event, 3) as dependency_2.tendermint.abci.Event[]; + } + set events(value: dependency_2.tendermint.abci.Event[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get msg_responses() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.google.protobuf.Any, 4) as dependency_4.google.protobuf.Any[]; + } + set msg_responses(value: dependency_4.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + data?: Uint8Array; + log?: string; + events?: ReturnType[]; + msg_responses?: ReturnType[]; + }): Result { + const message = new Result({}); + if (data.data != null) { + message.data = data.data; + } + if (data.log != null) { + message.log = data.log; + } + if (data.events != null) { + message.events = data.events.map(item => dependency_2.tendermint.abci.Event.fromObject(item)); + } + if (data.msg_responses != null) { + message.msg_responses = data.msg_responses.map(item => dependency_4.google.protobuf.Any.fromObject(item)); + } + return message; + } + toObject() { + const data: { + data?: Uint8Array; + log?: string; + events?: ReturnType[]; + msg_responses?: ReturnType[]; + } = {}; + if (this.data != null) { + data.data = this.data; + } + if (this.log != null) { + data.log = this.log; + } + if (this.events != null) { + data.events = this.events.map((item: dependency_2.tendermint.abci.Event) => item.toObject()); + } + if (this.msg_responses != null) { + data.msg_responses = this.msg_responses.map((item: dependency_4.google.protobuf.Any) => item.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.data.length) + writer.writeBytes(1, this.data); + if (this.log.length) + writer.writeString(2, this.log); + if (this.events.length) + writer.writeRepeatedMessage(3, this.events, (item: dependency_2.tendermint.abci.Event) => item.serialize(writer)); + if (this.msg_responses.length) + writer.writeRepeatedMessage(4, this.msg_responses, (item: dependency_4.google.protobuf.Any) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Result { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Result(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readBytes(); + break; + case 2: + message.log = reader.readString(); + break; + case 3: + reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.tendermint.abci.Event.deserialize(reader), dependency_2.tendermint.abci.Event)); + break; + case 4: + reader.readMessage(message.msg_responses, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_4.google.protobuf.Any.deserialize(reader), dependency_4.google.protobuf.Any)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Result { + return Result.deserialize(bytes); + } + } + export class SimulationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + gas_info?: GasInfo; + result?: Result; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("gas_info" in data && data.gas_info != undefined) { + this.gas_info = data.gas_info; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get gas_info() { + return pb_1.Message.getWrapperField(this, GasInfo, 1) as GasInfo; + } + set gas_info(value: GasInfo) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_gas_info() { + return pb_1.Message.getField(this, 1) != null; + } + get result() { + return pb_1.Message.getWrapperField(this, Result, 2) as Result; + } + set result(value: Result) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_result() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + gas_info?: ReturnType; + result?: ReturnType; + }): SimulationResponse { + const message = new SimulationResponse({}); + if (data.gas_info != null) { + message.gas_info = GasInfo.fromObject(data.gas_info); + } + if (data.result != null) { + message.result = Result.fromObject(data.result); + } + return message; + } + toObject() { + const data: { + gas_info?: ReturnType; + result?: ReturnType; + } = {}; + if (this.gas_info != null) { + data.gas_info = this.gas_info.toObject(); + } + if (this.result != null) { + data.result = this.result.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_gas_info) + writer.writeMessage(1, this.gas_info, () => this.gas_info.serialize(writer)); + if (this.has_result) + writer.writeMessage(2, this.result, () => this.result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SimulationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SimulationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.gas_info, () => message.gas_info = GasInfo.deserialize(reader)); + break; + case 2: + reader.readMessage(message.result, () => message.result = Result.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SimulationResponse { + return SimulationResponse.deserialize(bytes); + } + } + /** @deprecated*/ + export class MsgData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + msg_type?: string; + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("msg_type" in data && data.msg_type != undefined) { + this.msg_type = data.msg_type; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get msg_type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set msg_type(value: string) { + pb_1.Message.setField(this, 1, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + msg_type?: string; + data?: Uint8Array; + }): MsgData { + const message = new MsgData({}); + if (data.msg_type != null) { + message.msg_type = data.msg_type; + } + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + msg_type?: string; + data?: Uint8Array; + } = {}; + if (this.msg_type != null) { + data.msg_type = this.msg_type; + } + if (this.data != null) { + data.data = this.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 (this.msg_type.length) + writer.writeString(1, this.msg_type); + if (this.data.length) + writer.writeBytes(2, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.msg_type = reader.readString(); + break; + case 2: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgData { + return MsgData.deserialize(bytes); + } + } + export class TxMsgData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + /** @deprecated*/ + data?: MsgData[]; + msg_responses?: dependency_4.google.protobuf.Any[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("msg_responses" in data && data.msg_responses != undefined) { + this.msg_responses = data.msg_responses; + } + } + } + /** @deprecated*/ + get data() { + return pb_1.Message.getRepeatedWrapperField(this, MsgData, 1) as MsgData[]; + } + /** @deprecated*/ + set data(value: MsgData[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get msg_responses() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any[]; + } + set msg_responses(value: dependency_4.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + data?: ReturnType[]; + msg_responses?: ReturnType[]; + }): TxMsgData { + const message = new TxMsgData({}); + if (data.data != null) { + message.data = data.data.map(item => MsgData.fromObject(item)); + } + if (data.msg_responses != null) { + message.msg_responses = data.msg_responses.map(item => dependency_4.google.protobuf.Any.fromObject(item)); + } + return message; + } + toObject() { + const data: { + data?: ReturnType[]; + msg_responses?: ReturnType[]; + } = {}; + if (this.data != null) { + data.data = this.data.map((item: MsgData) => item.toObject()); + } + if (this.msg_responses != null) { + data.msg_responses = this.msg_responses.map((item: dependency_4.google.protobuf.Any) => item.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.data.length) + writer.writeRepeatedMessage(1, this.data, (item: MsgData) => item.serialize(writer)); + if (this.msg_responses.length) + writer.writeRepeatedMessage(2, this.msg_responses, (item: dependency_4.google.protobuf.Any) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxMsgData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxMsgData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 1, MsgData.deserialize(reader), MsgData)); + break; + case 2: + reader.readMessage(message.msg_responses, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.google.protobuf.Any.deserialize(reader), dependency_4.google.protobuf.Any)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxMsgData { + return TxMsgData.deserialize(bytes); + } + } + export class SearchTxsResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + total_count?: number; + count?: number; + page_number?: number; + page_total?: number; + limit?: number; + txs?: TxResponse[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("total_count" in data && data.total_count != undefined) { + this.total_count = data.total_count; + } + if ("count" in data && data.count != undefined) { + this.count = data.count; + } + if ("page_number" in data && data.page_number != undefined) { + this.page_number = data.page_number; + } + if ("page_total" in data && data.page_total != undefined) { + this.page_total = data.page_total; + } + if ("limit" in data && data.limit != undefined) { + this.limit = data.limit; + } + if ("txs" in data && data.txs != undefined) { + this.txs = data.txs; + } + } + } + get total_count() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set total_count(value: number) { + pb_1.Message.setField(this, 1, value); + } + get count() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set count(value: number) { + pb_1.Message.setField(this, 2, value); + } + get page_number() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set page_number(value: number) { + pb_1.Message.setField(this, 3, value); + } + get page_total() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set page_total(value: number) { + pb_1.Message.setField(this, 4, value); + } + get limit() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set limit(value: number) { + pb_1.Message.setField(this, 5, value); + } + get txs() { + return pb_1.Message.getRepeatedWrapperField(this, TxResponse, 6) as TxResponse[]; + } + set txs(value: TxResponse[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + static fromObject(data: { + total_count?: number; + count?: number; + page_number?: number; + page_total?: number; + limit?: number; + txs?: ReturnType[]; + }): SearchTxsResult { + const message = new SearchTxsResult({}); + if (data.total_count != null) { + message.total_count = data.total_count; + } + if (data.count != null) { + message.count = data.count; + } + if (data.page_number != null) { + message.page_number = data.page_number; + } + if (data.page_total != null) { + message.page_total = data.page_total; + } + if (data.limit != null) { + message.limit = data.limit; + } + if (data.txs != null) { + message.txs = data.txs.map(item => TxResponse.fromObject(item)); + } + return message; + } + toObject() { + const data: { + total_count?: number; + count?: number; + page_number?: number; + page_total?: number; + limit?: number; + txs?: ReturnType[]; + } = {}; + if (this.total_count != null) { + data.total_count = this.total_count; + } + if (this.count != null) { + data.count = this.count; + } + if (this.page_number != null) { + data.page_number = this.page_number; + } + if (this.page_total != null) { + data.page_total = this.page_total; + } + if (this.limit != null) { + data.limit = this.limit; + } + if (this.txs != null) { + data.txs = this.txs.map((item: TxResponse) => item.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.total_count != 0) + writer.writeUint64(1, this.total_count); + if (this.count != 0) + writer.writeUint64(2, this.count); + if (this.page_number != 0) + writer.writeUint64(3, this.page_number); + if (this.page_total != 0) + writer.writeUint64(4, this.page_total); + if (this.limit != 0) + writer.writeUint64(5, this.limit); + if (this.txs.length) + writer.writeRepeatedMessage(6, this.txs, (item: TxResponse) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SearchTxsResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SearchTxsResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.total_count = reader.readUint64(); + break; + case 2: + message.count = reader.readUint64(); + break; + case 3: + message.page_number = reader.readUint64(); + break; + case 4: + message.page_total = reader.readUint64(); + break; + case 5: + message.limit = reader.readUint64(); + break; + case 6: + reader.readMessage(message.txs, () => pb_1.Message.addToRepeatedWrapperField(message, 6, TxResponse.deserialize(reader), TxResponse)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SearchTxsResult { + return SearchTxsResult.deserialize(bytes); + } + } + export class SearchBlocksResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + total_count?: number; + count?: number; + page_number?: number; + page_total?: number; + limit?: number; + blocks?: dependency_3.tendermint.types.Block[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("total_count" in data && data.total_count != undefined) { + this.total_count = data.total_count; + } + if ("count" in data && data.count != undefined) { + this.count = data.count; + } + if ("page_number" in data && data.page_number != undefined) { + this.page_number = data.page_number; + } + if ("page_total" in data && data.page_total != undefined) { + this.page_total = data.page_total; + } + if ("limit" in data && data.limit != undefined) { + this.limit = data.limit; + } + if ("blocks" in data && data.blocks != undefined) { + this.blocks = data.blocks; + } + } + } + get total_count() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set total_count(value: number) { + pb_1.Message.setField(this, 1, value); + } + get count() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set count(value: number) { + pb_1.Message.setField(this, 2, value); + } + get page_number() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set page_number(value: number) { + pb_1.Message.setField(this, 3, value); + } + get page_total() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set page_total(value: number) { + pb_1.Message.setField(this, 4, value); + } + get limit() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set limit(value: number) { + pb_1.Message.setField(this, 5, value); + } + get blocks() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.tendermint.types.Block, 6) as dependency_3.tendermint.types.Block[]; + } + set blocks(value: dependency_3.tendermint.types.Block[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + static fromObject(data: { + total_count?: number; + count?: number; + page_number?: number; + page_total?: number; + limit?: number; + blocks?: ReturnType[]; + }): SearchBlocksResult { + const message = new SearchBlocksResult({}); + if (data.total_count != null) { + message.total_count = data.total_count; + } + if (data.count != null) { + message.count = data.count; + } + if (data.page_number != null) { + message.page_number = data.page_number; + } + if (data.page_total != null) { + message.page_total = data.page_total; + } + if (data.limit != null) { + message.limit = data.limit; + } + if (data.blocks != null) { + message.blocks = data.blocks.map(item => dependency_3.tendermint.types.Block.fromObject(item)); + } + return message; + } + toObject() { + const data: { + total_count?: number; + count?: number; + page_number?: number; + page_total?: number; + limit?: number; + blocks?: ReturnType[]; + } = {}; + if (this.total_count != null) { + data.total_count = this.total_count; + } + if (this.count != null) { + data.count = this.count; + } + if (this.page_number != null) { + data.page_number = this.page_number; + } + if (this.page_total != null) { + data.page_total = this.page_total; + } + if (this.limit != null) { + data.limit = this.limit; + } + if (this.blocks != null) { + data.blocks = this.blocks.map((item: dependency_3.tendermint.types.Block) => item.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.total_count != 0) + writer.writeInt64(1, this.total_count); + if (this.count != 0) + writer.writeInt64(2, this.count); + if (this.page_number != 0) + writer.writeInt64(3, this.page_number); + if (this.page_total != 0) + writer.writeInt64(4, this.page_total); + if (this.limit != 0) + writer.writeInt64(5, this.limit); + if (this.blocks.length) + writer.writeRepeatedMessage(6, this.blocks, (item: dependency_3.tendermint.types.Block) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SearchBlocksResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SearchBlocksResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.total_count = reader.readInt64(); + break; + case 2: + message.count = reader.readInt64(); + break; + case 3: + message.page_number = reader.readInt64(); + break; + case 4: + message.page_total = reader.readInt64(); + break; + case 5: + message.limit = reader.readInt64(); + break; + case 6: + reader.readMessage(message.blocks, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_3.tendermint.types.Block.deserialize(reader), dependency_3.tendermint.types.Block)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SearchBlocksResult { + return SearchBlocksResult.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/base/abci/v1beta1/abci_pb.d.ts b/codegen/cosmos/base/abci/v1beta1/abci_pb.d.ts similarity index 88% rename from proto/cosmos/base/abci/v1beta1/abci_pb.d.ts rename to codegen/cosmos/base/abci/v1beta1/abci_pb.d.ts index 7ec747b..73325f1 100644 --- a/proto/cosmos/base/abci/v1beta1/abci_pb.d.ts +++ b/codegen/cosmos/base/abci/v1beta1/abci_pb.d.ts @@ -4,6 +4,7 @@ import * as jspb from "google-protobuf"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; import * as tendermint_abci_types_pb from "../../../../tendermint/abci/types_pb"; +import * as tendermint_types_block_pb from "../../../../tendermint/types/block_pb"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; export class TxResponse extends jspb.Message { @@ -346,3 +347,45 @@ export namespace SearchTxsResult { } } +export class SearchBlocksResult extends jspb.Message { + getTotalCount(): number; + setTotalCount(value: number): void; + + getCount(): number; + setCount(value: number): void; + + getPageNumber(): number; + setPageNumber(value: number): void; + + getPageTotal(): number; + setPageTotal(value: number): void; + + getLimit(): number; + setLimit(value: number): void; + + clearBlocksList(): void; + getBlocksList(): Array; + setBlocksList(value: Array): void; + addBlocks(value?: tendermint_types_block_pb.Block, index?: number): tendermint_types_block_pb.Block; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SearchBlocksResult.AsObject; + static toObject(includeInstance: boolean, msg: SearchBlocksResult): SearchBlocksResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SearchBlocksResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SearchBlocksResult; + static deserializeBinaryFromReader(message: SearchBlocksResult, reader: jspb.BinaryReader): SearchBlocksResult; +} + +export namespace SearchBlocksResult { + export type AsObject = { + totalCount: number, + count: number, + pageNumber: number, + pageTotal: number, + limit: number, + blocksList: Array, + } +} + diff --git a/proto/cosmos/base/abci/v1beta1/abci_pb.js b/codegen/cosmos/base/abci/v1beta1/abci_pb.js similarity index 89% rename from proto/cosmos/base/abci/v1beta1/abci_pb.js rename to codegen/cosmos/base/abci/v1beta1/abci_pb.js index a7bd786..643230c 100644 --- a/proto/cosmos/base/abci/v1beta1/abci_pb.js +++ b/codegen/cosmos/base/abci/v1beta1/abci_pb.js @@ -19,6 +19,8 @@ var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var tendermint_abci_types_pb = require('../../../../tendermint/abci/types_pb.js'); goog.object.extend(proto, tendermint_abci_types_pb); +var tendermint_types_block_pb = require('../../../../tendermint/types/block_pb.js'); +goog.object.extend(proto, tendermint_types_block_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); goog.exportSymbol('proto.cosmos.base.abci.v1beta1.ABCIMessageLog', null, global); @@ -26,6 +28,7 @@ goog.exportSymbol('proto.cosmos.base.abci.v1beta1.Attribute', null, global); goog.exportSymbol('proto.cosmos.base.abci.v1beta1.GasInfo', null, global); goog.exportSymbol('proto.cosmos.base.abci.v1beta1.MsgData', null, global); goog.exportSymbol('proto.cosmos.base.abci.v1beta1.Result', null, global); +goog.exportSymbol('proto.cosmos.base.abci.v1beta1.SearchBlocksResult', null, global); goog.exportSymbol('proto.cosmos.base.abci.v1beta1.SearchTxsResult', null, global); goog.exportSymbol('proto.cosmos.base.abci.v1beta1.SimulationResponse', null, global); goog.exportSymbol('proto.cosmos.base.abci.v1beta1.StringEvent', null, global); @@ -241,6 +244,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.base.abci.v1beta1.SearchTxsResult.displayName = 'proto.cosmos.base.abci.v1beta1.SearchTxsResult'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.SearchBlocksResult.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.SearchBlocksResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.SearchBlocksResult.displayName = 'proto.cosmos.base.abci.v1beta1.SearchBlocksResult'; +} /** * List of repeated fields within this message type. @@ -2741,4 +2765,314 @@ proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.clearTxsList = function }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.repeatedFields_ = [6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.SearchBlocksResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.toObject = function(includeInstance, msg) { + var f, obj = { + totalCount: jspb.Message.getFieldWithDefault(msg, 1, 0), + count: jspb.Message.getFieldWithDefault(msg, 2, 0), + pageNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), + pageTotal: jspb.Message.getFieldWithDefault(msg, 4, 0), + limit: jspb.Message.getFieldWithDefault(msg, 5, 0), + blocksList: jspb.Message.toObjectList(msg.getBlocksList(), + tendermint_types_block_pb.Block.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.SearchBlocksResult; + return proto.cosmos.base.abci.v1beta1.SearchBlocksResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalCount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPageNumber(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPageTotal(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimit(value); + break; + case 6: + var value = new tendermint_types_block_pb.Block; + reader.readMessage(value,tendermint_types_block_pb.Block.deserializeBinaryFromReader); + msg.addBlocks(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.SearchBlocksResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalCount(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getCount(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getPageNumber(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getPageTotal(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getBlocksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + tendermint_types_block_pb.Block.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 total_count = 1; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.getTotalCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.setTotalCount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 count = 2; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 page_number = 3; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.getPageNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.setPageNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 page_total = 4; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.getPageTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.setPageTotal = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 limit = 5; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated tendermint.types.Block blocks = 6; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.getBlocksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, tendermint_types_block_pb.Block, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} returns this +*/ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.setBlocksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.tendermint.types.Block=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Block} + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.addBlocks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.tendermint.types.Block, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.SearchBlocksResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchBlocksResult.prototype.clearBlocksList = function() { + return this.setBlocksList([]); +}; + + goog.object.extend(exports, proto.cosmos.base.abci.v1beta1); diff --git a/proto/cosmos/base/abci/v1beta1/abci_pb_service.d.ts b/codegen/cosmos/base/abci/v1beta1/abci_pb_service.d.ts similarity index 100% rename from proto/cosmos/base/abci/v1beta1/abci_pb_service.d.ts rename to codegen/cosmos/base/abci/v1beta1/abci_pb_service.d.ts diff --git a/proto/cosmos/base/abci/v1beta1/abci_pb_service.js b/codegen/cosmos/base/abci/v1beta1/abci_pb_service.js similarity index 100% rename from proto/cosmos/base/abci/v1beta1/abci_pb_service.js rename to codegen/cosmos/base/abci/v1beta1/abci_pb_service.js diff --git a/codegen/cosmos/base/node/v1beta1/query.ts b/codegen/cosmos/base/node/v1beta1/query.ts new file mode 100644 index 0000000..15d0022 --- /dev/null +++ b/codegen/cosmos/base/node/v1beta1/query.ts @@ -0,0 +1,450 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/base/node/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../google/api/annotations"; +import * as dependency_2 from "./../../../../google/protobuf/timestamp"; +import * as dependency_3 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.base.node.v1beta1 { + export class ConfigRequest 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: {}): ConfigRequest { + const message = new ConfigRequest({}); + 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): ConfigRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConfigRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConfigRequest { + return ConfigRequest.deserialize(bytes); + } + } + export class ConfigResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + minimum_gas_price?: string; + pruning_keep_recent?: string; + pruning_interval?: string; + halt_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 ("minimum_gas_price" in data && data.minimum_gas_price != undefined) { + this.minimum_gas_price = data.minimum_gas_price; + } + if ("pruning_keep_recent" in data && data.pruning_keep_recent != undefined) { + this.pruning_keep_recent = data.pruning_keep_recent; + } + if ("pruning_interval" in data && data.pruning_interval != undefined) { + this.pruning_interval = data.pruning_interval; + } + if ("halt_height" in data && data.halt_height != undefined) { + this.halt_height = data.halt_height; + } + } + } + get minimum_gas_price() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set minimum_gas_price(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pruning_keep_recent() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set pruning_keep_recent(value: string) { + pb_1.Message.setField(this, 2, value); + } + get pruning_interval() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set pruning_interval(value: string) { + pb_1.Message.setField(this, 3, value); + } + get halt_height() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set halt_height(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + minimum_gas_price?: string; + pruning_keep_recent?: string; + pruning_interval?: string; + halt_height?: number; + }): ConfigResponse { + const message = new ConfigResponse({}); + if (data.minimum_gas_price != null) { + message.minimum_gas_price = data.minimum_gas_price; + } + if (data.pruning_keep_recent != null) { + message.pruning_keep_recent = data.pruning_keep_recent; + } + if (data.pruning_interval != null) { + message.pruning_interval = data.pruning_interval; + } + if (data.halt_height != null) { + message.halt_height = data.halt_height; + } + return message; + } + toObject() { + const data: { + minimum_gas_price?: string; + pruning_keep_recent?: string; + pruning_interval?: string; + halt_height?: number; + } = {}; + if (this.minimum_gas_price != null) { + data.minimum_gas_price = this.minimum_gas_price; + } + if (this.pruning_keep_recent != null) { + data.pruning_keep_recent = this.pruning_keep_recent; + } + if (this.pruning_interval != null) { + data.pruning_interval = this.pruning_interval; + } + if (this.halt_height != null) { + data.halt_height = this.halt_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.minimum_gas_price.length) + writer.writeString(1, this.minimum_gas_price); + if (this.pruning_keep_recent.length) + writer.writeString(2, this.pruning_keep_recent); + if (this.pruning_interval.length) + writer.writeString(3, this.pruning_interval); + if (this.halt_height != 0) + writer.writeUint64(4, this.halt_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConfigResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConfigResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.minimum_gas_price = reader.readString(); + break; + case 2: + message.pruning_keep_recent = reader.readString(); + break; + case 3: + message.pruning_interval = reader.readString(); + break; + case 4: + message.halt_height = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConfigResponse { + return ConfigResponse.deserialize(bytes); + } + } + export class StatusRequest 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: {}): StatusRequest { + const message = new StatusRequest({}); + 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): StatusRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StatusRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): StatusRequest { + return StatusRequest.deserialize(bytes); + } + } + export class StatusResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + earliest_store_height?: number; + height?: number; + timestamp?: dependency_2.google.protobuf.Timestamp; + app_hash?: Uint8Array; + validator_hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("earliest_store_height" in data && data.earliest_store_height != undefined) { + this.earliest_store_height = data.earliest_store_height; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("app_hash" in data && data.app_hash != undefined) { + this.app_hash = data.app_hash; + } + if ("validator_hash" in data && data.validator_hash != undefined) { + this.validator_hash = data.validator_hash; + } + } + } + get earliest_store_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set earliest_store_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 3) as dependency_2.google.protobuf.Timestamp; + } + set timestamp(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 3) != null; + } + get app_hash() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set app_hash(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get validator_hash() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set validator_hash(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + earliest_store_height?: number; + height?: number; + timestamp?: ReturnType; + app_hash?: Uint8Array; + validator_hash?: Uint8Array; + }): StatusResponse { + const message = new StatusResponse({}); + if (data.earliest_store_height != null) { + message.earliest_store_height = data.earliest_store_height; + } + if (data.height != null) { + message.height = data.height; + } + if (data.timestamp != null) { + message.timestamp = dependency_2.google.protobuf.Timestamp.fromObject(data.timestamp); + } + if (data.app_hash != null) { + message.app_hash = data.app_hash; + } + if (data.validator_hash != null) { + message.validator_hash = data.validator_hash; + } + return message; + } + toObject() { + const data: { + earliest_store_height?: number; + height?: number; + timestamp?: ReturnType; + app_hash?: Uint8Array; + validator_hash?: Uint8Array; + } = {}; + if (this.earliest_store_height != null) { + data.earliest_store_height = this.earliest_store_height; + } + if (this.height != null) { + data.height = this.height; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp.toObject(); + } + if (this.app_hash != null) { + data.app_hash = this.app_hash; + } + if (this.validator_hash != null) { + data.validator_hash = this.validator_hash; + } + 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.earliest_store_height != 0) + writer.writeUint64(1, this.earliest_store_height); + if (this.height != 0) + writer.writeUint64(2, this.height); + if (this.has_timestamp) + writer.writeMessage(3, this.timestamp, () => this.timestamp.serialize(writer)); + if (this.app_hash.length) + writer.writeBytes(4, this.app_hash); + if (this.validator_hash.length) + writer.writeBytes(5, this.validator_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StatusResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StatusResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.earliest_store_height = reader.readUint64(); + break; + case 2: + message.height = reader.readUint64(); + break; + case 3: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 4: + message.app_hash = reader.readBytes(); + break; + case 5: + message.validator_hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): StatusResponse { + return StatusResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedServiceService { + static definition = { + Config: { + path: "/cosmos.base.node.v1beta1.Service/Config", + requestStream: false, + responseStream: false, + requestSerialize: (message: ConfigRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ConfigRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ConfigResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ConfigResponse.deserialize(new Uint8Array(bytes)) + }, + Status: { + path: "/cosmos.base.node.v1beta1.Service/Status", + requestStream: false, + responseStream: false, + requestSerialize: (message: StatusRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => StatusRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: StatusResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => StatusResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Config(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Status(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedServiceService.definition, "Service", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Config: GrpcUnaryServiceInterface = (message: ConfigRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Config(message, metadata, options, callback); + }; + Status: GrpcUnaryServiceInterface = (message: StatusRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Status(message, metadata, options, callback); + }; + } +} diff --git a/codegen/cosmos/base/node/v1beta1/query_pb.d.ts b/codegen/cosmos/base/node/v1beta1/query_pb.d.ts new file mode 100644 index 0000000..23f84f7 --- /dev/null +++ b/codegen/cosmos/base/node/v1beta1/query_pb.d.ts @@ -0,0 +1,114 @@ +// package: cosmos.base.node.v1beta1 +// file: cosmos/base/node/v1beta1/query.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../../google/api/annotations_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; + +export class ConfigRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConfigRequest.AsObject; + static toObject(includeInstance: boolean, msg: ConfigRequest): ConfigRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConfigRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConfigRequest; + static deserializeBinaryFromReader(message: ConfigRequest, reader: jspb.BinaryReader): ConfigRequest; +} + +export namespace ConfigRequest { + export type AsObject = { + } +} + +export class ConfigResponse extends jspb.Message { + getMinimumGasPrice(): string; + setMinimumGasPrice(value: string): void; + + getPruningKeepRecent(): string; + setPruningKeepRecent(value: string): void; + + getPruningInterval(): string; + setPruningInterval(value: string): void; + + getHaltHeight(): number; + setHaltHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConfigResponse.AsObject; + static toObject(includeInstance: boolean, msg: ConfigResponse): ConfigResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConfigResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConfigResponse; + static deserializeBinaryFromReader(message: ConfigResponse, reader: jspb.BinaryReader): ConfigResponse; +} + +export namespace ConfigResponse { + export type AsObject = { + minimumGasPrice: string, + pruningKeepRecent: string, + pruningInterval: string, + haltHeight: number, + } +} + +export class StatusRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: StatusRequest): StatusRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StatusRequest; + static deserializeBinaryFromReader(message: StatusRequest, reader: jspb.BinaryReader): StatusRequest; +} + +export namespace StatusRequest { + export type AsObject = { + } +} + +export class StatusResponse extends jspb.Message { + getEarliestStoreHeight(): number; + setEarliestStoreHeight(value: number): void; + + getHeight(): number; + setHeight(value: number): void; + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getAppHash(): Uint8Array | string; + getAppHash_asU8(): Uint8Array; + getAppHash_asB64(): string; + setAppHash(value: Uint8Array | string): void; + + getValidatorHash(): Uint8Array | string; + getValidatorHash_asU8(): Uint8Array; + getValidatorHash_asB64(): string; + setValidatorHash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StatusResponse.AsObject; + static toObject(includeInstance: boolean, msg: StatusResponse): StatusResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StatusResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StatusResponse; + static deserializeBinaryFromReader(message: StatusResponse, reader: jspb.BinaryReader): StatusResponse; +} + +export namespace StatusResponse { + export type AsObject = { + earliestStoreHeight: number, + height: number, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + appHash: Uint8Array | string, + validatorHash: Uint8Array | string, + } +} + diff --git a/codegen/cosmos/base/node/v1beta1/query_pb.js b/codegen/cosmos/base/node/v1beta1/query_pb.js new file mode 100644 index 0000000..4f8fb5c --- /dev/null +++ b/codegen/cosmos/base/node/v1beta1/query_pb.js @@ -0,0 +1,853 @@ +// source: cosmos/base/node/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.cosmos.base.node.v1beta1.ConfigRequest', null, global); +goog.exportSymbol('proto.cosmos.base.node.v1beta1.ConfigResponse', null, global); +goog.exportSymbol('proto.cosmos.base.node.v1beta1.StatusRequest', null, global); +goog.exportSymbol('proto.cosmos.base.node.v1beta1.StatusResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.base.node.v1beta1.ConfigRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.node.v1beta1.ConfigRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.node.v1beta1.ConfigRequest.displayName = 'proto.cosmos.base.node.v1beta1.ConfigRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.base.node.v1beta1.ConfigResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.node.v1beta1.ConfigResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.node.v1beta1.ConfigResponse.displayName = 'proto.cosmos.base.node.v1beta1.ConfigResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.base.node.v1beta1.StatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.node.v1beta1.StatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.node.v1beta1.StatusRequest.displayName = 'proto.cosmos.base.node.v1beta1.StatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.base.node.v1beta1.StatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.node.v1beta1.StatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.node.v1beta1.StatusResponse.displayName = 'proto.cosmos.base.node.v1beta1.StatusResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.base.node.v1beta1.ConfigRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.node.v1beta1.ConfigRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.base.node.v1beta1.ConfigRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.node.v1beta1.ConfigRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.node.v1beta1.ConfigRequest} + */ +proto.cosmos.base.node.v1beta1.ConfigRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.node.v1beta1.ConfigRequest; + return proto.cosmos.base.node.v1beta1.ConfigRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.node.v1beta1.ConfigRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.node.v1beta1.ConfigRequest} + */ +proto.cosmos.base.node.v1beta1.ConfigRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.node.v1beta1.ConfigRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.node.v1beta1.ConfigRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.base.node.v1beta1.ConfigRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.node.v1beta1.ConfigRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.node.v1beta1.ConfigResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.base.node.v1beta1.ConfigResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.toObject = function(includeInstance, msg) { + var f, obj = { + minimumGasPrice: jspb.Message.getFieldWithDefault(msg, 1, ""), + pruningKeepRecent: jspb.Message.getFieldWithDefault(msg, 2, ""), + pruningInterval: jspb.Message.getFieldWithDefault(msg, 3, ""), + haltHeight: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.node.v1beta1.ConfigResponse} + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.node.v1beta1.ConfigResponse; + return proto.cosmos.base.node.v1beta1.ConfigResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.node.v1beta1.ConfigResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.node.v1beta1.ConfigResponse} + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMinimumGasPrice(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPruningKeepRecent(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPruningInterval(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHaltHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.node.v1beta1.ConfigResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.base.node.v1beta1.ConfigResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMinimumGasPrice(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPruningKeepRecent(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPruningInterval(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getHaltHeight(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional string minimum_gas_price = 1; + * @return {string} + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.getMinimumGasPrice = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.node.v1beta1.ConfigResponse} returns this + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.setMinimumGasPrice = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string pruning_keep_recent = 2; + * @return {string} + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.getPruningKeepRecent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.node.v1beta1.ConfigResponse} returns this + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.setPruningKeepRecent = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string pruning_interval = 3; + * @return {string} + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.getPruningInterval = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.node.v1beta1.ConfigResponse} returns this + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.setPruningInterval = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 halt_height = 4; + * @return {number} + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.getHaltHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.node.v1beta1.ConfigResponse} returns this + */ +proto.cosmos.base.node.v1beta1.ConfigResponse.prototype.setHaltHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.base.node.v1beta1.StatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.node.v1beta1.StatusRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.base.node.v1beta1.StatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.node.v1beta1.StatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.node.v1beta1.StatusRequest} + */ +proto.cosmos.base.node.v1beta1.StatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.node.v1beta1.StatusRequest; + return proto.cosmos.base.node.v1beta1.StatusRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.node.v1beta1.StatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.node.v1beta1.StatusRequest} + */ +proto.cosmos.base.node.v1beta1.StatusRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.node.v1beta1.StatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.node.v1beta1.StatusRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.base.node.v1beta1.StatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.node.v1beta1.StatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.node.v1beta1.StatusResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.base.node.v1beta1.StatusResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.node.v1beta1.StatusResponse.toObject = function(includeInstance, msg) { + var f, obj = { + earliestStoreHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + appHash: msg.getAppHash_asB64(), + validatorHash: msg.getValidatorHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.base.node.v1beta1.StatusResponse} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.node.v1beta1.StatusResponse; + return proto.cosmos.base.node.v1beta1.StatusResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.node.v1beta1.StatusResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.node.v1beta1.StatusResponse} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setEarliestStoreHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppHash(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.node.v1beta1.StatusResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.base.node.v1beta1.StatusResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.node.v1beta1.StatusResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEarliestStoreHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getValidatorHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional uint64 earliest_store_height = 1; + * @return {number} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.getEarliestStoreHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.node.v1beta1.StatusResponse} returns this + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.setEarliestStoreHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 height = 2; + * @return {number} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.node.v1beta1.StatusResponse} returns this + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.base.node.v1beta1.StatusResponse} returns this +*/ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.node.v1beta1.StatusResponse} returns this + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes app_hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes app_hash = 4; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppHash()` + * @return {!Uint8Array} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.node.v1beta1.StatusResponse} returns this + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.setAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes validator_hash = 5; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.getValidatorHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes validator_hash = 5; + * This is a type-conversion wrapper around `getValidatorHash()` + * @return {string} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.getValidatorHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorHash())); +}; + + +/** + * optional bytes validator_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorHash()` + * @return {!Uint8Array} + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.getValidatorHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.node.v1beta1.StatusResponse} returns this + */ +proto.cosmos.base.node.v1beta1.StatusResponse.prototype.setValidatorHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.node.v1beta1); diff --git a/proto/cosmos/base/node/v1beta1/query_pb_service.d.ts b/codegen/cosmos/base/node/v1beta1/query_pb_service.d.ts similarity index 74% rename from proto/cosmos/base/node/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/base/node/v1beta1/query_pb_service.d.ts index 8d05563..4f87dd8 100644 --- a/proto/cosmos/base/node/v1beta1/query_pb_service.d.ts +++ b/codegen/cosmos/base/node/v1beta1/query_pb_service.d.ts @@ -13,9 +13,19 @@ type ServiceConfig = { readonly responseType: typeof cosmos_base_node_v1beta1_query_pb.ConfigResponse; }; +type ServiceStatus = { + readonly methodName: string; + readonly service: typeof Service; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_base_node_v1beta1_query_pb.StatusRequest; + readonly responseType: typeof cosmos_base_node_v1beta1_query_pb.StatusResponse; +}; + export class Service { static readonly serviceName: string; static readonly Config: ServiceConfig; + static readonly Status: ServiceStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -59,5 +69,14 @@ export class ServiceClient { requestMessage: cosmos_base_node_v1beta1_query_pb.ConfigRequest, callback: (error: ServiceError|null, responseMessage: cosmos_base_node_v1beta1_query_pb.ConfigResponse|null) => void ): UnaryResponse; + status( + requestMessage: cosmos_base_node_v1beta1_query_pb.StatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_base_node_v1beta1_query_pb.StatusResponse|null) => void + ): UnaryResponse; + status( + requestMessage: cosmos_base_node_v1beta1_query_pb.StatusRequest, + callback: (error: ServiceError|null, responseMessage: cosmos_base_node_v1beta1_query_pb.StatusResponse|null) => void + ): UnaryResponse; } diff --git a/proto/cosmos/base/node/v1beta1/query_pb_service.js b/codegen/cosmos/base/node/v1beta1/query_pb_service.js similarity index 60% rename from proto/cosmos/base/node/v1beta1/query_pb_service.js rename to codegen/cosmos/base/node/v1beta1/query_pb_service.js index 4065131..656192d 100644 --- a/proto/cosmos/base/node/v1beta1/query_pb_service.js +++ b/codegen/cosmos/base/node/v1beta1/query_pb_service.js @@ -19,6 +19,15 @@ Service.Config = { responseType: cosmos_base_node_v1beta1_query_pb.ConfigResponse }; +Service.Status = { + methodName: "Status", + service: Service, + requestStream: false, + responseStream: false, + requestType: cosmos_base_node_v1beta1_query_pb.StatusRequest, + responseType: cosmos_base_node_v1beta1_query_pb.StatusResponse +}; + exports.Service = Service; function ServiceClient(serviceHost, options) { @@ -57,5 +66,36 @@ ServiceClient.prototype.config = function config(requestMessage, metadata, callb }; }; +ServiceClient.prototype.status = function status(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Service.Status, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.ServiceClient = ServiceClient; diff --git a/codegen/cosmos/base/query/v1beta1/pagination.ts b/codegen/cosmos/base/query/v1beta1/pagination.ts new file mode 100644 index 0000000..0d0bac2 --- /dev/null +++ b/codegen/cosmos/base/query/v1beta1/pagination.ts @@ -0,0 +1,257 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/base/query/v1beta1/pagination.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace cosmos.base.query.v1beta1 { + export class PageRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + offset?: number; + limit?: number; + count_total?: boolean; + reverse?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("offset" in data && data.offset != undefined) { + this.offset = data.offset; + } + if ("limit" in data && data.limit != undefined) { + this.limit = data.limit; + } + if ("count_total" in data && data.count_total != undefined) { + this.count_total = data.count_total; + } + if ("reverse" in data && data.reverse != undefined) { + this.reverse = data.reverse; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get offset() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set offset(value: number) { + pb_1.Message.setField(this, 2, value); + } + get limit() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set limit(value: number) { + pb_1.Message.setField(this, 3, value); + } + get count_total() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set count_total(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + get reverse() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set reverse(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + key?: Uint8Array; + offset?: number; + limit?: number; + count_total?: boolean; + reverse?: boolean; + }): PageRequest { + const message = new PageRequest({}); + if (data.key != null) { + message.key = data.key; + } + if (data.offset != null) { + message.offset = data.offset; + } + if (data.limit != null) { + message.limit = data.limit; + } + if (data.count_total != null) { + message.count_total = data.count_total; + } + if (data.reverse != null) { + message.reverse = data.reverse; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + offset?: number; + limit?: number; + count_total?: boolean; + reverse?: boolean; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.offset != null) { + data.offset = this.offset; + } + if (this.limit != null) { + data.limit = this.limit; + } + if (this.count_total != null) { + data.count_total = this.count_total; + } + if (this.reverse != null) { + data.reverse = this.reverse; + } + 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.key.length) + writer.writeBytes(1, this.key); + if (this.offset != 0) + writer.writeUint64(2, this.offset); + if (this.limit != 0) + writer.writeUint64(3, this.limit); + if (this.count_total != false) + writer.writeBool(4, this.count_total); + if (this.reverse != false) + writer.writeBool(5, this.reverse); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PageRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PageRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + case 2: + message.offset = reader.readUint64(); + break; + case 3: + message.limit = reader.readUint64(); + break; + case 4: + message.count_total = reader.readBool(); + break; + case 5: + message.reverse = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PageRequest { + return PageRequest.deserialize(bytes); + } + } + export class PageResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + next_key?: Uint8Array; + total?: 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 ("next_key" in data && data.next_key != undefined) { + this.next_key = data.next_key; + } + if ("total" in data && data.total != undefined) { + this.total = data.total; + } + } + } + get next_key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set next_key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get total() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set total(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + next_key?: Uint8Array; + total?: number; + }): PageResponse { + const message = new PageResponse({}); + if (data.next_key != null) { + message.next_key = data.next_key; + } + if (data.total != null) { + message.total = data.total; + } + return message; + } + toObject() { + const data: { + next_key?: Uint8Array; + total?: number; + } = {}; + if (this.next_key != null) { + data.next_key = this.next_key; + } + if (this.total != null) { + data.total = this.total; + } + 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.next_key.length) + writer.writeBytes(1, this.next_key); + if (this.total != 0) + writer.writeUint64(2, this.total); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PageResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PageResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.next_key = reader.readBytes(); + break; + case 2: + message.total = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PageResponse { + return PageResponse.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/base/query/v1beta1/pagination_pb.d.ts b/codegen/cosmos/base/query/v1beta1/pagination_pb.d.ts similarity index 100% rename from proto/cosmos/base/query/v1beta1/pagination_pb.d.ts rename to codegen/cosmos/base/query/v1beta1/pagination_pb.d.ts diff --git a/proto/cosmos/base/query/v1beta1/pagination_pb.js b/codegen/cosmos/base/query/v1beta1/pagination_pb.js similarity index 100% rename from proto/cosmos/base/query/v1beta1/pagination_pb.js rename to codegen/cosmos/base/query/v1beta1/pagination_pb.js diff --git a/proto/cosmos/base/query/v1beta1/pagination_pb_service.d.ts b/codegen/cosmos/base/query/v1beta1/pagination_pb_service.d.ts similarity index 100% rename from proto/cosmos/base/query/v1beta1/pagination_pb_service.d.ts rename to codegen/cosmos/base/query/v1beta1/pagination_pb_service.d.ts diff --git a/proto/cosmos/base/query/v1beta1/pagination_pb_service.js b/codegen/cosmos/base/query/v1beta1/pagination_pb_service.js similarity index 100% rename from proto/cosmos/base/query/v1beta1/pagination_pb_service.js rename to codegen/cosmos/base/query/v1beta1/pagination_pb_service.js diff --git a/codegen/cosmos/base/reflection/v1beta1/reflection.ts b/codegen/cosmos/base/reflection/v1beta1/reflection.ts new file mode 100644 index 0000000..194f2f9 --- /dev/null +++ b/codegen/cosmos/base/reflection/v1beta1/reflection.ts @@ -0,0 +1,311 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/base/reflection/v1beta1/reflection.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../google/api/annotations"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.base.reflection.v1beta1 { + export class ListAllInterfacesRequest 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: {}): ListAllInterfacesRequest { + const message = new ListAllInterfacesRequest({}); + 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): ListAllInterfacesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListAllInterfacesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListAllInterfacesRequest { + return ListAllInterfacesRequest.deserialize(bytes); + } + } + export class ListAllInterfacesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + interface_names?: string[]; + }) { + 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 ("interface_names" in data && data.interface_names != undefined) { + this.interface_names = data.interface_names; + } + } + } + get interface_names() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set interface_names(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + interface_names?: string[]; + }): ListAllInterfacesResponse { + const message = new ListAllInterfacesResponse({}); + if (data.interface_names != null) { + message.interface_names = data.interface_names; + } + return message; + } + toObject() { + const data: { + interface_names?: string[]; + } = {}; + if (this.interface_names != null) { + data.interface_names = this.interface_names; + } + 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.interface_names.length) + writer.writeRepeatedString(1, this.interface_names); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListAllInterfacesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListAllInterfacesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListAllInterfacesResponse { + return ListAllInterfacesResponse.deserialize(bytes); + } + } + export class ListImplementationsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + interface_name?: 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 ("interface_name" in data && data.interface_name != undefined) { + this.interface_name = data.interface_name; + } + } + } + get interface_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set interface_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + interface_name?: string; + }): ListImplementationsRequest { + const message = new ListImplementationsRequest({}); + if (data.interface_name != null) { + message.interface_name = data.interface_name; + } + return message; + } + toObject() { + const data: { + interface_name?: string; + } = {}; + if (this.interface_name != null) { + data.interface_name = this.interface_name; + } + 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.interface_name.length) + writer.writeString(1, this.interface_name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListImplementationsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListImplementationsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.interface_name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListImplementationsRequest { + return ListImplementationsRequest.deserialize(bytes); + } + } + export class ListImplementationsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + implementation_message_names?: string[]; + }) { + 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 ("implementation_message_names" in data && data.implementation_message_names != undefined) { + this.implementation_message_names = data.implementation_message_names; + } + } + } + get implementation_message_names() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set implementation_message_names(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + implementation_message_names?: string[]; + }): ListImplementationsResponse { + const message = new ListImplementationsResponse({}); + if (data.implementation_message_names != null) { + message.implementation_message_names = data.implementation_message_names; + } + return message; + } + toObject() { + const data: { + implementation_message_names?: string[]; + } = {}; + if (this.implementation_message_names != null) { + data.implementation_message_names = this.implementation_message_names; + } + 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.implementation_message_names.length) + writer.writeRepeatedString(1, this.implementation_message_names); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListImplementationsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListImplementationsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListImplementationsResponse { + return ListImplementationsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedReflectionServiceService { + static definition = { + ListAllInterfaces: { + path: "/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces", + requestStream: false, + responseStream: false, + requestSerialize: (message: ListAllInterfacesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ListAllInterfacesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ListAllInterfacesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ListAllInterfacesResponse.deserialize(new Uint8Array(bytes)) + }, + ListImplementations: { + path: "/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations", + requestStream: false, + responseStream: false, + requestSerialize: (message: ListImplementationsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ListImplementationsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ListImplementationsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ListImplementationsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract ListAllInterfaces(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ListImplementations(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ReflectionServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedReflectionServiceService.definition, "ReflectionService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + ListAllInterfaces: GrpcUnaryServiceInterface = (message: ListAllInterfacesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ListAllInterfaces(message, metadata, options, callback); + }; + ListImplementations: GrpcUnaryServiceInterface = (message: ListImplementationsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ListImplementations(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/base/reflection/v1beta1/reflection_pb.d.ts b/codegen/cosmos/base/reflection/v1beta1/reflection_pb.d.ts similarity index 100% rename from proto/cosmos/base/reflection/v1beta1/reflection_pb.d.ts rename to codegen/cosmos/base/reflection/v1beta1/reflection_pb.d.ts diff --git a/proto/cosmos/base/reflection/v1beta1/reflection_pb.js b/codegen/cosmos/base/reflection/v1beta1/reflection_pb.js similarity index 100% rename from proto/cosmos/base/reflection/v1beta1/reflection_pb.js rename to codegen/cosmos/base/reflection/v1beta1/reflection_pb.js diff --git a/proto/cosmos/base/reflection/v1beta1/reflection_pb_service.d.ts b/codegen/cosmos/base/reflection/v1beta1/reflection_pb_service.d.ts similarity index 100% rename from proto/cosmos/base/reflection/v1beta1/reflection_pb_service.d.ts rename to codegen/cosmos/base/reflection/v1beta1/reflection_pb_service.d.ts diff --git a/proto/cosmos/base/reflection/v1beta1/reflection_pb_service.js b/codegen/cosmos/base/reflection/v1beta1/reflection_pb_service.js similarity index 100% rename from proto/cosmos/base/reflection/v1beta1/reflection_pb_service.js rename to codegen/cosmos/base/reflection/v1beta1/reflection_pb_service.js diff --git a/codegen/cosmos/base/reflection/v2alpha1/reflection.ts b/codegen/cosmos/base/reflection/v2alpha1/reflection.ts new file mode 100644 index 0000000..858c5c7 --- /dev/null +++ b/codegen/cosmos/base/reflection/v2alpha1/reflection.ts @@ -0,0 +1,2083 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/base/reflection/v2alpha1/reflection.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../google/api/annotations"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.base.reflection.v2alpha1 { + export class AppDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authn?: AuthnDescriptor; + chain?: ChainDescriptor; + codec?: CodecDescriptor; + configuration?: ConfigurationDescriptor; + query_services?: QueryServicesDescriptor; + tx?: TxDescriptor; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authn" in data && data.authn != undefined) { + this.authn = data.authn; + } + if ("chain" in data && data.chain != undefined) { + this.chain = data.chain; + } + if ("codec" in data && data.codec != undefined) { + this.codec = data.codec; + } + if ("configuration" in data && data.configuration != undefined) { + this.configuration = data.configuration; + } + if ("query_services" in data && data.query_services != undefined) { + this.query_services = data.query_services; + } + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + } + } + get authn() { + return pb_1.Message.getWrapperField(this, AuthnDescriptor, 1) as AuthnDescriptor; + } + set authn(value: AuthnDescriptor) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_authn() { + return pb_1.Message.getField(this, 1) != null; + } + get chain() { + return pb_1.Message.getWrapperField(this, ChainDescriptor, 2) as ChainDescriptor; + } + set chain(value: ChainDescriptor) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_chain() { + return pb_1.Message.getField(this, 2) != null; + } + get codec() { + return pb_1.Message.getWrapperField(this, CodecDescriptor, 3) as CodecDescriptor; + } + set codec(value: CodecDescriptor) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_codec() { + return pb_1.Message.getField(this, 3) != null; + } + get configuration() { + return pb_1.Message.getWrapperField(this, ConfigurationDescriptor, 4) as ConfigurationDescriptor; + } + set configuration(value: ConfigurationDescriptor) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_configuration() { + return pb_1.Message.getField(this, 4) != null; + } + get query_services() { + return pb_1.Message.getWrapperField(this, QueryServicesDescriptor, 5) as QueryServicesDescriptor; + } + set query_services(value: QueryServicesDescriptor) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_query_services() { + return pb_1.Message.getField(this, 5) != null; + } + get tx() { + return pb_1.Message.getWrapperField(this, TxDescriptor, 6) as TxDescriptor; + } + set tx(value: TxDescriptor) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_tx() { + return pb_1.Message.getField(this, 6) != null; + } + static fromObject(data: { + authn?: ReturnType; + chain?: ReturnType; + codec?: ReturnType; + configuration?: ReturnType; + query_services?: ReturnType; + tx?: ReturnType; + }): AppDescriptor { + const message = new AppDescriptor({}); + if (data.authn != null) { + message.authn = AuthnDescriptor.fromObject(data.authn); + } + if (data.chain != null) { + message.chain = ChainDescriptor.fromObject(data.chain); + } + if (data.codec != null) { + message.codec = CodecDescriptor.fromObject(data.codec); + } + if (data.configuration != null) { + message.configuration = ConfigurationDescriptor.fromObject(data.configuration); + } + if (data.query_services != null) { + message.query_services = QueryServicesDescriptor.fromObject(data.query_services); + } + if (data.tx != null) { + message.tx = TxDescriptor.fromObject(data.tx); + } + return message; + } + toObject() { + const data: { + authn?: ReturnType; + chain?: ReturnType; + codec?: ReturnType; + configuration?: ReturnType; + query_services?: ReturnType; + tx?: ReturnType; + } = {}; + if (this.authn != null) { + data.authn = this.authn.toObject(); + } + if (this.chain != null) { + data.chain = this.chain.toObject(); + } + if (this.codec != null) { + data.codec = this.codec.toObject(); + } + if (this.configuration != null) { + data.configuration = this.configuration.toObject(); + } + if (this.query_services != null) { + data.query_services = this.query_services.toObject(); + } + if (this.tx != null) { + data.tx = this.tx.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_authn) + writer.writeMessage(1, this.authn, () => this.authn.serialize(writer)); + if (this.has_chain) + writer.writeMessage(2, this.chain, () => this.chain.serialize(writer)); + if (this.has_codec) + writer.writeMessage(3, this.codec, () => this.codec.serialize(writer)); + if (this.has_configuration) + writer.writeMessage(4, this.configuration, () => this.configuration.serialize(writer)); + if (this.has_query_services) + writer.writeMessage(5, this.query_services, () => this.query_services.serialize(writer)); + if (this.has_tx) + writer.writeMessage(6, this.tx, () => this.tx.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AppDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AppDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.authn, () => message.authn = AuthnDescriptor.deserialize(reader)); + break; + case 2: + reader.readMessage(message.chain, () => message.chain = ChainDescriptor.deserialize(reader)); + break; + case 3: + reader.readMessage(message.codec, () => message.codec = CodecDescriptor.deserialize(reader)); + break; + case 4: + reader.readMessage(message.configuration, () => message.configuration = ConfigurationDescriptor.deserialize(reader)); + break; + case 5: + reader.readMessage(message.query_services, () => message.query_services = QueryServicesDescriptor.deserialize(reader)); + break; + case 6: + reader.readMessage(message.tx, () => message.tx = TxDescriptor.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AppDescriptor { + return AppDescriptor.deserialize(bytes); + } + } + export class TxDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fullname?: string; + msgs?: MsgDescriptor[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fullname" in data && data.fullname != undefined) { + this.fullname = data.fullname; + } + if ("msgs" in data && data.msgs != undefined) { + this.msgs = data.msgs; + } + } + } + get fullname() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fullname(value: string) { + pb_1.Message.setField(this, 1, value); + } + get msgs() { + return pb_1.Message.getRepeatedWrapperField(this, MsgDescriptor, 2) as MsgDescriptor[]; + } + set msgs(value: MsgDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + fullname?: string; + msgs?: ReturnType[]; + }): TxDescriptor { + const message = new TxDescriptor({}); + if (data.fullname != null) { + message.fullname = data.fullname; + } + if (data.msgs != null) { + message.msgs = data.msgs.map(item => MsgDescriptor.fromObject(item)); + } + return message; + } + toObject() { + const data: { + fullname?: string; + msgs?: ReturnType[]; + } = {}; + if (this.fullname != null) { + data.fullname = this.fullname; + } + if (this.msgs != null) { + data.msgs = this.msgs.map((item: MsgDescriptor) => item.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.fullname.length) + writer.writeString(1, this.fullname); + if (this.msgs.length) + writer.writeRepeatedMessage(2, this.msgs, (item: MsgDescriptor) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fullname = reader.readString(); + break; + case 2: + reader.readMessage(message.msgs, () => pb_1.Message.addToRepeatedWrapperField(message, 2, MsgDescriptor.deserialize(reader), MsgDescriptor)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxDescriptor { + return TxDescriptor.deserialize(bytes); + } + } + export class AuthnDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sign_modes?: SigningModeDescriptor[]; + }) { + 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 ("sign_modes" in data && data.sign_modes != undefined) { + this.sign_modes = data.sign_modes; + } + } + } + get sign_modes() { + return pb_1.Message.getRepeatedWrapperField(this, SigningModeDescriptor, 1) as SigningModeDescriptor[]; + } + set sign_modes(value: SigningModeDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + sign_modes?: ReturnType[]; + }): AuthnDescriptor { + const message = new AuthnDescriptor({}); + if (data.sign_modes != null) { + message.sign_modes = data.sign_modes.map(item => SigningModeDescriptor.fromObject(item)); + } + return message; + } + toObject() { + const data: { + sign_modes?: ReturnType[]; + } = {}; + if (this.sign_modes != null) { + data.sign_modes = this.sign_modes.map((item: SigningModeDescriptor) => item.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.sign_modes.length) + writer.writeRepeatedMessage(1, this.sign_modes, (item: SigningModeDescriptor) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuthnDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuthnDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.sign_modes, () => pb_1.Message.addToRepeatedWrapperField(message, 1, SigningModeDescriptor.deserialize(reader), SigningModeDescriptor)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AuthnDescriptor { + return AuthnDescriptor.deserialize(bytes); + } + } + export class SigningModeDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + number?: number; + authn_info_provider_method_fullname?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("number" in data && data.number != undefined) { + this.number = data.number; + } + if ("authn_info_provider_method_fullname" in data && data.authn_info_provider_method_fullname != undefined) { + this.authn_info_provider_method_fullname = data.authn_info_provider_method_fullname; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get number() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set number(value: number) { + pb_1.Message.setField(this, 2, value); + } + get authn_info_provider_method_fullname() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set authn_info_provider_method_fullname(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + name?: string; + number?: number; + authn_info_provider_method_fullname?: string; + }): SigningModeDescriptor { + const message = new SigningModeDescriptor({}); + if (data.name != null) { + message.name = data.name; + } + if (data.number != null) { + message.number = data.number; + } + if (data.authn_info_provider_method_fullname != null) { + message.authn_info_provider_method_fullname = data.authn_info_provider_method_fullname; + } + return message; + } + toObject() { + const data: { + name?: string; + number?: number; + authn_info_provider_method_fullname?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.number != null) { + data.number = this.number; + } + if (this.authn_info_provider_method_fullname != null) { + data.authn_info_provider_method_fullname = this.authn_info_provider_method_fullname; + } + 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.name.length) + writer.writeString(1, this.name); + if (this.number != 0) + writer.writeInt32(2, this.number); + if (this.authn_info_provider_method_fullname.length) + writer.writeString(3, this.authn_info_provider_method_fullname); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SigningModeDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SigningModeDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.number = reader.readInt32(); + break; + case 3: + message.authn_info_provider_method_fullname = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SigningModeDescriptor { + return SigningModeDescriptor.deserialize(bytes); + } + } + export class ChainDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + 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 ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + id?: string; + }): ChainDescriptor { + const message = new ChainDescriptor({}); + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + id?: string; + } = {}; + if (this.id != null) { + data.id = this.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.id.length) + writer.writeString(1, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ChainDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ChainDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ChainDescriptor { + return ChainDescriptor.deserialize(bytes); + } + } + export class CodecDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + interfaces?: InterfaceDescriptor[]; + }) { + 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 ("interfaces" in data && data.interfaces != undefined) { + this.interfaces = data.interfaces; + } + } + } + get interfaces() { + return pb_1.Message.getRepeatedWrapperField(this, InterfaceDescriptor, 1) as InterfaceDescriptor[]; + } + set interfaces(value: InterfaceDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + interfaces?: ReturnType[]; + }): CodecDescriptor { + const message = new CodecDescriptor({}); + if (data.interfaces != null) { + message.interfaces = data.interfaces.map(item => InterfaceDescriptor.fromObject(item)); + } + return message; + } + toObject() { + const data: { + interfaces?: ReturnType[]; + } = {}; + if (this.interfaces != null) { + data.interfaces = this.interfaces.map((item: InterfaceDescriptor) => item.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.interfaces.length) + writer.writeRepeatedMessage(1, this.interfaces, (item: InterfaceDescriptor) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CodecDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CodecDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.interfaces, () => pb_1.Message.addToRepeatedWrapperField(message, 1, InterfaceDescriptor.deserialize(reader), InterfaceDescriptor)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CodecDescriptor { + return CodecDescriptor.deserialize(bytes); + } + } + export class InterfaceDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fullname?: string; + interface_accepting_messages?: InterfaceAcceptingMessageDescriptor[]; + interface_implementers?: InterfaceImplementerDescriptor[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fullname" in data && data.fullname != undefined) { + this.fullname = data.fullname; + } + if ("interface_accepting_messages" in data && data.interface_accepting_messages != undefined) { + this.interface_accepting_messages = data.interface_accepting_messages; + } + if ("interface_implementers" in data && data.interface_implementers != undefined) { + this.interface_implementers = data.interface_implementers; + } + } + } + get fullname() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fullname(value: string) { + pb_1.Message.setField(this, 1, value); + } + get interface_accepting_messages() { + return pb_1.Message.getRepeatedWrapperField(this, InterfaceAcceptingMessageDescriptor, 2) as InterfaceAcceptingMessageDescriptor[]; + } + set interface_accepting_messages(value: InterfaceAcceptingMessageDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get interface_implementers() { + return pb_1.Message.getRepeatedWrapperField(this, InterfaceImplementerDescriptor, 3) as InterfaceImplementerDescriptor[]; + } + set interface_implementers(value: InterfaceImplementerDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + fullname?: string; + interface_accepting_messages?: ReturnType[]; + interface_implementers?: ReturnType[]; + }): InterfaceDescriptor { + const message = new InterfaceDescriptor({}); + if (data.fullname != null) { + message.fullname = data.fullname; + } + if (data.interface_accepting_messages != null) { + message.interface_accepting_messages = data.interface_accepting_messages.map(item => InterfaceAcceptingMessageDescriptor.fromObject(item)); + } + if (data.interface_implementers != null) { + message.interface_implementers = data.interface_implementers.map(item => InterfaceImplementerDescriptor.fromObject(item)); + } + return message; + } + toObject() { + const data: { + fullname?: string; + interface_accepting_messages?: ReturnType[]; + interface_implementers?: ReturnType[]; + } = {}; + if (this.fullname != null) { + data.fullname = this.fullname; + } + if (this.interface_accepting_messages != null) { + data.interface_accepting_messages = this.interface_accepting_messages.map((item: InterfaceAcceptingMessageDescriptor) => item.toObject()); + } + if (this.interface_implementers != null) { + data.interface_implementers = this.interface_implementers.map((item: InterfaceImplementerDescriptor) => item.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.fullname.length) + writer.writeString(1, this.fullname); + if (this.interface_accepting_messages.length) + writer.writeRepeatedMessage(2, this.interface_accepting_messages, (item: InterfaceAcceptingMessageDescriptor) => item.serialize(writer)); + if (this.interface_implementers.length) + writer.writeRepeatedMessage(3, this.interface_implementers, (item: InterfaceImplementerDescriptor) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InterfaceDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InterfaceDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fullname = reader.readString(); + break; + case 2: + reader.readMessage(message.interface_accepting_messages, () => pb_1.Message.addToRepeatedWrapperField(message, 2, InterfaceAcceptingMessageDescriptor.deserialize(reader), InterfaceAcceptingMessageDescriptor)); + break; + case 3: + reader.readMessage(message.interface_implementers, () => pb_1.Message.addToRepeatedWrapperField(message, 3, InterfaceImplementerDescriptor.deserialize(reader), InterfaceImplementerDescriptor)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InterfaceDescriptor { + return InterfaceDescriptor.deserialize(bytes); + } + } + export class InterfaceImplementerDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fullname?: string; + type_url?: 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 ("fullname" in data && data.fullname != undefined) { + this.fullname = data.fullname; + } + if ("type_url" in data && data.type_url != undefined) { + this.type_url = data.type_url; + } + } + } + get fullname() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fullname(value: string) { + pb_1.Message.setField(this, 1, value); + } + get type_url() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set type_url(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + fullname?: string; + type_url?: string; + }): InterfaceImplementerDescriptor { + const message = new InterfaceImplementerDescriptor({}); + if (data.fullname != null) { + message.fullname = data.fullname; + } + if (data.type_url != null) { + message.type_url = data.type_url; + } + return message; + } + toObject() { + const data: { + fullname?: string; + type_url?: string; + } = {}; + if (this.fullname != null) { + data.fullname = this.fullname; + } + if (this.type_url != null) { + data.type_url = this.type_url; + } + 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.fullname.length) + writer.writeString(1, this.fullname); + if (this.type_url.length) + writer.writeString(2, this.type_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InterfaceImplementerDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InterfaceImplementerDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fullname = reader.readString(); + break; + case 2: + message.type_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InterfaceImplementerDescriptor { + return InterfaceImplementerDescriptor.deserialize(bytes); + } + } + export class InterfaceAcceptingMessageDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fullname?: string; + field_descriptor_names?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fullname" in data && data.fullname != undefined) { + this.fullname = data.fullname; + } + if ("field_descriptor_names" in data && data.field_descriptor_names != undefined) { + this.field_descriptor_names = data.field_descriptor_names; + } + } + } + get fullname() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fullname(value: string) { + pb_1.Message.setField(this, 1, value); + } + get field_descriptor_names() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set field_descriptor_names(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + fullname?: string; + field_descriptor_names?: string[]; + }): InterfaceAcceptingMessageDescriptor { + const message = new InterfaceAcceptingMessageDescriptor({}); + if (data.fullname != null) { + message.fullname = data.fullname; + } + if (data.field_descriptor_names != null) { + message.field_descriptor_names = data.field_descriptor_names; + } + return message; + } + toObject() { + const data: { + fullname?: string; + field_descriptor_names?: string[]; + } = {}; + if (this.fullname != null) { + data.fullname = this.fullname; + } + if (this.field_descriptor_names != null) { + data.field_descriptor_names = this.field_descriptor_names; + } + 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.fullname.length) + writer.writeString(1, this.fullname); + if (this.field_descriptor_names.length) + writer.writeRepeatedString(2, this.field_descriptor_names); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InterfaceAcceptingMessageDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InterfaceAcceptingMessageDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fullname = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InterfaceAcceptingMessageDescriptor { + return InterfaceAcceptingMessageDescriptor.deserialize(bytes); + } + } + export class ConfigurationDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + bech32_account_address_prefix?: 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 ("bech32_account_address_prefix" in data && data.bech32_account_address_prefix != undefined) { + this.bech32_account_address_prefix = data.bech32_account_address_prefix; + } + } + } + get bech32_account_address_prefix() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set bech32_account_address_prefix(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + bech32_account_address_prefix?: string; + }): ConfigurationDescriptor { + const message = new ConfigurationDescriptor({}); + if (data.bech32_account_address_prefix != null) { + message.bech32_account_address_prefix = data.bech32_account_address_prefix; + } + return message; + } + toObject() { + const data: { + bech32_account_address_prefix?: string; + } = {}; + if (this.bech32_account_address_prefix != null) { + data.bech32_account_address_prefix = this.bech32_account_address_prefix; + } + 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.bech32_account_address_prefix.length) + writer.writeString(1, this.bech32_account_address_prefix); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConfigurationDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConfigurationDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.bech32_account_address_prefix = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConfigurationDescriptor { + return ConfigurationDescriptor.deserialize(bytes); + } + } + export class MsgDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + msg_type_url?: 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 ("msg_type_url" in data && data.msg_type_url != undefined) { + this.msg_type_url = data.msg_type_url; + } + } + } + get msg_type_url() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set msg_type_url(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + msg_type_url?: string; + }): MsgDescriptor { + const message = new MsgDescriptor({}); + if (data.msg_type_url != null) { + message.msg_type_url = data.msg_type_url; + } + return message; + } + toObject() { + const data: { + msg_type_url?: string; + } = {}; + if (this.msg_type_url != null) { + data.msg_type_url = this.msg_type_url; + } + 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.msg_type_url.length) + writer.writeString(1, this.msg_type_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.msg_type_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDescriptor { + return MsgDescriptor.deserialize(bytes); + } + } + export class GetAuthnDescriptorRequest 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: {}): GetAuthnDescriptorRequest { + const message = new GetAuthnDescriptorRequest({}); + 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): GetAuthnDescriptorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAuthnDescriptorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAuthnDescriptorRequest { + return GetAuthnDescriptorRequest.deserialize(bytes); + } + } + export class GetAuthnDescriptorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authn?: AuthnDescriptor; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authn" in data && data.authn != undefined) { + this.authn = data.authn; + } + } + } + get authn() { + return pb_1.Message.getWrapperField(this, AuthnDescriptor, 1) as AuthnDescriptor; + } + set authn(value: AuthnDescriptor) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_authn() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + authn?: ReturnType; + }): GetAuthnDescriptorResponse { + const message = new GetAuthnDescriptorResponse({}); + if (data.authn != null) { + message.authn = AuthnDescriptor.fromObject(data.authn); + } + return message; + } + toObject() { + const data: { + authn?: ReturnType; + } = {}; + if (this.authn != null) { + data.authn = this.authn.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_authn) + writer.writeMessage(1, this.authn, () => this.authn.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAuthnDescriptorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAuthnDescriptorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.authn, () => message.authn = AuthnDescriptor.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAuthnDescriptorResponse { + return GetAuthnDescriptorResponse.deserialize(bytes); + } + } + export class GetChainDescriptorRequest 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: {}): GetChainDescriptorRequest { + const message = new GetChainDescriptorRequest({}); + 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): GetChainDescriptorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetChainDescriptorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetChainDescriptorRequest { + return GetChainDescriptorRequest.deserialize(bytes); + } + } + export class GetChainDescriptorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + chain?: ChainDescriptor; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("chain" in data && data.chain != undefined) { + this.chain = data.chain; + } + } + } + get chain() { + return pb_1.Message.getWrapperField(this, ChainDescriptor, 1) as ChainDescriptor; + } + set chain(value: ChainDescriptor) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_chain() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + chain?: ReturnType; + }): GetChainDescriptorResponse { + const message = new GetChainDescriptorResponse({}); + if (data.chain != null) { + message.chain = ChainDescriptor.fromObject(data.chain); + } + return message; + } + toObject() { + const data: { + chain?: ReturnType; + } = {}; + if (this.chain != null) { + data.chain = this.chain.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_chain) + writer.writeMessage(1, this.chain, () => this.chain.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetChainDescriptorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetChainDescriptorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.chain, () => message.chain = ChainDescriptor.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetChainDescriptorResponse { + return GetChainDescriptorResponse.deserialize(bytes); + } + } + export class GetCodecDescriptorRequest 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: {}): GetCodecDescriptorRequest { + const message = new GetCodecDescriptorRequest({}); + 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): GetCodecDescriptorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetCodecDescriptorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetCodecDescriptorRequest { + return GetCodecDescriptorRequest.deserialize(bytes); + } + } + export class GetCodecDescriptorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + codec?: CodecDescriptor; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("codec" in data && data.codec != undefined) { + this.codec = data.codec; + } + } + } + get codec() { + return pb_1.Message.getWrapperField(this, CodecDescriptor, 1) as CodecDescriptor; + } + set codec(value: CodecDescriptor) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_codec() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + codec?: ReturnType; + }): GetCodecDescriptorResponse { + const message = new GetCodecDescriptorResponse({}); + if (data.codec != null) { + message.codec = CodecDescriptor.fromObject(data.codec); + } + return message; + } + toObject() { + const data: { + codec?: ReturnType; + } = {}; + if (this.codec != null) { + data.codec = this.codec.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_codec) + writer.writeMessage(1, this.codec, () => this.codec.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetCodecDescriptorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetCodecDescriptorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.codec, () => message.codec = CodecDescriptor.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetCodecDescriptorResponse { + return GetCodecDescriptorResponse.deserialize(bytes); + } + } + export class GetConfigurationDescriptorRequest 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: {}): GetConfigurationDescriptorRequest { + const message = new GetConfigurationDescriptorRequest({}); + 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): GetConfigurationDescriptorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetConfigurationDescriptorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetConfigurationDescriptorRequest { + return GetConfigurationDescriptorRequest.deserialize(bytes); + } + } + export class GetConfigurationDescriptorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + config?: ConfigurationDescriptor; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("config" in data && data.config != undefined) { + this.config = data.config; + } + } + } + get config() { + return pb_1.Message.getWrapperField(this, ConfigurationDescriptor, 1) as ConfigurationDescriptor; + } + set config(value: ConfigurationDescriptor) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_config() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + config?: ReturnType; + }): GetConfigurationDescriptorResponse { + const message = new GetConfigurationDescriptorResponse({}); + if (data.config != null) { + message.config = ConfigurationDescriptor.fromObject(data.config); + } + return message; + } + toObject() { + const data: { + config?: ReturnType; + } = {}; + if (this.config != null) { + data.config = this.config.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_config) + writer.writeMessage(1, this.config, () => this.config.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetConfigurationDescriptorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetConfigurationDescriptorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.config, () => message.config = ConfigurationDescriptor.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetConfigurationDescriptorResponse { + return GetConfigurationDescriptorResponse.deserialize(bytes); + } + } + export class GetQueryServicesDescriptorRequest 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: {}): GetQueryServicesDescriptorRequest { + const message = new GetQueryServicesDescriptorRequest({}); + 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): GetQueryServicesDescriptorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetQueryServicesDescriptorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetQueryServicesDescriptorRequest { + return GetQueryServicesDescriptorRequest.deserialize(bytes); + } + } + export class GetQueryServicesDescriptorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + queries?: QueryServicesDescriptor; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("queries" in data && data.queries != undefined) { + this.queries = data.queries; + } + } + } + get queries() { + return pb_1.Message.getWrapperField(this, QueryServicesDescriptor, 1) as QueryServicesDescriptor; + } + set queries(value: QueryServicesDescriptor) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_queries() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + queries?: ReturnType; + }): GetQueryServicesDescriptorResponse { + const message = new GetQueryServicesDescriptorResponse({}); + if (data.queries != null) { + message.queries = QueryServicesDescriptor.fromObject(data.queries); + } + return message; + } + toObject() { + const data: { + queries?: ReturnType; + } = {}; + if (this.queries != null) { + data.queries = this.queries.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_queries) + writer.writeMessage(1, this.queries, () => this.queries.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetQueryServicesDescriptorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetQueryServicesDescriptorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.queries, () => message.queries = QueryServicesDescriptor.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetQueryServicesDescriptorResponse { + return GetQueryServicesDescriptorResponse.deserialize(bytes); + } + } + export class GetTxDescriptorRequest 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: {}): GetTxDescriptorRequest { + const message = new GetTxDescriptorRequest({}); + 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): GetTxDescriptorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTxDescriptorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetTxDescriptorRequest { + return GetTxDescriptorRequest.deserialize(bytes); + } + } + export class GetTxDescriptorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx?: TxDescriptor; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + } + } + get tx() { + return pb_1.Message.getWrapperField(this, TxDescriptor, 1) as TxDescriptor; + } + set tx(value: TxDescriptor) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tx() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + tx?: ReturnType; + }): GetTxDescriptorResponse { + const message = new GetTxDescriptorResponse({}); + if (data.tx != null) { + message.tx = TxDescriptor.fromObject(data.tx); + } + return message; + } + toObject() { + const data: { + tx?: ReturnType; + } = {}; + if (this.tx != null) { + data.tx = this.tx.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_tx) + writer.writeMessage(1, this.tx, () => this.tx.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTxDescriptorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTxDescriptorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tx, () => message.tx = TxDescriptor.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetTxDescriptorResponse { + return GetTxDescriptorResponse.deserialize(bytes); + } + } + export class QueryServicesDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + query_services?: QueryServiceDescriptor[]; + }) { + 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 ("query_services" in data && data.query_services != undefined) { + this.query_services = data.query_services; + } + } + } + get query_services() { + return pb_1.Message.getRepeatedWrapperField(this, QueryServiceDescriptor, 1) as QueryServiceDescriptor[]; + } + set query_services(value: QueryServiceDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + query_services?: ReturnType[]; + }): QueryServicesDescriptor { + const message = new QueryServicesDescriptor({}); + if (data.query_services != null) { + message.query_services = data.query_services.map(item => QueryServiceDescriptor.fromObject(item)); + } + return message; + } + toObject() { + const data: { + query_services?: ReturnType[]; + } = {}; + if (this.query_services != null) { + data.query_services = this.query_services.map((item: QueryServiceDescriptor) => item.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.query_services.length) + writer.writeRepeatedMessage(1, this.query_services, (item: QueryServiceDescriptor) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryServicesDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryServicesDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.query_services, () => pb_1.Message.addToRepeatedWrapperField(message, 1, QueryServiceDescriptor.deserialize(reader), QueryServiceDescriptor)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryServicesDescriptor { + return QueryServicesDescriptor.deserialize(bytes); + } + } + export class QueryServiceDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fullname?: string; + is_module?: boolean; + methods?: QueryMethodDescriptor[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fullname" in data && data.fullname != undefined) { + this.fullname = data.fullname; + } + if ("is_module" in data && data.is_module != undefined) { + this.is_module = data.is_module; + } + if ("methods" in data && data.methods != undefined) { + this.methods = data.methods; + } + } + } + get fullname() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fullname(value: string) { + pb_1.Message.setField(this, 1, value); + } + get is_module() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set is_module(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get methods() { + return pb_1.Message.getRepeatedWrapperField(this, QueryMethodDescriptor, 3) as QueryMethodDescriptor[]; + } + set methods(value: QueryMethodDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + fullname?: string; + is_module?: boolean; + methods?: ReturnType[]; + }): QueryServiceDescriptor { + const message = new QueryServiceDescriptor({}); + if (data.fullname != null) { + message.fullname = data.fullname; + } + if (data.is_module != null) { + message.is_module = data.is_module; + } + if (data.methods != null) { + message.methods = data.methods.map(item => QueryMethodDescriptor.fromObject(item)); + } + return message; + } + toObject() { + const data: { + fullname?: string; + is_module?: boolean; + methods?: ReturnType[]; + } = {}; + if (this.fullname != null) { + data.fullname = this.fullname; + } + if (this.is_module != null) { + data.is_module = this.is_module; + } + if (this.methods != null) { + data.methods = this.methods.map((item: QueryMethodDescriptor) => item.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.fullname.length) + writer.writeString(1, this.fullname); + if (this.is_module != false) + writer.writeBool(2, this.is_module); + if (this.methods.length) + writer.writeRepeatedMessage(3, this.methods, (item: QueryMethodDescriptor) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryServiceDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryServiceDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fullname = reader.readString(); + break; + case 2: + message.is_module = reader.readBool(); + break; + case 3: + reader.readMessage(message.methods, () => pb_1.Message.addToRepeatedWrapperField(message, 3, QueryMethodDescriptor.deserialize(reader), QueryMethodDescriptor)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryServiceDescriptor { + return QueryServiceDescriptor.deserialize(bytes); + } + } + export class QueryMethodDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + full_query_path?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("full_query_path" in data && data.full_query_path != undefined) { + this.full_query_path = data.full_query_path; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get full_query_path() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set full_query_path(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + name?: string; + full_query_path?: string; + }): QueryMethodDescriptor { + const message = new QueryMethodDescriptor({}); + if (data.name != null) { + message.name = data.name; + } + if (data.full_query_path != null) { + message.full_query_path = data.full_query_path; + } + return message; + } + toObject() { + const data: { + name?: string; + full_query_path?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.full_query_path != null) { + data.full_query_path = this.full_query_path; + } + 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.name.length) + writer.writeString(1, this.name); + if (this.full_query_path.length) + writer.writeString(2, this.full_query_path); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryMethodDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryMethodDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.full_query_path = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryMethodDescriptor { + return QueryMethodDescriptor.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedReflectionServiceService { + static definition = { + GetAuthnDescriptor: { + path: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAuthnDescriptorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAuthnDescriptorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAuthnDescriptorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAuthnDescriptorResponse.deserialize(new Uint8Array(bytes)) + }, + GetChainDescriptor: { + path: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetChainDescriptorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetChainDescriptorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetChainDescriptorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetChainDescriptorResponse.deserialize(new Uint8Array(bytes)) + }, + GetCodecDescriptor: { + path: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetCodecDescriptorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetCodecDescriptorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetCodecDescriptorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetCodecDescriptorResponse.deserialize(new Uint8Array(bytes)) + }, + GetConfigurationDescriptor: { + path: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetConfigurationDescriptorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetConfigurationDescriptorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetConfigurationDescriptorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetConfigurationDescriptorResponse.deserialize(new Uint8Array(bytes)) + }, + GetQueryServicesDescriptor: { + path: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetQueryServicesDescriptorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetQueryServicesDescriptorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetQueryServicesDescriptorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetQueryServicesDescriptorResponse.deserialize(new Uint8Array(bytes)) + }, + GetTxDescriptor: { + path: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetTxDescriptorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetTxDescriptorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetTxDescriptorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetTxDescriptorResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GetAuthnDescriptor(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetChainDescriptor(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetCodecDescriptor(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetConfigurationDescriptor(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetQueryServicesDescriptor(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetTxDescriptor(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ReflectionServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedReflectionServiceService.definition, "ReflectionService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GetAuthnDescriptor: GrpcUnaryServiceInterface = (message: GetAuthnDescriptorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAuthnDescriptor(message, metadata, options, callback); + }; + GetChainDescriptor: GrpcUnaryServiceInterface = (message: GetChainDescriptorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetChainDescriptor(message, metadata, options, callback); + }; + GetCodecDescriptor: GrpcUnaryServiceInterface = (message: GetCodecDescriptorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetCodecDescriptor(message, metadata, options, callback); + }; + GetConfigurationDescriptor: GrpcUnaryServiceInterface = (message: GetConfigurationDescriptorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetConfigurationDescriptor(message, metadata, options, callback); + }; + GetQueryServicesDescriptor: GrpcUnaryServiceInterface = (message: GetQueryServicesDescriptorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetQueryServicesDescriptor(message, metadata, options, callback); + }; + GetTxDescriptor: GrpcUnaryServiceInterface = (message: GetTxDescriptorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetTxDescriptor(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/base/reflection/v2alpha1/reflection_pb.d.ts b/codegen/cosmos/base/reflection/v2alpha1/reflection_pb.d.ts similarity index 100% rename from proto/cosmos/base/reflection/v2alpha1/reflection_pb.d.ts rename to codegen/cosmos/base/reflection/v2alpha1/reflection_pb.d.ts diff --git a/proto/cosmos/base/reflection/v2alpha1/reflection_pb.js b/codegen/cosmos/base/reflection/v2alpha1/reflection_pb.js similarity index 100% rename from proto/cosmos/base/reflection/v2alpha1/reflection_pb.js rename to codegen/cosmos/base/reflection/v2alpha1/reflection_pb.js diff --git a/proto/cosmos/base/reflection/v2alpha1/reflection_pb_service.d.ts b/codegen/cosmos/base/reflection/v2alpha1/reflection_pb_service.d.ts similarity index 100% rename from proto/cosmos/base/reflection/v2alpha1/reflection_pb_service.d.ts rename to codegen/cosmos/base/reflection/v2alpha1/reflection_pb_service.d.ts diff --git a/proto/cosmos/base/reflection/v2alpha1/reflection_pb_service.js b/codegen/cosmos/base/reflection/v2alpha1/reflection_pb_service.js similarity index 100% rename from proto/cosmos/base/reflection/v2alpha1/reflection_pb_service.js rename to codegen/cosmos/base/reflection/v2alpha1/reflection_pb_service.js diff --git a/codegen/cosmos/base/tendermint/v1beta1/query.ts b/codegen/cosmos/base/tendermint/v1beta1/query.ts new file mode 100644 index 0000000..6c7aa7a --- /dev/null +++ b/codegen/cosmos/base/tendermint/v1beta1/query.ts @@ -0,0 +1,2183 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/base/tendermint/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../google/protobuf/any"; +import * as dependency_3 from "./../../../../google/api/annotations"; +import * as dependency_4 from "./../../../../tendermint/p2p/types"; +import * as dependency_5 from "./../../../../tendermint/types/types"; +import * as dependency_6 from "./../../query/v1beta1/pagination"; +import * as dependency_7 from "./types"; +import * as dependency_8 from "./../../../../cosmos_proto/cosmos"; +import * as dependency_9 from "./../../../../tendermint/types/block"; +import * as dependency_10 from "./../../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.base.tendermint.v1beta1 { + export class GetValidatorSetByHeightRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + pagination?: dependency_6.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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_6.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_6.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_6.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + height?: number; + pagination?: ReturnType; + }): GetValidatorSetByHeightRequest { + const message = new GetValidatorSetByHeightRequest({}); + if (data.height != null) { + message.height = data.height; + } + if (data.pagination != null) { + message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + height?: number; + pagination?: ReturnType; + } = {}; + if (this.height != null) { + data.height = this.height; + } + 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.height != 0) + writer.writeInt64(1, this.height); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetValidatorSetByHeightRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetValidatorSetByHeightRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetValidatorSetByHeightRequest { + return GetValidatorSetByHeightRequest.deserialize(bytes); + } + } + export class GetValidatorSetByHeightResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_height?: number; + validators?: Validator[]; + pagination?: dependency_6.cosmos.base.query.v1beta1.PageResponse; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_height" in data && data.block_height != undefined) { + this.block_height = data.block_height; + } + if ("validators" in data && data.validators != undefined) { + this.validators = data.validators; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get block_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set block_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get validators() { + return pb_1.Message.getRepeatedWrapperField(this, Validator, 2) as Validator[]; + } + set validators(value: Validator[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_6.cosmos.base.query.v1beta1.PageResponse, 3) as dependency_6.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_6.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + block_height?: number; + validators?: ReturnType[]; + pagination?: ReturnType; + }): GetValidatorSetByHeightResponse { + const message = new GetValidatorSetByHeightResponse({}); + if (data.block_height != null) { + message.block_height = data.block_height; + } + if (data.validators != null) { + message.validators = data.validators.map(item => Validator.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + block_height?: number; + validators?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.block_height != null) { + data.block_height = this.block_height; + } + if (this.validators != null) { + data.validators = this.validators.map((item: Validator) => item.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.block_height != 0) + writer.writeInt64(1, this.block_height); + if (this.validators.length) + writer.writeRepeatedMessage(2, this.validators, (item: Validator) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetValidatorSetByHeightResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetValidatorSetByHeightResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Validator.deserialize(reader), Validator)); + break; + case 3: + reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetValidatorSetByHeightResponse { + return GetValidatorSetByHeightResponse.deserialize(bytes); + } + } + export class GetLatestValidatorSetRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_6.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_6.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_6.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_6.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; + }): GetLatestValidatorSetRequest { + const message = new GetLatestValidatorSetRequest({}); + if (data.pagination != null) { + message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): GetLatestValidatorSetRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestValidatorSetRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetLatestValidatorSetRequest { + return GetLatestValidatorSetRequest.deserialize(bytes); + } + } + export class GetLatestValidatorSetResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_height?: number; + validators?: Validator[]; + pagination?: dependency_6.cosmos.base.query.v1beta1.PageResponse; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_height" in data && data.block_height != undefined) { + this.block_height = data.block_height; + } + if ("validators" in data && data.validators != undefined) { + this.validators = data.validators; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get block_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set block_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get validators() { + return pb_1.Message.getRepeatedWrapperField(this, Validator, 2) as Validator[]; + } + set validators(value: Validator[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_6.cosmos.base.query.v1beta1.PageResponse, 3) as dependency_6.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_6.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + block_height?: number; + validators?: ReturnType[]; + pagination?: ReturnType; + }): GetLatestValidatorSetResponse { + const message = new GetLatestValidatorSetResponse({}); + if (data.block_height != null) { + message.block_height = data.block_height; + } + if (data.validators != null) { + message.validators = data.validators.map(item => Validator.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + block_height?: number; + validators?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.block_height != null) { + data.block_height = this.block_height; + } + if (this.validators != null) { + data.validators = this.validators.map((item: Validator) => item.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.block_height != 0) + writer.writeInt64(1, this.block_height); + if (this.validators.length) + writer.writeRepeatedMessage(2, this.validators, (item: Validator) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestValidatorSetResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestValidatorSetResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Validator.deserialize(reader), Validator)); + break; + case 3: + reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetLatestValidatorSetResponse { + return GetLatestValidatorSetResponse.deserialize(bytes); + } + } + export class Validator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + pub_key?: dependency_2.google.protobuf.Any; + voting_power?: number; + proposer_priority?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("voting_power" in data && data.voting_power != undefined) { + this.voting_power = data.voting_power; + } + if ("proposer_priority" in data && data.proposer_priority != undefined) { + this.proposer_priority = data.proposer_priority; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pub_key() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 2) as dependency_2.google.protobuf.Any; + } + set pub_key(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pub_key() { + return pb_1.Message.getField(this, 2) != null; + } + get voting_power() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set voting_power(value: number) { + pb_1.Message.setField(this, 3, value); + } + get proposer_priority() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set proposer_priority(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + address?: string; + pub_key?: ReturnType; + voting_power?: number; + proposer_priority?: number; + }): Validator { + const message = new Validator({}); + if (data.address != null) { + message.address = data.address; + } + if (data.pub_key != null) { + message.pub_key = dependency_2.google.protobuf.Any.fromObject(data.pub_key); + } + if (data.voting_power != null) { + message.voting_power = data.voting_power; + } + if (data.proposer_priority != null) { + message.proposer_priority = data.proposer_priority; + } + return message; + } + toObject() { + const data: { + address?: string; + pub_key?: ReturnType; + voting_power?: number; + proposer_priority?: number; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.pub_key != null) { + data.pub_key = this.pub_key.toObject(); + } + if (this.voting_power != null) { + data.voting_power = this.voting_power; + } + if (this.proposer_priority != null) { + data.proposer_priority = this.proposer_priority; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.has_pub_key) + writer.writeMessage(2, this.pub_key, () => this.pub_key.serialize(writer)); + if (this.voting_power != 0) + writer.writeInt64(3, this.voting_power); + if (this.proposer_priority != 0) + writer.writeInt64(4, this.proposer_priority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Validator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Validator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.pub_key, () => message.pub_key = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + case 3: + message.voting_power = reader.readInt64(); + break; + case 4: + message.proposer_priority = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Validator { + return Validator.deserialize(bytes); + } + } + export class GetBlockByHeightRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + 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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + height?: number; + }): GetBlockByHeightRequest { + const message = new GetBlockByHeightRequest({}); + if (data.height != null) { + message.height = data.height; + } + return message; + } + toObject() { + const data: { + height?: number; + } = {}; + if (this.height != null) { + data.height = this.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.height != 0) + writer.writeInt64(1, this.height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockByHeightRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBlockByHeightRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetBlockByHeightRequest { + return GetBlockByHeightRequest.deserialize(bytes); + } + } + export class GetBlockByHeightResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_id?: dependency_5.tendermint.types.BlockID; + block?: dependency_9.tendermint.types.Block; + sdk_block?: dependency_7.cosmos.base.tendermint.v1beta1.Block; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_id" in data && data.block_id != undefined) { + this.block_id = data.block_id; + } + if ("block" in data && data.block != undefined) { + this.block = data.block; + } + if ("sdk_block" in data && data.sdk_block != undefined) { + this.sdk_block = data.sdk_block; + } + } + } + get block_id() { + return pb_1.Message.getWrapperField(this, dependency_5.tendermint.types.BlockID, 1) as dependency_5.tendermint.types.BlockID; + } + set block_id(value: dependency_5.tendermint.types.BlockID) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_block_id() { + return pb_1.Message.getField(this, 1) != null; + } + get block() { + return pb_1.Message.getWrapperField(this, dependency_9.tendermint.types.Block, 2) as dependency_9.tendermint.types.Block; + } + set block(value: dependency_9.tendermint.types.Block) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_block() { + return pb_1.Message.getField(this, 2) != null; + } + get sdk_block() { + return pb_1.Message.getWrapperField(this, dependency_7.cosmos.base.tendermint.v1beta1.Block, 3) as dependency_7.cosmos.base.tendermint.v1beta1.Block; + } + set sdk_block(value: dependency_7.cosmos.base.tendermint.v1beta1.Block) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_sdk_block() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + block_id?: ReturnType; + block?: ReturnType; + sdk_block?: ReturnType; + }): GetBlockByHeightResponse { + const message = new GetBlockByHeightResponse({}); + if (data.block_id != null) { + message.block_id = dependency_5.tendermint.types.BlockID.fromObject(data.block_id); + } + if (data.block != null) { + message.block = dependency_9.tendermint.types.Block.fromObject(data.block); + } + if (data.sdk_block != null) { + message.sdk_block = dependency_7.cosmos.base.tendermint.v1beta1.Block.fromObject(data.sdk_block); + } + return message; + } + toObject() { + const data: { + block_id?: ReturnType; + block?: ReturnType; + sdk_block?: ReturnType; + } = {}; + if (this.block_id != null) { + data.block_id = this.block_id.toObject(); + } + if (this.block != null) { + data.block = this.block.toObject(); + } + if (this.sdk_block != null) { + data.sdk_block = this.sdk_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_block_id) + writer.writeMessage(1, this.block_id, () => this.block_id.serialize(writer)); + if (this.has_block) + writer.writeMessage(2, this.block, () => this.block.serialize(writer)); + if (this.has_sdk_block) + writer.writeMessage(3, this.sdk_block, () => this.sdk_block.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockByHeightResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBlockByHeightResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.block_id, () => message.block_id = dependency_5.tendermint.types.BlockID.deserialize(reader)); + break; + case 2: + reader.readMessage(message.block, () => message.block = dependency_9.tendermint.types.Block.deserialize(reader)); + break; + case 3: + reader.readMessage(message.sdk_block, () => message.sdk_block = dependency_7.cosmos.base.tendermint.v1beta1.Block.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetBlockByHeightResponse { + return GetBlockByHeightResponse.deserialize(bytes); + } + } + export class GetLatestBlockRequest 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: {}): GetLatestBlockRequest { + const message = new GetLatestBlockRequest({}); + 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): GetLatestBlockRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestBlockRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetLatestBlockRequest { + return GetLatestBlockRequest.deserialize(bytes); + } + } + export class GetLatestBlockResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_id?: dependency_5.tendermint.types.BlockID; + block?: dependency_9.tendermint.types.Block; + sdk_block?: dependency_7.cosmos.base.tendermint.v1beta1.Block; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_id" in data && data.block_id != undefined) { + this.block_id = data.block_id; + } + if ("block" in data && data.block != undefined) { + this.block = data.block; + } + if ("sdk_block" in data && data.sdk_block != undefined) { + this.sdk_block = data.sdk_block; + } + } + } + get block_id() { + return pb_1.Message.getWrapperField(this, dependency_5.tendermint.types.BlockID, 1) as dependency_5.tendermint.types.BlockID; + } + set block_id(value: dependency_5.tendermint.types.BlockID) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_block_id() { + return pb_1.Message.getField(this, 1) != null; + } + get block() { + return pb_1.Message.getWrapperField(this, dependency_9.tendermint.types.Block, 2) as dependency_9.tendermint.types.Block; + } + set block(value: dependency_9.tendermint.types.Block) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_block() { + return pb_1.Message.getField(this, 2) != null; + } + get sdk_block() { + return pb_1.Message.getWrapperField(this, dependency_7.cosmos.base.tendermint.v1beta1.Block, 3) as dependency_7.cosmos.base.tendermint.v1beta1.Block; + } + set sdk_block(value: dependency_7.cosmos.base.tendermint.v1beta1.Block) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_sdk_block() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + block_id?: ReturnType; + block?: ReturnType; + sdk_block?: ReturnType; + }): GetLatestBlockResponse { + const message = new GetLatestBlockResponse({}); + if (data.block_id != null) { + message.block_id = dependency_5.tendermint.types.BlockID.fromObject(data.block_id); + } + if (data.block != null) { + message.block = dependency_9.tendermint.types.Block.fromObject(data.block); + } + if (data.sdk_block != null) { + message.sdk_block = dependency_7.cosmos.base.tendermint.v1beta1.Block.fromObject(data.sdk_block); + } + return message; + } + toObject() { + const data: { + block_id?: ReturnType; + block?: ReturnType; + sdk_block?: ReturnType; + } = {}; + if (this.block_id != null) { + data.block_id = this.block_id.toObject(); + } + if (this.block != null) { + data.block = this.block.toObject(); + } + if (this.sdk_block != null) { + data.sdk_block = this.sdk_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_block_id) + writer.writeMessage(1, this.block_id, () => this.block_id.serialize(writer)); + if (this.has_block) + writer.writeMessage(2, this.block, () => this.block.serialize(writer)); + if (this.has_sdk_block) + writer.writeMessage(3, this.sdk_block, () => this.sdk_block.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestBlockResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestBlockResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.block_id, () => message.block_id = dependency_5.tendermint.types.BlockID.deserialize(reader)); + break; + case 2: + reader.readMessage(message.block, () => message.block = dependency_9.tendermint.types.Block.deserialize(reader)); + break; + case 3: + reader.readMessage(message.sdk_block, () => message.sdk_block = dependency_7.cosmos.base.tendermint.v1beta1.Block.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetLatestBlockResponse { + return GetLatestBlockResponse.deserialize(bytes); + } + } + export class GetSyncingRequest 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: {}): GetSyncingRequest { + const message = new GetSyncingRequest({}); + 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): GetSyncingRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetSyncingRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetSyncingRequest { + return GetSyncingRequest.deserialize(bytes); + } + } + export class GetSyncingResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + syncing?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("syncing" in data && data.syncing != undefined) { + this.syncing = data.syncing; + } + } + } + get syncing() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set syncing(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + syncing?: boolean; + }): GetSyncingResponse { + const message = new GetSyncingResponse({}); + if (data.syncing != null) { + message.syncing = data.syncing; + } + return message; + } + toObject() { + const data: { + syncing?: boolean; + } = {}; + if (this.syncing != null) { + data.syncing = this.syncing; + } + 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.syncing != false) + writer.writeBool(1, this.syncing); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetSyncingResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetSyncingResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.syncing = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetSyncingResponse { + return GetSyncingResponse.deserialize(bytes); + } + } + export class GetNodeInfoRequest 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: {}): GetNodeInfoRequest { + const message = new GetNodeInfoRequest({}); + 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): GetNodeInfoRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetNodeInfoRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetNodeInfoRequest { + return GetNodeInfoRequest.deserialize(bytes); + } + } + export class GetNodeInfoResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + default_node_info?: dependency_4.tendermint.p2p.DefaultNodeInfo; + application_version?: VersionInfo; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("default_node_info" in data && data.default_node_info != undefined) { + this.default_node_info = data.default_node_info; + } + if ("application_version" in data && data.application_version != undefined) { + this.application_version = data.application_version; + } + } + } + get default_node_info() { + return pb_1.Message.getWrapperField(this, dependency_4.tendermint.p2p.DefaultNodeInfo, 1) as dependency_4.tendermint.p2p.DefaultNodeInfo; + } + set default_node_info(value: dependency_4.tendermint.p2p.DefaultNodeInfo) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_default_node_info() { + return pb_1.Message.getField(this, 1) != null; + } + get application_version() { + return pb_1.Message.getWrapperField(this, VersionInfo, 2) as VersionInfo; + } + set application_version(value: VersionInfo) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_application_version() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + default_node_info?: ReturnType; + application_version?: ReturnType; + }): GetNodeInfoResponse { + const message = new GetNodeInfoResponse({}); + if (data.default_node_info != null) { + message.default_node_info = dependency_4.tendermint.p2p.DefaultNodeInfo.fromObject(data.default_node_info); + } + if (data.application_version != null) { + message.application_version = VersionInfo.fromObject(data.application_version); + } + return message; + } + toObject() { + const data: { + default_node_info?: ReturnType; + application_version?: ReturnType; + } = {}; + if (this.default_node_info != null) { + data.default_node_info = this.default_node_info.toObject(); + } + if (this.application_version != null) { + data.application_version = this.application_version.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_default_node_info) + writer.writeMessage(1, this.default_node_info, () => this.default_node_info.serialize(writer)); + if (this.has_application_version) + writer.writeMessage(2, this.application_version, () => this.application_version.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetNodeInfoResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetNodeInfoResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.default_node_info, () => message.default_node_info = dependency_4.tendermint.p2p.DefaultNodeInfo.deserialize(reader)); + break; + case 2: + reader.readMessage(message.application_version, () => message.application_version = VersionInfo.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetNodeInfoResponse { + return GetNodeInfoResponse.deserialize(bytes); + } + } + export class VersionInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + app_name?: string; + version?: string; + git_commit?: string; + build_tags?: string; + go_version?: string; + build_deps?: Module[]; + cosmos_sdk_version?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("app_name" in data && data.app_name != undefined) { + this.app_name = data.app_name; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("git_commit" in data && data.git_commit != undefined) { + this.git_commit = data.git_commit; + } + if ("build_tags" in data && data.build_tags != undefined) { + this.build_tags = data.build_tags; + } + if ("go_version" in data && data.go_version != undefined) { + this.go_version = data.go_version; + } + if ("build_deps" in data && data.build_deps != undefined) { + this.build_deps = data.build_deps; + } + if ("cosmos_sdk_version" in data && data.cosmos_sdk_version != undefined) { + this.cosmos_sdk_version = data.cosmos_sdk_version; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get app_name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set app_name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 3, value); + } + get git_commit() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set git_commit(value: string) { + pb_1.Message.setField(this, 4, value); + } + get build_tags() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set build_tags(value: string) { + pb_1.Message.setField(this, 5, value); + } + get go_version() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set go_version(value: string) { + pb_1.Message.setField(this, 6, value); + } + get build_deps() { + return pb_1.Message.getRepeatedWrapperField(this, Module, 7) as Module[]; + } + set build_deps(value: Module[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get cosmos_sdk_version() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set cosmos_sdk_version(value: string) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + name?: string; + app_name?: string; + version?: string; + git_commit?: string; + build_tags?: string; + go_version?: string; + build_deps?: ReturnType[]; + cosmos_sdk_version?: string; + }): VersionInfo { + const message = new VersionInfo({}); + if (data.name != null) { + message.name = data.name; + } + if (data.app_name != null) { + message.app_name = data.app_name; + } + if (data.version != null) { + message.version = data.version; + } + if (data.git_commit != null) { + message.git_commit = data.git_commit; + } + if (data.build_tags != null) { + message.build_tags = data.build_tags; + } + if (data.go_version != null) { + message.go_version = data.go_version; + } + if (data.build_deps != null) { + message.build_deps = data.build_deps.map(item => Module.fromObject(item)); + } + if (data.cosmos_sdk_version != null) { + message.cosmos_sdk_version = data.cosmos_sdk_version; + } + return message; + } + toObject() { + const data: { + name?: string; + app_name?: string; + version?: string; + git_commit?: string; + build_tags?: string; + go_version?: string; + build_deps?: ReturnType[]; + cosmos_sdk_version?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.app_name != null) { + data.app_name = this.app_name; + } + if (this.version != null) { + data.version = this.version; + } + if (this.git_commit != null) { + data.git_commit = this.git_commit; + } + if (this.build_tags != null) { + data.build_tags = this.build_tags; + } + if (this.go_version != null) { + data.go_version = this.go_version; + } + if (this.build_deps != null) { + data.build_deps = this.build_deps.map((item: Module) => item.toObject()); + } + if (this.cosmos_sdk_version != null) { + data.cosmos_sdk_version = this.cosmos_sdk_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.name.length) + writer.writeString(1, this.name); + if (this.app_name.length) + writer.writeString(2, this.app_name); + if (this.version.length) + writer.writeString(3, this.version); + if (this.git_commit.length) + writer.writeString(4, this.git_commit); + if (this.build_tags.length) + writer.writeString(5, this.build_tags); + if (this.go_version.length) + writer.writeString(6, this.go_version); + if (this.build_deps.length) + writer.writeRepeatedMessage(7, this.build_deps, (item: Module) => item.serialize(writer)); + if (this.cosmos_sdk_version.length) + writer.writeString(8, this.cosmos_sdk_version); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VersionInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VersionInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.app_name = reader.readString(); + break; + case 3: + message.version = reader.readString(); + break; + case 4: + message.git_commit = reader.readString(); + break; + case 5: + message.build_tags = reader.readString(); + break; + case 6: + message.go_version = reader.readString(); + break; + case 7: + reader.readMessage(message.build_deps, () => pb_1.Message.addToRepeatedWrapperField(message, 7, Module.deserialize(reader), Module)); + break; + case 8: + message.cosmos_sdk_version = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VersionInfo { + return VersionInfo.deserialize(bytes); + } + } + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: string; + version?: string; + sum?: 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 ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("sum" in data && data.sum != undefined) { + this.sum = data.sum; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set path(value: string) { + pb_1.Message.setField(this, 1, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sum() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set sum(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + path?: string; + version?: string; + sum?: string; + }): Module { + const message = new Module({}); + if (data.path != null) { + message.path = data.path; + } + if (data.version != null) { + message.version = data.version; + } + if (data.sum != null) { + message.sum = data.sum; + } + return message; + } + toObject() { + const data: { + path?: string; + version?: string; + sum?: string; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.version != null) { + data.version = this.version; + } + if (this.sum != null) { + data.sum = this.sum; + } + 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.path.length) + writer.writeString(1, this.path); + if (this.version.length) + writer.writeString(2, this.version); + if (this.sum.length) + writer.writeString(3, this.sum); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readString(); + break; + case 2: + message.version = reader.readString(); + break; + case 3: + message.sum = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } + export class ABCIQueryRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: Uint8Array; + path?: string; + height?: number; + prove?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("prove" in data && data.prove != undefined) { + this.prove = data.prove; + } + } + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set path(value: string) { + pb_1.Message.setField(this, 2, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get prove() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set prove(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + data?: Uint8Array; + path?: string; + height?: number; + prove?: boolean; + }): ABCIQueryRequest { + const message = new ABCIQueryRequest({}); + if (data.data != null) { + message.data = data.data; + } + if (data.path != null) { + message.path = data.path; + } + if (data.height != null) { + message.height = data.height; + } + if (data.prove != null) { + message.prove = data.prove; + } + return message; + } + toObject() { + const data: { + data?: Uint8Array; + path?: string; + height?: number; + prove?: boolean; + } = {}; + if (this.data != null) { + data.data = this.data; + } + if (this.path != null) { + data.path = this.path; + } + if (this.height != null) { + data.height = this.height; + } + if (this.prove != null) { + data.prove = this.prove; + } + 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.data.length) + writer.writeBytes(1, this.data); + if (this.path.length) + writer.writeString(2, this.path); + if (this.height != 0) + writer.writeInt64(3, this.height); + if (this.prove != false) + writer.writeBool(4, this.prove); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ABCIQueryRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ABCIQueryRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readBytes(); + break; + case 2: + message.path = reader.readString(); + break; + case 3: + message.height = reader.readInt64(); + break; + case 4: + message.prove = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ABCIQueryRequest { + return ABCIQueryRequest.deserialize(bytes); + } + } + export class ABCIQueryResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + log?: string; + info?: string; + index?: number; + key?: Uint8Array; + value?: Uint8Array; + proof_ops?: ProofOps; + height?: number; + codespace?: 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 ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("log" in data && data.log != undefined) { + this.log = data.log; + } + if ("info" in data && data.info != undefined) { + this.info = data.info; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("proof_ops" in data && data.proof_ops != undefined) { + this.proof_ops = data.proof_ops; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("codespace" in data && data.codespace != undefined) { + this.codespace = data.codespace; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get log() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set log(value: string) { + pb_1.Message.setField(this, 3, value); + } + get info() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set info(value: string) { + pb_1.Message.setField(this, 4, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 5, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get proof_ops() { + return pb_1.Message.getWrapperField(this, ProofOps, 8) as ProofOps; + } + set proof_ops(value: ProofOps) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_proof_ops() { + return pb_1.Message.getField(this, 8) != null; + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 9, value); + } + get codespace() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set codespace(value: string) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + code?: number; + log?: string; + info?: string; + index?: number; + key?: Uint8Array; + value?: Uint8Array; + proof_ops?: ReturnType; + height?: number; + codespace?: string; + }): ABCIQueryResponse { + const message = new ABCIQueryResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.log != null) { + message.log = data.log; + } + if (data.info != null) { + message.info = data.info; + } + if (data.index != null) { + message.index = data.index; + } + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + if (data.proof_ops != null) { + message.proof_ops = ProofOps.fromObject(data.proof_ops); + } + if (data.height != null) { + message.height = data.height; + } + if (data.codespace != null) { + message.codespace = data.codespace; + } + return message; + } + toObject() { + const data: { + code?: number; + log?: string; + info?: string; + index?: number; + key?: Uint8Array; + value?: Uint8Array; + proof_ops?: ReturnType; + height?: number; + codespace?: string; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.log != null) { + data.log = this.log; + } + if (this.info != null) { + data.info = this.info; + } + if (this.index != null) { + data.index = this.index; + } + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + if (this.proof_ops != null) { + data.proof_ops = this.proof_ops.toObject(); + } + if (this.height != null) { + data.height = this.height; + } + if (this.codespace != null) { + data.codespace = this.codespace; + } + 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.code != 0) + writer.writeUint32(1, this.code); + if (this.log.length) + writer.writeString(3, this.log); + if (this.info.length) + writer.writeString(4, this.info); + if (this.index != 0) + writer.writeInt64(5, this.index); + if (this.key.length) + writer.writeBytes(6, this.key); + if (this.value.length) + writer.writeBytes(7, this.value); + if (this.has_proof_ops) + writer.writeMessage(8, this.proof_ops, () => this.proof_ops.serialize(writer)); + if (this.height != 0) + writer.writeInt64(9, this.height); + if (this.codespace.length) + writer.writeString(10, this.codespace); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ABCIQueryResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ABCIQueryResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readUint32(); + break; + case 3: + message.log = reader.readString(); + break; + case 4: + message.info = reader.readString(); + break; + case 5: + message.index = reader.readInt64(); + break; + case 6: + message.key = reader.readBytes(); + break; + case 7: + message.value = reader.readBytes(); + break; + case 8: + reader.readMessage(message.proof_ops, () => message.proof_ops = ProofOps.deserialize(reader)); + break; + case 9: + message.height = reader.readInt64(); + break; + case 10: + message.codespace = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ABCIQueryResponse { + return ABCIQueryResponse.deserialize(bytes); + } + } + export class ProofOp extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type?: string; + key?: Uint8Array; + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 1, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + type?: string; + key?: Uint8Array; + data?: Uint8Array; + }): ProofOp { + const message = new ProofOp({}); + if (data.type != null) { + message.type = data.type; + } + if (data.key != null) { + message.key = data.key; + } + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + type?: string; + key?: Uint8Array; + data?: Uint8Array; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.key != null) { + data.key = this.key; + } + if (this.data != null) { + data.data = this.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 (this.type.length) + writer.writeString(1, this.type); + if (this.key.length) + writer.writeBytes(2, this.key); + if (this.data.length) + writer.writeBytes(3, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProofOp { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProofOp(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readString(); + break; + case 2: + message.key = reader.readBytes(); + break; + case 3: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProofOp { + return ProofOp.deserialize(bytes); + } + } + export class ProofOps extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + ops?: ProofOp[]; + }) { + 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 ("ops" in data && data.ops != undefined) { + this.ops = data.ops; + } + } + } + get ops() { + return pb_1.Message.getRepeatedWrapperField(this, ProofOp, 1) as ProofOp[]; + } + set ops(value: ProofOp[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + ops?: ReturnType[]; + }): ProofOps { + const message = new ProofOps({}); + if (data.ops != null) { + message.ops = data.ops.map(item => ProofOp.fromObject(item)); + } + return message; + } + toObject() { + const data: { + ops?: ReturnType[]; + } = {}; + if (this.ops != null) { + data.ops = this.ops.map((item: ProofOp) => item.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.ops.length) + writer.writeRepeatedMessage(1, this.ops, (item: ProofOp) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProofOps { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProofOps(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.ops, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ProofOp.deserialize(reader), ProofOp)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProofOps { + return ProofOps.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedServiceService { + static definition = { + GetNodeInfo: { + path: "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetNodeInfoRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetNodeInfoRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetNodeInfoResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetNodeInfoResponse.deserialize(new Uint8Array(bytes)) + }, + GetSyncing: { + path: "/cosmos.base.tendermint.v1beta1.Service/GetSyncing", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetSyncingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetSyncingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetSyncingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetSyncingResponse.deserialize(new Uint8Array(bytes)) + }, + GetLatestBlock: { + path: "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetLatestBlockRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetLatestBlockRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetLatestBlockResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetLatestBlockResponse.deserialize(new Uint8Array(bytes)) + }, + GetBlockByHeight: { + path: "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetBlockByHeightRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetBlockByHeightRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetBlockByHeightResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetBlockByHeightResponse.deserialize(new Uint8Array(bytes)) + }, + GetLatestValidatorSet: { + path: "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetLatestValidatorSetRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetLatestValidatorSetRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetLatestValidatorSetResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetLatestValidatorSetResponse.deserialize(new Uint8Array(bytes)) + }, + GetValidatorSetByHeight: { + path: "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetValidatorSetByHeightRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetValidatorSetByHeightRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetValidatorSetByHeightResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetValidatorSetByHeightResponse.deserialize(new Uint8Array(bytes)) + }, + ABCIQuery: { + path: "/cosmos.base.tendermint.v1beta1.Service/ABCIQuery", + requestStream: false, + responseStream: false, + requestSerialize: (message: ABCIQueryRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ABCIQueryRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ABCIQueryResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ABCIQueryResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GetNodeInfo(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetSyncing(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetLatestBlock(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetBlockByHeight(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetLatestValidatorSet(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetValidatorSetByHeight(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ABCIQuery(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedServiceService.definition, "Service", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GetNodeInfo: GrpcUnaryServiceInterface = (message: GetNodeInfoRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetNodeInfo(message, metadata, options, callback); + }; + GetSyncing: GrpcUnaryServiceInterface = (message: GetSyncingRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetSyncing(message, metadata, options, callback); + }; + GetLatestBlock: GrpcUnaryServiceInterface = (message: GetLatestBlockRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetLatestBlock(message, metadata, options, callback); + }; + GetBlockByHeight: GrpcUnaryServiceInterface = (message: GetBlockByHeightRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetBlockByHeight(message, metadata, options, callback); + }; + GetLatestValidatorSet: GrpcUnaryServiceInterface = (message: GetLatestValidatorSetRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetLatestValidatorSet(message, metadata, options, callback); + }; + GetValidatorSetByHeight: GrpcUnaryServiceInterface = (message: GetValidatorSetByHeightRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetValidatorSetByHeight(message, metadata, options, callback); + }; + ABCIQuery: GrpcUnaryServiceInterface = (message: ABCIQueryRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ABCIQuery(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/base/tendermint/v1beta1/query_pb.d.ts b/codegen/cosmos/base/tendermint/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/query_pb.d.ts rename to codegen/cosmos/base/tendermint/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/base/tendermint/v1beta1/query_pb.js b/codegen/cosmos/base/tendermint/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/query_pb.js rename to codegen/cosmos/base/tendermint/v1beta1/query_pb.js diff --git a/proto/cosmos/base/tendermint/v1beta1/query_pb_service.d.ts b/codegen/cosmos/base/tendermint/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/base/tendermint/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/base/tendermint/v1beta1/query_pb_service.js b/codegen/cosmos/base/tendermint/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/query_pb_service.js rename to codegen/cosmos/base/tendermint/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/base/tendermint/v1beta1/types.ts b/codegen/cosmos/base/tendermint/v1beta1/types.ts new file mode 100644 index 0000000..0d04d96 --- /dev/null +++ b/codegen/cosmos/base/tendermint/v1beta1/types.ts @@ -0,0 +1,537 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/base/tendermint/v1beta1/types.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../tendermint/types/types"; +import * as dependency_3 from "./../../../../tendermint/types/evidence"; +import * as dependency_4 from "./../../../../tendermint/version/types"; +import * as dependency_5 from "./../../../../google/protobuf/timestamp"; +import * as dependency_6 from "./../../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.base.tendermint.v1beta1 { + export class Block extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + header?: Header; + data?: dependency_2.tendermint.types.Data; + evidence?: dependency_3.tendermint.types.EvidenceList; + last_commit?: dependency_2.tendermint.types.Commit; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("header" in data && data.header != undefined) { + this.header = data.header; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("evidence" in data && data.evidence != undefined) { + this.evidence = data.evidence; + } + if ("last_commit" in data && data.last_commit != undefined) { + this.last_commit = data.last_commit; + } + } + } + get header() { + return pb_1.Message.getWrapperField(this, Header, 1) as Header; + } + set header(value: Header) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_header() { + return pb_1.Message.getField(this, 1) != null; + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.types.Data, 2) as dependency_2.tendermint.types.Data; + } + set data(value: dependency_2.tendermint.types.Data) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_data() { + return pb_1.Message.getField(this, 2) != null; + } + get evidence() { + return pb_1.Message.getWrapperField(this, dependency_3.tendermint.types.EvidenceList, 3) as dependency_3.tendermint.types.EvidenceList; + } + set evidence(value: dependency_3.tendermint.types.EvidenceList) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_evidence() { + return pb_1.Message.getField(this, 3) != null; + } + get last_commit() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.types.Commit, 4) as dependency_2.tendermint.types.Commit; + } + set last_commit(value: dependency_2.tendermint.types.Commit) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_last_commit() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + header?: ReturnType; + data?: ReturnType; + evidence?: ReturnType; + last_commit?: ReturnType; + }): Block { + const message = new Block({}); + if (data.header != null) { + message.header = Header.fromObject(data.header); + } + if (data.data != null) { + message.data = dependency_2.tendermint.types.Data.fromObject(data.data); + } + if (data.evidence != null) { + message.evidence = dependency_3.tendermint.types.EvidenceList.fromObject(data.evidence); + } + if (data.last_commit != null) { + message.last_commit = dependency_2.tendermint.types.Commit.fromObject(data.last_commit); + } + return message; + } + toObject() { + const data: { + header?: ReturnType; + data?: ReturnType; + evidence?: ReturnType; + last_commit?: ReturnType; + } = {}; + if (this.header != null) { + data.header = this.header.toObject(); + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.evidence != null) { + data.evidence = this.evidence.toObject(); + } + if (this.last_commit != null) { + data.last_commit = this.last_commit.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_header) + writer.writeMessage(1, this.header, () => this.header.serialize(writer)); + if (this.has_data) + writer.writeMessage(2, this.data, () => this.data.serialize(writer)); + if (this.has_evidence) + writer.writeMessage(3, this.evidence, () => this.evidence.serialize(writer)); + if (this.has_last_commit) + writer.writeMessage(4, this.last_commit, () => this.last_commit.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Block { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Block(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.header, () => message.header = Header.deserialize(reader)); + break; + case 2: + reader.readMessage(message.data, () => message.data = dependency_2.tendermint.types.Data.deserialize(reader)); + break; + case 3: + reader.readMessage(message.evidence, () => message.evidence = dependency_3.tendermint.types.EvidenceList.deserialize(reader)); + break; + case 4: + reader.readMessage(message.last_commit, () => message.last_commit = dependency_2.tendermint.types.Commit.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Block { + return Block.deserialize(bytes); + } + } + export class Header extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + version?: dependency_4.tendermint.version.Consensus; + chain_id?: string; + height?: number; + time?: dependency_5.google.protobuf.Timestamp; + last_block_id?: dependency_2.tendermint.types.BlockID; + last_commit_hash?: Uint8Array; + data_hash?: Uint8Array; + validators_hash?: Uint8Array; + next_validators_hash?: Uint8Array; + consensus_hash?: Uint8Array; + app_hash?: Uint8Array; + last_results_hash?: Uint8Array; + evidence_hash?: Uint8Array; + proposer_address?: 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 ("chain_id" in data && data.chain_id != undefined) { + this.chain_id = data.chain_id; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("last_block_id" in data && data.last_block_id != undefined) { + this.last_block_id = data.last_block_id; + } + if ("last_commit_hash" in data && data.last_commit_hash != undefined) { + this.last_commit_hash = data.last_commit_hash; + } + if ("data_hash" in data && data.data_hash != undefined) { + this.data_hash = data.data_hash; + } + if ("validators_hash" in data && data.validators_hash != undefined) { + this.validators_hash = data.validators_hash; + } + if ("next_validators_hash" in data && data.next_validators_hash != undefined) { + this.next_validators_hash = data.next_validators_hash; + } + if ("consensus_hash" in data && data.consensus_hash != undefined) { + this.consensus_hash = data.consensus_hash; + } + if ("app_hash" in data && data.app_hash != undefined) { + this.app_hash = data.app_hash; + } + if ("last_results_hash" in data && data.last_results_hash != undefined) { + this.last_results_hash = data.last_results_hash; + } + if ("evidence_hash" in data && data.evidence_hash != undefined) { + this.evidence_hash = data.evidence_hash; + } + if ("proposer_address" in data && data.proposer_address != undefined) { + this.proposer_address = data.proposer_address; + } + } + } + get version() { + return pb_1.Message.getWrapperField(this, dependency_4.tendermint.version.Consensus, 1) as dependency_4.tendermint.version.Consensus; + } + set version(value: dependency_4.tendermint.version.Consensus) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_version() { + 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 height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Timestamp, 4) as dependency_5.google.protobuf.Timestamp; + } + set time(value: dependency_5.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_time() { + return pb_1.Message.getField(this, 4) != null; + } + get last_block_id() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.types.BlockID, 5) as dependency_2.tendermint.types.BlockID; + } + set last_block_id(value: dependency_2.tendermint.types.BlockID) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_last_block_id() { + return pb_1.Message.getField(this, 5) != null; + } + get last_commit_hash() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set last_commit_hash(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get data_hash() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set data_hash(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get validators_hash() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + set validators_hash(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + get next_validators_hash() { + return pb_1.Message.getFieldWithDefault(this, 9, new Uint8Array(0)) as Uint8Array; + } + set next_validators_hash(value: Uint8Array) { + pb_1.Message.setField(this, 9, value); + } + get consensus_hash() { + return pb_1.Message.getFieldWithDefault(this, 10, new Uint8Array(0)) as Uint8Array; + } + set consensus_hash(value: Uint8Array) { + pb_1.Message.setField(this, 10, value); + } + get app_hash() { + return pb_1.Message.getFieldWithDefault(this, 11, new Uint8Array(0)) as Uint8Array; + } + set app_hash(value: Uint8Array) { + pb_1.Message.setField(this, 11, value); + } + get last_results_hash() { + return pb_1.Message.getFieldWithDefault(this, 12, new Uint8Array(0)) as Uint8Array; + } + set last_results_hash(value: Uint8Array) { + pb_1.Message.setField(this, 12, value); + } + get evidence_hash() { + return pb_1.Message.getFieldWithDefault(this, 13, new Uint8Array(0)) as Uint8Array; + } + set evidence_hash(value: Uint8Array) { + pb_1.Message.setField(this, 13, value); + } + get proposer_address() { + return pb_1.Message.getFieldWithDefault(this, 14, "") as string; + } + set proposer_address(value: string) { + pb_1.Message.setField(this, 14, value); + } + static fromObject(data: { + version?: ReturnType; + chain_id?: string; + height?: number; + time?: ReturnType; + last_block_id?: ReturnType; + last_commit_hash?: Uint8Array; + data_hash?: Uint8Array; + validators_hash?: Uint8Array; + next_validators_hash?: Uint8Array; + consensus_hash?: Uint8Array; + app_hash?: Uint8Array; + last_results_hash?: Uint8Array; + evidence_hash?: Uint8Array; + proposer_address?: string; + }): Header { + const message = new Header({}); + if (data.version != null) { + message.version = dependency_4.tendermint.version.Consensus.fromObject(data.version); + } + if (data.chain_id != null) { + message.chain_id = data.chain_id; + } + if (data.height != null) { + message.height = data.height; + } + if (data.time != null) { + message.time = dependency_5.google.protobuf.Timestamp.fromObject(data.time); + } + if (data.last_block_id != null) { + message.last_block_id = dependency_2.tendermint.types.BlockID.fromObject(data.last_block_id); + } + if (data.last_commit_hash != null) { + message.last_commit_hash = data.last_commit_hash; + } + if (data.data_hash != null) { + message.data_hash = data.data_hash; + } + if (data.validators_hash != null) { + message.validators_hash = data.validators_hash; + } + if (data.next_validators_hash != null) { + message.next_validators_hash = data.next_validators_hash; + } + if (data.consensus_hash != null) { + message.consensus_hash = data.consensus_hash; + } + if (data.app_hash != null) { + message.app_hash = data.app_hash; + } + if (data.last_results_hash != null) { + message.last_results_hash = data.last_results_hash; + } + if (data.evidence_hash != null) { + message.evidence_hash = data.evidence_hash; + } + if (data.proposer_address != null) { + message.proposer_address = data.proposer_address; + } + return message; + } + toObject() { + const data: { + version?: ReturnType; + chain_id?: string; + height?: number; + time?: ReturnType; + last_block_id?: ReturnType; + last_commit_hash?: Uint8Array; + data_hash?: Uint8Array; + validators_hash?: Uint8Array; + next_validators_hash?: Uint8Array; + consensus_hash?: Uint8Array; + app_hash?: Uint8Array; + last_results_hash?: Uint8Array; + evidence_hash?: Uint8Array; + proposer_address?: string; + } = {}; + if (this.version != null) { + data.version = this.version.toObject(); + } + if (this.chain_id != null) { + data.chain_id = this.chain_id; + } + if (this.height != null) { + data.height = this.height; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.last_block_id != null) { + data.last_block_id = this.last_block_id.toObject(); + } + if (this.last_commit_hash != null) { + data.last_commit_hash = this.last_commit_hash; + } + if (this.data_hash != null) { + data.data_hash = this.data_hash; + } + if (this.validators_hash != null) { + data.validators_hash = this.validators_hash; + } + if (this.next_validators_hash != null) { + data.next_validators_hash = this.next_validators_hash; + } + if (this.consensus_hash != null) { + data.consensus_hash = this.consensus_hash; + } + if (this.app_hash != null) { + data.app_hash = this.app_hash; + } + if (this.last_results_hash != null) { + data.last_results_hash = this.last_results_hash; + } + if (this.evidence_hash != null) { + data.evidence_hash = this.evidence_hash; + } + if (this.proposer_address != null) { + data.proposer_address = this.proposer_address; + } + 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_version) + writer.writeMessage(1, this.version, () => this.version.serialize(writer)); + if (this.chain_id.length) + writer.writeString(2, this.chain_id); + if (this.height != 0) + writer.writeInt64(3, this.height); + if (this.has_time) + writer.writeMessage(4, this.time, () => this.time.serialize(writer)); + if (this.has_last_block_id) + writer.writeMessage(5, this.last_block_id, () => this.last_block_id.serialize(writer)); + if (this.last_commit_hash.length) + writer.writeBytes(6, this.last_commit_hash); + if (this.data_hash.length) + writer.writeBytes(7, this.data_hash); + if (this.validators_hash.length) + writer.writeBytes(8, this.validators_hash); + if (this.next_validators_hash.length) + writer.writeBytes(9, this.next_validators_hash); + if (this.consensus_hash.length) + writer.writeBytes(10, this.consensus_hash); + if (this.app_hash.length) + writer.writeBytes(11, this.app_hash); + if (this.last_results_hash.length) + writer.writeBytes(12, this.last_results_hash); + if (this.evidence_hash.length) + writer.writeBytes(13, this.evidence_hash); + if (this.proposer_address.length) + writer.writeString(14, this.proposer_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Header { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Header(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.version, () => message.version = dependency_4.tendermint.version.Consensus.deserialize(reader)); + break; + case 2: + message.chain_id = reader.readString(); + break; + case 3: + message.height = reader.readInt64(); + break; + case 4: + reader.readMessage(message.time, () => message.time = dependency_5.google.protobuf.Timestamp.deserialize(reader)); + break; + case 5: + reader.readMessage(message.last_block_id, () => message.last_block_id = dependency_2.tendermint.types.BlockID.deserialize(reader)); + break; + case 6: + message.last_commit_hash = reader.readBytes(); + break; + case 7: + message.data_hash = reader.readBytes(); + break; + case 8: + message.validators_hash = reader.readBytes(); + break; + case 9: + message.next_validators_hash = reader.readBytes(); + break; + case 10: + message.consensus_hash = reader.readBytes(); + break; + case 11: + message.app_hash = reader.readBytes(); + break; + case 12: + message.last_results_hash = reader.readBytes(); + break; + case 13: + message.evidence_hash = reader.readBytes(); + break; + case 14: + message.proposer_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Header { + return Header.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/base/tendermint/v1beta1/types_pb.d.ts b/codegen/cosmos/base/tendermint/v1beta1/types_pb.d.ts similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/types_pb.d.ts rename to codegen/cosmos/base/tendermint/v1beta1/types_pb.d.ts diff --git a/proto/cosmos/base/tendermint/v1beta1/types_pb.js b/codegen/cosmos/base/tendermint/v1beta1/types_pb.js similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/types_pb.js rename to codegen/cosmos/base/tendermint/v1beta1/types_pb.js diff --git a/proto/cosmos/base/tendermint/v1beta1/types_pb_service.d.ts b/codegen/cosmos/base/tendermint/v1beta1/types_pb_service.d.ts similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/types_pb_service.d.ts rename to codegen/cosmos/base/tendermint/v1beta1/types_pb_service.d.ts diff --git a/proto/cosmos/base/tendermint/v1beta1/types_pb_service.js b/codegen/cosmos/base/tendermint/v1beta1/types_pb_service.js similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/types_pb_service.js rename to codegen/cosmos/base/tendermint/v1beta1/types_pb_service.js diff --git a/codegen/cosmos/base/v1beta1/coin.ts b/codegen/cosmos/base/v1beta1/coin.ts new file mode 100644 index 0000000..22f12cb --- /dev/null +++ b/codegen/cosmos/base/v1beta1/coin.ts @@ -0,0 +1,325 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/base/v1beta1/coin.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.base.v1beta1 { + export class Coin extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: string; + amount?: 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 ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set amount(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + denom?: string; + amount?: string; + }): Coin { + const message = new Coin({}); + if (data.denom != null) { + message.denom = data.denom; + } + if (data.amount != null) { + message.amount = data.amount; + } + return message; + } + toObject() { + const data: { + denom?: string; + amount?: string; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + if (this.amount != null) { + data.amount = this.amount; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (this.amount.length) + writer.writeString(2, this.amount); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Coin { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Coin(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + case 2: + message.amount = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Coin { + return Coin.deserialize(bytes); + } + } + export class DecCoin extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: string; + amount?: 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 ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set amount(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + denom?: string; + amount?: string; + }): DecCoin { + const message = new DecCoin({}); + if (data.denom != null) { + message.denom = data.denom; + } + if (data.amount != null) { + message.amount = data.amount; + } + return message; + } + toObject() { + const data: { + denom?: string; + amount?: string; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + if (this.amount != null) { + data.amount = this.amount; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (this.amount.length) + writer.writeString(2, this.amount); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DecCoin { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DecCoin(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + case 2: + message.amount = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DecCoin { + return DecCoin.deserialize(bytes); + } + } + export class IntProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + int?: 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 ("int" in data && data.int != undefined) { + this.int = data.int; + } + } + } + get int() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set int(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + int?: string; + }): IntProto { + const message = new IntProto({}); + if (data.int != null) { + message.int = data.int; + } + return message; + } + toObject() { + const data: { + int?: string; + } = {}; + if (this.int != null) { + data.int = this.int; + } + 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.int.length) + writer.writeString(1, this.int); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IntProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IntProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.int = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IntProto { + return IntProto.deserialize(bytes); + } + } + export class DecProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + dec?: 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 ("dec" in data && data.dec != undefined) { + this.dec = data.dec; + } + } + } + get dec() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set dec(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + dec?: string; + }): DecProto { + const message = new DecProto({}); + if (data.dec != null) { + message.dec = data.dec; + } + return message; + } + toObject() { + const data: { + dec?: string; + } = {}; + if (this.dec != null) { + data.dec = this.dec; + } + 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.dec.length) + writer.writeString(1, this.dec); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DecProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DecProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.dec = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DecProto { + return DecProto.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/base/v1beta1/coin_pb.d.ts b/codegen/cosmos/base/v1beta1/coin_pb.d.ts similarity index 100% rename from proto/cosmos/base/v1beta1/coin_pb.d.ts rename to codegen/cosmos/base/v1beta1/coin_pb.d.ts diff --git a/proto/cosmos/base/v1beta1/coin_pb.js b/codegen/cosmos/base/v1beta1/coin_pb.js similarity index 100% rename from proto/cosmos/base/v1beta1/coin_pb.js rename to codegen/cosmos/base/v1beta1/coin_pb.js diff --git a/proto/cosmos/base/v1beta1/coin_pb_service.d.ts b/codegen/cosmos/base/v1beta1/coin_pb_service.d.ts similarity index 100% rename from proto/cosmos/base/v1beta1/coin_pb_service.d.ts rename to codegen/cosmos/base/v1beta1/coin_pb_service.d.ts diff --git a/proto/cosmos/base/v1beta1/coin_pb_service.js b/codegen/cosmos/base/v1beta1/coin_pb_service.js similarity index 100% rename from proto/cosmos/base/v1beta1/coin_pb_service.js rename to codegen/cosmos/base/v1beta1/coin_pb_service.js diff --git a/codegen/cosmos/circuit/module/v1/module.ts b/codegen/cosmos/circuit/module/v1/module.ts new file mode 100644 index 0000000..0e17540 --- /dev/null +++ b/codegen/cosmos/circuit/module/v1/module.ts @@ -0,0 +1,76 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/circuit/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.circuit.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: 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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + authority?: string; + }): Module { + const message = new Module({}); + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + authority?: string; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/capability/module/v1/module_pb.d.ts b/codegen/cosmos/circuit/module/v1/module_pb.d.ts similarity index 81% rename from proto/cosmos/capability/module/v1/module_pb.d.ts rename to codegen/cosmos/circuit/module/v1/module_pb.d.ts index a1ad8be..11647c0 100644 --- a/proto/cosmos/capability/module/v1/module_pb.d.ts +++ b/codegen/cosmos/circuit/module/v1/module_pb.d.ts @@ -1,12 +1,12 @@ -// package: cosmos.capability.module.v1 -// file: cosmos/capability/module/v1/module.proto +// package: cosmos.circuit.module.v1 +// file: cosmos/circuit/module/v1/module.proto import * as jspb from "google-protobuf"; import * as cosmos_app_v1alpha1_module_pb from "../../../../cosmos/app/v1alpha1/module_pb"; export class Module extends jspb.Message { - getSealKeeper(): boolean; - setSealKeeper(value: boolean): void; + getAuthority(): string; + setAuthority(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Module.AsObject; @@ -20,7 +20,7 @@ export class Module extends jspb.Message { export namespace Module { export type AsObject = { - sealKeeper: boolean, + authority: string, } } diff --git a/proto/cosmos/capability/module/v1/module_pb.js b/codegen/cosmos/circuit/module/v1/module_pb.js similarity index 58% rename from proto/cosmos/capability/module/v1/module_pb.js rename to codegen/cosmos/circuit/module/v1/module_pb.js index e2449d3..b127e60 100644 --- a/proto/cosmos/capability/module/v1/module_pb.js +++ b/codegen/cosmos/circuit/module/v1/module_pb.js @@ -1,4 +1,4 @@ -// source: cosmos/capability/module/v1/module.proto +// source: cosmos/circuit/module/v1/module.proto /** * @fileoverview * @enhanceable @@ -17,7 +17,7 @@ var global = (function() { return this || window || global || self || Function(' var cosmos_app_v1alpha1_module_pb = require('../../../../cosmos/app/v1alpha1/module_pb.js'); goog.object.extend(proto, cosmos_app_v1alpha1_module_pb); -goog.exportSymbol('proto.cosmos.capability.module.v1.Module', null, global); +goog.exportSymbol('proto.cosmos.circuit.module.v1.Module', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -28,16 +28,16 @@ goog.exportSymbol('proto.cosmos.capability.module.v1.Module', null, global); * @extends {jspb.Message} * @constructor */ -proto.cosmos.capability.module.v1.Module = function(opt_data) { +proto.cosmos.circuit.module.v1.Module = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.capability.module.v1.Module, jspb.Message); +goog.inherits(proto.cosmos.circuit.module.v1.Module, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.capability.module.v1.Module.displayName = 'proto.cosmos.capability.module.v1.Module'; + proto.cosmos.circuit.module.v1.Module.displayName = 'proto.cosmos.circuit.module.v1.Module'; } @@ -55,8 +55,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.capability.module.v1.Module.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.capability.module.v1.Module.toObject(opt_includeInstance, this); +proto.cosmos.circuit.module.v1.Module.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.module.v1.Module.toObject(opt_includeInstance, this); }; @@ -65,13 +65,13 @@ proto.cosmos.capability.module.v1.Module.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.capability.module.v1.Module} msg The msg instance to transform. + * @param {!proto.cosmos.circuit.module.v1.Module} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.module.v1.Module.toObject = function(includeInstance, msg) { +proto.cosmos.circuit.module.v1.Module.toObject = function(includeInstance, msg) { var f, obj = { - sealKeeper: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + authority: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -85,23 +85,23 @@ proto.cosmos.capability.module.v1.Module.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.capability.module.v1.Module} + * @return {!proto.cosmos.circuit.module.v1.Module} */ -proto.cosmos.capability.module.v1.Module.deserializeBinary = function(bytes) { +proto.cosmos.circuit.module.v1.Module.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.capability.module.v1.Module; - return proto.cosmos.capability.module.v1.Module.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.circuit.module.v1.Module; + return proto.cosmos.circuit.module.v1.Module.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.capability.module.v1.Module} msg The message object to deserialize into. + * @param {!proto.cosmos.circuit.module.v1.Module} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.capability.module.v1.Module} + * @return {!proto.cosmos.circuit.module.v1.Module} */ -proto.cosmos.capability.module.v1.Module.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.circuit.module.v1.Module.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -109,8 +109,8 @@ proto.cosmos.capability.module.v1.Module.deserializeBinaryFromReader = function( var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSealKeeper(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); break; default: reader.skipField(); @@ -125,9 +125,9 @@ proto.cosmos.capability.module.v1.Module.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.capability.module.v1.Module.prototype.serializeBinary = function() { +proto.cosmos.circuit.module.v1.Module.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.capability.module.v1.Module.serializeBinaryToWriter(this, writer); + proto.cosmos.circuit.module.v1.Module.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -135,15 +135,15 @@ proto.cosmos.capability.module.v1.Module.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.capability.module.v1.Module} message + * @param {!proto.cosmos.circuit.module.v1.Module} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.capability.module.v1.Module.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.circuit.module.v1.Module.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSealKeeper(); - if (f) { - writer.writeBool( + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( 1, f ); @@ -152,21 +152,21 @@ proto.cosmos.capability.module.v1.Module.serializeBinaryToWriter = function(mess /** - * optional bool seal_keeper = 1; - * @return {boolean} + * optional string authority = 1; + * @return {string} */ -proto.cosmos.capability.module.v1.Module.prototype.getSealKeeper = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.cosmos.circuit.module.v1.Module.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.cosmos.capability.module.v1.Module} returns this + * @param {string} value + * @return {!proto.cosmos.circuit.module.v1.Module} returns this */ -proto.cosmos.capability.module.v1.Module.prototype.setSealKeeper = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.cosmos.circuit.module.v1.Module.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; -goog.object.extend(exports, proto.cosmos.capability.module.v1); +goog.object.extend(exports, proto.cosmos.circuit.module.v1); diff --git a/codegen/cosmos/circuit/module/v1/module_pb_service.d.ts b/codegen/cosmos/circuit/module/v1/module_pb_service.d.ts new file mode 100644 index 0000000..f936e01 --- /dev/null +++ b/codegen/cosmos/circuit/module/v1/module_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: cosmos.circuit.module.v1 +// file: cosmos/circuit/module/v1/module.proto + diff --git a/codegen/cosmos/circuit/module/v1/module_pb_service.js b/codegen/cosmos/circuit/module/v1/module_pb_service.js new file mode 100644 index 0000000..f936e01 --- /dev/null +++ b/codegen/cosmos/circuit/module/v1/module_pb_service.js @@ -0,0 +1,3 @@ +// package: cosmos.circuit.module.v1 +// file: cosmos/circuit/module/v1/module.proto + diff --git a/codegen/cosmos/circuit/v1/query.ts b/codegen/cosmos/circuit/v1/query.ts new file mode 100644 index 0000000..9dd6d8d --- /dev/null +++ b/codegen/cosmos/circuit/v1/query.ts @@ -0,0 +1,493 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/circuit/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./types"; +import * as dependency_3 from "./../../../google/api/annotations"; +import * as dependency_4 from "./../../query/v1/query"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.circuit.v1 { + export class QueryAccountRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): QueryAccountRequest { + const message = new QueryAccountRequest({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAccountRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountRequest { + return QueryAccountRequest.deserialize(bytes); + } + } + export class AccountResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + permission?: dependency_2.cosmos.circuit.v1.Permissions; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("permission" in data && data.permission != undefined) { + this.permission = data.permission; + } + } + } + get permission() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.circuit.v1.Permissions, 1) as dependency_2.cosmos.circuit.v1.Permissions; + } + set permission(value: dependency_2.cosmos.circuit.v1.Permissions) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_permission() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + permission?: ReturnType; + }): AccountResponse { + const message = new AccountResponse({}); + if (data.permission != null) { + message.permission = dependency_2.cosmos.circuit.v1.Permissions.fromObject(data.permission); + } + return message; + } + toObject() { + const data: { + permission?: ReturnType; + } = {}; + if (this.permission != null) { + data.permission = this.permission.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_permission) + writer.writeMessage(1, this.permission, () => this.permission.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AccountResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AccountResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.permission, () => message.permission = dependency_2.cosmos.circuit.v1.Permissions.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AccountResponse { + return AccountResponse.deserialize(bytes); + } + } + export class QueryAccountsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_1.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_1.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.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; + }): QueryAccountsRequest { + const message = new QueryAccountsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryAccountsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAccountsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAccountsRequest { + return QueryAccountsRequest.deserialize(bytes); + } + } + export class AccountsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + accounts?: dependency_2.cosmos.circuit.v1.GenesisAccountPermissions[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("accounts" in data && data.accounts != undefined) { + this.accounts = data.accounts; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get accounts() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.circuit.v1.GenesisAccountPermissions, 1) as dependency_2.cosmos.circuit.v1.GenesisAccountPermissions[]; + } + set accounts(value: dependency_2.cosmos.circuit.v1.GenesisAccountPermissions[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + accounts?: ReturnType[]; + pagination?: ReturnType; + }): AccountsResponse { + const message = new AccountsResponse({}); + if (data.accounts != null) { + message.accounts = data.accounts.map(item => dependency_2.cosmos.circuit.v1.GenesisAccountPermissions.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + accounts?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.accounts != null) { + data.accounts = this.accounts.map((item: dependency_2.cosmos.circuit.v1.GenesisAccountPermissions) => item.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.accounts.length) + writer.writeRepeatedMessage(1, this.accounts, (item: dependency_2.cosmos.circuit.v1.GenesisAccountPermissions) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AccountsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AccountsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.accounts, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.circuit.v1.GenesisAccountPermissions.deserialize(reader), dependency_2.cosmos.circuit.v1.GenesisAccountPermissions)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AccountsResponse { + return AccountsResponse.deserialize(bytes); + } + } + export class QueryDisabledListRequest 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: {}): QueryDisabledListRequest { + const message = new QueryDisabledListRequest({}); + 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): QueryDisabledListRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDisabledListRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDisabledListRequest { + return QueryDisabledListRequest.deserialize(bytes); + } + } + export class DisabledListResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + disabled_list?: string[]; + }) { + 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 ("disabled_list" in data && data.disabled_list != undefined) { + this.disabled_list = data.disabled_list; + } + } + } + get disabled_list() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set disabled_list(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + disabled_list?: string[]; + }): DisabledListResponse { + const message = new DisabledListResponse({}); + if (data.disabled_list != null) { + message.disabled_list = data.disabled_list; + } + return message; + } + toObject() { + const data: { + disabled_list?: string[]; + } = {}; + if (this.disabled_list != null) { + data.disabled_list = this.disabled_list; + } + 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.disabled_list.length) + writer.writeRepeatedString(1, this.disabled_list); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DisabledListResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DisabledListResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DisabledListResponse { + return DisabledListResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Account: { + path: "/cosmos.circuit.v1.Query/Account", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAccountRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAccountRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AccountResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AccountResponse.deserialize(new Uint8Array(bytes)) + }, + Accounts: { + path: "/cosmos.circuit.v1.Query/Accounts", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAccountsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAccountsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AccountsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AccountsResponse.deserialize(new Uint8Array(bytes)) + }, + DisabledList: { + path: "/cosmos.circuit.v1.Query/DisabledList", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDisabledListRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDisabledListRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: DisabledListResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => DisabledListResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Account(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Accounts(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DisabledList(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Account: GrpcUnaryServiceInterface = (message: QueryAccountRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Account(message, metadata, options, callback); + }; + Accounts: GrpcUnaryServiceInterface = (message: QueryAccountsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Accounts(message, metadata, options, callback); + }; + DisabledList: GrpcUnaryServiceInterface = (message: QueryDisabledListRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DisabledList(message, metadata, options, callback); + }; + } +} diff --git a/codegen/cosmos/circuit/v1/query_pb.d.ts b/codegen/cosmos/circuit/v1/query_pb.d.ts new file mode 100644 index 0000000..aecaac1 --- /dev/null +++ b/codegen/cosmos/circuit/v1/query_pb.d.ts @@ -0,0 +1,139 @@ +// package: cosmos.circuit.v1 +// file: cosmos/circuit/v1/query.proto + +import * as jspb from "google-protobuf"; +import * as cosmos_base_query_v1beta1_pagination_pb from "../../../cosmos/base/query/v1beta1/pagination_pb"; +import * as cosmos_circuit_v1_types_pb from "../../../cosmos/circuit/v1/types_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as cosmos_query_v1_query_pb from "../../../cosmos/query/v1/query_pb"; + +export class QueryAccountRequest extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryAccountRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryAccountRequest): QueryAccountRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryAccountRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryAccountRequest; + static deserializeBinaryFromReader(message: QueryAccountRequest, reader: jspb.BinaryReader): QueryAccountRequest; +} + +export namespace QueryAccountRequest { + export type AsObject = { + address: string, + } +} + +export class AccountResponse extends jspb.Message { + hasPermission(): boolean; + clearPermission(): void; + getPermission(): cosmos_circuit_v1_types_pb.Permissions | undefined; + setPermission(value?: cosmos_circuit_v1_types_pb.Permissions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AccountResponse.AsObject; + static toObject(includeInstance: boolean, msg: AccountResponse): AccountResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AccountResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AccountResponse; + static deserializeBinaryFromReader(message: AccountResponse, reader: jspb.BinaryReader): AccountResponse; +} + +export namespace AccountResponse { + export type AsObject = { + permission?: cosmos_circuit_v1_types_pb.Permissions.AsObject, + } +} + +export class QueryAccountsRequest extends jspb.Message { + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryAccountsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryAccountsRequest): QueryAccountsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryAccountsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryAccountsRequest; + static deserializeBinaryFromReader(message: QueryAccountsRequest, reader: jspb.BinaryReader): QueryAccountsRequest; +} + +export namespace QueryAccountsRequest { + export type AsObject = { + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class AccountsResponse extends jspb.Message { + clearAccountsList(): void; + getAccountsList(): Array; + setAccountsList(value: Array): void; + addAccounts(value?: cosmos_circuit_v1_types_pb.GenesisAccountPermissions, index?: number): cosmos_circuit_v1_types_pb.GenesisAccountPermissions; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AccountsResponse.AsObject; + static toObject(includeInstance: boolean, msg: AccountsResponse): AccountsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AccountsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AccountsResponse; + static deserializeBinaryFromReader(message: AccountsResponse, reader: jspb.BinaryReader): AccountsResponse; +} + +export namespace AccountsResponse { + export type AsObject = { + accountsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryDisabledListRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDisabledListRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryDisabledListRequest): QueryDisabledListRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDisabledListRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDisabledListRequest; + static deserializeBinaryFromReader(message: QueryDisabledListRequest, reader: jspb.BinaryReader): QueryDisabledListRequest; +} + +export namespace QueryDisabledListRequest { + export type AsObject = { + } +} + +export class DisabledListResponse extends jspb.Message { + clearDisabledListList(): void; + getDisabledListList(): Array; + setDisabledListList(value: Array): void; + addDisabledList(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DisabledListResponse.AsObject; + static toObject(includeInstance: boolean, msg: DisabledListResponse): DisabledListResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DisabledListResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DisabledListResponse; + static deserializeBinaryFromReader(message: DisabledListResponse, reader: jspb.BinaryReader): DisabledListResponse; +} + +export namespace DisabledListResponse { + export type AsObject = { + disabledListList: Array, + } +} + diff --git a/codegen/cosmos/circuit/v1/query_pb.js b/codegen/cosmos/circuit/v1/query_pb.js new file mode 100644 index 0000000..d394904 --- /dev/null +++ b/codegen/cosmos/circuit/v1/query_pb.js @@ -0,0 +1,1058 @@ +// source: cosmos/circuit/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js'); +goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); +var cosmos_circuit_v1_types_pb = require('../../../cosmos/circuit/v1/types_pb.js'); +goog.object.extend(proto, cosmos_circuit_v1_types_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_query_v1_query_pb = require('../../../cosmos/query/v1/query_pb.js'); +goog.object.extend(proto, cosmos_query_v1_query_pb); +goog.exportSymbol('proto.cosmos.circuit.v1.AccountResponse', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.AccountsResponse', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.DisabledListResponse', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.QueryAccountRequest', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.QueryAccountsRequest', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.QueryDisabledListRequest', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.QueryAccountRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.circuit.v1.QueryAccountRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.QueryAccountRequest.displayName = 'proto.cosmos.circuit.v1.QueryAccountRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.AccountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.circuit.v1.AccountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.AccountResponse.displayName = 'proto.cosmos.circuit.v1.AccountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.QueryAccountsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.circuit.v1.QueryAccountsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.QueryAccountsRequest.displayName = 'proto.cosmos.circuit.v1.QueryAccountsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.AccountsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.circuit.v1.AccountsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.circuit.v1.AccountsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.AccountsResponse.displayName = 'proto.cosmos.circuit.v1.AccountsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.QueryDisabledListRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.circuit.v1.QueryDisabledListRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.QueryDisabledListRequest.displayName = 'proto.cosmos.circuit.v1.QueryDisabledListRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.DisabledListResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.circuit.v1.DisabledListResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.circuit.v1.DisabledListResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.DisabledListResponse.displayName = 'proto.cosmos.circuit.v1.DisabledListResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.QueryAccountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.QueryAccountRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.QueryAccountRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.QueryAccountRequest.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.QueryAccountRequest} + */ +proto.cosmos.circuit.v1.QueryAccountRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.QueryAccountRequest; + return proto.cosmos.circuit.v1.QueryAccountRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.QueryAccountRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.QueryAccountRequest} + */ +proto.cosmos.circuit.v1.QueryAccountRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.QueryAccountRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.QueryAccountRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.QueryAccountRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.QueryAccountRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.circuit.v1.QueryAccountRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.circuit.v1.QueryAccountRequest} returns this + */ +proto.cosmos.circuit.v1.QueryAccountRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.AccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.AccountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.AccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.AccountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + permission: (f = msg.getPermission()) && cosmos_circuit_v1_types_pb.Permissions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.AccountResponse} + */ +proto.cosmos.circuit.v1.AccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.AccountResponse; + return proto.cosmos.circuit.v1.AccountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.AccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.AccountResponse} + */ +proto.cosmos.circuit.v1.AccountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_circuit_v1_types_pb.Permissions; + reader.readMessage(value,cosmos_circuit_v1_types_pb.Permissions.deserializeBinaryFromReader); + msg.setPermission(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.AccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.AccountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.AccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.AccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPermission(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_circuit_v1_types_pb.Permissions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Permissions permission = 1; + * @return {?proto.cosmos.circuit.v1.Permissions} + */ +proto.cosmos.circuit.v1.AccountResponse.prototype.getPermission = function() { + return /** @type{?proto.cosmos.circuit.v1.Permissions} */ ( + jspb.Message.getWrapperField(this, cosmos_circuit_v1_types_pb.Permissions, 1)); +}; + + +/** + * @param {?proto.cosmos.circuit.v1.Permissions|undefined} value + * @return {!proto.cosmos.circuit.v1.AccountResponse} returns this +*/ +proto.cosmos.circuit.v1.AccountResponse.prototype.setPermission = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.circuit.v1.AccountResponse} returns this + */ +proto.cosmos.circuit.v1.AccountResponse.prototype.clearPermission = function() { + return this.setPermission(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.circuit.v1.AccountResponse.prototype.hasPermission = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.QueryAccountsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.QueryAccountsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.QueryAccountsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.QueryAccountsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.QueryAccountsRequest} + */ +proto.cosmos.circuit.v1.QueryAccountsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.QueryAccountsRequest; + return proto.cosmos.circuit.v1.QueryAccountsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.QueryAccountsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.QueryAccountsRequest} + */ +proto.cosmos.circuit.v1.QueryAccountsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.QueryAccountsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.QueryAccountsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.QueryAccountsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.QueryAccountsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.circuit.v1.QueryAccountsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.cosmos.circuit.v1.QueryAccountsRequest} returns this +*/ +proto.cosmos.circuit.v1.QueryAccountsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.circuit.v1.QueryAccountsRequest} returns this + */ +proto.cosmos.circuit.v1.QueryAccountsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.circuit.v1.QueryAccountsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.circuit.v1.AccountsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.AccountsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.AccountsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.AccountsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.AccountsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + accountsList: jspb.Message.toObjectList(msg.getAccountsList(), + cosmos_circuit_v1_types_pb.GenesisAccountPermissions.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.AccountsResponse} + */ +proto.cosmos.circuit.v1.AccountsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.AccountsResponse; + return proto.cosmos.circuit.v1.AccountsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.AccountsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.AccountsResponse} + */ +proto.cosmos.circuit.v1.AccountsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_circuit_v1_types_pb.GenesisAccountPermissions; + reader.readMessage(value,cosmos_circuit_v1_types_pb.GenesisAccountPermissions.deserializeBinaryFromReader); + msg.addAccounts(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.AccountsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.AccountsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.AccountsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.AccountsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_circuit_v1_types_pb.GenesisAccountPermissions.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated GenesisAccountPermissions accounts = 1; + * @return {!Array} + */ +proto.cosmos.circuit.v1.AccountsResponse.prototype.getAccountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_circuit_v1_types_pb.GenesisAccountPermissions, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.circuit.v1.AccountsResponse} returns this +*/ +proto.cosmos.circuit.v1.AccountsResponse.prototype.setAccountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.circuit.v1.GenesisAccountPermissions=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.circuit.v1.GenesisAccountPermissions} + */ +proto.cosmos.circuit.v1.AccountsResponse.prototype.addAccounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.circuit.v1.GenesisAccountPermissions, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.circuit.v1.AccountsResponse} returns this + */ +proto.cosmos.circuit.v1.AccountsResponse.prototype.clearAccountsList = function() { + return this.setAccountsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.circuit.v1.AccountsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.circuit.v1.AccountsResponse} returns this +*/ +proto.cosmos.circuit.v1.AccountsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.circuit.v1.AccountsResponse} returns this + */ +proto.cosmos.circuit.v1.AccountsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.circuit.v1.AccountsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.QueryDisabledListRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.QueryDisabledListRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.QueryDisabledListRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.QueryDisabledListRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.QueryDisabledListRequest} + */ +proto.cosmos.circuit.v1.QueryDisabledListRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.QueryDisabledListRequest; + return proto.cosmos.circuit.v1.QueryDisabledListRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.QueryDisabledListRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.QueryDisabledListRequest} + */ +proto.cosmos.circuit.v1.QueryDisabledListRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.QueryDisabledListRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.QueryDisabledListRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.QueryDisabledListRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.QueryDisabledListRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.circuit.v1.DisabledListResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.DisabledListResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.DisabledListResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.DisabledListResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.DisabledListResponse.toObject = function(includeInstance, msg) { + var f, obj = { + disabledListList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.DisabledListResponse} + */ +proto.cosmos.circuit.v1.DisabledListResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.DisabledListResponse; + return proto.cosmos.circuit.v1.DisabledListResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.DisabledListResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.DisabledListResponse} + */ +proto.cosmos.circuit.v1.DisabledListResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addDisabledList(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.DisabledListResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.DisabledListResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.DisabledListResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.DisabledListResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDisabledListList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string disabled_list = 1; + * @return {!Array} + */ +proto.cosmos.circuit.v1.DisabledListResponse.prototype.getDisabledListList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.circuit.v1.DisabledListResponse} returns this + */ +proto.cosmos.circuit.v1.DisabledListResponse.prototype.setDisabledListList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.circuit.v1.DisabledListResponse} returns this + */ +proto.cosmos.circuit.v1.DisabledListResponse.prototype.addDisabledList = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.circuit.v1.DisabledListResponse} returns this + */ +proto.cosmos.circuit.v1.DisabledListResponse.prototype.clearDisabledListList = function() { + return this.setDisabledListList([]); +}; + + +goog.object.extend(exports, proto.cosmos.circuit.v1); diff --git a/codegen/cosmos/circuit/v1/query_pb_service.d.ts b/codegen/cosmos/circuit/v1/query_pb_service.d.ts new file mode 100644 index 0000000..a656632 --- /dev/null +++ b/codegen/cosmos/circuit/v1/query_pb_service.d.ts @@ -0,0 +1,101 @@ +// package: cosmos.circuit.v1 +// file: cosmos/circuit/v1/query.proto + +import * as cosmos_circuit_v1_query_pb from "../../../cosmos/circuit/v1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryAccount = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_circuit_v1_query_pb.QueryAccountRequest; + readonly responseType: typeof cosmos_circuit_v1_query_pb.AccountResponse; +}; + +type QueryAccounts = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_circuit_v1_query_pb.QueryAccountsRequest; + readonly responseType: typeof cosmos_circuit_v1_query_pb.AccountsResponse; +}; + +type QueryDisabledList = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_circuit_v1_query_pb.QueryDisabledListRequest; + readonly responseType: typeof cosmos_circuit_v1_query_pb.DisabledListResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly Account: QueryAccount; + static readonly Accounts: QueryAccounts; + static readonly DisabledList: QueryDisabledList; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + account( + requestMessage: cosmos_circuit_v1_query_pb.QueryAccountRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_query_pb.AccountResponse|null) => void + ): UnaryResponse; + account( + requestMessage: cosmos_circuit_v1_query_pb.QueryAccountRequest, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_query_pb.AccountResponse|null) => void + ): UnaryResponse; + accounts( + requestMessage: cosmos_circuit_v1_query_pb.QueryAccountsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_query_pb.AccountsResponse|null) => void + ): UnaryResponse; + accounts( + requestMessage: cosmos_circuit_v1_query_pb.QueryAccountsRequest, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_query_pb.AccountsResponse|null) => void + ): UnaryResponse; + disabledList( + requestMessage: cosmos_circuit_v1_query_pb.QueryDisabledListRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_query_pb.DisabledListResponse|null) => void + ): UnaryResponse; + disabledList( + requestMessage: cosmos_circuit_v1_query_pb.QueryDisabledListRequest, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_query_pb.DisabledListResponse|null) => void + ): UnaryResponse; +} + diff --git a/proto/ibc/applications/transfer/v1/query_pb_service.js b/codegen/cosmos/circuit/v1/query_pb_service.js similarity index 66% rename from proto/ibc/applications/transfer/v1/query_pb_service.js rename to codegen/cosmos/circuit/v1/query_pb_service.js index 4a39d95..f6ee55c 100644 --- a/proto/ibc/applications/transfer/v1/query_pb_service.js +++ b/codegen/cosmos/circuit/v1/query_pb_service.js @@ -1,40 +1,40 @@ -// package: ibc.applications.transfer.v1 -// file: ibc/applications/transfer/v1/query.proto +// package: cosmos.circuit.v1 +// file: cosmos/circuit/v1/query.proto -var ibc_applications_transfer_v1_query_pb = require("../../../../ibc/applications/transfer/v1/query_pb"); +var cosmos_circuit_v1_query_pb = require("../../../cosmos/circuit/v1/query_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; var Query = (function () { function Query() {} - Query.serviceName = "ibc.applications.transfer.v1.Query"; + Query.serviceName = "cosmos.circuit.v1.Query"; return Query; }()); -Query.DenomTrace = { - methodName: "DenomTrace", +Query.Account = { + methodName: "Account", service: Query, requestStream: false, responseStream: false, - requestType: ibc_applications_transfer_v1_query_pb.QueryDenomTraceRequest, - responseType: ibc_applications_transfer_v1_query_pb.QueryDenomTraceResponse + requestType: cosmos_circuit_v1_query_pb.QueryAccountRequest, + responseType: cosmos_circuit_v1_query_pb.AccountResponse }; -Query.DenomTraces = { - methodName: "DenomTraces", +Query.Accounts = { + methodName: "Accounts", service: Query, requestStream: false, responseStream: false, - requestType: ibc_applications_transfer_v1_query_pb.QueryDenomTracesRequest, - responseType: ibc_applications_transfer_v1_query_pb.QueryDenomTracesResponse + requestType: cosmos_circuit_v1_query_pb.QueryAccountsRequest, + responseType: cosmos_circuit_v1_query_pb.AccountsResponse }; -Query.Params = { - methodName: "Params", +Query.DisabledList = { + methodName: "DisabledList", service: Query, requestStream: false, responseStream: false, - requestType: ibc_applications_transfer_v1_query_pb.QueryParamsRequest, - responseType: ibc_applications_transfer_v1_query_pb.QueryParamsResponse + requestType: cosmos_circuit_v1_query_pb.QueryDisabledListRequest, + responseType: cosmos_circuit_v1_query_pb.DisabledListResponse }; exports.Query = Query; @@ -44,11 +44,11 @@ function QueryClient(serviceHost, options) { this.options = options || {}; } -QueryClient.prototype.denomTrace = function denomTrace(requestMessage, metadata, callback) { +QueryClient.prototype.account = function account(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.DenomTrace, { + var client = grpc.unary(Query.Account, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -75,11 +75,11 @@ QueryClient.prototype.denomTrace = function denomTrace(requestMessage, metadata, }; }; -QueryClient.prototype.denomTraces = function denomTraces(requestMessage, metadata, callback) { +QueryClient.prototype.accounts = function accounts(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.DenomTraces, { + var client = grpc.unary(Query.Accounts, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -106,11 +106,11 @@ QueryClient.prototype.denomTraces = function denomTraces(requestMessage, metadat }; }; -QueryClient.prototype.params = function params(requestMessage, metadata, callback) { +QueryClient.prototype.disabledList = function disabledList(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Params, { + var client = grpc.unary(Query.DisabledList, { request: requestMessage, host: this.serviceHost, metadata: metadata, diff --git a/codegen/cosmos/circuit/v1/tx.ts b/codegen/cosmos/circuit/v1/tx.ts new file mode 100644 index 0000000..ed1ca59 --- /dev/null +++ b/codegen/cosmos/circuit/v1/tx.ts @@ -0,0 +1,581 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/circuit/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../msg/v1/msg"; +import * as dependency_2 from "./types"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.circuit.v1 { + export class MsgAuthorizeCircuitBreaker extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: string; + permissions?: dependency_2.cosmos.circuit.v1.Permissions; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("permissions" in data && data.permissions != undefined) { + this.permissions = data.permissions; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + get permissions() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.circuit.v1.Permissions, 3) as dependency_2.cosmos.circuit.v1.Permissions; + } + set permissions(value: dependency_2.cosmos.circuit.v1.Permissions) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_permissions() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + granter?: string; + grantee?: string; + permissions?: ReturnType; + }): MsgAuthorizeCircuitBreaker { + const message = new MsgAuthorizeCircuitBreaker({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.permissions != null) { + message.permissions = dependency_2.cosmos.circuit.v1.Permissions.fromObject(data.permissions); + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + permissions?: ReturnType; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + if (this.permissions != null) { + data.permissions = this.permissions.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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (this.has_permissions) + writer.writeMessage(3, this.permissions, () => this.permissions.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgAuthorizeCircuitBreaker { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgAuthorizeCircuitBreaker(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + case 3: + reader.readMessage(message.permissions, () => message.permissions = dependency_2.cosmos.circuit.v1.Permissions.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgAuthorizeCircuitBreaker { + return MsgAuthorizeCircuitBreaker.deserialize(bytes); + } + } + export class MsgAuthorizeCircuitBreakerResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + success?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + } + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + success?: boolean; + }): MsgAuthorizeCircuitBreakerResponse { + const message = new MsgAuthorizeCircuitBreakerResponse({}); + if (data.success != null) { + message.success = data.success; + } + return message; + } + toObject() { + const data: { + success?: boolean; + } = {}; + if (this.success != null) { + data.success = this.success; + } + 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.success != false) + writer.writeBool(1, this.success); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgAuthorizeCircuitBreakerResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgAuthorizeCircuitBreakerResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.success = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgAuthorizeCircuitBreakerResponse { + return MsgAuthorizeCircuitBreakerResponse.deserialize(bytes); + } + } + export class MsgTripCircuitBreaker extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + msg_type_urls?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("msg_type_urls" in data && data.msg_type_urls != undefined) { + this.msg_type_urls = data.msg_type_urls; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get msg_type_urls() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set msg_type_urls(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + authority?: string; + msg_type_urls?: string[]; + }): MsgTripCircuitBreaker { + const message = new MsgTripCircuitBreaker({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.msg_type_urls != null) { + message.msg_type_urls = data.msg_type_urls; + } + return message; + } + toObject() { + const data: { + authority?: string; + msg_type_urls?: string[]; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + if (this.msg_type_urls != null) { + data.msg_type_urls = this.msg_type_urls; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.msg_type_urls.length) + writer.writeRepeatedString(2, this.msg_type_urls); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTripCircuitBreaker { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTripCircuitBreaker(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTripCircuitBreaker { + return MsgTripCircuitBreaker.deserialize(bytes); + } + } + export class MsgTripCircuitBreakerResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + success?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + } + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + success?: boolean; + }): MsgTripCircuitBreakerResponse { + const message = new MsgTripCircuitBreakerResponse({}); + if (data.success != null) { + message.success = data.success; + } + return message; + } + toObject() { + const data: { + success?: boolean; + } = {}; + if (this.success != null) { + data.success = this.success; + } + 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.success != false) + writer.writeBool(1, this.success); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTripCircuitBreakerResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTripCircuitBreakerResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.success = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTripCircuitBreakerResponse { + return MsgTripCircuitBreakerResponse.deserialize(bytes); + } + } + export class MsgResetCircuitBreaker extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + msg_type_urls?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("msg_type_urls" in data && data.msg_type_urls != undefined) { + this.msg_type_urls = data.msg_type_urls; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get msg_type_urls() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set msg_type_urls(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + authority?: string; + msg_type_urls?: string[]; + }): MsgResetCircuitBreaker { + const message = new MsgResetCircuitBreaker({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.msg_type_urls != null) { + message.msg_type_urls = data.msg_type_urls; + } + return message; + } + toObject() { + const data: { + authority?: string; + msg_type_urls?: string[]; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + if (this.msg_type_urls != null) { + data.msg_type_urls = this.msg_type_urls; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.msg_type_urls.length) + writer.writeRepeatedString(3, this.msg_type_urls); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgResetCircuitBreaker { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgResetCircuitBreaker(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgResetCircuitBreaker { + return MsgResetCircuitBreaker.deserialize(bytes); + } + } + export class MsgResetCircuitBreakerResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + success?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + } + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + success?: boolean; + }): MsgResetCircuitBreakerResponse { + const message = new MsgResetCircuitBreakerResponse({}); + if (data.success != null) { + message.success = data.success; + } + return message; + } + toObject() { + const data: { + success?: boolean; + } = {}; + if (this.success != null) { + data.success = this.success; + } + 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.success != false) + writer.writeBool(1, this.success); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgResetCircuitBreakerResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgResetCircuitBreakerResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.success = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgResetCircuitBreakerResponse { + return MsgResetCircuitBreakerResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + AuthorizeCircuitBreaker: { + path: "/cosmos.circuit.v1.Msg/AuthorizeCircuitBreaker", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgAuthorizeCircuitBreaker) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgAuthorizeCircuitBreaker.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgAuthorizeCircuitBreakerResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgAuthorizeCircuitBreakerResponse.deserialize(new Uint8Array(bytes)) + }, + TripCircuitBreaker: { + path: "/cosmos.circuit.v1.Msg/TripCircuitBreaker", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgTripCircuitBreaker) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgTripCircuitBreaker.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgTripCircuitBreakerResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgTripCircuitBreakerResponse.deserialize(new Uint8Array(bytes)) + }, + ResetCircuitBreaker: { + path: "/cosmos.circuit.v1.Msg/ResetCircuitBreaker", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgResetCircuitBreaker) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgResetCircuitBreaker.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgResetCircuitBreakerResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgResetCircuitBreakerResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract AuthorizeCircuitBreaker(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TripCircuitBreaker(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ResetCircuitBreaker(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + AuthorizeCircuitBreaker: GrpcUnaryServiceInterface = (message: MsgAuthorizeCircuitBreaker, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AuthorizeCircuitBreaker(message, metadata, options, callback); + }; + TripCircuitBreaker: GrpcUnaryServiceInterface = (message: MsgTripCircuitBreaker, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TripCircuitBreaker(message, metadata, options, callback); + }; + ResetCircuitBreaker: GrpcUnaryServiceInterface = (message: MsgResetCircuitBreaker, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ResetCircuitBreaker(message, metadata, options, callback); + }; + } +} diff --git a/codegen/cosmos/circuit/v1/tx_pb.d.ts b/codegen/cosmos/circuit/v1/tx_pb.d.ts new file mode 100644 index 0000000..ceb3c7f --- /dev/null +++ b/codegen/cosmos/circuit/v1/tx_pb.d.ts @@ -0,0 +1,149 @@ +// package: cosmos.circuit.v1 +// file: cosmos/circuit/v1/tx.proto + +import * as jspb from "google-protobuf"; +import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; +import * as cosmos_circuit_v1_types_pb from "../../../cosmos/circuit/v1/types_pb"; + +export class MsgAuthorizeCircuitBreaker extends jspb.Message { + getGranter(): string; + setGranter(value: string): void; + + getGrantee(): string; + setGrantee(value: string): void; + + hasPermissions(): boolean; + clearPermissions(): void; + getPermissions(): cosmos_circuit_v1_types_pb.Permissions | undefined; + setPermissions(value?: cosmos_circuit_v1_types_pb.Permissions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgAuthorizeCircuitBreaker.AsObject; + static toObject(includeInstance: boolean, msg: MsgAuthorizeCircuitBreaker): MsgAuthorizeCircuitBreaker.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgAuthorizeCircuitBreaker, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgAuthorizeCircuitBreaker; + static deserializeBinaryFromReader(message: MsgAuthorizeCircuitBreaker, reader: jspb.BinaryReader): MsgAuthorizeCircuitBreaker; +} + +export namespace MsgAuthorizeCircuitBreaker { + export type AsObject = { + granter: string, + grantee: string, + permissions?: cosmos_circuit_v1_types_pb.Permissions.AsObject, + } +} + +export class MsgAuthorizeCircuitBreakerResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgAuthorizeCircuitBreakerResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgAuthorizeCircuitBreakerResponse): MsgAuthorizeCircuitBreakerResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgAuthorizeCircuitBreakerResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgAuthorizeCircuitBreakerResponse; + static deserializeBinaryFromReader(message: MsgAuthorizeCircuitBreakerResponse, reader: jspb.BinaryReader): MsgAuthorizeCircuitBreakerResponse; +} + +export namespace MsgAuthorizeCircuitBreakerResponse { + export type AsObject = { + success: boolean, + } +} + +export class MsgTripCircuitBreaker extends jspb.Message { + getAuthority(): string; + setAuthority(value: string): void; + + clearMsgTypeUrlsList(): void; + getMsgTypeUrlsList(): Array; + setMsgTypeUrlsList(value: Array): void; + addMsgTypeUrls(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTripCircuitBreaker.AsObject; + static toObject(includeInstance: boolean, msg: MsgTripCircuitBreaker): MsgTripCircuitBreaker.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTripCircuitBreaker, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTripCircuitBreaker; + static deserializeBinaryFromReader(message: MsgTripCircuitBreaker, reader: jspb.BinaryReader): MsgTripCircuitBreaker; +} + +export namespace MsgTripCircuitBreaker { + export type AsObject = { + authority: string, + msgTypeUrlsList: Array, + } +} + +export class MsgTripCircuitBreakerResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTripCircuitBreakerResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgTripCircuitBreakerResponse): MsgTripCircuitBreakerResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTripCircuitBreakerResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTripCircuitBreakerResponse; + static deserializeBinaryFromReader(message: MsgTripCircuitBreakerResponse, reader: jspb.BinaryReader): MsgTripCircuitBreakerResponse; +} + +export namespace MsgTripCircuitBreakerResponse { + export type AsObject = { + success: boolean, + } +} + +export class MsgResetCircuitBreaker extends jspb.Message { + getAuthority(): string; + setAuthority(value: string): void; + + clearMsgTypeUrlsList(): void; + getMsgTypeUrlsList(): Array; + setMsgTypeUrlsList(value: Array): void; + addMsgTypeUrls(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgResetCircuitBreaker.AsObject; + static toObject(includeInstance: boolean, msg: MsgResetCircuitBreaker): MsgResetCircuitBreaker.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgResetCircuitBreaker, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgResetCircuitBreaker; + static deserializeBinaryFromReader(message: MsgResetCircuitBreaker, reader: jspb.BinaryReader): MsgResetCircuitBreaker; +} + +export namespace MsgResetCircuitBreaker { + export type AsObject = { + authority: string, + msgTypeUrlsList: Array, + } +} + +export class MsgResetCircuitBreakerResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgResetCircuitBreakerResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgResetCircuitBreakerResponse): MsgResetCircuitBreakerResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgResetCircuitBreakerResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgResetCircuitBreakerResponse; + static deserializeBinaryFromReader(message: MsgResetCircuitBreakerResponse, reader: jspb.BinaryReader): MsgResetCircuitBreakerResponse; +} + +export namespace MsgResetCircuitBreakerResponse { + export type AsObject = { + success: boolean, + } +} + diff --git a/codegen/cosmos/circuit/v1/tx_pb.js b/codegen/cosmos/circuit/v1/tx_pb.js new file mode 100644 index 0000000..c69270e --- /dev/null +++ b/codegen/cosmos/circuit/v1/tx_pb.js @@ -0,0 +1,1127 @@ +// source: cosmos/circuit/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var cosmos_circuit_v1_types_pb = require('../../../cosmos/circuit/v1/types_pb.js'); +goog.object.extend(proto, cosmos_circuit_v1_types_pb); +goog.exportSymbol('proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.MsgResetCircuitBreaker', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.MsgTripCircuitBreaker', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.displayName = 'proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.displayName = 'proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.circuit.v1.MsgTripCircuitBreaker.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.circuit.v1.MsgTripCircuitBreaker, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.MsgTripCircuitBreaker.displayName = 'proto.cosmos.circuit.v1.MsgTripCircuitBreaker'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.displayName = 'proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.circuit.v1.MsgResetCircuitBreaker.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.circuit.v1.MsgResetCircuitBreaker, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.MsgResetCircuitBreaker.displayName = 'proto.cosmos.circuit.v1.MsgResetCircuitBreaker'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.displayName = 'proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.toObject = function(includeInstance, msg) { + var f, obj = { + granter: jspb.Message.getFieldWithDefault(msg, 1, ""), + grantee: jspb.Message.getFieldWithDefault(msg, 2, ""), + permissions: (f = msg.getPermissions()) && cosmos_circuit_v1_types_pb.Permissions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker; + return proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setGranter(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setGrantee(value); + break; + case 3: + var value = new cosmos_circuit_v1_types_pb.Permissions; + reader.readMessage(value,cosmos_circuit_v1_types_pb.Permissions.deserializeBinaryFromReader); + msg.setPermissions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGranter(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getGrantee(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPermissions(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_circuit_v1_types_pb.Permissions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string granter = 1; + * @return {string} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string grantee = 2; + * @return {string} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.getGrantee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.setGrantee = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Permissions permissions = 3; + * @return {?proto.cosmos.circuit.v1.Permissions} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.getPermissions = function() { + return /** @type{?proto.cosmos.circuit.v1.Permissions} */ ( + jspb.Message.getWrapperField(this, cosmos_circuit_v1_types_pb.Permissions, 3)); +}; + + +/** + * @param {?proto.cosmos.circuit.v1.Permissions|undefined} value + * @return {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker} returns this +*/ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.setPermissions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.clearPermissions = function() { + return this.setPermissions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreaker.prototype.hasPermissions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse; + return proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse} returns this + */ +proto.cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.MsgTripCircuitBreaker.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.MsgTripCircuitBreaker} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.toObject = function(includeInstance, msg) { + var f, obj = { + authority: jspb.Message.getFieldWithDefault(msg, 1, ""), + msgTypeUrlsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.MsgTripCircuitBreaker} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.MsgTripCircuitBreaker; + return proto.cosmos.circuit.v1.MsgTripCircuitBreaker.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.MsgTripCircuitBreaker} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.MsgTripCircuitBreaker} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addMsgTypeUrls(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.MsgTripCircuitBreaker.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.MsgTripCircuitBreaker} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMsgTypeUrlsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string authority = 1; + * @return {string} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.circuit.v1.MsgTripCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string msg_type_urls = 2; + * @return {!Array} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.prototype.getMsgTypeUrlsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.circuit.v1.MsgTripCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.prototype.setMsgTypeUrlsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.circuit.v1.MsgTripCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.prototype.addMsgTypeUrls = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.circuit.v1.MsgTripCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreaker.prototype.clearMsgTypeUrlsList = function() { + return this.setMsgTypeUrlsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse; + return proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse} returns this + */ +proto.cosmos.circuit.v1.MsgTripCircuitBreakerResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.MsgResetCircuitBreaker.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.MsgResetCircuitBreaker} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.toObject = function(includeInstance, msg) { + var f, obj = { + authority: jspb.Message.getFieldWithDefault(msg, 1, ""), + msgTypeUrlsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.MsgResetCircuitBreaker} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.MsgResetCircuitBreaker; + return proto.cosmos.circuit.v1.MsgResetCircuitBreaker.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.MsgResetCircuitBreaker} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.MsgResetCircuitBreaker} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addMsgTypeUrls(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.MsgResetCircuitBreaker.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.MsgResetCircuitBreaker} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMsgTypeUrlsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional string authority = 1; + * @return {string} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.circuit.v1.MsgResetCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string msg_type_urls = 3; + * @return {!Array} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.prototype.getMsgTypeUrlsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.circuit.v1.MsgResetCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.prototype.setMsgTypeUrlsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.circuit.v1.MsgResetCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.prototype.addMsgTypeUrls = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.circuit.v1.MsgResetCircuitBreaker} returns this + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreaker.prototype.clearMsgTypeUrlsList = function() { + return this.setMsgTypeUrlsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse; + return proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse} returns this + */ +proto.cosmos.circuit.v1.MsgResetCircuitBreakerResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.circuit.v1); diff --git a/codegen/cosmos/circuit/v1/tx_pb_service.d.ts b/codegen/cosmos/circuit/v1/tx_pb_service.d.ts new file mode 100644 index 0000000..ae19496 --- /dev/null +++ b/codegen/cosmos/circuit/v1/tx_pb_service.d.ts @@ -0,0 +1,101 @@ +// package: cosmos.circuit.v1 +// file: cosmos/circuit/v1/tx.proto + +import * as cosmos_circuit_v1_tx_pb from "../../../cosmos/circuit/v1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgAuthorizeCircuitBreaker = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_circuit_v1_tx_pb.MsgAuthorizeCircuitBreaker; + readonly responseType: typeof cosmos_circuit_v1_tx_pb.MsgAuthorizeCircuitBreakerResponse; +}; + +type MsgTripCircuitBreaker = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_circuit_v1_tx_pb.MsgTripCircuitBreaker; + readonly responseType: typeof cosmos_circuit_v1_tx_pb.MsgTripCircuitBreakerResponse; +}; + +type MsgResetCircuitBreaker = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_circuit_v1_tx_pb.MsgResetCircuitBreaker; + readonly responseType: typeof cosmos_circuit_v1_tx_pb.MsgResetCircuitBreakerResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly AuthorizeCircuitBreaker: MsgAuthorizeCircuitBreaker; + static readonly TripCircuitBreaker: MsgTripCircuitBreaker; + static readonly ResetCircuitBreaker: MsgResetCircuitBreaker; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + authorizeCircuitBreaker( + requestMessage: cosmos_circuit_v1_tx_pb.MsgAuthorizeCircuitBreaker, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_tx_pb.MsgAuthorizeCircuitBreakerResponse|null) => void + ): UnaryResponse; + authorizeCircuitBreaker( + requestMessage: cosmos_circuit_v1_tx_pb.MsgAuthorizeCircuitBreaker, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_tx_pb.MsgAuthorizeCircuitBreakerResponse|null) => void + ): UnaryResponse; + tripCircuitBreaker( + requestMessage: cosmos_circuit_v1_tx_pb.MsgTripCircuitBreaker, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_tx_pb.MsgTripCircuitBreakerResponse|null) => void + ): UnaryResponse; + tripCircuitBreaker( + requestMessage: cosmos_circuit_v1_tx_pb.MsgTripCircuitBreaker, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_tx_pb.MsgTripCircuitBreakerResponse|null) => void + ): UnaryResponse; + resetCircuitBreaker( + requestMessage: cosmos_circuit_v1_tx_pb.MsgResetCircuitBreaker, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_tx_pb.MsgResetCircuitBreakerResponse|null) => void + ): UnaryResponse; + resetCircuitBreaker( + requestMessage: cosmos_circuit_v1_tx_pb.MsgResetCircuitBreaker, + callback: (error: ServiceError|null, responseMessage: cosmos_circuit_v1_tx_pb.MsgResetCircuitBreakerResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/cosmos/circuit/v1/tx_pb_service.js b/codegen/cosmos/circuit/v1/tx_pb_service.js new file mode 100644 index 0000000..f4e70b8 --- /dev/null +++ b/codegen/cosmos/circuit/v1/tx_pb_service.js @@ -0,0 +1,141 @@ +// package: cosmos.circuit.v1 +// file: cosmos/circuit/v1/tx.proto + +var cosmos_circuit_v1_tx_pb = require("../../../cosmos/circuit/v1/tx_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Msg = (function () { + function Msg() {} + Msg.serviceName = "cosmos.circuit.v1.Msg"; + return Msg; +}()); + +Msg.AuthorizeCircuitBreaker = { + methodName: "AuthorizeCircuitBreaker", + service: Msg, + requestStream: false, + responseStream: false, + requestType: cosmos_circuit_v1_tx_pb.MsgAuthorizeCircuitBreaker, + responseType: cosmos_circuit_v1_tx_pb.MsgAuthorizeCircuitBreakerResponse +}; + +Msg.TripCircuitBreaker = { + methodName: "TripCircuitBreaker", + service: Msg, + requestStream: false, + responseStream: false, + requestType: cosmos_circuit_v1_tx_pb.MsgTripCircuitBreaker, + responseType: cosmos_circuit_v1_tx_pb.MsgTripCircuitBreakerResponse +}; + +Msg.ResetCircuitBreaker = { + methodName: "ResetCircuitBreaker", + service: Msg, + requestStream: false, + responseStream: false, + requestType: cosmos_circuit_v1_tx_pb.MsgResetCircuitBreaker, + responseType: cosmos_circuit_v1_tx_pb.MsgResetCircuitBreakerResponse +}; + +exports.Msg = Msg; + +function MsgClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MsgClient.prototype.authorizeCircuitBreaker = function authorizeCircuitBreaker(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.AuthorizeCircuitBreaker, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.tripCircuitBreaker = function tripCircuitBreaker(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.TripCircuitBreaker, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.resetCircuitBreaker = function resetCircuitBreaker(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ResetCircuitBreaker, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MsgClient = MsgClient; + diff --git a/codegen/cosmos/circuit/v1/types.ts b/codegen/cosmos/circuit/v1/types.ts new file mode 100644 index 0000000..bf0bc74 --- /dev/null +++ b/codegen/cosmos/circuit/v1/types.ts @@ -0,0 +1,289 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/circuit/v1/types.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace cosmos.circuit.v1 { + export class Permissions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + level?: Permissions.Level; + limit_type_urls?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("level" in data && data.level != undefined) { + this.level = data.level; + } + if ("limit_type_urls" in data && data.limit_type_urls != undefined) { + this.limit_type_urls = data.limit_type_urls; + } + } + } + get level() { + return pb_1.Message.getFieldWithDefault(this, 1, Permissions.Level.LEVEL_NONE_UNSPECIFIED) as Permissions.Level; + } + set level(value: Permissions.Level) { + pb_1.Message.setField(this, 1, value); + } + get limit_type_urls() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set limit_type_urls(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + level?: Permissions.Level; + limit_type_urls?: string[]; + }): Permissions { + const message = new Permissions({}); + if (data.level != null) { + message.level = data.level; + } + if (data.limit_type_urls != null) { + message.limit_type_urls = data.limit_type_urls; + } + return message; + } + toObject() { + const data: { + level?: Permissions.Level; + limit_type_urls?: string[]; + } = {}; + if (this.level != null) { + data.level = this.level; + } + if (this.limit_type_urls != null) { + data.limit_type_urls = this.limit_type_urls; + } + 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.level != Permissions.Level.LEVEL_NONE_UNSPECIFIED) + writer.writeEnum(1, this.level); + if (this.limit_type_urls.length) + writer.writeRepeatedString(2, this.limit_type_urls); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Permissions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Permissions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.level = reader.readEnum(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Permissions { + return Permissions.deserialize(bytes); + } + } + export namespace Permissions { + export enum Level { + LEVEL_NONE_UNSPECIFIED = 0, + LEVEL_SOME_MSGS = 1, + LEVEL_ALL_MSGS = 2, + LEVEL_SUPER_ADMIN = 3 + } + } + export class GenesisAccountPermissions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + permissions?: Permissions; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("permissions" in data && data.permissions != undefined) { + this.permissions = data.permissions; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get permissions() { + return pb_1.Message.getWrapperField(this, Permissions, 2) as Permissions; + } + set permissions(value: Permissions) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_permissions() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + address?: string; + permissions?: ReturnType; + }): GenesisAccountPermissions { + const message = new GenesisAccountPermissions({}); + if (data.address != null) { + message.address = data.address; + } + if (data.permissions != null) { + message.permissions = Permissions.fromObject(data.permissions); + } + return message; + } + toObject() { + const data: { + address?: string; + permissions?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.permissions != null) { + data.permissions = this.permissions.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.address.length) + writer.writeString(1, this.address); + if (this.has_permissions) + writer.writeMessage(2, this.permissions, () => this.permissions.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisAccountPermissions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisAccountPermissions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.permissions, () => message.permissions = Permissions.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisAccountPermissions { + return GenesisAccountPermissions.deserialize(bytes); + } + } + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + account_permissions?: GenesisAccountPermissions[]; + disabled_type_urls?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("account_permissions" in data && data.account_permissions != undefined) { + this.account_permissions = data.account_permissions; + } + if ("disabled_type_urls" in data && data.disabled_type_urls != undefined) { + this.disabled_type_urls = data.disabled_type_urls; + } + } + } + get account_permissions() { + return pb_1.Message.getRepeatedWrapperField(this, GenesisAccountPermissions, 1) as GenesisAccountPermissions[]; + } + set account_permissions(value: GenesisAccountPermissions[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get disabled_type_urls() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set disabled_type_urls(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + account_permissions?: ReturnType[]; + disabled_type_urls?: string[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.account_permissions != null) { + message.account_permissions = data.account_permissions.map(item => GenesisAccountPermissions.fromObject(item)); + } + if (data.disabled_type_urls != null) { + message.disabled_type_urls = data.disabled_type_urls; + } + return message; + } + toObject() { + const data: { + account_permissions?: ReturnType[]; + disabled_type_urls?: string[]; + } = {}; + if (this.account_permissions != null) { + data.account_permissions = this.account_permissions.map((item: GenesisAccountPermissions) => item.toObject()); + } + if (this.disabled_type_urls != null) { + data.disabled_type_urls = this.disabled_type_urls; + } + 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.account_permissions.length) + writer.writeRepeatedMessage(1, this.account_permissions, (item: GenesisAccountPermissions) => item.serialize(writer)); + if (this.disabled_type_urls.length) + writer.writeRepeatedString(2, this.disabled_type_urls); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.account_permissions, () => pb_1.Message.addToRepeatedWrapperField(message, 1, GenesisAccountPermissions.deserialize(reader), GenesisAccountPermissions)); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/codegen/cosmos/circuit/v1/types_pb.d.ts b/codegen/cosmos/circuit/v1/types_pb.d.ts new file mode 100644 index 0000000..9de1533 --- /dev/null +++ b/codegen/cosmos/circuit/v1/types_pb.d.ts @@ -0,0 +1,94 @@ +// package: cosmos.circuit.v1 +// file: cosmos/circuit/v1/types.proto + +import * as jspb from "google-protobuf"; + +export class Permissions extends jspb.Message { + getLevel(): Permissions.LevelMap[keyof Permissions.LevelMap]; + setLevel(value: Permissions.LevelMap[keyof Permissions.LevelMap]): void; + + clearLimitTypeUrlsList(): void; + getLimitTypeUrlsList(): Array; + setLimitTypeUrlsList(value: Array): void; + addLimitTypeUrls(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Permissions.AsObject; + static toObject(includeInstance: boolean, msg: Permissions): Permissions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Permissions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Permissions; + static deserializeBinaryFromReader(message: Permissions, reader: jspb.BinaryReader): Permissions; +} + +export namespace Permissions { + export type AsObject = { + level: Permissions.LevelMap[keyof Permissions.LevelMap], + limitTypeUrlsList: Array, + } + + export interface LevelMap { + LEVEL_NONE_UNSPECIFIED: 0; + LEVEL_SOME_MSGS: 1; + LEVEL_ALL_MSGS: 2; + LEVEL_SUPER_ADMIN: 3; + } + + export const Level: LevelMap; +} + +export class GenesisAccountPermissions extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + hasPermissions(): boolean; + clearPermissions(): void; + getPermissions(): Permissions | undefined; + setPermissions(value?: Permissions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisAccountPermissions.AsObject; + static toObject(includeInstance: boolean, msg: GenesisAccountPermissions): GenesisAccountPermissions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisAccountPermissions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisAccountPermissions; + static deserializeBinaryFromReader(message: GenesisAccountPermissions, reader: jspb.BinaryReader): GenesisAccountPermissions; +} + +export namespace GenesisAccountPermissions { + export type AsObject = { + address: string, + permissions?: Permissions.AsObject, + } +} + +export class GenesisState extends jspb.Message { + clearAccountPermissionsList(): void; + getAccountPermissionsList(): Array; + setAccountPermissionsList(value: Array): void; + addAccountPermissions(value?: GenesisAccountPermissions, index?: number): GenesisAccountPermissions; + + clearDisabledTypeUrlsList(): void; + getDisabledTypeUrlsList(): Array; + setDisabledTypeUrlsList(value: Array): void; + addDisabledTypeUrls(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + accountPermissionsList: Array, + disabledTypeUrlsList: Array, + } +} + diff --git a/codegen/cosmos/circuit/v1/types_pb.js b/codegen/cosmos/circuit/v1/types_pb.js new file mode 100644 index 0000000..3476de0 --- /dev/null +++ b/codegen/cosmos/circuit/v1/types_pb.js @@ -0,0 +1,671 @@ +// source: cosmos/circuit/v1/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.cosmos.circuit.v1.GenesisAccountPermissions', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.GenesisState', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.Permissions', null, global); +goog.exportSymbol('proto.cosmos.circuit.v1.Permissions.Level', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.Permissions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.circuit.v1.Permissions.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.circuit.v1.Permissions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.Permissions.displayName = 'proto.cosmos.circuit.v1.Permissions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.circuit.v1.GenesisAccountPermissions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.GenesisAccountPermissions.displayName = 'proto.cosmos.circuit.v1.GenesisAccountPermissions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.circuit.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.circuit.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.circuit.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.circuit.v1.GenesisState.displayName = 'proto.cosmos.circuit.v1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.circuit.v1.Permissions.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.Permissions.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.Permissions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.Permissions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.Permissions.toObject = function(includeInstance, msg) { + var f, obj = { + level: jspb.Message.getFieldWithDefault(msg, 1, 0), + limitTypeUrlsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.Permissions} + */ +proto.cosmos.circuit.v1.Permissions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.Permissions; + return proto.cosmos.circuit.v1.Permissions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.Permissions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.Permissions} + */ +proto.cosmos.circuit.v1.Permissions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cosmos.circuit.v1.Permissions.Level} */ (reader.readEnum()); + msg.setLevel(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addLimitTypeUrls(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.Permissions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.Permissions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.Permissions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.Permissions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLevel(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getLimitTypeUrlsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cosmos.circuit.v1.Permissions.Level = { + LEVEL_NONE_UNSPECIFIED: 0, + LEVEL_SOME_MSGS: 1, + LEVEL_ALL_MSGS: 2, + LEVEL_SUPER_ADMIN: 3 +}; + +/** + * optional Level level = 1; + * @return {!proto.cosmos.circuit.v1.Permissions.Level} + */ +proto.cosmos.circuit.v1.Permissions.prototype.getLevel = function() { + return /** @type {!proto.cosmos.circuit.v1.Permissions.Level} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cosmos.circuit.v1.Permissions.Level} value + * @return {!proto.cosmos.circuit.v1.Permissions} returns this + */ +proto.cosmos.circuit.v1.Permissions.prototype.setLevel = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * repeated string limit_type_urls = 2; + * @return {!Array} + */ +proto.cosmos.circuit.v1.Permissions.prototype.getLimitTypeUrlsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.circuit.v1.Permissions} returns this + */ +proto.cosmos.circuit.v1.Permissions.prototype.setLimitTypeUrlsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.circuit.v1.Permissions} returns this + */ +proto.cosmos.circuit.v1.Permissions.prototype.addLimitTypeUrls = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.circuit.v1.Permissions} returns this + */ +proto.cosmos.circuit.v1.Permissions.prototype.clearLimitTypeUrlsList = function() { + return this.setLimitTypeUrlsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.GenesisAccountPermissions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.GenesisAccountPermissions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + permissions: (f = msg.getPermissions()) && proto.cosmos.circuit.v1.Permissions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.GenesisAccountPermissions} + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.GenesisAccountPermissions; + return proto.cosmos.circuit.v1.GenesisAccountPermissions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.GenesisAccountPermissions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.GenesisAccountPermissions} + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = new proto.cosmos.circuit.v1.Permissions; + reader.readMessage(value,proto.cosmos.circuit.v1.Permissions.deserializeBinaryFromReader); + msg.setPermissions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.GenesisAccountPermissions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.GenesisAccountPermissions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPermissions(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.circuit.v1.Permissions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.circuit.v1.GenesisAccountPermissions} returns this + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Permissions permissions = 2; + * @return {?proto.cosmos.circuit.v1.Permissions} + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.prototype.getPermissions = function() { + return /** @type{?proto.cosmos.circuit.v1.Permissions} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.circuit.v1.Permissions, 2)); +}; + + +/** + * @param {?proto.cosmos.circuit.v1.Permissions|undefined} value + * @return {!proto.cosmos.circuit.v1.GenesisAccountPermissions} returns this +*/ +proto.cosmos.circuit.v1.GenesisAccountPermissions.prototype.setPermissions = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.circuit.v1.GenesisAccountPermissions} returns this + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.prototype.clearPermissions = function() { + return this.setPermissions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.circuit.v1.GenesisAccountPermissions.prototype.hasPermissions = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.circuit.v1.GenesisState.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.circuit.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.circuit.v1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.circuit.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + accountPermissionsList: jspb.Message.toObjectList(msg.getAccountPermissionsList(), + proto.cosmos.circuit.v1.GenesisAccountPermissions.toObject, includeInstance), + disabledTypeUrlsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.circuit.v1.GenesisState} + */ +proto.cosmos.circuit.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.circuit.v1.GenesisState; + return proto.cosmos.circuit.v1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.circuit.v1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.circuit.v1.GenesisState} + */ +proto.cosmos.circuit.v1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.circuit.v1.GenesisAccountPermissions; + reader.readMessage(value,proto.cosmos.circuit.v1.GenesisAccountPermissions.deserializeBinaryFromReader); + msg.addAccountPermissions(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addDisabledTypeUrls(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.circuit.v1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.circuit.v1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.circuit.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.circuit.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccountPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.circuit.v1.GenesisAccountPermissions.serializeBinaryToWriter + ); + } + f = message.getDisabledTypeUrlsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * repeated GenesisAccountPermissions account_permissions = 1; + * @return {!Array} + */ +proto.cosmos.circuit.v1.GenesisState.prototype.getAccountPermissionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.circuit.v1.GenesisAccountPermissions, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.circuit.v1.GenesisState} returns this +*/ +proto.cosmos.circuit.v1.GenesisState.prototype.setAccountPermissionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.circuit.v1.GenesisAccountPermissions=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.circuit.v1.GenesisAccountPermissions} + */ +proto.cosmos.circuit.v1.GenesisState.prototype.addAccountPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.circuit.v1.GenesisAccountPermissions, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.circuit.v1.GenesisState} returns this + */ +proto.cosmos.circuit.v1.GenesisState.prototype.clearAccountPermissionsList = function() { + return this.setAccountPermissionsList([]); +}; + + +/** + * repeated string disabled_type_urls = 2; + * @return {!Array} + */ +proto.cosmos.circuit.v1.GenesisState.prototype.getDisabledTypeUrlsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.circuit.v1.GenesisState} returns this + */ +proto.cosmos.circuit.v1.GenesisState.prototype.setDisabledTypeUrlsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.circuit.v1.GenesisState} returns this + */ +proto.cosmos.circuit.v1.GenesisState.prototype.addDisabledTypeUrls = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.circuit.v1.GenesisState} returns this + */ +proto.cosmos.circuit.v1.GenesisState.prototype.clearDisabledTypeUrlsList = function() { + return this.setDisabledTypeUrlsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.circuit.v1); diff --git a/codegen/cosmos/circuit/v1/types_pb_service.d.ts b/codegen/cosmos/circuit/v1/types_pb_service.d.ts new file mode 100644 index 0000000..ac0a996 --- /dev/null +++ b/codegen/cosmos/circuit/v1/types_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: cosmos.circuit.v1 +// file: cosmos/circuit/v1/types.proto + diff --git a/codegen/cosmos/circuit/v1/types_pb_service.js b/codegen/cosmos/circuit/v1/types_pb_service.js new file mode 100644 index 0000000..ac0a996 --- /dev/null +++ b/codegen/cosmos/circuit/v1/types_pb_service.js @@ -0,0 +1,3 @@ +// package: cosmos.circuit.v1 +// file: cosmos/circuit/v1/types.proto + diff --git a/codegen/cosmos/consensus/module/v1/module.ts b/codegen/cosmos/consensus/module/v1/module.ts new file mode 100644 index 0000000..8bf3b5a --- /dev/null +++ b/codegen/cosmos/consensus/module/v1/module.ts @@ -0,0 +1,76 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/consensus/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.consensus.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: 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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + authority?: string; + }): Module { + const message = new Module({}); + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + authority?: string; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/consensus/module/v1/module_pb.d.ts b/codegen/cosmos/consensus/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/consensus/module/v1/module_pb.d.ts rename to codegen/cosmos/consensus/module/v1/module_pb.d.ts diff --git a/proto/cosmos/consensus/module/v1/module_pb.js b/codegen/cosmos/consensus/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/consensus/module/v1/module_pb.js rename to codegen/cosmos/consensus/module/v1/module_pb.js diff --git a/proto/cosmos/consensus/module/v1/module_pb_service.d.ts b/codegen/cosmos/consensus/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/consensus/module/v1/module_pb_service.d.ts rename to codegen/cosmos/consensus/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/consensus/module/v1/module_pb_service.js b/codegen/cosmos/consensus/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/consensus/module/v1/module_pb_service.js rename to codegen/cosmos/consensus/module/v1/module_pb_service.js diff --git a/codegen/cosmos/consensus/v1/query.ts b/codegen/cosmos/consensus/v1/query.ts new file mode 100644 index 0000000..13ddae0 --- /dev/null +++ b/codegen/cosmos/consensus/v1/query.ts @@ -0,0 +1,168 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/consensus/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/api/annotations"; +import * as dependency_2 from "./../../../tendermint/types/params"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.consensus.v1 { + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_2.tendermint.types.ConsensusParams; + }) { + 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_2.tendermint.types.ConsensusParams, 1) as dependency_2.tendermint.types.ConsensusParams; + } + set params(value: dependency_2.tendermint.types.ConsensusParams) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_2.tendermint.types.ConsensusParams.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_2.tendermint.types.ConsensusParams.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Params: { + path: "/cosmos.consensus.v1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/consensus/v1/query_pb.d.ts b/codegen/cosmos/consensus/v1/query_pb.d.ts similarity index 100% rename from proto/cosmos/consensus/v1/query_pb.d.ts rename to codegen/cosmos/consensus/v1/query_pb.d.ts diff --git a/proto/cosmos/consensus/v1/query_pb.js b/codegen/cosmos/consensus/v1/query_pb.js similarity index 100% rename from proto/cosmos/consensus/v1/query_pb.js rename to codegen/cosmos/consensus/v1/query_pb.js diff --git a/proto/cosmos/consensus/v1/query_pb_service.d.ts b/codegen/cosmos/consensus/v1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/consensus/v1/query_pb_service.d.ts rename to codegen/cosmos/consensus/v1/query_pb_service.d.ts diff --git a/proto/cosmos/consensus/v1/query_pb_service.js b/codegen/cosmos/consensus/v1/query_pb_service.js similarity index 100% rename from proto/cosmos/consensus/v1/query_pb_service.js rename to codegen/cosmos/consensus/v1/query_pb_service.js diff --git a/codegen/cosmos/consensus/v1/tx.ts b/codegen/cosmos/consensus/v1/tx.ts new file mode 100644 index 0000000..885a957 --- /dev/null +++ b/codegen/cosmos/consensus/v1/tx.ts @@ -0,0 +1,271 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/consensus/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../msg/v1/msg"; +import * as dependency_4 from "./../../../tendermint/types/params"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.consensus.v1 { + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + block?: dependency_4.tendermint.types.BlockParams; + evidence?: dependency_4.tendermint.types.EvidenceParams; + validator?: dependency_4.tendermint.types.ValidatorParams; + abci?: dependency_4.tendermint.types.ABCIParams; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("block" in data && data.block != undefined) { + this.block = data.block; + } + if ("evidence" in data && data.evidence != undefined) { + this.evidence = data.evidence; + } + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("abci" in data && data.abci != undefined) { + this.abci = data.abci; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get block() { + return pb_1.Message.getWrapperField(this, dependency_4.tendermint.types.BlockParams, 2) as dependency_4.tendermint.types.BlockParams; + } + set block(value: dependency_4.tendermint.types.BlockParams) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_block() { + return pb_1.Message.getField(this, 2) != null; + } + get evidence() { + return pb_1.Message.getWrapperField(this, dependency_4.tendermint.types.EvidenceParams, 3) as dependency_4.tendermint.types.EvidenceParams; + } + set evidence(value: dependency_4.tendermint.types.EvidenceParams) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_evidence() { + return pb_1.Message.getField(this, 3) != null; + } + get validator() { + return pb_1.Message.getWrapperField(this, dependency_4.tendermint.types.ValidatorParams, 4) as dependency_4.tendermint.types.ValidatorParams; + } + set validator(value: dependency_4.tendermint.types.ValidatorParams) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_validator() { + return pb_1.Message.getField(this, 4) != null; + } + get abci() { + return pb_1.Message.getWrapperField(this, dependency_4.tendermint.types.ABCIParams, 5) as dependency_4.tendermint.types.ABCIParams; + } + set abci(value: dependency_4.tendermint.types.ABCIParams) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_abci() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + authority?: string; + block?: ReturnType; + evidence?: ReturnType; + validator?: ReturnType; + abci?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.block != null) { + message.block = dependency_4.tendermint.types.BlockParams.fromObject(data.block); + } + if (data.evidence != null) { + message.evidence = dependency_4.tendermint.types.EvidenceParams.fromObject(data.evidence); + } + if (data.validator != null) { + message.validator = dependency_4.tendermint.types.ValidatorParams.fromObject(data.validator); + } + if (data.abci != null) { + message.abci = dependency_4.tendermint.types.ABCIParams.fromObject(data.abci); + } + return message; + } + toObject() { + const data: { + authority?: string; + block?: ReturnType; + evidence?: ReturnType; + validator?: ReturnType; + abci?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + if (this.block != null) { + data.block = this.block.toObject(); + } + if (this.evidence != null) { + data.evidence = this.evidence.toObject(); + } + if (this.validator != null) { + data.validator = this.validator.toObject(); + } + if (this.abci != null) { + data.abci = this.abci.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.authority.length) + writer.writeString(1, this.authority); + if (this.has_block) + writer.writeMessage(2, this.block, () => this.block.serialize(writer)); + if (this.has_evidence) + writer.writeMessage(3, this.evidence, () => this.evidence.serialize(writer)); + if (this.has_validator) + writer.writeMessage(4, this.validator, () => this.validator.serialize(writer)); + if (this.has_abci) + writer.writeMessage(5, this.abci, () => this.abci.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.block, () => message.block = dependency_4.tendermint.types.BlockParams.deserialize(reader)); + break; + case 3: + reader.readMessage(message.evidence, () => message.evidence = dependency_4.tendermint.types.EvidenceParams.deserialize(reader)); + break; + case 4: + reader.readMessage(message.validator, () => message.validator = dependency_4.tendermint.types.ValidatorParams.deserialize(reader)); + break; + case 5: + reader.readMessage(message.abci, () => message.abci = dependency_4.tendermint.types.ABCIParams.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + UpdateParams: { + path: "/cosmos.consensus.v1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/consensus/v1/tx_pb.d.ts b/codegen/cosmos/consensus/v1/tx_pb.d.ts similarity index 90% rename from proto/cosmos/consensus/v1/tx_pb.d.ts rename to codegen/cosmos/consensus/v1/tx_pb.d.ts index 34580f5..078abfc 100644 --- a/proto/cosmos/consensus/v1/tx_pb.d.ts +++ b/codegen/cosmos/consensus/v1/tx_pb.d.ts @@ -2,6 +2,7 @@ // file: cosmos/consensus/v1/tx.proto import * as jspb from "google-protobuf"; +import * as amino_amino_pb from "../../../amino/amino_pb"; import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; import * as tendermint_types_params_pb from "../../../tendermint/types/params_pb"; @@ -25,6 +26,11 @@ export class MsgUpdateParams extends jspb.Message { getValidator(): tendermint_types_params_pb.ValidatorParams | undefined; setValidator(value?: tendermint_types_params_pb.ValidatorParams): void; + hasAbci(): boolean; + clearAbci(): void; + getAbci(): tendermint_types_params_pb.ABCIParams | undefined; + setAbci(value?: tendermint_types_params_pb.ABCIParams): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; @@ -41,6 +47,7 @@ export namespace MsgUpdateParams { block?: tendermint_types_params_pb.BlockParams.AsObject, evidence?: tendermint_types_params_pb.EvidenceParams.AsObject, validator?: tendermint_types_params_pb.ValidatorParams.AsObject, + abci?: tendermint_types_params_pb.ABCIParams.AsObject, } } diff --git a/proto/cosmos/consensus/v1/tx_pb.js b/codegen/cosmos/consensus/v1/tx_pb.js similarity index 89% rename from proto/cosmos/consensus/v1/tx_pb.js rename to codegen/cosmos/consensus/v1/tx_pb.js index f33d94a..08a0c11 100644 --- a/proto/cosmos/consensus/v1/tx_pb.js +++ b/codegen/cosmos/consensus/v1/tx_pb.js @@ -15,6 +15,8 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var amino_amino_pb = require('../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); @@ -100,7 +102,8 @@ proto.cosmos.consensus.v1.MsgUpdateParams.toObject = function(includeInstance, m authority: jspb.Message.getFieldWithDefault(msg, 1, ""), block: (f = msg.getBlock()) && tendermint_types_params_pb.BlockParams.toObject(includeInstance, f), evidence: (f = msg.getEvidence()) && tendermint_types_params_pb.EvidenceParams.toObject(includeInstance, f), - validator: (f = msg.getValidator()) && tendermint_types_params_pb.ValidatorParams.toObject(includeInstance, f) + validator: (f = msg.getValidator()) && tendermint_types_params_pb.ValidatorParams.toObject(includeInstance, f), + abci: (f = msg.getAbci()) && tendermint_types_params_pb.ABCIParams.toObject(includeInstance, f) }; if (includeInstance) { @@ -156,6 +159,11 @@ proto.cosmos.consensus.v1.MsgUpdateParams.deserializeBinaryFromReader = function reader.readMessage(value,tendermint_types_params_pb.ValidatorParams.deserializeBinaryFromReader); msg.setValidator(value); break; + case 5: + var value = new tendermint_types_params_pb.ABCIParams; + reader.readMessage(value,tendermint_types_params_pb.ABCIParams.deserializeBinaryFromReader); + msg.setAbci(value); + break; default: reader.skipField(); break; @@ -216,6 +224,14 @@ proto.cosmos.consensus.v1.MsgUpdateParams.serializeBinaryToWriter = function(mes tendermint_types_params_pb.ValidatorParams.serializeBinaryToWriter ); } + f = message.getAbci(); + if (f != null) { + writer.writeMessage( + 5, + f, + tendermint_types_params_pb.ABCIParams.serializeBinaryToWriter + ); + } }; @@ -348,6 +364,43 @@ proto.cosmos.consensus.v1.MsgUpdateParams.prototype.hasValidator = function() { }; +/** + * optional tendermint.types.ABCIParams abci = 5; + * @return {?proto.tendermint.types.ABCIParams} + */ +proto.cosmos.consensus.v1.MsgUpdateParams.prototype.getAbci = function() { + return /** @type{?proto.tendermint.types.ABCIParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.ABCIParams, 5)); +}; + + +/** + * @param {?proto.tendermint.types.ABCIParams|undefined} value + * @return {!proto.cosmos.consensus.v1.MsgUpdateParams} returns this +*/ +proto.cosmos.consensus.v1.MsgUpdateParams.prototype.setAbci = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.consensus.v1.MsgUpdateParams} returns this + */ +proto.cosmos.consensus.v1.MsgUpdateParams.prototype.clearAbci = function() { + return this.setAbci(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.consensus.v1.MsgUpdateParams.prototype.hasAbci = function() { + return jspb.Message.getField(this, 5) != null; +}; + + diff --git a/proto/cosmos/consensus/v1/tx_pb_service.d.ts b/codegen/cosmos/consensus/v1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/consensus/v1/tx_pb_service.d.ts rename to codegen/cosmos/consensus/v1/tx_pb_service.d.ts diff --git a/proto/cosmos/consensus/v1/tx_pb_service.js b/codegen/cosmos/consensus/v1/tx_pb_service.js similarity index 100% rename from proto/cosmos/consensus/v1/tx_pb_service.js rename to codegen/cosmos/consensus/v1/tx_pb_service.js diff --git a/codegen/cosmos/crisis/module/v1/module.ts b/codegen/cosmos/crisis/module/v1/module.ts new file mode 100644 index 0000000..5f2cbd0 --- /dev/null +++ b/codegen/cosmos/crisis/module/v1/module.ts @@ -0,0 +1,99 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crisis/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.crisis.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fee_collector_name?: string; + authority?: 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 ("fee_collector_name" in data && data.fee_collector_name != undefined) { + this.fee_collector_name = data.fee_collector_name; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get fee_collector_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fee_collector_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + fee_collector_name?: string; + authority?: string; + }): Module { + const message = new Module({}); + if (data.fee_collector_name != null) { + message.fee_collector_name = data.fee_collector_name; + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + fee_collector_name?: string; + authority?: string; + } = {}; + if (this.fee_collector_name != null) { + data.fee_collector_name = this.fee_collector_name; + } + if (this.authority != null) { + data.authority = this.authority; + } + 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.fee_collector_name.length) + writer.writeString(1, this.fee_collector_name); + if (this.authority.length) + writer.writeString(2, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fee_collector_name = reader.readString(); + break; + case 2: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/crisis/module/v1/module_pb.d.ts b/codegen/cosmos/crisis/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/crisis/module/v1/module_pb.d.ts rename to codegen/cosmos/crisis/module/v1/module_pb.d.ts diff --git a/proto/cosmos/crisis/module/v1/module_pb.js b/codegen/cosmos/crisis/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/crisis/module/v1/module_pb.js rename to codegen/cosmos/crisis/module/v1/module_pb.js diff --git a/proto/cosmos/crisis/module/v1/module_pb_service.d.ts b/codegen/cosmos/crisis/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/crisis/module/v1/module_pb_service.d.ts rename to codegen/cosmos/crisis/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/crisis/module/v1/module_pb_service.js b/codegen/cosmos/crisis/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/crisis/module/v1/module_pb_service.js rename to codegen/cosmos/crisis/module/v1/module_pb_service.js diff --git a/codegen/cosmos/crisis/v1beta1/genesis.ts b/codegen/cosmos/crisis/v1beta1/genesis.ts new file mode 100644 index 0000000..e64ec0d --- /dev/null +++ b/codegen/cosmos/crisis/v1beta1/genesis.ts @@ -0,0 +1,81 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crisis/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../base/v1beta1/coin"; +import * as dependency_3 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.crisis.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + constant_fee?: dependency_2.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("constant_fee" in data && data.constant_fee != undefined) { + this.constant_fee = data.constant_fee; + } + } + } + get constant_fee() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin; + } + set constant_fee(value: dependency_2.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_constant_fee() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + constant_fee?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.constant_fee != null) { + message.constant_fee = dependency_2.cosmos.base.v1beta1.Coin.fromObject(data.constant_fee); + } + return message; + } + toObject() { + const data: { + constant_fee?: ReturnType; + } = {}; + if (this.constant_fee != null) { + data.constant_fee = this.constant_fee.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_constant_fee) + writer.writeMessage(3, this.constant_fee, () => this.constant_fee.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 3: + reader.readMessage(message.constant_fee, () => message.constant_fee = dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/crisis/v1beta1/genesis_pb.d.ts b/codegen/cosmos/crisis/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/crisis/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/crisis/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/crisis/v1beta1/genesis_pb.js b/codegen/cosmos/crisis/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/crisis/v1beta1/genesis_pb.js rename to codegen/cosmos/crisis/v1beta1/genesis_pb.js diff --git a/proto/cosmos/crisis/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/crisis/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/crisis/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/crisis/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/crisis/v1beta1/genesis_pb_service.js b/codegen/cosmos/crisis/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/crisis/v1beta1/genesis_pb_service.js rename to codegen/cosmos/crisis/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/crisis/v1beta1/tx.ts b/codegen/cosmos/crisis/v1beta1/tx.ts new file mode 100644 index 0000000..661ce99 --- /dev/null +++ b/codegen/cosmos/crisis/v1beta1/tx.ts @@ -0,0 +1,360 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crisis/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../msg/v1/msg"; +import * as dependency_4 from "./../../../amino/amino"; +import * as dependency_5 from "./../../base/v1beta1/coin"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.crisis.v1beta1 { + export class MsgVerifyInvariant extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sender?: string; + invariant_module_name?: string; + invariant_route?: 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 ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + if ("invariant_module_name" in data && data.invariant_module_name != undefined) { + this.invariant_module_name = data.invariant_module_name; + } + if ("invariant_route" in data && data.invariant_route != undefined) { + this.invariant_route = data.invariant_route; + } + } + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 1, value); + } + get invariant_module_name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set invariant_module_name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get invariant_route() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set invariant_route(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + sender?: string; + invariant_module_name?: string; + invariant_route?: string; + }): MsgVerifyInvariant { + const message = new MsgVerifyInvariant({}); + if (data.sender != null) { + message.sender = data.sender; + } + if (data.invariant_module_name != null) { + message.invariant_module_name = data.invariant_module_name; + } + if (data.invariant_route != null) { + message.invariant_route = data.invariant_route; + } + return message; + } + toObject() { + const data: { + sender?: string; + invariant_module_name?: string; + invariant_route?: string; + } = {}; + if (this.sender != null) { + data.sender = this.sender; + } + if (this.invariant_module_name != null) { + data.invariant_module_name = this.invariant_module_name; + } + if (this.invariant_route != null) { + data.invariant_route = this.invariant_route; + } + 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.sender.length) + writer.writeString(1, this.sender); + if (this.invariant_module_name.length) + writer.writeString(2, this.invariant_module_name); + if (this.invariant_route.length) + writer.writeString(3, this.invariant_route); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgVerifyInvariant { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVerifyInvariant(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sender = reader.readString(); + break; + case 2: + message.invariant_module_name = reader.readString(); + break; + case 3: + message.invariant_route = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVerifyInvariant { + return MsgVerifyInvariant.deserialize(bytes); + } + } + export class MsgVerifyInvariantResponse 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: {}): MsgVerifyInvariantResponse { + const message = new MsgVerifyInvariantResponse({}); + 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): MsgVerifyInvariantResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVerifyInvariantResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVerifyInvariantResponse { + return MsgVerifyInvariantResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + constant_fee?: dependency_5.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("constant_fee" in data && data.constant_fee != undefined) { + this.constant_fee = data.constant_fee; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get constant_fee() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 2) as dependency_5.cosmos.base.v1beta1.Coin; + } + set constant_fee(value: dependency_5.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_constant_fee() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + constant_fee?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.constant_fee != null) { + message.constant_fee = dependency_5.cosmos.base.v1beta1.Coin.fromObject(data.constant_fee); + } + return message; + } + toObject() { + const data: { + authority?: string; + constant_fee?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + if (this.constant_fee != null) { + data.constant_fee = this.constant_fee.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.authority.length) + writer.writeString(1, this.authority); + if (this.has_constant_fee) + writer.writeMessage(2, this.constant_fee, () => this.constant_fee.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.constant_fee, () => message.constant_fee = dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + VerifyInvariant: { + path: "/cosmos.crisis.v1beta1.Msg/VerifyInvariant", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgVerifyInvariant) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgVerifyInvariant.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgVerifyInvariantResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgVerifyInvariantResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/cosmos.crisis.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract VerifyInvariant(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + VerifyInvariant: GrpcUnaryServiceInterface = (message: MsgVerifyInvariant, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyInvariant(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/crisis/v1beta1/tx_pb.d.ts b/codegen/cosmos/crisis/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/crisis/v1beta1/tx_pb.d.ts rename to codegen/cosmos/crisis/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/crisis/v1beta1/tx_pb.js b/codegen/cosmos/crisis/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/crisis/v1beta1/tx_pb.js rename to codegen/cosmos/crisis/v1beta1/tx_pb.js diff --git a/proto/cosmos/crisis/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/crisis/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/crisis/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/crisis/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/crisis/v1beta1/tx_pb_service.js b/codegen/cosmos/crisis/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/crisis/v1beta1/tx_pb_service.js rename to codegen/cosmos/crisis/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/crypto/ed25519/keys.ts b/codegen/cosmos/crypto/ed25519/keys.ts new file mode 100644 index 0000000..38c8bb7 --- /dev/null +++ b/codegen/cosmos/crypto/ed25519/keys.ts @@ -0,0 +1,144 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crypto/ed25519/keys.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.crypto.ed25519 { + export class PubKey extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + key?: Uint8Array; + }): PubKey { + const message = new PubKey({}); + if (data.key != null) { + message.key = data.key; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + } = {}; + if (this.key != null) { + data.key = this.key; + } + 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.key.length) + writer.writeBytes(1, this.key); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PubKey { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PubKey(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PubKey { + return PubKey.deserialize(bytes); + } + } + export class PrivKey extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + key?: Uint8Array; + }): PrivKey { + const message = new PrivKey({}); + if (data.key != null) { + message.key = data.key; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + } = {}; + if (this.key != null) { + data.key = this.key; + } + 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.key.length) + writer.writeBytes(1, this.key); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PrivKey { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PrivKey(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PrivKey { + return PrivKey.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/crypto/ed25519/keys_pb.d.ts b/codegen/cosmos/crypto/ed25519/keys_pb.d.ts similarity index 100% rename from proto/cosmos/crypto/ed25519/keys_pb.d.ts rename to codegen/cosmos/crypto/ed25519/keys_pb.d.ts diff --git a/proto/cosmos/crypto/ed25519/keys_pb.js b/codegen/cosmos/crypto/ed25519/keys_pb.js similarity index 100% rename from proto/cosmos/crypto/ed25519/keys_pb.js rename to codegen/cosmos/crypto/ed25519/keys_pb.js diff --git a/proto/cosmos/crypto/ed25519/keys_pb_service.d.ts b/codegen/cosmos/crypto/ed25519/keys_pb_service.d.ts similarity index 100% rename from proto/cosmos/crypto/ed25519/keys_pb_service.d.ts rename to codegen/cosmos/crypto/ed25519/keys_pb_service.d.ts diff --git a/proto/cosmos/crypto/ed25519/keys_pb_service.js b/codegen/cosmos/crypto/ed25519/keys_pb_service.js similarity index 100% rename from proto/cosmos/crypto/ed25519/keys_pb_service.js rename to codegen/cosmos/crypto/ed25519/keys_pb_service.js diff --git a/codegen/cosmos/crypto/hd/v1/hd.ts b/codegen/cosmos/crypto/hd/v1/hd.ts new file mode 100644 index 0000000..a709c40 --- /dev/null +++ b/codegen/cosmos/crypto/hd/v1/hd.ts @@ -0,0 +1,169 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crypto/hd/v1/hd.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../amino/amino"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.crypto.hd.v1 { + export class BIP44Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + purpose?: number; + coin_type?: number; + account?: number; + change?: boolean; + address_index?: 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 ("purpose" in data && data.purpose != undefined) { + this.purpose = data.purpose; + } + if ("coin_type" in data && data.coin_type != undefined) { + this.coin_type = data.coin_type; + } + if ("account" in data && data.account != undefined) { + this.account = data.account; + } + if ("change" in data && data.change != undefined) { + this.change = data.change; + } + if ("address_index" in data && data.address_index != undefined) { + this.address_index = data.address_index; + } + } + } + get purpose() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set purpose(value: number) { + pb_1.Message.setField(this, 1, value); + } + get coin_type() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set coin_type(value: number) { + pb_1.Message.setField(this, 2, value); + } + get account() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set account(value: number) { + pb_1.Message.setField(this, 3, value); + } + get change() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set change(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + get address_index() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set address_index(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + purpose?: number; + coin_type?: number; + account?: number; + change?: boolean; + address_index?: number; + }): BIP44Params { + const message = new BIP44Params({}); + if (data.purpose != null) { + message.purpose = data.purpose; + } + if (data.coin_type != null) { + message.coin_type = data.coin_type; + } + if (data.account != null) { + message.account = data.account; + } + if (data.change != null) { + message.change = data.change; + } + if (data.address_index != null) { + message.address_index = data.address_index; + } + return message; + } + toObject() { + const data: { + purpose?: number; + coin_type?: number; + account?: number; + change?: boolean; + address_index?: number; + } = {}; + if (this.purpose != null) { + data.purpose = this.purpose; + } + if (this.coin_type != null) { + data.coin_type = this.coin_type; + } + if (this.account != null) { + data.account = this.account; + } + if (this.change != null) { + data.change = this.change; + } + if (this.address_index != null) { + data.address_index = this.address_index; + } + 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.purpose != 0) + writer.writeUint32(1, this.purpose); + if (this.coin_type != 0) + writer.writeUint32(2, this.coin_type); + if (this.account != 0) + writer.writeUint32(3, this.account); + if (this.change != false) + writer.writeBool(4, this.change); + if (this.address_index != 0) + writer.writeUint32(5, this.address_index); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BIP44Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BIP44Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.purpose = reader.readUint32(); + break; + case 2: + message.coin_type = reader.readUint32(); + break; + case 3: + message.account = reader.readUint32(); + break; + case 4: + message.change = reader.readBool(); + break; + case 5: + message.address_index = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BIP44Params { + return BIP44Params.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/crypto/hd/v1/hd_pb.d.ts b/codegen/cosmos/crypto/hd/v1/hd_pb.d.ts similarity index 100% rename from proto/cosmos/crypto/hd/v1/hd_pb.d.ts rename to codegen/cosmos/crypto/hd/v1/hd_pb.d.ts diff --git a/proto/cosmos/crypto/hd/v1/hd_pb.js b/codegen/cosmos/crypto/hd/v1/hd_pb.js similarity index 100% rename from proto/cosmos/crypto/hd/v1/hd_pb.js rename to codegen/cosmos/crypto/hd/v1/hd_pb.js diff --git a/proto/cosmos/crypto/hd/v1/hd_pb_service.d.ts b/codegen/cosmos/crypto/hd/v1/hd_pb_service.d.ts similarity index 100% rename from proto/cosmos/crypto/hd/v1/hd_pb_service.d.ts rename to codegen/cosmos/crypto/hd/v1/hd_pb_service.d.ts diff --git a/proto/cosmos/crypto/hd/v1/hd_pb_service.js b/codegen/cosmos/crypto/hd/v1/hd_pb_service.js similarity index 100% rename from proto/cosmos/crypto/hd/v1/hd_pb_service.js rename to codegen/cosmos/crypto/hd/v1/hd_pb_service.js diff --git a/codegen/cosmos/crypto/keyring/v1/record.ts b/codegen/cosmos/crypto/keyring/v1/record.ts new file mode 100644 index 0000000..c0756c7 --- /dev/null +++ b/codegen/cosmos/crypto/keyring/v1/record.ts @@ -0,0 +1,458 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crypto/keyring/v1/record.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../google/protobuf/any"; +import * as dependency_3 from "./../../hd/v1/hd"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.crypto.keyring.v1 { + export class Record extends pb_1.Message { + #one_of_decls: number[][] = [[3, 4, 5, 6]]; + constructor(data?: any[] | ({ + name?: string; + pub_key?: dependency_2.google.protobuf.Any; + } & (({ + local?: Record.Local; + ledger?: never; + multi?: never; + offline?: never; + } | { + local?: never; + ledger?: Record.Ledger; + multi?: never; + offline?: never; + } | { + local?: never; + ledger?: never; + multi?: Record.Multi; + offline?: never; + } | { + local?: never; + ledger?: never; + multi?: never; + offline?: Record.Offline; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("local" in data && data.local != undefined) { + this.local = data.local; + } + if ("ledger" in data && data.ledger != undefined) { + this.ledger = data.ledger; + } + if ("multi" in data && data.multi != undefined) { + this.multi = data.multi; + } + if ("offline" in data && data.offline != undefined) { + this.offline = data.offline; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pub_key() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 2) as dependency_2.google.protobuf.Any; + } + set pub_key(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pub_key() { + return pb_1.Message.getField(this, 2) != null; + } + get local() { + return pb_1.Message.getWrapperField(this, Record.Local, 3) as Record.Local; + } + set local(value: Record.Local) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_local() { + return pb_1.Message.getField(this, 3) != null; + } + get ledger() { + return pb_1.Message.getWrapperField(this, Record.Ledger, 4) as Record.Ledger; + } + set ledger(value: Record.Ledger) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_ledger() { + return pb_1.Message.getField(this, 4) != null; + } + get multi() { + return pb_1.Message.getWrapperField(this, Record.Multi, 5) as Record.Multi; + } + set multi(value: Record.Multi) { + pb_1.Message.setOneofWrapperField(this, 5, this.#one_of_decls[0], value); + } + get has_multi() { + return pb_1.Message.getField(this, 5) != null; + } + get offline() { + return pb_1.Message.getWrapperField(this, Record.Offline, 6) as Record.Offline; + } + set offline(value: Record.Offline) { + pb_1.Message.setOneofWrapperField(this, 6, this.#one_of_decls[0], value); + } + get has_offline() { + return pb_1.Message.getField(this, 6) != null; + } + get item() { + const cases: { + [index: number]: "none" | "local" | "ledger" | "multi" | "offline"; + } = { + 0: "none", + 3: "local", + 4: "ledger", + 5: "multi", + 6: "offline" + }; + return cases[pb_1.Message.computeOneofCase(this, [3, 4, 5, 6])]; + } + static fromObject(data: { + name?: string; + pub_key?: ReturnType; + local?: ReturnType; + ledger?: ReturnType; + multi?: ReturnType; + offline?: ReturnType; + }): Record { + const message = new Record({}); + if (data.name != null) { + message.name = data.name; + } + if (data.pub_key != null) { + message.pub_key = dependency_2.google.protobuf.Any.fromObject(data.pub_key); + } + if (data.local != null) { + message.local = Record.Local.fromObject(data.local); + } + if (data.ledger != null) { + message.ledger = Record.Ledger.fromObject(data.ledger); + } + if (data.multi != null) { + message.multi = Record.Multi.fromObject(data.multi); + } + if (data.offline != null) { + message.offline = Record.Offline.fromObject(data.offline); + } + return message; + } + toObject() { + const data: { + name?: string; + pub_key?: ReturnType; + local?: ReturnType; + ledger?: ReturnType; + multi?: ReturnType; + offline?: ReturnType; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.pub_key != null) { + data.pub_key = this.pub_key.toObject(); + } + if (this.local != null) { + data.local = this.local.toObject(); + } + if (this.ledger != null) { + data.ledger = this.ledger.toObject(); + } + if (this.multi != null) { + data.multi = this.multi.toObject(); + } + if (this.offline != null) { + data.offline = this.offline.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.name.length) + writer.writeString(1, this.name); + if (this.has_pub_key) + writer.writeMessage(2, this.pub_key, () => this.pub_key.serialize(writer)); + if (this.has_local) + writer.writeMessage(3, this.local, () => this.local.serialize(writer)); + if (this.has_ledger) + writer.writeMessage(4, this.ledger, () => this.ledger.serialize(writer)); + if (this.has_multi) + writer.writeMessage(5, this.multi, () => this.multi.serialize(writer)); + if (this.has_offline) + writer.writeMessage(6, this.offline, () => this.offline.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Record { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Record(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + reader.readMessage(message.pub_key, () => message.pub_key = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + case 3: + reader.readMessage(message.local, () => message.local = Record.Local.deserialize(reader)); + break; + case 4: + reader.readMessage(message.ledger, () => message.ledger = Record.Ledger.deserialize(reader)); + break; + case 5: + reader.readMessage(message.multi, () => message.multi = Record.Multi.deserialize(reader)); + break; + case 6: + reader.readMessage(message.offline, () => message.offline = Record.Offline.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Record { + return Record.deserialize(bytes); + } + } + export namespace Record { + export class Local extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + priv_key?: dependency_2.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("priv_key" in data && data.priv_key != undefined) { + this.priv_key = data.priv_key; + } + } + } + get priv_key() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 1) as dependency_2.google.protobuf.Any; + } + set priv_key(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_priv_key() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + priv_key?: ReturnType; + }): Local { + const message = new Local({}); + if (data.priv_key != null) { + message.priv_key = dependency_2.google.protobuf.Any.fromObject(data.priv_key); + } + return message; + } + toObject() { + const data: { + priv_key?: ReturnType; + } = {}; + if (this.priv_key != null) { + data.priv_key = this.priv_key.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_priv_key) + writer.writeMessage(1, this.priv_key, () => this.priv_key.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Local { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Local(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.priv_key, () => message.priv_key = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Local { + return Local.deserialize(bytes); + } + } + export class Ledger extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: dependency_3.cosmos.crypto.hd.v1.BIP44Params; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + } + } + get path() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.crypto.hd.v1.BIP44Params, 1) as dependency_3.cosmos.crypto.hd.v1.BIP44Params; + } + set path(value: dependency_3.cosmos.crypto.hd.v1.BIP44Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_path() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + path?: ReturnType; + }): Ledger { + const message = new Ledger({}); + if (data.path != null) { + message.path = dependency_3.cosmos.crypto.hd.v1.BIP44Params.fromObject(data.path); + } + return message; + } + toObject() { + const data: { + path?: ReturnType; + } = {}; + if (this.path != null) { + data.path = this.path.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_path) + writer.writeMessage(1, this.path, () => this.path.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Ledger { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Ledger(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.path, () => message.path = dependency_3.cosmos.crypto.hd.v1.BIP44Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Ledger { + return Ledger.deserialize(bytes); + } + } + export class Multi 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: {}): Multi { + const message = new Multi({}); + 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): Multi { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Multi(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Multi { + return Multi.deserialize(bytes); + } + } + export class Offline 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: {}): Offline { + const message = new Offline({}); + 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): Offline { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Offline(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Offline { + return Offline.deserialize(bytes); + } + } + } +} diff --git a/proto/cosmos/crypto/keyring/v1/record_pb.d.ts b/codegen/cosmos/crypto/keyring/v1/record_pb.d.ts similarity index 100% rename from proto/cosmos/crypto/keyring/v1/record_pb.d.ts rename to codegen/cosmos/crypto/keyring/v1/record_pb.d.ts diff --git a/proto/cosmos/crypto/keyring/v1/record_pb.js b/codegen/cosmos/crypto/keyring/v1/record_pb.js similarity index 100% rename from proto/cosmos/crypto/keyring/v1/record_pb.js rename to codegen/cosmos/crypto/keyring/v1/record_pb.js diff --git a/proto/cosmos/crypto/keyring/v1/record_pb_service.d.ts b/codegen/cosmos/crypto/keyring/v1/record_pb_service.d.ts similarity index 100% rename from proto/cosmos/crypto/keyring/v1/record_pb_service.d.ts rename to codegen/cosmos/crypto/keyring/v1/record_pb_service.d.ts diff --git a/proto/cosmos/crypto/keyring/v1/record_pb_service.js b/codegen/cosmos/crypto/keyring/v1/record_pb_service.js similarity index 100% rename from proto/cosmos/crypto/keyring/v1/record_pb_service.js rename to codegen/cosmos/crypto/keyring/v1/record_pb_service.js diff --git a/codegen/cosmos/crypto/multisig/keys.ts b/codegen/cosmos/crypto/multisig/keys.ts new file mode 100644 index 0000000..02bd392 --- /dev/null +++ b/codegen/cosmos/crypto/multisig/keys.ts @@ -0,0 +1,101 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crypto/multisig/keys.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/any"; +import * as dependency_3 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.crypto.multisig { + export class LegacyAminoPubKey extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + threshold?: number; + public_keys?: dependency_2.google.protobuf.Any[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("threshold" in data && data.threshold != undefined) { + this.threshold = data.threshold; + } + if ("public_keys" in data && data.public_keys != undefined) { + this.public_keys = data.public_keys; + } + } + } + get threshold() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set threshold(value: number) { + pb_1.Message.setField(this, 1, value); + } + get public_keys() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.google.protobuf.Any, 2) as dependency_2.google.protobuf.Any[]; + } + set public_keys(value: dependency_2.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + threshold?: number; + public_keys?: ReturnType[]; + }): LegacyAminoPubKey { + const message = new LegacyAminoPubKey({}); + if (data.threshold != null) { + message.threshold = data.threshold; + } + if (data.public_keys != null) { + message.public_keys = data.public_keys.map(item => dependency_2.google.protobuf.Any.fromObject(item)); + } + return message; + } + toObject() { + const data: { + threshold?: number; + public_keys?: ReturnType[]; + } = {}; + if (this.threshold != null) { + data.threshold = this.threshold; + } + if (this.public_keys != null) { + data.public_keys = this.public_keys.map((item: dependency_2.google.protobuf.Any) => item.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.threshold != 0) + writer.writeUint32(1, this.threshold); + if (this.public_keys.length) + writer.writeRepeatedMessage(2, this.public_keys, (item: dependency_2.google.protobuf.Any) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LegacyAminoPubKey { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LegacyAminoPubKey(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.threshold = reader.readUint32(); + break; + case 2: + reader.readMessage(message.public_keys, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.google.protobuf.Any.deserialize(reader), dependency_2.google.protobuf.Any)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): LegacyAminoPubKey { + return LegacyAminoPubKey.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/crypto/multisig/keys_pb.d.ts b/codegen/cosmos/crypto/multisig/keys_pb.d.ts similarity index 100% rename from proto/cosmos/crypto/multisig/keys_pb.d.ts rename to codegen/cosmos/crypto/multisig/keys_pb.d.ts diff --git a/proto/cosmos/crypto/multisig/keys_pb.js b/codegen/cosmos/crypto/multisig/keys_pb.js similarity index 100% rename from proto/cosmos/crypto/multisig/keys_pb.js rename to codegen/cosmos/crypto/multisig/keys_pb.js diff --git a/proto/cosmos/crypto/multisig/keys_pb_service.d.ts b/codegen/cosmos/crypto/multisig/keys_pb_service.d.ts similarity index 100% rename from proto/cosmos/crypto/multisig/keys_pb_service.d.ts rename to codegen/cosmos/crypto/multisig/keys_pb_service.d.ts diff --git a/proto/cosmos/crypto/multisig/keys_pb_service.js b/codegen/cosmos/crypto/multisig/keys_pb_service.js similarity index 100% rename from proto/cosmos/crypto/multisig/keys_pb_service.js rename to codegen/cosmos/crypto/multisig/keys_pb_service.js diff --git a/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts b/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts new file mode 100644 index 0000000..c252cb1 --- /dev/null +++ b/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -0,0 +1,166 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crypto/multisig/v1beta1/multisig.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.crypto.multisig.v1beta1 { + export class MultiSignature extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signatures?: Uint8Array[]; + }) { + 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 ("signatures" in data && data.signatures != undefined) { + this.signatures = data.signatures; + } + } + } + get signatures() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as Uint8Array[]; + } + set signatures(value: Uint8Array[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + signatures?: Uint8Array[]; + }): MultiSignature { + const message = new MultiSignature({}); + if (data.signatures != null) { + message.signatures = data.signatures; + } + return message; + } + toObject() { + const data: { + signatures?: Uint8Array[]; + } = {}; + if (this.signatures != null) { + data.signatures = this.signatures; + } + 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.signatures.length) + writer.writeRepeatedBytes(1, this.signatures); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MultiSignature { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MultiSignature(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MultiSignature { + return MultiSignature.deserialize(bytes); + } + } + export class CompactBitArray extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + extra_bits_stored?: number; + elems?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("extra_bits_stored" in data && data.extra_bits_stored != undefined) { + this.extra_bits_stored = data.extra_bits_stored; + } + if ("elems" in data && data.elems != undefined) { + this.elems = data.elems; + } + } + } + get extra_bits_stored() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set extra_bits_stored(value: number) { + pb_1.Message.setField(this, 1, value); + } + get elems() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set elems(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + extra_bits_stored?: number; + elems?: Uint8Array; + }): CompactBitArray { + const message = new CompactBitArray({}); + if (data.extra_bits_stored != null) { + message.extra_bits_stored = data.extra_bits_stored; + } + if (data.elems != null) { + message.elems = data.elems; + } + return message; + } + toObject() { + const data: { + extra_bits_stored?: number; + elems?: Uint8Array; + } = {}; + if (this.extra_bits_stored != null) { + data.extra_bits_stored = this.extra_bits_stored; + } + if (this.elems != null) { + data.elems = this.elems; + } + 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.extra_bits_stored != 0) + writer.writeUint32(1, this.extra_bits_stored); + if (this.elems.length) + writer.writeBytes(2, this.elems); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CompactBitArray { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CompactBitArray(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.extra_bits_stored = reader.readUint32(); + break; + case 2: + message.elems = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CompactBitArray { + return CompactBitArray.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/crypto/multisig/v1beta1/multisig_pb.d.ts b/codegen/cosmos/crypto/multisig/v1beta1/multisig_pb.d.ts similarity index 100% rename from proto/cosmos/crypto/multisig/v1beta1/multisig_pb.d.ts rename to codegen/cosmos/crypto/multisig/v1beta1/multisig_pb.d.ts diff --git a/proto/cosmos/crypto/multisig/v1beta1/multisig_pb.js b/codegen/cosmos/crypto/multisig/v1beta1/multisig_pb.js similarity index 100% rename from proto/cosmos/crypto/multisig/v1beta1/multisig_pb.js rename to codegen/cosmos/crypto/multisig/v1beta1/multisig_pb.js diff --git a/proto/cosmos/crypto/multisig/v1beta1/multisig_pb_service.d.ts b/codegen/cosmos/crypto/multisig/v1beta1/multisig_pb_service.d.ts similarity index 100% rename from proto/cosmos/crypto/multisig/v1beta1/multisig_pb_service.d.ts rename to codegen/cosmos/crypto/multisig/v1beta1/multisig_pb_service.d.ts diff --git a/proto/cosmos/crypto/multisig/v1beta1/multisig_pb_service.js b/codegen/cosmos/crypto/multisig/v1beta1/multisig_pb_service.js similarity index 100% rename from proto/cosmos/crypto/multisig/v1beta1/multisig_pb_service.js rename to codegen/cosmos/crypto/multisig/v1beta1/multisig_pb_service.js diff --git a/codegen/cosmos/crypto/secp256k1/keys.ts b/codegen/cosmos/crypto/secp256k1/keys.ts new file mode 100644 index 0000000..4feb32f --- /dev/null +++ b/codegen/cosmos/crypto/secp256k1/keys.ts @@ -0,0 +1,144 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crypto/secp256k1/keys.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.crypto.secp256k1 { + export class PubKey extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + key?: Uint8Array; + }): PubKey { + const message = new PubKey({}); + if (data.key != null) { + message.key = data.key; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + } = {}; + if (this.key != null) { + data.key = this.key; + } + 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.key.length) + writer.writeBytes(1, this.key); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PubKey { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PubKey(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PubKey { + return PubKey.deserialize(bytes); + } + } + export class PrivKey extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + key?: Uint8Array; + }): PrivKey { + const message = new PrivKey({}); + if (data.key != null) { + message.key = data.key; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + } = {}; + if (this.key != null) { + data.key = this.key; + } + 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.key.length) + writer.writeBytes(1, this.key); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PrivKey { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PrivKey(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PrivKey { + return PrivKey.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/crypto/secp256k1/keys_pb.d.ts b/codegen/cosmos/crypto/secp256k1/keys_pb.d.ts similarity index 100% rename from proto/cosmos/crypto/secp256k1/keys_pb.d.ts rename to codegen/cosmos/crypto/secp256k1/keys_pb.d.ts diff --git a/proto/cosmos/crypto/secp256k1/keys_pb.js b/codegen/cosmos/crypto/secp256k1/keys_pb.js similarity index 100% rename from proto/cosmos/crypto/secp256k1/keys_pb.js rename to codegen/cosmos/crypto/secp256k1/keys_pb.js diff --git a/proto/cosmos/crypto/secp256k1/keys_pb_service.d.ts b/codegen/cosmos/crypto/secp256k1/keys_pb_service.d.ts similarity index 100% rename from proto/cosmos/crypto/secp256k1/keys_pb_service.d.ts rename to codegen/cosmos/crypto/secp256k1/keys_pb_service.d.ts diff --git a/proto/cosmos/crypto/secp256k1/keys_pb_service.js b/codegen/cosmos/crypto/secp256k1/keys_pb_service.js similarity index 100% rename from proto/cosmos/crypto/secp256k1/keys_pb_service.js rename to codegen/cosmos/crypto/secp256k1/keys_pb_service.js diff --git a/codegen/cosmos/crypto/secp256r1/keys.ts b/codegen/cosmos/crypto/secp256r1/keys.ts new file mode 100644 index 0000000..b355486 --- /dev/null +++ b/codegen/cosmos/crypto/secp256r1/keys.ts @@ -0,0 +1,143 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/crypto/secp256r1/keys.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.crypto.secp256r1 { + export class PubKey extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + key?: Uint8Array; + }): PubKey { + const message = new PubKey({}); + if (data.key != null) { + message.key = data.key; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + } = {}; + if (this.key != null) { + data.key = this.key; + } + 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.key.length) + writer.writeBytes(1, this.key); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PubKey { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PubKey(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PubKey { + return PubKey.deserialize(bytes); + } + } + export class PrivKey extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + secret?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("secret" in data && data.secret != undefined) { + this.secret = data.secret; + } + } + } + get secret() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set secret(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + secret?: Uint8Array; + }): PrivKey { + const message = new PrivKey({}); + if (data.secret != null) { + message.secret = data.secret; + } + return message; + } + toObject() { + const data: { + secret?: Uint8Array; + } = {}; + if (this.secret != null) { + data.secret = this.secret; + } + 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.secret.length) + writer.writeBytes(1, this.secret); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PrivKey { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PrivKey(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.secret = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PrivKey { + return PrivKey.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/crypto/secp256r1/keys_pb.d.ts b/codegen/cosmos/crypto/secp256r1/keys_pb.d.ts similarity index 100% rename from proto/cosmos/crypto/secp256r1/keys_pb.d.ts rename to codegen/cosmos/crypto/secp256r1/keys_pb.d.ts diff --git a/proto/cosmos/crypto/secp256r1/keys_pb.js b/codegen/cosmos/crypto/secp256r1/keys_pb.js similarity index 100% rename from proto/cosmos/crypto/secp256r1/keys_pb.js rename to codegen/cosmos/crypto/secp256r1/keys_pb.js diff --git a/proto/cosmos/crypto/secp256r1/keys_pb_service.d.ts b/codegen/cosmos/crypto/secp256r1/keys_pb_service.d.ts similarity index 100% rename from proto/cosmos/crypto/secp256r1/keys_pb_service.d.ts rename to codegen/cosmos/crypto/secp256r1/keys_pb_service.d.ts diff --git a/proto/cosmos/crypto/secp256r1/keys_pb_service.js b/codegen/cosmos/crypto/secp256r1/keys_pb_service.js similarity index 100% rename from proto/cosmos/crypto/secp256r1/keys_pb_service.js rename to codegen/cosmos/crypto/secp256r1/keys_pb_service.js diff --git a/codegen/cosmos/distribution/module/v1/module.ts b/codegen/cosmos/distribution/module/v1/module.ts new file mode 100644 index 0000000..0f8104f --- /dev/null +++ b/codegen/cosmos/distribution/module/v1/module.ts @@ -0,0 +1,99 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/distribution/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.distribution.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fee_collector_name?: string; + authority?: 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 ("fee_collector_name" in data && data.fee_collector_name != undefined) { + this.fee_collector_name = data.fee_collector_name; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get fee_collector_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fee_collector_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + fee_collector_name?: string; + authority?: string; + }): Module { + const message = new Module({}); + if (data.fee_collector_name != null) { + message.fee_collector_name = data.fee_collector_name; + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + fee_collector_name?: string; + authority?: string; + } = {}; + if (this.fee_collector_name != null) { + data.fee_collector_name = this.fee_collector_name; + } + if (this.authority != null) { + data.authority = this.authority; + } + 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.fee_collector_name.length) + writer.writeString(1, this.fee_collector_name); + if (this.authority.length) + writer.writeString(2, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fee_collector_name = reader.readString(); + break; + case 2: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/distribution/module/v1/module_pb.d.ts b/codegen/cosmos/distribution/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/distribution/module/v1/module_pb.d.ts rename to codegen/cosmos/distribution/module/v1/module_pb.d.ts diff --git a/proto/cosmos/distribution/module/v1/module_pb.js b/codegen/cosmos/distribution/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/distribution/module/v1/module_pb.js rename to codegen/cosmos/distribution/module/v1/module_pb.js diff --git a/proto/cosmos/distribution/module/v1/module_pb_service.d.ts b/codegen/cosmos/distribution/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/distribution/module/v1/module_pb_service.d.ts rename to codegen/cosmos/distribution/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/distribution/module/v1/module_pb_service.js b/codegen/cosmos/distribution/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/distribution/module/v1/module_pb_service.js rename to codegen/cosmos/distribution/module/v1/module_pb_service.js diff --git a/codegen/cosmos/distribution/v1beta1/distribution.ts b/codegen/cosmos/distribution/v1beta1/distribution.ts new file mode 100644 index 0000000..852c7ba --- /dev/null +++ b/codegen/cosmos/distribution/v1beta1/distribution.ts @@ -0,0 +1,1191 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/distribution/v1beta1/distribution.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../base/v1beta1/coin"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.distribution.v1beta1 { + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + community_tax?: string; + /** @deprecated*/ + base_proposer_reward?: string; + /** @deprecated*/ + bonus_proposer_reward?: string; + withdraw_addr_enabled?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("community_tax" in data && data.community_tax != undefined) { + this.community_tax = data.community_tax; + } + if ("base_proposer_reward" in data && data.base_proposer_reward != undefined) { + this.base_proposer_reward = data.base_proposer_reward; + } + if ("bonus_proposer_reward" in data && data.bonus_proposer_reward != undefined) { + this.bonus_proposer_reward = data.bonus_proposer_reward; + } + if ("withdraw_addr_enabled" in data && data.withdraw_addr_enabled != undefined) { + this.withdraw_addr_enabled = data.withdraw_addr_enabled; + } + } + } + get community_tax() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set community_tax(value: string) { + pb_1.Message.setField(this, 1, value); + } + /** @deprecated*/ + get base_proposer_reward() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + /** @deprecated*/ + set base_proposer_reward(value: string) { + pb_1.Message.setField(this, 2, value); + } + /** @deprecated*/ + get bonus_proposer_reward() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + /** @deprecated*/ + set bonus_proposer_reward(value: string) { + pb_1.Message.setField(this, 3, value); + } + get withdraw_addr_enabled() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set withdraw_addr_enabled(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + community_tax?: string; + base_proposer_reward?: string; + bonus_proposer_reward?: string; + withdraw_addr_enabled?: boolean; + }): Params { + const message = new Params({}); + if (data.community_tax != null) { + message.community_tax = data.community_tax; + } + if (data.base_proposer_reward != null) { + message.base_proposer_reward = data.base_proposer_reward; + } + if (data.bonus_proposer_reward != null) { + message.bonus_proposer_reward = data.bonus_proposer_reward; + } + if (data.withdraw_addr_enabled != null) { + message.withdraw_addr_enabled = data.withdraw_addr_enabled; + } + return message; + } + toObject() { + const data: { + community_tax?: string; + base_proposer_reward?: string; + bonus_proposer_reward?: string; + withdraw_addr_enabled?: boolean; + } = {}; + if (this.community_tax != null) { + data.community_tax = this.community_tax; + } + if (this.base_proposer_reward != null) { + data.base_proposer_reward = this.base_proposer_reward; + } + if (this.bonus_proposer_reward != null) { + data.bonus_proposer_reward = this.bonus_proposer_reward; + } + if (this.withdraw_addr_enabled != null) { + data.withdraw_addr_enabled = this.withdraw_addr_enabled; + } + 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.community_tax.length) + writer.writeString(1, this.community_tax); + if (this.base_proposer_reward.length) + writer.writeString(2, this.base_proposer_reward); + if (this.bonus_proposer_reward.length) + writer.writeString(3, this.bonus_proposer_reward); + if (this.withdraw_addr_enabled != false) + writer.writeBool(4, this.withdraw_addr_enabled); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.community_tax = reader.readString(); + break; + case 2: + message.base_proposer_reward = reader.readString(); + break; + case 3: + message.bonus_proposer_reward = reader.readString(); + break; + case 4: + message.withdraw_addr_enabled = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } + export class ValidatorHistoricalRewards extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + cumulative_reward_ratio?: dependency_2.cosmos.base.v1beta1.DecCoin[]; + reference_count?: number; + }) { + 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 ("cumulative_reward_ratio" in data && data.cumulative_reward_ratio != undefined) { + this.cumulative_reward_ratio = data.cumulative_reward_ratio; + } + if ("reference_count" in data && data.reference_count != undefined) { + this.reference_count = data.reference_count; + } + } + } + get cumulative_reward_ratio() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.DecCoin, 1) as dependency_2.cosmos.base.v1beta1.DecCoin[]; + } + set cumulative_reward_ratio(value: dependency_2.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get reference_count() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set reference_count(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + cumulative_reward_ratio?: ReturnType[]; + reference_count?: number; + }): ValidatorHistoricalRewards { + const message = new ValidatorHistoricalRewards({}); + if (data.cumulative_reward_ratio != null) { + message.cumulative_reward_ratio = data.cumulative_reward_ratio.map(item => dependency_2.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + if (data.reference_count != null) { + message.reference_count = data.reference_count; + } + return message; + } + toObject() { + const data: { + cumulative_reward_ratio?: ReturnType[]; + reference_count?: number; + } = {}; + if (this.cumulative_reward_ratio != null) { + data.cumulative_reward_ratio = this.cumulative_reward_ratio.map((item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.toObject()); + } + if (this.reference_count != null) { + data.reference_count = this.reference_count; + } + 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.cumulative_reward_ratio.length) + writer.writeRepeatedMessage(1, this.cumulative_reward_ratio, (item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (this.reference_count != 0) + writer.writeUint32(2, this.reference_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorHistoricalRewards { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorHistoricalRewards(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.cumulative_reward_ratio, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_2.cosmos.base.v1beta1.DecCoin)); + break; + case 2: + message.reference_count = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorHistoricalRewards { + return ValidatorHistoricalRewards.deserialize(bytes); + } + } + export class ValidatorCurrentRewards extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + rewards?: dependency_2.cosmos.base.v1beta1.DecCoin[]; + period?: number; + }) { + 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 ("rewards" in data && data.rewards != undefined) { + this.rewards = data.rewards; + } + if ("period" in data && data.period != undefined) { + this.period = data.period; + } + } + } + get rewards() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.DecCoin, 1) as dependency_2.cosmos.base.v1beta1.DecCoin[]; + } + set rewards(value: dependency_2.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get period() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set period(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + rewards?: ReturnType[]; + period?: number; + }): ValidatorCurrentRewards { + const message = new ValidatorCurrentRewards({}); + if (data.rewards != null) { + message.rewards = data.rewards.map(item => dependency_2.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + if (data.period != null) { + message.period = data.period; + } + return message; + } + toObject() { + const data: { + rewards?: ReturnType[]; + period?: number; + } = {}; + if (this.rewards != null) { + data.rewards = this.rewards.map((item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.toObject()); + } + if (this.period != null) { + data.period = this.period; + } + 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.rewards.length) + writer.writeRepeatedMessage(1, this.rewards, (item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (this.period != 0) + writer.writeUint64(2, this.period); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorCurrentRewards { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorCurrentRewards(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.rewards, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_2.cosmos.base.v1beta1.DecCoin)); + break; + case 2: + message.period = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorCurrentRewards { + return ValidatorCurrentRewards.deserialize(bytes); + } + } + export class ValidatorAccumulatedCommission extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + commission?: dependency_2.cosmos.base.v1beta1.DecCoin[]; + }) { + 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 ("commission" in data && data.commission != undefined) { + this.commission = data.commission; + } + } + } + get commission() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.DecCoin, 1) as dependency_2.cosmos.base.v1beta1.DecCoin[]; + } + set commission(value: dependency_2.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + commission?: ReturnType[]; + }): ValidatorAccumulatedCommission { + const message = new ValidatorAccumulatedCommission({}); + if (data.commission != null) { + message.commission = data.commission.map(item => dependency_2.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + commission?: ReturnType[]; + } = {}; + if (this.commission != null) { + data.commission = this.commission.map((item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.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.commission.length) + writer.writeRepeatedMessage(1, this.commission, (item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorAccumulatedCommission { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorAccumulatedCommission(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.commission, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_2.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorAccumulatedCommission { + return ValidatorAccumulatedCommission.deserialize(bytes); + } + } + export class ValidatorOutstandingRewards extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + rewards?: dependency_2.cosmos.base.v1beta1.DecCoin[]; + }) { + 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 ("rewards" in data && data.rewards != undefined) { + this.rewards = data.rewards; + } + } + } + get rewards() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.DecCoin, 1) as dependency_2.cosmos.base.v1beta1.DecCoin[]; + } + set rewards(value: dependency_2.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + rewards?: ReturnType[]; + }): ValidatorOutstandingRewards { + const message = new ValidatorOutstandingRewards({}); + if (data.rewards != null) { + message.rewards = data.rewards.map(item => dependency_2.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + rewards?: ReturnType[]; + } = {}; + if (this.rewards != null) { + data.rewards = this.rewards.map((item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.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.rewards.length) + writer.writeRepeatedMessage(1, this.rewards, (item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorOutstandingRewards { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorOutstandingRewards(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.rewards, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_2.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorOutstandingRewards { + return ValidatorOutstandingRewards.deserialize(bytes); + } + } + export class ValidatorSlashEvent extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_period?: number; + fraction?: 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 ("validator_period" in data && data.validator_period != undefined) { + this.validator_period = data.validator_period; + } + if ("fraction" in data && data.fraction != undefined) { + this.fraction = data.fraction; + } + } + } + get validator_period() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set validator_period(value: number) { + pb_1.Message.setField(this, 1, value); + } + get fraction() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set fraction(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + validator_period?: number; + fraction?: string; + }): ValidatorSlashEvent { + const message = new ValidatorSlashEvent({}); + if (data.validator_period != null) { + message.validator_period = data.validator_period; + } + if (data.fraction != null) { + message.fraction = data.fraction; + } + return message; + } + toObject() { + const data: { + validator_period?: number; + fraction?: string; + } = {}; + if (this.validator_period != null) { + data.validator_period = this.validator_period; + } + if (this.fraction != null) { + data.fraction = this.fraction; + } + 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.validator_period != 0) + writer.writeUint64(1, this.validator_period); + if (this.fraction.length) + writer.writeString(2, this.fraction); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorSlashEvent { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorSlashEvent(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_period = reader.readUint64(); + break; + case 2: + message.fraction = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorSlashEvent { + return ValidatorSlashEvent.deserialize(bytes); + } + } + export class ValidatorSlashEvents extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_slash_events?: ValidatorSlashEvent[]; + }) { + 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 ("validator_slash_events" in data && data.validator_slash_events != undefined) { + this.validator_slash_events = data.validator_slash_events; + } + } + } + get validator_slash_events() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorSlashEvent, 1) as ValidatorSlashEvent[]; + } + set validator_slash_events(value: ValidatorSlashEvent[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + validator_slash_events?: ReturnType[]; + }): ValidatorSlashEvents { + const message = new ValidatorSlashEvents({}); + if (data.validator_slash_events != null) { + message.validator_slash_events = data.validator_slash_events.map(item => ValidatorSlashEvent.fromObject(item)); + } + return message; + } + toObject() { + const data: { + validator_slash_events?: ReturnType[]; + } = {}; + if (this.validator_slash_events != null) { + data.validator_slash_events = this.validator_slash_events.map((item: ValidatorSlashEvent) => item.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.validator_slash_events.length) + writer.writeRepeatedMessage(1, this.validator_slash_events, (item: ValidatorSlashEvent) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorSlashEvents { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorSlashEvents(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validator_slash_events, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ValidatorSlashEvent.deserialize(reader), ValidatorSlashEvent)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorSlashEvents { + return ValidatorSlashEvents.deserialize(bytes); + } + } + export class FeePool extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + community_pool?: dependency_2.cosmos.base.v1beta1.DecCoin[]; + }) { + 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 ("community_pool" in data && data.community_pool != undefined) { + this.community_pool = data.community_pool; + } + } + } + get community_pool() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.DecCoin, 1) as dependency_2.cosmos.base.v1beta1.DecCoin[]; + } + set community_pool(value: dependency_2.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + community_pool?: ReturnType[]; + }): FeePool { + const message = new FeePool({}); + if (data.community_pool != null) { + message.community_pool = data.community_pool.map(item => dependency_2.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + community_pool?: ReturnType[]; + } = {}; + if (this.community_pool != null) { + data.community_pool = this.community_pool.map((item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.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.community_pool.length) + writer.writeRepeatedMessage(1, this.community_pool, (item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FeePool { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FeePool(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.community_pool, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_2.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FeePool { + return FeePool.deserialize(bytes); + } + } + /** @deprecated*/ + export class CommunityPoolSpendProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + title?: string; + description?: string; + recipient?: string; + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + 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 ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("recipient" in data && data.recipient != undefined) { + this.recipient = data.recipient; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get recipient() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set recipient(value: string) { + pb_1.Message.setField(this, 3, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 4) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + title?: string; + description?: string; + recipient?: string; + amount?: ReturnType[]; + }): CommunityPoolSpendProposal { + const message = new CommunityPoolSpendProposal({}); + if (data.title != null) { + message.title = data.title; + } + if (data.description != null) { + message.description = data.description; + } + if (data.recipient != null) { + message.recipient = data.recipient; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + title?: string; + description?: string; + recipient?: string; + amount?: ReturnType[]; + } = {}; + if (this.title != null) { + data.title = this.title; + } + if (this.description != null) { + data.description = this.description; + } + if (this.recipient != null) { + data.recipient = this.recipient; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.title.length) + writer.writeString(1, this.title); + if (this.description.length) + writer.writeString(2, this.description); + if (this.recipient.length) + writer.writeString(3, this.recipient); + if (this.amount.length) + writer.writeRepeatedMessage(4, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommunityPoolSpendProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommunityPoolSpendProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.title = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + message.recipient = reader.readString(); + break; + case 4: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommunityPoolSpendProposal { + return CommunityPoolSpendProposal.deserialize(bytes); + } + } + export class DelegatorStartingInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + previous_period?: number; + stake?: string; + 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 ("previous_period" in data && data.previous_period != undefined) { + this.previous_period = data.previous_period; + } + if ("stake" in data && data.stake != undefined) { + this.stake = data.stake; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get previous_period() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set previous_period(value: number) { + pb_1.Message.setField(this, 1, value); + } + get stake() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set stake(value: string) { + pb_1.Message.setField(this, 2, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + previous_period?: number; + stake?: string; + height?: number; + }): DelegatorStartingInfo { + const message = new DelegatorStartingInfo({}); + if (data.previous_period != null) { + message.previous_period = data.previous_period; + } + if (data.stake != null) { + message.stake = data.stake; + } + if (data.height != null) { + message.height = data.height; + } + return message; + } + toObject() { + const data: { + previous_period?: number; + stake?: string; + height?: number; + } = {}; + if (this.previous_period != null) { + data.previous_period = this.previous_period; + } + if (this.stake != null) { + data.stake = this.stake; + } + if (this.height != null) { + data.height = this.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.previous_period != 0) + writer.writeUint64(1, this.previous_period); + if (this.stake.length) + writer.writeString(2, this.stake); + if (this.height != 0) + writer.writeUint64(3, this.height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DelegatorStartingInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DelegatorStartingInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.previous_period = reader.readUint64(); + break; + case 2: + message.stake = reader.readString(); + break; + case 3: + message.height = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DelegatorStartingInfo { + return DelegatorStartingInfo.deserialize(bytes); + } + } + export class DelegationDelegatorReward extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: string; + reward?: dependency_2.cosmos.base.v1beta1.DecCoin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("reward" in data && data.reward != undefined) { + this.reward = data.reward; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get reward() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.DecCoin, 2) as dependency_2.cosmos.base.v1beta1.DecCoin[]; + } + set reward(value: dependency_2.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + validator_address?: string; + reward?: ReturnType[]; + }): DelegationDelegatorReward { + const message = new DelegationDelegatorReward({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.reward != null) { + message.reward = data.reward.map(item => dependency_2.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + validator_address?: string; + reward?: ReturnType[]; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.reward != null) { + data.reward = this.reward.map((item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.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.validator_address.length) + writer.writeString(1, this.validator_address); + if (this.reward.length) + writer.writeRepeatedMessage(2, this.reward, (item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DelegationDelegatorReward { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DelegationDelegatorReward(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + case 2: + reader.readMessage(message.reward, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_2.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DelegationDelegatorReward { + return DelegationDelegatorReward.deserialize(bytes); + } + } + export class CommunityPoolSpendProposalWithDeposit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + title?: string; + description?: string; + recipient?: string; + amount?: string; + deposit?: 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 ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("recipient" in data && data.recipient != undefined) { + this.recipient = data.recipient; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("deposit" in data && data.deposit != undefined) { + this.deposit = data.deposit; + } + } + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get recipient() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set recipient(value: string) { + pb_1.Message.setField(this, 3, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set amount(value: string) { + pb_1.Message.setField(this, 4, value); + } + get deposit() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set deposit(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + title?: string; + description?: string; + recipient?: string; + amount?: string; + deposit?: string; + }): CommunityPoolSpendProposalWithDeposit { + const message = new CommunityPoolSpendProposalWithDeposit({}); + if (data.title != null) { + message.title = data.title; + } + if (data.description != null) { + message.description = data.description; + } + if (data.recipient != null) { + message.recipient = data.recipient; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.deposit != null) { + message.deposit = data.deposit; + } + return message; + } + toObject() { + const data: { + title?: string; + description?: string; + recipient?: string; + amount?: string; + deposit?: string; + } = {}; + if (this.title != null) { + data.title = this.title; + } + if (this.description != null) { + data.description = this.description; + } + if (this.recipient != null) { + data.recipient = this.recipient; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.deposit != null) { + data.deposit = this.deposit; + } + 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.title.length) + writer.writeString(1, this.title); + if (this.description.length) + writer.writeString(2, this.description); + if (this.recipient.length) + writer.writeString(3, this.recipient); + if (this.amount.length) + writer.writeString(4, this.amount); + if (this.deposit.length) + writer.writeString(5, this.deposit); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommunityPoolSpendProposalWithDeposit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommunityPoolSpendProposalWithDeposit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.title = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + message.recipient = reader.readString(); + break; + case 4: + message.amount = reader.readString(); + break; + case 5: + message.deposit = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommunityPoolSpendProposalWithDeposit { + return CommunityPoolSpendProposalWithDeposit.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/distribution/v1beta1/distribution_pb.d.ts b/codegen/cosmos/distribution/v1beta1/distribution_pb.d.ts similarity index 100% rename from proto/cosmos/distribution/v1beta1/distribution_pb.d.ts rename to codegen/cosmos/distribution/v1beta1/distribution_pb.d.ts diff --git a/proto/cosmos/distribution/v1beta1/distribution_pb.js b/codegen/cosmos/distribution/v1beta1/distribution_pb.js similarity index 100% rename from proto/cosmos/distribution/v1beta1/distribution_pb.js rename to codegen/cosmos/distribution/v1beta1/distribution_pb.js diff --git a/proto/cosmos/distribution/v1beta1/distribution_pb_service.d.ts b/codegen/cosmos/distribution/v1beta1/distribution_pb_service.d.ts similarity index 100% rename from proto/cosmos/distribution/v1beta1/distribution_pb_service.d.ts rename to codegen/cosmos/distribution/v1beta1/distribution_pb_service.d.ts diff --git a/proto/cosmos/distribution/v1beta1/distribution_pb_service.js b/codegen/cosmos/distribution/v1beta1/distribution_pb_service.js similarity index 100% rename from proto/cosmos/distribution/v1beta1/distribution_pb_service.js rename to codegen/cosmos/distribution/v1beta1/distribution_pb_service.js diff --git a/codegen/cosmos/distribution/v1beta1/genesis.ts b/codegen/cosmos/distribution/v1beta1/genesis.ts new file mode 100644 index 0000000..e5628be --- /dev/null +++ b/codegen/cosmos/distribution/v1beta1/genesis.ts @@ -0,0 +1,1030 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/distribution/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../base/v1beta1/coin"; +import * as dependency_3 from "./distribution"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.distribution.v1beta1 { + export class DelegatorWithdrawInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + withdraw_address?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("withdraw_address" in data && data.withdraw_address != undefined) { + this.withdraw_address = data.withdraw_address; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get withdraw_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set withdraw_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + delegator_address?: string; + withdraw_address?: string; + }): DelegatorWithdrawInfo { + const message = new DelegatorWithdrawInfo({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.withdraw_address != null) { + message.withdraw_address = data.withdraw_address; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + withdraw_address?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.withdraw_address != null) { + data.withdraw_address = this.withdraw_address; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.withdraw_address.length) + writer.writeString(2, this.withdraw_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DelegatorWithdrawInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DelegatorWithdrawInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.withdraw_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DelegatorWithdrawInfo { + return DelegatorWithdrawInfo.deserialize(bytes); + } + } + export class ValidatorOutstandingRewardsRecord extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: string; + outstanding_rewards?: dependency_2.cosmos.base.v1beta1.DecCoin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("outstanding_rewards" in data && data.outstanding_rewards != undefined) { + this.outstanding_rewards = data.outstanding_rewards; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get outstanding_rewards() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.DecCoin, 2) as dependency_2.cosmos.base.v1beta1.DecCoin[]; + } + set outstanding_rewards(value: dependency_2.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + validator_address?: string; + outstanding_rewards?: ReturnType[]; + }): ValidatorOutstandingRewardsRecord { + const message = new ValidatorOutstandingRewardsRecord({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.outstanding_rewards != null) { + message.outstanding_rewards = data.outstanding_rewards.map(item => dependency_2.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + validator_address?: string; + outstanding_rewards?: ReturnType[]; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.outstanding_rewards != null) { + data.outstanding_rewards = this.outstanding_rewards.map((item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.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.validator_address.length) + writer.writeString(1, this.validator_address); + if (this.outstanding_rewards.length) + writer.writeRepeatedMessage(2, this.outstanding_rewards, (item: dependency_2.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorOutstandingRewardsRecord { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorOutstandingRewardsRecord(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + case 2: + reader.readMessage(message.outstanding_rewards, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_2.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorOutstandingRewardsRecord { + return ValidatorOutstandingRewardsRecord.deserialize(bytes); + } + } + export class ValidatorAccumulatedCommissionRecord extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: string; + accumulated?: dependency_3.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("accumulated" in data && data.accumulated != undefined) { + this.accumulated = data.accumulated; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get accumulated() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission, 2) as dependency_3.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + } + set accumulated(value: dependency_3.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_accumulated() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + validator_address?: string; + accumulated?: ReturnType; + }): ValidatorAccumulatedCommissionRecord { + const message = new ValidatorAccumulatedCommissionRecord({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.accumulated != null) { + message.accumulated = dependency_3.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.fromObject(data.accumulated); + } + return message; + } + toObject() { + const data: { + validator_address?: string; + accumulated?: ReturnType; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.accumulated != null) { + data.accumulated = this.accumulated.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.validator_address.length) + writer.writeString(1, this.validator_address); + if (this.has_accumulated) + writer.writeMessage(2, this.accumulated, () => this.accumulated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorAccumulatedCommissionRecord { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorAccumulatedCommissionRecord(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + case 2: + reader.readMessage(message.accumulated, () => message.accumulated = dependency_3.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorAccumulatedCommissionRecord { + return ValidatorAccumulatedCommissionRecord.deserialize(bytes); + } + } + export class ValidatorHistoricalRewardsRecord extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: string; + period?: number; + rewards?: dependency_3.cosmos.distribution.v1beta1.ValidatorHistoricalRewards; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("period" in data && data.period != undefined) { + this.period = data.period; + } + if ("rewards" in data && data.rewards != undefined) { + this.rewards = data.rewards; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get period() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set period(value: number) { + pb_1.Message.setField(this, 2, value); + } + get rewards() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.distribution.v1beta1.ValidatorHistoricalRewards, 3) as dependency_3.cosmos.distribution.v1beta1.ValidatorHistoricalRewards; + } + set rewards(value: dependency_3.cosmos.distribution.v1beta1.ValidatorHistoricalRewards) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_rewards() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + validator_address?: string; + period?: number; + rewards?: ReturnType; + }): ValidatorHistoricalRewardsRecord { + const message = new ValidatorHistoricalRewardsRecord({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.period != null) { + message.period = data.period; + } + if (data.rewards != null) { + message.rewards = dependency_3.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.fromObject(data.rewards); + } + return message; + } + toObject() { + const data: { + validator_address?: string; + period?: number; + rewards?: ReturnType; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.period != null) { + data.period = this.period; + } + if (this.rewards != null) { + data.rewards = this.rewards.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.validator_address.length) + writer.writeString(1, this.validator_address); + if (this.period != 0) + writer.writeUint64(2, this.period); + if (this.has_rewards) + writer.writeMessage(3, this.rewards, () => this.rewards.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorHistoricalRewardsRecord { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorHistoricalRewardsRecord(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + case 2: + message.period = reader.readUint64(); + break; + case 3: + reader.readMessage(message.rewards, () => message.rewards = dependency_3.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorHistoricalRewardsRecord { + return ValidatorHistoricalRewardsRecord.deserialize(bytes); + } + } + export class ValidatorCurrentRewardsRecord extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: string; + rewards?: dependency_3.cosmos.distribution.v1beta1.ValidatorCurrentRewards; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("rewards" in data && data.rewards != undefined) { + this.rewards = data.rewards; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get rewards() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.distribution.v1beta1.ValidatorCurrentRewards, 2) as dependency_3.cosmos.distribution.v1beta1.ValidatorCurrentRewards; + } + set rewards(value: dependency_3.cosmos.distribution.v1beta1.ValidatorCurrentRewards) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_rewards() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + validator_address?: string; + rewards?: ReturnType; + }): ValidatorCurrentRewardsRecord { + const message = new ValidatorCurrentRewardsRecord({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.rewards != null) { + message.rewards = dependency_3.cosmos.distribution.v1beta1.ValidatorCurrentRewards.fromObject(data.rewards); + } + return message; + } + toObject() { + const data: { + validator_address?: string; + rewards?: ReturnType; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.rewards != null) { + data.rewards = this.rewards.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.validator_address.length) + writer.writeString(1, this.validator_address); + if (this.has_rewards) + writer.writeMessage(2, this.rewards, () => this.rewards.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorCurrentRewardsRecord { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorCurrentRewardsRecord(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + case 2: + reader.readMessage(message.rewards, () => message.rewards = dependency_3.cosmos.distribution.v1beta1.ValidatorCurrentRewards.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorCurrentRewardsRecord { + return ValidatorCurrentRewardsRecord.deserialize(bytes); + } + } + export class DelegatorStartingInfoRecord extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_address?: string; + starting_info?: dependency_3.cosmos.distribution.v1beta1.DelegatorStartingInfo; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("starting_info" in data && data.starting_info != undefined) { + this.starting_info = data.starting_info; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get starting_info() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.distribution.v1beta1.DelegatorStartingInfo, 3) as dependency_3.cosmos.distribution.v1beta1.DelegatorStartingInfo; + } + set starting_info(value: dependency_3.cosmos.distribution.v1beta1.DelegatorStartingInfo) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_starting_info() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + delegator_address?: string; + validator_address?: string; + starting_info?: ReturnType; + }): DelegatorStartingInfoRecord { + const message = new DelegatorStartingInfoRecord({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.starting_info != null) { + message.starting_info = dependency_3.cosmos.distribution.v1beta1.DelegatorStartingInfo.fromObject(data.starting_info); + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_address?: string; + starting_info?: ReturnType; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.starting_info != null) { + data.starting_info = this.starting_info.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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (this.has_starting_info) + writer.writeMessage(3, this.starting_info, () => this.starting_info.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DelegatorStartingInfoRecord { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DelegatorStartingInfoRecord(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + case 3: + reader.readMessage(message.starting_info, () => message.starting_info = dependency_3.cosmos.distribution.v1beta1.DelegatorStartingInfo.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DelegatorStartingInfoRecord { + return DelegatorStartingInfoRecord.deserialize(bytes); + } + } + export class ValidatorSlashEventRecord extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: string; + height?: number; + period?: number; + validator_slash_event?: dependency_3.cosmos.distribution.v1beta1.ValidatorSlashEvent; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("period" in data && data.period != undefined) { + this.period = data.period; + } + if ("validator_slash_event" in data && data.validator_slash_event != undefined) { + this.validator_slash_event = data.validator_slash_event; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get period() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set period(value: number) { + pb_1.Message.setField(this, 3, value); + } + get validator_slash_event() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.distribution.v1beta1.ValidatorSlashEvent, 4) as dependency_3.cosmos.distribution.v1beta1.ValidatorSlashEvent; + } + set validator_slash_event(value: dependency_3.cosmos.distribution.v1beta1.ValidatorSlashEvent) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_validator_slash_event() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + validator_address?: string; + height?: number; + period?: number; + validator_slash_event?: ReturnType; + }): ValidatorSlashEventRecord { + const message = new ValidatorSlashEventRecord({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.height != null) { + message.height = data.height; + } + if (data.period != null) { + message.period = data.period; + } + if (data.validator_slash_event != null) { + message.validator_slash_event = dependency_3.cosmos.distribution.v1beta1.ValidatorSlashEvent.fromObject(data.validator_slash_event); + } + return message; + } + toObject() { + const data: { + validator_address?: string; + height?: number; + period?: number; + validator_slash_event?: ReturnType; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.height != null) { + data.height = this.height; + } + if (this.period != null) { + data.period = this.period; + } + if (this.validator_slash_event != null) { + data.validator_slash_event = this.validator_slash_event.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.validator_address.length) + writer.writeString(1, this.validator_address); + if (this.height != 0) + writer.writeUint64(2, this.height); + if (this.period != 0) + writer.writeUint64(3, this.period); + if (this.has_validator_slash_event) + writer.writeMessage(4, this.validator_slash_event, () => this.validator_slash_event.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorSlashEventRecord { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorSlashEventRecord(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + case 2: + message.height = reader.readUint64(); + break; + case 3: + message.period = reader.readUint64(); + break; + case 4: + reader.readMessage(message.validator_slash_event, () => message.validator_slash_event = dependency_3.cosmos.distribution.v1beta1.ValidatorSlashEvent.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorSlashEventRecord { + return ValidatorSlashEventRecord.deserialize(bytes); + } + } + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_3.cosmos.distribution.v1beta1.Params; + fee_pool?: dependency_3.cosmos.distribution.v1beta1.FeePool; + delegator_withdraw_infos?: DelegatorWithdrawInfo[]; + previous_proposer?: string; + outstanding_rewards?: ValidatorOutstandingRewardsRecord[]; + validator_accumulated_commissions?: ValidatorAccumulatedCommissionRecord[]; + validator_historical_rewards?: ValidatorHistoricalRewardsRecord[]; + validator_current_rewards?: ValidatorCurrentRewardsRecord[]; + delegator_starting_infos?: DelegatorStartingInfoRecord[]; + validator_slash_events?: ValidatorSlashEventRecord[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 5, 6, 7, 8, 9, 10], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("fee_pool" in data && data.fee_pool != undefined) { + this.fee_pool = data.fee_pool; + } + if ("delegator_withdraw_infos" in data && data.delegator_withdraw_infos != undefined) { + this.delegator_withdraw_infos = data.delegator_withdraw_infos; + } + if ("previous_proposer" in data && data.previous_proposer != undefined) { + this.previous_proposer = data.previous_proposer; + } + if ("outstanding_rewards" in data && data.outstanding_rewards != undefined) { + this.outstanding_rewards = data.outstanding_rewards; + } + if ("validator_accumulated_commissions" in data && data.validator_accumulated_commissions != undefined) { + this.validator_accumulated_commissions = data.validator_accumulated_commissions; + } + if ("validator_historical_rewards" in data && data.validator_historical_rewards != undefined) { + this.validator_historical_rewards = data.validator_historical_rewards; + } + if ("validator_current_rewards" in data && data.validator_current_rewards != undefined) { + this.validator_current_rewards = data.validator_current_rewards; + } + if ("delegator_starting_infos" in data && data.delegator_starting_infos != undefined) { + this.delegator_starting_infos = data.delegator_starting_infos; + } + if ("validator_slash_events" in data && data.validator_slash_events != undefined) { + this.validator_slash_events = data.validator_slash_events; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.distribution.v1beta1.Params, 1) as dependency_3.cosmos.distribution.v1beta1.Params; + } + set params(value: dependency_3.cosmos.distribution.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get fee_pool() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.distribution.v1beta1.FeePool, 2) as dependency_3.cosmos.distribution.v1beta1.FeePool; + } + set fee_pool(value: dependency_3.cosmos.distribution.v1beta1.FeePool) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_fee_pool() { + return pb_1.Message.getField(this, 2) != null; + } + get delegator_withdraw_infos() { + return pb_1.Message.getRepeatedWrapperField(this, DelegatorWithdrawInfo, 3) as DelegatorWithdrawInfo[]; + } + set delegator_withdraw_infos(value: DelegatorWithdrawInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get previous_proposer() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set previous_proposer(value: string) { + pb_1.Message.setField(this, 4, value); + } + get outstanding_rewards() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorOutstandingRewardsRecord, 5) as ValidatorOutstandingRewardsRecord[]; + } + set outstanding_rewards(value: ValidatorOutstandingRewardsRecord[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get validator_accumulated_commissions() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorAccumulatedCommissionRecord, 6) as ValidatorAccumulatedCommissionRecord[]; + } + set validator_accumulated_commissions(value: ValidatorAccumulatedCommissionRecord[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get validator_historical_rewards() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorHistoricalRewardsRecord, 7) as ValidatorHistoricalRewardsRecord[]; + } + set validator_historical_rewards(value: ValidatorHistoricalRewardsRecord[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get validator_current_rewards() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorCurrentRewardsRecord, 8) as ValidatorCurrentRewardsRecord[]; + } + set validator_current_rewards(value: ValidatorCurrentRewardsRecord[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + get delegator_starting_infos() { + return pb_1.Message.getRepeatedWrapperField(this, DelegatorStartingInfoRecord, 9) as DelegatorStartingInfoRecord[]; + } + set delegator_starting_infos(value: DelegatorStartingInfoRecord[]) { + pb_1.Message.setRepeatedWrapperField(this, 9, value); + } + get validator_slash_events() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorSlashEventRecord, 10) as ValidatorSlashEventRecord[]; + } + set validator_slash_events(value: ValidatorSlashEventRecord[]) { + pb_1.Message.setRepeatedWrapperField(this, 10, value); + } + static fromObject(data: { + params?: ReturnType; + fee_pool?: ReturnType; + delegator_withdraw_infos?: ReturnType[]; + previous_proposer?: string; + outstanding_rewards?: ReturnType[]; + validator_accumulated_commissions?: ReturnType[]; + validator_historical_rewards?: ReturnType[]; + validator_current_rewards?: ReturnType[]; + delegator_starting_infos?: ReturnType[]; + validator_slash_events?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = dependency_3.cosmos.distribution.v1beta1.Params.fromObject(data.params); + } + if (data.fee_pool != null) { + message.fee_pool = dependency_3.cosmos.distribution.v1beta1.FeePool.fromObject(data.fee_pool); + } + if (data.delegator_withdraw_infos != null) { + message.delegator_withdraw_infos = data.delegator_withdraw_infos.map(item => DelegatorWithdrawInfo.fromObject(item)); + } + if (data.previous_proposer != null) { + message.previous_proposer = data.previous_proposer; + } + if (data.outstanding_rewards != null) { + message.outstanding_rewards = data.outstanding_rewards.map(item => ValidatorOutstandingRewardsRecord.fromObject(item)); + } + if (data.validator_accumulated_commissions != null) { + message.validator_accumulated_commissions = data.validator_accumulated_commissions.map(item => ValidatorAccumulatedCommissionRecord.fromObject(item)); + } + if (data.validator_historical_rewards != null) { + message.validator_historical_rewards = data.validator_historical_rewards.map(item => ValidatorHistoricalRewardsRecord.fromObject(item)); + } + if (data.validator_current_rewards != null) { + message.validator_current_rewards = data.validator_current_rewards.map(item => ValidatorCurrentRewardsRecord.fromObject(item)); + } + if (data.delegator_starting_infos != null) { + message.delegator_starting_infos = data.delegator_starting_infos.map(item => DelegatorStartingInfoRecord.fromObject(item)); + } + if (data.validator_slash_events != null) { + message.validator_slash_events = data.validator_slash_events.map(item => ValidatorSlashEventRecord.fromObject(item)); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + fee_pool?: ReturnType; + delegator_withdraw_infos?: ReturnType[]; + previous_proposer?: string; + outstanding_rewards?: ReturnType[]; + validator_accumulated_commissions?: ReturnType[]; + validator_historical_rewards?: ReturnType[]; + validator_current_rewards?: ReturnType[]; + delegator_starting_infos?: ReturnType[]; + validator_slash_events?: ReturnType[]; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.fee_pool != null) { + data.fee_pool = this.fee_pool.toObject(); + } + if (this.delegator_withdraw_infos != null) { + data.delegator_withdraw_infos = this.delegator_withdraw_infos.map((item: DelegatorWithdrawInfo) => item.toObject()); + } + if (this.previous_proposer != null) { + data.previous_proposer = this.previous_proposer; + } + if (this.outstanding_rewards != null) { + data.outstanding_rewards = this.outstanding_rewards.map((item: ValidatorOutstandingRewardsRecord) => item.toObject()); + } + if (this.validator_accumulated_commissions != null) { + data.validator_accumulated_commissions = this.validator_accumulated_commissions.map((item: ValidatorAccumulatedCommissionRecord) => item.toObject()); + } + if (this.validator_historical_rewards != null) { + data.validator_historical_rewards = this.validator_historical_rewards.map((item: ValidatorHistoricalRewardsRecord) => item.toObject()); + } + if (this.validator_current_rewards != null) { + data.validator_current_rewards = this.validator_current_rewards.map((item: ValidatorCurrentRewardsRecord) => item.toObject()); + } + if (this.delegator_starting_infos != null) { + data.delegator_starting_infos = this.delegator_starting_infos.map((item: DelegatorStartingInfoRecord) => item.toObject()); + } + if (this.validator_slash_events != null) { + data.validator_slash_events = this.validator_slash_events.map((item: ValidatorSlashEventRecord) => item.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.has_fee_pool) + writer.writeMessage(2, this.fee_pool, () => this.fee_pool.serialize(writer)); + if (this.delegator_withdraw_infos.length) + writer.writeRepeatedMessage(3, this.delegator_withdraw_infos, (item: DelegatorWithdrawInfo) => item.serialize(writer)); + if (this.previous_proposer.length) + writer.writeString(4, this.previous_proposer); + if (this.outstanding_rewards.length) + writer.writeRepeatedMessage(5, this.outstanding_rewards, (item: ValidatorOutstandingRewardsRecord) => item.serialize(writer)); + if (this.validator_accumulated_commissions.length) + writer.writeRepeatedMessage(6, this.validator_accumulated_commissions, (item: ValidatorAccumulatedCommissionRecord) => item.serialize(writer)); + if (this.validator_historical_rewards.length) + writer.writeRepeatedMessage(7, this.validator_historical_rewards, (item: ValidatorHistoricalRewardsRecord) => item.serialize(writer)); + if (this.validator_current_rewards.length) + writer.writeRepeatedMessage(8, this.validator_current_rewards, (item: ValidatorCurrentRewardsRecord) => item.serialize(writer)); + if (this.delegator_starting_infos.length) + writer.writeRepeatedMessage(9, this.delegator_starting_infos, (item: DelegatorStartingInfoRecord) => item.serialize(writer)); + if (this.validator_slash_events.length) + writer.writeRepeatedMessage(10, this.validator_slash_events, (item: ValidatorSlashEventRecord) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_3.cosmos.distribution.v1beta1.Params.deserialize(reader)); + break; + case 2: + reader.readMessage(message.fee_pool, () => message.fee_pool = dependency_3.cosmos.distribution.v1beta1.FeePool.deserialize(reader)); + break; + case 3: + reader.readMessage(message.delegator_withdraw_infos, () => pb_1.Message.addToRepeatedWrapperField(message, 3, DelegatorWithdrawInfo.deserialize(reader), DelegatorWithdrawInfo)); + break; + case 4: + message.previous_proposer = reader.readString(); + break; + case 5: + reader.readMessage(message.outstanding_rewards, () => pb_1.Message.addToRepeatedWrapperField(message, 5, ValidatorOutstandingRewardsRecord.deserialize(reader), ValidatorOutstandingRewardsRecord)); + break; + case 6: + reader.readMessage(message.validator_accumulated_commissions, () => pb_1.Message.addToRepeatedWrapperField(message, 6, ValidatorAccumulatedCommissionRecord.deserialize(reader), ValidatorAccumulatedCommissionRecord)); + break; + case 7: + reader.readMessage(message.validator_historical_rewards, () => pb_1.Message.addToRepeatedWrapperField(message, 7, ValidatorHistoricalRewardsRecord.deserialize(reader), ValidatorHistoricalRewardsRecord)); + break; + case 8: + reader.readMessage(message.validator_current_rewards, () => pb_1.Message.addToRepeatedWrapperField(message, 8, ValidatorCurrentRewardsRecord.deserialize(reader), ValidatorCurrentRewardsRecord)); + break; + case 9: + reader.readMessage(message.delegator_starting_infos, () => pb_1.Message.addToRepeatedWrapperField(message, 9, DelegatorStartingInfoRecord.deserialize(reader), DelegatorStartingInfoRecord)); + break; + case 10: + reader.readMessage(message.validator_slash_events, () => pb_1.Message.addToRepeatedWrapperField(message, 10, ValidatorSlashEventRecord.deserialize(reader), ValidatorSlashEventRecord)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/distribution/v1beta1/genesis_pb.d.ts b/codegen/cosmos/distribution/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/distribution/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/distribution/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/distribution/v1beta1/genesis_pb.js b/codegen/cosmos/distribution/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/distribution/v1beta1/genesis_pb.js rename to codegen/cosmos/distribution/v1beta1/genesis_pb.js diff --git a/proto/cosmos/distribution/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/distribution/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/distribution/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/distribution/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/distribution/v1beta1/genesis_pb_service.js b/codegen/cosmos/distribution/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/distribution/v1beta1/genesis_pb_service.js rename to codegen/cosmos/distribution/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/distribution/v1beta1/query.ts b/codegen/cosmos/distribution/v1beta1/query.ts new file mode 100644 index 0000000..7ec2974 --- /dev/null +++ b/codegen/cosmos/distribution/v1beta1/query.ts @@ -0,0 +1,1665 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/distribution/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/api/annotations"; +import * as dependency_4 from "./../../base/v1beta1/coin"; +import * as dependency_5 from "./distribution"; +import * as dependency_6 from "./../../../cosmos_proto/cosmos"; +import * as dependency_7 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.distribution.v1beta1 { + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_5.cosmos.distribution.v1beta1.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_5.cosmos.distribution.v1beta1.Params, 1) as dependency_5.cosmos.distribution.v1beta1.Params; + } + set params(value: dependency_5.cosmos.distribution.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_5.cosmos.distribution.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_5.cosmos.distribution.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QueryValidatorDistributionInfoRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: 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 ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator_address?: string; + }): QueryValidatorDistributionInfoRequest { + const message = new QueryValidatorDistributionInfoRequest({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + validator_address?: string; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.validator_address.length) + writer.writeString(1, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorDistributionInfoRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorDistributionInfoRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorDistributionInfoRequest { + return QueryValidatorDistributionInfoRequest.deserialize(bytes); + } + } + export class QueryValidatorDistributionInfoResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + operator_address?: string; + self_bond_rewards?: dependency_4.cosmos.base.v1beta1.DecCoin[]; + commission?: dependency_4.cosmos.base.v1beta1.DecCoin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("operator_address" in data && data.operator_address != undefined) { + this.operator_address = data.operator_address; + } + if ("self_bond_rewards" in data && data.self_bond_rewards != undefined) { + this.self_bond_rewards = data.self_bond_rewards; + } + if ("commission" in data && data.commission != undefined) { + this.commission = data.commission; + } + } + } + get operator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set operator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get self_bond_rewards() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.DecCoin, 2) as dependency_4.cosmos.base.v1beta1.DecCoin[]; + } + set self_bond_rewards(value: dependency_4.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get commission() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.DecCoin, 3) as dependency_4.cosmos.base.v1beta1.DecCoin[]; + } + set commission(value: dependency_4.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + operator_address?: string; + self_bond_rewards?: ReturnType[]; + commission?: ReturnType[]; + }): QueryValidatorDistributionInfoResponse { + const message = new QueryValidatorDistributionInfoResponse({}); + if (data.operator_address != null) { + message.operator_address = data.operator_address; + } + if (data.self_bond_rewards != null) { + message.self_bond_rewards = data.self_bond_rewards.map(item => dependency_4.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + if (data.commission != null) { + message.commission = data.commission.map(item => dependency_4.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + operator_address?: string; + self_bond_rewards?: ReturnType[]; + commission?: ReturnType[]; + } = {}; + if (this.operator_address != null) { + data.operator_address = this.operator_address; + } + if (this.self_bond_rewards != null) { + data.self_bond_rewards = this.self_bond_rewards.map((item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.toObject()); + } + if (this.commission != null) { + data.commission = this.commission.map((item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.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.operator_address.length) + writer.writeString(1, this.operator_address); + if (this.self_bond_rewards.length) + writer.writeRepeatedMessage(2, this.self_bond_rewards, (item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (this.commission.length) + writer.writeRepeatedMessage(3, this.commission, (item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorDistributionInfoResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorDistributionInfoResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.operator_address = reader.readString(); + break; + case 2: + reader.readMessage(message.self_bond_rewards, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_4.cosmos.base.v1beta1.DecCoin)); + break; + case 3: + reader.readMessage(message.commission, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_4.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_4.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorDistributionInfoResponse { + return QueryValidatorDistributionInfoResponse.deserialize(bytes); + } + } + export class QueryValidatorOutstandingRewardsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: 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 ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator_address?: string; + }): QueryValidatorOutstandingRewardsRequest { + const message = new QueryValidatorOutstandingRewardsRequest({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + validator_address?: string; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.validator_address.length) + writer.writeString(1, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorOutstandingRewardsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorOutstandingRewardsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorOutstandingRewardsRequest { + return QueryValidatorOutstandingRewardsRequest.deserialize(bytes); + } + } + export class QueryValidatorOutstandingRewardsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + rewards?: dependency_5.cosmos.distribution.v1beta1.ValidatorOutstandingRewards; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("rewards" in data && data.rewards != undefined) { + this.rewards = data.rewards; + } + } + } + get rewards() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.distribution.v1beta1.ValidatorOutstandingRewards, 1) as dependency_5.cosmos.distribution.v1beta1.ValidatorOutstandingRewards; + } + set rewards(value: dependency_5.cosmos.distribution.v1beta1.ValidatorOutstandingRewards) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_rewards() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + rewards?: ReturnType; + }): QueryValidatorOutstandingRewardsResponse { + const message = new QueryValidatorOutstandingRewardsResponse({}); + if (data.rewards != null) { + message.rewards = dependency_5.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.fromObject(data.rewards); + } + return message; + } + toObject() { + const data: { + rewards?: ReturnType; + } = {}; + if (this.rewards != null) { + data.rewards = this.rewards.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_rewards) + writer.writeMessage(1, this.rewards, () => this.rewards.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorOutstandingRewardsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorOutstandingRewardsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.rewards, () => message.rewards = dependency_5.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorOutstandingRewardsResponse { + return QueryValidatorOutstandingRewardsResponse.deserialize(bytes); + } + } + export class QueryValidatorCommissionRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: 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 ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator_address?: string; + }): QueryValidatorCommissionRequest { + const message = new QueryValidatorCommissionRequest({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + validator_address?: string; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.validator_address.length) + writer.writeString(1, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorCommissionRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorCommissionRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorCommissionRequest { + return QueryValidatorCommissionRequest.deserialize(bytes); + } + } + export class QueryValidatorCommissionResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + commission?: dependency_5.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("commission" in data && data.commission != undefined) { + this.commission = data.commission; + } + } + } + get commission() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission, 1) as dependency_5.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + } + set commission(value: dependency_5.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_commission() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + commission?: ReturnType; + }): QueryValidatorCommissionResponse { + const message = new QueryValidatorCommissionResponse({}); + if (data.commission != null) { + message.commission = dependency_5.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.fromObject(data.commission); + } + return message; + } + toObject() { + const data: { + commission?: ReturnType; + } = {}; + if (this.commission != null) { + data.commission = this.commission.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_commission) + writer.writeMessage(1, this.commission, () => this.commission.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorCommissionResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorCommissionResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.commission, () => message.commission = dependency_5.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorCommissionResponse { + return QueryValidatorCommissionResponse.deserialize(bytes); + } + } + export class QueryValidatorSlashesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: string; + starting_height?: number; + ending_height?: number; + pagination?: dependency_1.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 ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("starting_height" in data && data.starting_height != undefined) { + this.starting_height = data.starting_height; + } + if ("ending_height" in data && data.ending_height != undefined) { + this.ending_height = data.ending_height; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get starting_height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set starting_height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get ending_height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set ending_height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 4) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + validator_address?: string; + starting_height?: number; + ending_height?: number; + pagination?: ReturnType; + }): QueryValidatorSlashesRequest { + const message = new QueryValidatorSlashesRequest({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.starting_height != null) { + message.starting_height = data.starting_height; + } + if (data.ending_height != null) { + message.ending_height = data.ending_height; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + validator_address?: string; + starting_height?: number; + ending_height?: number; + pagination?: ReturnType; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.starting_height != null) { + data.starting_height = this.starting_height; + } + if (this.ending_height != null) { + data.ending_height = this.ending_height; + } + 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.validator_address.length) + writer.writeString(1, this.validator_address); + if (this.starting_height != 0) + writer.writeUint64(2, this.starting_height); + if (this.ending_height != 0) + writer.writeUint64(3, this.ending_height); + if (this.has_pagination) + writer.writeMessage(4, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorSlashesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorSlashesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + case 2: + message.starting_height = reader.readUint64(); + break; + case 3: + message.ending_height = reader.readUint64(); + break; + case 4: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorSlashesRequest { + return QueryValidatorSlashesRequest.deserialize(bytes); + } + } + export class QueryValidatorSlashesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + slashes?: dependency_5.cosmos.distribution.v1beta1.ValidatorSlashEvent[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("slashes" in data && data.slashes != undefined) { + this.slashes = data.slashes; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get slashes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.distribution.v1beta1.ValidatorSlashEvent, 1) as dependency_5.cosmos.distribution.v1beta1.ValidatorSlashEvent[]; + } + set slashes(value: dependency_5.cosmos.distribution.v1beta1.ValidatorSlashEvent[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + slashes?: ReturnType[]; + pagination?: ReturnType; + }): QueryValidatorSlashesResponse { + const message = new QueryValidatorSlashesResponse({}); + if (data.slashes != null) { + message.slashes = data.slashes.map(item => dependency_5.cosmos.distribution.v1beta1.ValidatorSlashEvent.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + slashes?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.slashes != null) { + data.slashes = this.slashes.map((item: dependency_5.cosmos.distribution.v1beta1.ValidatorSlashEvent) => item.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.slashes.length) + writer.writeRepeatedMessage(1, this.slashes, (item: dependency_5.cosmos.distribution.v1beta1.ValidatorSlashEvent) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorSlashesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorSlashesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.slashes, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.cosmos.distribution.v1beta1.ValidatorSlashEvent.deserialize(reader), dependency_5.cosmos.distribution.v1beta1.ValidatorSlashEvent)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorSlashesResponse { + return QueryValidatorSlashesResponse.deserialize(bytes); + } + } + export class QueryDelegationRewardsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_address?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + delegator_address?: string; + validator_address?: string; + }): QueryDelegationRewardsRequest { + const message = new QueryDelegationRewardsRequest({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_address?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegationRewardsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegationRewardsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegationRewardsRequest { + return QueryDelegationRewardsRequest.deserialize(bytes); + } + } + export class QueryDelegationRewardsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + rewards?: dependency_4.cosmos.base.v1beta1.DecCoin[]; + }) { + 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 ("rewards" in data && data.rewards != undefined) { + this.rewards = data.rewards; + } + } + } + get rewards() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.DecCoin, 1) as dependency_4.cosmos.base.v1beta1.DecCoin[]; + } + set rewards(value: dependency_4.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + rewards?: ReturnType[]; + }): QueryDelegationRewardsResponse { + const message = new QueryDelegationRewardsResponse({}); + if (data.rewards != null) { + message.rewards = data.rewards.map(item => dependency_4.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + rewards?: ReturnType[]; + } = {}; + if (this.rewards != null) { + data.rewards = this.rewards.map((item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.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.rewards.length) + writer.writeRepeatedMessage(1, this.rewards, (item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegationRewardsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegationRewardsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.rewards, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_4.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegationRewardsResponse { + return QueryDelegationRewardsResponse.deserialize(bytes); + } + } + export class QueryDelegationTotalRewardsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + delegator_address?: string; + }): QueryDelegationTotalRewardsRequest { + const message = new QueryDelegationTotalRewardsRequest({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegationTotalRewardsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegationTotalRewardsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegationTotalRewardsRequest { + return QueryDelegationTotalRewardsRequest.deserialize(bytes); + } + } + export class QueryDelegationTotalRewardsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + rewards?: dependency_5.cosmos.distribution.v1beta1.DelegationDelegatorReward[]; + total?: dependency_4.cosmos.base.v1beta1.DecCoin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("rewards" in data && data.rewards != undefined) { + this.rewards = data.rewards; + } + if ("total" in data && data.total != undefined) { + this.total = data.total; + } + } + } + get rewards() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.distribution.v1beta1.DelegationDelegatorReward, 1) as dependency_5.cosmos.distribution.v1beta1.DelegationDelegatorReward[]; + } + set rewards(value: dependency_5.cosmos.distribution.v1beta1.DelegationDelegatorReward[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get total() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.DecCoin, 2) as dependency_4.cosmos.base.v1beta1.DecCoin[]; + } + set total(value: dependency_4.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + rewards?: ReturnType[]; + total?: ReturnType[]; + }): QueryDelegationTotalRewardsResponse { + const message = new QueryDelegationTotalRewardsResponse({}); + if (data.rewards != null) { + message.rewards = data.rewards.map(item => dependency_5.cosmos.distribution.v1beta1.DelegationDelegatorReward.fromObject(item)); + } + if (data.total != null) { + message.total = data.total.map(item => dependency_4.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + rewards?: ReturnType[]; + total?: ReturnType[]; + } = {}; + if (this.rewards != null) { + data.rewards = this.rewards.map((item: dependency_5.cosmos.distribution.v1beta1.DelegationDelegatorReward) => item.toObject()); + } + if (this.total != null) { + data.total = this.total.map((item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.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.rewards.length) + writer.writeRepeatedMessage(1, this.rewards, (item: dependency_5.cosmos.distribution.v1beta1.DelegationDelegatorReward) => item.serialize(writer)); + if (this.total.length) + writer.writeRepeatedMessage(2, this.total, (item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegationTotalRewardsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegationTotalRewardsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.rewards, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.cosmos.distribution.v1beta1.DelegationDelegatorReward.deserialize(reader), dependency_5.cosmos.distribution.v1beta1.DelegationDelegatorReward)); + break; + case 2: + reader.readMessage(message.total, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_4.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegationTotalRewardsResponse { + return QueryDelegationTotalRewardsResponse.deserialize(bytes); + } + } + export class QueryDelegatorValidatorsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + delegator_address?: string; + }): QueryDelegatorValidatorsRequest { + const message = new QueryDelegatorValidatorsRequest({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorValidatorsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorValidatorsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorValidatorsRequest { + return QueryDelegatorValidatorsRequest.deserialize(bytes); + } + } + export class QueryDelegatorValidatorsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validators?: string[]; + }) { + 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 ("validators" in data && data.validators != undefined) { + this.validators = data.validators; + } + } + } + get validators() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set validators(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validators?: string[]; + }): QueryDelegatorValidatorsResponse { + const message = new QueryDelegatorValidatorsResponse({}); + if (data.validators != null) { + message.validators = data.validators; + } + return message; + } + toObject() { + const data: { + validators?: string[]; + } = {}; + if (this.validators != null) { + data.validators = this.validators; + } + 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.validators.length) + writer.writeRepeatedString(1, this.validators); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorValidatorsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorValidatorsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorValidatorsResponse { + return QueryDelegatorValidatorsResponse.deserialize(bytes); + } + } + export class QueryDelegatorWithdrawAddressRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + delegator_address?: string; + }): QueryDelegatorWithdrawAddressRequest { + const message = new QueryDelegatorWithdrawAddressRequest({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorWithdrawAddressRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorWithdrawAddressRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorWithdrawAddressRequest { + return QueryDelegatorWithdrawAddressRequest.deserialize(bytes); + } + } + export class QueryDelegatorWithdrawAddressResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + withdraw_address?: 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 ("withdraw_address" in data && data.withdraw_address != undefined) { + this.withdraw_address = data.withdraw_address; + } + } + } + get withdraw_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set withdraw_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + withdraw_address?: string; + }): QueryDelegatorWithdrawAddressResponse { + const message = new QueryDelegatorWithdrawAddressResponse({}); + if (data.withdraw_address != null) { + message.withdraw_address = data.withdraw_address; + } + return message; + } + toObject() { + const data: { + withdraw_address?: string; + } = {}; + if (this.withdraw_address != null) { + data.withdraw_address = this.withdraw_address; + } + 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.withdraw_address.length) + writer.writeString(1, this.withdraw_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorWithdrawAddressResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorWithdrawAddressResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.withdraw_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorWithdrawAddressResponse { + return QueryDelegatorWithdrawAddressResponse.deserialize(bytes); + } + } + export class QueryCommunityPoolRequest 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: {}): QueryCommunityPoolRequest { + const message = new QueryCommunityPoolRequest({}); + 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): QueryCommunityPoolRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCommunityPoolRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCommunityPoolRequest { + return QueryCommunityPoolRequest.deserialize(bytes); + } + } + export class QueryCommunityPoolResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pool?: dependency_4.cosmos.base.v1beta1.DecCoin[]; + }) { + 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 ("pool" in data && data.pool != undefined) { + this.pool = data.pool; + } + } + } + get pool() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.DecCoin, 1) as dependency_4.cosmos.base.v1beta1.DecCoin[]; + } + set pool(value: dependency_4.cosmos.base.v1beta1.DecCoin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + pool?: ReturnType[]; + }): QueryCommunityPoolResponse { + const message = new QueryCommunityPoolResponse({}); + if (data.pool != null) { + message.pool = data.pool.map(item => dependency_4.cosmos.base.v1beta1.DecCoin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + pool?: ReturnType[]; + } = {}; + if (this.pool != null) { + data.pool = this.pool.map((item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.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.pool.length) + writer.writeRepeatedMessage(1, this.pool, (item: dependency_4.cosmos.base.v1beta1.DecCoin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCommunityPoolResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCommunityPoolResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pool, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.DecCoin.deserialize(reader), dependency_4.cosmos.base.v1beta1.DecCoin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCommunityPoolResponse { + return QueryCommunityPoolResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Params: { + path: "/cosmos.distribution.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + ValidatorDistributionInfo: { + path: "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorDistributionInfoRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorDistributionInfoRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorDistributionInfoResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorDistributionInfoResponse.deserialize(new Uint8Array(bytes)) + }, + ValidatorOutstandingRewards: { + path: "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorOutstandingRewardsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorOutstandingRewardsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorOutstandingRewardsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorOutstandingRewardsResponse.deserialize(new Uint8Array(bytes)) + }, + ValidatorCommission: { + path: "/cosmos.distribution.v1beta1.Query/ValidatorCommission", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorCommissionRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorCommissionRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorCommissionResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorCommissionResponse.deserialize(new Uint8Array(bytes)) + }, + ValidatorSlashes: { + path: "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorSlashesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorSlashesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorSlashesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorSlashesResponse.deserialize(new Uint8Array(bytes)) + }, + DelegationRewards: { + path: "/cosmos.distribution.v1beta1.Query/DelegationRewards", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDelegationRewardsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDelegationRewardsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDelegationRewardsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDelegationRewardsResponse.deserialize(new Uint8Array(bytes)) + }, + DelegationTotalRewards: { + path: "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDelegationTotalRewardsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDelegationTotalRewardsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDelegationTotalRewardsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDelegationTotalRewardsResponse.deserialize(new Uint8Array(bytes)) + }, + DelegatorValidators: { + path: "/cosmos.distribution.v1beta1.Query/DelegatorValidators", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDelegatorValidatorsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDelegatorValidatorsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDelegatorValidatorsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDelegatorValidatorsResponse.deserialize(new Uint8Array(bytes)) + }, + DelegatorWithdrawAddress: { + path: "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDelegatorWithdrawAddressRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDelegatorWithdrawAddressRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDelegatorWithdrawAddressResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDelegatorWithdrawAddressResponse.deserialize(new Uint8Array(bytes)) + }, + CommunityPool: { + path: "/cosmos.distribution.v1beta1.Query/CommunityPool", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryCommunityPoolRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryCommunityPoolRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryCommunityPoolResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryCommunityPoolResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ValidatorDistributionInfo(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ValidatorOutstandingRewards(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ValidatorCommission(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ValidatorSlashes(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DelegationRewards(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DelegationTotalRewards(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DelegatorValidators(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DelegatorWithdrawAddress(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CommunityPool(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + ValidatorDistributionInfo: GrpcUnaryServiceInterface = (message: QueryValidatorDistributionInfoRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ValidatorDistributionInfo(message, metadata, options, callback); + }; + ValidatorOutstandingRewards: GrpcUnaryServiceInterface = (message: QueryValidatorOutstandingRewardsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ValidatorOutstandingRewards(message, metadata, options, callback); + }; + ValidatorCommission: GrpcUnaryServiceInterface = (message: QueryValidatorCommissionRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ValidatorCommission(message, metadata, options, callback); + }; + ValidatorSlashes: GrpcUnaryServiceInterface = (message: QueryValidatorSlashesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ValidatorSlashes(message, metadata, options, callback); + }; + DelegationRewards: GrpcUnaryServiceInterface = (message: QueryDelegationRewardsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DelegationRewards(message, metadata, options, callback); + }; + DelegationTotalRewards: GrpcUnaryServiceInterface = (message: QueryDelegationTotalRewardsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DelegationTotalRewards(message, metadata, options, callback); + }; + DelegatorValidators: GrpcUnaryServiceInterface = (message: QueryDelegatorValidatorsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DelegatorValidators(message, metadata, options, callback); + }; + DelegatorWithdrawAddress: GrpcUnaryServiceInterface = (message: QueryDelegatorWithdrawAddressRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DelegatorWithdrawAddress(message, metadata, options, callback); + }; + CommunityPool: GrpcUnaryServiceInterface = (message: QueryCommunityPoolRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CommunityPool(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/distribution/v1beta1/query_pb.d.ts b/codegen/cosmos/distribution/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/distribution/v1beta1/query_pb.d.ts rename to codegen/cosmos/distribution/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/distribution/v1beta1/query_pb.js b/codegen/cosmos/distribution/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/distribution/v1beta1/query_pb.js rename to codegen/cosmos/distribution/v1beta1/query_pb.js diff --git a/proto/cosmos/distribution/v1beta1/query_pb_service.d.ts b/codegen/cosmos/distribution/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/distribution/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/distribution/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/distribution/v1beta1/query_pb_service.js b/codegen/cosmos/distribution/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/distribution/v1beta1/query_pb_service.js rename to codegen/cosmos/distribution/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/distribution/v1beta1/tx.ts b/codegen/cosmos/distribution/v1beta1/tx.ts new file mode 100644 index 0000000..85751c4 --- /dev/null +++ b/codegen/cosmos/distribution/v1beta1/tx.ts @@ -0,0 +1,1130 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/distribution/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../base/v1beta1/coin"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../msg/v1/msg"; +import * as dependency_5 from "./../../../amino/amino"; +import * as dependency_6 from "./distribution"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.distribution.v1beta1 { + export class MsgSetWithdrawAddress extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + withdraw_address?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("withdraw_address" in data && data.withdraw_address != undefined) { + this.withdraw_address = data.withdraw_address; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get withdraw_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set withdraw_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + delegator_address?: string; + withdraw_address?: string; + }): MsgSetWithdrawAddress { + const message = new MsgSetWithdrawAddress({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.withdraw_address != null) { + message.withdraw_address = data.withdraw_address; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + withdraw_address?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.withdraw_address != null) { + data.withdraw_address = this.withdraw_address; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.withdraw_address.length) + writer.writeString(2, this.withdraw_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetWithdrawAddress { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetWithdrawAddress(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.withdraw_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSetWithdrawAddress { + return MsgSetWithdrawAddress.deserialize(bytes); + } + } + export class MsgSetWithdrawAddressResponse 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: {}): MsgSetWithdrawAddressResponse { + const message = new MsgSetWithdrawAddressResponse({}); + 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): MsgSetWithdrawAddressResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetWithdrawAddressResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSetWithdrawAddressResponse { + return MsgSetWithdrawAddressResponse.deserialize(bytes); + } + } + export class MsgWithdrawDelegatorReward extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_address?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + delegator_address?: string; + validator_address?: string; + }): MsgWithdrawDelegatorReward { + const message = new MsgWithdrawDelegatorReward({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_address?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawDelegatorReward { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawDelegatorReward(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgWithdrawDelegatorReward { + return MsgWithdrawDelegatorReward.deserialize(bytes); + } + } + export class MsgWithdrawDelegatorRewardResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + 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 ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 1) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + amount?: ReturnType[]; + }): MsgWithdrawDelegatorRewardResponse { + const message = new MsgWithdrawDelegatorRewardResponse({}); + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + amount?: ReturnType[]; + } = {}; + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.amount.length) + writer.writeRepeatedMessage(1, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawDelegatorRewardResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawDelegatorRewardResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgWithdrawDelegatorRewardResponse { + return MsgWithdrawDelegatorRewardResponse.deserialize(bytes); + } + } + export class MsgWithdrawValidatorCommission extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_address?: 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 ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator_address?: string; + }): MsgWithdrawValidatorCommission { + const message = new MsgWithdrawValidatorCommission({}); + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + validator_address?: string; + } = {}; + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.validator_address.length) + writer.writeString(1, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawValidatorCommission { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawValidatorCommission(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgWithdrawValidatorCommission { + return MsgWithdrawValidatorCommission.deserialize(bytes); + } + } + export class MsgWithdrawValidatorCommissionResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + 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 ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 1) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + amount?: ReturnType[]; + }): MsgWithdrawValidatorCommissionResponse { + const message = new MsgWithdrawValidatorCommissionResponse({}); + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + amount?: ReturnType[]; + } = {}; + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.amount.length) + writer.writeRepeatedMessage(1, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawValidatorCommissionResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawValidatorCommissionResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgWithdrawValidatorCommissionResponse { + return MsgWithdrawValidatorCommissionResponse.deserialize(bytes); + } + } + export class MsgFundCommunityPool extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + depositor?: string; + }) { + 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 ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + } + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 1) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + amount?: ReturnType[]; + depositor?: string; + }): MsgFundCommunityPool { + const message = new MsgFundCommunityPool({}); + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + return message; + } + toObject() { + const data: { + amount?: ReturnType[]; + depositor?: string; + } = {}; + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + 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.amount.length) + writer.writeRepeatedMessage(1, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.depositor.length) + writer.writeString(2, this.depositor); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgFundCommunityPool { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgFundCommunityPool(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + case 2: + message.depositor = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgFundCommunityPool { + return MsgFundCommunityPool.deserialize(bytes); + } + } + export class MsgFundCommunityPoolResponse 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: {}): MsgFundCommunityPoolResponse { + const message = new MsgFundCommunityPoolResponse({}); + 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): MsgFundCommunityPoolResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgFundCommunityPoolResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgFundCommunityPoolResponse { + return MsgFundCommunityPoolResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_6.cosmos.distribution.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_6.cosmos.distribution.v1beta1.Params, 2) as dependency_6.cosmos.distribution.v1beta1.Params; + } + set params(value: dependency_6.cosmos.distribution.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_6.cosmos.distribution.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_6.cosmos.distribution.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + export class MsgCommunityPoolSpend extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + recipient?: string; + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("recipient" in data && data.recipient != undefined) { + this.recipient = data.recipient; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get recipient() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set recipient(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + authority?: string; + recipient?: string; + amount?: ReturnType[]; + }): MsgCommunityPoolSpend { + const message = new MsgCommunityPoolSpend({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.recipient != null) { + message.recipient = data.recipient; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + authority?: string; + recipient?: string; + amount?: ReturnType[]; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + if (this.recipient != null) { + data.recipient = this.recipient; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.authority.length) + writer.writeString(1, this.authority); + if (this.recipient.length) + writer.writeString(2, this.recipient); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCommunityPoolSpend { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCommunityPoolSpend(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + message.recipient = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCommunityPoolSpend { + return MsgCommunityPoolSpend.deserialize(bytes); + } + } + export class MsgCommunityPoolSpendResponse 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: {}): MsgCommunityPoolSpendResponse { + const message = new MsgCommunityPoolSpendResponse({}); + 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): MsgCommunityPoolSpendResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCommunityPoolSpendResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCommunityPoolSpendResponse { + return MsgCommunityPoolSpendResponse.deserialize(bytes); + } + } + export class MsgDepositValidatorRewardsPool extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + depositor?: string; + validator_address?: string; + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + depositor?: string; + validator_address?: string; + amount?: ReturnType[]; + }): MsgDepositValidatorRewardsPool { + const message = new MsgDepositValidatorRewardsPool({}); + if (data.depositor != null) { + message.depositor = data.depositor; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + depositor?: string; + validator_address?: string; + amount?: ReturnType[]; + } = {}; + if (this.depositor != null) { + data.depositor = this.depositor; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.depositor.length) + writer.writeString(1, this.depositor); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDepositValidatorRewardsPool { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDepositValidatorRewardsPool(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.depositor = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDepositValidatorRewardsPool { + return MsgDepositValidatorRewardsPool.deserialize(bytes); + } + } + export class MsgDepositValidatorRewardsPoolResponse 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: {}): MsgDepositValidatorRewardsPoolResponse { + const message = new MsgDepositValidatorRewardsPoolResponse({}); + 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): MsgDepositValidatorRewardsPoolResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDepositValidatorRewardsPoolResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDepositValidatorRewardsPoolResponse { + return MsgDepositValidatorRewardsPoolResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + SetWithdrawAddress: { + path: "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSetWithdrawAddress) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSetWithdrawAddress.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSetWithdrawAddressResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSetWithdrawAddressResponse.deserialize(new Uint8Array(bytes)) + }, + WithdrawDelegatorReward: { + path: "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgWithdrawDelegatorReward) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgWithdrawDelegatorReward.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgWithdrawDelegatorRewardResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgWithdrawDelegatorRewardResponse.deserialize(new Uint8Array(bytes)) + }, + WithdrawValidatorCommission: { + path: "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgWithdrawValidatorCommission) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgWithdrawValidatorCommission.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgWithdrawValidatorCommissionResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgWithdrawValidatorCommissionResponse.deserialize(new Uint8Array(bytes)) + }, + FundCommunityPool: { + path: "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgFundCommunityPool) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgFundCommunityPool.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgFundCommunityPoolResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgFundCommunityPoolResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/cosmos.distribution.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + }, + CommunityPoolSpend: { + path: "/cosmos.distribution.v1beta1.Msg/CommunityPoolSpend", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCommunityPoolSpend) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCommunityPoolSpend.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCommunityPoolSpendResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCommunityPoolSpendResponse.deserialize(new Uint8Array(bytes)) + }, + DepositValidatorRewardsPool: { + path: "/cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgDepositValidatorRewardsPool) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgDepositValidatorRewardsPool.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgDepositValidatorRewardsPoolResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgDepositValidatorRewardsPoolResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract SetWithdrawAddress(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract WithdrawDelegatorReward(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract WithdrawValidatorCommission(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract FundCommunityPool(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CommunityPoolSpend(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DepositValidatorRewardsPool(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + SetWithdrawAddress: GrpcUnaryServiceInterface = (message: MsgSetWithdrawAddress, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SetWithdrawAddress(message, metadata, options, callback); + }; + WithdrawDelegatorReward: GrpcUnaryServiceInterface = (message: MsgWithdrawDelegatorReward, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.WithdrawDelegatorReward(message, metadata, options, callback); + }; + WithdrawValidatorCommission: GrpcUnaryServiceInterface = (message: MsgWithdrawValidatorCommission, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.WithdrawValidatorCommission(message, metadata, options, callback); + }; + FundCommunityPool: GrpcUnaryServiceInterface = (message: MsgFundCommunityPool, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.FundCommunityPool(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + CommunityPoolSpend: GrpcUnaryServiceInterface = (message: MsgCommunityPoolSpend, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CommunityPoolSpend(message, metadata, options, callback); + }; + DepositValidatorRewardsPool: GrpcUnaryServiceInterface = (message: MsgDepositValidatorRewardsPool, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DepositValidatorRewardsPool(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/distribution/v1beta1/tx_pb.d.ts b/codegen/cosmos/distribution/v1beta1/tx_pb.d.ts similarity index 84% rename from proto/cosmos/distribution/v1beta1/tx_pb.d.ts rename to codegen/cosmos/distribution/v1beta1/tx_pb.d.ts index 271449b..5a5c454 100644 --- a/proto/cosmos/distribution/v1beta1/tx_pb.d.ts +++ b/codegen/cosmos/distribution/v1beta1/tx_pb.d.ts @@ -267,3 +267,49 @@ export namespace MsgCommunityPoolSpendResponse { } } +export class MsgDepositValidatorRewardsPool extends jspb.Message { + getDepositor(): string; + setDepositor(value: string): void; + + getValidatorAddress(): string; + setValidatorAddress(value: string): void; + + clearAmountList(): void; + getAmountList(): Array; + setAmountList(value: Array): void; + addAmount(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgDepositValidatorRewardsPool.AsObject; + static toObject(includeInstance: boolean, msg: MsgDepositValidatorRewardsPool): MsgDepositValidatorRewardsPool.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgDepositValidatorRewardsPool, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgDepositValidatorRewardsPool; + static deserializeBinaryFromReader(message: MsgDepositValidatorRewardsPool, reader: jspb.BinaryReader): MsgDepositValidatorRewardsPool; +} + +export namespace MsgDepositValidatorRewardsPool { + export type AsObject = { + depositor: string, + validatorAddress: string, + amountList: Array, + } +} + +export class MsgDepositValidatorRewardsPoolResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgDepositValidatorRewardsPoolResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgDepositValidatorRewardsPoolResponse): MsgDepositValidatorRewardsPoolResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgDepositValidatorRewardsPoolResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgDepositValidatorRewardsPoolResponse; + static deserializeBinaryFromReader(message: MsgDepositValidatorRewardsPoolResponse, reader: jspb.BinaryReader): MsgDepositValidatorRewardsPoolResponse; +} + +export namespace MsgDepositValidatorRewardsPoolResponse { + export type AsObject = { + } +} + diff --git a/proto/cosmos/distribution/v1beta1/tx_pb.js b/codegen/cosmos/distribution/v1beta1/tx_pb.js similarity index 84% rename from proto/cosmos/distribution/v1beta1/tx_pb.js rename to codegen/cosmos/distribution/v1beta1/tx_pb.js index 31137cd..40f872a 100644 --- a/proto/cosmos/distribution/v1beta1/tx_pb.js +++ b/codegen/cosmos/distribution/v1beta1/tx_pb.js @@ -29,6 +29,8 @@ var cosmos_distribution_v1beta1_distribution_pb = require('../../../cosmos/distr goog.object.extend(proto, cosmos_distribution_v1beta1_distribution_pb); goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgCommunityPoolSpend', null, global); goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse', null, global); goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgFundCommunityPool', null, global); goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse', null, global); goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress', null, global); @@ -291,6 +293,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.displayName = 'proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse'; +} @@ -2056,4 +2100,325 @@ proto.cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse.serializeBinaryT }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.toObject = function(includeInstance, msg) { + var f, obj = { + depositor: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool; + return proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDepositor(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDepositor(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string depositor = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool} returns this + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.setDepositor = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool} returns this + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool} returns this +*/ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.setAmountList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.addAmount = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool} returns this + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse; + return proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.cosmos.distribution.v1beta1); diff --git a/proto/cosmos/distribution/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/distribution/v1beta1/tx_pb_service.d.ts similarity index 87% rename from proto/cosmos/distribution/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/distribution/v1beta1/tx_pb_service.d.ts index 98fcca3..ac85ab3 100644 --- a/proto/cosmos/distribution/v1beta1/tx_pb_service.d.ts +++ b/codegen/cosmos/distribution/v1beta1/tx_pb_service.d.ts @@ -58,6 +58,15 @@ type MsgCommunityPoolSpend = { readonly responseType: typeof cosmos_distribution_v1beta1_tx_pb.MsgCommunityPoolSpendResponse; }; +type MsgDepositValidatorRewardsPool = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_distribution_v1beta1_tx_pb.MsgDepositValidatorRewardsPool; + readonly responseType: typeof cosmos_distribution_v1beta1_tx_pb.MsgDepositValidatorRewardsPoolResponse; +}; + export class Msg { static readonly serviceName: string; static readonly SetWithdrawAddress: MsgSetWithdrawAddress; @@ -66,6 +75,7 @@ export class Msg { static readonly FundCommunityPool: MsgFundCommunityPool; static readonly UpdateParams: MsgUpdateParams; static readonly CommunityPoolSpend: MsgCommunityPoolSpend; + static readonly DepositValidatorRewardsPool: MsgDepositValidatorRewardsPool; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -154,5 +164,14 @@ export class MsgClient { requestMessage: cosmos_distribution_v1beta1_tx_pb.MsgCommunityPoolSpend, callback: (error: ServiceError|null, responseMessage: cosmos_distribution_v1beta1_tx_pb.MsgCommunityPoolSpendResponse|null) => void ): UnaryResponse; + depositValidatorRewardsPool( + requestMessage: cosmos_distribution_v1beta1_tx_pb.MsgDepositValidatorRewardsPool, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_distribution_v1beta1_tx_pb.MsgDepositValidatorRewardsPoolResponse|null) => void + ): UnaryResponse; + depositValidatorRewardsPool( + requestMessage: cosmos_distribution_v1beta1_tx_pb.MsgDepositValidatorRewardsPool, + callback: (error: ServiceError|null, responseMessage: cosmos_distribution_v1beta1_tx_pb.MsgDepositValidatorRewardsPoolResponse|null) => void + ): UnaryResponse; } diff --git a/proto/cosmos/distribution/v1beta1/tx_pb_service.js b/codegen/cosmos/distribution/v1beta1/tx_pb_service.js similarity index 86% rename from proto/cosmos/distribution/v1beta1/tx_pb_service.js rename to codegen/cosmos/distribution/v1beta1/tx_pb_service.js index edf05c4..2858a5e 100644 --- a/proto/cosmos/distribution/v1beta1/tx_pb_service.js +++ b/codegen/cosmos/distribution/v1beta1/tx_pb_service.js @@ -64,6 +64,15 @@ Msg.CommunityPoolSpend = { responseType: cosmos_distribution_v1beta1_tx_pb.MsgCommunityPoolSpendResponse }; +Msg.DepositValidatorRewardsPool = { + methodName: "DepositValidatorRewardsPool", + service: Msg, + requestStream: false, + responseStream: false, + requestType: cosmos_distribution_v1beta1_tx_pb.MsgDepositValidatorRewardsPool, + responseType: cosmos_distribution_v1beta1_tx_pb.MsgDepositValidatorRewardsPoolResponse +}; + exports.Msg = Msg; function MsgClient(serviceHost, options) { @@ -257,5 +266,36 @@ MsgClient.prototype.communityPoolSpend = function communityPoolSpend(requestMess }; }; +MsgClient.prototype.depositValidatorRewardsPool = function depositValidatorRewardsPool(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.DepositValidatorRewardsPool, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.MsgClient = MsgClient; diff --git a/codegen/cosmos/evidence/module/v1/module.ts b/codegen/cosmos/evidence/module/v1/module.ts new file mode 100644 index 0000000..435cbb7 --- /dev/null +++ b/codegen/cosmos/evidence/module/v1/module.ts @@ -0,0 +1,49 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/evidence/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.evidence.module.v1 { + export class Module 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: {}): Module { + const message = new Module({}); + 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): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/evidence/module/v1/module_pb.d.ts b/codegen/cosmos/evidence/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/evidence/module/v1/module_pb.d.ts rename to codegen/cosmos/evidence/module/v1/module_pb.d.ts diff --git a/proto/cosmos/evidence/module/v1/module_pb.js b/codegen/cosmos/evidence/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/evidence/module/v1/module_pb.js rename to codegen/cosmos/evidence/module/v1/module_pb.js diff --git a/proto/cosmos/evidence/module/v1/module_pb_service.d.ts b/codegen/cosmos/evidence/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/evidence/module/v1/module_pb_service.d.ts rename to codegen/cosmos/evidence/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/evidence/module/v1/module_pb_service.js b/codegen/cosmos/evidence/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/evidence/module/v1/module_pb_service.js rename to codegen/cosmos/evidence/module/v1/module_pb_service.js diff --git a/codegen/cosmos/evidence/v1beta1/evidence.ts b/codegen/cosmos/evidence/v1beta1/evidence.ts new file mode 100644 index 0000000..82d6223 --- /dev/null +++ b/codegen/cosmos/evidence/v1beta1/evidence.ts @@ -0,0 +1,151 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/evidence/v1beta1/evidence.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/protobuf/timestamp"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.evidence.v1beta1 { + export class Equivocation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + time?: dependency_3.google.protobuf.Timestamp; + power?: number; + consensus_address?: 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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + if ("consensus_address" in data && data.consensus_address != undefined) { + this.consensus_address = data.consensus_address; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 2) as dependency_3.google.protobuf.Timestamp; + } + set time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_time() { + return pb_1.Message.getField(this, 2) != null; + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set power(value: number) { + pb_1.Message.setField(this, 3, value); + } + get consensus_address() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set consensus_address(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + height?: number; + time?: ReturnType; + power?: number; + consensus_address?: string; + }): Equivocation { + const message = new Equivocation({}); + if (data.height != null) { + message.height = data.height; + } + if (data.time != null) { + message.time = dependency_3.google.protobuf.Timestamp.fromObject(data.time); + } + if (data.power != null) { + message.power = data.power; + } + if (data.consensus_address != null) { + message.consensus_address = data.consensus_address; + } + return message; + } + toObject() { + const data: { + height?: number; + time?: ReturnType; + power?: number; + consensus_address?: string; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.power != null) { + data.power = this.power; + } + if (this.consensus_address != null) { + data.consensus_address = this.consensus_address; + } + 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.height != 0) + writer.writeInt64(1, this.height); + if (this.has_time) + writer.writeMessage(2, this.time, () => this.time.serialize(writer)); + if (this.power != 0) + writer.writeInt64(3, this.power); + if (this.consensus_address.length) + writer.writeString(4, this.consensus_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Equivocation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Equivocation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.time, () => message.time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 3: + message.power = reader.readInt64(); + break; + case 4: + message.consensus_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Equivocation { + return Equivocation.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/evidence/v1beta1/evidence_pb.d.ts b/codegen/cosmos/evidence/v1beta1/evidence_pb.d.ts similarity index 100% rename from proto/cosmos/evidence/v1beta1/evidence_pb.d.ts rename to codegen/cosmos/evidence/v1beta1/evidence_pb.d.ts diff --git a/proto/cosmos/evidence/v1beta1/evidence_pb.js b/codegen/cosmos/evidence/v1beta1/evidence_pb.js similarity index 100% rename from proto/cosmos/evidence/v1beta1/evidence_pb.js rename to codegen/cosmos/evidence/v1beta1/evidence_pb.js diff --git a/proto/cosmos/evidence/v1beta1/evidence_pb_service.d.ts b/codegen/cosmos/evidence/v1beta1/evidence_pb_service.d.ts similarity index 100% rename from proto/cosmos/evidence/v1beta1/evidence_pb_service.d.ts rename to codegen/cosmos/evidence/v1beta1/evidence_pb_service.d.ts diff --git a/proto/cosmos/evidence/v1beta1/evidence_pb_service.js b/codegen/cosmos/evidence/v1beta1/evidence_pb_service.js similarity index 100% rename from proto/cosmos/evidence/v1beta1/evidence_pb_service.js rename to codegen/cosmos/evidence/v1beta1/evidence_pb_service.js diff --git a/codegen/cosmos/evidence/v1beta1/genesis.ts b/codegen/cosmos/evidence/v1beta1/genesis.ts new file mode 100644 index 0000000..f8a9682 --- /dev/null +++ b/codegen/cosmos/evidence/v1beta1/genesis.ts @@ -0,0 +1,76 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/evidence/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.evidence.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + evidence?: dependency_1.google.protobuf.Any[]; + }) { + 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 ("evidence" in data && data.evidence != undefined) { + this.evidence = data.evidence; + } + } + } + get evidence() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 1) as dependency_1.google.protobuf.Any[]; + } + set evidence(value: dependency_1.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + evidence?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.evidence != null) { + message.evidence = data.evidence.map(item => dependency_1.google.protobuf.Any.fromObject(item)); + } + return message; + } + toObject() { + const data: { + evidence?: ReturnType[]; + } = {}; + if (this.evidence != null) { + data.evidence = this.evidence.map((item: dependency_1.google.protobuf.Any) => item.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.evidence.length) + writer.writeRepeatedMessage(1, this.evidence, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.evidence, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/evidence/v1beta1/genesis_pb.d.ts b/codegen/cosmos/evidence/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/evidence/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/evidence/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/evidence/v1beta1/genesis_pb.js b/codegen/cosmos/evidence/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/evidence/v1beta1/genesis_pb.js rename to codegen/cosmos/evidence/v1beta1/genesis_pb.js diff --git a/proto/cosmos/evidence/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/evidence/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/evidence/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/evidence/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/evidence/v1beta1/genesis_pb_service.js b/codegen/cosmos/evidence/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/evidence/v1beta1/genesis_pb_service.js rename to codegen/cosmos/evidence/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/evidence/v1beta1/query.ts b/codegen/cosmos/evidence/v1beta1/query.ts new file mode 100644 index 0000000..5826b89 --- /dev/null +++ b/codegen/cosmos/evidence/v1beta1/query.ts @@ -0,0 +1,398 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/evidence/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../google/protobuf/any"; +import * as dependency_3 from "./../../../google/api/annotations"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.evidence.v1beta1 { + export class QueryEvidenceRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + /** @deprecated*/ + evidence_hash?: Uint8Array; + hash?: 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 ("evidence_hash" in data && data.evidence_hash != undefined) { + this.evidence_hash = data.evidence_hash; + } + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + } + } + /** @deprecated*/ + get evidence_hash() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + /** @deprecated*/ + set evidence_hash(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set hash(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + evidence_hash?: Uint8Array; + hash?: string; + }): QueryEvidenceRequest { + const message = new QueryEvidenceRequest({}); + if (data.evidence_hash != null) { + message.evidence_hash = data.evidence_hash; + } + if (data.hash != null) { + message.hash = data.hash; + } + return message; + } + toObject() { + const data: { + evidence_hash?: Uint8Array; + hash?: string; + } = {}; + if (this.evidence_hash != null) { + data.evidence_hash = this.evidence_hash; + } + if (this.hash != null) { + data.hash = this.hash; + } + 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.evidence_hash.length) + writer.writeBytes(1, this.evidence_hash); + if (this.hash.length) + writer.writeString(2, this.hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryEvidenceRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryEvidenceRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.evidence_hash = reader.readBytes(); + break; + case 2: + message.hash = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryEvidenceRequest { + return QueryEvidenceRequest.deserialize(bytes); + } + } + export class QueryEvidenceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + evidence?: dependency_2.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("evidence" in data && data.evidence != undefined) { + this.evidence = data.evidence; + } + } + } + get evidence() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 1) as dependency_2.google.protobuf.Any; + } + set evidence(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_evidence() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + evidence?: ReturnType; + }): QueryEvidenceResponse { + const message = new QueryEvidenceResponse({}); + if (data.evidence != null) { + message.evidence = dependency_2.google.protobuf.Any.fromObject(data.evidence); + } + return message; + } + toObject() { + const data: { + evidence?: ReturnType; + } = {}; + if (this.evidence != null) { + data.evidence = this.evidence.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_evidence) + writer.writeMessage(1, this.evidence, () => this.evidence.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryEvidenceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryEvidenceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.evidence, () => message.evidence = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryEvidenceResponse { + return QueryEvidenceResponse.deserialize(bytes); + } + } + export class QueryAllEvidenceRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_1.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_1.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.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; + }): QueryAllEvidenceRequest { + const message = new QueryAllEvidenceRequest({}); + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryAllEvidenceRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllEvidenceRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllEvidenceRequest { + return QueryAllEvidenceRequest.deserialize(bytes); + } + } + export class QueryAllEvidenceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + evidence?: dependency_2.google.protobuf.Any[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("evidence" in data && data.evidence != undefined) { + this.evidence = data.evidence; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get evidence() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.google.protobuf.Any, 1) as dependency_2.google.protobuf.Any[]; + } + set evidence(value: dependency_2.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + evidence?: ReturnType[]; + pagination?: ReturnType; + }): QueryAllEvidenceResponse { + const message = new QueryAllEvidenceResponse({}); + if (data.evidence != null) { + message.evidence = data.evidence.map(item => dependency_2.google.protobuf.Any.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + evidence?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.evidence != null) { + data.evidence = this.evidence.map((item: dependency_2.google.protobuf.Any) => item.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.evidence.length) + writer.writeRepeatedMessage(1, this.evidence, (item: dependency_2.google.protobuf.Any) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllEvidenceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllEvidenceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.evidence, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.google.protobuf.Any.deserialize(reader), dependency_2.google.protobuf.Any)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllEvidenceResponse { + return QueryAllEvidenceResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Evidence: { + path: "/cosmos.evidence.v1beta1.Query/Evidence", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryEvidenceRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryEvidenceRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryEvidenceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryEvidenceResponse.deserialize(new Uint8Array(bytes)) + }, + AllEvidence: { + path: "/cosmos.evidence.v1beta1.Query/AllEvidence", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAllEvidenceRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAllEvidenceRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAllEvidenceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAllEvidenceResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Evidence(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AllEvidence(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Evidence: GrpcUnaryServiceInterface = (message: QueryEvidenceRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Evidence(message, metadata, options, callback); + }; + AllEvidence: GrpcUnaryServiceInterface = (message: QueryAllEvidenceRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AllEvidence(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/evidence/v1beta1/query_pb.d.ts b/codegen/cosmos/evidence/v1beta1/query_pb.d.ts similarity index 98% rename from proto/cosmos/evidence/v1beta1/query_pb.d.ts rename to codegen/cosmos/evidence/v1beta1/query_pb.d.ts index 5e8963a..cd43000 100644 --- a/proto/cosmos/evidence/v1beta1/query_pb.d.ts +++ b/codegen/cosmos/evidence/v1beta1/query_pb.d.ts @@ -3,7 +3,6 @@ import * as jspb from "google-protobuf"; import * as cosmos_base_query_v1beta1_pagination_pb from "../../../cosmos/base/query/v1beta1/pagination_pb"; -import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; diff --git a/proto/cosmos/evidence/v1beta1/query_pb.js b/codegen/cosmos/evidence/v1beta1/query_pb.js similarity index 99% rename from proto/cosmos/evidence/v1beta1/query_pb.js rename to codegen/cosmos/evidence/v1beta1/query_pb.js index c95283f..92d39aa 100644 --- a/proto/cosmos/evidence/v1beta1/query_pb.js +++ b/codegen/cosmos/evidence/v1beta1/query_pb.js @@ -17,8 +17,6 @@ var global = (function() { return this || window || global || self || Function(' var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js'); goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); -var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); diff --git a/proto/cosmos/evidence/v1beta1/query_pb_service.d.ts b/codegen/cosmos/evidence/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/evidence/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/evidence/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/evidence/v1beta1/query_pb_service.js b/codegen/cosmos/evidence/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/evidence/v1beta1/query_pb_service.js rename to codegen/cosmos/evidence/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/evidence/v1beta1/tx.ts b/codegen/cosmos/evidence/v1beta1/tx.ts new file mode 100644 index 0000000..745b896 --- /dev/null +++ b/codegen/cosmos/evidence/v1beta1/tx.ts @@ -0,0 +1,221 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/evidence/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/any"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../msg/v1/msg"; +import * as dependency_5 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.evidence.v1beta1 { + export class MsgSubmitEvidence extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + submitter?: string; + evidence?: dependency_2.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("submitter" in data && data.submitter != undefined) { + this.submitter = data.submitter; + } + if ("evidence" in data && data.evidence != undefined) { + this.evidence = data.evidence; + } + } + } + get submitter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set submitter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get evidence() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 2) as dependency_2.google.protobuf.Any; + } + set evidence(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_evidence() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + submitter?: string; + evidence?: ReturnType; + }): MsgSubmitEvidence { + const message = new MsgSubmitEvidence({}); + if (data.submitter != null) { + message.submitter = data.submitter; + } + if (data.evidence != null) { + message.evidence = dependency_2.google.protobuf.Any.fromObject(data.evidence); + } + return message; + } + toObject() { + const data: { + submitter?: string; + evidence?: ReturnType; + } = {}; + if (this.submitter != null) { + data.submitter = this.submitter; + } + if (this.evidence != null) { + data.evidence = this.evidence.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.submitter.length) + writer.writeString(1, this.submitter); + if (this.has_evidence) + writer.writeMessage(2, this.evidence, () => this.evidence.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitEvidence { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitEvidence(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.submitter = reader.readString(); + break; + case 2: + reader.readMessage(message.evidence, () => message.evidence = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitEvidence { + return MsgSubmitEvidence.deserialize(bytes); + } + } + export class MsgSubmitEvidenceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + hash?: Uint8Array; + }): MsgSubmitEvidenceResponse { + const message = new MsgSubmitEvidenceResponse({}); + if (data.hash != null) { + message.hash = data.hash; + } + return message; + } + toObject() { + const data: { + hash?: Uint8Array; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + 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.hash.length) + writer.writeBytes(4, this.hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitEvidenceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitEvidenceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 4: + message.hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitEvidenceResponse { + return MsgSubmitEvidenceResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + SubmitEvidence: { + path: "/cosmos.evidence.v1beta1.Msg/SubmitEvidence", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitEvidence) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitEvidence.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitEvidenceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitEvidenceResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract SubmitEvidence(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + SubmitEvidence: GrpcUnaryServiceInterface = (message: MsgSubmitEvidence, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitEvidence(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/evidence/v1beta1/tx_pb.d.ts b/codegen/cosmos/evidence/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/evidence/v1beta1/tx_pb.d.ts rename to codegen/cosmos/evidence/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/evidence/v1beta1/tx_pb.js b/codegen/cosmos/evidence/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/evidence/v1beta1/tx_pb.js rename to codegen/cosmos/evidence/v1beta1/tx_pb.js diff --git a/proto/cosmos/evidence/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/evidence/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/evidence/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/evidence/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/evidence/v1beta1/tx_pb_service.js b/codegen/cosmos/evidence/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/evidence/v1beta1/tx_pb_service.js rename to codegen/cosmos/evidence/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/feegrant/module/v1/module.ts b/codegen/cosmos/feegrant/module/v1/module.ts new file mode 100644 index 0000000..5d2ef28 --- /dev/null +++ b/codegen/cosmos/feegrant/module/v1/module.ts @@ -0,0 +1,49 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/feegrant/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.feegrant.module.v1 { + export class Module 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: {}): Module { + const message = new Module({}); + 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): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/feegrant/module/v1/module_pb.d.ts b/codegen/cosmos/feegrant/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/feegrant/module/v1/module_pb.d.ts rename to codegen/cosmos/feegrant/module/v1/module_pb.d.ts diff --git a/proto/cosmos/feegrant/module/v1/module_pb.js b/codegen/cosmos/feegrant/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/feegrant/module/v1/module_pb.js rename to codegen/cosmos/feegrant/module/v1/module_pb.js diff --git a/proto/cosmos/feegrant/module/v1/module_pb_service.d.ts b/codegen/cosmos/feegrant/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/feegrant/module/v1/module_pb_service.d.ts rename to codegen/cosmos/feegrant/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/feegrant/module/v1/module_pb_service.js b/codegen/cosmos/feegrant/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/feegrant/module/v1/module_pb_service.js rename to codegen/cosmos/feegrant/module/v1/module_pb_service.js diff --git a/codegen/cosmos/feegrant/v1beta1/feegrant.ts b/codegen/cosmos/feegrant/v1beta1/feegrant.ts new file mode 100644 index 0000000..71f4d38 --- /dev/null +++ b/codegen/cosmos/feegrant/v1beta1/feegrant.ts @@ -0,0 +1,485 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/feegrant/v1beta1/feegrant.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/any"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../base/v1beta1/coin"; +import * as dependency_5 from "./../../../amino/amino"; +import * as dependency_6 from "./../../../google/protobuf/timestamp"; +import * as dependency_7 from "./../../../google/protobuf/duration"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.feegrant.v1beta1 { + export class BasicAllowance extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + spend_limit?: dependency_4.cosmos.base.v1beta1.Coin[]; + expiration?: dependency_6.google.protobuf.Timestamp; + }) { + 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 ("spend_limit" in data && data.spend_limit != undefined) { + this.spend_limit = data.spend_limit; + } + if ("expiration" in data && data.expiration != undefined) { + this.expiration = data.expiration; + } + } + } + get spend_limit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set spend_limit(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get expiration() { + return pb_1.Message.getWrapperField(this, dependency_6.google.protobuf.Timestamp, 2) as dependency_6.google.protobuf.Timestamp; + } + set expiration(value: dependency_6.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_expiration() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + spend_limit?: ReturnType[]; + expiration?: ReturnType; + }): BasicAllowance { + const message = new BasicAllowance({}); + if (data.spend_limit != null) { + message.spend_limit = data.spend_limit.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.expiration != null) { + message.expiration = dependency_6.google.protobuf.Timestamp.fromObject(data.expiration); + } + return message; + } + toObject() { + const data: { + spend_limit?: ReturnType[]; + expiration?: ReturnType; + } = {}; + if (this.spend_limit != null) { + data.spend_limit = this.spend_limit.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.expiration != null) { + data.expiration = this.expiration.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.spend_limit.length) + writer.writeRepeatedMessage(1, this.spend_limit, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_expiration) + writer.writeMessage(2, this.expiration, () => this.expiration.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BasicAllowance { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BasicAllowance(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.spend_limit, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 2: + reader.readMessage(message.expiration, () => message.expiration = dependency_6.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BasicAllowance { + return BasicAllowance.deserialize(bytes); + } + } + export class PeriodicAllowance extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + basic?: BasicAllowance; + period?: dependency_7.google.protobuf.Duration; + period_spend_limit?: dependency_4.cosmos.base.v1beta1.Coin[]; + period_can_spend?: dependency_4.cosmos.base.v1beta1.Coin[]; + period_reset?: dependency_6.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("basic" in data && data.basic != undefined) { + this.basic = data.basic; + } + if ("period" in data && data.period != undefined) { + this.period = data.period; + } + if ("period_spend_limit" in data && data.period_spend_limit != undefined) { + this.period_spend_limit = data.period_spend_limit; + } + if ("period_can_spend" in data && data.period_can_spend != undefined) { + this.period_can_spend = data.period_can_spend; + } + if ("period_reset" in data && data.period_reset != undefined) { + this.period_reset = data.period_reset; + } + } + } + get basic() { + return pb_1.Message.getWrapperField(this, BasicAllowance, 1) as BasicAllowance; + } + set basic(value: BasicAllowance) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_basic() { + return pb_1.Message.getField(this, 1) != null; + } + get period() { + return pb_1.Message.getWrapperField(this, dependency_7.google.protobuf.Duration, 2) as dependency_7.google.protobuf.Duration; + } + set period(value: dependency_7.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_period() { + return pb_1.Message.getField(this, 2) != null; + } + get period_spend_limit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 3) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set period_spend_limit(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get period_can_spend() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 4) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set period_can_spend(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get period_reset() { + return pb_1.Message.getWrapperField(this, dependency_6.google.protobuf.Timestamp, 5) as dependency_6.google.protobuf.Timestamp; + } + set period_reset(value: dependency_6.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_period_reset() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + basic?: ReturnType; + period?: ReturnType; + period_spend_limit?: ReturnType[]; + period_can_spend?: ReturnType[]; + period_reset?: ReturnType; + }): PeriodicAllowance { + const message = new PeriodicAllowance({}); + if (data.basic != null) { + message.basic = BasicAllowance.fromObject(data.basic); + } + if (data.period != null) { + message.period = dependency_7.google.protobuf.Duration.fromObject(data.period); + } + if (data.period_spend_limit != null) { + message.period_spend_limit = data.period_spend_limit.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.period_can_spend != null) { + message.period_can_spend = data.period_can_spend.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.period_reset != null) { + message.period_reset = dependency_6.google.protobuf.Timestamp.fromObject(data.period_reset); + } + return message; + } + toObject() { + const data: { + basic?: ReturnType; + period?: ReturnType; + period_spend_limit?: ReturnType[]; + period_can_spend?: ReturnType[]; + period_reset?: ReturnType; + } = {}; + if (this.basic != null) { + data.basic = this.basic.toObject(); + } + if (this.period != null) { + data.period = this.period.toObject(); + } + if (this.period_spend_limit != null) { + data.period_spend_limit = this.period_spend_limit.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.period_can_spend != null) { + data.period_can_spend = this.period_can_spend.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.period_reset != null) { + data.period_reset = this.period_reset.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_basic) + writer.writeMessage(1, this.basic, () => this.basic.serialize(writer)); + if (this.has_period) + writer.writeMessage(2, this.period, () => this.period.serialize(writer)); + if (this.period_spend_limit.length) + writer.writeRepeatedMessage(3, this.period_spend_limit, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.period_can_spend.length) + writer.writeRepeatedMessage(4, this.period_can_spend, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_period_reset) + writer.writeMessage(5, this.period_reset, () => this.period_reset.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PeriodicAllowance { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PeriodicAllowance(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.basic, () => message.basic = BasicAllowance.deserialize(reader)); + break; + case 2: + reader.readMessage(message.period, () => message.period = dependency_7.google.protobuf.Duration.deserialize(reader)); + break; + case 3: + reader.readMessage(message.period_spend_limit, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 4: + reader.readMessage(message.period_can_spend, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 5: + reader.readMessage(message.period_reset, () => message.period_reset = dependency_6.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PeriodicAllowance { + return PeriodicAllowance.deserialize(bytes); + } + } + export class AllowedMsgAllowance extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + allowance?: dependency_2.google.protobuf.Any; + allowed_messages?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("allowance" in data && data.allowance != undefined) { + this.allowance = data.allowance; + } + if ("allowed_messages" in data && data.allowed_messages != undefined) { + this.allowed_messages = data.allowed_messages; + } + } + } + get allowance() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 1) as dependency_2.google.protobuf.Any; + } + set allowance(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_allowance() { + return pb_1.Message.getField(this, 1) != null; + } + get allowed_messages() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set allowed_messages(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + allowance?: ReturnType; + allowed_messages?: string[]; + }): AllowedMsgAllowance { + const message = new AllowedMsgAllowance({}); + if (data.allowance != null) { + message.allowance = dependency_2.google.protobuf.Any.fromObject(data.allowance); + } + if (data.allowed_messages != null) { + message.allowed_messages = data.allowed_messages; + } + return message; + } + toObject() { + const data: { + allowance?: ReturnType; + allowed_messages?: string[]; + } = {}; + if (this.allowance != null) { + data.allowance = this.allowance.toObject(); + } + if (this.allowed_messages != null) { + data.allowed_messages = this.allowed_messages; + } + 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_allowance) + writer.writeMessage(1, this.allowance, () => this.allowance.serialize(writer)); + if (this.allowed_messages.length) + writer.writeRepeatedString(2, this.allowed_messages); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AllowedMsgAllowance { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AllowedMsgAllowance(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.allowance, () => message.allowance = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AllowedMsgAllowance { + return AllowedMsgAllowance.deserialize(bytes); + } + } + export class Grant extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: string; + allowance?: dependency_2.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("allowance" in data && data.allowance != undefined) { + this.allowance = data.allowance; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + get allowance() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 3) as dependency_2.google.protobuf.Any; + } + set allowance(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_allowance() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + granter?: string; + grantee?: string; + allowance?: ReturnType; + }): Grant { + const message = new Grant({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.allowance != null) { + message.allowance = dependency_2.google.protobuf.Any.fromObject(data.allowance); + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + allowance?: ReturnType; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + if (this.allowance != null) { + data.allowance = this.allowance.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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (this.has_allowance) + writer.writeMessage(3, this.allowance, () => this.allowance.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Grant { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Grant(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + case 3: + reader.readMessage(message.allowance, () => message.allowance = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Grant { + return Grant.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/feegrant/v1beta1/feegrant_pb.d.ts b/codegen/cosmos/feegrant/v1beta1/feegrant_pb.d.ts similarity index 100% rename from proto/cosmos/feegrant/v1beta1/feegrant_pb.d.ts rename to codegen/cosmos/feegrant/v1beta1/feegrant_pb.d.ts diff --git a/proto/cosmos/feegrant/v1beta1/feegrant_pb.js b/codegen/cosmos/feegrant/v1beta1/feegrant_pb.js similarity index 100% rename from proto/cosmos/feegrant/v1beta1/feegrant_pb.js rename to codegen/cosmos/feegrant/v1beta1/feegrant_pb.js diff --git a/proto/cosmos/feegrant/v1beta1/feegrant_pb_service.d.ts b/codegen/cosmos/feegrant/v1beta1/feegrant_pb_service.d.ts similarity index 100% rename from proto/cosmos/feegrant/v1beta1/feegrant_pb_service.d.ts rename to codegen/cosmos/feegrant/v1beta1/feegrant_pb_service.d.ts diff --git a/proto/cosmos/feegrant/v1beta1/feegrant_pb_service.js b/codegen/cosmos/feegrant/v1beta1/feegrant_pb_service.js similarity index 100% rename from proto/cosmos/feegrant/v1beta1/feegrant_pb_service.js rename to codegen/cosmos/feegrant/v1beta1/feegrant_pb_service.js diff --git a/codegen/cosmos/feegrant/v1beta1/genesis.ts b/codegen/cosmos/feegrant/v1beta1/genesis.ts new file mode 100644 index 0000000..488386a --- /dev/null +++ b/codegen/cosmos/feegrant/v1beta1/genesis.ts @@ -0,0 +1,78 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/feegrant/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./feegrant"; +import * as dependency_3 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.feegrant.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + allowances?: dependency_2.cosmos.feegrant.v1beta1.Grant[]; + }) { + 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 ("allowances" in data && data.allowances != undefined) { + this.allowances = data.allowances; + } + } + } + get allowances() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.feegrant.v1beta1.Grant, 1) as dependency_2.cosmos.feegrant.v1beta1.Grant[]; + } + set allowances(value: dependency_2.cosmos.feegrant.v1beta1.Grant[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + allowances?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.allowances != null) { + message.allowances = data.allowances.map(item => dependency_2.cosmos.feegrant.v1beta1.Grant.fromObject(item)); + } + return message; + } + toObject() { + const data: { + allowances?: ReturnType[]; + } = {}; + if (this.allowances != null) { + data.allowances = this.allowances.map((item: dependency_2.cosmos.feegrant.v1beta1.Grant) => item.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.allowances.length) + writer.writeRepeatedMessage(1, this.allowances, (item: dependency_2.cosmos.feegrant.v1beta1.Grant) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.allowances, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.feegrant.v1beta1.Grant.deserialize(reader), dependency_2.cosmos.feegrant.v1beta1.Grant)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/feegrant/v1beta1/genesis_pb.d.ts b/codegen/cosmos/feegrant/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/feegrant/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/feegrant/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/feegrant/v1beta1/genesis_pb.js b/codegen/cosmos/feegrant/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/feegrant/v1beta1/genesis_pb.js rename to codegen/cosmos/feegrant/v1beta1/genesis_pb.js diff --git a/proto/cosmos/feegrant/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/feegrant/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/feegrant/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/feegrant/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/feegrant/v1beta1/genesis_pb_service.js b/codegen/cosmos/feegrant/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/feegrant/v1beta1/genesis_pb_service.js rename to codegen/cosmos/feegrant/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/feegrant/v1beta1/query.ts b/codegen/cosmos/feegrant/v1beta1/query.ts new file mode 100644 index 0000000..7db5b3a --- /dev/null +++ b/codegen/cosmos/feegrant/v1beta1/query.ts @@ -0,0 +1,618 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/feegrant/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./feegrant"; +import * as dependency_2 from "./../../base/query/v1beta1/pagination"; +import * as dependency_3 from "./../../../google/api/annotations"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.feegrant.v1beta1 { + export class QueryAllowanceRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: 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 ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + granter?: string; + grantee?: string; + }): QueryAllowanceRequest { + const message = new QueryAllowanceRequest({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + 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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllowanceRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllowanceRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllowanceRequest { + return QueryAllowanceRequest.deserialize(bytes); + } + } + export class QueryAllowanceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + allowance?: dependency_1.cosmos.feegrant.v1beta1.Grant; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("allowance" in data && data.allowance != undefined) { + this.allowance = data.allowance; + } + } + } + get allowance() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.feegrant.v1beta1.Grant, 1) as dependency_1.cosmos.feegrant.v1beta1.Grant; + } + set allowance(value: dependency_1.cosmos.feegrant.v1beta1.Grant) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_allowance() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + allowance?: ReturnType; + }): QueryAllowanceResponse { + const message = new QueryAllowanceResponse({}); + if (data.allowance != null) { + message.allowance = dependency_1.cosmos.feegrant.v1beta1.Grant.fromObject(data.allowance); + } + return message; + } + toObject() { + const data: { + allowance?: ReturnType; + } = {}; + if (this.allowance != null) { + data.allowance = this.allowance.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_allowance) + writer.writeMessage(1, this.allowance, () => this.allowance.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllowanceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllowanceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.allowance, () => message.allowance = dependency_1.cosmos.feegrant.v1beta1.Grant.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllowanceResponse { + return QueryAllowanceResponse.deserialize(bytes); + } + } + export class QueryAllowancesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + grantee?: string; + 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 ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + grantee?: string; + pagination?: ReturnType; + }): QueryAllowancesRequest { + const message = new QueryAllowancesRequest({}); + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + grantee?: string; + pagination?: ReturnType; + } = {}; + if (this.grantee != null) { + data.grantee = this.grantee; + } + 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.grantee.length) + writer.writeString(1, this.grantee); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllowancesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllowancesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.grantee = reader.readString(); + break; + case 2: + 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): QueryAllowancesRequest { + return QueryAllowancesRequest.deserialize(bytes); + } + } + export class QueryAllowancesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + allowances?: dependency_1.cosmos.feegrant.v1beta1.Grant[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("allowances" in data && data.allowances != undefined) { + this.allowances = data.allowances; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get allowances() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.feegrant.v1beta1.Grant, 1) as dependency_1.cosmos.feegrant.v1beta1.Grant[]; + } + set allowances(value: dependency_1.cosmos.feegrant.v1beta1.Grant[]) { + 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; + } + static fromObject(data: { + allowances?: ReturnType[]; + pagination?: ReturnType; + }): QueryAllowancesResponse { + const message = new QueryAllowancesResponse({}); + if (data.allowances != null) { + message.allowances = data.allowances.map(item => dependency_1.cosmos.feegrant.v1beta1.Grant.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + allowances?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.allowances != null) { + data.allowances = this.allowances.map((item: dependency_1.cosmos.feegrant.v1beta1.Grant) => item.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.allowances.length) + writer.writeRepeatedMessage(1, this.allowances, (item: dependency_1.cosmos.feegrant.v1beta1.Grant) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllowancesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllowancesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.allowances, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.cosmos.feegrant.v1beta1.Grant.deserialize(reader), dependency_1.cosmos.feegrant.v1beta1.Grant)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllowancesResponse { + return QueryAllowancesResponse.deserialize(bytes); + } + } + export class QueryAllowancesByGranterRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + 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 ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + granter?: string; + pagination?: ReturnType; + }): QueryAllowancesByGranterRequest { + const message = new QueryAllowancesByGranterRequest({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + granter?: string; + pagination?: ReturnType; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + 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.granter.length) + writer.writeString(1, this.granter); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllowancesByGranterRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllowancesByGranterRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + 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): QueryAllowancesByGranterRequest { + return QueryAllowancesByGranterRequest.deserialize(bytes); + } + } + export class QueryAllowancesByGranterResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + allowances?: dependency_1.cosmos.feegrant.v1beta1.Grant[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("allowances" in data && data.allowances != undefined) { + this.allowances = data.allowances; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get allowances() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.feegrant.v1beta1.Grant, 1) as dependency_1.cosmos.feegrant.v1beta1.Grant[]; + } + set allowances(value: dependency_1.cosmos.feegrant.v1beta1.Grant[]) { + 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; + } + static fromObject(data: { + allowances?: ReturnType[]; + pagination?: ReturnType; + }): QueryAllowancesByGranterResponse { + const message = new QueryAllowancesByGranterResponse({}); + if (data.allowances != null) { + message.allowances = data.allowances.map(item => dependency_1.cosmos.feegrant.v1beta1.Grant.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + allowances?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.allowances != null) { + data.allowances = this.allowances.map((item: dependency_1.cosmos.feegrant.v1beta1.Grant) => item.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.allowances.length) + writer.writeRepeatedMessage(1, this.allowances, (item: dependency_1.cosmos.feegrant.v1beta1.Grant) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAllowancesByGranterResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAllowancesByGranterResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.allowances, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.cosmos.feegrant.v1beta1.Grant.deserialize(reader), dependency_1.cosmos.feegrant.v1beta1.Grant)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAllowancesByGranterResponse { + return QueryAllowancesByGranterResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Allowance: { + path: "/cosmos.feegrant.v1beta1.Query/Allowance", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAllowanceRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAllowanceRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAllowanceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAllowanceResponse.deserialize(new Uint8Array(bytes)) + }, + Allowances: { + path: "/cosmos.feegrant.v1beta1.Query/Allowances", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAllowancesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAllowancesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAllowancesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAllowancesResponse.deserialize(new Uint8Array(bytes)) + }, + AllowancesByGranter: { + path: "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAllowancesByGranterRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAllowancesByGranterRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAllowancesByGranterResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAllowancesByGranterResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Allowance(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Allowances(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AllowancesByGranter(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Allowance: GrpcUnaryServiceInterface = (message: QueryAllowanceRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Allowance(message, metadata, options, callback); + }; + Allowances: GrpcUnaryServiceInterface = (message: QueryAllowancesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Allowances(message, metadata, options, callback); + }; + AllowancesByGranter: GrpcUnaryServiceInterface = (message: QueryAllowancesByGranterRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AllowancesByGranter(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/feegrant/v1beta1/query_pb.d.ts b/codegen/cosmos/feegrant/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/feegrant/v1beta1/query_pb.d.ts rename to codegen/cosmos/feegrant/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/feegrant/v1beta1/query_pb.js b/codegen/cosmos/feegrant/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/feegrant/v1beta1/query_pb.js rename to codegen/cosmos/feegrant/v1beta1/query_pb.js diff --git a/proto/cosmos/feegrant/v1beta1/query_pb_service.d.ts b/codegen/cosmos/feegrant/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/feegrant/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/feegrant/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/feegrant/v1beta1/query_pb_service.js b/codegen/cosmos/feegrant/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/feegrant/v1beta1/query_pb_service.js rename to codegen/cosmos/feegrant/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/feegrant/v1beta1/tx.ts b/codegen/cosmos/feegrant/v1beta1/tx.ts new file mode 100644 index 0000000..7917d38 --- /dev/null +++ b/codegen/cosmos/feegrant/v1beta1/tx.ts @@ -0,0 +1,479 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/feegrant/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/any"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../msg/v1/msg"; +import * as dependency_4 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.feegrant.v1beta1 { + export class MsgGrantAllowance extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: string; + allowance?: dependency_1.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + if ("allowance" in data && data.allowance != undefined) { + this.allowance = data.allowance; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + get allowance() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 3) as dependency_1.google.protobuf.Any; + } + set allowance(value: dependency_1.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_allowance() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + granter?: string; + grantee?: string; + allowance?: ReturnType; + }): MsgGrantAllowance { + const message = new MsgGrantAllowance({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + if (data.allowance != null) { + message.allowance = dependency_1.google.protobuf.Any.fromObject(data.allowance); + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + allowance?: ReturnType; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + if (this.allowance != null) { + data.allowance = this.allowance.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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (this.has_allowance) + writer.writeMessage(3, this.allowance, () => this.allowance.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgGrantAllowance { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgGrantAllowance(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + case 3: + reader.readMessage(message.allowance, () => message.allowance = dependency_1.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgGrantAllowance { + return MsgGrantAllowance.deserialize(bytes); + } + } + export class MsgGrantAllowanceResponse 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: {}): MsgGrantAllowanceResponse { + const message = new MsgGrantAllowanceResponse({}); + 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): MsgGrantAllowanceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgGrantAllowanceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgGrantAllowanceResponse { + return MsgGrantAllowanceResponse.deserialize(bytes); + } + } + export class MsgRevokeAllowance extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + granter?: string; + grantee?: 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 ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + if ("grantee" in data && data.grantee != undefined) { + this.grantee = data.grantee; + } + } + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get grantee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set grantee(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + granter?: string; + grantee?: string; + }): MsgRevokeAllowance { + const message = new MsgRevokeAllowance({}); + if (data.granter != null) { + message.granter = data.granter; + } + if (data.grantee != null) { + message.grantee = data.grantee; + } + return message; + } + toObject() { + const data: { + granter?: string; + grantee?: string; + } = {}; + if (this.granter != null) { + data.granter = this.granter; + } + if (this.grantee != null) { + data.grantee = this.grantee; + } + 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.granter.length) + writer.writeString(1, this.granter); + if (this.grantee.length) + writer.writeString(2, this.grantee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRevokeAllowance { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRevokeAllowance(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.granter = reader.readString(); + break; + case 2: + message.grantee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRevokeAllowance { + return MsgRevokeAllowance.deserialize(bytes); + } + } + export class MsgRevokeAllowanceResponse 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: {}): MsgRevokeAllowanceResponse { + const message = new MsgRevokeAllowanceResponse({}); + 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): MsgRevokeAllowanceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRevokeAllowanceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRevokeAllowanceResponse { + return MsgRevokeAllowanceResponse.deserialize(bytes); + } + } + export class MsgPruneAllowances extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pruner?: 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 ("pruner" in data && data.pruner != undefined) { + this.pruner = data.pruner; + } + } + } + get pruner() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set pruner(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + pruner?: string; + }): MsgPruneAllowances { + const message = new MsgPruneAllowances({}); + if (data.pruner != null) { + message.pruner = data.pruner; + } + return message; + } + toObject() { + const data: { + pruner?: string; + } = {}; + if (this.pruner != null) { + data.pruner = this.pruner; + } + 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.pruner.length) + writer.writeString(1, this.pruner); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgPruneAllowances { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgPruneAllowances(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.pruner = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgPruneAllowances { + return MsgPruneAllowances.deserialize(bytes); + } + } + export class MsgPruneAllowancesResponse 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: {}): MsgPruneAllowancesResponse { + const message = new MsgPruneAllowancesResponse({}); + 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): MsgPruneAllowancesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgPruneAllowancesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgPruneAllowancesResponse { + return MsgPruneAllowancesResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + GrantAllowance: { + path: "/cosmos.feegrant.v1beta1.Msg/GrantAllowance", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgGrantAllowance) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgGrantAllowance.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgGrantAllowanceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgGrantAllowanceResponse.deserialize(new Uint8Array(bytes)) + }, + RevokeAllowance: { + path: "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRevokeAllowance) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRevokeAllowance.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRevokeAllowanceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRevokeAllowanceResponse.deserialize(new Uint8Array(bytes)) + }, + PruneAllowances: { + path: "/cosmos.feegrant.v1beta1.Msg/PruneAllowances", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgPruneAllowances) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgPruneAllowances.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgPruneAllowancesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgPruneAllowancesResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GrantAllowance(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RevokeAllowance(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PruneAllowances(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GrantAllowance: GrpcUnaryServiceInterface = (message: MsgGrantAllowance, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GrantAllowance(message, metadata, options, callback); + }; + RevokeAllowance: GrpcUnaryServiceInterface = (message: MsgRevokeAllowance, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RevokeAllowance(message, metadata, options, callback); + }; + PruneAllowances: GrpcUnaryServiceInterface = (message: MsgPruneAllowances, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PruneAllowances(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/feegrant/v1beta1/tx_pb.d.ts b/codegen/cosmos/feegrant/v1beta1/tx_pb.d.ts similarity index 71% rename from proto/cosmos/feegrant/v1beta1/tx_pb.d.ts rename to codegen/cosmos/feegrant/v1beta1/tx_pb.d.ts index 2f0bd35..a851d3b 100644 --- a/proto/cosmos/feegrant/v1beta1/tx_pb.d.ts +++ b/codegen/cosmos/feegrant/v1beta1/tx_pb.d.ts @@ -93,3 +93,39 @@ export namespace MsgRevokeAllowanceResponse { } } +export class MsgPruneAllowances extends jspb.Message { + getPruner(): string; + setPruner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgPruneAllowances.AsObject; + static toObject(includeInstance: boolean, msg: MsgPruneAllowances): MsgPruneAllowances.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgPruneAllowances, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgPruneAllowances; + static deserializeBinaryFromReader(message: MsgPruneAllowances, reader: jspb.BinaryReader): MsgPruneAllowances; +} + +export namespace MsgPruneAllowances { + export type AsObject = { + pruner: string, + } +} + +export class MsgPruneAllowancesResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgPruneAllowancesResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgPruneAllowancesResponse): MsgPruneAllowancesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgPruneAllowancesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgPruneAllowancesResponse; + static deserializeBinaryFromReader(message: MsgPruneAllowancesResponse, reader: jspb.BinaryReader): MsgPruneAllowancesResponse; +} + +export namespace MsgPruneAllowancesResponse { + export type AsObject = { + } +} + diff --git a/proto/cosmos/feegrant/v1beta1/tx_pb.js b/codegen/cosmos/feegrant/v1beta1/tx_pb.js similarity index 70% rename from proto/cosmos/feegrant/v1beta1/tx_pb.js rename to codegen/cosmos/feegrant/v1beta1/tx_pb.js index dc91306..afd1c14 100644 --- a/proto/cosmos/feegrant/v1beta1/tx_pb.js +++ b/codegen/cosmos/feegrant/v1beta1/tx_pb.js @@ -25,6 +25,8 @@ var amino_amino_pb = require('../../../amino/amino_pb.js'); goog.object.extend(proto, amino_amino_pb); goog.exportSymbol('proto.cosmos.feegrant.v1beta1.MsgGrantAllowance', null, global); goog.exportSymbol('proto.cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.MsgPruneAllowances', null, global); +goog.exportSymbol('proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse', null, global); goog.exportSymbol('proto.cosmos.feegrant.v1beta1.MsgRevokeAllowance', null, global); goog.exportSymbol('proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse', null, global); /** @@ -111,6 +113,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.displayName = 'proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowances = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.MsgPruneAllowances, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.displayName = 'proto.cosmos.feegrant.v1beta1.MsgPruneAllowances'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.displayName = 'proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse'; +} @@ -684,4 +728,235 @@ proto.cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse.serializeBinaryToWriter }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowances} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.toObject = function(includeInstance, msg) { + var f, obj = { + pruner: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowances} + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.MsgPruneAllowances; + return proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowances} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowances} + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPruner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowances} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPruner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string pruner = 1; + * @return {string} + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.prototype.getPruner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowances} returns this + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowances.prototype.setPruner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse} + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse; + return proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse} + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.cosmos.feegrant.v1beta1); diff --git a/proto/cosmos/feegrant/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/feegrant/v1beta1/tx_pb_service.d.ts similarity index 78% rename from proto/cosmos/feegrant/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/feegrant/v1beta1/tx_pb_service.d.ts index b4ef282..dedd526 100644 --- a/proto/cosmos/feegrant/v1beta1/tx_pb_service.d.ts +++ b/codegen/cosmos/feegrant/v1beta1/tx_pb_service.d.ts @@ -22,10 +22,20 @@ type MsgRevokeAllowance = { readonly responseType: typeof cosmos_feegrant_v1beta1_tx_pb.MsgRevokeAllowanceResponse; }; +type MsgPruneAllowances = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_feegrant_v1beta1_tx_pb.MsgPruneAllowances; + readonly responseType: typeof cosmos_feegrant_v1beta1_tx_pb.MsgPruneAllowancesResponse; +}; + export class Msg { static readonly serviceName: string; static readonly GrantAllowance: MsgGrantAllowance; static readonly RevokeAllowance: MsgRevokeAllowance; + static readonly PruneAllowances: MsgPruneAllowances; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -78,5 +88,14 @@ export class MsgClient { requestMessage: cosmos_feegrant_v1beta1_tx_pb.MsgRevokeAllowance, callback: (error: ServiceError|null, responseMessage: cosmos_feegrant_v1beta1_tx_pb.MsgRevokeAllowanceResponse|null) => void ): UnaryResponse; + pruneAllowances( + requestMessage: cosmos_feegrant_v1beta1_tx_pb.MsgPruneAllowances, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_feegrant_v1beta1_tx_pb.MsgPruneAllowancesResponse|null) => void + ): UnaryResponse; + pruneAllowances( + requestMessage: cosmos_feegrant_v1beta1_tx_pb.MsgPruneAllowances, + callback: (error: ServiceError|null, responseMessage: cosmos_feegrant_v1beta1_tx_pb.MsgPruneAllowancesResponse|null) => void + ): UnaryResponse; } diff --git a/proto/cosmos/feegrant/v1beta1/tx_pb_service.js b/codegen/cosmos/feegrant/v1beta1/tx_pb_service.js similarity index 71% rename from proto/cosmos/feegrant/v1beta1/tx_pb_service.js rename to codegen/cosmos/feegrant/v1beta1/tx_pb_service.js index c83ff30..de14019 100644 --- a/proto/cosmos/feegrant/v1beta1/tx_pb_service.js +++ b/codegen/cosmos/feegrant/v1beta1/tx_pb_service.js @@ -28,6 +28,15 @@ Msg.RevokeAllowance = { responseType: cosmos_feegrant_v1beta1_tx_pb.MsgRevokeAllowanceResponse }; +Msg.PruneAllowances = { + methodName: "PruneAllowances", + service: Msg, + requestStream: false, + responseStream: false, + requestType: cosmos_feegrant_v1beta1_tx_pb.MsgPruneAllowances, + responseType: cosmos_feegrant_v1beta1_tx_pb.MsgPruneAllowancesResponse +}; + exports.Msg = Msg; function MsgClient(serviceHost, options) { @@ -97,5 +106,36 @@ MsgClient.prototype.revokeAllowance = function revokeAllowance(requestMessage, m }; }; +MsgClient.prototype.pruneAllowances = function pruneAllowances(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.PruneAllowances, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.MsgClient = MsgClient; diff --git a/codegen/cosmos/genutil/module/v1/module.ts b/codegen/cosmos/genutil/module/v1/module.ts new file mode 100644 index 0000000..f0ff9ff --- /dev/null +++ b/codegen/cosmos/genutil/module/v1/module.ts @@ -0,0 +1,49 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/genutil/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.genutil.module.v1 { + export class Module 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: {}): Module { + const message = new Module({}); + 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): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/genutil/module/v1/module_pb.d.ts b/codegen/cosmos/genutil/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/genutil/module/v1/module_pb.d.ts rename to codegen/cosmos/genutil/module/v1/module_pb.d.ts diff --git a/proto/cosmos/genutil/module/v1/module_pb.js b/codegen/cosmos/genutil/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/genutil/module/v1/module_pb.js rename to codegen/cosmos/genutil/module/v1/module_pb.js diff --git a/proto/cosmos/genutil/module/v1/module_pb_service.d.ts b/codegen/cosmos/genutil/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/genutil/module/v1/module_pb_service.d.ts rename to codegen/cosmos/genutil/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/genutil/module/v1/module_pb_service.js b/codegen/cosmos/genutil/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/genutil/module/v1/module_pb_service.js rename to codegen/cosmos/genutil/module/v1/module_pb_service.js diff --git a/codegen/cosmos/genutil/v1beta1/genesis.ts b/codegen/cosmos/genutil/v1beta1/genesis.ts new file mode 100644 index 0000000..3f7ebf6 --- /dev/null +++ b/codegen/cosmos/genutil/v1beta1/genesis.ts @@ -0,0 +1,77 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/genutil/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.genutil.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + gen_txs?: Uint8Array[]; + }) { + 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 ("gen_txs" in data && data.gen_txs != undefined) { + this.gen_txs = data.gen_txs; + } + } + } + get gen_txs() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as Uint8Array[]; + } + set gen_txs(value: Uint8Array[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + gen_txs?: Uint8Array[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.gen_txs != null) { + message.gen_txs = data.gen_txs; + } + return message; + } + toObject() { + const data: { + gen_txs?: Uint8Array[]; + } = {}; + if (this.gen_txs != null) { + data.gen_txs = this.gen_txs; + } + 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.gen_txs.length) + writer.writeRepeatedBytes(1, this.gen_txs); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/genutil/v1beta1/genesis_pb.d.ts b/codegen/cosmos/genutil/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/genutil/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/genutil/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/genutil/v1beta1/genesis_pb.js b/codegen/cosmos/genutil/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/genutil/v1beta1/genesis_pb.js rename to codegen/cosmos/genutil/v1beta1/genesis_pb.js diff --git a/proto/cosmos/genutil/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/genutil/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/genutil/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/genutil/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/genutil/v1beta1/genesis_pb_service.js b/codegen/cosmos/genutil/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/genutil/v1beta1/genesis_pb_service.js rename to codegen/cosmos/genutil/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/gov/module/v1/module.ts b/codegen/cosmos/gov/module/v1/module.ts new file mode 100644 index 0000000..592c976 --- /dev/null +++ b/codegen/cosmos/gov/module/v1/module.ts @@ -0,0 +1,99 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/gov/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.gov.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + max_metadata_len?: number; + authority?: 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 ("max_metadata_len" in data && data.max_metadata_len != undefined) { + this.max_metadata_len = data.max_metadata_len; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get max_metadata_len() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set max_metadata_len(value: number) { + pb_1.Message.setField(this, 1, value); + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + max_metadata_len?: number; + authority?: string; + }): Module { + const message = new Module({}); + if (data.max_metadata_len != null) { + message.max_metadata_len = data.max_metadata_len; + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + max_metadata_len?: number; + authority?: string; + } = {}; + if (this.max_metadata_len != null) { + data.max_metadata_len = this.max_metadata_len; + } + if (this.authority != null) { + data.authority = this.authority; + } + 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.max_metadata_len != 0) + writer.writeUint64(1, this.max_metadata_len); + if (this.authority.length) + writer.writeString(2, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.max_metadata_len = reader.readUint64(); + break; + case 2: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/gov/module/v1/module_pb.d.ts b/codegen/cosmos/gov/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/gov/module/v1/module_pb.d.ts rename to codegen/cosmos/gov/module/v1/module_pb.d.ts diff --git a/proto/cosmos/gov/module/v1/module_pb.js b/codegen/cosmos/gov/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/gov/module/v1/module_pb.js rename to codegen/cosmos/gov/module/v1/module_pb.js diff --git a/proto/cosmos/gov/module/v1/module_pb_service.d.ts b/codegen/cosmos/gov/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/gov/module/v1/module_pb_service.d.ts rename to codegen/cosmos/gov/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/gov/module/v1/module_pb_service.js b/codegen/cosmos/gov/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/gov/module/v1/module_pb_service.js rename to codegen/cosmos/gov/module/v1/module_pb_service.js diff --git a/codegen/cosmos/gov/v1/genesis.ts b/codegen/cosmos/gov/v1/genesis.ts new file mode 100644 index 0000000..8a2e3c8 --- /dev/null +++ b/codegen/cosmos/gov/v1/genesis.ts @@ -0,0 +1,284 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/gov/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./gov"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.gov.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + starting_proposal_id?: number; + deposits?: dependency_1.cosmos.gov.v1.Deposit[]; + votes?: dependency_1.cosmos.gov.v1.Vote[]; + proposals?: dependency_1.cosmos.gov.v1.Proposal[]; + /** @deprecated*/ + deposit_params?: dependency_1.cosmos.gov.v1.DepositParams; + /** @deprecated*/ + voting_params?: dependency_1.cosmos.gov.v1.VotingParams; + /** @deprecated*/ + tally_params?: dependency_1.cosmos.gov.v1.TallyParams; + params?: dependency_1.cosmos.gov.v1.Params; + constitution?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("starting_proposal_id" in data && data.starting_proposal_id != undefined) { + this.starting_proposal_id = data.starting_proposal_id; + } + if ("deposits" in data && data.deposits != undefined) { + this.deposits = data.deposits; + } + if ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + if ("proposals" in data && data.proposals != undefined) { + this.proposals = data.proposals; + } + if ("deposit_params" in data && data.deposit_params != undefined) { + this.deposit_params = data.deposit_params; + } + if ("voting_params" in data && data.voting_params != undefined) { + this.voting_params = data.voting_params; + } + if ("tally_params" in data && data.tally_params != undefined) { + this.tally_params = data.tally_params; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("constitution" in data && data.constitution != undefined) { + this.constitution = data.constitution; + } + } + } + get starting_proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set starting_proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get deposits() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.gov.v1.Deposit, 2) as dependency_1.cosmos.gov.v1.Deposit[]; + } + set deposits(value: dependency_1.cosmos.gov.v1.Deposit[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.gov.v1.Vote, 3) as dependency_1.cosmos.gov.v1.Vote[]; + } + set votes(value: dependency_1.cosmos.gov.v1.Vote[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get proposals() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.gov.v1.Proposal, 4) as dependency_1.cosmos.gov.v1.Proposal[]; + } + set proposals(value: dependency_1.cosmos.gov.v1.Proposal[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + /** @deprecated*/ + get deposit_params() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.gov.v1.DepositParams, 5) as dependency_1.cosmos.gov.v1.DepositParams; + } + /** @deprecated*/ + set deposit_params(value: dependency_1.cosmos.gov.v1.DepositParams) { + pb_1.Message.setWrapperField(this, 5, value); + } + /** @deprecated*/ + get has_deposit_params() { + return pb_1.Message.getField(this, 5) != null; + } + /** @deprecated*/ + get voting_params() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.gov.v1.VotingParams, 6) as dependency_1.cosmos.gov.v1.VotingParams; + } + /** @deprecated*/ + set voting_params(value: dependency_1.cosmos.gov.v1.VotingParams) { + pb_1.Message.setWrapperField(this, 6, value); + } + /** @deprecated*/ + get has_voting_params() { + return pb_1.Message.getField(this, 6) != null; + } + /** @deprecated*/ + get tally_params() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.gov.v1.TallyParams, 7) as dependency_1.cosmos.gov.v1.TallyParams; + } + /** @deprecated*/ + set tally_params(value: dependency_1.cosmos.gov.v1.TallyParams) { + pb_1.Message.setWrapperField(this, 7, value); + } + /** @deprecated*/ + get has_tally_params() { + return pb_1.Message.getField(this, 7) != null; + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.gov.v1.Params, 8) as dependency_1.cosmos.gov.v1.Params; + } + set params(value: dependency_1.cosmos.gov.v1.Params) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_params() { + return pb_1.Message.getField(this, 8) != null; + } + get constitution() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set constitution(value: string) { + pb_1.Message.setField(this, 9, value); + } + static fromObject(data: { + starting_proposal_id?: number; + deposits?: ReturnType[]; + votes?: ReturnType[]; + proposals?: ReturnType[]; + deposit_params?: ReturnType; + voting_params?: ReturnType; + tally_params?: ReturnType; + params?: ReturnType; + constitution?: string; + }): GenesisState { + const message = new GenesisState({}); + if (data.starting_proposal_id != null) { + message.starting_proposal_id = data.starting_proposal_id; + } + if (data.deposits != null) { + message.deposits = data.deposits.map(item => dependency_1.cosmos.gov.v1.Deposit.fromObject(item)); + } + if (data.votes != null) { + message.votes = data.votes.map(item => dependency_1.cosmos.gov.v1.Vote.fromObject(item)); + } + if (data.proposals != null) { + message.proposals = data.proposals.map(item => dependency_1.cosmos.gov.v1.Proposal.fromObject(item)); + } + if (data.deposit_params != null) { + message.deposit_params = dependency_1.cosmos.gov.v1.DepositParams.fromObject(data.deposit_params); + } + if (data.voting_params != null) { + message.voting_params = dependency_1.cosmos.gov.v1.VotingParams.fromObject(data.voting_params); + } + if (data.tally_params != null) { + message.tally_params = dependency_1.cosmos.gov.v1.TallyParams.fromObject(data.tally_params); + } + if (data.params != null) { + message.params = dependency_1.cosmos.gov.v1.Params.fromObject(data.params); + } + if (data.constitution != null) { + message.constitution = data.constitution; + } + return message; + } + toObject() { + const data: { + starting_proposal_id?: number; + deposits?: ReturnType[]; + votes?: ReturnType[]; + proposals?: ReturnType[]; + deposit_params?: ReturnType; + voting_params?: ReturnType; + tally_params?: ReturnType; + params?: ReturnType; + constitution?: string; + } = {}; + if (this.starting_proposal_id != null) { + data.starting_proposal_id = this.starting_proposal_id; + } + if (this.deposits != null) { + data.deposits = this.deposits.map((item: dependency_1.cosmos.gov.v1.Deposit) => item.toObject()); + } + if (this.votes != null) { + data.votes = this.votes.map((item: dependency_1.cosmos.gov.v1.Vote) => item.toObject()); + } + if (this.proposals != null) { + data.proposals = this.proposals.map((item: dependency_1.cosmos.gov.v1.Proposal) => item.toObject()); + } + if (this.deposit_params != null) { + data.deposit_params = this.deposit_params.toObject(); + } + if (this.voting_params != null) { + data.voting_params = this.voting_params.toObject(); + } + if (this.tally_params != null) { + data.tally_params = this.tally_params.toObject(); + } + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.constitution != null) { + data.constitution = this.constitution; + } + 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.starting_proposal_id != 0) + writer.writeUint64(1, this.starting_proposal_id); + if (this.deposits.length) + writer.writeRepeatedMessage(2, this.deposits, (item: dependency_1.cosmos.gov.v1.Deposit) => item.serialize(writer)); + if (this.votes.length) + writer.writeRepeatedMessage(3, this.votes, (item: dependency_1.cosmos.gov.v1.Vote) => item.serialize(writer)); + if (this.proposals.length) + writer.writeRepeatedMessage(4, this.proposals, (item: dependency_1.cosmos.gov.v1.Proposal) => item.serialize(writer)); + if (this.has_deposit_params) + writer.writeMessage(5, this.deposit_params, () => this.deposit_params.serialize(writer)); + if (this.has_voting_params) + writer.writeMessage(6, this.voting_params, () => this.voting_params.serialize(writer)); + if (this.has_tally_params) + writer.writeMessage(7, this.tally_params, () => this.tally_params.serialize(writer)); + if (this.has_params) + writer.writeMessage(8, this.params, () => this.params.serialize(writer)); + if (this.constitution.length) + writer.writeString(9, this.constitution); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.starting_proposal_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.deposits, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.cosmos.gov.v1.Deposit.deserialize(reader), dependency_1.cosmos.gov.v1.Deposit)); + break; + case 3: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.cosmos.gov.v1.Vote.deserialize(reader), dependency_1.cosmos.gov.v1.Vote)); + break; + case 4: + reader.readMessage(message.proposals, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_1.cosmos.gov.v1.Proposal.deserialize(reader), dependency_1.cosmos.gov.v1.Proposal)); + break; + case 5: + reader.readMessage(message.deposit_params, () => message.deposit_params = dependency_1.cosmos.gov.v1.DepositParams.deserialize(reader)); + break; + case 6: + reader.readMessage(message.voting_params, () => message.voting_params = dependency_1.cosmos.gov.v1.VotingParams.deserialize(reader)); + break; + case 7: + reader.readMessage(message.tally_params, () => message.tally_params = dependency_1.cosmos.gov.v1.TallyParams.deserialize(reader)); + break; + case 8: + reader.readMessage(message.params, () => message.params = dependency_1.cosmos.gov.v1.Params.deserialize(reader)); + break; + case 9: + message.constitution = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/gov/v1/genesis_pb.d.ts b/codegen/cosmos/gov/v1/genesis_pb.d.ts similarity index 96% rename from proto/cosmos/gov/v1/genesis_pb.d.ts rename to codegen/cosmos/gov/v1/genesis_pb.d.ts index 3b21baa..2129296 100644 --- a/proto/cosmos/gov/v1/genesis_pb.d.ts +++ b/codegen/cosmos/gov/v1/genesis_pb.d.ts @@ -43,6 +43,9 @@ export class GenesisState extends jspb.Message { getParams(): cosmos_gov_v1_gov_pb.Params | undefined; setParams(value?: cosmos_gov_v1_gov_pb.Params): void; + getConstitution(): string; + setConstitution(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GenesisState.AsObject; static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; @@ -63,6 +66,7 @@ export namespace GenesisState { votingParams?: cosmos_gov_v1_gov_pb.VotingParams.AsObject, tallyParams?: cosmos_gov_v1_gov_pb.TallyParams.AsObject, params?: cosmos_gov_v1_gov_pb.Params.AsObject, + constitution: string, } } diff --git a/proto/cosmos/gov/v1/genesis_pb.js b/codegen/cosmos/gov/v1/genesis_pb.js similarity index 95% rename from proto/cosmos/gov/v1/genesis_pb.js rename to codegen/cosmos/gov/v1/genesis_pb.js index 0c3837b..b8a3bff 100644 --- a/proto/cosmos/gov/v1/genesis_pb.js +++ b/codegen/cosmos/gov/v1/genesis_pb.js @@ -88,7 +88,8 @@ proto.cosmos.gov.v1.GenesisState.toObject = function(includeInstance, msg) { depositParams: (f = msg.getDepositParams()) && cosmos_gov_v1_gov_pb.DepositParams.toObject(includeInstance, f), votingParams: (f = msg.getVotingParams()) && cosmos_gov_v1_gov_pb.VotingParams.toObject(includeInstance, f), tallyParams: (f = msg.getTallyParams()) && cosmos_gov_v1_gov_pb.TallyParams.toObject(includeInstance, f), - params: (f = msg.getParams()) && cosmos_gov_v1_gov_pb.Params.toObject(includeInstance, f) + params: (f = msg.getParams()) && cosmos_gov_v1_gov_pb.Params.toObject(includeInstance, f), + constitution: jspb.Message.getFieldWithDefault(msg, 9, "") }; if (includeInstance) { @@ -164,6 +165,10 @@ proto.cosmos.gov.v1.GenesisState.deserializeBinaryFromReader = function(msg, rea reader.readMessage(value,cosmos_gov_v1_gov_pb.Params.deserializeBinaryFromReader); msg.setParams(value); break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setConstitution(value); + break; default: reader.skipField(); break; @@ -256,6 +261,13 @@ proto.cosmos.gov.v1.GenesisState.serializeBinaryToWriter = function(message, wri cosmos_gov_v1_gov_pb.Params.serializeBinaryToWriter ); } + f = message.getConstitution(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } }; @@ -539,4 +551,22 @@ proto.cosmos.gov.v1.GenesisState.prototype.hasParams = function() { }; +/** + * optional string constitution = 9; + * @return {string} + */ +proto.cosmos.gov.v1.GenesisState.prototype.getConstitution = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1.GenesisState} returns this + */ +proto.cosmos.gov.v1.GenesisState.prototype.setConstitution = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + goog.object.extend(exports, proto.cosmos.gov.v1); diff --git a/proto/cosmos/gov/v1/genesis_pb_service.d.ts b/codegen/cosmos/gov/v1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/gov/v1/genesis_pb_service.d.ts rename to codegen/cosmos/gov/v1/genesis_pb_service.d.ts diff --git a/proto/cosmos/gov/v1/genesis_pb_service.js b/codegen/cosmos/gov/v1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/gov/v1/genesis_pb_service.js rename to codegen/cosmos/gov/v1/genesis_pb_service.js diff --git a/codegen/cosmos/gov/v1/gov.ts b/codegen/cosmos/gov/v1/gov.ts new file mode 100644 index 0000000..ce96974 --- /dev/null +++ b/codegen/cosmos/gov/v1/gov.ts @@ -0,0 +1,1609 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/gov/v1/gov.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/v1beta1/coin"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/protobuf/timestamp"; +import * as dependency_4 from "./../../../google/protobuf/any"; +import * as dependency_5 from "./../../../google/protobuf/duration"; +import * as dependency_6 from "./../../../cosmos_proto/cosmos"; +import * as dependency_7 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.gov.v1 { + export enum VoteOption { + VOTE_OPTION_UNSPECIFIED = 0, + VOTE_OPTION_YES = 1, + VOTE_OPTION_ABSTAIN = 2, + VOTE_OPTION_NO = 3, + VOTE_OPTION_NO_WITH_VETO = 4 + } + export enum ProposalStatus { + PROPOSAL_STATUS_UNSPECIFIED = 0, + PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, + PROPOSAL_STATUS_VOTING_PERIOD = 2, + PROPOSAL_STATUS_PASSED = 3, + PROPOSAL_STATUS_REJECTED = 4, + PROPOSAL_STATUS_FAILED = 5 + } + export class WeightedVoteOption extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + option?: VoteOption; + weight?: 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 ("option" in data && data.option != undefined) { + this.option = data.option; + } + if ("weight" in data && data.weight != undefined) { + this.weight = data.weight; + } + } + } + get option() { + return pb_1.Message.getFieldWithDefault(this, 1, VoteOption.VOTE_OPTION_UNSPECIFIED) as VoteOption; + } + set option(value: VoteOption) { + pb_1.Message.setField(this, 1, value); + } + get weight() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set weight(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + option?: VoteOption; + weight?: string; + }): WeightedVoteOption { + const message = new WeightedVoteOption({}); + if (data.option != null) { + message.option = data.option; + } + if (data.weight != null) { + message.weight = data.weight; + } + return message; + } + toObject() { + const data: { + option?: VoteOption; + weight?: string; + } = {}; + if (this.option != null) { + data.option = this.option; + } + if (this.weight != null) { + data.weight = this.weight; + } + 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.option != VoteOption.VOTE_OPTION_UNSPECIFIED) + writer.writeEnum(1, this.option); + if (this.weight.length) + writer.writeString(2, this.weight); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WeightedVoteOption { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WeightedVoteOption(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.option = reader.readEnum(); + break; + case 2: + message.weight = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WeightedVoteOption { + return WeightedVoteOption.deserialize(bytes); + } + } + export class Deposit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + depositor?: string; + amount?: dependency_1.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 3) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + proposal_id?: number; + depositor?: string; + amount?: ReturnType[]; + }): Deposit { + const message = new Deposit({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + depositor?: string; + amount?: ReturnType[]; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.depositor.length) + writer.writeString(2, this.depositor); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Deposit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Deposit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.depositor = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Deposit { + return Deposit.deserialize(bytes); + } + } + export class Proposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + messages?: dependency_4.google.protobuf.Any[]; + status?: ProposalStatus; + final_tally_result?: TallyResult; + submit_time?: dependency_3.google.protobuf.Timestamp; + deposit_end_time?: dependency_3.google.protobuf.Timestamp; + total_deposit?: dependency_1.cosmos.base.v1beta1.Coin[]; + voting_start_time?: dependency_3.google.protobuf.Timestamp; + voting_end_time?: dependency_3.google.protobuf.Timestamp; + metadata?: string; + title?: string; + summary?: string; + proposer?: string; + expedited?: boolean; + failed_reason?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("messages" in data && data.messages != undefined) { + this.messages = data.messages; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("final_tally_result" in data && data.final_tally_result != undefined) { + this.final_tally_result = data.final_tally_result; + } + if ("submit_time" in data && data.submit_time != undefined) { + this.submit_time = data.submit_time; + } + if ("deposit_end_time" in data && data.deposit_end_time != undefined) { + this.deposit_end_time = data.deposit_end_time; + } + if ("total_deposit" in data && data.total_deposit != undefined) { + this.total_deposit = data.total_deposit; + } + if ("voting_start_time" in data && data.voting_start_time != undefined) { + this.voting_start_time = data.voting_start_time; + } + if ("voting_end_time" in data && data.voting_end_time != undefined) { + this.voting_end_time = data.voting_end_time; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("summary" in data && data.summary != undefined) { + this.summary = data.summary; + } + if ("proposer" in data && data.proposer != undefined) { + this.proposer = data.proposer; + } + if ("expedited" in data && data.expedited != undefined) { + this.expedited = data.expedited; + } + if ("failed_reason" in data && data.failed_reason != undefined) { + this.failed_reason = data.failed_reason; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get messages() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any[]; + } + set messages(value: dependency_4.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 3, ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) as ProposalStatus; + } + set status(value: ProposalStatus) { + pb_1.Message.setField(this, 3, value); + } + get final_tally_result() { + return pb_1.Message.getWrapperField(this, TallyResult, 4) as TallyResult; + } + set final_tally_result(value: TallyResult) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_final_tally_result() { + return pb_1.Message.getField(this, 4) != null; + } + get submit_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5) as dependency_3.google.protobuf.Timestamp; + } + set submit_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_submit_time() { + return pb_1.Message.getField(this, 5) != null; + } + get deposit_end_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 6) as dependency_3.google.protobuf.Timestamp; + } + set deposit_end_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_deposit_end_time() { + return pb_1.Message.getField(this, 6) != null; + } + get total_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 7) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set total_deposit(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get voting_start_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 8) as dependency_3.google.protobuf.Timestamp; + } + set voting_start_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_voting_start_time() { + return pb_1.Message.getField(this, 8) != null; + } + get voting_end_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 9) as dependency_3.google.protobuf.Timestamp; + } + set voting_end_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_voting_end_time() { + return pb_1.Message.getField(this, 9) != null; + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 10, value); + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 11, value); + } + get summary() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set summary(value: string) { + pb_1.Message.setField(this, 12, value); + } + get proposer() { + return pb_1.Message.getFieldWithDefault(this, 13, "") as string; + } + set proposer(value: string) { + pb_1.Message.setField(this, 13, value); + } + get expedited() { + return pb_1.Message.getFieldWithDefault(this, 14, false) as boolean; + } + set expedited(value: boolean) { + pb_1.Message.setField(this, 14, value); + } + get failed_reason() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set failed_reason(value: string) { + pb_1.Message.setField(this, 15, value); + } + static fromObject(data: { + id?: number; + messages?: ReturnType[]; + status?: ProposalStatus; + final_tally_result?: ReturnType; + submit_time?: ReturnType; + deposit_end_time?: ReturnType; + total_deposit?: ReturnType[]; + voting_start_time?: ReturnType; + voting_end_time?: ReturnType; + metadata?: string; + title?: string; + summary?: string; + proposer?: string; + expedited?: boolean; + failed_reason?: string; + }): Proposal { + const message = new Proposal({}); + if (data.id != null) { + message.id = data.id; + } + if (data.messages != null) { + message.messages = data.messages.map(item => dependency_4.google.protobuf.Any.fromObject(item)); + } + if (data.status != null) { + message.status = data.status; + } + if (data.final_tally_result != null) { + message.final_tally_result = TallyResult.fromObject(data.final_tally_result); + } + if (data.submit_time != null) { + message.submit_time = dependency_3.google.protobuf.Timestamp.fromObject(data.submit_time); + } + if (data.deposit_end_time != null) { + message.deposit_end_time = dependency_3.google.protobuf.Timestamp.fromObject(data.deposit_end_time); + } + if (data.total_deposit != null) { + message.total_deposit = data.total_deposit.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.voting_start_time != null) { + message.voting_start_time = dependency_3.google.protobuf.Timestamp.fromObject(data.voting_start_time); + } + if (data.voting_end_time != null) { + message.voting_end_time = dependency_3.google.protobuf.Timestamp.fromObject(data.voting_end_time); + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.title != null) { + message.title = data.title; + } + if (data.summary != null) { + message.summary = data.summary; + } + if (data.proposer != null) { + message.proposer = data.proposer; + } + if (data.expedited != null) { + message.expedited = data.expedited; + } + if (data.failed_reason != null) { + message.failed_reason = data.failed_reason; + } + return message; + } + toObject() { + const data: { + id?: number; + messages?: ReturnType[]; + status?: ProposalStatus; + final_tally_result?: ReturnType; + submit_time?: ReturnType; + deposit_end_time?: ReturnType; + total_deposit?: ReturnType[]; + voting_start_time?: ReturnType; + voting_end_time?: ReturnType; + metadata?: string; + title?: string; + summary?: string; + proposer?: string; + expedited?: boolean; + failed_reason?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.messages != null) { + data.messages = this.messages.map((item: dependency_4.google.protobuf.Any) => item.toObject()); + } + if (this.status != null) { + data.status = this.status; + } + if (this.final_tally_result != null) { + data.final_tally_result = this.final_tally_result.toObject(); + } + if (this.submit_time != null) { + data.submit_time = this.submit_time.toObject(); + } + if (this.deposit_end_time != null) { + data.deposit_end_time = this.deposit_end_time.toObject(); + } + if (this.total_deposit != null) { + data.total_deposit = this.total_deposit.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.voting_start_time != null) { + data.voting_start_time = this.voting_start_time.toObject(); + } + if (this.voting_end_time != null) { + data.voting_end_time = this.voting_end_time.toObject(); + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.title != null) { + data.title = this.title; + } + if (this.summary != null) { + data.summary = this.summary; + } + if (this.proposer != null) { + data.proposer = this.proposer; + } + if (this.expedited != null) { + data.expedited = this.expedited; + } + if (this.failed_reason != null) { + data.failed_reason = this.failed_reason; + } + 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.id != 0) + writer.writeUint64(1, this.id); + if (this.messages.length) + writer.writeRepeatedMessage(2, this.messages, (item: dependency_4.google.protobuf.Any) => item.serialize(writer)); + if (this.status != ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) + writer.writeEnum(3, this.status); + if (this.has_final_tally_result) + writer.writeMessage(4, this.final_tally_result, () => this.final_tally_result.serialize(writer)); + if (this.has_submit_time) + writer.writeMessage(5, this.submit_time, () => this.submit_time.serialize(writer)); + if (this.has_deposit_end_time) + writer.writeMessage(6, this.deposit_end_time, () => this.deposit_end_time.serialize(writer)); + if (this.total_deposit.length) + writer.writeRepeatedMessage(7, this.total_deposit, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_voting_start_time) + writer.writeMessage(8, this.voting_start_time, () => this.voting_start_time.serialize(writer)); + if (this.has_voting_end_time) + writer.writeMessage(9, this.voting_end_time, () => this.voting_end_time.serialize(writer)); + if (this.metadata.length) + writer.writeString(10, this.metadata); + if (this.title.length) + writer.writeString(11, this.title); + if (this.summary.length) + writer.writeString(12, this.summary); + if (this.proposer.length) + writer.writeString(13, this.proposer); + if (this.expedited != false) + writer.writeBool(14, this.expedited); + if (this.failed_reason.length) + writer.writeString(15, this.failed_reason); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Proposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Proposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.messages, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.google.protobuf.Any.deserialize(reader), dependency_4.google.protobuf.Any)); + break; + case 3: + message.status = reader.readEnum(); + break; + case 4: + reader.readMessage(message.final_tally_result, () => message.final_tally_result = TallyResult.deserialize(reader)); + break; + case 5: + reader.readMessage(message.submit_time, () => message.submit_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 6: + reader.readMessage(message.deposit_end_time, () => message.deposit_end_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 7: + reader.readMessage(message.total_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + case 8: + reader.readMessage(message.voting_start_time, () => message.voting_start_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 9: + reader.readMessage(message.voting_end_time, () => message.voting_end_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 10: + message.metadata = reader.readString(); + break; + case 11: + message.title = reader.readString(); + break; + case 12: + message.summary = reader.readString(); + break; + case 13: + message.proposer = reader.readString(); + break; + case 14: + message.expedited = reader.readBool(); + break; + case 15: + message.failed_reason = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Proposal { + return Proposal.deserialize(bytes); + } + } + export class TallyResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + yes_count?: string; + abstain_count?: string; + no_count?: string; + no_with_veto_count?: 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 ("yes_count" in data && data.yes_count != undefined) { + this.yes_count = data.yes_count; + } + if ("abstain_count" in data && data.abstain_count != undefined) { + this.abstain_count = data.abstain_count; + } + if ("no_count" in data && data.no_count != undefined) { + this.no_count = data.no_count; + } + if ("no_with_veto_count" in data && data.no_with_veto_count != undefined) { + this.no_with_veto_count = data.no_with_veto_count; + } + } + } + get yes_count() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set yes_count(value: string) { + pb_1.Message.setField(this, 1, value); + } + get abstain_count() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set abstain_count(value: string) { + pb_1.Message.setField(this, 2, value); + } + get no_count() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set no_count(value: string) { + pb_1.Message.setField(this, 3, value); + } + get no_with_veto_count() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set no_with_veto_count(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + yes_count?: string; + abstain_count?: string; + no_count?: string; + no_with_veto_count?: string; + }): TallyResult { + const message = new TallyResult({}); + if (data.yes_count != null) { + message.yes_count = data.yes_count; + } + if (data.abstain_count != null) { + message.abstain_count = data.abstain_count; + } + if (data.no_count != null) { + message.no_count = data.no_count; + } + if (data.no_with_veto_count != null) { + message.no_with_veto_count = data.no_with_veto_count; + } + return message; + } + toObject() { + const data: { + yes_count?: string; + abstain_count?: string; + no_count?: string; + no_with_veto_count?: string; + } = {}; + if (this.yes_count != null) { + data.yes_count = this.yes_count; + } + if (this.abstain_count != null) { + data.abstain_count = this.abstain_count; + } + if (this.no_count != null) { + data.no_count = this.no_count; + } + if (this.no_with_veto_count != null) { + data.no_with_veto_count = this.no_with_veto_count; + } + 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.yes_count.length) + writer.writeString(1, this.yes_count); + if (this.abstain_count.length) + writer.writeString(2, this.abstain_count); + if (this.no_count.length) + writer.writeString(3, this.no_count); + if (this.no_with_veto_count.length) + writer.writeString(4, this.no_with_veto_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TallyResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TallyResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.yes_count = reader.readString(); + break; + case 2: + message.abstain_count = reader.readString(); + break; + case 3: + message.no_count = reader.readString(); + break; + case 4: + message.no_with_veto_count = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TallyResult { + return TallyResult.deserialize(bytes); + } + } + export class Vote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: string; + options?: WeightedVoteOption[]; + metadata?: string; + }) { + 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + get options() { + return pb_1.Message.getRepeatedWrapperField(this, WeightedVoteOption, 4) as WeightedVoteOption[]; + } + set options(value: WeightedVoteOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + options?: ReturnType[]; + metadata?: string; + }): Vote { + const message = new Vote({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.options != null) { + message.options = data.options.map(item => WeightedVoteOption.fromObject(item)); + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + options?: ReturnType[]; + metadata?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.options != null) { + data.options = this.options.map((item: WeightedVoteOption) => item.toObject()); + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.options.length) + writer.writeRepeatedMessage(4, this.options, (item: WeightedVoteOption) => item.serialize(writer)); + if (this.metadata.length) + writer.writeString(5, this.metadata); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Vote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Vote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + case 4: + reader.readMessage(message.options, () => pb_1.Message.addToRepeatedWrapperField(message, 4, WeightedVoteOption.deserialize(reader), WeightedVoteOption)); + break; + case 5: + message.metadata = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Vote { + return Vote.deserialize(bytes); + } + } + /** @deprecated*/ + export class DepositParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + min_deposit?: dependency_1.cosmos.base.v1beta1.Coin[]; + max_deposit_period?: dependency_5.google.protobuf.Duration; + }) { + 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 ("min_deposit" in data && data.min_deposit != undefined) { + this.min_deposit = data.min_deposit; + } + if ("max_deposit_period" in data && data.max_deposit_period != undefined) { + this.max_deposit_period = data.max_deposit_period; + } + } + } + get min_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 1) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set min_deposit(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get max_deposit_period() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Duration, 2) as dependency_5.google.protobuf.Duration; + } + set max_deposit_period(value: dependency_5.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_max_deposit_period() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + min_deposit?: ReturnType[]; + max_deposit_period?: ReturnType; + }): DepositParams { + const message = new DepositParams({}); + if (data.min_deposit != null) { + message.min_deposit = data.min_deposit.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.max_deposit_period != null) { + message.max_deposit_period = dependency_5.google.protobuf.Duration.fromObject(data.max_deposit_period); + } + return message; + } + toObject() { + const data: { + min_deposit?: ReturnType[]; + max_deposit_period?: ReturnType; + } = {}; + if (this.min_deposit != null) { + data.min_deposit = this.min_deposit.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.max_deposit_period != null) { + data.max_deposit_period = this.max_deposit_period.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.min_deposit.length) + writer.writeRepeatedMessage(1, this.min_deposit, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_max_deposit_period) + writer.writeMessage(2, this.max_deposit_period, () => this.max_deposit_period.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DepositParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DepositParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.min_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + case 2: + reader.readMessage(message.max_deposit_period, () => message.max_deposit_period = dependency_5.google.protobuf.Duration.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DepositParams { + return DepositParams.deserialize(bytes); + } + } + /** @deprecated*/ + export class VotingParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + voting_period?: dependency_5.google.protobuf.Duration; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("voting_period" in data && data.voting_period != undefined) { + this.voting_period = data.voting_period; + } + } + } + get voting_period() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Duration, 1) as dependency_5.google.protobuf.Duration; + } + set voting_period(value: dependency_5.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_voting_period() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + voting_period?: ReturnType; + }): VotingParams { + const message = new VotingParams({}); + if (data.voting_period != null) { + message.voting_period = dependency_5.google.protobuf.Duration.fromObject(data.voting_period); + } + return message; + } + toObject() { + const data: { + voting_period?: ReturnType; + } = {}; + if (this.voting_period != null) { + data.voting_period = this.voting_period.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_voting_period) + writer.writeMessage(1, this.voting_period, () => this.voting_period.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VotingParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VotingParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.voting_period, () => message.voting_period = dependency_5.google.protobuf.Duration.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VotingParams { + return VotingParams.deserialize(bytes); + } + } + /** @deprecated*/ + export class TallyParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + quorum?: string; + threshold?: string; + veto_threshold?: 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 ("quorum" in data && data.quorum != undefined) { + this.quorum = data.quorum; + } + if ("threshold" in data && data.threshold != undefined) { + this.threshold = data.threshold; + } + if ("veto_threshold" in data && data.veto_threshold != undefined) { + this.veto_threshold = data.veto_threshold; + } + } + } + get quorum() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set quorum(value: string) { + pb_1.Message.setField(this, 1, value); + } + get threshold() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set threshold(value: string) { + pb_1.Message.setField(this, 2, value); + } + get veto_threshold() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set veto_threshold(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + quorum?: string; + threshold?: string; + veto_threshold?: string; + }): TallyParams { + const message = new TallyParams({}); + if (data.quorum != null) { + message.quorum = data.quorum; + } + if (data.threshold != null) { + message.threshold = data.threshold; + } + if (data.veto_threshold != null) { + message.veto_threshold = data.veto_threshold; + } + return message; + } + toObject() { + const data: { + quorum?: string; + threshold?: string; + veto_threshold?: string; + } = {}; + if (this.quorum != null) { + data.quorum = this.quorum; + } + if (this.threshold != null) { + data.threshold = this.threshold; + } + if (this.veto_threshold != null) { + data.veto_threshold = this.veto_threshold; + } + 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.quorum.length) + writer.writeString(1, this.quorum); + if (this.threshold.length) + writer.writeString(2, this.threshold); + if (this.veto_threshold.length) + writer.writeString(3, this.veto_threshold); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TallyParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TallyParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.quorum = reader.readString(); + break; + case 2: + message.threshold = reader.readString(); + break; + case 3: + message.veto_threshold = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TallyParams { + return TallyParams.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + min_deposit?: dependency_1.cosmos.base.v1beta1.Coin[]; + max_deposit_period?: dependency_5.google.protobuf.Duration; + voting_period?: dependency_5.google.protobuf.Duration; + quorum?: string; + threshold?: string; + veto_threshold?: string; + min_initial_deposit_ratio?: string; + proposal_cancel_ratio?: string; + proposal_cancel_dest?: string; + expedited_voting_period?: dependency_5.google.protobuf.Duration; + expedited_threshold?: string; + expedited_min_deposit?: dependency_1.cosmos.base.v1beta1.Coin[]; + burn_vote_quorum?: boolean; + burn_proposal_deposit_prevote?: boolean; + burn_vote_veto?: boolean; + min_deposit_ratio?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 12], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("min_deposit" in data && data.min_deposit != undefined) { + this.min_deposit = data.min_deposit; + } + if ("max_deposit_period" in data && data.max_deposit_period != undefined) { + this.max_deposit_period = data.max_deposit_period; + } + if ("voting_period" in data && data.voting_period != undefined) { + this.voting_period = data.voting_period; + } + if ("quorum" in data && data.quorum != undefined) { + this.quorum = data.quorum; + } + if ("threshold" in data && data.threshold != undefined) { + this.threshold = data.threshold; + } + if ("veto_threshold" in data && data.veto_threshold != undefined) { + this.veto_threshold = data.veto_threshold; + } + if ("min_initial_deposit_ratio" in data && data.min_initial_deposit_ratio != undefined) { + this.min_initial_deposit_ratio = data.min_initial_deposit_ratio; + } + if ("proposal_cancel_ratio" in data && data.proposal_cancel_ratio != undefined) { + this.proposal_cancel_ratio = data.proposal_cancel_ratio; + } + if ("proposal_cancel_dest" in data && data.proposal_cancel_dest != undefined) { + this.proposal_cancel_dest = data.proposal_cancel_dest; + } + if ("expedited_voting_period" in data && data.expedited_voting_period != undefined) { + this.expedited_voting_period = data.expedited_voting_period; + } + if ("expedited_threshold" in data && data.expedited_threshold != undefined) { + this.expedited_threshold = data.expedited_threshold; + } + if ("expedited_min_deposit" in data && data.expedited_min_deposit != undefined) { + this.expedited_min_deposit = data.expedited_min_deposit; + } + if ("burn_vote_quorum" in data && data.burn_vote_quorum != undefined) { + this.burn_vote_quorum = data.burn_vote_quorum; + } + if ("burn_proposal_deposit_prevote" in data && data.burn_proposal_deposit_prevote != undefined) { + this.burn_proposal_deposit_prevote = data.burn_proposal_deposit_prevote; + } + if ("burn_vote_veto" in data && data.burn_vote_veto != undefined) { + this.burn_vote_veto = data.burn_vote_veto; + } + if ("min_deposit_ratio" in data && data.min_deposit_ratio != undefined) { + this.min_deposit_ratio = data.min_deposit_ratio; + } + } + } + get min_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 1) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set min_deposit(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get max_deposit_period() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Duration, 2) as dependency_5.google.protobuf.Duration; + } + set max_deposit_period(value: dependency_5.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_max_deposit_period() { + return pb_1.Message.getField(this, 2) != null; + } + get voting_period() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Duration, 3) as dependency_5.google.protobuf.Duration; + } + set voting_period(value: dependency_5.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_voting_period() { + return pb_1.Message.getField(this, 3) != null; + } + get quorum() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set quorum(value: string) { + pb_1.Message.setField(this, 4, value); + } + get threshold() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set threshold(value: string) { + pb_1.Message.setField(this, 5, value); + } + get veto_threshold() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set veto_threshold(value: string) { + pb_1.Message.setField(this, 6, value); + } + get min_initial_deposit_ratio() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set min_initial_deposit_ratio(value: string) { + pb_1.Message.setField(this, 7, value); + } + get proposal_cancel_ratio() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set proposal_cancel_ratio(value: string) { + pb_1.Message.setField(this, 8, value); + } + get proposal_cancel_dest() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set proposal_cancel_dest(value: string) { + pb_1.Message.setField(this, 9, value); + } + get expedited_voting_period() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Duration, 10) as dependency_5.google.protobuf.Duration; + } + set expedited_voting_period(value: dependency_5.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_expedited_voting_period() { + return pb_1.Message.getField(this, 10) != null; + } + get expedited_threshold() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set expedited_threshold(value: string) { + pb_1.Message.setField(this, 11, value); + } + get expedited_min_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 12) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set expedited_min_deposit(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 12, value); + } + get burn_vote_quorum() { + return pb_1.Message.getFieldWithDefault(this, 13, false) as boolean; + } + set burn_vote_quorum(value: boolean) { + pb_1.Message.setField(this, 13, value); + } + get burn_proposal_deposit_prevote() { + return pb_1.Message.getFieldWithDefault(this, 14, false) as boolean; + } + set burn_proposal_deposit_prevote(value: boolean) { + pb_1.Message.setField(this, 14, value); + } + get burn_vote_veto() { + return pb_1.Message.getFieldWithDefault(this, 15, false) as boolean; + } + set burn_vote_veto(value: boolean) { + pb_1.Message.setField(this, 15, value); + } + get min_deposit_ratio() { + return pb_1.Message.getFieldWithDefault(this, 16, "") as string; + } + set min_deposit_ratio(value: string) { + pb_1.Message.setField(this, 16, value); + } + static fromObject(data: { + min_deposit?: ReturnType[]; + max_deposit_period?: ReturnType; + voting_period?: ReturnType; + quorum?: string; + threshold?: string; + veto_threshold?: string; + min_initial_deposit_ratio?: string; + proposal_cancel_ratio?: string; + proposal_cancel_dest?: string; + expedited_voting_period?: ReturnType; + expedited_threshold?: string; + expedited_min_deposit?: ReturnType[]; + burn_vote_quorum?: boolean; + burn_proposal_deposit_prevote?: boolean; + burn_vote_veto?: boolean; + min_deposit_ratio?: string; + }): Params { + const message = new Params({}); + if (data.min_deposit != null) { + message.min_deposit = data.min_deposit.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.max_deposit_period != null) { + message.max_deposit_period = dependency_5.google.protobuf.Duration.fromObject(data.max_deposit_period); + } + if (data.voting_period != null) { + message.voting_period = dependency_5.google.protobuf.Duration.fromObject(data.voting_period); + } + if (data.quorum != null) { + message.quorum = data.quorum; + } + if (data.threshold != null) { + message.threshold = data.threshold; + } + if (data.veto_threshold != null) { + message.veto_threshold = data.veto_threshold; + } + if (data.min_initial_deposit_ratio != null) { + message.min_initial_deposit_ratio = data.min_initial_deposit_ratio; + } + if (data.proposal_cancel_ratio != null) { + message.proposal_cancel_ratio = data.proposal_cancel_ratio; + } + if (data.proposal_cancel_dest != null) { + message.proposal_cancel_dest = data.proposal_cancel_dest; + } + if (data.expedited_voting_period != null) { + message.expedited_voting_period = dependency_5.google.protobuf.Duration.fromObject(data.expedited_voting_period); + } + if (data.expedited_threshold != null) { + message.expedited_threshold = data.expedited_threshold; + } + if (data.expedited_min_deposit != null) { + message.expedited_min_deposit = data.expedited_min_deposit.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.burn_vote_quorum != null) { + message.burn_vote_quorum = data.burn_vote_quorum; + } + if (data.burn_proposal_deposit_prevote != null) { + message.burn_proposal_deposit_prevote = data.burn_proposal_deposit_prevote; + } + if (data.burn_vote_veto != null) { + message.burn_vote_veto = data.burn_vote_veto; + } + if (data.min_deposit_ratio != null) { + message.min_deposit_ratio = data.min_deposit_ratio; + } + return message; + } + toObject() { + const data: { + min_deposit?: ReturnType[]; + max_deposit_period?: ReturnType; + voting_period?: ReturnType; + quorum?: string; + threshold?: string; + veto_threshold?: string; + min_initial_deposit_ratio?: string; + proposal_cancel_ratio?: string; + proposal_cancel_dest?: string; + expedited_voting_period?: ReturnType; + expedited_threshold?: string; + expedited_min_deposit?: ReturnType[]; + burn_vote_quorum?: boolean; + burn_proposal_deposit_prevote?: boolean; + burn_vote_veto?: boolean; + min_deposit_ratio?: string; + } = {}; + if (this.min_deposit != null) { + data.min_deposit = this.min_deposit.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.max_deposit_period != null) { + data.max_deposit_period = this.max_deposit_period.toObject(); + } + if (this.voting_period != null) { + data.voting_period = this.voting_period.toObject(); + } + if (this.quorum != null) { + data.quorum = this.quorum; + } + if (this.threshold != null) { + data.threshold = this.threshold; + } + if (this.veto_threshold != null) { + data.veto_threshold = this.veto_threshold; + } + if (this.min_initial_deposit_ratio != null) { + data.min_initial_deposit_ratio = this.min_initial_deposit_ratio; + } + if (this.proposal_cancel_ratio != null) { + data.proposal_cancel_ratio = this.proposal_cancel_ratio; + } + if (this.proposal_cancel_dest != null) { + data.proposal_cancel_dest = this.proposal_cancel_dest; + } + if (this.expedited_voting_period != null) { + data.expedited_voting_period = this.expedited_voting_period.toObject(); + } + if (this.expedited_threshold != null) { + data.expedited_threshold = this.expedited_threshold; + } + if (this.expedited_min_deposit != null) { + data.expedited_min_deposit = this.expedited_min_deposit.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.burn_vote_quorum != null) { + data.burn_vote_quorum = this.burn_vote_quorum; + } + if (this.burn_proposal_deposit_prevote != null) { + data.burn_proposal_deposit_prevote = this.burn_proposal_deposit_prevote; + } + if (this.burn_vote_veto != null) { + data.burn_vote_veto = this.burn_vote_veto; + } + if (this.min_deposit_ratio != null) { + data.min_deposit_ratio = this.min_deposit_ratio; + } + 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.min_deposit.length) + writer.writeRepeatedMessage(1, this.min_deposit, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_max_deposit_period) + writer.writeMessage(2, this.max_deposit_period, () => this.max_deposit_period.serialize(writer)); + if (this.has_voting_period) + writer.writeMessage(3, this.voting_period, () => this.voting_period.serialize(writer)); + if (this.quorum.length) + writer.writeString(4, this.quorum); + if (this.threshold.length) + writer.writeString(5, this.threshold); + if (this.veto_threshold.length) + writer.writeString(6, this.veto_threshold); + if (this.min_initial_deposit_ratio.length) + writer.writeString(7, this.min_initial_deposit_ratio); + if (this.proposal_cancel_ratio.length) + writer.writeString(8, this.proposal_cancel_ratio); + if (this.proposal_cancel_dest.length) + writer.writeString(9, this.proposal_cancel_dest); + if (this.has_expedited_voting_period) + writer.writeMessage(10, this.expedited_voting_period, () => this.expedited_voting_period.serialize(writer)); + if (this.expedited_threshold.length) + writer.writeString(11, this.expedited_threshold); + if (this.expedited_min_deposit.length) + writer.writeRepeatedMessage(12, this.expedited_min_deposit, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.burn_vote_quorum != false) + writer.writeBool(13, this.burn_vote_quorum); + if (this.burn_proposal_deposit_prevote != false) + writer.writeBool(14, this.burn_proposal_deposit_prevote); + if (this.burn_vote_veto != false) + writer.writeBool(15, this.burn_vote_veto); + if (this.min_deposit_ratio.length) + writer.writeString(16, this.min_deposit_ratio); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.min_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + case 2: + reader.readMessage(message.max_deposit_period, () => message.max_deposit_period = dependency_5.google.protobuf.Duration.deserialize(reader)); + break; + case 3: + reader.readMessage(message.voting_period, () => message.voting_period = dependency_5.google.protobuf.Duration.deserialize(reader)); + break; + case 4: + message.quorum = reader.readString(); + break; + case 5: + message.threshold = reader.readString(); + break; + case 6: + message.veto_threshold = reader.readString(); + break; + case 7: + message.min_initial_deposit_ratio = reader.readString(); + break; + case 8: + message.proposal_cancel_ratio = reader.readString(); + break; + case 9: + message.proposal_cancel_dest = reader.readString(); + break; + case 10: + reader.readMessage(message.expedited_voting_period, () => message.expedited_voting_period = dependency_5.google.protobuf.Duration.deserialize(reader)); + break; + case 11: + message.expedited_threshold = reader.readString(); + break; + case 12: + reader.readMessage(message.expedited_min_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 12, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + case 13: + message.burn_vote_quorum = reader.readBool(); + break; + case 14: + message.burn_proposal_deposit_prevote = reader.readBool(); + break; + case 15: + message.burn_vote_veto = reader.readBool(); + break; + case 16: + message.min_deposit_ratio = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/gov/v1/gov_pb.d.ts b/codegen/cosmos/gov/v1/gov_pb.d.ts similarity index 91% rename from proto/cosmos/gov/v1/gov_pb.d.ts rename to codegen/cosmos/gov/v1/gov_pb.d.ts index 04e4561..a4d2f5c 100644 --- a/proto/cosmos/gov/v1/gov_pb.d.ts +++ b/codegen/cosmos/gov/v1/gov_pb.d.ts @@ -118,6 +118,12 @@ export class Proposal extends jspb.Message { getProposer(): string; setProposer(value: string): void; + getExpedited(): boolean; + setExpedited(value: boolean): void; + + getFailedReason(): string; + setFailedReason(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Proposal.AsObject; static toObject(includeInstance: boolean, msg: Proposal): Proposal.AsObject; @@ -143,6 +149,8 @@ export namespace Proposal { title: string, summary: string, proposer: string, + expedited: boolean, + failedReason: string, } } @@ -318,6 +326,25 @@ export class Params extends jspb.Message { getMinInitialDepositRatio(): string; setMinInitialDepositRatio(value: string): void; + getProposalCancelRatio(): string; + setProposalCancelRatio(value: string): void; + + getProposalCancelDest(): string; + setProposalCancelDest(value: string): void; + + hasExpeditedVotingPeriod(): boolean; + clearExpeditedVotingPeriod(): void; + getExpeditedVotingPeriod(): google_protobuf_duration_pb.Duration | undefined; + setExpeditedVotingPeriod(value?: google_protobuf_duration_pb.Duration): void; + + getExpeditedThreshold(): string; + setExpeditedThreshold(value: string): void; + + clearExpeditedMinDepositList(): void; + getExpeditedMinDepositList(): Array; + setExpeditedMinDepositList(value: Array): void; + addExpeditedMinDeposit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + getBurnVoteQuorum(): boolean; setBurnVoteQuorum(value: boolean): void; @@ -327,6 +354,9 @@ export class Params extends jspb.Message { getBurnVoteVeto(): boolean; setBurnVoteVeto(value: boolean): void; + getMinDepositRatio(): string; + setMinDepositRatio(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Params.AsObject; static toObject(includeInstance: boolean, msg: Params): Params.AsObject; @@ -346,9 +376,15 @@ export namespace Params { threshold: string, vetoThreshold: string, minInitialDepositRatio: string, + proposalCancelRatio: string, + proposalCancelDest: string, + expeditedVotingPeriod?: google_protobuf_duration_pb.Duration.AsObject, + expeditedThreshold: string, + expeditedMinDepositList: Array, burnVoteQuorum: boolean, burnProposalDepositPrevote: boolean, burnVoteVeto: boolean, + minDepositRatio: string, } } diff --git a/proto/cosmos/gov/v1/gov_pb.js b/codegen/cosmos/gov/v1/gov_pb.js similarity index 91% rename from proto/cosmos/gov/v1/gov_pb.js rename to codegen/cosmos/gov/v1/gov_pb.js index bdb0d71..852eff1 100644 --- a/proto/cosmos/gov/v1/gov_pb.js +++ b/codegen/cosmos/gov/v1/gov_pb.js @@ -662,7 +662,9 @@ proto.cosmos.gov.v1.Proposal.toObject = function(includeInstance, msg) { metadata: jspb.Message.getFieldWithDefault(msg, 10, ""), title: jspb.Message.getFieldWithDefault(msg, 11, ""), summary: jspb.Message.getFieldWithDefault(msg, 12, ""), - proposer: jspb.Message.getFieldWithDefault(msg, 13, "") + proposer: jspb.Message.getFieldWithDefault(msg, 13, ""), + expedited: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), + failedReason: jspb.Message.getFieldWithDefault(msg, 15, "") }; if (includeInstance) { @@ -758,6 +760,14 @@ proto.cosmos.gov.v1.Proposal.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setProposer(value); break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExpedited(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setFailedReason(value); + break; default: reader.skipField(); break; @@ -885,6 +895,20 @@ proto.cosmos.gov.v1.Proposal.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getExpedited(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getFailedReason(); + if (f.length > 0) { + writer.writeString( + 15, + f + ); + } }; @@ -1257,6 +1281,42 @@ proto.cosmos.gov.v1.Proposal.prototype.setProposer = function(value) { }; +/** + * optional bool expedited = 14; + * @return {boolean} + */ +proto.cosmos.gov.v1.Proposal.prototype.getExpedited = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.gov.v1.Proposal} returns this + */ +proto.cosmos.gov.v1.Proposal.prototype.setExpedited = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * optional string failed_reason = 15; + * @return {string} + */ +proto.cosmos.gov.v1.Proposal.prototype.getFailedReason = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1.Proposal} returns this + */ +proto.cosmos.gov.v1.Proposal.prototype.setFailedReason = function(value) { + return jspb.Message.setProto3StringField(this, 15, value); +}; + + @@ -2285,7 +2345,7 @@ proto.cosmos.gov.v1.TallyParams.prototype.setVetoThreshold = function(value) { * @private {!Array} * @const */ -proto.cosmos.gov.v1.Params.repeatedFields_ = [1]; +proto.cosmos.gov.v1.Params.repeatedFields_ = [1,12]; @@ -2326,9 +2386,16 @@ proto.cosmos.gov.v1.Params.toObject = function(includeInstance, msg) { threshold: jspb.Message.getFieldWithDefault(msg, 5, ""), vetoThreshold: jspb.Message.getFieldWithDefault(msg, 6, ""), minInitialDepositRatio: jspb.Message.getFieldWithDefault(msg, 7, ""), + proposalCancelRatio: jspb.Message.getFieldWithDefault(msg, 8, ""), + proposalCancelDest: jspb.Message.getFieldWithDefault(msg, 9, ""), + expeditedVotingPeriod: (f = msg.getExpeditedVotingPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + expeditedThreshold: jspb.Message.getFieldWithDefault(msg, 11, ""), + expeditedMinDepositList: jspb.Message.toObjectList(msg.getExpeditedMinDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), burnVoteQuorum: jspb.Message.getBooleanFieldWithDefault(msg, 13, false), burnProposalDepositPrevote: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), - burnVoteVeto: jspb.Message.getBooleanFieldWithDefault(msg, 15, false) + burnVoteVeto: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), + minDepositRatio: jspb.Message.getFieldWithDefault(msg, 16, "") }; if (includeInstance) { @@ -2396,6 +2463,28 @@ proto.cosmos.gov.v1.Params.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readString()); msg.setMinInitialDepositRatio(value); break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setProposalCancelRatio(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setProposalCancelDest(value); + break; + case 10: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setExpeditedVotingPeriod(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setExpeditedThreshold(value); + break; + case 12: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addExpeditedMinDeposit(value); + break; case 13: var value = /** @type {boolean} */ (reader.readBool()); msg.setBurnVoteQuorum(value); @@ -2408,6 +2497,10 @@ proto.cosmos.gov.v1.Params.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {boolean} */ (reader.readBool()); msg.setBurnVoteVeto(value); break; + case 16: + var value = /** @type {string} */ (reader.readString()); + msg.setMinDepositRatio(value); + break; default: reader.skipField(); break; @@ -2489,6 +2582,43 @@ proto.cosmos.gov.v1.Params.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getProposalCancelRatio(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getProposalCancelDest(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getExpeditedVotingPeriod(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getExpeditedThreshold(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getExpeditedMinDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } f = message.getBurnVoteQuorum(); if (f) { writer.writeBool( @@ -2510,6 +2640,13 @@ proto.cosmos.gov.v1.Params.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getMinDepositRatio(); + if (f.length > 0) { + writer.writeString( + 16, + f + ); + } }; @@ -2697,6 +2834,135 @@ proto.cosmos.gov.v1.Params.prototype.setMinInitialDepositRatio = function(value) }; +/** + * optional string proposal_cancel_ratio = 8; + * @return {string} + */ +proto.cosmos.gov.v1.Params.prototype.getProposalCancelRatio = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1.Params} returns this + */ +proto.cosmos.gov.v1.Params.prototype.setProposalCancelRatio = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string proposal_cancel_dest = 9; + * @return {string} + */ +proto.cosmos.gov.v1.Params.prototype.getProposalCancelDest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1.Params} returns this + */ +proto.cosmos.gov.v1.Params.prototype.setProposalCancelDest = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional google.protobuf.Duration expedited_voting_period = 10; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.gov.v1.Params.prototype.getExpeditedVotingPeriod = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.cosmos.gov.v1.Params} returns this +*/ +proto.cosmos.gov.v1.Params.prototype.setExpeditedVotingPeriod = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1.Params} returns this + */ +proto.cosmos.gov.v1.Params.prototype.clearExpeditedVotingPeriod = function() { + return this.setExpeditedVotingPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1.Params.prototype.hasExpeditedVotingPeriod = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string expedited_threshold = 11; + * @return {string} + */ +proto.cosmos.gov.v1.Params.prototype.getExpeditedThreshold = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1.Params} returns this + */ +proto.cosmos.gov.v1.Params.prototype.setExpeditedThreshold = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin expedited_min_deposit = 12; + * @return {!Array} + */ +proto.cosmos.gov.v1.Params.prototype.getExpeditedMinDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 12)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1.Params} returns this +*/ +proto.cosmos.gov.v1.Params.prototype.setExpeditedMinDepositList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.gov.v1.Params.prototype.addExpeditedMinDeposit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1.Params} returns this + */ +proto.cosmos.gov.v1.Params.prototype.clearExpeditedMinDepositList = function() { + return this.setExpeditedMinDepositList([]); +}; + + /** * optional bool burn_vote_quorum = 13; * @return {boolean} @@ -2751,6 +3017,24 @@ proto.cosmos.gov.v1.Params.prototype.setBurnVoteVeto = function(value) { }; +/** + * optional string min_deposit_ratio = 16; + * @return {string} + */ +proto.cosmos.gov.v1.Params.prototype.getMinDepositRatio = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1.Params} returns this + */ +proto.cosmos.gov.v1.Params.prototype.setMinDepositRatio = function(value) { + return jspb.Message.setProto3StringField(this, 16, value); +}; + + /** * @enum {number} */ diff --git a/proto/cosmos/gov/v1/gov_pb_service.d.ts b/codegen/cosmos/gov/v1/gov_pb_service.d.ts similarity index 100% rename from proto/cosmos/gov/v1/gov_pb_service.d.ts rename to codegen/cosmos/gov/v1/gov_pb_service.d.ts diff --git a/proto/cosmos/gov/v1/gov_pb_service.js b/codegen/cosmos/gov/v1/gov_pb_service.js similarity index 100% rename from proto/cosmos/gov/v1/gov_pb_service.js rename to codegen/cosmos/gov/v1/gov_pb_service.js diff --git a/codegen/cosmos/gov/v1/query.ts b/codegen/cosmos/gov/v1/query.ts new file mode 100644 index 0000000..f244807 --- /dev/null +++ b/codegen/cosmos/gov/v1/query.ts @@ -0,0 +1,1696 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/gov/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../google/api/annotations"; +import * as dependency_3 from "./gov"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.gov.v1 { + export class QueryConstitutionRequest 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: {}): QueryConstitutionRequest { + const message = new QueryConstitutionRequest({}); + 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): QueryConstitutionRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConstitutionRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConstitutionRequest { + return QueryConstitutionRequest.deserialize(bytes); + } + } + export class QueryConstitutionResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + constitution?: 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 ("constitution" in data && data.constitution != undefined) { + this.constitution = data.constitution; + } + } + } + get constitution() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set constitution(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + constitution?: string; + }): QueryConstitutionResponse { + const message = new QueryConstitutionResponse({}); + if (data.constitution != null) { + message.constitution = data.constitution; + } + return message; + } + toObject() { + const data: { + constitution?: string; + } = {}; + if (this.constitution != null) { + data.constitution = this.constitution; + } + 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.constitution.length) + writer.writeString(1, this.constitution); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConstitutionResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConstitutionResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.constitution = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConstitutionResponse { + return QueryConstitutionResponse.deserialize(bytes); + } + } + export class QueryProposalRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): QueryProposalRequest { + const message = new QueryProposalRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalRequest { + return QueryProposalRequest.deserialize(bytes); + } + } + export class QueryProposalResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal?: dependency_3.cosmos.gov.v1.Proposal; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal" in data && data.proposal != undefined) { + this.proposal = data.proposal; + } + } + } + get proposal() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.gov.v1.Proposal, 1) as dependency_3.cosmos.gov.v1.Proposal; + } + set proposal(value: dependency_3.cosmos.gov.v1.Proposal) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_proposal() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + proposal?: ReturnType; + }): QueryProposalResponse { + const message = new QueryProposalResponse({}); + if (data.proposal != null) { + message.proposal = dependency_3.cosmos.gov.v1.Proposal.fromObject(data.proposal); + } + return message; + } + toObject() { + const data: { + proposal?: ReturnType; + } = {}; + if (this.proposal != null) { + data.proposal = this.proposal.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_proposal) + writer.writeMessage(1, this.proposal, () => this.proposal.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proposal, () => message.proposal = dependency_3.cosmos.gov.v1.Proposal.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalResponse { + return QueryProposalResponse.deserialize(bytes); + } + } + export class QueryProposalsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_status?: dependency_3.cosmos.gov.v1.ProposalStatus; + voter?: string; + depositor?: string; + pagination?: dependency_1.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 ("proposal_status" in data && data.proposal_status != undefined) { + this.proposal_status = data.proposal_status; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposal_status() { + return pb_1.Message.getFieldWithDefault(this, 1, dependency_3.cosmos.gov.v1.ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) as dependency_3.cosmos.gov.v1.ProposalStatus; + } + set proposal_status(value: dependency_3.cosmos.gov.v1.ProposalStatus) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 3, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 4) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + proposal_status?: dependency_3.cosmos.gov.v1.ProposalStatus; + voter?: string; + depositor?: string; + pagination?: ReturnType; + }): QueryProposalsRequest { + const message = new QueryProposalsRequest({}); + if (data.proposal_status != null) { + message.proposal_status = data.proposal_status; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposal_status?: dependency_3.cosmos.gov.v1.ProposalStatus; + voter?: string; + depositor?: string; + pagination?: ReturnType; + } = {}; + if (this.proposal_status != null) { + data.proposal_status = this.proposal_status; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + 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.proposal_status != dependency_3.cosmos.gov.v1.ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) + writer.writeEnum(1, this.proposal_status); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.depositor.length) + writer.writeString(3, this.depositor); + if (this.has_pagination) + writer.writeMessage(4, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_status = reader.readEnum(); + break; + case 2: + message.voter = reader.readString(); + break; + case 3: + message.depositor = reader.readString(); + break; + case 4: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalsRequest { + return QueryProposalsRequest.deserialize(bytes); + } + } + export class QueryProposalsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposals?: dependency_3.cosmos.gov.v1.Proposal[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("proposals" in data && data.proposals != undefined) { + this.proposals = data.proposals; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposals() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.gov.v1.Proposal, 1) as dependency_3.cosmos.gov.v1.Proposal[]; + } + set proposals(value: dependency_3.cosmos.gov.v1.Proposal[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + proposals?: ReturnType[]; + pagination?: ReturnType; + }): QueryProposalsResponse { + const message = new QueryProposalsResponse({}); + if (data.proposals != null) { + message.proposals = data.proposals.map(item => dependency_3.cosmos.gov.v1.Proposal.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposals?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.proposals != null) { + data.proposals = this.proposals.map((item: dependency_3.cosmos.gov.v1.Proposal) => item.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.proposals.length) + writer.writeRepeatedMessage(1, this.proposals, (item: dependency_3.cosmos.gov.v1.Proposal) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proposals, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.gov.v1.Proposal.deserialize(reader), dependency_3.cosmos.gov.v1.Proposal)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalsResponse { + return QueryProposalsResponse.deserialize(bytes); + } + } + export class QueryVoteRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + }): QueryVoteRequest { + const message = new QueryVoteRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVoteRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVoteRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVoteRequest { + return QueryVoteRequest.deserialize(bytes); + } + } + export class QueryVoteResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vote?: dependency_3.cosmos.gov.v1.Vote; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("vote" in data && data.vote != undefined) { + this.vote = data.vote; + } + } + } + get vote() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.gov.v1.Vote, 1) as dependency_3.cosmos.gov.v1.Vote; + } + set vote(value: dependency_3.cosmos.gov.v1.Vote) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_vote() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + vote?: ReturnType; + }): QueryVoteResponse { + const message = new QueryVoteResponse({}); + if (data.vote != null) { + message.vote = dependency_3.cosmos.gov.v1.Vote.fromObject(data.vote); + } + return message; + } + toObject() { + const data: { + vote?: ReturnType; + } = {}; + if (this.vote != null) { + data.vote = this.vote.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_vote) + writer.writeMessage(1, this.vote, () => this.vote.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVoteResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVoteResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.vote, () => message.vote = dependency_3.cosmos.gov.v1.Vote.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVoteResponse { + return QueryVoteResponse.deserialize(bytes); + } + } + export class QueryVotesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + pagination?: dependency_1.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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + proposal_id?: number; + pagination?: ReturnType; + }): QueryVotesRequest { + const message = new QueryVotesRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + pagination?: ReturnType; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVotesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVotesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVotesRequest { + return QueryVotesRequest.deserialize(bytes); + } + } + export class QueryVotesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + votes?: dependency_3.cosmos.gov.v1.Vote[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.gov.v1.Vote, 1) as dependency_3.cosmos.gov.v1.Vote[]; + } + set votes(value: dependency_3.cosmos.gov.v1.Vote[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + votes?: ReturnType[]; + pagination?: ReturnType; + }): QueryVotesResponse { + const message = new QueryVotesResponse({}); + if (data.votes != null) { + message.votes = data.votes.map(item => dependency_3.cosmos.gov.v1.Vote.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + votes?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.votes != null) { + data.votes = this.votes.map((item: dependency_3.cosmos.gov.v1.Vote) => item.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.votes.length) + writer.writeRepeatedMessage(1, this.votes, (item: dependency_3.cosmos.gov.v1.Vote) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVotesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVotesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.gov.v1.Vote.deserialize(reader), dependency_3.cosmos.gov.v1.Vote)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVotesResponse { + return QueryVotesResponse.deserialize(bytes); + } + } + export class QueryParamsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params_type?: 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 ("params_type" in data && data.params_type != undefined) { + this.params_type = data.params_type; + } + } + } + get params_type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set params_type(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + params_type?: string; + }): QueryParamsRequest { + const message = new QueryParamsRequest({}); + if (data.params_type != null) { + message.params_type = data.params_type; + } + return message; + } + toObject() { + const data: { + params_type?: string; + } = {}; + if (this.params_type != null) { + data.params_type = this.params_type; + } + 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.params_type.length) + writer.writeString(1, this.params_type); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.params_type = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + /** @deprecated*/ + voting_params?: dependency_3.cosmos.gov.v1.VotingParams; + /** @deprecated*/ + deposit_params?: dependency_3.cosmos.gov.v1.DepositParams; + /** @deprecated*/ + tally_params?: dependency_3.cosmos.gov.v1.TallyParams; + params?: dependency_3.cosmos.gov.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 ("voting_params" in data && data.voting_params != undefined) { + this.voting_params = data.voting_params; + } + if ("deposit_params" in data && data.deposit_params != undefined) { + this.deposit_params = data.deposit_params; + } + if ("tally_params" in data && data.tally_params != undefined) { + this.tally_params = data.tally_params; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + /** @deprecated*/ + get voting_params() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.gov.v1.VotingParams, 1) as dependency_3.cosmos.gov.v1.VotingParams; + } + /** @deprecated*/ + set voting_params(value: dependency_3.cosmos.gov.v1.VotingParams) { + pb_1.Message.setWrapperField(this, 1, value); + } + /** @deprecated*/ + get has_voting_params() { + return pb_1.Message.getField(this, 1) != null; + } + /** @deprecated*/ + get deposit_params() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.gov.v1.DepositParams, 2) as dependency_3.cosmos.gov.v1.DepositParams; + } + /** @deprecated*/ + set deposit_params(value: dependency_3.cosmos.gov.v1.DepositParams) { + pb_1.Message.setWrapperField(this, 2, value); + } + /** @deprecated*/ + get has_deposit_params() { + return pb_1.Message.getField(this, 2) != null; + } + /** @deprecated*/ + get tally_params() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.gov.v1.TallyParams, 3) as dependency_3.cosmos.gov.v1.TallyParams; + } + /** @deprecated*/ + set tally_params(value: dependency_3.cosmos.gov.v1.TallyParams) { + pb_1.Message.setWrapperField(this, 3, value); + } + /** @deprecated*/ + get has_tally_params() { + return pb_1.Message.getField(this, 3) != null; + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.gov.v1.Params, 4) as dependency_3.cosmos.gov.v1.Params; + } + set params(value: dependency_3.cosmos.gov.v1.Params) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_params() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + voting_params?: ReturnType; + deposit_params?: ReturnType; + tally_params?: ReturnType; + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.voting_params != null) { + message.voting_params = dependency_3.cosmos.gov.v1.VotingParams.fromObject(data.voting_params); + } + if (data.deposit_params != null) { + message.deposit_params = dependency_3.cosmos.gov.v1.DepositParams.fromObject(data.deposit_params); + } + if (data.tally_params != null) { + message.tally_params = dependency_3.cosmos.gov.v1.TallyParams.fromObject(data.tally_params); + } + if (data.params != null) { + message.params = dependency_3.cosmos.gov.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + voting_params?: ReturnType; + deposit_params?: ReturnType; + tally_params?: ReturnType; + params?: ReturnType; + } = {}; + if (this.voting_params != null) { + data.voting_params = this.voting_params.toObject(); + } + if (this.deposit_params != null) { + data.deposit_params = this.deposit_params.toObject(); + } + if (this.tally_params != null) { + data.tally_params = this.tally_params.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_voting_params) + writer.writeMessage(1, this.voting_params, () => this.voting_params.serialize(writer)); + if (this.has_deposit_params) + writer.writeMessage(2, this.deposit_params, () => this.deposit_params.serialize(writer)); + if (this.has_tally_params) + writer.writeMessage(3, this.tally_params, () => this.tally_params.serialize(writer)); + if (this.has_params) + writer.writeMessage(4, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.voting_params, () => message.voting_params = dependency_3.cosmos.gov.v1.VotingParams.deserialize(reader)); + break; + case 2: + reader.readMessage(message.deposit_params, () => message.deposit_params = dependency_3.cosmos.gov.v1.DepositParams.deserialize(reader)); + break; + case 3: + reader.readMessage(message.tally_params, () => message.tally_params = dependency_3.cosmos.gov.v1.TallyParams.deserialize(reader)); + break; + case 4: + reader.readMessage(message.params, () => message.params = dependency_3.cosmos.gov.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QueryDepositRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + depositor?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proposal_id?: number; + depositor?: string; + }): QueryDepositRequest { + const message = new QueryDepositRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + depositor?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.depositor.length) + writer.writeString(2, this.depositor); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.depositor = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositRequest { + return QueryDepositRequest.deserialize(bytes); + } + } + export class QueryDepositResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + deposit?: dependency_3.cosmos.gov.v1.Deposit; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("deposit" in data && data.deposit != undefined) { + this.deposit = data.deposit; + } + } + } + get deposit() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.gov.v1.Deposit, 1) as dependency_3.cosmos.gov.v1.Deposit; + } + set deposit(value: dependency_3.cosmos.gov.v1.Deposit) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_deposit() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + deposit?: ReturnType; + }): QueryDepositResponse { + const message = new QueryDepositResponse({}); + if (data.deposit != null) { + message.deposit = dependency_3.cosmos.gov.v1.Deposit.fromObject(data.deposit); + } + return message; + } + toObject() { + const data: { + deposit?: ReturnType; + } = {}; + if (this.deposit != null) { + data.deposit = this.deposit.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_deposit) + writer.writeMessage(1, this.deposit, () => this.deposit.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.deposit, () => message.deposit = dependency_3.cosmos.gov.v1.Deposit.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositResponse { + return QueryDepositResponse.deserialize(bytes); + } + } + export class QueryDepositsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + pagination?: dependency_1.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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + proposal_id?: number; + pagination?: ReturnType; + }): QueryDepositsRequest { + const message = new QueryDepositsRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + pagination?: ReturnType; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositsRequest { + return QueryDepositsRequest.deserialize(bytes); + } + } + export class QueryDepositsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + deposits?: dependency_3.cosmos.gov.v1.Deposit[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("deposits" in data && data.deposits != undefined) { + this.deposits = data.deposits; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get deposits() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.gov.v1.Deposit, 1) as dependency_3.cosmos.gov.v1.Deposit[]; + } + set deposits(value: dependency_3.cosmos.gov.v1.Deposit[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + deposits?: ReturnType[]; + pagination?: ReturnType; + }): QueryDepositsResponse { + const message = new QueryDepositsResponse({}); + if (data.deposits != null) { + message.deposits = data.deposits.map(item => dependency_3.cosmos.gov.v1.Deposit.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + deposits?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.deposits != null) { + data.deposits = this.deposits.map((item: dependency_3.cosmos.gov.v1.Deposit) => item.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.deposits.length) + writer.writeRepeatedMessage(1, this.deposits, (item: dependency_3.cosmos.gov.v1.Deposit) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.deposits, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.gov.v1.Deposit.deserialize(reader), dependency_3.cosmos.gov.v1.Deposit)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositsResponse { + return QueryDepositsResponse.deserialize(bytes); + } + } + export class QueryTallyResultRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): QueryTallyResultRequest { + const message = new QueryTallyResultRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTallyResultRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTallyResultRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTallyResultRequest { + return QueryTallyResultRequest.deserialize(bytes); + } + } + export class QueryTallyResultResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tally?: dependency_3.cosmos.gov.v1.TallyResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tally" in data && data.tally != undefined) { + this.tally = data.tally; + } + } + } + get tally() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.gov.v1.TallyResult, 1) as dependency_3.cosmos.gov.v1.TallyResult; + } + set tally(value: dependency_3.cosmos.gov.v1.TallyResult) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tally() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + tally?: ReturnType; + }): QueryTallyResultResponse { + const message = new QueryTallyResultResponse({}); + if (data.tally != null) { + message.tally = dependency_3.cosmos.gov.v1.TallyResult.fromObject(data.tally); + } + return message; + } + toObject() { + const data: { + tally?: ReturnType; + } = {}; + if (this.tally != null) { + data.tally = this.tally.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_tally) + writer.writeMessage(1, this.tally, () => this.tally.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTallyResultResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTallyResultResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tally, () => message.tally = dependency_3.cosmos.gov.v1.TallyResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTallyResultResponse { + return QueryTallyResultResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Constitution: { + path: "/cosmos.gov.v1.Query/Constitution", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConstitutionRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConstitutionRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConstitutionResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConstitutionResponse.deserialize(new Uint8Array(bytes)) + }, + Proposal: { + path: "/cosmos.gov.v1.Query/Proposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryProposalRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryProposalRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryProposalResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryProposalResponse.deserialize(new Uint8Array(bytes)) + }, + Proposals: { + path: "/cosmos.gov.v1.Query/Proposals", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryProposalsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryProposalsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryProposalsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryProposalsResponse.deserialize(new Uint8Array(bytes)) + }, + Vote: { + path: "/cosmos.gov.v1.Query/Vote", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVoteRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVoteRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVoteResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVoteResponse.deserialize(new Uint8Array(bytes)) + }, + Votes: { + path: "/cosmos.gov.v1.Query/Votes", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVotesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVotesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVotesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVotesResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/cosmos.gov.v1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + Deposit: { + path: "/cosmos.gov.v1.Query/Deposit", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDepositRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDepositRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDepositResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDepositResponse.deserialize(new Uint8Array(bytes)) + }, + Deposits: { + path: "/cosmos.gov.v1.Query/Deposits", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDepositsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDepositsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDepositsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDepositsResponse.deserialize(new Uint8Array(bytes)) + }, + TallyResult: { + path: "/cosmos.gov.v1.Query/TallyResult", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTallyResultRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTallyResultRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTallyResultResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTallyResultResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Constitution(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Proposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Proposals(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Vote(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Votes(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Deposit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Deposits(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TallyResult(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Constitution: GrpcUnaryServiceInterface = (message: QueryConstitutionRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Constitution(message, metadata, options, callback); + }; + Proposal: GrpcUnaryServiceInterface = (message: QueryProposalRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Proposal(message, metadata, options, callback); + }; + Proposals: GrpcUnaryServiceInterface = (message: QueryProposalsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Proposals(message, metadata, options, callback); + }; + Vote: GrpcUnaryServiceInterface = (message: QueryVoteRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Vote(message, metadata, options, callback); + }; + Votes: GrpcUnaryServiceInterface = (message: QueryVotesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Votes(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + Deposit: GrpcUnaryServiceInterface = (message: QueryDepositRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Deposit(message, metadata, options, callback); + }; + Deposits: GrpcUnaryServiceInterface = (message: QueryDepositsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Deposits(message, metadata, options, callback); + }; + TallyResult: GrpcUnaryServiceInterface = (message: QueryTallyResultRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TallyResult(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/gov/v1/query_pb.d.ts b/codegen/cosmos/gov/v1/query_pb.d.ts similarity index 91% rename from proto/cosmos/gov/v1/query_pb.d.ts rename to codegen/cosmos/gov/v1/query_pb.d.ts index 285ecea..7fa086c 100644 --- a/proto/cosmos/gov/v1/query_pb.d.ts +++ b/codegen/cosmos/gov/v1/query_pb.d.ts @@ -7,6 +7,42 @@ import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; import * as cosmos_gov_v1_gov_pb from "../../../cosmos/gov/v1/gov_pb"; import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; +export class QueryConstitutionRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryConstitutionRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryConstitutionRequest): QueryConstitutionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryConstitutionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryConstitutionRequest; + static deserializeBinaryFromReader(message: QueryConstitutionRequest, reader: jspb.BinaryReader): QueryConstitutionRequest; +} + +export namespace QueryConstitutionRequest { + export type AsObject = { + } +} + +export class QueryConstitutionResponse extends jspb.Message { + getConstitution(): string; + setConstitution(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryConstitutionResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryConstitutionResponse): QueryConstitutionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryConstitutionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryConstitutionResponse; + static deserializeBinaryFromReader(message: QueryConstitutionResponse, reader: jspb.BinaryReader): QueryConstitutionResponse; +} + +export namespace QueryConstitutionResponse { + export type AsObject = { + constitution: string, + } +} + export class QueryProposalRequest extends jspb.Message { getProposalId(): number; setProposalId(value: number): void; diff --git a/proto/cosmos/gov/v1/query_pb.js b/codegen/cosmos/gov/v1/query_pb.js similarity index 91% rename from proto/cosmos/gov/v1/query_pb.js rename to codegen/cosmos/gov/v1/query_pb.js index c26352b..28b66ed 100644 --- a/proto/cosmos/gov/v1/query_pb.js +++ b/codegen/cosmos/gov/v1/query_pb.js @@ -23,6 +23,8 @@ var cosmos_gov_v1_gov_pb = require('../../../cosmos/gov/v1/gov_pb.js'); goog.object.extend(proto, cosmos_gov_v1_gov_pb); var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); +goog.exportSymbol('proto.cosmos.gov.v1.QueryConstitutionRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1.QueryConstitutionResponse', null, global); goog.exportSymbol('proto.cosmos.gov.v1.QueryDepositRequest', null, global); goog.exportSymbol('proto.cosmos.gov.v1.QueryDepositResponse', null, global); goog.exportSymbol('proto.cosmos.gov.v1.QueryDepositsRequest', null, global); @@ -39,6 +41,48 @@ goog.exportSymbol('proto.cosmos.gov.v1.QueryVoteRequest', null, global); goog.exportSymbol('proto.cosmos.gov.v1.QueryVoteResponse', null, global); goog.exportSymbol('proto.cosmos.gov.v1.QueryVotesRequest', null, global); goog.exportSymbol('proto.cosmos.gov.v1.QueryVotesResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.gov.v1.QueryConstitutionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1.QueryConstitutionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1.QueryConstitutionRequest.displayName = 'proto.cosmos.gov.v1.QueryConstitutionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.gov.v1.QueryConstitutionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1.QueryConstitutionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1.QueryConstitutionResponse.displayName = 'proto.cosmos.gov.v1.QueryConstitutionResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -378,6 +422,237 @@ if (goog.DEBUG && !COMPILED) { +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.gov.v1.QueryConstitutionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1.QueryConstitutionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.gov.v1.QueryConstitutionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1.QueryConstitutionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.gov.v1.QueryConstitutionRequest} + */ +proto.cosmos.gov.v1.QueryConstitutionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1.QueryConstitutionRequest; + return proto.cosmos.gov.v1.QueryConstitutionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1.QueryConstitutionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1.QueryConstitutionRequest} + */ +proto.cosmos.gov.v1.QueryConstitutionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1.QueryConstitutionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1.QueryConstitutionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.gov.v1.QueryConstitutionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1.QueryConstitutionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.gov.v1.QueryConstitutionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1.QueryConstitutionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.gov.v1.QueryConstitutionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1.QueryConstitutionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + constitution: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.gov.v1.QueryConstitutionResponse} + */ +proto.cosmos.gov.v1.QueryConstitutionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1.QueryConstitutionResponse; + return proto.cosmos.gov.v1.QueryConstitutionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1.QueryConstitutionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1.QueryConstitutionResponse} + */ +proto.cosmos.gov.v1.QueryConstitutionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setConstitution(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1.QueryConstitutionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1.QueryConstitutionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.gov.v1.QueryConstitutionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1.QueryConstitutionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConstitution(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string constitution = 1; + * @return {string} + */ +proto.cosmos.gov.v1.QueryConstitutionResponse.prototype.getConstitution = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1.QueryConstitutionResponse} returns this + */ +proto.cosmos.gov.v1.QueryConstitutionResponse.prototype.setConstitution = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. diff --git a/proto/cosmos/gov/v1/query_pb_service.d.ts b/codegen/cosmos/gov/v1/query_pb_service.d.ts similarity index 90% rename from proto/cosmos/gov/v1/query_pb_service.d.ts rename to codegen/cosmos/gov/v1/query_pb_service.d.ts index efbd5d4..e90b331 100644 --- a/proto/cosmos/gov/v1/query_pb_service.d.ts +++ b/codegen/cosmos/gov/v1/query_pb_service.d.ts @@ -4,6 +4,15 @@ import * as cosmos_gov_v1_query_pb from "../../../cosmos/gov/v1/query_pb"; import {grpc} from "@improbable-eng/grpc-web"; +type QueryConstitution = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_gov_v1_query_pb.QueryConstitutionRequest; + readonly responseType: typeof cosmos_gov_v1_query_pb.QueryConstitutionResponse; +}; + type QueryProposal = { readonly methodName: string; readonly service: typeof Query; @@ -78,6 +87,7 @@ type QueryTallyResult = { export class Query { static readonly serviceName: string; + static readonly Constitution: QueryConstitution; static readonly Proposal: QueryProposal; static readonly Proposals: QueryProposals; static readonly Vote: QueryVote; @@ -120,6 +130,15 @@ export class QueryClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); + constitution( + requestMessage: cosmos_gov_v1_query_pb.QueryConstitutionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_gov_v1_query_pb.QueryConstitutionResponse|null) => void + ): UnaryResponse; + constitution( + requestMessage: cosmos_gov_v1_query_pb.QueryConstitutionRequest, + callback: (error: ServiceError|null, responseMessage: cosmos_gov_v1_query_pb.QueryConstitutionResponse|null) => void + ): UnaryResponse; proposal( requestMessage: cosmos_gov_v1_query_pb.QueryProposalRequest, metadata: grpc.Metadata, diff --git a/proto/cosmos/gov/v1/query_pb_service.js b/codegen/cosmos/gov/v1/query_pb_service.js similarity index 89% rename from proto/cosmos/gov/v1/query_pb_service.js rename to codegen/cosmos/gov/v1/query_pb_service.js index 048e6fa..fb4d4c5 100644 --- a/proto/cosmos/gov/v1/query_pb_service.js +++ b/codegen/cosmos/gov/v1/query_pb_service.js @@ -10,6 +10,15 @@ var Query = (function () { return Query; }()); +Query.Constitution = { + methodName: "Constitution", + service: Query, + requestStream: false, + responseStream: false, + requestType: cosmos_gov_v1_query_pb.QueryConstitutionRequest, + responseType: cosmos_gov_v1_query_pb.QueryConstitutionResponse +}; + Query.Proposal = { methodName: "Proposal", service: Query, @@ -89,6 +98,37 @@ function QueryClient(serviceHost, options) { this.options = options || {}; } +QueryClient.prototype.constitution = function constitution(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Constitution, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + QueryClient.prototype.proposal = function proposal(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/codegen/cosmos/gov/v1/tx.ts b/codegen/cosmos/gov/v1/tx.ts new file mode 100644 index 0000000..f381ce4 --- /dev/null +++ b/codegen/cosmos/gov/v1/tx.ts @@ -0,0 +1,1391 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/gov/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/v1beta1/coin"; +import * as dependency_2 from "./gov"; +import * as dependency_3 from "./../../../gogoproto/gogo"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../../google/protobuf/any"; +import * as dependency_6 from "./../../msg/v1/msg"; +import * as dependency_7 from "./../../../amino/amino"; +import * as dependency_8 from "./../../../google/protobuf/timestamp"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.gov.v1 { + export class MsgSubmitProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + messages?: dependency_5.google.protobuf.Any[]; + initial_deposit?: dependency_1.cosmos.base.v1beta1.Coin[]; + proposer?: string; + metadata?: string; + title?: string; + summary?: string; + expedited?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("messages" in data && data.messages != undefined) { + this.messages = data.messages; + } + if ("initial_deposit" in data && data.initial_deposit != undefined) { + this.initial_deposit = data.initial_deposit; + } + if ("proposer" in data && data.proposer != undefined) { + this.proposer = data.proposer; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("summary" in data && data.summary != undefined) { + this.summary = data.summary; + } + if ("expedited" in data && data.expedited != undefined) { + this.expedited = data.expedited; + } + } + } + get messages() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.google.protobuf.Any, 1) as dependency_5.google.protobuf.Any[]; + } + set messages(value: dependency_5.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get initial_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 2) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set initial_deposit(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get proposer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set proposer(value: string) { + pb_1.Message.setField(this, 3, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 4, value); + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 5, value); + } + get summary() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set summary(value: string) { + pb_1.Message.setField(this, 6, value); + } + get expedited() { + return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean; + } + set expedited(value: boolean) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + messages?: ReturnType[]; + initial_deposit?: ReturnType[]; + proposer?: string; + metadata?: string; + title?: string; + summary?: string; + expedited?: boolean; + }): MsgSubmitProposal { + const message = new MsgSubmitProposal({}); + if (data.messages != null) { + message.messages = data.messages.map(item => dependency_5.google.protobuf.Any.fromObject(item)); + } + if (data.initial_deposit != null) { + message.initial_deposit = data.initial_deposit.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.proposer != null) { + message.proposer = data.proposer; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.title != null) { + message.title = data.title; + } + if (data.summary != null) { + message.summary = data.summary; + } + if (data.expedited != null) { + message.expedited = data.expedited; + } + return message; + } + toObject() { + const data: { + messages?: ReturnType[]; + initial_deposit?: ReturnType[]; + proposer?: string; + metadata?: string; + title?: string; + summary?: string; + expedited?: boolean; + } = {}; + if (this.messages != null) { + data.messages = this.messages.map((item: dependency_5.google.protobuf.Any) => item.toObject()); + } + if (this.initial_deposit != null) { + data.initial_deposit = this.initial_deposit.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.proposer != null) { + data.proposer = this.proposer; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.title != null) { + data.title = this.title; + } + if (this.summary != null) { + data.summary = this.summary; + } + if (this.expedited != null) { + data.expedited = this.expedited; + } + 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.messages.length) + writer.writeRepeatedMessage(1, this.messages, (item: dependency_5.google.protobuf.Any) => item.serialize(writer)); + if (this.initial_deposit.length) + writer.writeRepeatedMessage(2, this.initial_deposit, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.proposer.length) + writer.writeString(3, this.proposer); + if (this.metadata.length) + writer.writeString(4, this.metadata); + if (this.title.length) + writer.writeString(5, this.title); + if (this.summary.length) + writer.writeString(6, this.summary); + if (this.expedited != false) + writer.writeBool(7, this.expedited); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.messages, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.google.protobuf.Any.deserialize(reader), dependency_5.google.protobuf.Any)); + break; + case 2: + reader.readMessage(message.initial_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + case 3: + message.proposer = reader.readString(); + break; + case 4: + message.metadata = reader.readString(); + break; + case 5: + message.title = reader.readString(); + break; + case 6: + message.summary = reader.readString(); + break; + case 7: + message.expedited = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitProposal { + return MsgSubmitProposal.deserialize(bytes); + } + } + export class MsgSubmitProposalResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): MsgSubmitProposalResponse { + const message = new MsgSubmitProposalResponse({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitProposalResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitProposalResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitProposalResponse { + return MsgSubmitProposalResponse.deserialize(bytes); + } + } + export class MsgExecLegacyContent extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + content?: dependency_5.google.protobuf.Any; + authority?: 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 ("content" in data && data.content != undefined) { + this.content = data.content; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get content() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 1) as dependency_5.google.protobuf.Any; + } + set content(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_content() { + return pb_1.Message.getField(this, 1) != null; + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + content?: ReturnType; + authority?: string; + }): MsgExecLegacyContent { + const message = new MsgExecLegacyContent({}); + if (data.content != null) { + message.content = dependency_5.google.protobuf.Any.fromObject(data.content); + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + content?: ReturnType; + authority?: string; + } = {}; + if (this.content != null) { + data.content = this.content.toObject(); + } + if (this.authority != null) { + data.authority = this.authority; + } + 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_content) + writer.writeMessage(1, this.content, () => this.content.serialize(writer)); + if (this.authority.length) + writer.writeString(2, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgExecLegacyContent { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgExecLegacyContent(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.content, () => message.content = dependency_5.google.protobuf.Any.deserialize(reader)); + break; + case 2: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgExecLegacyContent { + return MsgExecLegacyContent.deserialize(bytes); + } + } + export class MsgExecLegacyContentResponse 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: {}): MsgExecLegacyContentResponse { + const message = new MsgExecLegacyContentResponse({}); + 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): MsgExecLegacyContentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgExecLegacyContentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgExecLegacyContentResponse { + return MsgExecLegacyContentResponse.deserialize(bytes); + } + } + export class MsgVote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: string; + option?: dependency_2.cosmos.gov.v1.VoteOption; + metadata?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("option" in data && data.option != undefined) { + this.option = data.option; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + get option() { + return pb_1.Message.getFieldWithDefault(this, 3, dependency_2.cosmos.gov.v1.VoteOption.VOTE_OPTION_UNSPECIFIED) as dependency_2.cosmos.gov.v1.VoteOption; + } + set option(value: dependency_2.cosmos.gov.v1.VoteOption) { + pb_1.Message.setField(this, 3, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + option?: dependency_2.cosmos.gov.v1.VoteOption; + metadata?: string; + }): MsgVote { + const message = new MsgVote({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.option != null) { + message.option = data.option; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + option?: dependency_2.cosmos.gov.v1.VoteOption; + metadata?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.option != null) { + data.option = this.option; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.option != dependency_2.cosmos.gov.v1.VoteOption.VOTE_OPTION_UNSPECIFIED) + writer.writeEnum(3, this.option); + if (this.metadata.length) + writer.writeString(4, this.metadata); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgVote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + case 3: + message.option = reader.readEnum(); + break; + case 4: + message.metadata = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVote { + return MsgVote.deserialize(bytes); + } + } + export class MsgVoteResponse 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: {}): MsgVoteResponse { + const message = new MsgVoteResponse({}); + 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): MsgVoteResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVoteResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVoteResponse { + return MsgVoteResponse.deserialize(bytes); + } + } + export class MsgVoteWeighted extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: string; + options?: dependency_2.cosmos.gov.v1.WeightedVoteOption[]; + metadata?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + get options() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.gov.v1.WeightedVoteOption, 3) as dependency_2.cosmos.gov.v1.WeightedVoteOption[]; + } + set options(value: dependency_2.cosmos.gov.v1.WeightedVoteOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + options?: ReturnType[]; + metadata?: string; + }): MsgVoteWeighted { + const message = new MsgVoteWeighted({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.options != null) { + message.options = data.options.map(item => dependency_2.cosmos.gov.v1.WeightedVoteOption.fromObject(item)); + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + options?: ReturnType[]; + metadata?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.options != null) { + data.options = this.options.map((item: dependency_2.cosmos.gov.v1.WeightedVoteOption) => item.toObject()); + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.options.length) + writer.writeRepeatedMessage(3, this.options, (item: dependency_2.cosmos.gov.v1.WeightedVoteOption) => item.serialize(writer)); + if (this.metadata.length) + writer.writeString(4, this.metadata); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgVoteWeighted { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVoteWeighted(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + case 3: + reader.readMessage(message.options, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.gov.v1.WeightedVoteOption.deserialize(reader), dependency_2.cosmos.gov.v1.WeightedVoteOption)); + break; + case 4: + message.metadata = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVoteWeighted { + return MsgVoteWeighted.deserialize(bytes); + } + } + export class MsgVoteWeightedResponse 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: {}): MsgVoteWeightedResponse { + const message = new MsgVoteWeightedResponse({}); + 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): MsgVoteWeightedResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVoteWeightedResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVoteWeightedResponse { + return MsgVoteWeightedResponse.deserialize(bytes); + } + } + export class MsgDeposit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + depositor?: string; + amount?: dependency_1.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 3) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + proposal_id?: number; + depositor?: string; + amount?: ReturnType[]; + }): MsgDeposit { + const message = new MsgDeposit({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + depositor?: string; + amount?: ReturnType[]; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.depositor.length) + writer.writeString(2, this.depositor); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDeposit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDeposit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.depositor = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDeposit { + return MsgDeposit.deserialize(bytes); + } + } + export class MsgDepositResponse 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: {}): MsgDepositResponse { + const message = new MsgDepositResponse({}); + 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): MsgDepositResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDepositResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDepositResponse { + return MsgDepositResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_2.cosmos.gov.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.gov.v1.Params, 2) as dependency_2.cosmos.gov.v1.Params; + } + set params(value: dependency_2.cosmos.gov.v1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_2.cosmos.gov.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_2.cosmos.gov.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + export class MsgCancelProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + proposer?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("proposer" in data && data.proposer != undefined) { + this.proposer = data.proposer; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get proposer() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set proposer(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proposal_id?: number; + proposer?: string; + }): MsgCancelProposal { + const message = new MsgCancelProposal({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.proposer != null) { + message.proposer = data.proposer; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + proposer?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.proposer != null) { + data.proposer = this.proposer; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.proposer.length) + writer.writeString(2, this.proposer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.proposer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCancelProposal { + return MsgCancelProposal.deserialize(bytes); + } + } + export class MsgCancelProposalResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + canceled_time?: dependency_8.google.protobuf.Timestamp; + canceled_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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("canceled_time" in data && data.canceled_time != undefined) { + this.canceled_time = data.canceled_time; + } + if ("canceled_height" in data && data.canceled_height != undefined) { + this.canceled_height = data.canceled_height; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get canceled_time() { + return pb_1.Message.getWrapperField(this, dependency_8.google.protobuf.Timestamp, 2) as dependency_8.google.protobuf.Timestamp; + } + set canceled_time(value: dependency_8.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_canceled_time() { + return pb_1.Message.getField(this, 2) != null; + } + get canceled_height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set canceled_height(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + proposal_id?: number; + canceled_time?: ReturnType; + canceled_height?: number; + }): MsgCancelProposalResponse { + const message = new MsgCancelProposalResponse({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.canceled_time != null) { + message.canceled_time = dependency_8.google.protobuf.Timestamp.fromObject(data.canceled_time); + } + if (data.canceled_height != null) { + message.canceled_height = data.canceled_height; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + canceled_time?: ReturnType; + canceled_height?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.canceled_time != null) { + data.canceled_time = this.canceled_time.toObject(); + } + if (this.canceled_height != null) { + data.canceled_height = this.canceled_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.has_canceled_time) + writer.writeMessage(2, this.canceled_time, () => this.canceled_time.serialize(writer)); + if (this.canceled_height != 0) + writer.writeUint64(3, this.canceled_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelProposalResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelProposalResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.canceled_time, () => message.canceled_time = dependency_8.google.protobuf.Timestamp.deserialize(reader)); + break; + case 3: + message.canceled_height = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCancelProposalResponse { + return MsgCancelProposalResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + SubmitProposal: { + path: "/cosmos.gov.v1.Msg/SubmitProposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitProposal) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitProposal.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitProposalResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitProposalResponse.deserialize(new Uint8Array(bytes)) + }, + ExecLegacyContent: { + path: "/cosmos.gov.v1.Msg/ExecLegacyContent", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgExecLegacyContent) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgExecLegacyContent.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgExecLegacyContentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgExecLegacyContentResponse.deserialize(new Uint8Array(bytes)) + }, + Vote: { + path: "/cosmos.gov.v1.Msg/Vote", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgVote) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgVote.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgVoteResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgVoteResponse.deserialize(new Uint8Array(bytes)) + }, + VoteWeighted: { + path: "/cosmos.gov.v1.Msg/VoteWeighted", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgVoteWeighted) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgVoteWeighted.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgVoteWeightedResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgVoteWeightedResponse.deserialize(new Uint8Array(bytes)) + }, + Deposit: { + path: "/cosmos.gov.v1.Msg/Deposit", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgDeposit) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgDeposit.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgDepositResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgDepositResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/cosmos.gov.v1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + }, + CancelProposal: { + path: "/cosmos.gov.v1.Msg/CancelProposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCancelProposal) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCancelProposal.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCancelProposalResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCancelProposalResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract SubmitProposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ExecLegacyContent(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Vote(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VoteWeighted(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Deposit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CancelProposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + SubmitProposal: GrpcUnaryServiceInterface = (message: MsgSubmitProposal, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitProposal(message, metadata, options, callback); + }; + ExecLegacyContent: GrpcUnaryServiceInterface = (message: MsgExecLegacyContent, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ExecLegacyContent(message, metadata, options, callback); + }; + Vote: GrpcUnaryServiceInterface = (message: MsgVote, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Vote(message, metadata, options, callback); + }; + VoteWeighted: GrpcUnaryServiceInterface = (message: MsgVoteWeighted, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VoteWeighted(message, metadata, options, callback); + }; + Deposit: GrpcUnaryServiceInterface = (message: MsgDeposit, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Deposit(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + CancelProposal: GrpcUnaryServiceInterface = (message: MsgCancelProposal, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CancelProposal(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/gov/v1/tx_pb.d.ts b/codegen/cosmos/gov/v1/tx_pb.d.ts similarity index 84% rename from proto/cosmos/gov/v1/tx_pb.d.ts rename to codegen/cosmos/gov/v1/tx_pb.d.ts index 1e73f46..264dfaf 100644 --- a/proto/cosmos/gov/v1/tx_pb.d.ts +++ b/codegen/cosmos/gov/v1/tx_pb.d.ts @@ -9,6 +9,7 @@ import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import * as cosmos_msg_v1_msg_pb from "../../../cosmos/msg/v1/msg_pb"; import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; export class MsgSubmitProposal extends jspb.Message { clearMessagesList(): void; @@ -33,6 +34,9 @@ export class MsgSubmitProposal extends jspb.Message { getSummary(): string; setSummary(value: string): void; + getExpedited(): boolean; + setExpedited(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgSubmitProposal.AsObject; static toObject(includeInstance: boolean, msg: MsgSubmitProposal): MsgSubmitProposal.AsObject; @@ -51,6 +55,7 @@ export namespace MsgSubmitProposal { metadata: string, title: string, summary: string, + expedited: boolean, } } @@ -302,3 +307,57 @@ export namespace MsgUpdateParamsResponse { } } +export class MsgCancelProposal extends jspb.Message { + getProposalId(): number; + setProposalId(value: number): void; + + getProposer(): string; + setProposer(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgCancelProposal.AsObject; + static toObject(includeInstance: boolean, msg: MsgCancelProposal): MsgCancelProposal.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgCancelProposal, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgCancelProposal; + static deserializeBinaryFromReader(message: MsgCancelProposal, reader: jspb.BinaryReader): MsgCancelProposal; +} + +export namespace MsgCancelProposal { + export type AsObject = { + proposalId: number, + proposer: string, + } +} + +export class MsgCancelProposalResponse extends jspb.Message { + getProposalId(): number; + setProposalId(value: number): void; + + hasCanceledTime(): boolean; + clearCanceledTime(): void; + getCanceledTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCanceledTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getCanceledHeight(): number; + setCanceledHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgCancelProposalResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgCancelProposalResponse): MsgCancelProposalResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgCancelProposalResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgCancelProposalResponse; + static deserializeBinaryFromReader(message: MsgCancelProposalResponse, reader: jspb.BinaryReader): MsgCancelProposalResponse; +} + +export namespace MsgCancelProposalResponse { + export type AsObject = { + proposalId: number, + canceledTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + canceledHeight: number, + } +} + diff --git a/proto/cosmos/gov/v1/tx_pb.js b/codegen/cosmos/gov/v1/tx_pb.js similarity index 83% rename from proto/cosmos/gov/v1/tx_pb.js rename to codegen/cosmos/gov/v1/tx_pb.js index 66fef40..b112d0b 100644 --- a/proto/cosmos/gov/v1/tx_pb.js +++ b/codegen/cosmos/gov/v1/tx_pb.js @@ -29,6 +29,10 @@ var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); goog.object.extend(proto, cosmos_msg_v1_msg_pb); var amino_amino_pb = require('../../../amino/amino_pb.js'); goog.object.extend(proto, amino_amino_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.cosmos.gov.v1.MsgCancelProposal', null, global); +goog.exportSymbol('proto.cosmos.gov.v1.MsgCancelProposalResponse', null, global); goog.exportSymbol('proto.cosmos.gov.v1.MsgDeposit', null, global); goog.exportSymbol('proto.cosmos.gov.v1.MsgDepositResponse', null, global); goog.exportSymbol('proto.cosmos.gov.v1.MsgExecLegacyContent', null, global); @@ -293,6 +297,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cosmos.gov.v1.MsgUpdateParamsResponse.displayName = 'proto.cosmos.gov.v1.MsgUpdateParamsResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.gov.v1.MsgCancelProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1.MsgCancelProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1.MsgCancelProposal.displayName = 'proto.cosmos.gov.v1.MsgCancelProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1.MsgCancelProposalResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1.MsgCancelProposalResponse.displayName = 'proto.cosmos.gov.v1.MsgCancelProposalResponse'; +} /** * List of repeated fields within this message type. @@ -339,7 +385,8 @@ proto.cosmos.gov.v1.MsgSubmitProposal.toObject = function(includeInstance, msg) proposer: jspb.Message.getFieldWithDefault(msg, 3, ""), metadata: jspb.Message.getFieldWithDefault(msg, 4, ""), title: jspb.Message.getFieldWithDefault(msg, 5, ""), - summary: jspb.Message.getFieldWithDefault(msg, 6, "") + summary: jspb.Message.getFieldWithDefault(msg, 6, ""), + expedited: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) }; if (includeInstance) { @@ -402,6 +449,10 @@ proto.cosmos.gov.v1.MsgSubmitProposal.deserializeBinaryFromReader = function(msg var value = /** @type {string} */ (reader.readString()); msg.setSummary(value); break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExpedited(value); + break; default: reader.skipField(); break; @@ -475,6 +526,13 @@ proto.cosmos.gov.v1.MsgSubmitProposal.serializeBinaryToWriter = function(message f ); } + f = message.getExpedited(); + if (f) { + writer.writeBool( + 7, + f + ); + } }; @@ -626,6 +684,24 @@ proto.cosmos.gov.v1.MsgSubmitProposal.prototype.setSummary = function(value) { }; +/** + * optional bool expedited = 7; + * @return {boolean} + */ +proto.cosmos.gov.v1.MsgSubmitProposal.prototype.getExpedited = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.gov.v1.MsgSubmitProposal} returns this + */ +proto.cosmos.gov.v1.MsgSubmitProposal.prototype.setExpedited = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + @@ -2313,4 +2389,375 @@ proto.cosmos.gov.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(m }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.gov.v1.MsgCancelProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1.MsgCancelProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.gov.v1.MsgCancelProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1.MsgCancelProposal.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + proposer: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.gov.v1.MsgCancelProposal} + */ +proto.cosmos.gov.v1.MsgCancelProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1.MsgCancelProposal; + return proto.cosmos.gov.v1.MsgCancelProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1.MsgCancelProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1.MsgCancelProposal} + */ +proto.cosmos.gov.v1.MsgCancelProposal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setProposalId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProposer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1.MsgCancelProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1.MsgCancelProposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.gov.v1.MsgCancelProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1.MsgCancelProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getProposer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1.MsgCancelProposal.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1.MsgCancelProposal} returns this + */ +proto.cosmos.gov.v1.MsgCancelProposal.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string proposer = 2; + * @return {string} + */ +proto.cosmos.gov.v1.MsgCancelProposal.prototype.getProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1.MsgCancelProposal} returns this + */ +proto.cosmos.gov.v1.MsgCancelProposal.prototype.setProposer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1.MsgCancelProposalResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.gov.v1.MsgCancelProposalResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + canceledTime: (f = msg.getCanceledTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + canceledHeight: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.gov.v1.MsgCancelProposalResponse} + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1.MsgCancelProposalResponse; + return proto.cosmos.gov.v1.MsgCancelProposalResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1.MsgCancelProposalResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1.MsgCancelProposalResponse} + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setProposalId(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCanceledTime(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCanceledHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1.MsgCancelProposalResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.gov.v1.MsgCancelProposalResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCanceledTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getCanceledHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1.MsgCancelProposalResponse} returns this + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp canceled_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.getCanceledTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.gov.v1.MsgCancelProposalResponse} returns this +*/ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.setCanceledTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1.MsgCancelProposalResponse} returns this + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.clearCanceledTime = function() { + return this.setCanceledTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.hasCanceledTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 canceled_height = 3; + * @return {number} + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.getCanceledHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1.MsgCancelProposalResponse} returns this + */ +proto.cosmos.gov.v1.MsgCancelProposalResponse.prototype.setCanceledHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + goog.object.extend(exports, proto.cosmos.gov.v1); diff --git a/proto/cosmos/gov/v1/tx_pb_service.d.ts b/codegen/cosmos/gov/v1/tx_pb_service.d.ts similarity index 88% rename from proto/cosmos/gov/v1/tx_pb_service.d.ts rename to codegen/cosmos/gov/v1/tx_pb_service.d.ts index 47f2388..0065e9b 100644 --- a/proto/cosmos/gov/v1/tx_pb_service.d.ts +++ b/codegen/cosmos/gov/v1/tx_pb_service.d.ts @@ -58,6 +58,15 @@ type MsgUpdateParams = { readonly responseType: typeof cosmos_gov_v1_tx_pb.MsgUpdateParamsResponse; }; +type MsgCancelProposal = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_gov_v1_tx_pb.MsgCancelProposal; + readonly responseType: typeof cosmos_gov_v1_tx_pb.MsgCancelProposalResponse; +}; + export class Msg { static readonly serviceName: string; static readonly SubmitProposal: MsgSubmitProposal; @@ -66,6 +75,7 @@ export class Msg { static readonly VoteWeighted: MsgVoteWeighted; static readonly Deposit: MsgDeposit; static readonly UpdateParams: MsgUpdateParams; + static readonly CancelProposal: MsgCancelProposal; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -154,5 +164,14 @@ export class MsgClient { requestMessage: cosmos_gov_v1_tx_pb.MsgUpdateParams, callback: (error: ServiceError|null, responseMessage: cosmos_gov_v1_tx_pb.MsgUpdateParamsResponse|null) => void ): UnaryResponse; + cancelProposal( + requestMessage: cosmos_gov_v1_tx_pb.MsgCancelProposal, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_gov_v1_tx_pb.MsgCancelProposalResponse|null) => void + ): UnaryResponse; + cancelProposal( + requestMessage: cosmos_gov_v1_tx_pb.MsgCancelProposal, + callback: (error: ServiceError|null, responseMessage: cosmos_gov_v1_tx_pb.MsgCancelProposalResponse|null) => void + ): UnaryResponse; } diff --git a/proto/cosmos/gov/v1/tx_pb_service.js b/codegen/cosmos/gov/v1/tx_pb_service.js similarity index 86% rename from proto/cosmos/gov/v1/tx_pb_service.js rename to codegen/cosmos/gov/v1/tx_pb_service.js index 0084967..422c6e1 100644 --- a/proto/cosmos/gov/v1/tx_pb_service.js +++ b/codegen/cosmos/gov/v1/tx_pb_service.js @@ -64,6 +64,15 @@ Msg.UpdateParams = { responseType: cosmos_gov_v1_tx_pb.MsgUpdateParamsResponse }; +Msg.CancelProposal = { + methodName: "CancelProposal", + service: Msg, + requestStream: false, + responseStream: false, + requestType: cosmos_gov_v1_tx_pb.MsgCancelProposal, + responseType: cosmos_gov_v1_tx_pb.MsgCancelProposalResponse +}; + exports.Msg = Msg; function MsgClient(serviceHost, options) { @@ -257,5 +266,36 @@ MsgClient.prototype.updateParams = function updateParams(requestMessage, metadat }; }; +MsgClient.prototype.cancelProposal = function cancelProposal(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.CancelProposal, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.MsgClient = MsgClient; diff --git a/codegen/cosmos/gov/v1beta1/genesis.ts b/codegen/cosmos/gov/v1beta1/genesis.ts new file mode 100644 index 0000000..3e868a1 --- /dev/null +++ b/codegen/cosmos/gov/v1beta1/genesis.ts @@ -0,0 +1,225 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/gov/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./gov"; +import * as dependency_3 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.gov.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + starting_proposal_id?: number; + deposits?: dependency_2.cosmos.gov.v1beta1.Deposit[]; + votes?: dependency_2.cosmos.gov.v1beta1.Vote[]; + proposals?: dependency_2.cosmos.gov.v1beta1.Proposal[]; + deposit_params?: dependency_2.cosmos.gov.v1beta1.DepositParams; + voting_params?: dependency_2.cosmos.gov.v1beta1.VotingParams; + tally_params?: dependency_2.cosmos.gov.v1beta1.TallyParams; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("starting_proposal_id" in data && data.starting_proposal_id != undefined) { + this.starting_proposal_id = data.starting_proposal_id; + } + if ("deposits" in data && data.deposits != undefined) { + this.deposits = data.deposits; + } + if ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + if ("proposals" in data && data.proposals != undefined) { + this.proposals = data.proposals; + } + if ("deposit_params" in data && data.deposit_params != undefined) { + this.deposit_params = data.deposit_params; + } + if ("voting_params" in data && data.voting_params != undefined) { + this.voting_params = data.voting_params; + } + if ("tally_params" in data && data.tally_params != undefined) { + this.tally_params = data.tally_params; + } + } + } + get starting_proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set starting_proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get deposits() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.gov.v1beta1.Deposit, 2) as dependency_2.cosmos.gov.v1beta1.Deposit[]; + } + set deposits(value: dependency_2.cosmos.gov.v1beta1.Deposit[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.gov.v1beta1.Vote, 3) as dependency_2.cosmos.gov.v1beta1.Vote[]; + } + set votes(value: dependency_2.cosmos.gov.v1beta1.Vote[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get proposals() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.gov.v1beta1.Proposal, 4) as dependency_2.cosmos.gov.v1beta1.Proposal[]; + } + set proposals(value: dependency_2.cosmos.gov.v1beta1.Proposal[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get deposit_params() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.gov.v1beta1.DepositParams, 5) as dependency_2.cosmos.gov.v1beta1.DepositParams; + } + set deposit_params(value: dependency_2.cosmos.gov.v1beta1.DepositParams) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_deposit_params() { + return pb_1.Message.getField(this, 5) != null; + } + get voting_params() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.gov.v1beta1.VotingParams, 6) as dependency_2.cosmos.gov.v1beta1.VotingParams; + } + set voting_params(value: dependency_2.cosmos.gov.v1beta1.VotingParams) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_voting_params() { + return pb_1.Message.getField(this, 6) != null; + } + get tally_params() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.gov.v1beta1.TallyParams, 7) as dependency_2.cosmos.gov.v1beta1.TallyParams; + } + set tally_params(value: dependency_2.cosmos.gov.v1beta1.TallyParams) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_tally_params() { + return pb_1.Message.getField(this, 7) != null; + } + static fromObject(data: { + starting_proposal_id?: number; + deposits?: ReturnType[]; + votes?: ReturnType[]; + proposals?: ReturnType[]; + deposit_params?: ReturnType; + voting_params?: ReturnType; + tally_params?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.starting_proposal_id != null) { + message.starting_proposal_id = data.starting_proposal_id; + } + if (data.deposits != null) { + message.deposits = data.deposits.map(item => dependency_2.cosmos.gov.v1beta1.Deposit.fromObject(item)); + } + if (data.votes != null) { + message.votes = data.votes.map(item => dependency_2.cosmos.gov.v1beta1.Vote.fromObject(item)); + } + if (data.proposals != null) { + message.proposals = data.proposals.map(item => dependency_2.cosmos.gov.v1beta1.Proposal.fromObject(item)); + } + if (data.deposit_params != null) { + message.deposit_params = dependency_2.cosmos.gov.v1beta1.DepositParams.fromObject(data.deposit_params); + } + if (data.voting_params != null) { + message.voting_params = dependency_2.cosmos.gov.v1beta1.VotingParams.fromObject(data.voting_params); + } + if (data.tally_params != null) { + message.tally_params = dependency_2.cosmos.gov.v1beta1.TallyParams.fromObject(data.tally_params); + } + return message; + } + toObject() { + const data: { + starting_proposal_id?: number; + deposits?: ReturnType[]; + votes?: ReturnType[]; + proposals?: ReturnType[]; + deposit_params?: ReturnType; + voting_params?: ReturnType; + tally_params?: ReturnType; + } = {}; + if (this.starting_proposal_id != null) { + data.starting_proposal_id = this.starting_proposal_id; + } + if (this.deposits != null) { + data.deposits = this.deposits.map((item: dependency_2.cosmos.gov.v1beta1.Deposit) => item.toObject()); + } + if (this.votes != null) { + data.votes = this.votes.map((item: dependency_2.cosmos.gov.v1beta1.Vote) => item.toObject()); + } + if (this.proposals != null) { + data.proposals = this.proposals.map((item: dependency_2.cosmos.gov.v1beta1.Proposal) => item.toObject()); + } + if (this.deposit_params != null) { + data.deposit_params = this.deposit_params.toObject(); + } + if (this.voting_params != null) { + data.voting_params = this.voting_params.toObject(); + } + if (this.tally_params != null) { + data.tally_params = this.tally_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.starting_proposal_id != 0) + writer.writeUint64(1, this.starting_proposal_id); + if (this.deposits.length) + writer.writeRepeatedMessage(2, this.deposits, (item: dependency_2.cosmos.gov.v1beta1.Deposit) => item.serialize(writer)); + if (this.votes.length) + writer.writeRepeatedMessage(3, this.votes, (item: dependency_2.cosmos.gov.v1beta1.Vote) => item.serialize(writer)); + if (this.proposals.length) + writer.writeRepeatedMessage(4, this.proposals, (item: dependency_2.cosmos.gov.v1beta1.Proposal) => item.serialize(writer)); + if (this.has_deposit_params) + writer.writeMessage(5, this.deposit_params, () => this.deposit_params.serialize(writer)); + if (this.has_voting_params) + writer.writeMessage(6, this.voting_params, () => this.voting_params.serialize(writer)); + if (this.has_tally_params) + writer.writeMessage(7, this.tally_params, () => this.tally_params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.starting_proposal_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.deposits, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.cosmos.gov.v1beta1.Deposit.deserialize(reader), dependency_2.cosmos.gov.v1beta1.Deposit)); + break; + case 3: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.gov.v1beta1.Vote.deserialize(reader), dependency_2.cosmos.gov.v1beta1.Vote)); + break; + case 4: + reader.readMessage(message.proposals, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.cosmos.gov.v1beta1.Proposal.deserialize(reader), dependency_2.cosmos.gov.v1beta1.Proposal)); + break; + case 5: + reader.readMessage(message.deposit_params, () => message.deposit_params = dependency_2.cosmos.gov.v1beta1.DepositParams.deserialize(reader)); + break; + case 6: + reader.readMessage(message.voting_params, () => message.voting_params = dependency_2.cosmos.gov.v1beta1.VotingParams.deserialize(reader)); + break; + case 7: + reader.readMessage(message.tally_params, () => message.tally_params = dependency_2.cosmos.gov.v1beta1.TallyParams.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/gov/v1beta1/genesis_pb.d.ts b/codegen/cosmos/gov/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/gov/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/gov/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/gov/v1beta1/genesis_pb.js b/codegen/cosmos/gov/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/gov/v1beta1/genesis_pb.js rename to codegen/cosmos/gov/v1beta1/genesis_pb.js diff --git a/proto/cosmos/gov/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/gov/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/gov/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/gov/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/gov/v1beta1/genesis_pb_service.js b/codegen/cosmos/gov/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/gov/v1beta1/genesis_pb_service.js rename to codegen/cosmos/gov/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/gov/v1beta1/gov.ts b/codegen/cosmos/gov/v1beta1/gov.ts new file mode 100644 index 0000000..7dfe320 --- /dev/null +++ b/codegen/cosmos/gov/v1beta1/gov.ts @@ -0,0 +1,1143 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/gov/v1beta1/gov.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/v1beta1/coin"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/protobuf/timestamp"; +import * as dependency_4 from "./../../../google/protobuf/any"; +import * as dependency_5 from "./../../../google/protobuf/duration"; +import * as dependency_6 from "./../../../cosmos_proto/cosmos"; +import * as dependency_7 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.gov.v1beta1 { + export enum VoteOption { + VOTE_OPTION_UNSPECIFIED = 0, + VOTE_OPTION_YES = 1, + VOTE_OPTION_ABSTAIN = 2, + VOTE_OPTION_NO = 3, + VOTE_OPTION_NO_WITH_VETO = 4 + } + export enum ProposalStatus { + PROPOSAL_STATUS_UNSPECIFIED = 0, + PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, + PROPOSAL_STATUS_VOTING_PERIOD = 2, + PROPOSAL_STATUS_PASSED = 3, + PROPOSAL_STATUS_REJECTED = 4, + PROPOSAL_STATUS_FAILED = 5 + } + export class WeightedVoteOption extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + option?: VoteOption; + weight?: 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 ("option" in data && data.option != undefined) { + this.option = data.option; + } + if ("weight" in data && data.weight != undefined) { + this.weight = data.weight; + } + } + } + get option() { + return pb_1.Message.getFieldWithDefault(this, 1, VoteOption.VOTE_OPTION_UNSPECIFIED) as VoteOption; + } + set option(value: VoteOption) { + pb_1.Message.setField(this, 1, value); + } + get weight() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set weight(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + option?: VoteOption; + weight?: string; + }): WeightedVoteOption { + const message = new WeightedVoteOption({}); + if (data.option != null) { + message.option = data.option; + } + if (data.weight != null) { + message.weight = data.weight; + } + return message; + } + toObject() { + const data: { + option?: VoteOption; + weight?: string; + } = {}; + if (this.option != null) { + data.option = this.option; + } + if (this.weight != null) { + data.weight = this.weight; + } + 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.option != VoteOption.VOTE_OPTION_UNSPECIFIED) + writer.writeEnum(1, this.option); + if (this.weight.length) + writer.writeString(2, this.weight); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WeightedVoteOption { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WeightedVoteOption(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.option = reader.readEnum(); + break; + case 2: + message.weight = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WeightedVoteOption { + return WeightedVoteOption.deserialize(bytes); + } + } + export class TextProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + title?: string; + description?: 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 ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + title?: string; + description?: string; + }): TextProposal { + const message = new TextProposal({}); + if (data.title != null) { + message.title = data.title; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + title?: string; + description?: string; + } = {}; + if (this.title != null) { + data.title = this.title; + } + if (this.description != null) { + data.description = this.description; + } + 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.title.length) + writer.writeString(1, this.title); + if (this.description.length) + writer.writeString(2, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TextProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TextProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.title = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TextProposal { + return TextProposal.deserialize(bytes); + } + } + export class Deposit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + depositor?: string; + amount?: dependency_1.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 3) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + proposal_id?: number; + depositor?: string; + amount?: ReturnType[]; + }): Deposit { + const message = new Deposit({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + depositor?: string; + amount?: ReturnType[]; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.depositor.length) + writer.writeString(2, this.depositor); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Deposit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Deposit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.depositor = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Deposit { + return Deposit.deserialize(bytes); + } + } + export class Proposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + content?: dependency_4.google.protobuf.Any; + status?: ProposalStatus; + final_tally_result?: TallyResult; + submit_time?: dependency_3.google.protobuf.Timestamp; + deposit_end_time?: dependency_3.google.protobuf.Timestamp; + total_deposit?: dependency_1.cosmos.base.v1beta1.Coin[]; + voting_start_time?: dependency_3.google.protobuf.Timestamp; + voting_end_time?: dependency_3.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("content" in data && data.content != undefined) { + this.content = data.content; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("final_tally_result" in data && data.final_tally_result != undefined) { + this.final_tally_result = data.final_tally_result; + } + if ("submit_time" in data && data.submit_time != undefined) { + this.submit_time = data.submit_time; + } + if ("deposit_end_time" in data && data.deposit_end_time != undefined) { + this.deposit_end_time = data.deposit_end_time; + } + if ("total_deposit" in data && data.total_deposit != undefined) { + this.total_deposit = data.total_deposit; + } + if ("voting_start_time" in data && data.voting_start_time != undefined) { + this.voting_start_time = data.voting_start_time; + } + if ("voting_end_time" in data && data.voting_end_time != undefined) { + this.voting_end_time = data.voting_end_time; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get content() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set content(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_content() { + return pb_1.Message.getField(this, 2) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 3, ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) as ProposalStatus; + } + set status(value: ProposalStatus) { + pb_1.Message.setField(this, 3, value); + } + get final_tally_result() { + return pb_1.Message.getWrapperField(this, TallyResult, 4) as TallyResult; + } + set final_tally_result(value: TallyResult) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_final_tally_result() { + return pb_1.Message.getField(this, 4) != null; + } + get submit_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5) as dependency_3.google.protobuf.Timestamp; + } + set submit_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_submit_time() { + return pb_1.Message.getField(this, 5) != null; + } + get deposit_end_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 6) as dependency_3.google.protobuf.Timestamp; + } + set deposit_end_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_deposit_end_time() { + return pb_1.Message.getField(this, 6) != null; + } + get total_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 7) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set total_deposit(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get voting_start_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 8) as dependency_3.google.protobuf.Timestamp; + } + set voting_start_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_voting_start_time() { + return pb_1.Message.getField(this, 8) != null; + } + get voting_end_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 9) as dependency_3.google.protobuf.Timestamp; + } + set voting_end_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_voting_end_time() { + return pb_1.Message.getField(this, 9) != null; + } + static fromObject(data: { + proposal_id?: number; + content?: ReturnType; + status?: ProposalStatus; + final_tally_result?: ReturnType; + submit_time?: ReturnType; + deposit_end_time?: ReturnType; + total_deposit?: ReturnType[]; + voting_start_time?: ReturnType; + voting_end_time?: ReturnType; + }): Proposal { + const message = new Proposal({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.content != null) { + message.content = dependency_4.google.protobuf.Any.fromObject(data.content); + } + if (data.status != null) { + message.status = data.status; + } + if (data.final_tally_result != null) { + message.final_tally_result = TallyResult.fromObject(data.final_tally_result); + } + if (data.submit_time != null) { + message.submit_time = dependency_3.google.protobuf.Timestamp.fromObject(data.submit_time); + } + if (data.deposit_end_time != null) { + message.deposit_end_time = dependency_3.google.protobuf.Timestamp.fromObject(data.deposit_end_time); + } + if (data.total_deposit != null) { + message.total_deposit = data.total_deposit.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.voting_start_time != null) { + message.voting_start_time = dependency_3.google.protobuf.Timestamp.fromObject(data.voting_start_time); + } + if (data.voting_end_time != null) { + message.voting_end_time = dependency_3.google.protobuf.Timestamp.fromObject(data.voting_end_time); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + content?: ReturnType; + status?: ProposalStatus; + final_tally_result?: ReturnType; + submit_time?: ReturnType; + deposit_end_time?: ReturnType; + total_deposit?: ReturnType[]; + voting_start_time?: ReturnType; + voting_end_time?: ReturnType; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.content != null) { + data.content = this.content.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + if (this.final_tally_result != null) { + data.final_tally_result = this.final_tally_result.toObject(); + } + if (this.submit_time != null) { + data.submit_time = this.submit_time.toObject(); + } + if (this.deposit_end_time != null) { + data.deposit_end_time = this.deposit_end_time.toObject(); + } + if (this.total_deposit != null) { + data.total_deposit = this.total_deposit.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.voting_start_time != null) { + data.voting_start_time = this.voting_start_time.toObject(); + } + if (this.voting_end_time != null) { + data.voting_end_time = this.voting_end_time.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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.has_content) + writer.writeMessage(2, this.content, () => this.content.serialize(writer)); + if (this.status != ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) + writer.writeEnum(3, this.status); + if (this.has_final_tally_result) + writer.writeMessage(4, this.final_tally_result, () => this.final_tally_result.serialize(writer)); + if (this.has_submit_time) + writer.writeMessage(5, this.submit_time, () => this.submit_time.serialize(writer)); + if (this.has_deposit_end_time) + writer.writeMessage(6, this.deposit_end_time, () => this.deposit_end_time.serialize(writer)); + if (this.total_deposit.length) + writer.writeRepeatedMessage(7, this.total_deposit, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_voting_start_time) + writer.writeMessage(8, this.voting_start_time, () => this.voting_start_time.serialize(writer)); + if (this.has_voting_end_time) + writer.writeMessage(9, this.voting_end_time, () => this.voting_end_time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Proposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Proposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.content, () => message.content = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 3: + message.status = reader.readEnum(); + break; + case 4: + reader.readMessage(message.final_tally_result, () => message.final_tally_result = TallyResult.deserialize(reader)); + break; + case 5: + reader.readMessage(message.submit_time, () => message.submit_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 6: + reader.readMessage(message.deposit_end_time, () => message.deposit_end_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 7: + reader.readMessage(message.total_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + case 8: + reader.readMessage(message.voting_start_time, () => message.voting_start_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 9: + reader.readMessage(message.voting_end_time, () => message.voting_end_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Proposal { + return Proposal.deserialize(bytes); + } + } + export class TallyResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + yes?: string; + abstain?: string; + no?: string; + no_with_veto?: 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 ("yes" in data && data.yes != undefined) { + this.yes = data.yes; + } + if ("abstain" in data && data.abstain != undefined) { + this.abstain = data.abstain; + } + if ("no" in data && data.no != undefined) { + this.no = data.no; + } + if ("no_with_veto" in data && data.no_with_veto != undefined) { + this.no_with_veto = data.no_with_veto; + } + } + } + get yes() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set yes(value: string) { + pb_1.Message.setField(this, 1, value); + } + get abstain() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set abstain(value: string) { + pb_1.Message.setField(this, 2, value); + } + get no() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set no(value: string) { + pb_1.Message.setField(this, 3, value); + } + get no_with_veto() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set no_with_veto(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + yes?: string; + abstain?: string; + no?: string; + no_with_veto?: string; + }): TallyResult { + const message = new TallyResult({}); + if (data.yes != null) { + message.yes = data.yes; + } + if (data.abstain != null) { + message.abstain = data.abstain; + } + if (data.no != null) { + message.no = data.no; + } + if (data.no_with_veto != null) { + message.no_with_veto = data.no_with_veto; + } + return message; + } + toObject() { + const data: { + yes?: string; + abstain?: string; + no?: string; + no_with_veto?: string; + } = {}; + if (this.yes != null) { + data.yes = this.yes; + } + if (this.abstain != null) { + data.abstain = this.abstain; + } + if (this.no != null) { + data.no = this.no; + } + if (this.no_with_veto != null) { + data.no_with_veto = this.no_with_veto; + } + 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.yes.length) + writer.writeString(1, this.yes); + if (this.abstain.length) + writer.writeString(2, this.abstain); + if (this.no.length) + writer.writeString(3, this.no); + if (this.no_with_veto.length) + writer.writeString(4, this.no_with_veto); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TallyResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TallyResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.yes = reader.readString(); + break; + case 2: + message.abstain = reader.readString(); + break; + case 3: + message.no = reader.readString(); + break; + case 4: + message.no_with_veto = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TallyResult { + return TallyResult.deserialize(bytes); + } + } + export class Vote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: string; + /** @deprecated*/ + option?: VoteOption; + options?: WeightedVoteOption[]; + }) { + 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("option" in data && data.option != undefined) { + this.option = data.option; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + /** @deprecated*/ + get option() { + return pb_1.Message.getFieldWithDefault(this, 3, VoteOption.VOTE_OPTION_UNSPECIFIED) as VoteOption; + } + /** @deprecated*/ + set option(value: VoteOption) { + pb_1.Message.setField(this, 3, value); + } + get options() { + return pb_1.Message.getRepeatedWrapperField(this, WeightedVoteOption, 4) as WeightedVoteOption[]; + } + set options(value: WeightedVoteOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + option?: VoteOption; + options?: ReturnType[]; + }): Vote { + const message = new Vote({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.option != null) { + message.option = data.option; + } + if (data.options != null) { + message.options = data.options.map(item => WeightedVoteOption.fromObject(item)); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + option?: VoteOption; + options?: ReturnType[]; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.option != null) { + data.option = this.option; + } + if (this.options != null) { + data.options = this.options.map((item: WeightedVoteOption) => item.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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.option != VoteOption.VOTE_OPTION_UNSPECIFIED) + writer.writeEnum(3, this.option); + if (this.options.length) + writer.writeRepeatedMessage(4, this.options, (item: WeightedVoteOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Vote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Vote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + case 3: + message.option = reader.readEnum(); + break; + case 4: + reader.readMessage(message.options, () => pb_1.Message.addToRepeatedWrapperField(message, 4, WeightedVoteOption.deserialize(reader), WeightedVoteOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Vote { + return Vote.deserialize(bytes); + } + } + export class DepositParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + min_deposit?: dependency_1.cosmos.base.v1beta1.Coin[]; + max_deposit_period?: dependency_5.google.protobuf.Duration; + }) { + 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 ("min_deposit" in data && data.min_deposit != undefined) { + this.min_deposit = data.min_deposit; + } + if ("max_deposit_period" in data && data.max_deposit_period != undefined) { + this.max_deposit_period = data.max_deposit_period; + } + } + } + get min_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 1) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set min_deposit(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get max_deposit_period() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Duration, 2) as dependency_5.google.protobuf.Duration; + } + set max_deposit_period(value: dependency_5.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_max_deposit_period() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + min_deposit?: ReturnType[]; + max_deposit_period?: ReturnType; + }): DepositParams { + const message = new DepositParams({}); + if (data.min_deposit != null) { + message.min_deposit = data.min_deposit.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.max_deposit_period != null) { + message.max_deposit_period = dependency_5.google.protobuf.Duration.fromObject(data.max_deposit_period); + } + return message; + } + toObject() { + const data: { + min_deposit?: ReturnType[]; + max_deposit_period?: ReturnType; + } = {}; + if (this.min_deposit != null) { + data.min_deposit = this.min_deposit.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.max_deposit_period != null) { + data.max_deposit_period = this.max_deposit_period.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.min_deposit.length) + writer.writeRepeatedMessage(1, this.min_deposit, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.has_max_deposit_period) + writer.writeMessage(2, this.max_deposit_period, () => this.max_deposit_period.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DepositParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DepositParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.min_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + case 2: + reader.readMessage(message.max_deposit_period, () => message.max_deposit_period = dependency_5.google.protobuf.Duration.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DepositParams { + return DepositParams.deserialize(bytes); + } + } + export class VotingParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + voting_period?: dependency_5.google.protobuf.Duration; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("voting_period" in data && data.voting_period != undefined) { + this.voting_period = data.voting_period; + } + } + } + get voting_period() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Duration, 1) as dependency_5.google.protobuf.Duration; + } + set voting_period(value: dependency_5.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_voting_period() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + voting_period?: ReturnType; + }): VotingParams { + const message = new VotingParams({}); + if (data.voting_period != null) { + message.voting_period = dependency_5.google.protobuf.Duration.fromObject(data.voting_period); + } + return message; + } + toObject() { + const data: { + voting_period?: ReturnType; + } = {}; + if (this.voting_period != null) { + data.voting_period = this.voting_period.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_voting_period) + writer.writeMessage(1, this.voting_period, () => this.voting_period.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VotingParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VotingParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.voting_period, () => message.voting_period = dependency_5.google.protobuf.Duration.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VotingParams { + return VotingParams.deserialize(bytes); + } + } + export class TallyParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + quorum?: Uint8Array; + threshold?: Uint8Array; + veto_threshold?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("quorum" in data && data.quorum != undefined) { + this.quorum = data.quorum; + } + if ("threshold" in data && data.threshold != undefined) { + this.threshold = data.threshold; + } + if ("veto_threshold" in data && data.veto_threshold != undefined) { + this.veto_threshold = data.veto_threshold; + } + } + } + get quorum() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set quorum(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get threshold() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set threshold(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get veto_threshold() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set veto_threshold(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + quorum?: Uint8Array; + threshold?: Uint8Array; + veto_threshold?: Uint8Array; + }): TallyParams { + const message = new TallyParams({}); + if (data.quorum != null) { + message.quorum = data.quorum; + } + if (data.threshold != null) { + message.threshold = data.threshold; + } + if (data.veto_threshold != null) { + message.veto_threshold = data.veto_threshold; + } + return message; + } + toObject() { + const data: { + quorum?: Uint8Array; + threshold?: Uint8Array; + veto_threshold?: Uint8Array; + } = {}; + if (this.quorum != null) { + data.quorum = this.quorum; + } + if (this.threshold != null) { + data.threshold = this.threshold; + } + if (this.veto_threshold != null) { + data.veto_threshold = this.veto_threshold; + } + 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.quorum.length) + writer.writeBytes(1, this.quorum); + if (this.threshold.length) + writer.writeBytes(2, this.threshold); + if (this.veto_threshold.length) + writer.writeBytes(3, this.veto_threshold); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TallyParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TallyParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.quorum = reader.readBytes(); + break; + case 2: + message.threshold = reader.readBytes(); + break; + case 3: + message.veto_threshold = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TallyParams { + return TallyParams.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/gov/v1beta1/gov_pb.d.ts b/codegen/cosmos/gov/v1beta1/gov_pb.d.ts similarity index 100% rename from proto/cosmos/gov/v1beta1/gov_pb.d.ts rename to codegen/cosmos/gov/v1beta1/gov_pb.d.ts diff --git a/proto/cosmos/gov/v1beta1/gov_pb.js b/codegen/cosmos/gov/v1beta1/gov_pb.js similarity index 100% rename from proto/cosmos/gov/v1beta1/gov_pb.js rename to codegen/cosmos/gov/v1beta1/gov_pb.js diff --git a/proto/cosmos/gov/v1beta1/gov_pb_service.d.ts b/codegen/cosmos/gov/v1beta1/gov_pb_service.d.ts similarity index 100% rename from proto/cosmos/gov/v1beta1/gov_pb_service.d.ts rename to codegen/cosmos/gov/v1beta1/gov_pb_service.d.ts diff --git a/proto/cosmos/gov/v1beta1/gov_pb_service.js b/codegen/cosmos/gov/v1beta1/gov_pb_service.js similarity index 100% rename from proto/cosmos/gov/v1beta1/gov_pb_service.js rename to codegen/cosmos/gov/v1beta1/gov_pb_service.js diff --git a/codegen/cosmos/gov/v1beta1/query.ts b/codegen/cosmos/gov/v1beta1/query.ts new file mode 100644 index 0000000..5fc41cc --- /dev/null +++ b/codegen/cosmos/gov/v1beta1/query.ts @@ -0,0 +1,1540 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/gov/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/api/annotations"; +import * as dependency_4 from "./gov"; +import * as dependency_5 from "./../../../cosmos_proto/cosmos"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.gov.v1beta1 { + export class QueryProposalRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): QueryProposalRequest { + const message = new QueryProposalRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalRequest { + return QueryProposalRequest.deserialize(bytes); + } + } + export class QueryProposalResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal?: dependency_4.cosmos.gov.v1beta1.Proposal; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal" in data && data.proposal != undefined) { + this.proposal = data.proposal; + } + } + } + get proposal() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.gov.v1beta1.Proposal, 1) as dependency_4.cosmos.gov.v1beta1.Proposal; + } + set proposal(value: dependency_4.cosmos.gov.v1beta1.Proposal) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_proposal() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + proposal?: ReturnType; + }): QueryProposalResponse { + const message = new QueryProposalResponse({}); + if (data.proposal != null) { + message.proposal = dependency_4.cosmos.gov.v1beta1.Proposal.fromObject(data.proposal); + } + return message; + } + toObject() { + const data: { + proposal?: ReturnType; + } = {}; + if (this.proposal != null) { + data.proposal = this.proposal.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_proposal) + writer.writeMessage(1, this.proposal, () => this.proposal.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proposal, () => message.proposal = dependency_4.cosmos.gov.v1beta1.Proposal.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalResponse { + return QueryProposalResponse.deserialize(bytes); + } + } + export class QueryProposalsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_status?: dependency_4.cosmos.gov.v1beta1.ProposalStatus; + voter?: string; + depositor?: string; + pagination?: dependency_1.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 ("proposal_status" in data && data.proposal_status != undefined) { + this.proposal_status = data.proposal_status; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposal_status() { + return pb_1.Message.getFieldWithDefault(this, 1, dependency_4.cosmos.gov.v1beta1.ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) as dependency_4.cosmos.gov.v1beta1.ProposalStatus; + } + set proposal_status(value: dependency_4.cosmos.gov.v1beta1.ProposalStatus) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 3, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 4) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + proposal_status?: dependency_4.cosmos.gov.v1beta1.ProposalStatus; + voter?: string; + depositor?: string; + pagination?: ReturnType; + }): QueryProposalsRequest { + const message = new QueryProposalsRequest({}); + if (data.proposal_status != null) { + message.proposal_status = data.proposal_status; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposal_status?: dependency_4.cosmos.gov.v1beta1.ProposalStatus; + voter?: string; + depositor?: string; + pagination?: ReturnType; + } = {}; + if (this.proposal_status != null) { + data.proposal_status = this.proposal_status; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + 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.proposal_status != dependency_4.cosmos.gov.v1beta1.ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) + writer.writeEnum(1, this.proposal_status); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.depositor.length) + writer.writeString(3, this.depositor); + if (this.has_pagination) + writer.writeMessage(4, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_status = reader.readEnum(); + break; + case 2: + message.voter = reader.readString(); + break; + case 3: + message.depositor = reader.readString(); + break; + case 4: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalsRequest { + return QueryProposalsRequest.deserialize(bytes); + } + } + export class QueryProposalsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposals?: dependency_4.cosmos.gov.v1beta1.Proposal[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("proposals" in data && data.proposals != undefined) { + this.proposals = data.proposals; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposals() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.gov.v1beta1.Proposal, 1) as dependency_4.cosmos.gov.v1beta1.Proposal[]; + } + set proposals(value: dependency_4.cosmos.gov.v1beta1.Proposal[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + proposals?: ReturnType[]; + pagination?: ReturnType; + }): QueryProposalsResponse { + const message = new QueryProposalsResponse({}); + if (data.proposals != null) { + message.proposals = data.proposals.map(item => dependency_4.cosmos.gov.v1beta1.Proposal.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposals?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.proposals != null) { + data.proposals = this.proposals.map((item: dependency_4.cosmos.gov.v1beta1.Proposal) => item.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.proposals.length) + writer.writeRepeatedMessage(1, this.proposals, (item: dependency_4.cosmos.gov.v1beta1.Proposal) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proposals, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.gov.v1beta1.Proposal.deserialize(reader), dependency_4.cosmos.gov.v1beta1.Proposal)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalsResponse { + return QueryProposalsResponse.deserialize(bytes); + } + } + export class QueryVoteRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + }): QueryVoteRequest { + const message = new QueryVoteRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVoteRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVoteRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVoteRequest { + return QueryVoteRequest.deserialize(bytes); + } + } + export class QueryVoteResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vote?: dependency_4.cosmos.gov.v1beta1.Vote; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("vote" in data && data.vote != undefined) { + this.vote = data.vote; + } + } + } + get vote() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.gov.v1beta1.Vote, 1) as dependency_4.cosmos.gov.v1beta1.Vote; + } + set vote(value: dependency_4.cosmos.gov.v1beta1.Vote) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_vote() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + vote?: ReturnType; + }): QueryVoteResponse { + const message = new QueryVoteResponse({}); + if (data.vote != null) { + message.vote = dependency_4.cosmos.gov.v1beta1.Vote.fromObject(data.vote); + } + return message; + } + toObject() { + const data: { + vote?: ReturnType; + } = {}; + if (this.vote != null) { + data.vote = this.vote.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_vote) + writer.writeMessage(1, this.vote, () => this.vote.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVoteResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVoteResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.vote, () => message.vote = dependency_4.cosmos.gov.v1beta1.Vote.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVoteResponse { + return QueryVoteResponse.deserialize(bytes); + } + } + export class QueryVotesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + pagination?: dependency_1.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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + proposal_id?: number; + pagination?: ReturnType; + }): QueryVotesRequest { + const message = new QueryVotesRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + pagination?: ReturnType; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVotesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVotesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVotesRequest { + return QueryVotesRequest.deserialize(bytes); + } + } + export class QueryVotesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + votes?: dependency_4.cosmos.gov.v1beta1.Vote[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.gov.v1beta1.Vote, 1) as dependency_4.cosmos.gov.v1beta1.Vote[]; + } + set votes(value: dependency_4.cosmos.gov.v1beta1.Vote[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + votes?: ReturnType[]; + pagination?: ReturnType; + }): QueryVotesResponse { + const message = new QueryVotesResponse({}); + if (data.votes != null) { + message.votes = data.votes.map(item => dependency_4.cosmos.gov.v1beta1.Vote.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + votes?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.votes != null) { + data.votes = this.votes.map((item: dependency_4.cosmos.gov.v1beta1.Vote) => item.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.votes.length) + writer.writeRepeatedMessage(1, this.votes, (item: dependency_4.cosmos.gov.v1beta1.Vote) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVotesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVotesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.gov.v1beta1.Vote.deserialize(reader), dependency_4.cosmos.gov.v1beta1.Vote)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVotesResponse { + return QueryVotesResponse.deserialize(bytes); + } + } + export class QueryParamsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params_type?: 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 ("params_type" in data && data.params_type != undefined) { + this.params_type = data.params_type; + } + } + } + get params_type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set params_type(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + params_type?: string; + }): QueryParamsRequest { + const message = new QueryParamsRequest({}); + if (data.params_type != null) { + message.params_type = data.params_type; + } + return message; + } + toObject() { + const data: { + params_type?: string; + } = {}; + if (this.params_type != null) { + data.params_type = this.params_type; + } + 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.params_type.length) + writer.writeString(1, this.params_type); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.params_type = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + voting_params?: dependency_4.cosmos.gov.v1beta1.VotingParams; + deposit_params?: dependency_4.cosmos.gov.v1beta1.DepositParams; + tally_params?: dependency_4.cosmos.gov.v1beta1.TallyParams; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("voting_params" in data && data.voting_params != undefined) { + this.voting_params = data.voting_params; + } + if ("deposit_params" in data && data.deposit_params != undefined) { + this.deposit_params = data.deposit_params; + } + if ("tally_params" in data && data.tally_params != undefined) { + this.tally_params = data.tally_params; + } + } + } + get voting_params() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.gov.v1beta1.VotingParams, 1) as dependency_4.cosmos.gov.v1beta1.VotingParams; + } + set voting_params(value: dependency_4.cosmos.gov.v1beta1.VotingParams) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_voting_params() { + return pb_1.Message.getField(this, 1) != null; + } + get deposit_params() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.gov.v1beta1.DepositParams, 2) as dependency_4.cosmos.gov.v1beta1.DepositParams; + } + set deposit_params(value: dependency_4.cosmos.gov.v1beta1.DepositParams) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_deposit_params() { + return pb_1.Message.getField(this, 2) != null; + } + get tally_params() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.gov.v1beta1.TallyParams, 3) as dependency_4.cosmos.gov.v1beta1.TallyParams; + } + set tally_params(value: dependency_4.cosmos.gov.v1beta1.TallyParams) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_tally_params() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + voting_params?: ReturnType; + deposit_params?: ReturnType; + tally_params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.voting_params != null) { + message.voting_params = dependency_4.cosmos.gov.v1beta1.VotingParams.fromObject(data.voting_params); + } + if (data.deposit_params != null) { + message.deposit_params = dependency_4.cosmos.gov.v1beta1.DepositParams.fromObject(data.deposit_params); + } + if (data.tally_params != null) { + message.tally_params = dependency_4.cosmos.gov.v1beta1.TallyParams.fromObject(data.tally_params); + } + return message; + } + toObject() { + const data: { + voting_params?: ReturnType; + deposit_params?: ReturnType; + tally_params?: ReturnType; + } = {}; + if (this.voting_params != null) { + data.voting_params = this.voting_params.toObject(); + } + if (this.deposit_params != null) { + data.deposit_params = this.deposit_params.toObject(); + } + if (this.tally_params != null) { + data.tally_params = this.tally_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_voting_params) + writer.writeMessage(1, this.voting_params, () => this.voting_params.serialize(writer)); + if (this.has_deposit_params) + writer.writeMessage(2, this.deposit_params, () => this.deposit_params.serialize(writer)); + if (this.has_tally_params) + writer.writeMessage(3, this.tally_params, () => this.tally_params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.voting_params, () => message.voting_params = dependency_4.cosmos.gov.v1beta1.VotingParams.deserialize(reader)); + break; + case 2: + reader.readMessage(message.deposit_params, () => message.deposit_params = dependency_4.cosmos.gov.v1beta1.DepositParams.deserialize(reader)); + break; + case 3: + reader.readMessage(message.tally_params, () => message.tally_params = dependency_4.cosmos.gov.v1beta1.TallyParams.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QueryDepositRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + depositor?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proposal_id?: number; + depositor?: string; + }): QueryDepositRequest { + const message = new QueryDepositRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + depositor?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.depositor.length) + writer.writeString(2, this.depositor); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.depositor = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositRequest { + return QueryDepositRequest.deserialize(bytes); + } + } + export class QueryDepositResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + deposit?: dependency_4.cosmos.gov.v1beta1.Deposit; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("deposit" in data && data.deposit != undefined) { + this.deposit = data.deposit; + } + } + } + get deposit() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.gov.v1beta1.Deposit, 1) as dependency_4.cosmos.gov.v1beta1.Deposit; + } + set deposit(value: dependency_4.cosmos.gov.v1beta1.Deposit) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_deposit() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + deposit?: ReturnType; + }): QueryDepositResponse { + const message = new QueryDepositResponse({}); + if (data.deposit != null) { + message.deposit = dependency_4.cosmos.gov.v1beta1.Deposit.fromObject(data.deposit); + } + return message; + } + toObject() { + const data: { + deposit?: ReturnType; + } = {}; + if (this.deposit != null) { + data.deposit = this.deposit.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_deposit) + writer.writeMessage(1, this.deposit, () => this.deposit.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.deposit, () => message.deposit = dependency_4.cosmos.gov.v1beta1.Deposit.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositResponse { + return QueryDepositResponse.deserialize(bytes); + } + } + export class QueryDepositsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + pagination?: dependency_1.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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + proposal_id?: number; + pagination?: ReturnType; + }): QueryDepositsRequest { + const message = new QueryDepositsRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + pagination?: ReturnType; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositsRequest { + return QueryDepositsRequest.deserialize(bytes); + } + } + export class QueryDepositsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + deposits?: dependency_4.cosmos.gov.v1beta1.Deposit[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("deposits" in data && data.deposits != undefined) { + this.deposits = data.deposits; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get deposits() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.gov.v1beta1.Deposit, 1) as dependency_4.cosmos.gov.v1beta1.Deposit[]; + } + set deposits(value: dependency_4.cosmos.gov.v1beta1.Deposit[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + deposits?: ReturnType[]; + pagination?: ReturnType; + }): QueryDepositsResponse { + const message = new QueryDepositsResponse({}); + if (data.deposits != null) { + message.deposits = data.deposits.map(item => dependency_4.cosmos.gov.v1beta1.Deposit.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + deposits?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.deposits != null) { + data.deposits = this.deposits.map((item: dependency_4.cosmos.gov.v1beta1.Deposit) => item.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.deposits.length) + writer.writeRepeatedMessage(1, this.deposits, (item: dependency_4.cosmos.gov.v1beta1.Deposit) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDepositsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDepositsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.deposits, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.gov.v1beta1.Deposit.deserialize(reader), dependency_4.cosmos.gov.v1beta1.Deposit)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDepositsResponse { + return QueryDepositsResponse.deserialize(bytes); + } + } + export class QueryTallyResultRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): QueryTallyResultRequest { + const message = new QueryTallyResultRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTallyResultRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTallyResultRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTallyResultRequest { + return QueryTallyResultRequest.deserialize(bytes); + } + } + export class QueryTallyResultResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tally?: dependency_4.cosmos.gov.v1beta1.TallyResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tally" in data && data.tally != undefined) { + this.tally = data.tally; + } + } + } + get tally() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.gov.v1beta1.TallyResult, 1) as dependency_4.cosmos.gov.v1beta1.TallyResult; + } + set tally(value: dependency_4.cosmos.gov.v1beta1.TallyResult) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tally() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + tally?: ReturnType; + }): QueryTallyResultResponse { + const message = new QueryTallyResultResponse({}); + if (data.tally != null) { + message.tally = dependency_4.cosmos.gov.v1beta1.TallyResult.fromObject(data.tally); + } + return message; + } + toObject() { + const data: { + tally?: ReturnType; + } = {}; + if (this.tally != null) { + data.tally = this.tally.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_tally) + writer.writeMessage(1, this.tally, () => this.tally.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTallyResultResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTallyResultResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tally, () => message.tally = dependency_4.cosmos.gov.v1beta1.TallyResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTallyResultResponse { + return QueryTallyResultResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Proposal: { + path: "/cosmos.gov.v1beta1.Query/Proposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryProposalRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryProposalRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryProposalResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryProposalResponse.deserialize(new Uint8Array(bytes)) + }, + Proposals: { + path: "/cosmos.gov.v1beta1.Query/Proposals", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryProposalsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryProposalsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryProposalsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryProposalsResponse.deserialize(new Uint8Array(bytes)) + }, + Vote: { + path: "/cosmos.gov.v1beta1.Query/Vote", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVoteRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVoteRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVoteResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVoteResponse.deserialize(new Uint8Array(bytes)) + }, + Votes: { + path: "/cosmos.gov.v1beta1.Query/Votes", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVotesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVotesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVotesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVotesResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/cosmos.gov.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + Deposit: { + path: "/cosmos.gov.v1beta1.Query/Deposit", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDepositRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDepositRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDepositResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDepositResponse.deserialize(new Uint8Array(bytes)) + }, + Deposits: { + path: "/cosmos.gov.v1beta1.Query/Deposits", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDepositsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDepositsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDepositsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDepositsResponse.deserialize(new Uint8Array(bytes)) + }, + TallyResult: { + path: "/cosmos.gov.v1beta1.Query/TallyResult", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTallyResultRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTallyResultRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTallyResultResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTallyResultResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Proposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Proposals(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Vote(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Votes(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Deposit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Deposits(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TallyResult(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Proposal: GrpcUnaryServiceInterface = (message: QueryProposalRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Proposal(message, metadata, options, callback); + }; + Proposals: GrpcUnaryServiceInterface = (message: QueryProposalsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Proposals(message, metadata, options, callback); + }; + Vote: GrpcUnaryServiceInterface = (message: QueryVoteRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Vote(message, metadata, options, callback); + }; + Votes: GrpcUnaryServiceInterface = (message: QueryVotesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Votes(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + Deposit: GrpcUnaryServiceInterface = (message: QueryDepositRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Deposit(message, metadata, options, callback); + }; + Deposits: GrpcUnaryServiceInterface = (message: QueryDepositsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Deposits(message, metadata, options, callback); + }; + TallyResult: GrpcUnaryServiceInterface = (message: QueryTallyResultRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TallyResult(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/gov/v1beta1/query_pb.d.ts b/codegen/cosmos/gov/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/gov/v1beta1/query_pb.d.ts rename to codegen/cosmos/gov/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/gov/v1beta1/query_pb.js b/codegen/cosmos/gov/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/gov/v1beta1/query_pb.js rename to codegen/cosmos/gov/v1beta1/query_pb.js diff --git a/proto/cosmos/gov/v1beta1/query_pb_service.d.ts b/codegen/cosmos/gov/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/gov/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/gov/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/gov/v1beta1/query_pb_service.js b/codegen/cosmos/gov/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/gov/v1beta1/query_pb_service.js rename to codegen/cosmos/gov/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/gov/v1beta1/tx.ts b/codegen/cosmos/gov/v1beta1/tx.ts new file mode 100644 index 0000000..5fc4274 --- /dev/null +++ b/codegen/cosmos/gov/v1beta1/tx.ts @@ -0,0 +1,744 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/gov/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/v1beta1/coin"; +import * as dependency_2 from "./gov"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../../gogoproto/gogo"; +import * as dependency_5 from "./../../../google/protobuf/any"; +import * as dependency_6 from "./../../msg/v1/msg"; +import * as dependency_7 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.gov.v1beta1 { + export class MsgSubmitProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + content?: dependency_5.google.protobuf.Any; + initial_deposit?: dependency_1.cosmos.base.v1beta1.Coin[]; + proposer?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("content" in data && data.content != undefined) { + this.content = data.content; + } + if ("initial_deposit" in data && data.initial_deposit != undefined) { + this.initial_deposit = data.initial_deposit; + } + if ("proposer" in data && data.proposer != undefined) { + this.proposer = data.proposer; + } + } + } + get content() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 1) as dependency_5.google.protobuf.Any; + } + set content(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_content() { + return pb_1.Message.getField(this, 1) != null; + } + get initial_deposit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 2) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set initial_deposit(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get proposer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set proposer(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + content?: ReturnType; + initial_deposit?: ReturnType[]; + proposer?: string; + }): MsgSubmitProposal { + const message = new MsgSubmitProposal({}); + if (data.content != null) { + message.content = dependency_5.google.protobuf.Any.fromObject(data.content); + } + if (data.initial_deposit != null) { + message.initial_deposit = data.initial_deposit.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.proposer != null) { + message.proposer = data.proposer; + } + return message; + } + toObject() { + const data: { + content?: ReturnType; + initial_deposit?: ReturnType[]; + proposer?: string; + } = {}; + if (this.content != null) { + data.content = this.content.toObject(); + } + if (this.initial_deposit != null) { + data.initial_deposit = this.initial_deposit.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.proposer != null) { + data.proposer = this.proposer; + } + 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_content) + writer.writeMessage(1, this.content, () => this.content.serialize(writer)); + if (this.initial_deposit.length) + writer.writeRepeatedMessage(2, this.initial_deposit, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.proposer.length) + writer.writeString(3, this.proposer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.content, () => message.content = dependency_5.google.protobuf.Any.deserialize(reader)); + break; + case 2: + reader.readMessage(message.initial_deposit, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + case 3: + message.proposer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitProposal { + return MsgSubmitProposal.deserialize(bytes); + } + } + export class MsgSubmitProposalResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): MsgSubmitProposalResponse { + const message = new MsgSubmitProposalResponse({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitProposalResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitProposalResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitProposalResponse { + return MsgSubmitProposalResponse.deserialize(bytes); + } + } + export class MsgVote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: string; + option?: dependency_2.cosmos.gov.v1beta1.VoteOption; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("option" in data && data.option != undefined) { + this.option = data.option; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + get option() { + return pb_1.Message.getFieldWithDefault(this, 3, dependency_2.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_UNSPECIFIED) as dependency_2.cosmos.gov.v1beta1.VoteOption; + } + set option(value: dependency_2.cosmos.gov.v1beta1.VoteOption) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + option?: dependency_2.cosmos.gov.v1beta1.VoteOption; + }): MsgVote { + const message = new MsgVote({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.option != null) { + message.option = data.option; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + option?: dependency_2.cosmos.gov.v1beta1.VoteOption; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.option != null) { + data.option = this.option; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.option != dependency_2.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_UNSPECIFIED) + writer.writeEnum(3, this.option); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgVote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + case 3: + message.option = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVote { + return MsgVote.deserialize(bytes); + } + } + export class MsgVoteResponse 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: {}): MsgVoteResponse { + const message = new MsgVoteResponse({}); + 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): MsgVoteResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVoteResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVoteResponse { + return MsgVoteResponse.deserialize(bytes); + } + } + export class MsgVoteWeighted extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: string; + options?: dependency_2.cosmos.gov.v1beta1.WeightedVoteOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + get options() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.gov.v1beta1.WeightedVoteOption, 3) as dependency_2.cosmos.gov.v1beta1.WeightedVoteOption[]; + } + set options(value: dependency_2.cosmos.gov.v1beta1.WeightedVoteOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + options?: ReturnType[]; + }): MsgVoteWeighted { + const message = new MsgVoteWeighted({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.options != null) { + message.options = data.options.map(item => dependency_2.cosmos.gov.v1beta1.WeightedVoteOption.fromObject(item)); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + options?: ReturnType[]; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.options != null) { + data.options = this.options.map((item: dependency_2.cosmos.gov.v1beta1.WeightedVoteOption) => item.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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.options.length) + writer.writeRepeatedMessage(3, this.options, (item: dependency_2.cosmos.gov.v1beta1.WeightedVoteOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgVoteWeighted { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVoteWeighted(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + case 3: + reader.readMessage(message.options, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.gov.v1beta1.WeightedVoteOption.deserialize(reader), dependency_2.cosmos.gov.v1beta1.WeightedVoteOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVoteWeighted { + return MsgVoteWeighted.deserialize(bytes); + } + } + export class MsgVoteWeightedResponse 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: {}): MsgVoteWeightedResponse { + const message = new MsgVoteWeightedResponse({}); + 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): MsgVoteWeightedResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVoteWeightedResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVoteWeightedResponse { + return MsgVoteWeightedResponse.deserialize(bytes); + } + } + export class MsgDeposit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + depositor?: string; + amount?: dependency_1.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("depositor" in data && data.depositor != undefined) { + this.depositor = data.depositor; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get depositor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set depositor(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.base.v1beta1.Coin, 3) as dependency_1.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_1.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + proposal_id?: number; + depositor?: string; + amount?: ReturnType[]; + }): MsgDeposit { + const message = new MsgDeposit({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.depositor != null) { + message.depositor = data.depositor; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_1.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + depositor?: string; + amount?: ReturnType[]; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.depositor != null) { + data.depositor = this.depositor; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_1.cosmos.base.v1beta1.Coin) => item.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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.depositor.length) + writer.writeString(2, this.depositor); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_1.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDeposit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDeposit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.depositor = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_1.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDeposit { + return MsgDeposit.deserialize(bytes); + } + } + export class MsgDepositResponse 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: {}): MsgDepositResponse { + const message = new MsgDepositResponse({}); + 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): MsgDepositResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDepositResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDepositResponse { + return MsgDepositResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + SubmitProposal: { + path: "/cosmos.gov.v1beta1.Msg/SubmitProposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitProposal) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitProposal.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitProposalResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitProposalResponse.deserialize(new Uint8Array(bytes)) + }, + Vote: { + path: "/cosmos.gov.v1beta1.Msg/Vote", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgVote) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgVote.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgVoteResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgVoteResponse.deserialize(new Uint8Array(bytes)) + }, + VoteWeighted: { + path: "/cosmos.gov.v1beta1.Msg/VoteWeighted", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgVoteWeighted) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgVoteWeighted.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgVoteWeightedResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgVoteWeightedResponse.deserialize(new Uint8Array(bytes)) + }, + Deposit: { + path: "/cosmos.gov.v1beta1.Msg/Deposit", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgDeposit) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgDeposit.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgDepositResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgDepositResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract SubmitProposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Vote(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VoteWeighted(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Deposit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + SubmitProposal: GrpcUnaryServiceInterface = (message: MsgSubmitProposal, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitProposal(message, metadata, options, callback); + }; + Vote: GrpcUnaryServiceInterface = (message: MsgVote, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Vote(message, metadata, options, callback); + }; + VoteWeighted: GrpcUnaryServiceInterface = (message: MsgVoteWeighted, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VoteWeighted(message, metadata, options, callback); + }; + Deposit: GrpcUnaryServiceInterface = (message: MsgDeposit, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Deposit(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/gov/v1beta1/tx_pb.d.ts b/codegen/cosmos/gov/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/gov/v1beta1/tx_pb.d.ts rename to codegen/cosmos/gov/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/gov/v1beta1/tx_pb.js b/codegen/cosmos/gov/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/gov/v1beta1/tx_pb.js rename to codegen/cosmos/gov/v1beta1/tx_pb.js diff --git a/proto/cosmos/gov/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/gov/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/gov/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/gov/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/gov/v1beta1/tx_pb_service.js b/codegen/cosmos/gov/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/gov/v1beta1/tx_pb_service.js rename to codegen/cosmos/gov/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/group/module/v1/module.ts b/codegen/cosmos/group/module/v1/module.ts new file mode 100644 index 0000000..53d3727 --- /dev/null +++ b/codegen/cosmos/group/module/v1/module.ts @@ -0,0 +1,105 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/group/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../../google/protobuf/duration"; +import * as dependency_4 from "./../../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.group.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + max_execution_period?: dependency_3.google.protobuf.Duration; + max_metadata_len?: 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 ("max_execution_period" in data && data.max_execution_period != undefined) { + this.max_execution_period = data.max_execution_period; + } + if ("max_metadata_len" in data && data.max_metadata_len != undefined) { + this.max_metadata_len = data.max_metadata_len; + } + } + } + get max_execution_period() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Duration, 1) as dependency_3.google.protobuf.Duration; + } + set max_execution_period(value: dependency_3.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_max_execution_period() { + return pb_1.Message.getField(this, 1) != null; + } + get max_metadata_len() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set max_metadata_len(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + max_execution_period?: ReturnType; + max_metadata_len?: number; + }): Module { + const message = new Module({}); + if (data.max_execution_period != null) { + message.max_execution_period = dependency_3.google.protobuf.Duration.fromObject(data.max_execution_period); + } + if (data.max_metadata_len != null) { + message.max_metadata_len = data.max_metadata_len; + } + return message; + } + toObject() { + const data: { + max_execution_period?: ReturnType; + max_metadata_len?: number; + } = {}; + if (this.max_execution_period != null) { + data.max_execution_period = this.max_execution_period.toObject(); + } + if (this.max_metadata_len != null) { + data.max_metadata_len = this.max_metadata_len; + } + 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_max_execution_period) + writer.writeMessage(1, this.max_execution_period, () => this.max_execution_period.serialize(writer)); + if (this.max_metadata_len != 0) + writer.writeUint64(2, this.max_metadata_len); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.max_execution_period, () => message.max_execution_period = dependency_3.google.protobuf.Duration.deserialize(reader)); + break; + case 2: + message.max_metadata_len = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/group/module/v1/module_pb.d.ts b/codegen/cosmos/group/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/group/module/v1/module_pb.d.ts rename to codegen/cosmos/group/module/v1/module_pb.d.ts diff --git a/proto/cosmos/group/module/v1/module_pb.js b/codegen/cosmos/group/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/group/module/v1/module_pb.js rename to codegen/cosmos/group/module/v1/module_pb.js diff --git a/proto/cosmos/group/module/v1/module_pb_service.d.ts b/codegen/cosmos/group/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/group/module/v1/module_pb_service.d.ts rename to codegen/cosmos/group/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/group/module/v1/module_pb_service.js b/codegen/cosmos/group/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/group/module/v1/module_pb_service.js rename to codegen/cosmos/group/module/v1/module_pb_service.js diff --git a/codegen/cosmos/group/v1/events.ts b/codegen/cosmos/group/v1/events.ts new file mode 100644 index 0000000..a0530cc --- /dev/null +++ b/codegen/cosmos/group/v1/events.ts @@ -0,0 +1,798 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/group/v1/events.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../cosmos_proto/cosmos"; +import * as dependency_2 from "./types"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.group.v1 { + export class EventCreateGroup extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + group_id?: number; + }): EventCreateGroup { + const message = new EventCreateGroup({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + return message; + } + toObject() { + const data: { + group_id?: number; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventCreateGroup { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventCreateGroup(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventCreateGroup { + return EventCreateGroup.deserialize(bytes); + } + } + export class EventUpdateGroup extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + group_id?: number; + }): EventUpdateGroup { + const message = new EventUpdateGroup({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + return message; + } + toObject() { + const data: { + group_id?: number; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventUpdateGroup { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventUpdateGroup(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventUpdateGroup { + return EventUpdateGroup.deserialize(bytes); + } + } + export class EventCreateGroupPolicy extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): EventCreateGroupPolicy { + const message = new EventCreateGroupPolicy({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventCreateGroupPolicy { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventCreateGroupPolicy(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventCreateGroupPolicy { + return EventCreateGroupPolicy.deserialize(bytes); + } + } + export class EventUpdateGroupPolicy extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): EventUpdateGroupPolicy { + const message = new EventUpdateGroupPolicy({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventUpdateGroupPolicy { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventUpdateGroupPolicy(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventUpdateGroupPolicy { + return EventUpdateGroupPolicy.deserialize(bytes); + } + } + export class EventSubmitProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): EventSubmitProposal { + const message = new EventSubmitProposal({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventSubmitProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventSubmitProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventSubmitProposal { + return EventSubmitProposal.deserialize(bytes); + } + } + export class EventWithdrawProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): EventWithdrawProposal { + const message = new EventWithdrawProposal({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventWithdrawProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventWithdrawProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventWithdrawProposal { + return EventWithdrawProposal.deserialize(bytes); + } + } + export class EventVote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): EventVote { + const message = new EventVote({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventVote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventVote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventVote { + return EventVote.deserialize(bytes); + } + } + export class EventExec extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + result?: dependency_2.cosmos.group.v1.ProposalExecutorResult; + logs?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + if ("logs" in data && data.logs != undefined) { + this.logs = data.logs; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 2, dependency_2.cosmos.group.v1.ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED) as dependency_2.cosmos.group.v1.ProposalExecutorResult; + } + set result(value: dependency_2.cosmos.group.v1.ProposalExecutorResult) { + pb_1.Message.setField(this, 2, value); + } + get logs() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set logs(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + proposal_id?: number; + result?: dependency_2.cosmos.group.v1.ProposalExecutorResult; + logs?: string; + }): EventExec { + const message = new EventExec({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.result != null) { + message.result = data.result; + } + if (data.logs != null) { + message.logs = data.logs; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + result?: dependency_2.cosmos.group.v1.ProposalExecutorResult; + logs?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.result != null) { + data.result = this.result; + } + if (this.logs != null) { + data.logs = this.logs; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.result != dependency_2.cosmos.group.v1.ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED) + writer.writeEnum(2, this.result); + if (this.logs.length) + writer.writeString(3, this.logs); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventExec { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventExec(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.result = reader.readEnum(); + break; + case 3: + message.logs = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventExec { + return EventExec.deserialize(bytes); + } + } + export class EventLeaveGroup extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + address?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + group_id?: number; + address?: string; + }): EventLeaveGroup { + const message = new EventLeaveGroup({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + group_id?: number; + address?: string; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.address != null) { + data.address = this.address; + } + 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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.address.length) + writer.writeString(2, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventLeaveGroup { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventLeaveGroup(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventLeaveGroup { + return EventLeaveGroup.deserialize(bytes); + } + } + export class EventProposalPruned extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + status?: dependency_2.cosmos.group.v1.ProposalStatus; + tally_result?: dependency_2.cosmos.group.v1.TallyResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("tally_result" in data && data.tally_result != undefined) { + this.tally_result = data.tally_result; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 2, dependency_2.cosmos.group.v1.ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) as dependency_2.cosmos.group.v1.ProposalStatus; + } + set status(value: dependency_2.cosmos.group.v1.ProposalStatus) { + pb_1.Message.setField(this, 2, value); + } + get tally_result() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.group.v1.TallyResult, 3) as dependency_2.cosmos.group.v1.TallyResult; + } + set tally_result(value: dependency_2.cosmos.group.v1.TallyResult) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_tally_result() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + proposal_id?: number; + status?: dependency_2.cosmos.group.v1.ProposalStatus; + tally_result?: ReturnType; + }): EventProposalPruned { + const message = new EventProposalPruned({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.status != null) { + message.status = data.status; + } + if (data.tally_result != null) { + message.tally_result = dependency_2.cosmos.group.v1.TallyResult.fromObject(data.tally_result); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + status?: dependency_2.cosmos.group.v1.ProposalStatus; + tally_result?: ReturnType; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.status != null) { + data.status = this.status; + } + if (this.tally_result != null) { + data.tally_result = this.tally_result.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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.status != dependency_2.cosmos.group.v1.ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) + writer.writeEnum(2, this.status); + if (this.has_tally_result) + writer.writeMessage(3, this.tally_result, () => this.tally_result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventProposalPruned { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventProposalPruned(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.status = reader.readEnum(); + break; + case 3: + reader.readMessage(message.tally_result, () => message.tally_result = dependency_2.cosmos.group.v1.TallyResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventProposalPruned { + return EventProposalPruned.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/group/v1/events_pb.d.ts b/codegen/cosmos/group/v1/events_pb.d.ts similarity index 100% rename from proto/cosmos/group/v1/events_pb.d.ts rename to codegen/cosmos/group/v1/events_pb.d.ts diff --git a/proto/cosmos/group/v1/events_pb.js b/codegen/cosmos/group/v1/events_pb.js similarity index 100% rename from proto/cosmos/group/v1/events_pb.js rename to codegen/cosmos/group/v1/events_pb.js diff --git a/proto/cosmos/group/v1/events_pb_service.d.ts b/codegen/cosmos/group/v1/events_pb_service.d.ts similarity index 100% rename from proto/cosmos/group/v1/events_pb_service.d.ts rename to codegen/cosmos/group/v1/events_pb_service.d.ts diff --git a/proto/cosmos/group/v1/events_pb_service.js b/codegen/cosmos/group/v1/events_pb_service.js similarity index 100% rename from proto/cosmos/group/v1/events_pb_service.js rename to codegen/cosmos/group/v1/events_pb_service.js diff --git a/codegen/cosmos/group/v1/genesis.ts b/codegen/cosmos/group/v1/genesis.ts new file mode 100644 index 0000000..fba3307 --- /dev/null +++ b/codegen/cosmos/group/v1/genesis.ts @@ -0,0 +1,237 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/group/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./types"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.group.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_seq?: number; + groups?: dependency_1.cosmos.group.v1.GroupInfo[]; + group_members?: dependency_1.cosmos.group.v1.GroupMember[]; + group_policy_seq?: number; + group_policies?: dependency_1.cosmos.group.v1.GroupPolicyInfo[]; + proposal_seq?: number; + proposals?: dependency_1.cosmos.group.v1.Proposal[]; + votes?: dependency_1.cosmos.group.v1.Vote[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 5, 7, 8], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group_seq" in data && data.group_seq != undefined) { + this.group_seq = data.group_seq; + } + if ("groups" in data && data.groups != undefined) { + this.groups = data.groups; + } + if ("group_members" in data && data.group_members != undefined) { + this.group_members = data.group_members; + } + if ("group_policy_seq" in data && data.group_policy_seq != undefined) { + this.group_policy_seq = data.group_policy_seq; + } + if ("group_policies" in data && data.group_policies != undefined) { + this.group_policies = data.group_policies; + } + if ("proposal_seq" in data && data.proposal_seq != undefined) { + this.proposal_seq = data.proposal_seq; + } + if ("proposals" in data && data.proposals != undefined) { + this.proposals = data.proposals; + } + if ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + } + } + get group_seq() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_seq(value: number) { + pb_1.Message.setField(this, 1, value); + } + get groups() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.group.v1.GroupInfo, 2) as dependency_1.cosmos.group.v1.GroupInfo[]; + } + set groups(value: dependency_1.cosmos.group.v1.GroupInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get group_members() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.group.v1.GroupMember, 3) as dependency_1.cosmos.group.v1.GroupMember[]; + } + set group_members(value: dependency_1.cosmos.group.v1.GroupMember[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get group_policy_seq() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set group_policy_seq(value: number) { + pb_1.Message.setField(this, 4, value); + } + get group_policies() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.group.v1.GroupPolicyInfo, 5) as dependency_1.cosmos.group.v1.GroupPolicyInfo[]; + } + set group_policies(value: dependency_1.cosmos.group.v1.GroupPolicyInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get proposal_seq() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set proposal_seq(value: number) { + pb_1.Message.setField(this, 6, value); + } + get proposals() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.group.v1.Proposal, 7) as dependency_1.cosmos.group.v1.Proposal[]; + } + set proposals(value: dependency_1.cosmos.group.v1.Proposal[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.group.v1.Vote, 8) as dependency_1.cosmos.group.v1.Vote[]; + } + set votes(value: dependency_1.cosmos.group.v1.Vote[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + static fromObject(data: { + group_seq?: number; + groups?: ReturnType[]; + group_members?: ReturnType[]; + group_policy_seq?: number; + group_policies?: ReturnType[]; + proposal_seq?: number; + proposals?: ReturnType[]; + votes?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.group_seq != null) { + message.group_seq = data.group_seq; + } + if (data.groups != null) { + message.groups = data.groups.map(item => dependency_1.cosmos.group.v1.GroupInfo.fromObject(item)); + } + if (data.group_members != null) { + message.group_members = data.group_members.map(item => dependency_1.cosmos.group.v1.GroupMember.fromObject(item)); + } + if (data.group_policy_seq != null) { + message.group_policy_seq = data.group_policy_seq; + } + if (data.group_policies != null) { + message.group_policies = data.group_policies.map(item => dependency_1.cosmos.group.v1.GroupPolicyInfo.fromObject(item)); + } + if (data.proposal_seq != null) { + message.proposal_seq = data.proposal_seq; + } + if (data.proposals != null) { + message.proposals = data.proposals.map(item => dependency_1.cosmos.group.v1.Proposal.fromObject(item)); + } + if (data.votes != null) { + message.votes = data.votes.map(item => dependency_1.cosmos.group.v1.Vote.fromObject(item)); + } + return message; + } + toObject() { + const data: { + group_seq?: number; + groups?: ReturnType[]; + group_members?: ReturnType[]; + group_policy_seq?: number; + group_policies?: ReturnType[]; + proposal_seq?: number; + proposals?: ReturnType[]; + votes?: ReturnType[]; + } = {}; + if (this.group_seq != null) { + data.group_seq = this.group_seq; + } + if (this.groups != null) { + data.groups = this.groups.map((item: dependency_1.cosmos.group.v1.GroupInfo) => item.toObject()); + } + if (this.group_members != null) { + data.group_members = this.group_members.map((item: dependency_1.cosmos.group.v1.GroupMember) => item.toObject()); + } + if (this.group_policy_seq != null) { + data.group_policy_seq = this.group_policy_seq; + } + if (this.group_policies != null) { + data.group_policies = this.group_policies.map((item: dependency_1.cosmos.group.v1.GroupPolicyInfo) => item.toObject()); + } + if (this.proposal_seq != null) { + data.proposal_seq = this.proposal_seq; + } + if (this.proposals != null) { + data.proposals = this.proposals.map((item: dependency_1.cosmos.group.v1.Proposal) => item.toObject()); + } + if (this.votes != null) { + data.votes = this.votes.map((item: dependency_1.cosmos.group.v1.Vote) => item.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.group_seq != 0) + writer.writeUint64(1, this.group_seq); + if (this.groups.length) + writer.writeRepeatedMessage(2, this.groups, (item: dependency_1.cosmos.group.v1.GroupInfo) => item.serialize(writer)); + if (this.group_members.length) + writer.writeRepeatedMessage(3, this.group_members, (item: dependency_1.cosmos.group.v1.GroupMember) => item.serialize(writer)); + if (this.group_policy_seq != 0) + writer.writeUint64(4, this.group_policy_seq); + if (this.group_policies.length) + writer.writeRepeatedMessage(5, this.group_policies, (item: dependency_1.cosmos.group.v1.GroupPolicyInfo) => item.serialize(writer)); + if (this.proposal_seq != 0) + writer.writeUint64(6, this.proposal_seq); + if (this.proposals.length) + writer.writeRepeatedMessage(7, this.proposals, (item: dependency_1.cosmos.group.v1.Proposal) => item.serialize(writer)); + if (this.votes.length) + writer.writeRepeatedMessage(8, this.votes, (item: dependency_1.cosmos.group.v1.Vote) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_seq = reader.readUint64(); + break; + case 2: + reader.readMessage(message.groups, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.cosmos.group.v1.GroupInfo.deserialize(reader), dependency_1.cosmos.group.v1.GroupInfo)); + break; + case 3: + reader.readMessage(message.group_members, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.cosmos.group.v1.GroupMember.deserialize(reader), dependency_1.cosmos.group.v1.GroupMember)); + break; + case 4: + message.group_policy_seq = reader.readUint64(); + break; + case 5: + reader.readMessage(message.group_policies, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_1.cosmos.group.v1.GroupPolicyInfo.deserialize(reader), dependency_1.cosmos.group.v1.GroupPolicyInfo)); + break; + case 6: + message.proposal_seq = reader.readUint64(); + break; + case 7: + reader.readMessage(message.proposals, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_1.cosmos.group.v1.Proposal.deserialize(reader), dependency_1.cosmos.group.v1.Proposal)); + break; + case 8: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 8, dependency_1.cosmos.group.v1.Vote.deserialize(reader), dependency_1.cosmos.group.v1.Vote)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/group/v1/genesis_pb.d.ts b/codegen/cosmos/group/v1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/group/v1/genesis_pb.d.ts rename to codegen/cosmos/group/v1/genesis_pb.d.ts diff --git a/proto/cosmos/group/v1/genesis_pb.js b/codegen/cosmos/group/v1/genesis_pb.js similarity index 100% rename from proto/cosmos/group/v1/genesis_pb.js rename to codegen/cosmos/group/v1/genesis_pb.js diff --git a/proto/cosmos/group/v1/genesis_pb_service.d.ts b/codegen/cosmos/group/v1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/group/v1/genesis_pb_service.d.ts rename to codegen/cosmos/group/v1/genesis_pb_service.d.ts diff --git a/proto/cosmos/group/v1/genesis_pb_service.js b/codegen/cosmos/group/v1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/group/v1/genesis_pb_service.js rename to codegen/cosmos/group/v1/genesis_pb_service.js diff --git a/codegen/cosmos/group/v1/query.ts b/codegen/cosmos/group/v1/query.ts new file mode 100644 index 0000000..fbd8378 --- /dev/null +++ b/codegen/cosmos/group/v1/query.ts @@ -0,0 +1,2590 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/group/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/api/annotations"; +import * as dependency_3 from "./types"; +import * as dependency_4 from "./../../base/query/v1beta1/pagination"; +import * as dependency_5 from "./../../../cosmos_proto/cosmos"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.group.v1 { + export class QueryGroupInfoRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + group_id?: number; + }): QueryGroupInfoRequest { + const message = new QueryGroupInfoRequest({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + return message; + } + toObject() { + const data: { + group_id?: number; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupInfoRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupInfoRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupInfoRequest { + return QueryGroupInfoRequest.deserialize(bytes); + } + } + export class QueryGroupInfoResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + info?: dependency_3.cosmos.group.v1.GroupInfo; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("info" in data && data.info != undefined) { + this.info = data.info; + } + } + } + get info() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.group.v1.GroupInfo, 1) as dependency_3.cosmos.group.v1.GroupInfo; + } + set info(value: dependency_3.cosmos.group.v1.GroupInfo) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_info() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + info?: ReturnType; + }): QueryGroupInfoResponse { + const message = new QueryGroupInfoResponse({}); + if (data.info != null) { + message.info = dependency_3.cosmos.group.v1.GroupInfo.fromObject(data.info); + } + return message; + } + toObject() { + const data: { + info?: ReturnType; + } = {}; + if (this.info != null) { + data.info = this.info.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_info) + writer.writeMessage(1, this.info, () => this.info.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupInfoResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupInfoResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.info, () => message.info = dependency_3.cosmos.group.v1.GroupInfo.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupInfoResponse { + return QueryGroupInfoResponse.deserialize(bytes); + } + } + export class QueryGroupPolicyInfoRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): QueryGroupPolicyInfoRequest { + const message = new QueryGroupPolicyInfoRequest({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupPolicyInfoRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupPolicyInfoRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupPolicyInfoRequest { + return QueryGroupPolicyInfoRequest.deserialize(bytes); + } + } + export class QueryGroupPolicyInfoResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + info?: dependency_3.cosmos.group.v1.GroupPolicyInfo; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("info" in data && data.info != undefined) { + this.info = data.info; + } + } + } + get info() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.group.v1.GroupPolicyInfo, 1) as dependency_3.cosmos.group.v1.GroupPolicyInfo; + } + set info(value: dependency_3.cosmos.group.v1.GroupPolicyInfo) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_info() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + info?: ReturnType; + }): QueryGroupPolicyInfoResponse { + const message = new QueryGroupPolicyInfoResponse({}); + if (data.info != null) { + message.info = dependency_3.cosmos.group.v1.GroupPolicyInfo.fromObject(data.info); + } + return message; + } + toObject() { + const data: { + info?: ReturnType; + } = {}; + if (this.info != null) { + data.info = this.info.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_info) + writer.writeMessage(1, this.info, () => this.info.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupPolicyInfoResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupPolicyInfoResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.info, () => message.info = dependency_3.cosmos.group.v1.GroupPolicyInfo.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupPolicyInfoResponse { + return QueryGroupPolicyInfoResponse.deserialize(bytes); + } + } + export class QueryGroupMembersRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + pagination?: dependency_4.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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + group_id?: number; + pagination?: ReturnType; + }): QueryGroupMembersRequest { + const message = new QueryGroupMembersRequest({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + group_id?: number; + pagination?: ReturnType; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + 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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupMembersRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupMembersRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupMembersRequest { + return QueryGroupMembersRequest.deserialize(bytes); + } + } + export class QueryGroupMembersResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + members?: dependency_3.cosmos.group.v1.GroupMember[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("members" in data && data.members != undefined) { + this.members = data.members; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get members() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.group.v1.GroupMember, 1) as dependency_3.cosmos.group.v1.GroupMember[]; + } + set members(value: dependency_3.cosmos.group.v1.GroupMember[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + members?: ReturnType[]; + pagination?: ReturnType; + }): QueryGroupMembersResponse { + const message = new QueryGroupMembersResponse({}); + if (data.members != null) { + message.members = data.members.map(item => dependency_3.cosmos.group.v1.GroupMember.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + members?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.members != null) { + data.members = this.members.map((item: dependency_3.cosmos.group.v1.GroupMember) => item.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.members.length) + writer.writeRepeatedMessage(1, this.members, (item: dependency_3.cosmos.group.v1.GroupMember) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupMembersResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupMembersResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.members, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.group.v1.GroupMember.deserialize(reader), dependency_3.cosmos.group.v1.GroupMember)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupMembersResponse { + return QueryGroupMembersResponse.deserialize(bytes); + } + } + export class QueryGroupsByAdminRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + pagination?: dependency_4.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 ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + admin?: string; + pagination?: ReturnType; + }): QueryGroupsByAdminRequest { + const message = new QueryGroupsByAdminRequest({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + admin?: string; + pagination?: ReturnType; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + 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.admin.length) + writer.writeString(1, this.admin); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupsByAdminRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupsByAdminRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupsByAdminRequest { + return QueryGroupsByAdminRequest.deserialize(bytes); + } + } + export class QueryGroupsByAdminResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + groups?: dependency_3.cosmos.group.v1.GroupInfo[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("groups" in data && data.groups != undefined) { + this.groups = data.groups; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get groups() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.group.v1.GroupInfo, 1) as dependency_3.cosmos.group.v1.GroupInfo[]; + } + set groups(value: dependency_3.cosmos.group.v1.GroupInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + groups?: ReturnType[]; + pagination?: ReturnType; + }): QueryGroupsByAdminResponse { + const message = new QueryGroupsByAdminResponse({}); + if (data.groups != null) { + message.groups = data.groups.map(item => dependency_3.cosmos.group.v1.GroupInfo.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + groups?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.groups != null) { + data.groups = this.groups.map((item: dependency_3.cosmos.group.v1.GroupInfo) => item.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.groups.length) + writer.writeRepeatedMessage(1, this.groups, (item: dependency_3.cosmos.group.v1.GroupInfo) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupsByAdminResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupsByAdminResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.groups, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.group.v1.GroupInfo.deserialize(reader), dependency_3.cosmos.group.v1.GroupInfo)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupsByAdminResponse { + return QueryGroupsByAdminResponse.deserialize(bytes); + } + } + export class QueryGroupPoliciesByGroupRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + pagination?: dependency_4.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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + group_id?: number; + pagination?: ReturnType; + }): QueryGroupPoliciesByGroupRequest { + const message = new QueryGroupPoliciesByGroupRequest({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + group_id?: number; + pagination?: ReturnType; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + 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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupPoliciesByGroupRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupPoliciesByGroupRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupPoliciesByGroupRequest { + return QueryGroupPoliciesByGroupRequest.deserialize(bytes); + } + } + export class QueryGroupPoliciesByGroupResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_policies?: dependency_3.cosmos.group.v1.GroupPolicyInfo[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("group_policies" in data && data.group_policies != undefined) { + this.group_policies = data.group_policies; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get group_policies() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.group.v1.GroupPolicyInfo, 1) as dependency_3.cosmos.group.v1.GroupPolicyInfo[]; + } + set group_policies(value: dependency_3.cosmos.group.v1.GroupPolicyInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + group_policies?: ReturnType[]; + pagination?: ReturnType; + }): QueryGroupPoliciesByGroupResponse { + const message = new QueryGroupPoliciesByGroupResponse({}); + if (data.group_policies != null) { + message.group_policies = data.group_policies.map(item => dependency_3.cosmos.group.v1.GroupPolicyInfo.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + group_policies?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.group_policies != null) { + data.group_policies = this.group_policies.map((item: dependency_3.cosmos.group.v1.GroupPolicyInfo) => item.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.group_policies.length) + writer.writeRepeatedMessage(1, this.group_policies, (item: dependency_3.cosmos.group.v1.GroupPolicyInfo) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupPoliciesByGroupResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupPoliciesByGroupResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.group_policies, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.group.v1.GroupPolicyInfo.deserialize(reader), dependency_3.cosmos.group.v1.GroupPolicyInfo)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupPoliciesByGroupResponse { + return QueryGroupPoliciesByGroupResponse.deserialize(bytes); + } + } + export class QueryGroupPoliciesByAdminRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + pagination?: dependency_4.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 ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + admin?: string; + pagination?: ReturnType; + }): QueryGroupPoliciesByAdminRequest { + const message = new QueryGroupPoliciesByAdminRequest({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + admin?: string; + pagination?: ReturnType; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + 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.admin.length) + writer.writeString(1, this.admin); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupPoliciesByAdminRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupPoliciesByAdminRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupPoliciesByAdminRequest { + return QueryGroupPoliciesByAdminRequest.deserialize(bytes); + } + } + export class QueryGroupPoliciesByAdminResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_policies?: dependency_3.cosmos.group.v1.GroupPolicyInfo[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("group_policies" in data && data.group_policies != undefined) { + this.group_policies = data.group_policies; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get group_policies() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.group.v1.GroupPolicyInfo, 1) as dependency_3.cosmos.group.v1.GroupPolicyInfo[]; + } + set group_policies(value: dependency_3.cosmos.group.v1.GroupPolicyInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + group_policies?: ReturnType[]; + pagination?: ReturnType; + }): QueryGroupPoliciesByAdminResponse { + const message = new QueryGroupPoliciesByAdminResponse({}); + if (data.group_policies != null) { + message.group_policies = data.group_policies.map(item => dependency_3.cosmos.group.v1.GroupPolicyInfo.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + group_policies?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.group_policies != null) { + data.group_policies = this.group_policies.map((item: dependency_3.cosmos.group.v1.GroupPolicyInfo) => item.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.group_policies.length) + writer.writeRepeatedMessage(1, this.group_policies, (item: dependency_3.cosmos.group.v1.GroupPolicyInfo) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupPoliciesByAdminResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupPoliciesByAdminResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.group_policies, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.group.v1.GroupPolicyInfo.deserialize(reader), dependency_3.cosmos.group.v1.GroupPolicyInfo)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupPoliciesByAdminResponse { + return QueryGroupPoliciesByAdminResponse.deserialize(bytes); + } + } + export class QueryProposalRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): QueryProposalRequest { + const message = new QueryProposalRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalRequest { + return QueryProposalRequest.deserialize(bytes); + } + } + export class QueryProposalResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal?: dependency_3.cosmos.group.v1.Proposal; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal" in data && data.proposal != undefined) { + this.proposal = data.proposal; + } + } + } + get proposal() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.group.v1.Proposal, 1) as dependency_3.cosmos.group.v1.Proposal; + } + set proposal(value: dependency_3.cosmos.group.v1.Proposal) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_proposal() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + proposal?: ReturnType; + }): QueryProposalResponse { + const message = new QueryProposalResponse({}); + if (data.proposal != null) { + message.proposal = dependency_3.cosmos.group.v1.Proposal.fromObject(data.proposal); + } + return message; + } + toObject() { + const data: { + proposal?: ReturnType; + } = {}; + if (this.proposal != null) { + data.proposal = this.proposal.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_proposal) + writer.writeMessage(1, this.proposal, () => this.proposal.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proposal, () => message.proposal = dependency_3.cosmos.group.v1.Proposal.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalResponse { + return QueryProposalResponse.deserialize(bytes); + } + } + export class QueryProposalsByGroupPolicyRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + pagination?: dependency_4.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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + address?: string; + pagination?: ReturnType; + }): QueryProposalsByGroupPolicyRequest { + const message = new QueryProposalsByGroupPolicyRequest({}); + if (data.address != null) { + message.address = data.address; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + address?: string; + pagination?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalsByGroupPolicyRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalsByGroupPolicyRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalsByGroupPolicyRequest { + return QueryProposalsByGroupPolicyRequest.deserialize(bytes); + } + } + export class QueryProposalsByGroupPolicyResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposals?: dependency_3.cosmos.group.v1.Proposal[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("proposals" in data && data.proposals != undefined) { + this.proposals = data.proposals; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposals() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.group.v1.Proposal, 1) as dependency_3.cosmos.group.v1.Proposal[]; + } + set proposals(value: dependency_3.cosmos.group.v1.Proposal[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + proposals?: ReturnType[]; + pagination?: ReturnType; + }): QueryProposalsByGroupPolicyResponse { + const message = new QueryProposalsByGroupPolicyResponse({}); + if (data.proposals != null) { + message.proposals = data.proposals.map(item => dependency_3.cosmos.group.v1.Proposal.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposals?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.proposals != null) { + data.proposals = this.proposals.map((item: dependency_3.cosmos.group.v1.Proposal) => item.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.proposals.length) + writer.writeRepeatedMessage(1, this.proposals, (item: dependency_3.cosmos.group.v1.Proposal) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryProposalsByGroupPolicyResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryProposalsByGroupPolicyResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proposals, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.group.v1.Proposal.deserialize(reader), dependency_3.cosmos.group.v1.Proposal)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryProposalsByGroupPolicyResponse { + return QueryProposalsByGroupPolicyResponse.deserialize(bytes); + } + } + export class QueryVoteByProposalVoterRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + }): QueryVoteByProposalVoterRequest { + const message = new QueryVoteByProposalVoterRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVoteByProposalVoterRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVoteByProposalVoterRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVoteByProposalVoterRequest { + return QueryVoteByProposalVoterRequest.deserialize(bytes); + } + } + export class QueryVoteByProposalVoterResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vote?: dependency_3.cosmos.group.v1.Vote; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("vote" in data && data.vote != undefined) { + this.vote = data.vote; + } + } + } + get vote() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.group.v1.Vote, 1) as dependency_3.cosmos.group.v1.Vote; + } + set vote(value: dependency_3.cosmos.group.v1.Vote) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_vote() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + vote?: ReturnType; + }): QueryVoteByProposalVoterResponse { + const message = new QueryVoteByProposalVoterResponse({}); + if (data.vote != null) { + message.vote = dependency_3.cosmos.group.v1.Vote.fromObject(data.vote); + } + return message; + } + toObject() { + const data: { + vote?: ReturnType; + } = {}; + if (this.vote != null) { + data.vote = this.vote.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_vote) + writer.writeMessage(1, this.vote, () => this.vote.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVoteByProposalVoterResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVoteByProposalVoterResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.vote, () => message.vote = dependency_3.cosmos.group.v1.Vote.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVoteByProposalVoterResponse { + return QueryVoteByProposalVoterResponse.deserialize(bytes); + } + } + export class QueryVotesByProposalRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + pagination?: dependency_4.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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + proposal_id?: number; + pagination?: ReturnType; + }): QueryVotesByProposalRequest { + const message = new QueryVotesByProposalRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + pagination?: ReturnType; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVotesByProposalRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVotesByProposalRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVotesByProposalRequest { + return QueryVotesByProposalRequest.deserialize(bytes); + } + } + export class QueryVotesByProposalResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + votes?: dependency_3.cosmos.group.v1.Vote[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.group.v1.Vote, 1) as dependency_3.cosmos.group.v1.Vote[]; + } + set votes(value: dependency_3.cosmos.group.v1.Vote[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + votes?: ReturnType[]; + pagination?: ReturnType; + }): QueryVotesByProposalResponse { + const message = new QueryVotesByProposalResponse({}); + if (data.votes != null) { + message.votes = data.votes.map(item => dependency_3.cosmos.group.v1.Vote.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + votes?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.votes != null) { + data.votes = this.votes.map((item: dependency_3.cosmos.group.v1.Vote) => item.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.votes.length) + writer.writeRepeatedMessage(1, this.votes, (item: dependency_3.cosmos.group.v1.Vote) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVotesByProposalResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVotesByProposalResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.group.v1.Vote.deserialize(reader), dependency_3.cosmos.group.v1.Vote)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVotesByProposalResponse { + return QueryVotesByProposalResponse.deserialize(bytes); + } + } + export class QueryVotesByVoterRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + voter?: string; + pagination?: dependency_4.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 ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + voter?: string; + pagination?: ReturnType; + }): QueryVotesByVoterRequest { + const message = new QueryVotesByVoterRequest({}); + if (data.voter != null) { + message.voter = data.voter; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + voter?: string; + pagination?: ReturnType; + } = {}; + if (this.voter != null) { + data.voter = this.voter; + } + 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.voter.length) + writer.writeString(1, this.voter); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVotesByVoterRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVotesByVoterRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.voter = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVotesByVoterRequest { + return QueryVotesByVoterRequest.deserialize(bytes); + } + } + export class QueryVotesByVoterResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + votes?: dependency_3.cosmos.group.v1.Vote[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.group.v1.Vote, 1) as dependency_3.cosmos.group.v1.Vote[]; + } + set votes(value: dependency_3.cosmos.group.v1.Vote[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + votes?: ReturnType[]; + pagination?: ReturnType; + }): QueryVotesByVoterResponse { + const message = new QueryVotesByVoterResponse({}); + if (data.votes != null) { + message.votes = data.votes.map(item => dependency_3.cosmos.group.v1.Vote.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + votes?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.votes != null) { + data.votes = this.votes.map((item: dependency_3.cosmos.group.v1.Vote) => item.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.votes.length) + writer.writeRepeatedMessage(1, this.votes, (item: dependency_3.cosmos.group.v1.Vote) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVotesByVoterResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVotesByVoterResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.group.v1.Vote.deserialize(reader), dependency_3.cosmos.group.v1.Vote)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVotesByVoterResponse { + return QueryVotesByVoterResponse.deserialize(bytes); + } + } + export class QueryGroupsByMemberRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + pagination?: dependency_4.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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + address?: string; + pagination?: ReturnType; + }): QueryGroupsByMemberRequest { + const message = new QueryGroupsByMemberRequest({}); + if (data.address != null) { + message.address = data.address; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + address?: string; + pagination?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupsByMemberRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupsByMemberRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupsByMemberRequest { + return QueryGroupsByMemberRequest.deserialize(bytes); + } + } + export class QueryGroupsByMemberResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + groups?: dependency_3.cosmos.group.v1.GroupInfo[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("groups" in data && data.groups != undefined) { + this.groups = data.groups; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get groups() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.group.v1.GroupInfo, 1) as dependency_3.cosmos.group.v1.GroupInfo[]; + } + set groups(value: dependency_3.cosmos.group.v1.GroupInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + groups?: ReturnType[]; + pagination?: ReturnType; + }): QueryGroupsByMemberResponse { + const message = new QueryGroupsByMemberResponse({}); + if (data.groups != null) { + message.groups = data.groups.map(item => dependency_3.cosmos.group.v1.GroupInfo.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + groups?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.groups != null) { + data.groups = this.groups.map((item: dependency_3.cosmos.group.v1.GroupInfo) => item.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.groups.length) + writer.writeRepeatedMessage(1, this.groups, (item: dependency_3.cosmos.group.v1.GroupInfo) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupsByMemberResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupsByMemberResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.groups, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.group.v1.GroupInfo.deserialize(reader), dependency_3.cosmos.group.v1.GroupInfo)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupsByMemberResponse { + return QueryGroupsByMemberResponse.deserialize(bytes); + } + } + export class QueryTallyResultRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): QueryTallyResultRequest { + const message = new QueryTallyResultRequest({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTallyResultRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTallyResultRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTallyResultRequest { + return QueryTallyResultRequest.deserialize(bytes); + } + } + export class QueryTallyResultResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tally?: dependency_3.cosmos.group.v1.TallyResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tally" in data && data.tally != undefined) { + this.tally = data.tally; + } + } + } + get tally() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.group.v1.TallyResult, 1) as dependency_3.cosmos.group.v1.TallyResult; + } + set tally(value: dependency_3.cosmos.group.v1.TallyResult) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tally() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + tally?: ReturnType; + }): QueryTallyResultResponse { + const message = new QueryTallyResultResponse({}); + if (data.tally != null) { + message.tally = dependency_3.cosmos.group.v1.TallyResult.fromObject(data.tally); + } + return message; + } + toObject() { + const data: { + tally?: ReturnType; + } = {}; + if (this.tally != null) { + data.tally = this.tally.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_tally) + writer.writeMessage(1, this.tally, () => this.tally.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTallyResultResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTallyResultResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tally, () => message.tally = dependency_3.cosmos.group.v1.TallyResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTallyResultResponse { + return QueryTallyResultResponse.deserialize(bytes); + } + } + export class QueryGroupsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_4.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_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + pagination?: ReturnType; + }): QueryGroupsRequest { + const message = new QueryGroupsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupsRequest { + return QueryGroupsRequest.deserialize(bytes); + } + } + export class QueryGroupsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + groups?: dependency_3.cosmos.group.v1.GroupInfo[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("groups" in data && data.groups != undefined) { + this.groups = data.groups; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get groups() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.group.v1.GroupInfo, 1) as dependency_3.cosmos.group.v1.GroupInfo[]; + } + set groups(value: dependency_3.cosmos.group.v1.GroupInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + groups?: ReturnType[]; + pagination?: ReturnType; + }): QueryGroupsResponse { + const message = new QueryGroupsResponse({}); + if (data.groups != null) { + message.groups = data.groups.map(item => dependency_3.cosmos.group.v1.GroupInfo.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + groups?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.groups != null) { + data.groups = this.groups.map((item: dependency_3.cosmos.group.v1.GroupInfo) => item.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.groups.length) + writer.writeRepeatedMessage(1, this.groups, (item: dependency_3.cosmos.group.v1.GroupInfo) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGroupsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGroupsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.groups, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.group.v1.GroupInfo.deserialize(reader), dependency_3.cosmos.group.v1.GroupInfo)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryGroupsResponse { + return QueryGroupsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + GroupInfo: { + path: "/cosmos.group.v1.Query/GroupInfo", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupInfoRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupInfoRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupInfoResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupInfoResponse.deserialize(new Uint8Array(bytes)) + }, + GroupPolicyInfo: { + path: "/cosmos.group.v1.Query/GroupPolicyInfo", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupPolicyInfoRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupPolicyInfoRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupPolicyInfoResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupPolicyInfoResponse.deserialize(new Uint8Array(bytes)) + }, + GroupMembers: { + path: "/cosmos.group.v1.Query/GroupMembers", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupMembersRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupMembersRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupMembersResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupMembersResponse.deserialize(new Uint8Array(bytes)) + }, + GroupsByAdmin: { + path: "/cosmos.group.v1.Query/GroupsByAdmin", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupsByAdminRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupsByAdminRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupsByAdminResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupsByAdminResponse.deserialize(new Uint8Array(bytes)) + }, + GroupPoliciesByGroup: { + path: "/cosmos.group.v1.Query/GroupPoliciesByGroup", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupPoliciesByGroupRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupPoliciesByGroupRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupPoliciesByGroupResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupPoliciesByGroupResponse.deserialize(new Uint8Array(bytes)) + }, + GroupPoliciesByAdmin: { + path: "/cosmos.group.v1.Query/GroupPoliciesByAdmin", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupPoliciesByAdminRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupPoliciesByAdminRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupPoliciesByAdminResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupPoliciesByAdminResponse.deserialize(new Uint8Array(bytes)) + }, + Proposal: { + path: "/cosmos.group.v1.Query/Proposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryProposalRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryProposalRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryProposalResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryProposalResponse.deserialize(new Uint8Array(bytes)) + }, + ProposalsByGroupPolicy: { + path: "/cosmos.group.v1.Query/ProposalsByGroupPolicy", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryProposalsByGroupPolicyRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryProposalsByGroupPolicyRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryProposalsByGroupPolicyResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryProposalsByGroupPolicyResponse.deserialize(new Uint8Array(bytes)) + }, + VoteByProposalVoter: { + path: "/cosmos.group.v1.Query/VoteByProposalVoter", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVoteByProposalVoterRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVoteByProposalVoterRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVoteByProposalVoterResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVoteByProposalVoterResponse.deserialize(new Uint8Array(bytes)) + }, + VotesByProposal: { + path: "/cosmos.group.v1.Query/VotesByProposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVotesByProposalRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVotesByProposalRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVotesByProposalResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVotesByProposalResponse.deserialize(new Uint8Array(bytes)) + }, + VotesByVoter: { + path: "/cosmos.group.v1.Query/VotesByVoter", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVotesByVoterRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVotesByVoterRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVotesByVoterResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVotesByVoterResponse.deserialize(new Uint8Array(bytes)) + }, + GroupsByMember: { + path: "/cosmos.group.v1.Query/GroupsByMember", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupsByMemberRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupsByMemberRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupsByMemberResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupsByMemberResponse.deserialize(new Uint8Array(bytes)) + }, + TallyResult: { + path: "/cosmos.group.v1.Query/TallyResult", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTallyResultRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTallyResultRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTallyResultResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTallyResultResponse.deserialize(new Uint8Array(bytes)) + }, + Groups: { + path: "/cosmos.group.v1.Query/Groups", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryGroupsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryGroupsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryGroupsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryGroupsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GroupInfo(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GroupPolicyInfo(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GroupMembers(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GroupsByAdmin(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GroupPoliciesByGroup(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GroupPoliciesByAdmin(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Proposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ProposalsByGroupPolicy(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VoteByProposalVoter(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VotesByProposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VotesByVoter(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GroupsByMember(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TallyResult(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Groups(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GroupInfo: GrpcUnaryServiceInterface = (message: QueryGroupInfoRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GroupInfo(message, metadata, options, callback); + }; + GroupPolicyInfo: GrpcUnaryServiceInterface = (message: QueryGroupPolicyInfoRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GroupPolicyInfo(message, metadata, options, callback); + }; + GroupMembers: GrpcUnaryServiceInterface = (message: QueryGroupMembersRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GroupMembers(message, metadata, options, callback); + }; + GroupsByAdmin: GrpcUnaryServiceInterface = (message: QueryGroupsByAdminRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GroupsByAdmin(message, metadata, options, callback); + }; + GroupPoliciesByGroup: GrpcUnaryServiceInterface = (message: QueryGroupPoliciesByGroupRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GroupPoliciesByGroup(message, metadata, options, callback); + }; + GroupPoliciesByAdmin: GrpcUnaryServiceInterface = (message: QueryGroupPoliciesByAdminRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GroupPoliciesByAdmin(message, metadata, options, callback); + }; + Proposal: GrpcUnaryServiceInterface = (message: QueryProposalRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Proposal(message, metadata, options, callback); + }; + ProposalsByGroupPolicy: GrpcUnaryServiceInterface = (message: QueryProposalsByGroupPolicyRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ProposalsByGroupPolicy(message, metadata, options, callback); + }; + VoteByProposalVoter: GrpcUnaryServiceInterface = (message: QueryVoteByProposalVoterRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VoteByProposalVoter(message, metadata, options, callback); + }; + VotesByProposal: GrpcUnaryServiceInterface = (message: QueryVotesByProposalRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VotesByProposal(message, metadata, options, callback); + }; + VotesByVoter: GrpcUnaryServiceInterface = (message: QueryVotesByVoterRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VotesByVoter(message, metadata, options, callback); + }; + GroupsByMember: GrpcUnaryServiceInterface = (message: QueryGroupsByMemberRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GroupsByMember(message, metadata, options, callback); + }; + TallyResult: GrpcUnaryServiceInterface = (message: QueryTallyResultRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TallyResult(message, metadata, options, callback); + }; + Groups: GrpcUnaryServiceInterface = (message: QueryGroupsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Groups(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/group/v1/query_pb.d.ts b/codegen/cosmos/group/v1/query_pb.d.ts similarity index 100% rename from proto/cosmos/group/v1/query_pb.d.ts rename to codegen/cosmos/group/v1/query_pb.d.ts diff --git a/proto/cosmos/group/v1/query_pb.js b/codegen/cosmos/group/v1/query_pb.js similarity index 100% rename from proto/cosmos/group/v1/query_pb.js rename to codegen/cosmos/group/v1/query_pb.js diff --git a/proto/cosmos/group/v1/query_pb_service.d.ts b/codegen/cosmos/group/v1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/group/v1/query_pb_service.d.ts rename to codegen/cosmos/group/v1/query_pb_service.d.ts diff --git a/proto/cosmos/group/v1/query_pb_service.js b/codegen/cosmos/group/v1/query_pb_service.js similarity index 100% rename from proto/cosmos/group/v1/query_pb_service.js rename to codegen/cosmos/group/v1/query_pb_service.js diff --git a/codegen/cosmos/group/v1/tx.ts b/codegen/cosmos/group/v1/tx.ts new file mode 100644 index 0000000..9d5a1a2 --- /dev/null +++ b/codegen/cosmos/group/v1/tx.ts @@ -0,0 +1,2705 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/group/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../../google/protobuf/any"; +import * as dependency_4 from "./types"; +import * as dependency_5 from "./../../msg/v1/msg"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.group.v1 { + export enum Exec { + EXEC_UNSPECIFIED = 0, + EXEC_TRY = 1 + } + export class MsgCreateGroup extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + members?: dependency_4.cosmos.group.v1.MemberRequest[]; + metadata?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("members" in data && data.members != undefined) { + this.members = data.members; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get members() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.group.v1.MemberRequest, 2) as dependency_4.cosmos.group.v1.MemberRequest[]; + } + set members(value: dependency_4.cosmos.group.v1.MemberRequest[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + admin?: string; + members?: ReturnType[]; + metadata?: string; + }): MsgCreateGroup { + const message = new MsgCreateGroup({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.members != null) { + message.members = data.members.map(item => dependency_4.cosmos.group.v1.MemberRequest.fromObject(item)); + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + return message; + } + toObject() { + const data: { + admin?: string; + members?: ReturnType[]; + metadata?: string; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.members != null) { + data.members = this.members.map((item: dependency_4.cosmos.group.v1.MemberRequest) => item.toObject()); + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + 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.admin.length) + writer.writeString(1, this.admin); + if (this.members.length) + writer.writeRepeatedMessage(2, this.members, (item: dependency_4.cosmos.group.v1.MemberRequest) => item.serialize(writer)); + if (this.metadata.length) + writer.writeString(3, this.metadata); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateGroup { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateGroup(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + reader.readMessage(message.members, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.cosmos.group.v1.MemberRequest.deserialize(reader), dependency_4.cosmos.group.v1.MemberRequest)); + break; + case 3: + message.metadata = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateGroup { + return MsgCreateGroup.deserialize(bytes); + } + } + export class MsgCreateGroupResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + group_id?: number; + }): MsgCreateGroupResponse { + const message = new MsgCreateGroupResponse({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + return message; + } + toObject() { + const data: { + group_id?: number; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateGroupResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateGroupResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateGroupResponse { + return MsgCreateGroupResponse.deserialize(bytes); + } + } + export class MsgUpdateGroupMembers extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + group_id?: number; + member_updates?: dependency_4.cosmos.group.v1.MemberRequest[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("member_updates" in data && data.member_updates != undefined) { + this.member_updates = data.member_updates; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get member_updates() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.group.v1.MemberRequest, 3) as dependency_4.cosmos.group.v1.MemberRequest[]; + } + set member_updates(value: dependency_4.cosmos.group.v1.MemberRequest[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + admin?: string; + group_id?: number; + member_updates?: ReturnType[]; + }): MsgUpdateGroupMembers { + const message = new MsgUpdateGroupMembers({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.member_updates != null) { + message.member_updates = data.member_updates.map(item => dependency_4.cosmos.group.v1.MemberRequest.fromObject(item)); + } + return message; + } + toObject() { + const data: { + admin?: string; + group_id?: number; + member_updates?: ReturnType[]; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.member_updates != null) { + data.member_updates = this.member_updates.map((item: dependency_4.cosmos.group.v1.MemberRequest) => item.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.admin.length) + writer.writeString(1, this.admin); + if (this.group_id != 0) + writer.writeUint64(2, this.group_id); + if (this.member_updates.length) + writer.writeRepeatedMessage(3, this.member_updates, (item: dependency_4.cosmos.group.v1.MemberRequest) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateGroupMembers { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupMembers(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + message.group_id = reader.readUint64(); + break; + case 3: + reader.readMessage(message.member_updates, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_4.cosmos.group.v1.MemberRequest.deserialize(reader), dependency_4.cosmos.group.v1.MemberRequest)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupMembers { + return MsgUpdateGroupMembers.deserialize(bytes); + } + } + export class MsgUpdateGroupMembersResponse 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: {}): MsgUpdateGroupMembersResponse { + const message = new MsgUpdateGroupMembersResponse({}); + 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): MsgUpdateGroupMembersResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupMembersResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupMembersResponse { + return MsgUpdateGroupMembersResponse.deserialize(bytes); + } + } + export class MsgUpdateGroupAdmin extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + group_id?: number; + new_admin?: 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 ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("new_admin" in data && data.new_admin != undefined) { + this.new_admin = data.new_admin; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get new_admin() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set new_admin(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + admin?: string; + group_id?: number; + new_admin?: string; + }): MsgUpdateGroupAdmin { + const message = new MsgUpdateGroupAdmin({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.new_admin != null) { + message.new_admin = data.new_admin; + } + return message; + } + toObject() { + const data: { + admin?: string; + group_id?: number; + new_admin?: string; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.new_admin != null) { + data.new_admin = this.new_admin; + } + 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.admin.length) + writer.writeString(1, this.admin); + if (this.group_id != 0) + writer.writeUint64(2, this.group_id); + if (this.new_admin.length) + writer.writeString(3, this.new_admin); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateGroupAdmin { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupAdmin(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + message.group_id = reader.readUint64(); + break; + case 3: + message.new_admin = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupAdmin { + return MsgUpdateGroupAdmin.deserialize(bytes); + } + } + export class MsgUpdateGroupAdminResponse 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: {}): MsgUpdateGroupAdminResponse { + const message = new MsgUpdateGroupAdminResponse({}); + 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): MsgUpdateGroupAdminResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupAdminResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupAdminResponse { + return MsgUpdateGroupAdminResponse.deserialize(bytes); + } + } + export class MsgUpdateGroupMetadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + group_id?: number; + metadata?: 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 ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + admin?: string; + group_id?: number; + metadata?: string; + }): MsgUpdateGroupMetadata { + const message = new MsgUpdateGroupMetadata({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + return message; + } + toObject() { + const data: { + admin?: string; + group_id?: number; + metadata?: string; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + 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.admin.length) + writer.writeString(1, this.admin); + if (this.group_id != 0) + writer.writeUint64(2, this.group_id); + if (this.metadata.length) + writer.writeString(3, this.metadata); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateGroupMetadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupMetadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + message.group_id = reader.readUint64(); + break; + case 3: + message.metadata = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupMetadata { + return MsgUpdateGroupMetadata.deserialize(bytes); + } + } + export class MsgUpdateGroupMetadataResponse 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: {}): MsgUpdateGroupMetadataResponse { + const message = new MsgUpdateGroupMetadataResponse({}); + 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): MsgUpdateGroupMetadataResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupMetadataResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupMetadataResponse { + return MsgUpdateGroupMetadataResponse.deserialize(bytes); + } + } + export class MsgCreateGroupPolicy extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + group_id?: number; + metadata?: string; + decision_policy?: dependency_3.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("decision_policy" in data && data.decision_policy != undefined) { + this.decision_policy = data.decision_policy; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + get decision_policy() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Any, 4) as dependency_3.google.protobuf.Any; + } + set decision_policy(value: dependency_3.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_decision_policy() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + admin?: string; + group_id?: number; + metadata?: string; + decision_policy?: ReturnType; + }): MsgCreateGroupPolicy { + const message = new MsgCreateGroupPolicy({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.decision_policy != null) { + message.decision_policy = dependency_3.google.protobuf.Any.fromObject(data.decision_policy); + } + return message; + } + toObject() { + const data: { + admin?: string; + group_id?: number; + metadata?: string; + decision_policy?: ReturnType; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.decision_policy != null) { + data.decision_policy = this.decision_policy.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.admin.length) + writer.writeString(1, this.admin); + if (this.group_id != 0) + writer.writeUint64(2, this.group_id); + if (this.metadata.length) + writer.writeString(3, this.metadata); + if (this.has_decision_policy) + writer.writeMessage(4, this.decision_policy, () => this.decision_policy.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateGroupPolicy { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateGroupPolicy(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + message.group_id = reader.readUint64(); + break; + case 3: + message.metadata = reader.readString(); + break; + case 4: + reader.readMessage(message.decision_policy, () => message.decision_policy = dependency_3.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateGroupPolicy { + return MsgCreateGroupPolicy.deserialize(bytes); + } + } + export class MsgCreateGroupPolicyResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): MsgCreateGroupPolicyResponse { + const message = new MsgCreateGroupPolicyResponse({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateGroupPolicyResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateGroupPolicyResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateGroupPolicyResponse { + return MsgCreateGroupPolicyResponse.deserialize(bytes); + } + } + export class MsgUpdateGroupPolicyAdmin extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + group_policy_address?: string; + new_admin?: 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 ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("group_policy_address" in data && data.group_policy_address != undefined) { + this.group_policy_address = data.group_policy_address; + } + if ("new_admin" in data && data.new_admin != undefined) { + this.new_admin = data.new_admin; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_policy_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set group_policy_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get new_admin() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set new_admin(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + admin?: string; + group_policy_address?: string; + new_admin?: string; + }): MsgUpdateGroupPolicyAdmin { + const message = new MsgUpdateGroupPolicyAdmin({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.group_policy_address != null) { + message.group_policy_address = data.group_policy_address; + } + if (data.new_admin != null) { + message.new_admin = data.new_admin; + } + return message; + } + toObject() { + const data: { + admin?: string; + group_policy_address?: string; + new_admin?: string; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.group_policy_address != null) { + data.group_policy_address = this.group_policy_address; + } + if (this.new_admin != null) { + data.new_admin = this.new_admin; + } + 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.admin.length) + writer.writeString(1, this.admin); + if (this.group_policy_address.length) + writer.writeString(2, this.group_policy_address); + if (this.new_admin.length) + writer.writeString(3, this.new_admin); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateGroupPolicyAdmin { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupPolicyAdmin(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + message.group_policy_address = reader.readString(); + break; + case 3: + message.new_admin = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupPolicyAdmin { + return MsgUpdateGroupPolicyAdmin.deserialize(bytes); + } + } + export class MsgUpdateGroupPolicyAdminResponse 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: {}): MsgUpdateGroupPolicyAdminResponse { + const message = new MsgUpdateGroupPolicyAdminResponse({}); + 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): MsgUpdateGroupPolicyAdminResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupPolicyAdminResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupPolicyAdminResponse { + return MsgUpdateGroupPolicyAdminResponse.deserialize(bytes); + } + } + export class MsgCreateGroupWithPolicy extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + members?: dependency_4.cosmos.group.v1.MemberRequest[]; + group_metadata?: string; + group_policy_metadata?: string; + group_policy_as_admin?: boolean; + decision_policy?: dependency_3.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("members" in data && data.members != undefined) { + this.members = data.members; + } + if ("group_metadata" in data && data.group_metadata != undefined) { + this.group_metadata = data.group_metadata; + } + if ("group_policy_metadata" in data && data.group_policy_metadata != undefined) { + this.group_policy_metadata = data.group_policy_metadata; + } + if ("group_policy_as_admin" in data && data.group_policy_as_admin != undefined) { + this.group_policy_as_admin = data.group_policy_as_admin; + } + if ("decision_policy" in data && data.decision_policy != undefined) { + this.decision_policy = data.decision_policy; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get members() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.group.v1.MemberRequest, 2) as dependency_4.cosmos.group.v1.MemberRequest[]; + } + set members(value: dependency_4.cosmos.group.v1.MemberRequest[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get group_metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set group_metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + get group_policy_metadata() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set group_policy_metadata(value: string) { + pb_1.Message.setField(this, 4, value); + } + get group_policy_as_admin() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set group_policy_as_admin(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + get decision_policy() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Any, 6) as dependency_3.google.protobuf.Any; + } + set decision_policy(value: dependency_3.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_decision_policy() { + return pb_1.Message.getField(this, 6) != null; + } + static fromObject(data: { + admin?: string; + members?: ReturnType[]; + group_metadata?: string; + group_policy_metadata?: string; + group_policy_as_admin?: boolean; + decision_policy?: ReturnType; + }): MsgCreateGroupWithPolicy { + const message = new MsgCreateGroupWithPolicy({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.members != null) { + message.members = data.members.map(item => dependency_4.cosmos.group.v1.MemberRequest.fromObject(item)); + } + if (data.group_metadata != null) { + message.group_metadata = data.group_metadata; + } + if (data.group_policy_metadata != null) { + message.group_policy_metadata = data.group_policy_metadata; + } + if (data.group_policy_as_admin != null) { + message.group_policy_as_admin = data.group_policy_as_admin; + } + if (data.decision_policy != null) { + message.decision_policy = dependency_3.google.protobuf.Any.fromObject(data.decision_policy); + } + return message; + } + toObject() { + const data: { + admin?: string; + members?: ReturnType[]; + group_metadata?: string; + group_policy_metadata?: string; + group_policy_as_admin?: boolean; + decision_policy?: ReturnType; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.members != null) { + data.members = this.members.map((item: dependency_4.cosmos.group.v1.MemberRequest) => item.toObject()); + } + if (this.group_metadata != null) { + data.group_metadata = this.group_metadata; + } + if (this.group_policy_metadata != null) { + data.group_policy_metadata = this.group_policy_metadata; + } + if (this.group_policy_as_admin != null) { + data.group_policy_as_admin = this.group_policy_as_admin; + } + if (this.decision_policy != null) { + data.decision_policy = this.decision_policy.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.admin.length) + writer.writeString(1, this.admin); + if (this.members.length) + writer.writeRepeatedMessage(2, this.members, (item: dependency_4.cosmos.group.v1.MemberRequest) => item.serialize(writer)); + if (this.group_metadata.length) + writer.writeString(3, this.group_metadata); + if (this.group_policy_metadata.length) + writer.writeString(4, this.group_policy_metadata); + if (this.group_policy_as_admin != false) + writer.writeBool(5, this.group_policy_as_admin); + if (this.has_decision_policy) + writer.writeMessage(6, this.decision_policy, () => this.decision_policy.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateGroupWithPolicy { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateGroupWithPolicy(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + reader.readMessage(message.members, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_4.cosmos.group.v1.MemberRequest.deserialize(reader), dependency_4.cosmos.group.v1.MemberRequest)); + break; + case 3: + message.group_metadata = reader.readString(); + break; + case 4: + message.group_policy_metadata = reader.readString(); + break; + case 5: + message.group_policy_as_admin = reader.readBool(); + break; + case 6: + reader.readMessage(message.decision_policy, () => message.decision_policy = dependency_3.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateGroupWithPolicy { + return MsgCreateGroupWithPolicy.deserialize(bytes); + } + } + export class MsgCreateGroupWithPolicyResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + group_policy_address?: 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 ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("group_policy_address" in data && data.group_policy_address != undefined) { + this.group_policy_address = data.group_policy_address; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get group_policy_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set group_policy_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + group_id?: number; + group_policy_address?: string; + }): MsgCreateGroupWithPolicyResponse { + const message = new MsgCreateGroupWithPolicyResponse({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.group_policy_address != null) { + message.group_policy_address = data.group_policy_address; + } + return message; + } + toObject() { + const data: { + group_id?: number; + group_policy_address?: string; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.group_policy_address != null) { + data.group_policy_address = this.group_policy_address; + } + 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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.group_policy_address.length) + writer.writeString(2, this.group_policy_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateGroupWithPolicyResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateGroupWithPolicyResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + message.group_policy_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateGroupWithPolicyResponse { + return MsgCreateGroupWithPolicyResponse.deserialize(bytes); + } + } + export class MsgUpdateGroupPolicyDecisionPolicy extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + group_policy_address?: string; + decision_policy?: dependency_3.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("group_policy_address" in data && data.group_policy_address != undefined) { + this.group_policy_address = data.group_policy_address; + } + if ("decision_policy" in data && data.decision_policy != undefined) { + this.decision_policy = data.decision_policy; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_policy_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set group_policy_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get decision_policy() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Any, 3) as dependency_3.google.protobuf.Any; + } + set decision_policy(value: dependency_3.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_decision_policy() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + admin?: string; + group_policy_address?: string; + decision_policy?: ReturnType; + }): MsgUpdateGroupPolicyDecisionPolicy { + const message = new MsgUpdateGroupPolicyDecisionPolicy({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.group_policy_address != null) { + message.group_policy_address = data.group_policy_address; + } + if (data.decision_policy != null) { + message.decision_policy = dependency_3.google.protobuf.Any.fromObject(data.decision_policy); + } + return message; + } + toObject() { + const data: { + admin?: string; + group_policy_address?: string; + decision_policy?: ReturnType; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.group_policy_address != null) { + data.group_policy_address = this.group_policy_address; + } + if (this.decision_policy != null) { + data.decision_policy = this.decision_policy.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.admin.length) + writer.writeString(1, this.admin); + if (this.group_policy_address.length) + writer.writeString(2, this.group_policy_address); + if (this.has_decision_policy) + writer.writeMessage(3, this.decision_policy, () => this.decision_policy.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateGroupPolicyDecisionPolicy { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupPolicyDecisionPolicy(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + message.group_policy_address = reader.readString(); + break; + case 3: + reader.readMessage(message.decision_policy, () => message.decision_policy = dependency_3.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupPolicyDecisionPolicy { + return MsgUpdateGroupPolicyDecisionPolicy.deserialize(bytes); + } + } + export class MsgUpdateGroupPolicyDecisionPolicyResponse 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: {}): MsgUpdateGroupPolicyDecisionPolicyResponse { + const message = new MsgUpdateGroupPolicyDecisionPolicyResponse({}); + 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): MsgUpdateGroupPolicyDecisionPolicyResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupPolicyDecisionPolicyResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupPolicyDecisionPolicyResponse { + return MsgUpdateGroupPolicyDecisionPolicyResponse.deserialize(bytes); + } + } + export class MsgUpdateGroupPolicyMetadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + admin?: string; + group_policy_address?: string; + metadata?: 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 ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("group_policy_address" in data && data.group_policy_address != undefined) { + this.group_policy_address = data.group_policy_address; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_policy_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set group_policy_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + admin?: string; + group_policy_address?: string; + metadata?: string; + }): MsgUpdateGroupPolicyMetadata { + const message = new MsgUpdateGroupPolicyMetadata({}); + if (data.admin != null) { + message.admin = data.admin; + } + if (data.group_policy_address != null) { + message.group_policy_address = data.group_policy_address; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + return message; + } + toObject() { + const data: { + admin?: string; + group_policy_address?: string; + metadata?: string; + } = {}; + if (this.admin != null) { + data.admin = this.admin; + } + if (this.group_policy_address != null) { + data.group_policy_address = this.group_policy_address; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + 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.admin.length) + writer.writeString(1, this.admin); + if (this.group_policy_address.length) + writer.writeString(2, this.group_policy_address); + if (this.metadata.length) + writer.writeString(3, this.metadata); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateGroupPolicyMetadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupPolicyMetadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.admin = reader.readString(); + break; + case 2: + message.group_policy_address = reader.readString(); + break; + case 3: + message.metadata = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupPolicyMetadata { + return MsgUpdateGroupPolicyMetadata.deserialize(bytes); + } + } + export class MsgUpdateGroupPolicyMetadataResponse 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: {}): MsgUpdateGroupPolicyMetadataResponse { + const message = new MsgUpdateGroupPolicyMetadataResponse({}); + 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): MsgUpdateGroupPolicyMetadataResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateGroupPolicyMetadataResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupPolicyMetadataResponse { + return MsgUpdateGroupPolicyMetadataResponse.deserialize(bytes); + } + } + export class MsgSubmitProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_policy_address?: string; + proposers?: string[]; + metadata?: string; + messages?: dependency_3.google.protobuf.Any[]; + exec?: Exec; + title?: string; + summary?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group_policy_address" in data && data.group_policy_address != undefined) { + this.group_policy_address = data.group_policy_address; + } + if ("proposers" in data && data.proposers != undefined) { + this.proposers = data.proposers; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("messages" in data && data.messages != undefined) { + this.messages = data.messages; + } + if ("exec" in data && data.exec != undefined) { + this.exec = data.exec; + } + if ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("summary" in data && data.summary != undefined) { + this.summary = data.summary; + } + } + } + get group_policy_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set group_policy_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get proposers() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set proposers(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + get messages() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.google.protobuf.Any, 4) as dependency_3.google.protobuf.Any[]; + } + set messages(value: dependency_3.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get exec() { + return pb_1.Message.getFieldWithDefault(this, 5, Exec.EXEC_UNSPECIFIED) as Exec; + } + set exec(value: Exec) { + pb_1.Message.setField(this, 5, value); + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 6, value); + } + get summary() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set summary(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + group_policy_address?: string; + proposers?: string[]; + metadata?: string; + messages?: ReturnType[]; + exec?: Exec; + title?: string; + summary?: string; + }): MsgSubmitProposal { + const message = new MsgSubmitProposal({}); + if (data.group_policy_address != null) { + message.group_policy_address = data.group_policy_address; + } + if (data.proposers != null) { + message.proposers = data.proposers; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.messages != null) { + message.messages = data.messages.map(item => dependency_3.google.protobuf.Any.fromObject(item)); + } + if (data.exec != null) { + message.exec = data.exec; + } + if (data.title != null) { + message.title = data.title; + } + if (data.summary != null) { + message.summary = data.summary; + } + return message; + } + toObject() { + const data: { + group_policy_address?: string; + proposers?: string[]; + metadata?: string; + messages?: ReturnType[]; + exec?: Exec; + title?: string; + summary?: string; + } = {}; + if (this.group_policy_address != null) { + data.group_policy_address = this.group_policy_address; + } + if (this.proposers != null) { + data.proposers = this.proposers; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.messages != null) { + data.messages = this.messages.map((item: dependency_3.google.protobuf.Any) => item.toObject()); + } + if (this.exec != null) { + data.exec = this.exec; + } + if (this.title != null) { + data.title = this.title; + } + if (this.summary != null) { + data.summary = this.summary; + } + 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.group_policy_address.length) + writer.writeString(1, this.group_policy_address); + if (this.proposers.length) + writer.writeRepeatedString(2, this.proposers); + if (this.metadata.length) + writer.writeString(3, this.metadata); + if (this.messages.length) + writer.writeRepeatedMessage(4, this.messages, (item: dependency_3.google.protobuf.Any) => item.serialize(writer)); + if (this.exec != Exec.EXEC_UNSPECIFIED) + writer.writeEnum(5, this.exec); + if (this.title.length) + writer.writeString(6, this.title); + if (this.summary.length) + writer.writeString(7, this.summary); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_policy_address = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + case 3: + message.metadata = reader.readString(); + break; + case 4: + reader.readMessage(message.messages, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_3.google.protobuf.Any.deserialize(reader), dependency_3.google.protobuf.Any)); + break; + case 5: + message.exec = reader.readEnum(); + break; + case 6: + message.title = reader.readString(); + break; + case 7: + message.summary = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitProposal { + return MsgSubmitProposal.deserialize(bytes); + } + } + export class MsgSubmitProposalResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + proposal_id?: number; + }): MsgSubmitProposalResponse { + const message = new MsgSubmitProposalResponse({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitProposalResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitProposalResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitProposalResponse { + return MsgSubmitProposalResponse.deserialize(bytes); + } + } + export class MsgWithdrawProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + address?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proposal_id?: number; + address?: string; + }): MsgWithdrawProposal { + const message = new MsgWithdrawProposal({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + address?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.address != null) { + data.address = this.address; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.address.length) + writer.writeString(2, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgWithdrawProposal { + return MsgWithdrawProposal.deserialize(bytes); + } + } + export class MsgWithdrawProposalResponse 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: {}): MsgWithdrawProposalResponse { + const message = new MsgWithdrawProposalResponse({}); + 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): MsgWithdrawProposalResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawProposalResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgWithdrawProposalResponse { + return MsgWithdrawProposalResponse.deserialize(bytes); + } + } + export class MsgVote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: string; + option?: dependency_4.cosmos.group.v1.VoteOption; + metadata?: string; + exec?: Exec; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("option" in data && data.option != undefined) { + this.option = data.option; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("exec" in data && data.exec != undefined) { + this.exec = data.exec; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + get option() { + return pb_1.Message.getFieldWithDefault(this, 3, dependency_4.cosmos.group.v1.VoteOption.VOTE_OPTION_UNSPECIFIED) as dependency_4.cosmos.group.v1.VoteOption; + } + set option(value: dependency_4.cosmos.group.v1.VoteOption) { + pb_1.Message.setField(this, 3, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 4, value); + } + get exec() { + return pb_1.Message.getFieldWithDefault(this, 5, Exec.EXEC_UNSPECIFIED) as Exec; + } + set exec(value: Exec) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + option?: dependency_4.cosmos.group.v1.VoteOption; + metadata?: string; + exec?: Exec; + }): MsgVote { + const message = new MsgVote({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.option != null) { + message.option = data.option; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.exec != null) { + message.exec = data.exec; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + option?: dependency_4.cosmos.group.v1.VoteOption; + metadata?: string; + exec?: Exec; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.option != null) { + data.option = this.option; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.exec != null) { + data.exec = this.exec; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.option != dependency_4.cosmos.group.v1.VoteOption.VOTE_OPTION_UNSPECIFIED) + writer.writeEnum(3, this.option); + if (this.metadata.length) + writer.writeString(4, this.metadata); + if (this.exec != Exec.EXEC_UNSPECIFIED) + writer.writeEnum(5, this.exec); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgVote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + case 3: + message.option = reader.readEnum(); + break; + case 4: + message.metadata = reader.readString(); + break; + case 5: + message.exec = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVote { + return MsgVote.deserialize(bytes); + } + } + export class MsgVoteResponse 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: {}): MsgVoteResponse { + const message = new MsgVoteResponse({}); + 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): MsgVoteResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgVoteResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgVoteResponse { + return MsgVoteResponse.deserialize(bytes); + } + } + export class MsgExec extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + executor?: 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 ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("executor" in data && data.executor != undefined) { + this.executor = data.executor; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get executor() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set executor(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + proposal_id?: number; + executor?: string; + }): MsgExec { + const message = new MsgExec({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.executor != null) { + message.executor = data.executor; + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + executor?: string; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.executor != null) { + data.executor = this.executor; + } + 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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.executor.length) + writer.writeString(2, this.executor); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgExec { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgExec(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.executor = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgExec { + return MsgExec.deserialize(bytes); + } + } + export class MsgExecResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: dependency_4.cosmos.group.v1.ProposalExecutorResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 2, dependency_4.cosmos.group.v1.ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED) as dependency_4.cosmos.group.v1.ProposalExecutorResult; + } + set result(value: dependency_4.cosmos.group.v1.ProposalExecutorResult) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + result?: dependency_4.cosmos.group.v1.ProposalExecutorResult; + }): MsgExecResponse { + const message = new MsgExecResponse({}); + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + result?: dependency_4.cosmos.group.v1.ProposalExecutorResult; + } = {}; + if (this.result != null) { + data.result = this.result; + } + 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.result != dependency_4.cosmos.group.v1.ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED) + writer.writeEnum(2, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgExecResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgExecResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.result = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgExecResponse { + return MsgExecResponse.deserialize(bytes); + } + } + export class MsgLeaveGroup extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + group_id?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + address?: string; + group_id?: number; + }): MsgLeaveGroup { + const message = new MsgLeaveGroup({}); + if (data.address != null) { + message.address = data.address; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + return message; + } + toObject() { + const data: { + address?: string; + group_id?: number; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.group_id != null) { + data.group_id = this.group_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.address.length) + writer.writeString(1, this.address); + if (this.group_id != 0) + writer.writeUint64(2, this.group_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgLeaveGroup { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgLeaveGroup(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.group_id = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgLeaveGroup { + return MsgLeaveGroup.deserialize(bytes); + } + } + export class MsgLeaveGroupResponse 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: {}): MsgLeaveGroupResponse { + const message = new MsgLeaveGroupResponse({}); + 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): MsgLeaveGroupResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgLeaveGroupResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgLeaveGroupResponse { + return MsgLeaveGroupResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + CreateGroup: { + path: "/cosmos.group.v1.Msg/CreateGroup", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreateGroup) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreateGroup.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreateGroupResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreateGroupResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateGroupMembers: { + path: "/cosmos.group.v1.Msg/UpdateGroupMembers", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateGroupMembers) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateGroupMembers.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateGroupMembersResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateGroupMembersResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateGroupAdmin: { + path: "/cosmos.group.v1.Msg/UpdateGroupAdmin", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateGroupAdmin) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateGroupAdmin.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateGroupAdminResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateGroupAdminResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateGroupMetadata: { + path: "/cosmos.group.v1.Msg/UpdateGroupMetadata", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateGroupMetadata) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateGroupMetadata.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateGroupMetadataResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateGroupMetadataResponse.deserialize(new Uint8Array(bytes)) + }, + CreateGroupPolicy: { + path: "/cosmos.group.v1.Msg/CreateGroupPolicy", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreateGroupPolicy) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreateGroupPolicy.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreateGroupPolicyResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreateGroupPolicyResponse.deserialize(new Uint8Array(bytes)) + }, + CreateGroupWithPolicy: { + path: "/cosmos.group.v1.Msg/CreateGroupWithPolicy", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreateGroupWithPolicy) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreateGroupWithPolicy.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreateGroupWithPolicyResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreateGroupWithPolicyResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateGroupPolicyAdmin: { + path: "/cosmos.group.v1.Msg/UpdateGroupPolicyAdmin", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateGroupPolicyAdmin) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateGroupPolicyAdmin.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateGroupPolicyAdminResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateGroupPolicyAdminResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateGroupPolicyDecisionPolicy: { + path: "/cosmos.group.v1.Msg/UpdateGroupPolicyDecisionPolicy", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateGroupPolicyDecisionPolicy) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateGroupPolicyDecisionPolicy.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateGroupPolicyDecisionPolicyResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateGroupPolicyDecisionPolicyResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateGroupPolicyMetadata: { + path: "/cosmos.group.v1.Msg/UpdateGroupPolicyMetadata", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateGroupPolicyMetadata) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateGroupPolicyMetadata.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateGroupPolicyMetadataResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateGroupPolicyMetadataResponse.deserialize(new Uint8Array(bytes)) + }, + SubmitProposal: { + path: "/cosmos.group.v1.Msg/SubmitProposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitProposal) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitProposal.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitProposalResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitProposalResponse.deserialize(new Uint8Array(bytes)) + }, + WithdrawProposal: { + path: "/cosmos.group.v1.Msg/WithdrawProposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgWithdrawProposal) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgWithdrawProposal.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgWithdrawProposalResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgWithdrawProposalResponse.deserialize(new Uint8Array(bytes)) + }, + Vote: { + path: "/cosmos.group.v1.Msg/Vote", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgVote) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgVote.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgVoteResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgVoteResponse.deserialize(new Uint8Array(bytes)) + }, + Exec: { + path: "/cosmos.group.v1.Msg/Exec", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgExec) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgExec.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgExecResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgExecResponse.deserialize(new Uint8Array(bytes)) + }, + LeaveGroup: { + path: "/cosmos.group.v1.Msg/LeaveGroup", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgLeaveGroup) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgLeaveGroup.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgLeaveGroupResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgLeaveGroupResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CreateGroup(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateGroupMembers(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateGroupAdmin(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateGroupMetadata(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateGroupPolicy(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateGroupWithPolicy(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateGroupPolicyAdmin(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateGroupPolicyDecisionPolicy(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateGroupPolicyMetadata(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SubmitProposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract WithdrawProposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Vote(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Exec(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract LeaveGroup(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CreateGroup: GrpcUnaryServiceInterface = (message: MsgCreateGroup, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateGroup(message, metadata, options, callback); + }; + UpdateGroupMembers: GrpcUnaryServiceInterface = (message: MsgUpdateGroupMembers, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateGroupMembers(message, metadata, options, callback); + }; + UpdateGroupAdmin: GrpcUnaryServiceInterface = (message: MsgUpdateGroupAdmin, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateGroupAdmin(message, metadata, options, callback); + }; + UpdateGroupMetadata: GrpcUnaryServiceInterface = (message: MsgUpdateGroupMetadata, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateGroupMetadata(message, metadata, options, callback); + }; + CreateGroupPolicy: GrpcUnaryServiceInterface = (message: MsgCreateGroupPolicy, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateGroupPolicy(message, metadata, options, callback); + }; + CreateGroupWithPolicy: GrpcUnaryServiceInterface = (message: MsgCreateGroupWithPolicy, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateGroupWithPolicy(message, metadata, options, callback); + }; + UpdateGroupPolicyAdmin: GrpcUnaryServiceInterface = (message: MsgUpdateGroupPolicyAdmin, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateGroupPolicyAdmin(message, metadata, options, callback); + }; + UpdateGroupPolicyDecisionPolicy: GrpcUnaryServiceInterface = (message: MsgUpdateGroupPolicyDecisionPolicy, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateGroupPolicyDecisionPolicy(message, metadata, options, callback); + }; + UpdateGroupPolicyMetadata: GrpcUnaryServiceInterface = (message: MsgUpdateGroupPolicyMetadata, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateGroupPolicyMetadata(message, metadata, options, callback); + }; + SubmitProposal: GrpcUnaryServiceInterface = (message: MsgSubmitProposal, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitProposal(message, metadata, options, callback); + }; + WithdrawProposal: GrpcUnaryServiceInterface = (message: MsgWithdrawProposal, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.WithdrawProposal(message, metadata, options, callback); + }; + Vote: GrpcUnaryServiceInterface = (message: MsgVote, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Vote(message, metadata, options, callback); + }; + Exec: GrpcUnaryServiceInterface = (message: MsgExec, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Exec(message, metadata, options, callback); + }; + LeaveGroup: GrpcUnaryServiceInterface = (message: MsgLeaveGroup, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.LeaveGroup(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/group/v1/tx_pb.d.ts b/codegen/cosmos/group/v1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/group/v1/tx_pb.d.ts rename to codegen/cosmos/group/v1/tx_pb.d.ts diff --git a/proto/cosmos/group/v1/tx_pb.js b/codegen/cosmos/group/v1/tx_pb.js similarity index 100% rename from proto/cosmos/group/v1/tx_pb.js rename to codegen/cosmos/group/v1/tx_pb.js diff --git a/proto/cosmos/group/v1/tx_pb_service.d.ts b/codegen/cosmos/group/v1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/group/v1/tx_pb_service.d.ts rename to codegen/cosmos/group/v1/tx_pb_service.d.ts diff --git a/proto/cosmos/group/v1/tx_pb_service.js b/codegen/cosmos/group/v1/tx_pb_service.js similarity index 100% rename from proto/cosmos/group/v1/tx_pb_service.js rename to codegen/cosmos/group/v1/tx_pb_service.js diff --git a/codegen/cosmos/group/v1/types.ts b/codegen/cosmos/group/v1/types.ts new file mode 100644 index 0000000..dc544c9 --- /dev/null +++ b/codegen/cosmos/group/v1/types.ts @@ -0,0 +1,1731 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/group/v1/types.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/duration"; +import * as dependency_3 from "./../../../google/protobuf/timestamp"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../../google/protobuf/any"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.group.v1 { + export enum VoteOption { + VOTE_OPTION_UNSPECIFIED = 0, + VOTE_OPTION_YES = 1, + VOTE_OPTION_ABSTAIN = 2, + VOTE_OPTION_NO = 3, + VOTE_OPTION_NO_WITH_VETO = 4 + } + export enum ProposalStatus { + PROPOSAL_STATUS_UNSPECIFIED = 0, + PROPOSAL_STATUS_SUBMITTED = 1, + PROPOSAL_STATUS_ACCEPTED = 2, + PROPOSAL_STATUS_REJECTED = 3, + PROPOSAL_STATUS_ABORTED = 4, + PROPOSAL_STATUS_WITHDRAWN = 5 + } + export enum ProposalExecutorResult { + PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = 0, + PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1, + PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2, + PROPOSAL_EXECUTOR_RESULT_FAILURE = 3 + } + export class Member extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + weight?: string; + metadata?: string; + added_at?: dependency_3.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("weight" in data && data.weight != undefined) { + this.weight = data.weight; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("added_at" in data && data.added_at != undefined) { + this.added_at = data.added_at; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get weight() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set weight(value: string) { + pb_1.Message.setField(this, 2, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + get added_at() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 4) as dependency_3.google.protobuf.Timestamp; + } + set added_at(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_added_at() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + address?: string; + weight?: string; + metadata?: string; + added_at?: ReturnType; + }): Member { + const message = new Member({}); + if (data.address != null) { + message.address = data.address; + } + if (data.weight != null) { + message.weight = data.weight; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.added_at != null) { + message.added_at = dependency_3.google.protobuf.Timestamp.fromObject(data.added_at); + } + return message; + } + toObject() { + const data: { + address?: string; + weight?: string; + metadata?: string; + added_at?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.weight != null) { + data.weight = this.weight; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.added_at != null) { + data.added_at = this.added_at.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.address.length) + writer.writeString(1, this.address); + if (this.weight.length) + writer.writeString(2, this.weight); + if (this.metadata.length) + writer.writeString(3, this.metadata); + if (this.has_added_at) + writer.writeMessage(4, this.added_at, () => this.added_at.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Member { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Member(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.weight = reader.readString(); + break; + case 3: + message.metadata = reader.readString(); + break; + case 4: + reader.readMessage(message.added_at, () => message.added_at = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Member { + return Member.deserialize(bytes); + } + } + export class MemberRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + weight?: string; + metadata?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("weight" in data && data.weight != undefined) { + this.weight = data.weight; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get weight() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set weight(value: string) { + pb_1.Message.setField(this, 2, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + address?: string; + weight?: string; + metadata?: string; + }): MemberRequest { + const message = new MemberRequest({}); + if (data.address != null) { + message.address = data.address; + } + if (data.weight != null) { + message.weight = data.weight; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + return message; + } + toObject() { + const data: { + address?: string; + weight?: string; + metadata?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.weight != null) { + data.weight = this.weight; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.weight.length) + writer.writeString(2, this.weight); + if (this.metadata.length) + writer.writeString(3, this.metadata); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MemberRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MemberRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.weight = reader.readString(); + break; + case 3: + message.metadata = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MemberRequest { + return MemberRequest.deserialize(bytes); + } + } + export class ThresholdDecisionPolicy extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + threshold?: string; + windows?: DecisionPolicyWindows; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("threshold" in data && data.threshold != undefined) { + this.threshold = data.threshold; + } + if ("windows" in data && data.windows != undefined) { + this.windows = data.windows; + } + } + } + get threshold() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set threshold(value: string) { + pb_1.Message.setField(this, 1, value); + } + get windows() { + return pb_1.Message.getWrapperField(this, DecisionPolicyWindows, 2) as DecisionPolicyWindows; + } + set windows(value: DecisionPolicyWindows) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_windows() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + threshold?: string; + windows?: ReturnType; + }): ThresholdDecisionPolicy { + const message = new ThresholdDecisionPolicy({}); + if (data.threshold != null) { + message.threshold = data.threshold; + } + if (data.windows != null) { + message.windows = DecisionPolicyWindows.fromObject(data.windows); + } + return message; + } + toObject() { + const data: { + threshold?: string; + windows?: ReturnType; + } = {}; + if (this.threshold != null) { + data.threshold = this.threshold; + } + if (this.windows != null) { + data.windows = this.windows.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.threshold.length) + writer.writeString(1, this.threshold); + if (this.has_windows) + writer.writeMessage(2, this.windows, () => this.windows.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ThresholdDecisionPolicy { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ThresholdDecisionPolicy(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.threshold = reader.readString(); + break; + case 2: + reader.readMessage(message.windows, () => message.windows = DecisionPolicyWindows.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ThresholdDecisionPolicy { + return ThresholdDecisionPolicy.deserialize(bytes); + } + } + export class PercentageDecisionPolicy extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + percentage?: string; + windows?: DecisionPolicyWindows; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("percentage" in data && data.percentage != undefined) { + this.percentage = data.percentage; + } + if ("windows" in data && data.windows != undefined) { + this.windows = data.windows; + } + } + } + get percentage() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set percentage(value: string) { + pb_1.Message.setField(this, 1, value); + } + get windows() { + return pb_1.Message.getWrapperField(this, DecisionPolicyWindows, 2) as DecisionPolicyWindows; + } + set windows(value: DecisionPolicyWindows) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_windows() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + percentage?: string; + windows?: ReturnType; + }): PercentageDecisionPolicy { + const message = new PercentageDecisionPolicy({}); + if (data.percentage != null) { + message.percentage = data.percentage; + } + if (data.windows != null) { + message.windows = DecisionPolicyWindows.fromObject(data.windows); + } + return message; + } + toObject() { + const data: { + percentage?: string; + windows?: ReturnType; + } = {}; + if (this.percentage != null) { + data.percentage = this.percentage; + } + if (this.windows != null) { + data.windows = this.windows.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.percentage.length) + writer.writeString(1, this.percentage); + if (this.has_windows) + writer.writeMessage(2, this.windows, () => this.windows.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PercentageDecisionPolicy { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PercentageDecisionPolicy(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.percentage = reader.readString(); + break; + case 2: + reader.readMessage(message.windows, () => message.windows = DecisionPolicyWindows.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PercentageDecisionPolicy { + return PercentageDecisionPolicy.deserialize(bytes); + } + } + export class DecisionPolicyWindows extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + voting_period?: dependency_2.google.protobuf.Duration; + min_execution_period?: dependency_2.google.protobuf.Duration; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("voting_period" in data && data.voting_period != undefined) { + this.voting_period = data.voting_period; + } + if ("min_execution_period" in data && data.min_execution_period != undefined) { + this.min_execution_period = data.min_execution_period; + } + } + } + get voting_period() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 1) as dependency_2.google.protobuf.Duration; + } + set voting_period(value: dependency_2.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_voting_period() { + return pb_1.Message.getField(this, 1) != null; + } + get min_execution_period() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 2) as dependency_2.google.protobuf.Duration; + } + set min_execution_period(value: dependency_2.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_min_execution_period() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + voting_period?: ReturnType; + min_execution_period?: ReturnType; + }): DecisionPolicyWindows { + const message = new DecisionPolicyWindows({}); + if (data.voting_period != null) { + message.voting_period = dependency_2.google.protobuf.Duration.fromObject(data.voting_period); + } + if (data.min_execution_period != null) { + message.min_execution_period = dependency_2.google.protobuf.Duration.fromObject(data.min_execution_period); + } + return message; + } + toObject() { + const data: { + voting_period?: ReturnType; + min_execution_period?: ReturnType; + } = {}; + if (this.voting_period != null) { + data.voting_period = this.voting_period.toObject(); + } + if (this.min_execution_period != null) { + data.min_execution_period = this.min_execution_period.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_voting_period) + writer.writeMessage(1, this.voting_period, () => this.voting_period.serialize(writer)); + if (this.has_min_execution_period) + writer.writeMessage(2, this.min_execution_period, () => this.min_execution_period.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DecisionPolicyWindows { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DecisionPolicyWindows(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.voting_period, () => message.voting_period = dependency_2.google.protobuf.Duration.deserialize(reader)); + break; + case 2: + reader.readMessage(message.min_execution_period, () => message.min_execution_period = dependency_2.google.protobuf.Duration.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DecisionPolicyWindows { + return DecisionPolicyWindows.deserialize(bytes); + } + } + export class GroupInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + admin?: string; + metadata?: string; + version?: number; + total_weight?: string; + created_at?: dependency_3.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("total_weight" in data && data.total_weight != undefined) { + this.total_weight = data.total_weight; + } + if ("created_at" in data && data.created_at != undefined) { + this.created_at = data.created_at; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 2, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set version(value: number) { + pb_1.Message.setField(this, 4, value); + } + get total_weight() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set total_weight(value: string) { + pb_1.Message.setField(this, 5, value); + } + get created_at() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 6) as dependency_3.google.protobuf.Timestamp; + } + set created_at(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_created_at() { + return pb_1.Message.getField(this, 6) != null; + } + static fromObject(data: { + id?: number; + admin?: string; + metadata?: string; + version?: number; + total_weight?: string; + created_at?: ReturnType; + }): GroupInfo { + const message = new GroupInfo({}); + if (data.id != null) { + message.id = data.id; + } + if (data.admin != null) { + message.admin = data.admin; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.version != null) { + message.version = data.version; + } + if (data.total_weight != null) { + message.total_weight = data.total_weight; + } + if (data.created_at != null) { + message.created_at = dependency_3.google.protobuf.Timestamp.fromObject(data.created_at); + } + return message; + } + toObject() { + const data: { + id?: number; + admin?: string; + metadata?: string; + version?: number; + total_weight?: string; + created_at?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.admin != null) { + data.admin = this.admin; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.version != null) { + data.version = this.version; + } + if (this.total_weight != null) { + data.total_weight = this.total_weight; + } + if (this.created_at != null) { + data.created_at = this.created_at.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.id != 0) + writer.writeUint64(1, this.id); + if (this.admin.length) + writer.writeString(2, this.admin); + if (this.metadata.length) + writer.writeString(3, this.metadata); + if (this.version != 0) + writer.writeUint64(4, this.version); + if (this.total_weight.length) + writer.writeString(5, this.total_weight); + if (this.has_created_at) + writer.writeMessage(6, this.created_at, () => this.created_at.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GroupInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GroupInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64(); + break; + case 2: + message.admin = reader.readString(); + break; + case 3: + message.metadata = reader.readString(); + break; + case 4: + message.version = reader.readUint64(); + break; + case 5: + message.total_weight = reader.readString(); + break; + case 6: + reader.readMessage(message.created_at, () => message.created_at = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GroupInfo { + return GroupInfo.deserialize(bytes); + } + } + export class GroupMember extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + group_id?: number; + member?: Member; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("member" in data && data.member != undefined) { + this.member = data.member; + } + } + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get member() { + return pb_1.Message.getWrapperField(this, Member, 2) as Member; + } + set member(value: Member) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_member() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + group_id?: number; + member?: ReturnType; + }): GroupMember { + const message = new GroupMember({}); + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.member != null) { + message.member = Member.fromObject(data.member); + } + return message; + } + toObject() { + const data: { + group_id?: number; + member?: ReturnType; + } = {}; + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.member != null) { + data.member = this.member.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.group_id != 0) + writer.writeUint64(1, this.group_id); + if (this.has_member) + writer.writeMessage(2, this.member, () => this.member.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GroupMember { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GroupMember(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.group_id = reader.readUint64(); + break; + case 2: + reader.readMessage(message.member, () => message.member = Member.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GroupMember { + return GroupMember.deserialize(bytes); + } + } + export class GroupPolicyInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + group_id?: number; + admin?: string; + metadata?: string; + version?: number; + decision_policy?: dependency_5.google.protobuf.Any; + created_at?: dependency_3.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("group_id" in data && data.group_id != undefined) { + this.group_id = data.group_id; + } + if ("admin" in data && data.admin != undefined) { + this.admin = data.admin; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("decision_policy" in data && data.decision_policy != undefined) { + this.decision_policy = data.decision_policy; + } + if ("created_at" in data && data.created_at != undefined) { + this.created_at = data.created_at; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get group_id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set group_id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get admin() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set admin(value: string) { + pb_1.Message.setField(this, 3, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 4, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set version(value: number) { + pb_1.Message.setField(this, 5, value); + } + get decision_policy() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 6) as dependency_5.google.protobuf.Any; + } + set decision_policy(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_decision_policy() { + return pb_1.Message.getField(this, 6) != null; + } + get created_at() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 7) as dependency_3.google.protobuf.Timestamp; + } + set created_at(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_created_at() { + return pb_1.Message.getField(this, 7) != null; + } + static fromObject(data: { + address?: string; + group_id?: number; + admin?: string; + metadata?: string; + version?: number; + decision_policy?: ReturnType; + created_at?: ReturnType; + }): GroupPolicyInfo { + const message = new GroupPolicyInfo({}); + if (data.address != null) { + message.address = data.address; + } + if (data.group_id != null) { + message.group_id = data.group_id; + } + if (data.admin != null) { + message.admin = data.admin; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.version != null) { + message.version = data.version; + } + if (data.decision_policy != null) { + message.decision_policy = dependency_5.google.protobuf.Any.fromObject(data.decision_policy); + } + if (data.created_at != null) { + message.created_at = dependency_3.google.protobuf.Timestamp.fromObject(data.created_at); + } + return message; + } + toObject() { + const data: { + address?: string; + group_id?: number; + admin?: string; + metadata?: string; + version?: number; + decision_policy?: ReturnType; + created_at?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.group_id != null) { + data.group_id = this.group_id; + } + if (this.admin != null) { + data.admin = this.admin; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.version != null) { + data.version = this.version; + } + if (this.decision_policy != null) { + data.decision_policy = this.decision_policy.toObject(); + } + if (this.created_at != null) { + data.created_at = this.created_at.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.address.length) + writer.writeString(1, this.address); + if (this.group_id != 0) + writer.writeUint64(2, this.group_id); + if (this.admin.length) + writer.writeString(3, this.admin); + if (this.metadata.length) + writer.writeString(4, this.metadata); + if (this.version != 0) + writer.writeUint64(5, this.version); + if (this.has_decision_policy) + writer.writeMessage(6, this.decision_policy, () => this.decision_policy.serialize(writer)); + if (this.has_created_at) + writer.writeMessage(7, this.created_at, () => this.created_at.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GroupPolicyInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GroupPolicyInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.group_id = reader.readUint64(); + break; + case 3: + message.admin = reader.readString(); + break; + case 4: + message.metadata = reader.readString(); + break; + case 5: + message.version = reader.readUint64(); + break; + case 6: + reader.readMessage(message.decision_policy, () => message.decision_policy = dependency_5.google.protobuf.Any.deserialize(reader)); + break; + case 7: + reader.readMessage(message.created_at, () => message.created_at = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GroupPolicyInfo { + return GroupPolicyInfo.deserialize(bytes); + } + } + export class Proposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + group_policy_address?: string; + metadata?: string; + proposers?: string[]; + submit_time?: dependency_3.google.protobuf.Timestamp; + group_version?: number; + group_policy_version?: number; + status?: ProposalStatus; + final_tally_result?: TallyResult; + voting_period_end?: dependency_3.google.protobuf.Timestamp; + executor_result?: ProposalExecutorResult; + messages?: dependency_5.google.protobuf.Any[]; + title?: string; + summary?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 12], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("group_policy_address" in data && data.group_policy_address != undefined) { + this.group_policy_address = data.group_policy_address; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("proposers" in data && data.proposers != undefined) { + this.proposers = data.proposers; + } + if ("submit_time" in data && data.submit_time != undefined) { + this.submit_time = data.submit_time; + } + if ("group_version" in data && data.group_version != undefined) { + this.group_version = data.group_version; + } + if ("group_policy_version" in data && data.group_policy_version != undefined) { + this.group_policy_version = data.group_policy_version; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("final_tally_result" in data && data.final_tally_result != undefined) { + this.final_tally_result = data.final_tally_result; + } + if ("voting_period_end" in data && data.voting_period_end != undefined) { + this.voting_period_end = data.voting_period_end; + } + if ("executor_result" in data && data.executor_result != undefined) { + this.executor_result = data.executor_result; + } + if ("messages" in data && data.messages != undefined) { + this.messages = data.messages; + } + if ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("summary" in data && data.summary != undefined) { + this.summary = data.summary; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get group_policy_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set group_policy_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 3, value); + } + get proposers() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as string[]; + } + set proposers(value: string[]) { + pb_1.Message.setField(this, 4, value); + } + get submit_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5) as dependency_3.google.protobuf.Timestamp; + } + set submit_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_submit_time() { + return pb_1.Message.getField(this, 5) != null; + } + get group_version() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set group_version(value: number) { + pb_1.Message.setField(this, 6, value); + } + get group_policy_version() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set group_policy_version(value: number) { + pb_1.Message.setField(this, 7, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 8, ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) as ProposalStatus; + } + set status(value: ProposalStatus) { + pb_1.Message.setField(this, 8, value); + } + get final_tally_result() { + return pb_1.Message.getWrapperField(this, TallyResult, 9) as TallyResult; + } + set final_tally_result(value: TallyResult) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_final_tally_result() { + return pb_1.Message.getField(this, 9) != null; + } + get voting_period_end() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 10) as dependency_3.google.protobuf.Timestamp; + } + set voting_period_end(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_voting_period_end() { + return pb_1.Message.getField(this, 10) != null; + } + get executor_result() { + return pb_1.Message.getFieldWithDefault(this, 11, ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED) as ProposalExecutorResult; + } + set executor_result(value: ProposalExecutorResult) { + pb_1.Message.setField(this, 11, value); + } + get messages() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.google.protobuf.Any, 12) as dependency_5.google.protobuf.Any[]; + } + set messages(value: dependency_5.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 12, value); + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 13, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 13, value); + } + get summary() { + return pb_1.Message.getFieldWithDefault(this, 14, "") as string; + } + set summary(value: string) { + pb_1.Message.setField(this, 14, value); + } + static fromObject(data: { + id?: number; + group_policy_address?: string; + metadata?: string; + proposers?: string[]; + submit_time?: ReturnType; + group_version?: number; + group_policy_version?: number; + status?: ProposalStatus; + final_tally_result?: ReturnType; + voting_period_end?: ReturnType; + executor_result?: ProposalExecutorResult; + messages?: ReturnType[]; + title?: string; + summary?: string; + }): Proposal { + const message = new Proposal({}); + if (data.id != null) { + message.id = data.id; + } + if (data.group_policy_address != null) { + message.group_policy_address = data.group_policy_address; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.proposers != null) { + message.proposers = data.proposers; + } + if (data.submit_time != null) { + message.submit_time = dependency_3.google.protobuf.Timestamp.fromObject(data.submit_time); + } + if (data.group_version != null) { + message.group_version = data.group_version; + } + if (data.group_policy_version != null) { + message.group_policy_version = data.group_policy_version; + } + if (data.status != null) { + message.status = data.status; + } + if (data.final_tally_result != null) { + message.final_tally_result = TallyResult.fromObject(data.final_tally_result); + } + if (data.voting_period_end != null) { + message.voting_period_end = dependency_3.google.protobuf.Timestamp.fromObject(data.voting_period_end); + } + if (data.executor_result != null) { + message.executor_result = data.executor_result; + } + if (data.messages != null) { + message.messages = data.messages.map(item => dependency_5.google.protobuf.Any.fromObject(item)); + } + if (data.title != null) { + message.title = data.title; + } + if (data.summary != null) { + message.summary = data.summary; + } + return message; + } + toObject() { + const data: { + id?: number; + group_policy_address?: string; + metadata?: string; + proposers?: string[]; + submit_time?: ReturnType; + group_version?: number; + group_policy_version?: number; + status?: ProposalStatus; + final_tally_result?: ReturnType; + voting_period_end?: ReturnType; + executor_result?: ProposalExecutorResult; + messages?: ReturnType[]; + title?: string; + summary?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.group_policy_address != null) { + data.group_policy_address = this.group_policy_address; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.proposers != null) { + data.proposers = this.proposers; + } + if (this.submit_time != null) { + data.submit_time = this.submit_time.toObject(); + } + if (this.group_version != null) { + data.group_version = this.group_version; + } + if (this.group_policy_version != null) { + data.group_policy_version = this.group_policy_version; + } + if (this.status != null) { + data.status = this.status; + } + if (this.final_tally_result != null) { + data.final_tally_result = this.final_tally_result.toObject(); + } + if (this.voting_period_end != null) { + data.voting_period_end = this.voting_period_end.toObject(); + } + if (this.executor_result != null) { + data.executor_result = this.executor_result; + } + if (this.messages != null) { + data.messages = this.messages.map((item: dependency_5.google.protobuf.Any) => item.toObject()); + } + if (this.title != null) { + data.title = this.title; + } + if (this.summary != null) { + data.summary = this.summary; + } + 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.id != 0) + writer.writeUint64(1, this.id); + if (this.group_policy_address.length) + writer.writeString(2, this.group_policy_address); + if (this.metadata.length) + writer.writeString(3, this.metadata); + if (this.proposers.length) + writer.writeRepeatedString(4, this.proposers); + if (this.has_submit_time) + writer.writeMessage(5, this.submit_time, () => this.submit_time.serialize(writer)); + if (this.group_version != 0) + writer.writeUint64(6, this.group_version); + if (this.group_policy_version != 0) + writer.writeUint64(7, this.group_policy_version); + if (this.status != ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED) + writer.writeEnum(8, this.status); + if (this.has_final_tally_result) + writer.writeMessage(9, this.final_tally_result, () => this.final_tally_result.serialize(writer)); + if (this.has_voting_period_end) + writer.writeMessage(10, this.voting_period_end, () => this.voting_period_end.serialize(writer)); + if (this.executor_result != ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED) + writer.writeEnum(11, this.executor_result); + if (this.messages.length) + writer.writeRepeatedMessage(12, this.messages, (item: dependency_5.google.protobuf.Any) => item.serialize(writer)); + if (this.title.length) + writer.writeString(13, this.title); + if (this.summary.length) + writer.writeString(14, this.summary); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Proposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Proposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64(); + break; + case 2: + message.group_policy_address = reader.readString(); + break; + case 3: + message.metadata = reader.readString(); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readString()); + break; + case 5: + reader.readMessage(message.submit_time, () => message.submit_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 6: + message.group_version = reader.readUint64(); + break; + case 7: + message.group_policy_version = reader.readUint64(); + break; + case 8: + message.status = reader.readEnum(); + break; + case 9: + reader.readMessage(message.final_tally_result, () => message.final_tally_result = TallyResult.deserialize(reader)); + break; + case 10: + reader.readMessage(message.voting_period_end, () => message.voting_period_end = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 11: + message.executor_result = reader.readEnum(); + break; + case 12: + reader.readMessage(message.messages, () => pb_1.Message.addToRepeatedWrapperField(message, 12, dependency_5.google.protobuf.Any.deserialize(reader), dependency_5.google.protobuf.Any)); + break; + case 13: + message.title = reader.readString(); + break; + case 14: + message.summary = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Proposal { + return Proposal.deserialize(bytes); + } + } + export class TallyResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + yes_count?: string; + abstain_count?: string; + no_count?: string; + no_with_veto_count?: 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 ("yes_count" in data && data.yes_count != undefined) { + this.yes_count = data.yes_count; + } + if ("abstain_count" in data && data.abstain_count != undefined) { + this.abstain_count = data.abstain_count; + } + if ("no_count" in data && data.no_count != undefined) { + this.no_count = data.no_count; + } + if ("no_with_veto_count" in data && data.no_with_veto_count != undefined) { + this.no_with_veto_count = data.no_with_veto_count; + } + } + } + get yes_count() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set yes_count(value: string) { + pb_1.Message.setField(this, 1, value); + } + get abstain_count() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set abstain_count(value: string) { + pb_1.Message.setField(this, 2, value); + } + get no_count() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set no_count(value: string) { + pb_1.Message.setField(this, 3, value); + } + get no_with_veto_count() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set no_with_veto_count(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + yes_count?: string; + abstain_count?: string; + no_count?: string; + no_with_veto_count?: string; + }): TallyResult { + const message = new TallyResult({}); + if (data.yes_count != null) { + message.yes_count = data.yes_count; + } + if (data.abstain_count != null) { + message.abstain_count = data.abstain_count; + } + if (data.no_count != null) { + message.no_count = data.no_count; + } + if (data.no_with_veto_count != null) { + message.no_with_veto_count = data.no_with_veto_count; + } + return message; + } + toObject() { + const data: { + yes_count?: string; + abstain_count?: string; + no_count?: string; + no_with_veto_count?: string; + } = {}; + if (this.yes_count != null) { + data.yes_count = this.yes_count; + } + if (this.abstain_count != null) { + data.abstain_count = this.abstain_count; + } + if (this.no_count != null) { + data.no_count = this.no_count; + } + if (this.no_with_veto_count != null) { + data.no_with_veto_count = this.no_with_veto_count; + } + 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.yes_count.length) + writer.writeString(1, this.yes_count); + if (this.abstain_count.length) + writer.writeString(2, this.abstain_count); + if (this.no_count.length) + writer.writeString(3, this.no_count); + if (this.no_with_veto_count.length) + writer.writeString(4, this.no_with_veto_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TallyResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TallyResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.yes_count = reader.readString(); + break; + case 2: + message.abstain_count = reader.readString(); + break; + case 3: + message.no_count = reader.readString(); + break; + case 4: + message.no_with_veto_count = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TallyResult { + return TallyResult.deserialize(bytes); + } + } + export class Vote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proposal_id?: number; + voter?: string; + option?: VoteOption; + metadata?: string; + submit_time?: dependency_3.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("proposal_id" in data && data.proposal_id != undefined) { + this.proposal_id = data.proposal_id; + } + if ("voter" in data && data.voter != undefined) { + this.voter = data.voter; + } + if ("option" in data && data.option != undefined) { + this.option = data.option; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("submit_time" in data && data.submit_time != undefined) { + this.submit_time = data.submit_time; + } + } + } + get proposal_id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set proposal_id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get voter() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set voter(value: string) { + pb_1.Message.setField(this, 2, value); + } + get option() { + return pb_1.Message.getFieldWithDefault(this, 3, VoteOption.VOTE_OPTION_UNSPECIFIED) as VoteOption; + } + set option(value: VoteOption) { + pb_1.Message.setField(this, 3, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set metadata(value: string) { + pb_1.Message.setField(this, 4, value); + } + get submit_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5) as dependency_3.google.protobuf.Timestamp; + } + set submit_time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_submit_time() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + proposal_id?: number; + voter?: string; + option?: VoteOption; + metadata?: string; + submit_time?: ReturnType; + }): Vote { + const message = new Vote({}); + if (data.proposal_id != null) { + message.proposal_id = data.proposal_id; + } + if (data.voter != null) { + message.voter = data.voter; + } + if (data.option != null) { + message.option = data.option; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + if (data.submit_time != null) { + message.submit_time = dependency_3.google.protobuf.Timestamp.fromObject(data.submit_time); + } + return message; + } + toObject() { + const data: { + proposal_id?: number; + voter?: string; + option?: VoteOption; + metadata?: string; + submit_time?: ReturnType; + } = {}; + if (this.proposal_id != null) { + data.proposal_id = this.proposal_id; + } + if (this.voter != null) { + data.voter = this.voter; + } + if (this.option != null) { + data.option = this.option; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + if (this.submit_time != null) { + data.submit_time = this.submit_time.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.proposal_id != 0) + writer.writeUint64(1, this.proposal_id); + if (this.voter.length) + writer.writeString(2, this.voter); + if (this.option != VoteOption.VOTE_OPTION_UNSPECIFIED) + writer.writeEnum(3, this.option); + if (this.metadata.length) + writer.writeString(4, this.metadata); + if (this.has_submit_time) + writer.writeMessage(5, this.submit_time, () => this.submit_time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Vote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Vote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.proposal_id = reader.readUint64(); + break; + case 2: + message.voter = reader.readString(); + break; + case 3: + message.option = reader.readEnum(); + break; + case 4: + message.metadata = reader.readString(); + break; + case 5: + reader.readMessage(message.submit_time, () => message.submit_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Vote { + return Vote.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/group/v1/types_pb.d.ts b/codegen/cosmos/group/v1/types_pb.d.ts similarity index 100% rename from proto/cosmos/group/v1/types_pb.d.ts rename to codegen/cosmos/group/v1/types_pb.d.ts diff --git a/proto/cosmos/group/v1/types_pb.js b/codegen/cosmos/group/v1/types_pb.js similarity index 100% rename from proto/cosmos/group/v1/types_pb.js rename to codegen/cosmos/group/v1/types_pb.js diff --git a/proto/cosmos/group/v1/types_pb_service.d.ts b/codegen/cosmos/group/v1/types_pb_service.d.ts similarity index 100% rename from proto/cosmos/group/v1/types_pb_service.d.ts rename to codegen/cosmos/group/v1/types_pb_service.d.ts diff --git a/proto/cosmos/group/v1/types_pb_service.js b/codegen/cosmos/group/v1/types_pb_service.js similarity index 100% rename from proto/cosmos/group/v1/types_pb_service.js rename to codegen/cosmos/group/v1/types_pb_service.js diff --git a/codegen/cosmos/ics23/v1/proofs.ts b/codegen/cosmos/ics23/v1/proofs.ts new file mode 100644 index 0000000..fc10649 --- /dev/null +++ b/codegen/cosmos/ics23/v1/proofs.ts @@ -0,0 +1,1716 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/ics23/v1/proofs.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace cosmos.ics23.v1 { + export enum HashOp { + NO_HASH = 0, + SHA256 = 1, + SHA512 = 2, + KECCAK256 = 3, + RIPEMD160 = 4, + BITCOIN = 5, + SHA512_256 = 6, + BLAKE2B_512 = 7, + BLAKE2S_256 = 8, + BLAKE3 = 9 + } + export enum LengthOp { + NO_PREFIX = 0, + VAR_PROTO = 1, + VAR_RLP = 2, + FIXED32_BIG = 3, + FIXED32_LITTLE = 4, + FIXED64_BIG = 5, + FIXED64_LITTLE = 6, + REQUIRE_32_BYTES = 7, + REQUIRE_64_BYTES = 8 + } + export class ExistenceProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + value?: Uint8Array; + leaf?: LeafOp; + path?: InnerOp[]; + }) { + 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 ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("leaf" in data && data.leaf != undefined) { + this.leaf = data.leaf; + } + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get leaf() { + return pb_1.Message.getWrapperField(this, LeafOp, 3) as LeafOp; + } + set leaf(value: LeafOp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_leaf() { + return pb_1.Message.getField(this, 3) != null; + } + get path() { + return pb_1.Message.getRepeatedWrapperField(this, InnerOp, 4) as InnerOp[]; + } + set path(value: InnerOp[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + key?: Uint8Array; + value?: Uint8Array; + leaf?: ReturnType; + path?: ReturnType[]; + }): ExistenceProof { + const message = new ExistenceProof({}); + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + if (data.leaf != null) { + message.leaf = LeafOp.fromObject(data.leaf); + } + if (data.path != null) { + message.path = data.path.map(item => InnerOp.fromObject(item)); + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + value?: Uint8Array; + leaf?: ReturnType; + path?: ReturnType[]; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + if (this.leaf != null) { + data.leaf = this.leaf.toObject(); + } + if (this.path != null) { + data.path = this.path.map((item: InnerOp) => item.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.key.length) + writer.writeBytes(1, this.key); + if (this.value.length) + writer.writeBytes(2, this.value); + if (this.has_leaf) + writer.writeMessage(3, this.leaf, () => this.leaf.serialize(writer)); + if (this.path.length) + writer.writeRepeatedMessage(4, this.path, (item: InnerOp) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExistenceProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExistenceProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + case 2: + message.value = reader.readBytes(); + break; + case 3: + reader.readMessage(message.leaf, () => message.leaf = LeafOp.deserialize(reader)); + break; + case 4: + reader.readMessage(message.path, () => pb_1.Message.addToRepeatedWrapperField(message, 4, InnerOp.deserialize(reader), InnerOp)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ExistenceProof { + return ExistenceProof.deserialize(bytes); + } + } + export class NonExistenceProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + left?: ExistenceProof; + right?: ExistenceProof; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("left" in data && data.left != undefined) { + this.left = data.left; + } + if ("right" in data && data.right != undefined) { + this.right = data.right; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get left() { + return pb_1.Message.getWrapperField(this, ExistenceProof, 2) as ExistenceProof; + } + set left(value: ExistenceProof) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_left() { + return pb_1.Message.getField(this, 2) != null; + } + get right() { + return pb_1.Message.getWrapperField(this, ExistenceProof, 3) as ExistenceProof; + } + set right(value: ExistenceProof) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_right() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + key?: Uint8Array; + left?: ReturnType; + right?: ReturnType; + }): NonExistenceProof { + const message = new NonExistenceProof({}); + if (data.key != null) { + message.key = data.key; + } + if (data.left != null) { + message.left = ExistenceProof.fromObject(data.left); + } + if (data.right != null) { + message.right = ExistenceProof.fromObject(data.right); + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + left?: ReturnType; + right?: ReturnType; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.left != null) { + data.left = this.left.toObject(); + } + if (this.right != null) { + data.right = this.right.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.key.length) + writer.writeBytes(1, this.key); + if (this.has_left) + writer.writeMessage(2, this.left, () => this.left.serialize(writer)); + if (this.has_right) + writer.writeMessage(3, this.right, () => this.right.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NonExistenceProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NonExistenceProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + case 2: + reader.readMessage(message.left, () => message.left = ExistenceProof.deserialize(reader)); + break; + case 3: + reader.readMessage(message.right, () => message.right = ExistenceProof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): NonExistenceProof { + return NonExistenceProof.deserialize(bytes); + } + } + export class CommitmentProof extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2, 3, 4]]; + constructor(data?: any[] | ({} & (({ + exist?: ExistenceProof; + nonexist?: never; + batch?: never; + compressed?: never; + } | { + exist?: never; + nonexist?: NonExistenceProof; + batch?: never; + compressed?: never; + } | { + exist?: never; + nonexist?: never; + batch?: BatchProof; + compressed?: never; + } | { + exist?: never; + nonexist?: never; + batch?: never; + compressed?: CompressedBatchProof; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("exist" in data && data.exist != undefined) { + this.exist = data.exist; + } + if ("nonexist" in data && data.nonexist != undefined) { + this.nonexist = data.nonexist; + } + if ("batch" in data && data.batch != undefined) { + this.batch = data.batch; + } + if ("compressed" in data && data.compressed != undefined) { + this.compressed = data.compressed; + } + } + } + get exist() { + return pb_1.Message.getWrapperField(this, ExistenceProof, 1) as ExistenceProof; + } + set exist(value: ExistenceProof) { + pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); + } + get has_exist() { + return pb_1.Message.getField(this, 1) != null; + } + get nonexist() { + return pb_1.Message.getWrapperField(this, NonExistenceProof, 2) as NonExistenceProof; + } + set nonexist(value: NonExistenceProof) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_nonexist() { + return pb_1.Message.getField(this, 2) != null; + } + get batch() { + return pb_1.Message.getWrapperField(this, BatchProof, 3) as BatchProof; + } + set batch(value: BatchProof) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_batch() { + return pb_1.Message.getField(this, 3) != null; + } + get compressed() { + return pb_1.Message.getWrapperField(this, CompressedBatchProof, 4) as CompressedBatchProof; + } + set compressed(value: CompressedBatchProof) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_compressed() { + return pb_1.Message.getField(this, 4) != null; + } + get proof() { + const cases: { + [index: number]: "none" | "exist" | "nonexist" | "batch" | "compressed"; + } = { + 0: "none", + 1: "exist", + 2: "nonexist", + 3: "batch", + 4: "compressed" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4])]; + } + static fromObject(data: { + exist?: ReturnType; + nonexist?: ReturnType; + batch?: ReturnType; + compressed?: ReturnType; + }): CommitmentProof { + const message = new CommitmentProof({}); + if (data.exist != null) { + message.exist = ExistenceProof.fromObject(data.exist); + } + if (data.nonexist != null) { + message.nonexist = NonExistenceProof.fromObject(data.nonexist); + } + if (data.batch != null) { + message.batch = BatchProof.fromObject(data.batch); + } + if (data.compressed != null) { + message.compressed = CompressedBatchProof.fromObject(data.compressed); + } + return message; + } + toObject() { + const data: { + exist?: ReturnType; + nonexist?: ReturnType; + batch?: ReturnType; + compressed?: ReturnType; + } = {}; + if (this.exist != null) { + data.exist = this.exist.toObject(); + } + if (this.nonexist != null) { + data.nonexist = this.nonexist.toObject(); + } + if (this.batch != null) { + data.batch = this.batch.toObject(); + } + if (this.compressed != null) { + data.compressed = this.compressed.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_exist) + writer.writeMessage(1, this.exist, () => this.exist.serialize(writer)); + if (this.has_nonexist) + writer.writeMessage(2, this.nonexist, () => this.nonexist.serialize(writer)); + if (this.has_batch) + writer.writeMessage(3, this.batch, () => this.batch.serialize(writer)); + if (this.has_compressed) + writer.writeMessage(4, this.compressed, () => this.compressed.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommitmentProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommitmentProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.exist, () => message.exist = ExistenceProof.deserialize(reader)); + break; + case 2: + reader.readMessage(message.nonexist, () => message.nonexist = NonExistenceProof.deserialize(reader)); + break; + case 3: + reader.readMessage(message.batch, () => message.batch = BatchProof.deserialize(reader)); + break; + case 4: + reader.readMessage(message.compressed, () => message.compressed = CompressedBatchProof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommitmentProof { + return CommitmentProof.deserialize(bytes); + } + } + export class LeafOp extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: HashOp; + prehash_key?: HashOp; + prehash_value?: HashOp; + length?: LengthOp; + prefix?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + if ("prehash_key" in data && data.prehash_key != undefined) { + this.prehash_key = data.prehash_key; + } + if ("prehash_value" in data && data.prehash_value != undefined) { + this.prehash_value = data.prehash_value; + } + if ("length" in data && data.length != undefined) { + this.length = data.length; + } + if ("prefix" in data && data.prefix != undefined) { + this.prefix = data.prefix; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 1, HashOp.NO_HASH) as HashOp; + } + set hash(value: HashOp) { + pb_1.Message.setField(this, 1, value); + } + get prehash_key() { + return pb_1.Message.getFieldWithDefault(this, 2, HashOp.NO_HASH) as HashOp; + } + set prehash_key(value: HashOp) { + pb_1.Message.setField(this, 2, value); + } + get prehash_value() { + return pb_1.Message.getFieldWithDefault(this, 3, HashOp.NO_HASH) as HashOp; + } + set prehash_value(value: HashOp) { + pb_1.Message.setField(this, 3, value); + } + get length() { + return pb_1.Message.getFieldWithDefault(this, 4, LengthOp.NO_PREFIX) as LengthOp; + } + set length(value: LengthOp) { + pb_1.Message.setField(this, 4, value); + } + get prefix() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set prefix(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + hash?: HashOp; + prehash_key?: HashOp; + prehash_value?: HashOp; + length?: LengthOp; + prefix?: Uint8Array; + }): LeafOp { + const message = new LeafOp({}); + if (data.hash != null) { + message.hash = data.hash; + } + if (data.prehash_key != null) { + message.prehash_key = data.prehash_key; + } + if (data.prehash_value != null) { + message.prehash_value = data.prehash_value; + } + if (data.length != null) { + message.length = data.length; + } + if (data.prefix != null) { + message.prefix = data.prefix; + } + return message; + } + toObject() { + const data: { + hash?: HashOp; + prehash_key?: HashOp; + prehash_value?: HashOp; + length?: LengthOp; + prefix?: Uint8Array; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + if (this.prehash_key != null) { + data.prehash_key = this.prehash_key; + } + if (this.prehash_value != null) { + data.prehash_value = this.prehash_value; + } + if (this.length != null) { + data.length = this.length; + } + if (this.prefix != null) { + data.prefix = this.prefix; + } + 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.hash != HashOp.NO_HASH) + writer.writeEnum(1, this.hash); + if (this.prehash_key != HashOp.NO_HASH) + writer.writeEnum(2, this.prehash_key); + if (this.prehash_value != HashOp.NO_HASH) + writer.writeEnum(3, this.prehash_value); + if (this.length != LengthOp.NO_PREFIX) + writer.writeEnum(4, this.length); + if (this.prefix.length) + writer.writeBytes(5, this.prefix); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LeafOp { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LeafOp(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hash = reader.readEnum(); + break; + case 2: + message.prehash_key = reader.readEnum(); + break; + case 3: + message.prehash_value = reader.readEnum(); + break; + case 4: + message.length = reader.readEnum(); + break; + case 5: + message.prefix = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): LeafOp { + return LeafOp.deserialize(bytes); + } + } + export class InnerOp extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: HashOp; + prefix?: Uint8Array; + suffix?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + if ("prefix" in data && data.prefix != undefined) { + this.prefix = data.prefix; + } + if ("suffix" in data && data.suffix != undefined) { + this.suffix = data.suffix; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 1, HashOp.NO_HASH) as HashOp; + } + set hash(value: HashOp) { + pb_1.Message.setField(this, 1, value); + } + get prefix() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set prefix(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get suffix() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set suffix(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + hash?: HashOp; + prefix?: Uint8Array; + suffix?: Uint8Array; + }): InnerOp { + const message = new InnerOp({}); + if (data.hash != null) { + message.hash = data.hash; + } + if (data.prefix != null) { + message.prefix = data.prefix; + } + if (data.suffix != null) { + message.suffix = data.suffix; + } + return message; + } + toObject() { + const data: { + hash?: HashOp; + prefix?: Uint8Array; + suffix?: Uint8Array; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + if (this.prefix != null) { + data.prefix = this.prefix; + } + if (this.suffix != null) { + data.suffix = this.suffix; + } + 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.hash != HashOp.NO_HASH) + writer.writeEnum(1, this.hash); + if (this.prefix.length) + writer.writeBytes(2, this.prefix); + if (this.suffix.length) + writer.writeBytes(3, this.suffix); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InnerOp { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InnerOp(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hash = reader.readEnum(); + break; + case 2: + message.prefix = reader.readBytes(); + break; + case 3: + message.suffix = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InnerOp { + return InnerOp.deserialize(bytes); + } + } + export class ProofSpec extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + leaf_spec?: LeafOp; + inner_spec?: InnerSpec; + max_depth?: number; + min_depth?: number; + prehash_key_before_comparison?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("leaf_spec" in data && data.leaf_spec != undefined) { + this.leaf_spec = data.leaf_spec; + } + if ("inner_spec" in data && data.inner_spec != undefined) { + this.inner_spec = data.inner_spec; + } + if ("max_depth" in data && data.max_depth != undefined) { + this.max_depth = data.max_depth; + } + if ("min_depth" in data && data.min_depth != undefined) { + this.min_depth = data.min_depth; + } + if ("prehash_key_before_comparison" in data && data.prehash_key_before_comparison != undefined) { + this.prehash_key_before_comparison = data.prehash_key_before_comparison; + } + } + } + get leaf_spec() { + return pb_1.Message.getWrapperField(this, LeafOp, 1) as LeafOp; + } + set leaf_spec(value: LeafOp) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_leaf_spec() { + return pb_1.Message.getField(this, 1) != null; + } + get inner_spec() { + return pb_1.Message.getWrapperField(this, InnerSpec, 2) as InnerSpec; + } + set inner_spec(value: InnerSpec) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_inner_spec() { + return pb_1.Message.getField(this, 2) != null; + } + get max_depth() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set max_depth(value: number) { + pb_1.Message.setField(this, 3, value); + } + get min_depth() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set min_depth(value: number) { + pb_1.Message.setField(this, 4, value); + } + get prehash_key_before_comparison() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set prehash_key_before_comparison(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + leaf_spec?: ReturnType; + inner_spec?: ReturnType; + max_depth?: number; + min_depth?: number; + prehash_key_before_comparison?: boolean; + }): ProofSpec { + const message = new ProofSpec({}); + if (data.leaf_spec != null) { + message.leaf_spec = LeafOp.fromObject(data.leaf_spec); + } + if (data.inner_spec != null) { + message.inner_spec = InnerSpec.fromObject(data.inner_spec); + } + if (data.max_depth != null) { + message.max_depth = data.max_depth; + } + if (data.min_depth != null) { + message.min_depth = data.min_depth; + } + if (data.prehash_key_before_comparison != null) { + message.prehash_key_before_comparison = data.prehash_key_before_comparison; + } + return message; + } + toObject() { + const data: { + leaf_spec?: ReturnType; + inner_spec?: ReturnType; + max_depth?: number; + min_depth?: number; + prehash_key_before_comparison?: boolean; + } = {}; + if (this.leaf_spec != null) { + data.leaf_spec = this.leaf_spec.toObject(); + } + if (this.inner_spec != null) { + data.inner_spec = this.inner_spec.toObject(); + } + if (this.max_depth != null) { + data.max_depth = this.max_depth; + } + if (this.min_depth != null) { + data.min_depth = this.min_depth; + } + if (this.prehash_key_before_comparison != null) { + data.prehash_key_before_comparison = this.prehash_key_before_comparison; + } + 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_leaf_spec) + writer.writeMessage(1, this.leaf_spec, () => this.leaf_spec.serialize(writer)); + if (this.has_inner_spec) + writer.writeMessage(2, this.inner_spec, () => this.inner_spec.serialize(writer)); + if (this.max_depth != 0) + writer.writeInt32(3, this.max_depth); + if (this.min_depth != 0) + writer.writeInt32(4, this.min_depth); + if (this.prehash_key_before_comparison != false) + writer.writeBool(5, this.prehash_key_before_comparison); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProofSpec { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProofSpec(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.leaf_spec, () => message.leaf_spec = LeafOp.deserialize(reader)); + break; + case 2: + reader.readMessage(message.inner_spec, () => message.inner_spec = InnerSpec.deserialize(reader)); + break; + case 3: + message.max_depth = reader.readInt32(); + break; + case 4: + message.min_depth = reader.readInt32(); + break; + case 5: + message.prehash_key_before_comparison = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProofSpec { + return ProofSpec.deserialize(bytes); + } + } + export class InnerSpec extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + child_order?: number[]; + child_size?: number; + min_prefix_length?: number; + max_prefix_length?: number; + empty_child?: Uint8Array; + hash?: HashOp; + }) { + 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 ("child_order" in data && data.child_order != undefined) { + this.child_order = data.child_order; + } + if ("child_size" in data && data.child_size != undefined) { + this.child_size = data.child_size; + } + if ("min_prefix_length" in data && data.min_prefix_length != undefined) { + this.min_prefix_length = data.min_prefix_length; + } + if ("max_prefix_length" in data && data.max_prefix_length != undefined) { + this.max_prefix_length = data.max_prefix_length; + } + if ("empty_child" in data && data.empty_child != undefined) { + this.empty_child = data.empty_child; + } + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + } + } + get child_order() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set child_order(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + get child_size() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set child_size(value: number) { + pb_1.Message.setField(this, 2, value); + } + get min_prefix_length() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set min_prefix_length(value: number) { + pb_1.Message.setField(this, 3, value); + } + get max_prefix_length() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set max_prefix_length(value: number) { + pb_1.Message.setField(this, 4, value); + } + get empty_child() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set empty_child(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 6, HashOp.NO_HASH) as HashOp; + } + set hash(value: HashOp) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + child_order?: number[]; + child_size?: number; + min_prefix_length?: number; + max_prefix_length?: number; + empty_child?: Uint8Array; + hash?: HashOp; + }): InnerSpec { + const message = new InnerSpec({}); + if (data.child_order != null) { + message.child_order = data.child_order; + } + if (data.child_size != null) { + message.child_size = data.child_size; + } + if (data.min_prefix_length != null) { + message.min_prefix_length = data.min_prefix_length; + } + if (data.max_prefix_length != null) { + message.max_prefix_length = data.max_prefix_length; + } + if (data.empty_child != null) { + message.empty_child = data.empty_child; + } + if (data.hash != null) { + message.hash = data.hash; + } + return message; + } + toObject() { + const data: { + child_order?: number[]; + child_size?: number; + min_prefix_length?: number; + max_prefix_length?: number; + empty_child?: Uint8Array; + hash?: HashOp; + } = {}; + if (this.child_order != null) { + data.child_order = this.child_order; + } + if (this.child_size != null) { + data.child_size = this.child_size; + } + if (this.min_prefix_length != null) { + data.min_prefix_length = this.min_prefix_length; + } + if (this.max_prefix_length != null) { + data.max_prefix_length = this.max_prefix_length; + } + if (this.empty_child != null) { + data.empty_child = this.empty_child; + } + if (this.hash != null) { + data.hash = this.hash; + } + 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.child_order.length) + writer.writePackedInt32(1, this.child_order); + if (this.child_size != 0) + writer.writeInt32(2, this.child_size); + if (this.min_prefix_length != 0) + writer.writeInt32(3, this.min_prefix_length); + if (this.max_prefix_length != 0) + writer.writeInt32(4, this.max_prefix_length); + if (this.empty_child.length) + writer.writeBytes(5, this.empty_child); + if (this.hash != HashOp.NO_HASH) + writer.writeEnum(6, this.hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InnerSpec { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InnerSpec(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.child_order = reader.readPackedInt32(); + break; + case 2: + message.child_size = reader.readInt32(); + break; + case 3: + message.min_prefix_length = reader.readInt32(); + break; + case 4: + message.max_prefix_length = reader.readInt32(); + break; + case 5: + message.empty_child = reader.readBytes(); + break; + case 6: + message.hash = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InnerSpec { + return InnerSpec.deserialize(bytes); + } + } + export class BatchProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + entries?: BatchEntry[]; + }) { + 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 ("entries" in data && data.entries != undefined) { + this.entries = data.entries; + } + } + } + get entries() { + return pb_1.Message.getRepeatedWrapperField(this, BatchEntry, 1) as BatchEntry[]; + } + set entries(value: BatchEntry[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + entries?: ReturnType[]; + }): BatchProof { + const message = new BatchProof({}); + if (data.entries != null) { + message.entries = data.entries.map(item => BatchEntry.fromObject(item)); + } + return message; + } + toObject() { + const data: { + entries?: ReturnType[]; + } = {}; + if (this.entries != null) { + data.entries = this.entries.map((item: BatchEntry) => item.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.entries.length) + writer.writeRepeatedMessage(1, this.entries, (item: BatchEntry) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BatchProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BatchProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.entries, () => pb_1.Message.addToRepeatedWrapperField(message, 1, BatchEntry.deserialize(reader), BatchEntry)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BatchProof { + return BatchProof.deserialize(bytes); + } + } + export class BatchEntry extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2]]; + constructor(data?: any[] | ({} & (({ + exist?: ExistenceProof; + nonexist?: never; + } | { + exist?: never; + nonexist?: NonExistenceProof; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("exist" in data && data.exist != undefined) { + this.exist = data.exist; + } + if ("nonexist" in data && data.nonexist != undefined) { + this.nonexist = data.nonexist; + } + } + } + get exist() { + return pb_1.Message.getWrapperField(this, ExistenceProof, 1) as ExistenceProof; + } + set exist(value: ExistenceProof) { + pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); + } + get has_exist() { + return pb_1.Message.getField(this, 1) != null; + } + get nonexist() { + return pb_1.Message.getWrapperField(this, NonExistenceProof, 2) as NonExistenceProof; + } + set nonexist(value: NonExistenceProof) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_nonexist() { + return pb_1.Message.getField(this, 2) != null; + } + get proof() { + const cases: { + [index: number]: "none" | "exist" | "nonexist"; + } = { + 0: "none", + 1: "exist", + 2: "nonexist" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2])]; + } + static fromObject(data: { + exist?: ReturnType; + nonexist?: ReturnType; + }): BatchEntry { + const message = new BatchEntry({}); + if (data.exist != null) { + message.exist = ExistenceProof.fromObject(data.exist); + } + if (data.nonexist != null) { + message.nonexist = NonExistenceProof.fromObject(data.nonexist); + } + return message; + } + toObject() { + const data: { + exist?: ReturnType; + nonexist?: ReturnType; + } = {}; + if (this.exist != null) { + data.exist = this.exist.toObject(); + } + if (this.nonexist != null) { + data.nonexist = this.nonexist.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_exist) + writer.writeMessage(1, this.exist, () => this.exist.serialize(writer)); + if (this.has_nonexist) + writer.writeMessage(2, this.nonexist, () => this.nonexist.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BatchEntry { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BatchEntry(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.exist, () => message.exist = ExistenceProof.deserialize(reader)); + break; + case 2: + reader.readMessage(message.nonexist, () => message.nonexist = NonExistenceProof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BatchEntry { + return BatchEntry.deserialize(bytes); + } + } + export class CompressedBatchProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + entries?: CompressedBatchEntry[]; + lookup_inners?: InnerOp[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("entries" in data && data.entries != undefined) { + this.entries = data.entries; + } + if ("lookup_inners" in data && data.lookup_inners != undefined) { + this.lookup_inners = data.lookup_inners; + } + } + } + get entries() { + return pb_1.Message.getRepeatedWrapperField(this, CompressedBatchEntry, 1) as CompressedBatchEntry[]; + } + set entries(value: CompressedBatchEntry[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get lookup_inners() { + return pb_1.Message.getRepeatedWrapperField(this, InnerOp, 2) as InnerOp[]; + } + set lookup_inners(value: InnerOp[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + entries?: ReturnType[]; + lookup_inners?: ReturnType[]; + }): CompressedBatchProof { + const message = new CompressedBatchProof({}); + if (data.entries != null) { + message.entries = data.entries.map(item => CompressedBatchEntry.fromObject(item)); + } + if (data.lookup_inners != null) { + message.lookup_inners = data.lookup_inners.map(item => InnerOp.fromObject(item)); + } + return message; + } + toObject() { + const data: { + entries?: ReturnType[]; + lookup_inners?: ReturnType[]; + } = {}; + if (this.entries != null) { + data.entries = this.entries.map((item: CompressedBatchEntry) => item.toObject()); + } + if (this.lookup_inners != null) { + data.lookup_inners = this.lookup_inners.map((item: InnerOp) => item.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.entries.length) + writer.writeRepeatedMessage(1, this.entries, (item: CompressedBatchEntry) => item.serialize(writer)); + if (this.lookup_inners.length) + writer.writeRepeatedMessage(2, this.lookup_inners, (item: InnerOp) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CompressedBatchProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CompressedBatchProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.entries, () => pb_1.Message.addToRepeatedWrapperField(message, 1, CompressedBatchEntry.deserialize(reader), CompressedBatchEntry)); + break; + case 2: + reader.readMessage(message.lookup_inners, () => pb_1.Message.addToRepeatedWrapperField(message, 2, InnerOp.deserialize(reader), InnerOp)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CompressedBatchProof { + return CompressedBatchProof.deserialize(bytes); + } + } + export class CompressedBatchEntry extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2]]; + constructor(data?: any[] | ({} & (({ + exist?: CompressedExistenceProof; + nonexist?: never; + } | { + exist?: never; + nonexist?: CompressedNonExistenceProof; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("exist" in data && data.exist != undefined) { + this.exist = data.exist; + } + if ("nonexist" in data && data.nonexist != undefined) { + this.nonexist = data.nonexist; + } + } + } + get exist() { + return pb_1.Message.getWrapperField(this, CompressedExistenceProof, 1) as CompressedExistenceProof; + } + set exist(value: CompressedExistenceProof) { + pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); + } + get has_exist() { + return pb_1.Message.getField(this, 1) != null; + } + get nonexist() { + return pb_1.Message.getWrapperField(this, CompressedNonExistenceProof, 2) as CompressedNonExistenceProof; + } + set nonexist(value: CompressedNonExistenceProof) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_nonexist() { + return pb_1.Message.getField(this, 2) != null; + } + get proof() { + const cases: { + [index: number]: "none" | "exist" | "nonexist"; + } = { + 0: "none", + 1: "exist", + 2: "nonexist" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2])]; + } + static fromObject(data: { + exist?: ReturnType; + nonexist?: ReturnType; + }): CompressedBatchEntry { + const message = new CompressedBatchEntry({}); + if (data.exist != null) { + message.exist = CompressedExistenceProof.fromObject(data.exist); + } + if (data.nonexist != null) { + message.nonexist = CompressedNonExistenceProof.fromObject(data.nonexist); + } + return message; + } + toObject() { + const data: { + exist?: ReturnType; + nonexist?: ReturnType; + } = {}; + if (this.exist != null) { + data.exist = this.exist.toObject(); + } + if (this.nonexist != null) { + data.nonexist = this.nonexist.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_exist) + writer.writeMessage(1, this.exist, () => this.exist.serialize(writer)); + if (this.has_nonexist) + writer.writeMessage(2, this.nonexist, () => this.nonexist.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CompressedBatchEntry { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CompressedBatchEntry(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.exist, () => message.exist = CompressedExistenceProof.deserialize(reader)); + break; + case 2: + reader.readMessage(message.nonexist, () => message.nonexist = CompressedNonExistenceProof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CompressedBatchEntry { + return CompressedBatchEntry.deserialize(bytes); + } + } + export class CompressedExistenceProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + value?: Uint8Array; + leaf?: LeafOp; + path?: 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 ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("leaf" in data && data.leaf != undefined) { + this.leaf = data.leaf; + } + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get leaf() { + return pb_1.Message.getWrapperField(this, LeafOp, 3) as LeafOp; + } + set leaf(value: LeafOp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_leaf() { + return pb_1.Message.getField(this, 3) != null; + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as number[]; + } + set path(value: number[]) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + key?: Uint8Array; + value?: Uint8Array; + leaf?: ReturnType; + path?: number[]; + }): CompressedExistenceProof { + const message = new CompressedExistenceProof({}); + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + if (data.leaf != null) { + message.leaf = LeafOp.fromObject(data.leaf); + } + if (data.path != null) { + message.path = data.path; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + value?: Uint8Array; + leaf?: ReturnType; + path?: number[]; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + if (this.leaf != null) { + data.leaf = this.leaf.toObject(); + } + if (this.path != null) { + data.path = this.path; + } + 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.key.length) + writer.writeBytes(1, this.key); + if (this.value.length) + writer.writeBytes(2, this.value); + if (this.has_leaf) + writer.writeMessage(3, this.leaf, () => this.leaf.serialize(writer)); + if (this.path.length) + writer.writePackedInt32(4, this.path); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CompressedExistenceProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CompressedExistenceProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + case 2: + message.value = reader.readBytes(); + break; + case 3: + reader.readMessage(message.leaf, () => message.leaf = LeafOp.deserialize(reader)); + break; + case 4: + message.path = reader.readPackedInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CompressedExistenceProof { + return CompressedExistenceProof.deserialize(bytes); + } + } + export class CompressedNonExistenceProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + left?: CompressedExistenceProof; + right?: CompressedExistenceProof; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("left" in data && data.left != undefined) { + this.left = data.left; + } + if ("right" in data && data.right != undefined) { + this.right = data.right; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get left() { + return pb_1.Message.getWrapperField(this, CompressedExistenceProof, 2) as CompressedExistenceProof; + } + set left(value: CompressedExistenceProof) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_left() { + return pb_1.Message.getField(this, 2) != null; + } + get right() { + return pb_1.Message.getWrapperField(this, CompressedExistenceProof, 3) as CompressedExistenceProof; + } + set right(value: CompressedExistenceProof) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_right() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + key?: Uint8Array; + left?: ReturnType; + right?: ReturnType; + }): CompressedNonExistenceProof { + const message = new CompressedNonExistenceProof({}); + if (data.key != null) { + message.key = data.key; + } + if (data.left != null) { + message.left = CompressedExistenceProof.fromObject(data.left); + } + if (data.right != null) { + message.right = CompressedExistenceProof.fromObject(data.right); + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + left?: ReturnType; + right?: ReturnType; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.left != null) { + data.left = this.left.toObject(); + } + if (this.right != null) { + data.right = this.right.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.key.length) + writer.writeBytes(1, this.key); + if (this.has_left) + writer.writeMessage(2, this.left, () => this.left.serialize(writer)); + if (this.has_right) + writer.writeMessage(3, this.right, () => this.right.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CompressedNonExistenceProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CompressedNonExistenceProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + case 2: + reader.readMessage(message.left, () => message.left = CompressedExistenceProof.deserialize(reader)); + break; + case 3: + reader.readMessage(message.right, () => message.right = CompressedExistenceProof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CompressedNonExistenceProof { + return CompressedNonExistenceProof.deserialize(bytes); + } + } +} diff --git a/codegen/cosmos/mint/module/v1/module.ts b/codegen/cosmos/mint/module/v1/module.ts new file mode 100644 index 0000000..79e39b8 --- /dev/null +++ b/codegen/cosmos/mint/module/v1/module.ts @@ -0,0 +1,99 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/mint/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.mint.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fee_collector_name?: string; + authority?: 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 ("fee_collector_name" in data && data.fee_collector_name != undefined) { + this.fee_collector_name = data.fee_collector_name; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get fee_collector_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fee_collector_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + fee_collector_name?: string; + authority?: string; + }): Module { + const message = new Module({}); + if (data.fee_collector_name != null) { + message.fee_collector_name = data.fee_collector_name; + } + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + fee_collector_name?: string; + authority?: string; + } = {}; + if (this.fee_collector_name != null) { + data.fee_collector_name = this.fee_collector_name; + } + if (this.authority != null) { + data.authority = this.authority; + } + 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.fee_collector_name.length) + writer.writeString(1, this.fee_collector_name); + if (this.authority.length) + writer.writeString(2, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fee_collector_name = reader.readString(); + break; + case 2: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/mint/module/v1/module_pb.d.ts b/codegen/cosmos/mint/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/mint/module/v1/module_pb.d.ts rename to codegen/cosmos/mint/module/v1/module_pb.d.ts diff --git a/proto/cosmos/mint/module/v1/module_pb.js b/codegen/cosmos/mint/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/mint/module/v1/module_pb.js rename to codegen/cosmos/mint/module/v1/module_pb.js diff --git a/proto/cosmos/mint/module/v1/module_pb_service.d.ts b/codegen/cosmos/mint/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/mint/module/v1/module_pb_service.d.ts rename to codegen/cosmos/mint/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/mint/module/v1/module_pb_service.js b/codegen/cosmos/mint/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/mint/module/v1/module_pb_service.js rename to codegen/cosmos/mint/module/v1/module_pb_service.js diff --git a/codegen/cosmos/mint/v1beta1/genesis.ts b/codegen/cosmos/mint/v1beta1/genesis.ts new file mode 100644 index 0000000..d1051e1 --- /dev/null +++ b/codegen/cosmos/mint/v1beta1/genesis.ts @@ -0,0 +1,107 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/mint/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./mint"; +import * as dependency_3 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.mint.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + minter?: dependency_2.cosmos.mint.v1beta1.Minter; + params?: dependency_2.cosmos.mint.v1beta1.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 ("minter" in data && data.minter != undefined) { + this.minter = data.minter; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get minter() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.mint.v1beta1.Minter, 1) as dependency_2.cosmos.mint.v1beta1.Minter; + } + set minter(value: dependency_2.cosmos.mint.v1beta1.Minter) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_minter() { + return pb_1.Message.getField(this, 1) != null; + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.mint.v1beta1.Params, 2) as dependency_2.cosmos.mint.v1beta1.Params; + } + set params(value: dependency_2.cosmos.mint.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + minter?: ReturnType; + params?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.minter != null) { + message.minter = dependency_2.cosmos.mint.v1beta1.Minter.fromObject(data.minter); + } + if (data.params != null) { + message.params = dependency_2.cosmos.mint.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + minter?: ReturnType; + params?: ReturnType; + } = {}; + if (this.minter != null) { + data.minter = this.minter.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_minter) + writer.writeMessage(1, this.minter, () => this.minter.serialize(writer)); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.minter, () => message.minter = dependency_2.cosmos.mint.v1beta1.Minter.deserialize(reader)); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_2.cosmos.mint.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/mint/v1beta1/genesis_pb.d.ts b/codegen/cosmos/mint/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/mint/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/mint/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/mint/v1beta1/genesis_pb.js b/codegen/cosmos/mint/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/mint/v1beta1/genesis_pb.js rename to codegen/cosmos/mint/v1beta1/genesis_pb.js diff --git a/proto/cosmos/mint/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/mint/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/mint/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/mint/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/mint/v1beta1/genesis_pb_service.js b/codegen/cosmos/mint/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/mint/v1beta1/genesis_pb_service.js rename to codegen/cosmos/mint/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/mint/v1beta1/mint.ts b/codegen/cosmos/mint/v1beta1/mint.ts new file mode 100644 index 0000000..f8254aa --- /dev/null +++ b/codegen/cosmos/mint/v1beta1/mint.ts @@ -0,0 +1,283 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/mint/v1beta1/mint.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.mint.v1beta1 { + export class Minter extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + inflation?: string; + annual_provisions?: 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 ("inflation" in data && data.inflation != undefined) { + this.inflation = data.inflation; + } + if ("annual_provisions" in data && data.annual_provisions != undefined) { + this.annual_provisions = data.annual_provisions; + } + } + } + get inflation() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set inflation(value: string) { + pb_1.Message.setField(this, 1, value); + } + get annual_provisions() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set annual_provisions(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + inflation?: string; + annual_provisions?: string; + }): Minter { + const message = new Minter({}); + if (data.inflation != null) { + message.inflation = data.inflation; + } + if (data.annual_provisions != null) { + message.annual_provisions = data.annual_provisions; + } + return message; + } + toObject() { + const data: { + inflation?: string; + annual_provisions?: string; + } = {}; + if (this.inflation != null) { + data.inflation = this.inflation; + } + if (this.annual_provisions != null) { + data.annual_provisions = this.annual_provisions; + } + 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.inflation.length) + writer.writeString(1, this.inflation); + if (this.annual_provisions.length) + writer.writeString(2, this.annual_provisions); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Minter { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Minter(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.inflation = reader.readString(); + break; + case 2: + message.annual_provisions = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Minter { + return Minter.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + mint_denom?: string; + inflation_rate_change?: string; + inflation_max?: string; + inflation_min?: string; + goal_bonded?: string; + blocks_per_year?: 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 ("mint_denom" in data && data.mint_denom != undefined) { + this.mint_denom = data.mint_denom; + } + if ("inflation_rate_change" in data && data.inflation_rate_change != undefined) { + this.inflation_rate_change = data.inflation_rate_change; + } + if ("inflation_max" in data && data.inflation_max != undefined) { + this.inflation_max = data.inflation_max; + } + if ("inflation_min" in data && data.inflation_min != undefined) { + this.inflation_min = data.inflation_min; + } + if ("goal_bonded" in data && data.goal_bonded != undefined) { + this.goal_bonded = data.goal_bonded; + } + if ("blocks_per_year" in data && data.blocks_per_year != undefined) { + this.blocks_per_year = data.blocks_per_year; + } + } + } + get mint_denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set mint_denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + get inflation_rate_change() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set inflation_rate_change(value: string) { + pb_1.Message.setField(this, 2, value); + } + get inflation_max() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set inflation_max(value: string) { + pb_1.Message.setField(this, 3, value); + } + get inflation_min() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set inflation_min(value: string) { + pb_1.Message.setField(this, 4, value); + } + get goal_bonded() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set goal_bonded(value: string) { + pb_1.Message.setField(this, 5, value); + } + get blocks_per_year() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set blocks_per_year(value: number) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + mint_denom?: string; + inflation_rate_change?: string; + inflation_max?: string; + inflation_min?: string; + goal_bonded?: string; + blocks_per_year?: number; + }): Params { + const message = new Params({}); + if (data.mint_denom != null) { + message.mint_denom = data.mint_denom; + } + if (data.inflation_rate_change != null) { + message.inflation_rate_change = data.inflation_rate_change; + } + if (data.inflation_max != null) { + message.inflation_max = data.inflation_max; + } + if (data.inflation_min != null) { + message.inflation_min = data.inflation_min; + } + if (data.goal_bonded != null) { + message.goal_bonded = data.goal_bonded; + } + if (data.blocks_per_year != null) { + message.blocks_per_year = data.blocks_per_year; + } + return message; + } + toObject() { + const data: { + mint_denom?: string; + inflation_rate_change?: string; + inflation_max?: string; + inflation_min?: string; + goal_bonded?: string; + blocks_per_year?: number; + } = {}; + if (this.mint_denom != null) { + data.mint_denom = this.mint_denom; + } + if (this.inflation_rate_change != null) { + data.inflation_rate_change = this.inflation_rate_change; + } + if (this.inflation_max != null) { + data.inflation_max = this.inflation_max; + } + if (this.inflation_min != null) { + data.inflation_min = this.inflation_min; + } + if (this.goal_bonded != null) { + data.goal_bonded = this.goal_bonded; + } + if (this.blocks_per_year != null) { + data.blocks_per_year = this.blocks_per_year; + } + 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.mint_denom.length) + writer.writeString(1, this.mint_denom); + if (this.inflation_rate_change.length) + writer.writeString(2, this.inflation_rate_change); + if (this.inflation_max.length) + writer.writeString(3, this.inflation_max); + if (this.inflation_min.length) + writer.writeString(4, this.inflation_min); + if (this.goal_bonded.length) + writer.writeString(5, this.goal_bonded); + if (this.blocks_per_year != 0) + writer.writeUint64(6, this.blocks_per_year); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.mint_denom = reader.readString(); + break; + case 2: + message.inflation_rate_change = reader.readString(); + break; + case 3: + message.inflation_max = reader.readString(); + break; + case 4: + message.inflation_min = reader.readString(); + break; + case 5: + message.goal_bonded = reader.readString(); + break; + case 6: + message.blocks_per_year = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/mint/v1beta1/mint_pb.d.ts b/codegen/cosmos/mint/v1beta1/mint_pb.d.ts similarity index 100% rename from proto/cosmos/mint/v1beta1/mint_pb.d.ts rename to codegen/cosmos/mint/v1beta1/mint_pb.d.ts diff --git a/proto/cosmos/mint/v1beta1/mint_pb.js b/codegen/cosmos/mint/v1beta1/mint_pb.js similarity index 100% rename from proto/cosmos/mint/v1beta1/mint_pb.js rename to codegen/cosmos/mint/v1beta1/mint_pb.js diff --git a/proto/cosmos/mint/v1beta1/mint_pb_service.d.ts b/codegen/cosmos/mint/v1beta1/mint_pb_service.d.ts similarity index 100% rename from proto/cosmos/mint/v1beta1/mint_pb_service.d.ts rename to codegen/cosmos/mint/v1beta1/mint_pb_service.d.ts diff --git a/proto/cosmos/mint/v1beta1/mint_pb_service.js b/codegen/cosmos/mint/v1beta1/mint_pb_service.js similarity index 100% rename from proto/cosmos/mint/v1beta1/mint_pb_service.js rename to codegen/cosmos/mint/v1beta1/mint_pb_service.js diff --git a/codegen/cosmos/mint/v1beta1/query.ts b/codegen/cosmos/mint/v1beta1/query.ts new file mode 100644 index 0000000..d9f1679 --- /dev/null +++ b/codegen/cosmos/mint/v1beta1/query.ts @@ -0,0 +1,411 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/mint/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/api/annotations"; +import * as dependency_3 from "./mint"; +import * as dependency_4 from "./../../../amino/amino"; +import * as dependency_5 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.mint.v1beta1 { + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_3.cosmos.mint.v1beta1.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_3.cosmos.mint.v1beta1.Params, 1) as dependency_3.cosmos.mint.v1beta1.Params; + } + set params(value: dependency_3.cosmos.mint.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_3.cosmos.mint.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_3.cosmos.mint.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QueryInflationRequest 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: {}): QueryInflationRequest { + const message = new QueryInflationRequest({}); + 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): QueryInflationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryInflationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryInflationRequest { + return QueryInflationRequest.deserialize(bytes); + } + } + export class QueryInflationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + inflation?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("inflation" in data && data.inflation != undefined) { + this.inflation = data.inflation; + } + } + } + get inflation() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set inflation(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + inflation?: Uint8Array; + }): QueryInflationResponse { + const message = new QueryInflationResponse({}); + if (data.inflation != null) { + message.inflation = data.inflation; + } + return message; + } + toObject() { + const data: { + inflation?: Uint8Array; + } = {}; + if (this.inflation != null) { + data.inflation = this.inflation; + } + 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.inflation.length) + writer.writeBytes(1, this.inflation); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryInflationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryInflationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.inflation = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryInflationResponse { + return QueryInflationResponse.deserialize(bytes); + } + } + export class QueryAnnualProvisionsRequest 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: {}): QueryAnnualProvisionsRequest { + const message = new QueryAnnualProvisionsRequest({}); + 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): QueryAnnualProvisionsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAnnualProvisionsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAnnualProvisionsRequest { + return QueryAnnualProvisionsRequest.deserialize(bytes); + } + } + export class QueryAnnualProvisionsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + annual_provisions?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("annual_provisions" in data && data.annual_provisions != undefined) { + this.annual_provisions = data.annual_provisions; + } + } + } + get annual_provisions() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set annual_provisions(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + annual_provisions?: Uint8Array; + }): QueryAnnualProvisionsResponse { + const message = new QueryAnnualProvisionsResponse({}); + if (data.annual_provisions != null) { + message.annual_provisions = data.annual_provisions; + } + return message; + } + toObject() { + const data: { + annual_provisions?: Uint8Array; + } = {}; + if (this.annual_provisions != null) { + data.annual_provisions = this.annual_provisions; + } + 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.annual_provisions.length) + writer.writeBytes(1, this.annual_provisions); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAnnualProvisionsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAnnualProvisionsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.annual_provisions = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAnnualProvisionsResponse { + return QueryAnnualProvisionsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Params: { + path: "/cosmos.mint.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + Inflation: { + path: "/cosmos.mint.v1beta1.Query/Inflation", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryInflationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryInflationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryInflationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryInflationResponse.deserialize(new Uint8Array(bytes)) + }, + AnnualProvisions: { + path: "/cosmos.mint.v1beta1.Query/AnnualProvisions", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAnnualProvisionsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAnnualProvisionsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAnnualProvisionsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAnnualProvisionsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Inflation(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AnnualProvisions(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + Inflation: GrpcUnaryServiceInterface = (message: QueryInflationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Inflation(message, metadata, options, callback); + }; + AnnualProvisions: GrpcUnaryServiceInterface = (message: QueryAnnualProvisionsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AnnualProvisions(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/mint/v1beta1/query_pb.d.ts b/codegen/cosmos/mint/v1beta1/query_pb.d.ts similarity index 98% rename from proto/cosmos/mint/v1beta1/query_pb.d.ts rename to codegen/cosmos/mint/v1beta1/query_pb.d.ts index 152ea04..13f9a1e 100644 --- a/proto/cosmos/mint/v1beta1/query_pb.d.ts +++ b/codegen/cosmos/mint/v1beta1/query_pb.d.ts @@ -6,6 +6,7 @@ import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; import * as cosmos_mint_v1beta1_mint_pb from "../../../cosmos/mint/v1beta1/mint_pb"; import * as amino_amino_pb from "../../../amino/amino_pb"; +import * as cosmos_proto_cosmos_pb from "../../../cosmos_proto/cosmos_pb"; export class QueryParamsRequest extends jspb.Message { serializeBinary(): Uint8Array; diff --git a/proto/cosmos/mint/v1beta1/query_pb.js b/codegen/cosmos/mint/v1beta1/query_pb.js similarity index 99% rename from proto/cosmos/mint/v1beta1/query_pb.js rename to codegen/cosmos/mint/v1beta1/query_pb.js index fca3ccd..27ed570 100644 --- a/proto/cosmos/mint/v1beta1/query_pb.js +++ b/codegen/cosmos/mint/v1beta1/query_pb.js @@ -23,6 +23,8 @@ var cosmos_mint_v1beta1_mint_pb = require('../../../cosmos/mint/v1beta1/mint_pb. goog.object.extend(proto, cosmos_mint_v1beta1_mint_pb); var amino_amino_pb = require('../../../amino/amino_pb.js'); goog.object.extend(proto, amino_amino_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); goog.exportSymbol('proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest', null, global); goog.exportSymbol('proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse', null, global); goog.exportSymbol('proto.cosmos.mint.v1beta1.QueryInflationRequest', null, global); diff --git a/proto/cosmos/mint/v1beta1/query_pb_service.d.ts b/codegen/cosmos/mint/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/mint/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/mint/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/mint/v1beta1/query_pb_service.js b/codegen/cosmos/mint/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/mint/v1beta1/query_pb_service.js rename to codegen/cosmos/mint/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/mint/v1beta1/tx.ts b/codegen/cosmos/mint/v1beta1/tx.ts new file mode 100644 index 0000000..dc47013 --- /dev/null +++ b/codegen/cosmos/mint/v1beta1/tx.ts @@ -0,0 +1,194 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/mint/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../msg/v1/msg"; +import * as dependency_2 from "./../../../amino/amino"; +import * as dependency_3 from "./mint"; +import * as dependency_4 from "./../../../gogoproto/gogo"; +import * as dependency_5 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.mint.v1beta1 { + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_3.cosmos.mint.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.mint.v1beta1.Params, 2) as dependency_3.cosmos.mint.v1beta1.Params; + } + set params(value: dependency_3.cosmos.mint.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_3.cosmos.mint.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_3.cosmos.mint.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + UpdateParams: { + path: "/cosmos.mint.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/mint/v1beta1/tx_pb.d.ts b/codegen/cosmos/mint/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/mint/v1beta1/tx_pb.d.ts rename to codegen/cosmos/mint/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/mint/v1beta1/tx_pb.js b/codegen/cosmos/mint/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/mint/v1beta1/tx_pb.js rename to codegen/cosmos/mint/v1beta1/tx_pb.js diff --git a/proto/cosmos/mint/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/mint/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/mint/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/mint/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/mint/v1beta1/tx_pb_service.js b/codegen/cosmos/mint/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/mint/v1beta1/tx_pb_service.js rename to codegen/cosmos/mint/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/msg/textual/v1/textual.ts b/codegen/cosmos/msg/textual/v1/textual.ts new file mode 100644 index 0000000..9e86c00 --- /dev/null +++ b/codegen/cosmos/msg/textual/v1/textual.ts @@ -0,0 +1,7 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/msg/textual/v1/textual.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../google/protobuf/descriptor"; +export namespace cosmos.msg.textual.v1 { } diff --git a/codegen/cosmos/msg/textual/v1/textual_pb.d.ts b/codegen/cosmos/msg/textual/v1/textual_pb.d.ts new file mode 100644 index 0000000..488c4c7 --- /dev/null +++ b/codegen/cosmos/msg/textual/v1/textual_pb.d.ts @@ -0,0 +1,8 @@ +// package: cosmos.msg.textual.v1 +// file: cosmos/msg/textual/v1/textual.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + + export const expertCustomRenderer: jspb.ExtensionFieldInfo; + diff --git a/codegen/cosmos/msg/textual/v1/textual_pb.js b/codegen/cosmos/msg/textual/v1/textual_pb.js new file mode 100644 index 0000000..0a3d5b8 --- /dev/null +++ b/codegen/cosmos/msg/textual/v1/textual_pb.js @@ -0,0 +1,46 @@ +// source: cosmos/msg/textual/v1/textual.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.cosmos.msg.textual.v1.expertCustomRenderer', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `expertCustomRenderer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos.msg.textual.v1.expertCustomRenderer = new jspb.ExtensionFieldInfo( + 11110009, + {expertCustomRenderer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[11110009] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos.msg.textual.v1.expertCustomRenderer, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[11110009] = proto.cosmos.msg.textual.v1.expertCustomRenderer; + +goog.object.extend(exports, proto.cosmos.msg.textual.v1); diff --git a/codegen/cosmos/msg/textual/v1/textual_pb_service.d.ts b/codegen/cosmos/msg/textual/v1/textual_pb_service.d.ts new file mode 100644 index 0000000..f938217 --- /dev/null +++ b/codegen/cosmos/msg/textual/v1/textual_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: cosmos.msg.textual.v1 +// file: cosmos/msg/textual/v1/textual.proto + diff --git a/codegen/cosmos/msg/textual/v1/textual_pb_service.js b/codegen/cosmos/msg/textual/v1/textual_pb_service.js new file mode 100644 index 0000000..f938217 --- /dev/null +++ b/codegen/cosmos/msg/textual/v1/textual_pb_service.js @@ -0,0 +1,3 @@ +// package: cosmos.msg.textual.v1 +// file: cosmos/msg/textual/v1/textual.proto + diff --git a/codegen/cosmos/msg/v1/msg.ts b/codegen/cosmos/msg/v1/msg.ts new file mode 100644 index 0000000..46b0f8d --- /dev/null +++ b/codegen/cosmos/msg/v1/msg.ts @@ -0,0 +1,7 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/msg/v1/msg.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/descriptor"; +export namespace cosmos.msg.v1 { } diff --git a/proto/cosmos/msg/v1/msg_pb.d.ts b/codegen/cosmos/msg/v1/msg_pb.d.ts similarity index 100% rename from proto/cosmos/msg/v1/msg_pb.d.ts rename to codegen/cosmos/msg/v1/msg_pb.d.ts diff --git a/proto/cosmos/msg/v1/msg_pb.js b/codegen/cosmos/msg/v1/msg_pb.js similarity index 100% rename from proto/cosmos/msg/v1/msg_pb.js rename to codegen/cosmos/msg/v1/msg_pb.js diff --git a/proto/cosmos/msg/v1/msg_pb_service.d.ts b/codegen/cosmos/msg/v1/msg_pb_service.d.ts similarity index 100% rename from proto/cosmos/msg/v1/msg_pb_service.d.ts rename to codegen/cosmos/msg/v1/msg_pb_service.d.ts diff --git a/proto/cosmos/msg/v1/msg_pb_service.js b/codegen/cosmos/msg/v1/msg_pb_service.js similarity index 100% rename from proto/cosmos/msg/v1/msg_pb_service.js rename to codegen/cosmos/msg/v1/msg_pb_service.js diff --git a/codegen/cosmos/nft/module/v1/module.ts b/codegen/cosmos/nft/module/v1/module.ts new file mode 100644 index 0000000..5b8277f --- /dev/null +++ b/codegen/cosmos/nft/module/v1/module.ts @@ -0,0 +1,49 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/nft/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.nft.module.v1 { + export class Module 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: {}): Module { + const message = new Module({}); + 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): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/nft/module/v1/module_pb.d.ts b/codegen/cosmos/nft/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/nft/module/v1/module_pb.d.ts rename to codegen/cosmos/nft/module/v1/module_pb.d.ts diff --git a/proto/cosmos/nft/module/v1/module_pb.js b/codegen/cosmos/nft/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/nft/module/v1/module_pb.js rename to codegen/cosmos/nft/module/v1/module_pb.js diff --git a/proto/cosmos/nft/module/v1/module_pb_service.d.ts b/codegen/cosmos/nft/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/nft/module/v1/module_pb_service.d.ts rename to codegen/cosmos/nft/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/nft/module/v1/module_pb_service.js b/codegen/cosmos/nft/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/nft/module/v1/module_pb_service.js rename to codegen/cosmos/nft/module/v1/module_pb_service.js diff --git a/codegen/cosmos/nft/v1beta1/event.ts b/codegen/cosmos/nft/v1beta1/event.ts new file mode 100644 index 0000000..5f2b715 --- /dev/null +++ b/codegen/cosmos/nft/v1beta1/event.ts @@ -0,0 +1,370 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/nft/v1beta1/event.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace cosmos.nft.v1beta1 { + export class EventSend extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_id?: string; + id?: string; + sender?: string; + receiver?: 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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + if ("receiver" in data && data.receiver != undefined) { + this.receiver = data.receiver; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 3, value); + } + get receiver() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set receiver(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + class_id?: string; + id?: string; + sender?: string; + receiver?: string; + }): EventSend { + const message = new EventSend({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + if (data.id != null) { + message.id = data.id; + } + if (data.sender != null) { + message.sender = data.sender; + } + if (data.receiver != null) { + message.receiver = data.receiver; + } + return message; + } + toObject() { + const data: { + class_id?: string; + id?: string; + sender?: string; + receiver?: string; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_id; + } + if (this.id != null) { + data.id = this.id; + } + if (this.sender != null) { + data.sender = this.sender; + } + if (this.receiver != null) { + data.receiver = this.receiver; + } + 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.class_id.length) + writer.writeString(1, this.class_id); + if (this.id.length) + writer.writeString(2, this.id); + if (this.sender.length) + writer.writeString(3, this.sender); + if (this.receiver.length) + writer.writeString(4, this.receiver); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventSend { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventSend(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + case 2: + message.id = reader.readString(); + break; + case 3: + message.sender = reader.readString(); + break; + case 4: + message.receiver = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventSend { + return EventSend.deserialize(bytes); + } + } + export class EventMint extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_id?: string; + id?: string; + owner?: 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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + class_id?: string; + id?: string; + owner?: string; + }): EventMint { + const message = new EventMint({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + if (data.id != null) { + message.id = data.id; + } + if (data.owner != null) { + message.owner = data.owner; + } + return message; + } + toObject() { + const data: { + class_id?: string; + id?: string; + owner?: string; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_id; + } + if (this.id != null) { + data.id = this.id; + } + if (this.owner != null) { + data.owner = this.owner; + } + 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.class_id.length) + writer.writeString(1, this.class_id); + if (this.id.length) + writer.writeString(2, this.id); + if (this.owner.length) + writer.writeString(3, this.owner); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventMint { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventMint(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + case 2: + message.id = reader.readString(); + break; + case 3: + message.owner = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventMint { + return EventMint.deserialize(bytes); + } + } + export class EventBurn extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_id?: string; + id?: string; + owner?: 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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + class_id?: string; + id?: string; + owner?: string; + }): EventBurn { + const message = new EventBurn({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + if (data.id != null) { + message.id = data.id; + } + if (data.owner != null) { + message.owner = data.owner; + } + return message; + } + toObject() { + const data: { + class_id?: string; + id?: string; + owner?: string; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_id; + } + if (this.id != null) { + data.id = this.id; + } + if (this.owner != null) { + data.owner = this.owner; + } + 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.class_id.length) + writer.writeString(1, this.class_id); + if (this.id.length) + writer.writeString(2, this.id); + if (this.owner.length) + writer.writeString(3, this.owner); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventBurn { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventBurn(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + case 2: + message.id = reader.readString(); + break; + case 3: + message.owner = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventBurn { + return EventBurn.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/nft/v1beta1/event_pb.d.ts b/codegen/cosmos/nft/v1beta1/event_pb.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/event_pb.d.ts rename to codegen/cosmos/nft/v1beta1/event_pb.d.ts diff --git a/proto/cosmos/nft/v1beta1/event_pb.js b/codegen/cosmos/nft/v1beta1/event_pb.js similarity index 100% rename from proto/cosmos/nft/v1beta1/event_pb.js rename to codegen/cosmos/nft/v1beta1/event_pb.js diff --git a/proto/cosmos/nft/v1beta1/event_pb_service.d.ts b/codegen/cosmos/nft/v1beta1/event_pb_service.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/event_pb_service.d.ts rename to codegen/cosmos/nft/v1beta1/event_pb_service.d.ts diff --git a/proto/cosmos/nft/v1beta1/event_pb_service.js b/codegen/cosmos/nft/v1beta1/event_pb_service.js similarity index 100% rename from proto/cosmos/nft/v1beta1/event_pb_service.js rename to codegen/cosmos/nft/v1beta1/event_pb_service.js diff --git a/codegen/cosmos/nft/v1beta1/genesis.ts b/codegen/cosmos/nft/v1beta1/genesis.ts new file mode 100644 index 0000000..8ee1600 --- /dev/null +++ b/codegen/cosmos/nft/v1beta1/genesis.ts @@ -0,0 +1,189 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/nft/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./nft"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.nft.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + classes?: dependency_1.cosmos.nft.v1beta1.Class[]; + entries?: Entry[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("classes" in data && data.classes != undefined) { + this.classes = data.classes; + } + if ("entries" in data && data.entries != undefined) { + this.entries = data.entries; + } + } + } + get classes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.nft.v1beta1.Class, 1) as dependency_1.cosmos.nft.v1beta1.Class[]; + } + set classes(value: dependency_1.cosmos.nft.v1beta1.Class[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get entries() { + return pb_1.Message.getRepeatedWrapperField(this, Entry, 2) as Entry[]; + } + set entries(value: Entry[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + classes?: ReturnType[]; + entries?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.classes != null) { + message.classes = data.classes.map(item => dependency_1.cosmos.nft.v1beta1.Class.fromObject(item)); + } + if (data.entries != null) { + message.entries = data.entries.map(item => Entry.fromObject(item)); + } + return message; + } + toObject() { + const data: { + classes?: ReturnType[]; + entries?: ReturnType[]; + } = {}; + if (this.classes != null) { + data.classes = this.classes.map((item: dependency_1.cosmos.nft.v1beta1.Class) => item.toObject()); + } + if (this.entries != null) { + data.entries = this.entries.map((item: Entry) => item.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.classes.length) + writer.writeRepeatedMessage(1, this.classes, (item: dependency_1.cosmos.nft.v1beta1.Class) => item.serialize(writer)); + if (this.entries.length) + writer.writeRepeatedMessage(2, this.entries, (item: Entry) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.classes, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.cosmos.nft.v1beta1.Class.deserialize(reader), dependency_1.cosmos.nft.v1beta1.Class)); + break; + case 2: + reader.readMessage(message.entries, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Entry.deserialize(reader), Entry)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class Entry extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + owner?: string; + nfts?: dependency_1.cosmos.nft.v1beta1.NFT[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("nfts" in data && data.nfts != undefined) { + this.nfts = data.nfts; + } + } + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 1, value); + } + get nfts() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.cosmos.nft.v1beta1.NFT, 2) as dependency_1.cosmos.nft.v1beta1.NFT[]; + } + set nfts(value: dependency_1.cosmos.nft.v1beta1.NFT[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + owner?: string; + nfts?: ReturnType[]; + }): Entry { + const message = new Entry({}); + if (data.owner != null) { + message.owner = data.owner; + } + if (data.nfts != null) { + message.nfts = data.nfts.map(item => dependency_1.cosmos.nft.v1beta1.NFT.fromObject(item)); + } + return message; + } + toObject() { + const data: { + owner?: string; + nfts?: ReturnType[]; + } = {}; + if (this.owner != null) { + data.owner = this.owner; + } + if (this.nfts != null) { + data.nfts = this.nfts.map((item: dependency_1.cosmos.nft.v1beta1.NFT) => item.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.owner.length) + writer.writeString(1, this.owner); + if (this.nfts.length) + writer.writeRepeatedMessage(2, this.nfts, (item: dependency_1.cosmos.nft.v1beta1.NFT) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Entry { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Entry(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.owner = reader.readString(); + break; + case 2: + reader.readMessage(message.nfts, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.cosmos.nft.v1beta1.NFT.deserialize(reader), dependency_1.cosmos.nft.v1beta1.NFT)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Entry { + return Entry.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/nft/v1beta1/genesis_pb.d.ts b/codegen/cosmos/nft/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/nft/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/nft/v1beta1/genesis_pb.js b/codegen/cosmos/nft/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/nft/v1beta1/genesis_pb.js rename to codegen/cosmos/nft/v1beta1/genesis_pb.js diff --git a/proto/cosmos/nft/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/nft/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/nft/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/nft/v1beta1/genesis_pb_service.js b/codegen/cosmos/nft/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/nft/v1beta1/genesis_pb_service.js rename to codegen/cosmos/nft/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/nft/v1beta1/nft.ts b/codegen/cosmos/nft/v1beta1/nft.ts new file mode 100644 index 0000000..ae5edb2 --- /dev/null +++ b/codegen/cosmos/nft/v1beta1/nft.ts @@ -0,0 +1,379 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/nft/v1beta1/nft.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.nft.v1beta1 { + export class Class extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + symbol?: string; + description?: string; + uri?: string; + uri_hash?: string; + data?: dependency_1.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("symbol" in data && data.symbol != undefined) { + this.symbol = data.symbol; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("uri" in data && data.uri != undefined) { + this.uri = data.uri; + } + if ("uri_hash" in data && data.uri_hash != undefined) { + this.uri_hash = data.uri_hash; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get symbol() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set symbol(value: string) { + pb_1.Message.setField(this, 3, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 4, value); + } + get uri() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set uri(value: string) { + pb_1.Message.setField(this, 5, value); + } + get uri_hash() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set uri_hash(value: string) { + pb_1.Message.setField(this, 6, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 7) as dependency_1.google.protobuf.Any; + } + set data(value: dependency_1.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_data() { + return pb_1.Message.getField(this, 7) != null; + } + static fromObject(data: { + id?: string; + name?: string; + symbol?: string; + description?: string; + uri?: string; + uri_hash?: string; + data?: ReturnType; + }): Class { + const message = new Class({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.symbol != null) { + message.symbol = data.symbol; + } + if (data.description != null) { + message.description = data.description; + } + if (data.uri != null) { + message.uri = data.uri; + } + if (data.uri_hash != null) { + message.uri_hash = data.uri_hash; + } + if (data.data != null) { + message.data = dependency_1.google.protobuf.Any.fromObject(data.data); + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + symbol?: string; + description?: string; + uri?: string; + uri_hash?: string; + data?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.symbol != null) { + data.symbol = this.symbol; + } + if (this.description != null) { + data.description = this.description; + } + if (this.uri != null) { + data.uri = this.uri; + } + if (this.uri_hash != null) { + data.uri_hash = this.uri_hash; + } + if (this.data != null) { + data.data = this.data.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.id.length) + writer.writeString(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.symbol.length) + writer.writeString(3, this.symbol); + if (this.description.length) + writer.writeString(4, this.description); + if (this.uri.length) + writer.writeString(5, this.uri); + if (this.uri_hash.length) + writer.writeString(6, this.uri_hash); + if (this.has_data) + writer.writeMessage(7, this.data, () => this.data.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Class { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Class(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readString(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.symbol = reader.readString(); + break; + case 4: + message.description = reader.readString(); + break; + case 5: + message.uri = reader.readString(); + break; + case 6: + message.uri_hash = reader.readString(); + break; + case 7: + reader.readMessage(message.data, () => message.data = dependency_1.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Class { + return Class.deserialize(bytes); + } + } + export class NFT extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_id?: string; + id?: string; + uri?: string; + uri_hash?: string; + data?: dependency_1.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("uri" in data && data.uri != undefined) { + this.uri = data.uri; + } + if ("uri_hash" in data && data.uri_hash != undefined) { + this.uri_hash = data.uri_hash; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get uri() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set uri(value: string) { + pb_1.Message.setField(this, 3, value); + } + get uri_hash() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set uri_hash(value: string) { + pb_1.Message.setField(this, 4, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 10) as dependency_1.google.protobuf.Any; + } + set data(value: dependency_1.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_data() { + return pb_1.Message.getField(this, 10) != null; + } + static fromObject(data: { + class_id?: string; + id?: string; + uri?: string; + uri_hash?: string; + data?: ReturnType; + }): NFT { + const message = new NFT({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + if (data.id != null) { + message.id = data.id; + } + if (data.uri != null) { + message.uri = data.uri; + } + if (data.uri_hash != null) { + message.uri_hash = data.uri_hash; + } + if (data.data != null) { + message.data = dependency_1.google.protobuf.Any.fromObject(data.data); + } + return message; + } + toObject() { + const data: { + class_id?: string; + id?: string; + uri?: string; + uri_hash?: string; + data?: ReturnType; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_id; + } + if (this.id != null) { + data.id = this.id; + } + if (this.uri != null) { + data.uri = this.uri; + } + if (this.uri_hash != null) { + data.uri_hash = this.uri_hash; + } + if (this.data != null) { + data.data = this.data.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.class_id.length) + writer.writeString(1, this.class_id); + if (this.id.length) + writer.writeString(2, this.id); + if (this.uri.length) + writer.writeString(3, this.uri); + if (this.uri_hash.length) + writer.writeString(4, this.uri_hash); + if (this.has_data) + writer.writeMessage(10, this.data, () => this.data.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NFT { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NFT(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + case 2: + message.id = reader.readString(); + break; + case 3: + message.uri = reader.readString(); + break; + case 4: + message.uri_hash = reader.readString(); + break; + case 10: + reader.readMessage(message.data, () => message.data = dependency_1.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): NFT { + return NFT.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/nft/v1beta1/nft_pb.d.ts b/codegen/cosmos/nft/v1beta1/nft_pb.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/nft_pb.d.ts rename to codegen/cosmos/nft/v1beta1/nft_pb.d.ts diff --git a/proto/cosmos/nft/v1beta1/nft_pb.js b/codegen/cosmos/nft/v1beta1/nft_pb.js similarity index 100% rename from proto/cosmos/nft/v1beta1/nft_pb.js rename to codegen/cosmos/nft/v1beta1/nft_pb.js diff --git a/proto/cosmos/nft/v1beta1/nft_pb_service.d.ts b/codegen/cosmos/nft/v1beta1/nft_pb_service.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/nft_pb_service.d.ts rename to codegen/cosmos/nft/v1beta1/nft_pb_service.d.ts diff --git a/proto/cosmos/nft/v1beta1/nft_pb_service.js b/codegen/cosmos/nft/v1beta1/nft_pb_service.js similarity index 100% rename from proto/cosmos/nft/v1beta1/nft_pb_service.js rename to codegen/cosmos/nft/v1beta1/nft_pb_service.js diff --git a/codegen/cosmos/nft/v1beta1/query.ts b/codegen/cosmos/nft/v1beta1/query.ts new file mode 100644 index 0000000..28944e0 --- /dev/null +++ b/codegen/cosmos/nft/v1beta1/query.ts @@ -0,0 +1,1254 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/nft/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../google/api/annotations"; +import * as dependency_3 from "./nft"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.nft.v1beta1 { + export class QueryBalanceRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_id?: string; + owner?: 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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + class_id?: string; + owner?: string; + }): QueryBalanceRequest { + const message = new QueryBalanceRequest({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + if (data.owner != null) { + message.owner = data.owner; + } + return message; + } + toObject() { + const data: { + class_id?: string; + owner?: string; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_id; + } + if (this.owner != null) { + data.owner = this.owner; + } + 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.class_id.length) + writer.writeString(1, this.class_id); + if (this.owner.length) + writer.writeString(2, this.owner); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryBalanceRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryBalanceRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + case 2: + message.owner = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryBalanceRequest { + return QueryBalanceRequest.deserialize(bytes); + } + } + export class QueryBalanceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: 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 ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + amount?: number; + }): QueryBalanceResponse { + const message = new QueryBalanceResponse({}); + if (data.amount != null) { + message.amount = data.amount; + } + return message; + } + toObject() { + const data: { + amount?: number; + } = {}; + if (this.amount != null) { + data.amount = this.amount; + } + 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.amount != 0) + writer.writeUint64(1, this.amount); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryBalanceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryBalanceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.amount = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryBalanceResponse { + return QueryBalanceResponse.deserialize(bytes); + } + } + export class QueryOwnerRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_id?: string; + 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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + class_id?: string; + id?: string; + }): QueryOwnerRequest { + const message = new QueryOwnerRequest({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + class_id?: string; + id?: string; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_id; + } + if (this.id != null) { + data.id = this.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.class_id.length) + writer.writeString(1, this.class_id); + if (this.id.length) + writer.writeString(2, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryOwnerRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryOwnerRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + case 2: + message.id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryOwnerRequest { + return QueryOwnerRequest.deserialize(bytes); + } + } + export class QueryOwnerResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + owner?: 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 ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + } + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + owner?: string; + }): QueryOwnerResponse { + const message = new QueryOwnerResponse({}); + if (data.owner != null) { + message.owner = data.owner; + } + return message; + } + toObject() { + const data: { + owner?: string; + } = {}; + if (this.owner != null) { + data.owner = this.owner; + } + 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.owner.length) + writer.writeString(1, this.owner); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryOwnerResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryOwnerResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.owner = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryOwnerResponse { + return QueryOwnerResponse.deserialize(bytes); + } + } + export class QuerySupplyRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + class_id?: string; + }): QuerySupplyRequest { + const message = new QuerySupplyRequest({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + return message; + } + toObject() { + const data: { + class_id?: string; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_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.class_id.length) + writer.writeString(1, this.class_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySupplyRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySupplyRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySupplyRequest { + return QuerySupplyRequest.deserialize(bytes); + } + } + export class QuerySupplyResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: 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 ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + amount?: number; + }): QuerySupplyResponse { + const message = new QuerySupplyResponse({}); + if (data.amount != null) { + message.amount = data.amount; + } + return message; + } + toObject() { + const data: { + amount?: number; + } = {}; + if (this.amount != null) { + data.amount = this.amount; + } + 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.amount != 0) + writer.writeUint64(1, this.amount); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySupplyResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySupplyResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.amount = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySupplyResponse { + return QuerySupplyResponse.deserialize(bytes); + } + } + export class QueryNFTsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_id?: string; + owner?: string; + pagination?: dependency_1.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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 2, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 3) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + class_id?: string; + owner?: string; + pagination?: ReturnType; + }): QueryNFTsRequest { + const message = new QueryNFTsRequest({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + if (data.owner != null) { + message.owner = data.owner; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + class_id?: string; + owner?: string; + pagination?: ReturnType; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_id; + } + if (this.owner != null) { + data.owner = this.owner; + } + 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.class_id.length) + writer.writeString(1, this.class_id); + if (this.owner.length) + writer.writeString(2, this.owner); + if (this.has_pagination) + writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryNFTsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryNFTsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + case 2: + message.owner = reader.readString(); + break; + case 3: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryNFTsRequest { + return QueryNFTsRequest.deserialize(bytes); + } + } + export class QueryNFTsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + nfts?: dependency_3.cosmos.nft.v1beta1.NFT[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("nfts" in data && data.nfts != undefined) { + this.nfts = data.nfts; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get nfts() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.nft.v1beta1.NFT, 1) as dependency_3.cosmos.nft.v1beta1.NFT[]; + } + set nfts(value: dependency_3.cosmos.nft.v1beta1.NFT[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + nfts?: ReturnType[]; + pagination?: ReturnType; + }): QueryNFTsResponse { + const message = new QueryNFTsResponse({}); + if (data.nfts != null) { + message.nfts = data.nfts.map(item => dependency_3.cosmos.nft.v1beta1.NFT.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + nfts?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.nfts != null) { + data.nfts = this.nfts.map((item: dependency_3.cosmos.nft.v1beta1.NFT) => item.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.nfts.length) + writer.writeRepeatedMessage(1, this.nfts, (item: dependency_3.cosmos.nft.v1beta1.NFT) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryNFTsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryNFTsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.nfts, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.nft.v1beta1.NFT.deserialize(reader), dependency_3.cosmos.nft.v1beta1.NFT)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryNFTsResponse { + return QueryNFTsResponse.deserialize(bytes); + } + } + export class QueryNFTRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_id?: string; + 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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + class_id?: string; + id?: string; + }): QueryNFTRequest { + const message = new QueryNFTRequest({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + class_id?: string; + id?: string; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_id; + } + if (this.id != null) { + data.id = this.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.class_id.length) + writer.writeString(1, this.class_id); + if (this.id.length) + writer.writeString(2, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryNFTRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryNFTRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + case 2: + message.id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryNFTRequest { + return QueryNFTRequest.deserialize(bytes); + } + } + export class QueryNFTResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + nft?: dependency_3.cosmos.nft.v1beta1.NFT; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("nft" in data && data.nft != undefined) { + this.nft = data.nft; + } + } + } + get nft() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.nft.v1beta1.NFT, 1) as dependency_3.cosmos.nft.v1beta1.NFT; + } + set nft(value: dependency_3.cosmos.nft.v1beta1.NFT) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_nft() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + nft?: ReturnType; + }): QueryNFTResponse { + const message = new QueryNFTResponse({}); + if (data.nft != null) { + message.nft = dependency_3.cosmos.nft.v1beta1.NFT.fromObject(data.nft); + } + return message; + } + toObject() { + const data: { + nft?: ReturnType; + } = {}; + if (this.nft != null) { + data.nft = this.nft.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_nft) + writer.writeMessage(1, this.nft, () => this.nft.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryNFTResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryNFTResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.nft, () => message.nft = dependency_3.cosmos.nft.v1beta1.NFT.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryNFTResponse { + return QueryNFTResponse.deserialize(bytes); + } + } + export class QueryClassRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + class_id?: string; + }): QueryClassRequest { + const message = new QueryClassRequest({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + return message; + } + toObject() { + const data: { + class_id?: string; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_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.class_id.length) + writer.writeString(1, this.class_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryClassRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClassRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryClassRequest { + return QueryClassRequest.deserialize(bytes); + } + } + export class QueryClassResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class?: dependency_3.cosmos.nft.v1beta1.Class; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("class" in data && data.class != undefined) { + this.class = data.class; + } + } + } + get class() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.nft.v1beta1.Class, 1) as dependency_3.cosmos.nft.v1beta1.Class; + } + set class(value: dependency_3.cosmos.nft.v1beta1.Class) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_class() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + class?: ReturnType; + }): QueryClassResponse { + const message = new QueryClassResponse({}); + if (data.class != null) { + message.class = dependency_3.cosmos.nft.v1beta1.Class.fromObject(data.class); + } + return message; + } + toObject() { + const data: { + class?: ReturnType; + } = {}; + if (this.class != null) { + data.class = this.class.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_class) + writer.writeMessage(1, this.class, () => this.class.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryClassResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClassResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.class, () => message.class = dependency_3.cosmos.nft.v1beta1.Class.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryClassResponse { + return QueryClassResponse.deserialize(bytes); + } + } + export class QueryClassesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_1.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_1.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.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; + }): QueryClassesRequest { + const message = new QueryClassesRequest({}); + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryClassesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClassesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryClassesRequest { + return QueryClassesRequest.deserialize(bytes); + } + } + export class QueryClassesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + classes?: dependency_3.cosmos.nft.v1beta1.Class[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("classes" in data && data.classes != undefined) { + this.classes = data.classes; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get classes() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.nft.v1beta1.Class, 1) as dependency_3.cosmos.nft.v1beta1.Class[]; + } + set classes(value: dependency_3.cosmos.nft.v1beta1.Class[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + classes?: ReturnType[]; + pagination?: ReturnType; + }): QueryClassesResponse { + const message = new QueryClassesResponse({}); + if (data.classes != null) { + message.classes = data.classes.map(item => dependency_3.cosmos.nft.v1beta1.Class.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + classes?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.classes != null) { + data.classes = this.classes.map((item: dependency_3.cosmos.nft.v1beta1.Class) => item.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.classes.length) + writer.writeRepeatedMessage(1, this.classes, (item: dependency_3.cosmos.nft.v1beta1.Class) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryClassesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClassesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.classes, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.nft.v1beta1.Class.deserialize(reader), dependency_3.cosmos.nft.v1beta1.Class)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryClassesResponse { + return QueryClassesResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Balance: { + path: "/cosmos.nft.v1beta1.Query/Balance", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryBalanceRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryBalanceRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryBalanceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryBalanceResponse.deserialize(new Uint8Array(bytes)) + }, + Owner: { + path: "/cosmos.nft.v1beta1.Query/Owner", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryOwnerRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryOwnerRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryOwnerResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryOwnerResponse.deserialize(new Uint8Array(bytes)) + }, + Supply: { + path: "/cosmos.nft.v1beta1.Query/Supply", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySupplyRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySupplyRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySupplyResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySupplyResponse.deserialize(new Uint8Array(bytes)) + }, + NFTs: { + path: "/cosmos.nft.v1beta1.Query/NFTs", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryNFTsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryNFTsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryNFTsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryNFTsResponse.deserialize(new Uint8Array(bytes)) + }, + NFT: { + path: "/cosmos.nft.v1beta1.Query/NFT", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryNFTRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryNFTRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryNFTResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryNFTResponse.deserialize(new Uint8Array(bytes)) + }, + Class: { + path: "/cosmos.nft.v1beta1.Query/Class", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryClassRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryClassRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryClassResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryClassResponse.deserialize(new Uint8Array(bytes)) + }, + Classes: { + path: "/cosmos.nft.v1beta1.Query/Classes", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryClassesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryClassesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryClassesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryClassesResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Balance(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Owner(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Supply(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract NFTs(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract NFT(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Class(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Classes(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Balance: GrpcUnaryServiceInterface = (message: QueryBalanceRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Balance(message, metadata, options, callback); + }; + Owner: GrpcUnaryServiceInterface = (message: QueryOwnerRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Owner(message, metadata, options, callback); + }; + Supply: GrpcUnaryServiceInterface = (message: QuerySupplyRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Supply(message, metadata, options, callback); + }; + NFTs: GrpcUnaryServiceInterface = (message: QueryNFTsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.NFTs(message, metadata, options, callback); + }; + NFT: GrpcUnaryServiceInterface = (message: QueryNFTRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.NFT(message, metadata, options, callback); + }; + Class: GrpcUnaryServiceInterface = (message: QueryClassRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Class(message, metadata, options, callback); + }; + Classes: GrpcUnaryServiceInterface = (message: QueryClassesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Classes(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/nft/v1beta1/query_pb.d.ts b/codegen/cosmos/nft/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/query_pb.d.ts rename to codegen/cosmos/nft/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/nft/v1beta1/query_pb.js b/codegen/cosmos/nft/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/nft/v1beta1/query_pb.js rename to codegen/cosmos/nft/v1beta1/query_pb.js diff --git a/proto/cosmos/nft/v1beta1/query_pb_service.d.ts b/codegen/cosmos/nft/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/nft/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/nft/v1beta1/query_pb_service.js b/codegen/cosmos/nft/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/nft/v1beta1/query_pb_service.js rename to codegen/cosmos/nft/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/nft/v1beta1/tx.ts b/codegen/cosmos/nft/v1beta1/tx.ts new file mode 100644 index 0000000..52065c9 --- /dev/null +++ b/codegen/cosmos/nft/v1beta1/tx.ts @@ -0,0 +1,234 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/nft/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../cosmos_proto/cosmos"; +import * as dependency_2 from "./../../msg/v1/msg"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.nft.v1beta1 { + export class MsgSend extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + class_id?: string; + id?: string; + sender?: string; + receiver?: 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 ("class_id" in data && data.class_id != undefined) { + this.class_id = data.class_id; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + if ("receiver" in data && data.receiver != undefined) { + this.receiver = data.receiver; + } + } + } + get class_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set class_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 3, value); + } + get receiver() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set receiver(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + class_id?: string; + id?: string; + sender?: string; + receiver?: string; + }): MsgSend { + const message = new MsgSend({}); + if (data.class_id != null) { + message.class_id = data.class_id; + } + if (data.id != null) { + message.id = data.id; + } + if (data.sender != null) { + message.sender = data.sender; + } + if (data.receiver != null) { + message.receiver = data.receiver; + } + return message; + } + toObject() { + const data: { + class_id?: string; + id?: string; + sender?: string; + receiver?: string; + } = {}; + if (this.class_id != null) { + data.class_id = this.class_id; + } + if (this.id != null) { + data.id = this.id; + } + if (this.sender != null) { + data.sender = this.sender; + } + if (this.receiver != null) { + data.receiver = this.receiver; + } + 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.class_id.length) + writer.writeString(1, this.class_id); + if (this.id.length) + writer.writeString(2, this.id); + if (this.sender.length) + writer.writeString(3, this.sender); + if (this.receiver.length) + writer.writeString(4, this.receiver); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSend { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSend(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.class_id = reader.readString(); + break; + case 2: + message.id = reader.readString(); + break; + case 3: + message.sender = reader.readString(); + break; + case 4: + message.receiver = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSend { + return MsgSend.deserialize(bytes); + } + } + export class MsgSendResponse 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: {}): MsgSendResponse { + const message = new MsgSendResponse({}); + 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): MsgSendResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSendResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSendResponse { + return MsgSendResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + Send: { + path: "/cosmos.nft.v1beta1.Msg/Send", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSend) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSend.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSendResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSendResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Send(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Send: GrpcUnaryServiceInterface = (message: MsgSend, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Send(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/nft/v1beta1/tx_pb.d.ts b/codegen/cosmos/nft/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/tx_pb.d.ts rename to codegen/cosmos/nft/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/nft/v1beta1/tx_pb.js b/codegen/cosmos/nft/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/nft/v1beta1/tx_pb.js rename to codegen/cosmos/nft/v1beta1/tx_pb.js diff --git a/proto/cosmos/nft/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/nft/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/nft/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/nft/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/nft/v1beta1/tx_pb_service.js b/codegen/cosmos/nft/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/nft/v1beta1/tx_pb_service.js rename to codegen/cosmos/nft/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/orm/module/v1alpha1/module.ts b/codegen/cosmos/orm/module/v1alpha1/module.ts new file mode 100644 index 0000000..5d3de8c --- /dev/null +++ b/codegen/cosmos/orm/module/v1alpha1/module.ts @@ -0,0 +1,49 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/orm/module/v1alpha1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.orm.module.v1alpha1 { + export class Module 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: {}): Module { + const message = new Module({}); + 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): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/orm/module/v1alpha1/module_pb.d.ts b/codegen/cosmos/orm/module/v1alpha1/module_pb.d.ts similarity index 100% rename from proto/cosmos/orm/module/v1alpha1/module_pb.d.ts rename to codegen/cosmos/orm/module/v1alpha1/module_pb.d.ts diff --git a/proto/cosmos/orm/module/v1alpha1/module_pb.js b/codegen/cosmos/orm/module/v1alpha1/module_pb.js similarity index 100% rename from proto/cosmos/orm/module/v1alpha1/module_pb.js rename to codegen/cosmos/orm/module/v1alpha1/module_pb.js diff --git a/proto/cosmos/orm/module/v1alpha1/module_pb_service.d.ts b/codegen/cosmos/orm/module/v1alpha1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/orm/module/v1alpha1/module_pb_service.d.ts rename to codegen/cosmos/orm/module/v1alpha1/module_pb_service.d.ts diff --git a/proto/cosmos/orm/module/v1alpha1/module_pb_service.js b/codegen/cosmos/orm/module/v1alpha1/module_pb_service.js similarity index 100% rename from proto/cosmos/orm/module/v1alpha1/module_pb_service.js rename to codegen/cosmos/orm/module/v1alpha1/module_pb_service.js diff --git a/codegen/cosmos/orm/query/v1alpha1/query.ts b/codegen/cosmos/orm/query/v1alpha1/query.ts new file mode 100644 index 0000000..2a188e5 --- /dev/null +++ b/codegen/cosmos/orm/query/v1alpha1/query.ts @@ -0,0 +1,1021 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/orm/query/v1alpha1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../google/protobuf/timestamp"; +import * as dependency_2 from "./../../../../google/protobuf/duration"; +import * as dependency_3 from "./../../../../google/protobuf/any"; +import * as dependency_4 from "./../../../base/query/v1beta1/pagination"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.orm.query.v1alpha1 { + export class GetRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + message_name?: string; + index?: string; + values?: IndexValue[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("message_name" in data && data.message_name != undefined) { + this.message_name = data.message_name; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("values" in data && data.values != undefined) { + this.values = data.values; + } + } + } + get message_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set message_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set index(value: string) { + pb_1.Message.setField(this, 2, value); + } + get values() { + return pb_1.Message.getRepeatedWrapperField(this, IndexValue, 3) as IndexValue[]; + } + set values(value: IndexValue[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + message_name?: string; + index?: string; + values?: ReturnType[]; + }): GetRequest { + const message = new GetRequest({}); + if (data.message_name != null) { + message.message_name = data.message_name; + } + if (data.index != null) { + message.index = data.index; + } + if (data.values != null) { + message.values = data.values.map(item => IndexValue.fromObject(item)); + } + return message; + } + toObject() { + const data: { + message_name?: string; + index?: string; + values?: ReturnType[]; + } = {}; + if (this.message_name != null) { + data.message_name = this.message_name; + } + if (this.index != null) { + data.index = this.index; + } + if (this.values != null) { + data.values = this.values.map((item: IndexValue) => item.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.message_name.length) + writer.writeString(1, this.message_name); + if (this.index.length) + writer.writeString(2, this.index); + if (this.values.length) + writer.writeRepeatedMessage(3, this.values, (item: IndexValue) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.message_name = reader.readString(); + break; + case 2: + message.index = reader.readString(); + break; + case 3: + reader.readMessage(message.values, () => pb_1.Message.addToRepeatedWrapperField(message, 3, IndexValue.deserialize(reader), IndexValue)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetRequest { + return GetRequest.deserialize(bytes); + } + } + export class GetResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: dependency_3.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get result() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Any, 1) as dependency_3.google.protobuf.Any; + } + set result(value: dependency_3.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_result() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + result?: ReturnType; + }): GetResponse { + const message = new GetResponse({}); + if (data.result != null) { + message.result = dependency_3.google.protobuf.Any.fromObject(data.result); + } + return message; + } + toObject() { + const data: { + result?: ReturnType; + } = {}; + if (this.result != null) { + data.result = this.result.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_result) + writer.writeMessage(1, this.result, () => this.result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.result, () => message.result = dependency_3.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetResponse { + return GetResponse.deserialize(bytes); + } + } + export class ListRequest extends pb_1.Message { + #one_of_decls: number[][] = [[3, 4]]; + constructor(data?: any[] | ({ + message_name?: string; + index?: string; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageRequest; + } & (({ + prefix?: ListRequest.Prefix; + range?: never; + } | { + prefix?: never; + range?: ListRequest.Range; + })))) { + 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_name" in data && data.message_name != undefined) { + this.message_name = data.message_name; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("prefix" in data && data.prefix != undefined) { + this.prefix = data.prefix; + } + if ("range" in data && data.range != undefined) { + this.range = data.range; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get message_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set message_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set index(value: string) { + pb_1.Message.setField(this, 2, value); + } + get prefix() { + return pb_1.Message.getWrapperField(this, ListRequest.Prefix, 3) as ListRequest.Prefix; + } + set prefix(value: ListRequest.Prefix) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_prefix() { + return pb_1.Message.getField(this, 3) != null; + } + get range() { + return pb_1.Message.getWrapperField(this, ListRequest.Range, 4) as ListRequest.Range; + } + set range(value: ListRequest.Range) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_range() { + return pb_1.Message.getField(this, 4) != null; + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 5) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 5) != null; + } + get query() { + const cases: { + [index: number]: "none" | "prefix" | "range"; + } = { + 0: "none", + 3: "prefix", + 4: "range" + }; + return cases[pb_1.Message.computeOneofCase(this, [3, 4])]; + } + static fromObject(data: { + message_name?: string; + index?: string; + prefix?: ReturnType; + range?: ReturnType; + pagination?: ReturnType; + }): ListRequest { + const message = new ListRequest({}); + if (data.message_name != null) { + message.message_name = data.message_name; + } + if (data.index != null) { + message.index = data.index; + } + if (data.prefix != null) { + message.prefix = ListRequest.Prefix.fromObject(data.prefix); + } + if (data.range != null) { + message.range = ListRequest.Range.fromObject(data.range); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + message_name?: string; + index?: string; + prefix?: ReturnType; + range?: ReturnType; + pagination?: ReturnType; + } = {}; + if (this.message_name != null) { + data.message_name = this.message_name; + } + if (this.index != null) { + data.index = this.index; + } + if (this.prefix != null) { + data.prefix = this.prefix.toObject(); + } + if (this.range != null) { + data.range = this.range.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.message_name.length) + writer.writeString(1, this.message_name); + if (this.index.length) + writer.writeString(2, this.index); + if (this.has_prefix) + writer.writeMessage(3, this.prefix, () => this.prefix.serialize(writer)); + if (this.has_range) + writer.writeMessage(4, this.range, () => this.range.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(5, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.message_name = reader.readString(); + break; + case 2: + message.index = reader.readString(); + break; + case 3: + reader.readMessage(message.prefix, () => message.prefix = ListRequest.Prefix.deserialize(reader)); + break; + case 4: + reader.readMessage(message.range, () => message.range = ListRequest.Range.deserialize(reader)); + break; + case 5: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListRequest { + return ListRequest.deserialize(bytes); + } + } + export namespace ListRequest { + export class Prefix extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + values?: IndexValue[]; + }) { + 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 ("values" in data && data.values != undefined) { + this.values = data.values; + } + } + } + get values() { + return pb_1.Message.getRepeatedWrapperField(this, IndexValue, 1) as IndexValue[]; + } + set values(value: IndexValue[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + values?: ReturnType[]; + }): Prefix { + const message = new Prefix({}); + if (data.values != null) { + message.values = data.values.map(item => IndexValue.fromObject(item)); + } + return message; + } + toObject() { + const data: { + values?: ReturnType[]; + } = {}; + if (this.values != null) { + data.values = this.values.map((item: IndexValue) => item.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.values.length) + writer.writeRepeatedMessage(1, this.values, (item: IndexValue) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Prefix { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Prefix(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.values, () => pb_1.Message.addToRepeatedWrapperField(message, 1, IndexValue.deserialize(reader), IndexValue)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Prefix { + return Prefix.deserialize(bytes); + } + } + export class Range extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + start?: IndexValue[]; + end?: IndexValue[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("start" in data && data.start != undefined) { + this.start = data.start; + } + if ("end" in data && data.end != undefined) { + this.end = data.end; + } + } + } + get start() { + return pb_1.Message.getRepeatedWrapperField(this, IndexValue, 1) as IndexValue[]; + } + set start(value: IndexValue[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get end() { + return pb_1.Message.getRepeatedWrapperField(this, IndexValue, 2) as IndexValue[]; + } + set end(value: IndexValue[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + start?: ReturnType[]; + end?: ReturnType[]; + }): Range { + const message = new Range({}); + if (data.start != null) { + message.start = data.start.map(item => IndexValue.fromObject(item)); + } + if (data.end != null) { + message.end = data.end.map(item => IndexValue.fromObject(item)); + } + return message; + } + toObject() { + const data: { + start?: ReturnType[]; + end?: ReturnType[]; + } = {}; + if (this.start != null) { + data.start = this.start.map((item: IndexValue) => item.toObject()); + } + if (this.end != null) { + data.end = this.end.map((item: IndexValue) => item.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.start.length) + writer.writeRepeatedMessage(1, this.start, (item: IndexValue) => item.serialize(writer)); + if (this.end.length) + writer.writeRepeatedMessage(2, this.end, (item: IndexValue) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Range { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Range(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.start, () => pb_1.Message.addToRepeatedWrapperField(message, 1, IndexValue.deserialize(reader), IndexValue)); + break; + case 2: + reader.readMessage(message.end, () => pb_1.Message.addToRepeatedWrapperField(message, 2, IndexValue.deserialize(reader), IndexValue)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Range { + return Range.deserialize(bytes); + } + } + } + export class ListResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + results?: dependency_3.google.protobuf.Any[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("results" in data && data.results != undefined) { + this.results = data.results; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get results() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.google.protobuf.Any, 1) as dependency_3.google.protobuf.Any[]; + } + set results(value: dependency_3.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 5) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + results?: ReturnType[]; + pagination?: ReturnType; + }): ListResponse { + const message = new ListResponse({}); + if (data.results != null) { + message.results = data.results.map(item => dependency_3.google.protobuf.Any.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + results?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.results != null) { + data.results = this.results.map((item: dependency_3.google.protobuf.Any) => item.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.results.length) + writer.writeRepeatedMessage(1, this.results, (item: dependency_3.google.protobuf.Any) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(5, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.results, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.google.protobuf.Any.deserialize(reader), dependency_3.google.protobuf.Any)); + break; + case 5: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListResponse { + return ListResponse.deserialize(bytes); + } + } + export class IndexValue extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2, 3, 4, 5, 6, 7, 8]]; + constructor(data?: any[] | ({} & (({ + uint?: number; + int?: never; + str?: never; + bytes?: never; + enum?: never; + bool?: never; + timestamp?: never; + duration?: never; + } | { + uint?: never; + int?: number; + str?: never; + bytes?: never; + enum?: never; + bool?: never; + timestamp?: never; + duration?: never; + } | { + uint?: never; + int?: never; + str?: string; + bytes?: never; + enum?: never; + bool?: never; + timestamp?: never; + duration?: never; + } | { + uint?: never; + int?: never; + str?: never; + bytes?: Uint8Array; + enum?: never; + bool?: never; + timestamp?: never; + duration?: never; + } | { + uint?: never; + int?: never; + str?: never; + bytes?: never; + enum?: string; + bool?: never; + timestamp?: never; + duration?: never; + } | { + uint?: never; + int?: never; + str?: never; + bytes?: never; + enum?: never; + bool?: boolean; + timestamp?: never; + duration?: never; + } | { + uint?: never; + int?: never; + str?: never; + bytes?: never; + enum?: never; + bool?: never; + timestamp?: dependency_1.google.protobuf.Timestamp; + duration?: never; + } | { + uint?: never; + int?: never; + str?: never; + bytes?: never; + enum?: never; + bool?: never; + timestamp?: never; + duration?: dependency_2.google.protobuf.Duration; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("uint" in data && data.uint != undefined) { + this.uint = data.uint; + } + if ("int" in data && data.int != undefined) { + this.int = data.int; + } + if ("str" in data && data.str != undefined) { + this.str = data.str; + } + if ("bytes" in data && data.bytes != undefined) { + this.bytes = data.bytes; + } + if ("enum" in data && data.enum != undefined) { + this.enum = data.enum; + } + if ("bool" in data && data.bool != undefined) { + this.bool = data.bool; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("duration" in data && data.duration != undefined) { + this.duration = data.duration; + } + } + } + get uint() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set uint(value: number) { + pb_1.Message.setOneofField(this, 1, this.#one_of_decls[0], value); + } + get has_uint() { + return pb_1.Message.getField(this, 1) != null; + } + get int() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set int(value: number) { + pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value); + } + get has_int() { + return pb_1.Message.getField(this, 2) != null; + } + get str() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set str(value: string) { + pb_1.Message.setOneofField(this, 3, this.#one_of_decls[0], value); + } + get has_str() { + return pb_1.Message.getField(this, 3) != null; + } + get bytes() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set bytes(value: Uint8Array) { + pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); + } + get has_bytes() { + return pb_1.Message.getField(this, 4) != null; + } + get enum() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set enum(value: string) { + pb_1.Message.setOneofField(this, 5, this.#one_of_decls[0], value); + } + get has_enum() { + return pb_1.Message.getField(this, 5) != null; + } + get bool() { + return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean; + } + set bool(value: boolean) { + pb_1.Message.setOneofField(this, 6, this.#one_of_decls[0], value); + } + get has_bool() { + return pb_1.Message.getField(this, 6) != null; + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 7) as dependency_1.google.protobuf.Timestamp; + } + set timestamp(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setOneofWrapperField(this, 7, this.#one_of_decls[0], value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 7) != null; + } + get duration() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 8) as dependency_2.google.protobuf.Duration; + } + set duration(value: dependency_2.google.protobuf.Duration) { + pb_1.Message.setOneofWrapperField(this, 8, this.#one_of_decls[0], value); + } + get has_duration() { + return pb_1.Message.getField(this, 8) != null; + } + get value() { + const cases: { + [index: number]: "none" | "uint" | "int" | "str" | "bytes" | "enum" | "bool" | "timestamp" | "duration"; + } = { + 0: "none", + 1: "uint", + 2: "int", + 3: "str", + 4: "bytes", + 5: "enum", + 6: "bool", + 7: "timestamp", + 8: "duration" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4, 5, 6, 7, 8])]; + } + static fromObject(data: { + uint?: number; + int?: number; + str?: string; + bytes?: Uint8Array; + enum?: string; + bool?: boolean; + timestamp?: ReturnType; + duration?: ReturnType; + }): IndexValue { + const message = new IndexValue({}); + if (data.uint != null) { + message.uint = data.uint; + } + if (data.int != null) { + message.int = data.int; + } + if (data.str != null) { + message.str = data.str; + } + if (data.bytes != null) { + message.bytes = data.bytes; + } + if (data.enum != null) { + message.enum = data.enum; + } + if (data.bool != null) { + message.bool = data.bool; + } + if (data.timestamp != null) { + message.timestamp = dependency_1.google.protobuf.Timestamp.fromObject(data.timestamp); + } + if (data.duration != null) { + message.duration = dependency_2.google.protobuf.Duration.fromObject(data.duration); + } + return message; + } + toObject() { + const data: { + uint?: number; + int?: number; + str?: string; + bytes?: Uint8Array; + enum?: string; + bool?: boolean; + timestamp?: ReturnType; + duration?: ReturnType; + } = {}; + if (this.uint != null) { + data.uint = this.uint; + } + if (this.int != null) { + data.int = this.int; + } + if (this.str != null) { + data.str = this.str; + } + if (this.bytes != null) { + data.bytes = this.bytes; + } + if (this.enum != null) { + data.enum = this.enum; + } + if (this.bool != null) { + data.bool = this.bool; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp.toObject(); + } + if (this.duration != null) { + data.duration = this.duration.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_uint) + writer.writeUint64(1, this.uint); + if (this.has_int) + writer.writeInt64(2, this.int); + if (this.has_str) + writer.writeString(3, this.str); + if (this.has_bytes) + writer.writeBytes(4, this.bytes); + if (this.has_enum) + writer.writeString(5, this.enum); + if (this.has_bool) + writer.writeBool(6, this.bool); + if (this.has_timestamp) + writer.writeMessage(7, this.timestamp, () => this.timestamp.serialize(writer)); + if (this.has_duration) + writer.writeMessage(8, this.duration, () => this.duration.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IndexValue { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IndexValue(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.uint = reader.readUint64(); + break; + case 2: + message.int = reader.readInt64(); + break; + case 3: + message.str = reader.readString(); + break; + case 4: + message.bytes = reader.readBytes(); + break; + case 5: + message.enum = reader.readString(); + break; + case 6: + message.bool = reader.readBool(); + break; + case 7: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 8: + reader.readMessage(message.duration, () => message.duration = dependency_2.google.protobuf.Duration.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IndexValue { + return IndexValue.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Get: { + path: "/cosmos.orm.query.v1alpha1.Query/Get", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetResponse.deserialize(new Uint8Array(bytes)) + }, + List: { + path: "/cosmos.orm.query.v1alpha1.Query/List", + requestStream: false, + responseStream: false, + requestSerialize: (message: ListRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ListRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ListResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ListResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Get(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract List(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Get: GrpcUnaryServiceInterface = (message: GetRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Get(message, metadata, options, callback); + }; + List: GrpcUnaryServiceInterface = (message: ListRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.List(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/orm/query/v1alpha1/query_pb.d.ts b/codegen/cosmos/orm/query/v1alpha1/query_pb.d.ts similarity index 100% rename from proto/cosmos/orm/query/v1alpha1/query_pb.d.ts rename to codegen/cosmos/orm/query/v1alpha1/query_pb.d.ts diff --git a/proto/cosmos/orm/query/v1alpha1/query_pb.js b/codegen/cosmos/orm/query/v1alpha1/query_pb.js similarity index 100% rename from proto/cosmos/orm/query/v1alpha1/query_pb.js rename to codegen/cosmos/orm/query/v1alpha1/query_pb.js diff --git a/proto/cosmos/orm/query/v1alpha1/query_pb_service.d.ts b/codegen/cosmos/orm/query/v1alpha1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/orm/query/v1alpha1/query_pb_service.d.ts rename to codegen/cosmos/orm/query/v1alpha1/query_pb_service.d.ts diff --git a/proto/cosmos/orm/query/v1alpha1/query_pb_service.js b/codegen/cosmos/orm/query/v1alpha1/query_pb_service.js similarity index 100% rename from proto/cosmos/orm/query/v1alpha1/query_pb_service.js rename to codegen/cosmos/orm/query/v1alpha1/query_pb_service.js diff --git a/codegen/cosmos/orm/v1/orm.ts b/codegen/cosmos/orm/v1/orm.ts new file mode 100644 index 0000000..f8ad829 --- /dev/null +++ b/codegen/cosmos/orm/v1/orm.ts @@ -0,0 +1,395 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/orm/v1/orm.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/descriptor"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.orm.v1 { + export class TableDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + primary_key?: PrimaryKeyDescriptor; + index?: SecondaryIndexDescriptor[]; + id?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("primary_key" in data && data.primary_key != undefined) { + this.primary_key = data.primary_key; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get primary_key() { + return pb_1.Message.getWrapperField(this, PrimaryKeyDescriptor, 1) as PrimaryKeyDescriptor; + } + set primary_key(value: PrimaryKeyDescriptor) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_primary_key() { + return pb_1.Message.getField(this, 1) != null; + } + get index() { + return pb_1.Message.getRepeatedWrapperField(this, SecondaryIndexDescriptor, 2) as SecondaryIndexDescriptor[]; + } + set index(value: SecondaryIndexDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + primary_key?: ReturnType; + index?: ReturnType[]; + id?: number; + }): TableDescriptor { + const message = new TableDescriptor({}); + if (data.primary_key != null) { + message.primary_key = PrimaryKeyDescriptor.fromObject(data.primary_key); + } + if (data.index != null) { + message.index = data.index.map(item => SecondaryIndexDescriptor.fromObject(item)); + } + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + primary_key?: ReturnType; + index?: ReturnType[]; + id?: number; + } = {}; + if (this.primary_key != null) { + data.primary_key = this.primary_key.toObject(); + } + if (this.index != null) { + data.index = this.index.map((item: SecondaryIndexDescriptor) => item.toObject()); + } + if (this.id != null) { + data.id = this.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.has_primary_key) + writer.writeMessage(1, this.primary_key, () => this.primary_key.serialize(writer)); + if (this.index.length) + writer.writeRepeatedMessage(2, this.index, (item: SecondaryIndexDescriptor) => item.serialize(writer)); + if (this.id != 0) + writer.writeUint32(3, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TableDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TableDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.primary_key, () => message.primary_key = PrimaryKeyDescriptor.deserialize(reader)); + break; + case 2: + reader.readMessage(message.index, () => pb_1.Message.addToRepeatedWrapperField(message, 2, SecondaryIndexDescriptor.deserialize(reader), SecondaryIndexDescriptor)); + break; + case 3: + message.id = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TableDescriptor { + return TableDescriptor.deserialize(bytes); + } + } + export class PrimaryKeyDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fields?: string; + auto_increment?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fields" in data && data.fields != undefined) { + this.fields = data.fields; + } + if ("auto_increment" in data && data.auto_increment != undefined) { + this.auto_increment = data.auto_increment; + } + } + } + get fields() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fields(value: string) { + pb_1.Message.setField(this, 1, value); + } + get auto_increment() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set auto_increment(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + fields?: string; + auto_increment?: boolean; + }): PrimaryKeyDescriptor { + const message = new PrimaryKeyDescriptor({}); + if (data.fields != null) { + message.fields = data.fields; + } + if (data.auto_increment != null) { + message.auto_increment = data.auto_increment; + } + return message; + } + toObject() { + const data: { + fields?: string; + auto_increment?: boolean; + } = {}; + if (this.fields != null) { + data.fields = this.fields; + } + if (this.auto_increment != null) { + data.auto_increment = this.auto_increment; + } + 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.fields.length) + writer.writeString(1, this.fields); + if (this.auto_increment != false) + writer.writeBool(2, this.auto_increment); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PrimaryKeyDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PrimaryKeyDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fields = reader.readString(); + break; + case 2: + message.auto_increment = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PrimaryKeyDescriptor { + return PrimaryKeyDescriptor.deserialize(bytes); + } + } + export class SecondaryIndexDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fields?: string; + id?: number; + unique?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fields" in data && data.fields != undefined) { + this.fields = data.fields; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("unique" in data && data.unique != undefined) { + this.unique = data.unique; + } + } + } + get fields() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fields(value: string) { + pb_1.Message.setField(this, 1, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 2, value); + } + get unique() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set unique(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + fields?: string; + id?: number; + unique?: boolean; + }): SecondaryIndexDescriptor { + const message = new SecondaryIndexDescriptor({}); + if (data.fields != null) { + message.fields = data.fields; + } + if (data.id != null) { + message.id = data.id; + } + if (data.unique != null) { + message.unique = data.unique; + } + return message; + } + toObject() { + const data: { + fields?: string; + id?: number; + unique?: boolean; + } = {}; + if (this.fields != null) { + data.fields = this.fields; + } + if (this.id != null) { + data.id = this.id; + } + if (this.unique != null) { + data.unique = this.unique; + } + 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.fields.length) + writer.writeString(1, this.fields); + if (this.id != 0) + writer.writeUint32(2, this.id); + if (this.unique != false) + writer.writeBool(3, this.unique); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SecondaryIndexDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SecondaryIndexDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fields = reader.readString(); + break; + case 2: + message.id = reader.readUint32(); + break; + case 3: + message.unique = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SecondaryIndexDescriptor { + return SecondaryIndexDescriptor.deserialize(bytes); + } + } + export class SingletonDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: 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 ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + id?: number; + }): SingletonDescriptor { + const message = new SingletonDescriptor({}); + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + id?: number; + } = {}; + if (this.id != null) { + data.id = this.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.id != 0) + writer.writeUint32(1, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SingletonDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SingletonDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SingletonDescriptor { + return SingletonDescriptor.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/orm/v1/orm_pb.d.ts b/codegen/cosmos/orm/v1/orm_pb.d.ts similarity index 100% rename from proto/cosmos/orm/v1/orm_pb.d.ts rename to codegen/cosmos/orm/v1/orm_pb.d.ts diff --git a/proto/cosmos/orm/v1/orm_pb.js b/codegen/cosmos/orm/v1/orm_pb.js similarity index 100% rename from proto/cosmos/orm/v1/orm_pb.js rename to codegen/cosmos/orm/v1/orm_pb.js diff --git a/proto/cosmos/orm/v1/orm_pb_service.d.ts b/codegen/cosmos/orm/v1/orm_pb_service.d.ts similarity index 100% rename from proto/cosmos/orm/v1/orm_pb_service.d.ts rename to codegen/cosmos/orm/v1/orm_pb_service.d.ts diff --git a/proto/cosmos/orm/v1/orm_pb_service.js b/codegen/cosmos/orm/v1/orm_pb_service.js similarity index 100% rename from proto/cosmos/orm/v1/orm_pb_service.js rename to codegen/cosmos/orm/v1/orm_pb_service.js diff --git a/codegen/cosmos/orm/v1alpha1/schema.ts b/codegen/cosmos/orm/v1alpha1/schema.ts new file mode 100644 index 0000000..609fb79 --- /dev/null +++ b/codegen/cosmos/orm/v1alpha1/schema.ts @@ -0,0 +1,219 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/orm/v1alpha1/schema.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/descriptor"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.orm.v1alpha1 { + export enum StorageType { + STORAGE_TYPE_DEFAULT_UNSPECIFIED = 0, + STORAGE_TYPE_MEMORY = 1, + STORAGE_TYPE_TRANSIENT = 2 + } + export class ModuleSchemaDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + schema_file?: ModuleSchemaDescriptor.FileEntry[]; + prefix?: Uint8Array; + }) { + 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 ("schema_file" in data && data.schema_file != undefined) { + this.schema_file = data.schema_file; + } + if ("prefix" in data && data.prefix != undefined) { + this.prefix = data.prefix; + } + } + } + get schema_file() { + return pb_1.Message.getRepeatedWrapperField(this, ModuleSchemaDescriptor.FileEntry, 1) as ModuleSchemaDescriptor.FileEntry[]; + } + set schema_file(value: ModuleSchemaDescriptor.FileEntry[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get prefix() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set prefix(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + schema_file?: ReturnType[]; + prefix?: Uint8Array; + }): ModuleSchemaDescriptor { + const message = new ModuleSchemaDescriptor({}); + if (data.schema_file != null) { + message.schema_file = data.schema_file.map(item => ModuleSchemaDescriptor.FileEntry.fromObject(item)); + } + if (data.prefix != null) { + message.prefix = data.prefix; + } + return message; + } + toObject() { + const data: { + schema_file?: ReturnType[]; + prefix?: Uint8Array; + } = {}; + if (this.schema_file != null) { + data.schema_file = this.schema_file.map((item: ModuleSchemaDescriptor.FileEntry) => item.toObject()); + } + if (this.prefix != null) { + data.prefix = this.prefix; + } + 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.schema_file.length) + writer.writeRepeatedMessage(1, this.schema_file, (item: ModuleSchemaDescriptor.FileEntry) => item.serialize(writer)); + if (this.prefix.length) + writer.writeBytes(2, this.prefix); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModuleSchemaDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModuleSchemaDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.schema_file, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ModuleSchemaDescriptor.FileEntry.deserialize(reader), ModuleSchemaDescriptor.FileEntry)); + break; + case 2: + message.prefix = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ModuleSchemaDescriptor { + return ModuleSchemaDescriptor.deserialize(bytes); + } + } + export namespace ModuleSchemaDescriptor { + export class FileEntry extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + proto_file_name?: string; + storage_type?: StorageType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("proto_file_name" in data && data.proto_file_name != undefined) { + this.proto_file_name = data.proto_file_name; + } + if ("storage_type" in data && data.storage_type != undefined) { + this.storage_type = data.storage_type; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get proto_file_name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set proto_file_name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get storage_type() { + return pb_1.Message.getFieldWithDefault(this, 3, StorageType.STORAGE_TYPE_DEFAULT_UNSPECIFIED) as StorageType; + } + set storage_type(value: StorageType) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + id?: number; + proto_file_name?: string; + storage_type?: StorageType; + }): FileEntry { + const message = new FileEntry({}); + if (data.id != null) { + message.id = data.id; + } + if (data.proto_file_name != null) { + message.proto_file_name = data.proto_file_name; + } + if (data.storage_type != null) { + message.storage_type = data.storage_type; + } + return message; + } + toObject() { + const data: { + id?: number; + proto_file_name?: string; + storage_type?: StorageType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.proto_file_name != null) { + data.proto_file_name = this.proto_file_name; + } + if (this.storage_type != null) { + data.storage_type = this.storage_type; + } + 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.id != 0) + writer.writeUint32(1, this.id); + if (this.proto_file_name.length) + writer.writeString(2, this.proto_file_name); + if (this.storage_type != StorageType.STORAGE_TYPE_DEFAULT_UNSPECIFIED) + writer.writeEnum(3, this.storage_type); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FileEntry { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FileEntry(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint32(); + break; + case 2: + message.proto_file_name = reader.readString(); + break; + case 3: + message.storage_type = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FileEntry { + return FileEntry.deserialize(bytes); + } + } + } +} diff --git a/proto/cosmos/orm/v1alpha1/schema_pb.d.ts b/codegen/cosmos/orm/v1alpha1/schema_pb.d.ts similarity index 98% rename from proto/cosmos/orm/v1alpha1/schema_pb.d.ts rename to codegen/cosmos/orm/v1alpha1/schema_pb.d.ts index 3eaa31d..c69710c 100644 --- a/proto/cosmos/orm/v1alpha1/schema_pb.d.ts +++ b/codegen/cosmos/orm/v1alpha1/schema_pb.d.ts @@ -66,8 +66,6 @@ export interface StorageTypeMap { STORAGE_TYPE_DEFAULT_UNSPECIFIED: 0; STORAGE_TYPE_MEMORY: 1; STORAGE_TYPE_TRANSIENT: 2; - STORAGE_TYPE_INDEX: 3; - STORAGE_TYPE_COMMITMENT: 4; } export const StorageType: StorageTypeMap; diff --git a/proto/cosmos/orm/v1alpha1/schema_pb.js b/codegen/cosmos/orm/v1alpha1/schema_pb.js similarity index 99% rename from proto/cosmos/orm/v1alpha1/schema_pb.js rename to codegen/cosmos/orm/v1alpha1/schema_pb.js index 4719c22..2057fad 100644 --- a/proto/cosmos/orm/v1alpha1/schema_pb.js +++ b/codegen/cosmos/orm/v1alpha1/schema_pb.js @@ -473,9 +473,7 @@ proto.cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prototype.setPrefix = function( proto.cosmos.orm.v1alpha1.StorageType = { STORAGE_TYPE_DEFAULT_UNSPECIFIED: 0, STORAGE_TYPE_MEMORY: 1, - STORAGE_TYPE_TRANSIENT: 2, - STORAGE_TYPE_INDEX: 3, - STORAGE_TYPE_COMMITMENT: 4 + STORAGE_TYPE_TRANSIENT: 2 }; diff --git a/proto/cosmos/orm/v1alpha1/schema_pb_service.d.ts b/codegen/cosmos/orm/v1alpha1/schema_pb_service.d.ts similarity index 100% rename from proto/cosmos/orm/v1alpha1/schema_pb_service.d.ts rename to codegen/cosmos/orm/v1alpha1/schema_pb_service.d.ts diff --git a/proto/cosmos/orm/v1alpha1/schema_pb_service.js b/codegen/cosmos/orm/v1alpha1/schema_pb_service.js similarity index 100% rename from proto/cosmos/orm/v1alpha1/schema_pb_service.js rename to codegen/cosmos/orm/v1alpha1/schema_pb_service.js diff --git a/codegen/cosmos/params/module/v1/module.ts b/codegen/cosmos/params/module/v1/module.ts new file mode 100644 index 0000000..d9821a9 --- /dev/null +++ b/codegen/cosmos/params/module/v1/module.ts @@ -0,0 +1,49 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/params/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.params.module.v1 { + export class Module 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: {}): Module { + const message = new Module({}); + 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): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/params/module/v1/module_pb.d.ts b/codegen/cosmos/params/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/params/module/v1/module_pb.d.ts rename to codegen/cosmos/params/module/v1/module_pb.d.ts diff --git a/proto/cosmos/params/module/v1/module_pb.js b/codegen/cosmos/params/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/params/module/v1/module_pb.js rename to codegen/cosmos/params/module/v1/module_pb.js diff --git a/proto/cosmos/params/module/v1/module_pb_service.d.ts b/codegen/cosmos/params/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/params/module/v1/module_pb_service.d.ts rename to codegen/cosmos/params/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/params/module/v1/module_pb_service.js b/codegen/cosmos/params/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/params/module/v1/module_pb_service.js rename to codegen/cosmos/params/module/v1/module_pb_service.js diff --git a/codegen/cosmos/params/v1beta1/params.ts b/codegen/cosmos/params/v1beta1/params.ts new file mode 100644 index 0000000..8196e90 --- /dev/null +++ b/codegen/cosmos/params/v1beta1/params.ts @@ -0,0 +1,237 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/params/v1beta1/params.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.params.v1beta1 { + export class ParameterChangeProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + title?: string; + description?: string; + changes?: ParamChange[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("changes" in data && data.changes != undefined) { + this.changes = data.changes; + } + } + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get changes() { + return pb_1.Message.getRepeatedWrapperField(this, ParamChange, 3) as ParamChange[]; + } + set changes(value: ParamChange[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + title?: string; + description?: string; + changes?: ReturnType[]; + }): ParameterChangeProposal { + const message = new ParameterChangeProposal({}); + if (data.title != null) { + message.title = data.title; + } + if (data.description != null) { + message.description = data.description; + } + if (data.changes != null) { + message.changes = data.changes.map(item => ParamChange.fromObject(item)); + } + return message; + } + toObject() { + const data: { + title?: string; + description?: string; + changes?: ReturnType[]; + } = {}; + if (this.title != null) { + data.title = this.title; + } + if (this.description != null) { + data.description = this.description; + } + if (this.changes != null) { + data.changes = this.changes.map((item: ParamChange) => item.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.title.length) + writer.writeString(1, this.title); + if (this.description.length) + writer.writeString(2, this.description); + if (this.changes.length) + writer.writeRepeatedMessage(3, this.changes, (item: ParamChange) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ParameterChangeProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ParameterChangeProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.title = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + reader.readMessage(message.changes, () => pb_1.Message.addToRepeatedWrapperField(message, 3, ParamChange.deserialize(reader), ParamChange)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ParameterChangeProposal { + return ParameterChangeProposal.deserialize(bytes); + } + } + export class ParamChange extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + subspace?: string; + key?: string; + value?: 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 ("subspace" in data && data.subspace != undefined) { + this.subspace = data.subspace; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get subspace() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set subspace(value: string) { + pb_1.Message.setField(this, 1, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 2, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set value(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + subspace?: string; + key?: string; + value?: string; + }): ParamChange { + const message = new ParamChange({}); + if (data.subspace != null) { + message.subspace = data.subspace; + } + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + subspace?: string; + key?: string; + value?: string; + } = {}; + if (this.subspace != null) { + data.subspace = this.subspace; + } + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + 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.subspace.length) + writer.writeString(1, this.subspace); + if (this.key.length) + writer.writeString(2, this.key); + if (this.value.length) + writer.writeString(3, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ParamChange { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ParamChange(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.subspace = reader.readString(); + break; + case 2: + message.key = reader.readString(); + break; + case 3: + message.value = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ParamChange { + return ParamChange.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/params/v1beta1/params_pb.d.ts b/codegen/cosmos/params/v1beta1/params_pb.d.ts similarity index 100% rename from proto/cosmos/params/v1beta1/params_pb.d.ts rename to codegen/cosmos/params/v1beta1/params_pb.d.ts diff --git a/proto/cosmos/params/v1beta1/params_pb.js b/codegen/cosmos/params/v1beta1/params_pb.js similarity index 100% rename from proto/cosmos/params/v1beta1/params_pb.js rename to codegen/cosmos/params/v1beta1/params_pb.js diff --git a/proto/cosmos/params/v1beta1/params_pb_service.d.ts b/codegen/cosmos/params/v1beta1/params_pb_service.d.ts similarity index 100% rename from proto/cosmos/params/v1beta1/params_pb_service.d.ts rename to codegen/cosmos/params/v1beta1/params_pb_service.d.ts diff --git a/proto/cosmos/params/v1beta1/params_pb_service.js b/codegen/cosmos/params/v1beta1/params_pb_service.js similarity index 100% rename from proto/cosmos/params/v1beta1/params_pb_service.js rename to codegen/cosmos/params/v1beta1/params_pb_service.js diff --git a/codegen/cosmos/params/v1beta1/query.ts b/codegen/cosmos/params/v1beta1/query.ts new file mode 100644 index 0000000..8a9fc3f --- /dev/null +++ b/codegen/cosmos/params/v1beta1/query.ts @@ -0,0 +1,430 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/params/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/api/annotations"; +import * as dependency_3 from "./params"; +import * as dependency_4 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.params.v1beta1 { + export class QueryParamsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + subspace?: string; + key?: 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 ("subspace" in data && data.subspace != undefined) { + this.subspace = data.subspace; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + } + } + get subspace() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set subspace(value: string) { + pb_1.Message.setField(this, 1, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + subspace?: string; + key?: string; + }): QueryParamsRequest { + const message = new QueryParamsRequest({}); + if (data.subspace != null) { + message.subspace = data.subspace; + } + if (data.key != null) { + message.key = data.key; + } + return message; + } + toObject() { + const data: { + subspace?: string; + key?: string; + } = {}; + if (this.subspace != null) { + data.subspace = this.subspace; + } + if (this.key != null) { + data.key = this.key; + } + 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.subspace.length) + writer.writeString(1, this.subspace); + if (this.key.length) + writer.writeString(2, this.key); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.subspace = reader.readString(); + break; + case 2: + message.key = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + param?: dependency_3.cosmos.params.v1beta1.ParamChange; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("param" in data && data.param != undefined) { + this.param = data.param; + } + } + } + get param() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.params.v1beta1.ParamChange, 1) as dependency_3.cosmos.params.v1beta1.ParamChange; + } + set param(value: dependency_3.cosmos.params.v1beta1.ParamChange) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_param() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + param?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.param != null) { + message.param = dependency_3.cosmos.params.v1beta1.ParamChange.fromObject(data.param); + } + return message; + } + toObject() { + const data: { + param?: ReturnType; + } = {}; + if (this.param != null) { + data.param = this.param.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_param) + writer.writeMessage(1, this.param, () => this.param.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.param, () => message.param = dependency_3.cosmos.params.v1beta1.ParamChange.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QuerySubspacesRequest 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: {}): QuerySubspacesRequest { + const message = new QuerySubspacesRequest({}); + 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): QuerySubspacesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySubspacesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySubspacesRequest { + return QuerySubspacesRequest.deserialize(bytes); + } + } + export class QuerySubspacesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + subspaces?: Subspace[]; + }) { + 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 ("subspaces" in data && data.subspaces != undefined) { + this.subspaces = data.subspaces; + } + } + } + get subspaces() { + return pb_1.Message.getRepeatedWrapperField(this, Subspace, 1) as Subspace[]; + } + set subspaces(value: Subspace[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + subspaces?: ReturnType[]; + }): QuerySubspacesResponse { + const message = new QuerySubspacesResponse({}); + if (data.subspaces != null) { + message.subspaces = data.subspaces.map(item => Subspace.fromObject(item)); + } + return message; + } + toObject() { + const data: { + subspaces?: ReturnType[]; + } = {}; + if (this.subspaces != null) { + data.subspaces = this.subspaces.map((item: Subspace) => item.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.subspaces.length) + writer.writeRepeatedMessage(1, this.subspaces, (item: Subspace) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySubspacesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySubspacesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.subspaces, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Subspace.deserialize(reader), Subspace)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySubspacesResponse { + return QuerySubspacesResponse.deserialize(bytes); + } + } + export class Subspace extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + subspace?: string; + keys?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("subspace" in data && data.subspace != undefined) { + this.subspace = data.subspace; + } + if ("keys" in data && data.keys != undefined) { + this.keys = data.keys; + } + } + } + get subspace() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set subspace(value: string) { + pb_1.Message.setField(this, 1, value); + } + get keys() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set keys(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + subspace?: string; + keys?: string[]; + }): Subspace { + const message = new Subspace({}); + if (data.subspace != null) { + message.subspace = data.subspace; + } + if (data.keys != null) { + message.keys = data.keys; + } + return message; + } + toObject() { + const data: { + subspace?: string; + keys?: string[]; + } = {}; + if (this.subspace != null) { + data.subspace = this.subspace; + } + if (this.keys != null) { + data.keys = this.keys; + } + 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.subspace.length) + writer.writeString(1, this.subspace); + if (this.keys.length) + writer.writeRepeatedString(2, this.keys); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Subspace { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Subspace(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.subspace = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Subspace { + return Subspace.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Params: { + path: "/cosmos.params.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + Subspaces: { + path: "/cosmos.params.v1beta1.Query/Subspaces", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySubspacesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySubspacesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySubspacesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySubspacesResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Subspaces(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + Subspaces: GrpcUnaryServiceInterface = (message: QuerySubspacesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Subspaces(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/params/v1beta1/query_pb.d.ts b/codegen/cosmos/params/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/params/v1beta1/query_pb.d.ts rename to codegen/cosmos/params/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/params/v1beta1/query_pb.js b/codegen/cosmos/params/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/params/v1beta1/query_pb.js rename to codegen/cosmos/params/v1beta1/query_pb.js diff --git a/proto/cosmos/params/v1beta1/query_pb_service.d.ts b/codegen/cosmos/params/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/params/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/params/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/params/v1beta1/query_pb_service.js b/codegen/cosmos/params/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/params/v1beta1/query_pb_service.js rename to codegen/cosmos/params/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/query/v1/query.ts b/codegen/cosmos/query/v1/query.ts new file mode 100644 index 0000000..f244619 --- /dev/null +++ b/codegen/cosmos/query/v1/query.ts @@ -0,0 +1,7 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/query/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/descriptor"; +export namespace cosmos.query.v1 { } diff --git a/proto/cosmos/query/v1/query_pb.d.ts b/codegen/cosmos/query/v1/query_pb.d.ts similarity index 100% rename from proto/cosmos/query/v1/query_pb.d.ts rename to codegen/cosmos/query/v1/query_pb.d.ts diff --git a/proto/cosmos/query/v1/query_pb.js b/codegen/cosmos/query/v1/query_pb.js similarity index 100% rename from proto/cosmos/query/v1/query_pb.js rename to codegen/cosmos/query/v1/query_pb.js diff --git a/proto/cosmos/query/v1/query_pb_service.d.ts b/codegen/cosmos/query/v1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/query/v1/query_pb_service.d.ts rename to codegen/cosmos/query/v1/query_pb_service.d.ts diff --git a/proto/cosmos/query/v1/query_pb_service.js b/codegen/cosmos/query/v1/query_pb_service.js similarity index 100% rename from proto/cosmos/query/v1/query_pb_service.js rename to codegen/cosmos/query/v1/query_pb_service.js diff --git a/codegen/cosmos/reflection/v1/reflection.ts b/codegen/cosmos/reflection/v1/reflection.ts new file mode 100644 index 0000000..0dd80e6 --- /dev/null +++ b/codegen/cosmos/reflection/v1/reflection.ts @@ -0,0 +1,165 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/reflection/v1/reflection.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/descriptor"; +import * as dependency_2 from "./../../query/v1/query"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.reflection.v1 { + export class FileDescriptorsRequest 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: {}): FileDescriptorsRequest { + const message = new FileDescriptorsRequest({}); + 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): FileDescriptorsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FileDescriptorsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FileDescriptorsRequest { + return FileDescriptorsRequest.deserialize(bytes); + } + } + export class FileDescriptorsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + files?: dependency_1.google.protobuf.FileDescriptorProto[]; + }) { + 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 ("files" in data && data.files != undefined) { + this.files = data.files; + } + } + } + get files() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.FileDescriptorProto, 1) as dependency_1.google.protobuf.FileDescriptorProto[]; + } + set files(value: dependency_1.google.protobuf.FileDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + files?: ReturnType[]; + }): FileDescriptorsResponse { + const message = new FileDescriptorsResponse({}); + if (data.files != null) { + message.files = data.files.map(item => dependency_1.google.protobuf.FileDescriptorProto.fromObject(item)); + } + return message; + } + toObject() { + const data: { + files?: ReturnType[]; + } = {}; + if (this.files != null) { + data.files = this.files.map((item: dependency_1.google.protobuf.FileDescriptorProto) => item.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.files.length) + writer.writeRepeatedMessage(1, this.files, (item: dependency_1.google.protobuf.FileDescriptorProto) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FileDescriptorsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FileDescriptorsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.files, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.google.protobuf.FileDescriptorProto.deserialize(reader), dependency_1.google.protobuf.FileDescriptorProto)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FileDescriptorsResponse { + return FileDescriptorsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedReflectionServiceService { + static definition = { + FileDescriptors: { + path: "/cosmos.reflection.v1.ReflectionService/FileDescriptors", + requestStream: false, + responseStream: false, + requestSerialize: (message: FileDescriptorsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => FileDescriptorsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: FileDescriptorsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => FileDescriptorsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract FileDescriptors(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ReflectionServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedReflectionServiceService.definition, "ReflectionService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + FileDescriptors: GrpcUnaryServiceInterface = (message: FileDescriptorsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.FileDescriptors(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/reflection/v1/reflection_pb.d.ts b/codegen/cosmos/reflection/v1/reflection_pb.d.ts similarity index 100% rename from proto/cosmos/reflection/v1/reflection_pb.d.ts rename to codegen/cosmos/reflection/v1/reflection_pb.d.ts diff --git a/proto/cosmos/reflection/v1/reflection_pb.js b/codegen/cosmos/reflection/v1/reflection_pb.js similarity index 100% rename from proto/cosmos/reflection/v1/reflection_pb.js rename to codegen/cosmos/reflection/v1/reflection_pb.js diff --git a/proto/cosmos/reflection/v1/reflection_pb_service.d.ts b/codegen/cosmos/reflection/v1/reflection_pb_service.d.ts similarity index 100% rename from proto/cosmos/reflection/v1/reflection_pb_service.d.ts rename to codegen/cosmos/reflection/v1/reflection_pb_service.d.ts diff --git a/proto/cosmos/reflection/v1/reflection_pb_service.js b/codegen/cosmos/reflection/v1/reflection_pb_service.js similarity index 100% rename from proto/cosmos/reflection/v1/reflection_pb_service.js rename to codegen/cosmos/reflection/v1/reflection_pb_service.js diff --git a/codegen/cosmos/slashing/module/v1/module.ts b/codegen/cosmos/slashing/module/v1/module.ts new file mode 100644 index 0000000..9e0f63c --- /dev/null +++ b/codegen/cosmos/slashing/module/v1/module.ts @@ -0,0 +1,76 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/slashing/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.slashing.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: 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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + authority?: string; + }): Module { + const message = new Module({}); + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + authority?: string; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/slashing/module/v1/module_pb.d.ts b/codegen/cosmos/slashing/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/slashing/module/v1/module_pb.d.ts rename to codegen/cosmos/slashing/module/v1/module_pb.d.ts diff --git a/proto/cosmos/slashing/module/v1/module_pb.js b/codegen/cosmos/slashing/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/slashing/module/v1/module_pb.js rename to codegen/cosmos/slashing/module/v1/module_pb.js diff --git a/proto/cosmos/slashing/module/v1/module_pb_service.d.ts b/codegen/cosmos/slashing/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/slashing/module/v1/module_pb_service.d.ts rename to codegen/cosmos/slashing/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/slashing/module/v1/module_pb_service.js b/codegen/cosmos/slashing/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/slashing/module/v1/module_pb_service.js rename to codegen/cosmos/slashing/module/v1/module_pb_service.js diff --git a/codegen/cosmos/slashing/v1beta1/genesis.ts b/codegen/cosmos/slashing/v1beta1/genesis.ts new file mode 100644 index 0000000..09db66e --- /dev/null +++ b/codegen/cosmos/slashing/v1beta1/genesis.ts @@ -0,0 +1,401 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/slashing/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./slashing"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.slashing.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_2.cosmos.slashing.v1beta1.Params; + signing_infos?: SigningInfo[]; + missed_blocks?: ValidatorMissedBlocks[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("signing_infos" in data && data.signing_infos != undefined) { + this.signing_infos = data.signing_infos; + } + if ("missed_blocks" in data && data.missed_blocks != undefined) { + this.missed_blocks = data.missed_blocks; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.slashing.v1beta1.Params, 1) as dependency_2.cosmos.slashing.v1beta1.Params; + } + set params(value: dependency_2.cosmos.slashing.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get signing_infos() { + return pb_1.Message.getRepeatedWrapperField(this, SigningInfo, 2) as SigningInfo[]; + } + set signing_infos(value: SigningInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get missed_blocks() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorMissedBlocks, 3) as ValidatorMissedBlocks[]; + } + set missed_blocks(value: ValidatorMissedBlocks[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + params?: ReturnType; + signing_infos?: ReturnType[]; + missed_blocks?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = dependency_2.cosmos.slashing.v1beta1.Params.fromObject(data.params); + } + if (data.signing_infos != null) { + message.signing_infos = data.signing_infos.map(item => SigningInfo.fromObject(item)); + } + if (data.missed_blocks != null) { + message.missed_blocks = data.missed_blocks.map(item => ValidatorMissedBlocks.fromObject(item)); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + signing_infos?: ReturnType[]; + missed_blocks?: ReturnType[]; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.signing_infos != null) { + data.signing_infos = this.signing_infos.map((item: SigningInfo) => item.toObject()); + } + if (this.missed_blocks != null) { + data.missed_blocks = this.missed_blocks.map((item: ValidatorMissedBlocks) => item.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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.signing_infos.length) + writer.writeRepeatedMessage(2, this.signing_infos, (item: SigningInfo) => item.serialize(writer)); + if (this.missed_blocks.length) + writer.writeRepeatedMessage(3, this.missed_blocks, (item: ValidatorMissedBlocks) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_2.cosmos.slashing.v1beta1.Params.deserialize(reader)); + break; + case 2: + reader.readMessage(message.signing_infos, () => pb_1.Message.addToRepeatedWrapperField(message, 2, SigningInfo.deserialize(reader), SigningInfo)); + break; + case 3: + reader.readMessage(message.missed_blocks, () => pb_1.Message.addToRepeatedWrapperField(message, 3, ValidatorMissedBlocks.deserialize(reader), ValidatorMissedBlocks)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class SigningInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + validator_signing_info?: dependency_2.cosmos.slashing.v1beta1.ValidatorSigningInfo; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("validator_signing_info" in data && data.validator_signing_info != undefined) { + this.validator_signing_info = data.validator_signing_info; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_signing_info() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.slashing.v1beta1.ValidatorSigningInfo, 2) as dependency_2.cosmos.slashing.v1beta1.ValidatorSigningInfo; + } + set validator_signing_info(value: dependency_2.cosmos.slashing.v1beta1.ValidatorSigningInfo) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_validator_signing_info() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + address?: string; + validator_signing_info?: ReturnType; + }): SigningInfo { + const message = new SigningInfo({}); + if (data.address != null) { + message.address = data.address; + } + if (data.validator_signing_info != null) { + message.validator_signing_info = dependency_2.cosmos.slashing.v1beta1.ValidatorSigningInfo.fromObject(data.validator_signing_info); + } + return message; + } + toObject() { + const data: { + address?: string; + validator_signing_info?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.validator_signing_info != null) { + data.validator_signing_info = this.validator_signing_info.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.address.length) + writer.writeString(1, this.address); + if (this.has_validator_signing_info) + writer.writeMessage(2, this.validator_signing_info, () => this.validator_signing_info.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SigningInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SigningInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.validator_signing_info, () => message.validator_signing_info = dependency_2.cosmos.slashing.v1beta1.ValidatorSigningInfo.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SigningInfo { + return SigningInfo.deserialize(bytes); + } + } + export class ValidatorMissedBlocks extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + missed_blocks?: MissedBlock[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("missed_blocks" in data && data.missed_blocks != undefined) { + this.missed_blocks = data.missed_blocks; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get missed_blocks() { + return pb_1.Message.getRepeatedWrapperField(this, MissedBlock, 2) as MissedBlock[]; + } + set missed_blocks(value: MissedBlock[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + address?: string; + missed_blocks?: ReturnType[]; + }): ValidatorMissedBlocks { + const message = new ValidatorMissedBlocks({}); + if (data.address != null) { + message.address = data.address; + } + if (data.missed_blocks != null) { + message.missed_blocks = data.missed_blocks.map(item => MissedBlock.fromObject(item)); + } + return message; + } + toObject() { + const data: { + address?: string; + missed_blocks?: ReturnType[]; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.missed_blocks != null) { + data.missed_blocks = this.missed_blocks.map((item: MissedBlock) => item.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.address.length) + writer.writeString(1, this.address); + if (this.missed_blocks.length) + writer.writeRepeatedMessage(2, this.missed_blocks, (item: MissedBlock) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorMissedBlocks { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorMissedBlocks(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.missed_blocks, () => pb_1.Message.addToRepeatedWrapperField(message, 2, MissedBlock.deserialize(reader), MissedBlock)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorMissedBlocks { + return ValidatorMissedBlocks.deserialize(bytes); + } + } + export class MissedBlock extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + index?: number; + missed?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("missed" in data && data.missed != undefined) { + this.missed = data.missed; + } + } + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 1, value); + } + get missed() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set missed(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + index?: number; + missed?: boolean; + }): MissedBlock { + const message = new MissedBlock({}); + if (data.index != null) { + message.index = data.index; + } + if (data.missed != null) { + message.missed = data.missed; + } + return message; + } + toObject() { + const data: { + index?: number; + missed?: boolean; + } = {}; + if (this.index != null) { + data.index = this.index; + } + if (this.missed != null) { + data.missed = this.missed; + } + 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.index != 0) + writer.writeInt64(1, this.index); + if (this.missed != false) + writer.writeBool(2, this.missed); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MissedBlock { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MissedBlock(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.index = reader.readInt64(); + break; + case 2: + message.missed = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MissedBlock { + return MissedBlock.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/slashing/v1beta1/genesis_pb.d.ts b/codegen/cosmos/slashing/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/slashing/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/slashing/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/slashing/v1beta1/genesis_pb.js b/codegen/cosmos/slashing/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/slashing/v1beta1/genesis_pb.js rename to codegen/cosmos/slashing/v1beta1/genesis_pb.js diff --git a/proto/cosmos/slashing/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/slashing/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/slashing/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/slashing/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/slashing/v1beta1/genesis_pb_service.js b/codegen/cosmos/slashing/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/slashing/v1beta1/genesis_pb_service.js rename to codegen/cosmos/slashing/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/slashing/v1beta1/query.ts b/codegen/cosmos/slashing/v1beta1/query.ts new file mode 100644 index 0000000..95b04b6 --- /dev/null +++ b/codegen/cosmos/slashing/v1beta1/query.ts @@ -0,0 +1,498 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/slashing/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/api/annotations"; +import * as dependency_4 from "./slashing"; +import * as dependency_5 from "./../../../cosmos_proto/cosmos"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.slashing.v1beta1 { + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_4.cosmos.slashing.v1beta1.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.cosmos.slashing.v1beta1.Params, 1) as dependency_4.cosmos.slashing.v1beta1.Params; + } + set params(value: dependency_4.cosmos.slashing.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_4.cosmos.slashing.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_4.cosmos.slashing.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QuerySigningInfoRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + cons_address?: 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 ("cons_address" in data && data.cons_address != undefined) { + this.cons_address = data.cons_address; + } + } + } + get cons_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set cons_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + cons_address?: string; + }): QuerySigningInfoRequest { + const message = new QuerySigningInfoRequest({}); + if (data.cons_address != null) { + message.cons_address = data.cons_address; + } + return message; + } + toObject() { + const data: { + cons_address?: string; + } = {}; + if (this.cons_address != null) { + data.cons_address = this.cons_address; + } + 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.cons_address.length) + writer.writeString(1, this.cons_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySigningInfoRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningInfoRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.cons_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySigningInfoRequest { + return QuerySigningInfoRequest.deserialize(bytes); + } + } + export class QuerySigningInfoResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + val_signing_info?: dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("val_signing_info" in data && data.val_signing_info != undefined) { + this.val_signing_info = data.val_signing_info; + } + } + } + get val_signing_info() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo, 1) as dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo; + } + set val_signing_info(value: dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_val_signing_info() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + val_signing_info?: ReturnType; + }): QuerySigningInfoResponse { + const message = new QuerySigningInfoResponse({}); + if (data.val_signing_info != null) { + message.val_signing_info = dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo.fromObject(data.val_signing_info); + } + return message; + } + toObject() { + const data: { + val_signing_info?: ReturnType; + } = {}; + if (this.val_signing_info != null) { + data.val_signing_info = this.val_signing_info.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_val_signing_info) + writer.writeMessage(1, this.val_signing_info, () => this.val_signing_info.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySigningInfoResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningInfoResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.val_signing_info, () => message.val_signing_info = dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySigningInfoResponse { + return QuerySigningInfoResponse.deserialize(bytes); + } + } + export class QuerySigningInfosRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_1.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_1.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.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; + }): QuerySigningInfosRequest { + const message = new QuerySigningInfosRequest({}); + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QuerySigningInfosRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningInfosRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySigningInfosRequest { + return QuerySigningInfosRequest.deserialize(bytes); + } + } + export class QuerySigningInfosResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + info?: dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("info" in data && data.info != undefined) { + this.info = data.info; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get info() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo, 1) as dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo[]; + } + set info(value: dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + info?: ReturnType[]; + pagination?: ReturnType; + }): QuerySigningInfosResponse { + const message = new QuerySigningInfosResponse({}); + if (data.info != null) { + message.info = data.info.map(item => dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + info?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.info != null) { + data.info = this.info.map((item: dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo) => item.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.info.length) + writer.writeRepeatedMessage(1, this.info, (item: dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QuerySigningInfosResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QuerySigningInfosResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.info, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo.deserialize(reader), dependency_4.cosmos.slashing.v1beta1.ValidatorSigningInfo)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QuerySigningInfosResponse { + return QuerySigningInfosResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Params: { + path: "/cosmos.slashing.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + SigningInfo: { + path: "/cosmos.slashing.v1beta1.Query/SigningInfo", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySigningInfoRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySigningInfoRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySigningInfoResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySigningInfoResponse.deserialize(new Uint8Array(bytes)) + }, + SigningInfos: { + path: "/cosmos.slashing.v1beta1.Query/SigningInfos", + requestStream: false, + responseStream: false, + requestSerialize: (message: QuerySigningInfosRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QuerySigningInfosRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QuerySigningInfosResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QuerySigningInfosResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SigningInfo(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SigningInfos(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + SigningInfo: GrpcUnaryServiceInterface = (message: QuerySigningInfoRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SigningInfo(message, metadata, options, callback); + }; + SigningInfos: GrpcUnaryServiceInterface = (message: QuerySigningInfosRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SigningInfos(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/slashing/v1beta1/query_pb.d.ts b/codegen/cosmos/slashing/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/slashing/v1beta1/query_pb.d.ts rename to codegen/cosmos/slashing/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/slashing/v1beta1/query_pb.js b/codegen/cosmos/slashing/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/slashing/v1beta1/query_pb.js rename to codegen/cosmos/slashing/v1beta1/query_pb.js diff --git a/proto/cosmos/slashing/v1beta1/query_pb_service.d.ts b/codegen/cosmos/slashing/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/slashing/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/slashing/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/slashing/v1beta1/query_pb_service.js b/codegen/cosmos/slashing/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/slashing/v1beta1/query_pb_service.js rename to codegen/cosmos/slashing/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/slashing/v1beta1/slashing.ts b/codegen/cosmos/slashing/v1beta1/slashing.ts new file mode 100644 index 0000000..e357a31 --- /dev/null +++ b/codegen/cosmos/slashing/v1beta1/slashing.ts @@ -0,0 +1,360 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/slashing/v1beta1/slashing.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/duration"; +import * as dependency_3 from "./../../../google/protobuf/timestamp"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.slashing.v1beta1 { + export class ValidatorSigningInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + start_height?: number; + index_offset?: number; + jailed_until?: dependency_3.google.protobuf.Timestamp; + tombstoned?: boolean; + missed_blocks_counter?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("start_height" in data && data.start_height != undefined) { + this.start_height = data.start_height; + } + if ("index_offset" in data && data.index_offset != undefined) { + this.index_offset = data.index_offset; + } + if ("jailed_until" in data && data.jailed_until != undefined) { + this.jailed_until = data.jailed_until; + } + if ("tombstoned" in data && data.tombstoned != undefined) { + this.tombstoned = data.tombstoned; + } + if ("missed_blocks_counter" in data && data.missed_blocks_counter != undefined) { + this.missed_blocks_counter = data.missed_blocks_counter; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get start_height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set start_height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get index_offset() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set index_offset(value: number) { + pb_1.Message.setField(this, 3, value); + } + get jailed_until() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 4) as dependency_3.google.protobuf.Timestamp; + } + set jailed_until(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_jailed_until() { + return pb_1.Message.getField(this, 4) != null; + } + get tombstoned() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set tombstoned(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + get missed_blocks_counter() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set missed_blocks_counter(value: number) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + address?: string; + start_height?: number; + index_offset?: number; + jailed_until?: ReturnType; + tombstoned?: boolean; + missed_blocks_counter?: number; + }): ValidatorSigningInfo { + const message = new ValidatorSigningInfo({}); + if (data.address != null) { + message.address = data.address; + } + if (data.start_height != null) { + message.start_height = data.start_height; + } + if (data.index_offset != null) { + message.index_offset = data.index_offset; + } + if (data.jailed_until != null) { + message.jailed_until = dependency_3.google.protobuf.Timestamp.fromObject(data.jailed_until); + } + if (data.tombstoned != null) { + message.tombstoned = data.tombstoned; + } + if (data.missed_blocks_counter != null) { + message.missed_blocks_counter = data.missed_blocks_counter; + } + return message; + } + toObject() { + const data: { + address?: string; + start_height?: number; + index_offset?: number; + jailed_until?: ReturnType; + tombstoned?: boolean; + missed_blocks_counter?: number; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.start_height != null) { + data.start_height = this.start_height; + } + if (this.index_offset != null) { + data.index_offset = this.index_offset; + } + if (this.jailed_until != null) { + data.jailed_until = this.jailed_until.toObject(); + } + if (this.tombstoned != null) { + data.tombstoned = this.tombstoned; + } + if (this.missed_blocks_counter != null) { + data.missed_blocks_counter = this.missed_blocks_counter; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.start_height != 0) + writer.writeInt64(2, this.start_height); + if (this.index_offset != 0) + writer.writeInt64(3, this.index_offset); + if (this.has_jailed_until) + writer.writeMessage(4, this.jailed_until, () => this.jailed_until.serialize(writer)); + if (this.tombstoned != false) + writer.writeBool(5, this.tombstoned); + if (this.missed_blocks_counter != 0) + writer.writeInt64(6, this.missed_blocks_counter); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorSigningInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorSigningInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.start_height = reader.readInt64(); + break; + case 3: + message.index_offset = reader.readInt64(); + break; + case 4: + reader.readMessage(message.jailed_until, () => message.jailed_until = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 5: + message.tombstoned = reader.readBool(); + break; + case 6: + message.missed_blocks_counter = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorSigningInfo { + return ValidatorSigningInfo.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signed_blocks_window?: number; + min_signed_per_window?: Uint8Array; + downtime_jail_duration?: dependency_2.google.protobuf.Duration; + slash_fraction_double_sign?: Uint8Array; + slash_fraction_downtime?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signed_blocks_window" in data && data.signed_blocks_window != undefined) { + this.signed_blocks_window = data.signed_blocks_window; + } + if ("min_signed_per_window" in data && data.min_signed_per_window != undefined) { + this.min_signed_per_window = data.min_signed_per_window; + } + if ("downtime_jail_duration" in data && data.downtime_jail_duration != undefined) { + this.downtime_jail_duration = data.downtime_jail_duration; + } + if ("slash_fraction_double_sign" in data && data.slash_fraction_double_sign != undefined) { + this.slash_fraction_double_sign = data.slash_fraction_double_sign; + } + if ("slash_fraction_downtime" in data && data.slash_fraction_downtime != undefined) { + this.slash_fraction_downtime = data.slash_fraction_downtime; + } + } + } + get signed_blocks_window() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set signed_blocks_window(value: number) { + pb_1.Message.setField(this, 1, value); + } + get min_signed_per_window() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set min_signed_per_window(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get downtime_jail_duration() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 3) as dependency_2.google.protobuf.Duration; + } + set downtime_jail_duration(value: dependency_2.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_downtime_jail_duration() { + return pb_1.Message.getField(this, 3) != null; + } + get slash_fraction_double_sign() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set slash_fraction_double_sign(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get slash_fraction_downtime() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set slash_fraction_downtime(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + signed_blocks_window?: number; + min_signed_per_window?: Uint8Array; + downtime_jail_duration?: ReturnType; + slash_fraction_double_sign?: Uint8Array; + slash_fraction_downtime?: Uint8Array; + }): Params { + const message = new Params({}); + if (data.signed_blocks_window != null) { + message.signed_blocks_window = data.signed_blocks_window; + } + if (data.min_signed_per_window != null) { + message.min_signed_per_window = data.min_signed_per_window; + } + if (data.downtime_jail_duration != null) { + message.downtime_jail_duration = dependency_2.google.protobuf.Duration.fromObject(data.downtime_jail_duration); + } + if (data.slash_fraction_double_sign != null) { + message.slash_fraction_double_sign = data.slash_fraction_double_sign; + } + if (data.slash_fraction_downtime != null) { + message.slash_fraction_downtime = data.slash_fraction_downtime; + } + return message; + } + toObject() { + const data: { + signed_blocks_window?: number; + min_signed_per_window?: Uint8Array; + downtime_jail_duration?: ReturnType; + slash_fraction_double_sign?: Uint8Array; + slash_fraction_downtime?: Uint8Array; + } = {}; + if (this.signed_blocks_window != null) { + data.signed_blocks_window = this.signed_blocks_window; + } + if (this.min_signed_per_window != null) { + data.min_signed_per_window = this.min_signed_per_window; + } + if (this.downtime_jail_duration != null) { + data.downtime_jail_duration = this.downtime_jail_duration.toObject(); + } + if (this.slash_fraction_double_sign != null) { + data.slash_fraction_double_sign = this.slash_fraction_double_sign; + } + if (this.slash_fraction_downtime != null) { + data.slash_fraction_downtime = this.slash_fraction_downtime; + } + 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.signed_blocks_window != 0) + writer.writeInt64(1, this.signed_blocks_window); + if (this.min_signed_per_window.length) + writer.writeBytes(2, this.min_signed_per_window); + if (this.has_downtime_jail_duration) + writer.writeMessage(3, this.downtime_jail_duration, () => this.downtime_jail_duration.serialize(writer)); + if (this.slash_fraction_double_sign.length) + writer.writeBytes(4, this.slash_fraction_double_sign); + if (this.slash_fraction_downtime.length) + writer.writeBytes(5, this.slash_fraction_downtime); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signed_blocks_window = reader.readInt64(); + break; + case 2: + message.min_signed_per_window = reader.readBytes(); + break; + case 3: + reader.readMessage(message.downtime_jail_duration, () => message.downtime_jail_duration = dependency_2.google.protobuf.Duration.deserialize(reader)); + break; + case 4: + message.slash_fraction_double_sign = reader.readBytes(); + break; + case 5: + message.slash_fraction_downtime = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/slashing/v1beta1/slashing_pb.d.ts b/codegen/cosmos/slashing/v1beta1/slashing_pb.d.ts similarity index 100% rename from proto/cosmos/slashing/v1beta1/slashing_pb.d.ts rename to codegen/cosmos/slashing/v1beta1/slashing_pb.d.ts diff --git a/proto/cosmos/slashing/v1beta1/slashing_pb.js b/codegen/cosmos/slashing/v1beta1/slashing_pb.js similarity index 100% rename from proto/cosmos/slashing/v1beta1/slashing_pb.js rename to codegen/cosmos/slashing/v1beta1/slashing_pb.js diff --git a/proto/cosmos/slashing/v1beta1/slashing_pb_service.d.ts b/codegen/cosmos/slashing/v1beta1/slashing_pb_service.d.ts similarity index 100% rename from proto/cosmos/slashing/v1beta1/slashing_pb_service.d.ts rename to codegen/cosmos/slashing/v1beta1/slashing_pb_service.d.ts diff --git a/proto/cosmos/slashing/v1beta1/slashing_pb_service.js b/codegen/cosmos/slashing/v1beta1/slashing_pb_service.js similarity index 100% rename from proto/cosmos/slashing/v1beta1/slashing_pb_service.js rename to codegen/cosmos/slashing/v1beta1/slashing_pb_service.js diff --git a/codegen/cosmos/slashing/v1beta1/tx.ts b/codegen/cosmos/slashing/v1beta1/tx.ts new file mode 100644 index 0000000..4896a89 --- /dev/null +++ b/codegen/cosmos/slashing/v1beta1/tx.ts @@ -0,0 +1,314 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/slashing/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./slashing"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../msg/v1/msg"; +import * as dependency_5 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.slashing.v1beta1 { + export class MsgUnjail extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_addr?: 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 ("validator_addr" in data && data.validator_addr != undefined) { + this.validator_addr = data.validator_addr; + } + } + } + get validator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator_addr?: string; + }): MsgUnjail { + const message = new MsgUnjail({}); + if (data.validator_addr != null) { + message.validator_addr = data.validator_addr; + } + return message; + } + toObject() { + const data: { + validator_addr?: string; + } = {}; + if (this.validator_addr != null) { + data.validator_addr = this.validator_addr; + } + 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.validator_addr.length) + writer.writeString(1, this.validator_addr); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUnjail { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUnjail(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_addr = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUnjail { + return MsgUnjail.deserialize(bytes); + } + } + export class MsgUnjailResponse 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: {}): MsgUnjailResponse { + const message = new MsgUnjailResponse({}); + 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): MsgUnjailResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUnjailResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUnjailResponse { + return MsgUnjailResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_2.cosmos.slashing.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.slashing.v1beta1.Params, 2) as dependency_2.cosmos.slashing.v1beta1.Params; + } + set params(value: dependency_2.cosmos.slashing.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_2.cosmos.slashing.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_2.cosmos.slashing.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + Unjail: { + path: "/cosmos.slashing.v1beta1.Msg/Unjail", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUnjail) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUnjail.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUnjailResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUnjailResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/cosmos.slashing.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Unjail(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Unjail: GrpcUnaryServiceInterface = (message: MsgUnjail, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Unjail(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/slashing/v1beta1/tx_pb.d.ts b/codegen/cosmos/slashing/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/slashing/v1beta1/tx_pb.d.ts rename to codegen/cosmos/slashing/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/slashing/v1beta1/tx_pb.js b/codegen/cosmos/slashing/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/slashing/v1beta1/tx_pb.js rename to codegen/cosmos/slashing/v1beta1/tx_pb.js diff --git a/proto/cosmos/slashing/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/slashing/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/slashing/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/slashing/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/slashing/v1beta1/tx_pb_service.js b/codegen/cosmos/slashing/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/slashing/v1beta1/tx_pb_service.js rename to codegen/cosmos/slashing/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/staking/module/v1/module.ts b/codegen/cosmos/staking/module/v1/module.ts new file mode 100644 index 0000000..2d5a675 --- /dev/null +++ b/codegen/cosmos/staking/module/v1/module.ts @@ -0,0 +1,145 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/staking/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.staking.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hooks_order?: string[]; + authority?: string; + bech32_prefix_validator?: string; + bech32_prefix_consensus?: string; + }) { + 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 ("hooks_order" in data && data.hooks_order != undefined) { + this.hooks_order = data.hooks_order; + } + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("bech32_prefix_validator" in data && data.bech32_prefix_validator != undefined) { + this.bech32_prefix_validator = data.bech32_prefix_validator; + } + if ("bech32_prefix_consensus" in data && data.bech32_prefix_consensus != undefined) { + this.bech32_prefix_consensus = data.bech32_prefix_consensus; + } + } + } + get hooks_order() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set hooks_order(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 2, value); + } + get bech32_prefix_validator() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set bech32_prefix_validator(value: string) { + pb_1.Message.setField(this, 3, value); + } + get bech32_prefix_consensus() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set bech32_prefix_consensus(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + hooks_order?: string[]; + authority?: string; + bech32_prefix_validator?: string; + bech32_prefix_consensus?: string; + }): Module { + const message = new Module({}); + if (data.hooks_order != null) { + message.hooks_order = data.hooks_order; + } + if (data.authority != null) { + message.authority = data.authority; + } + if (data.bech32_prefix_validator != null) { + message.bech32_prefix_validator = data.bech32_prefix_validator; + } + if (data.bech32_prefix_consensus != null) { + message.bech32_prefix_consensus = data.bech32_prefix_consensus; + } + return message; + } + toObject() { + const data: { + hooks_order?: string[]; + authority?: string; + bech32_prefix_validator?: string; + bech32_prefix_consensus?: string; + } = {}; + if (this.hooks_order != null) { + data.hooks_order = this.hooks_order; + } + if (this.authority != null) { + data.authority = this.authority; + } + if (this.bech32_prefix_validator != null) { + data.bech32_prefix_validator = this.bech32_prefix_validator; + } + if (this.bech32_prefix_consensus != null) { + data.bech32_prefix_consensus = this.bech32_prefix_consensus; + } + 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.hooks_order.length) + writer.writeRepeatedString(1, this.hooks_order); + if (this.authority.length) + writer.writeString(2, this.authority); + if (this.bech32_prefix_validator.length) + writer.writeString(3, this.bech32_prefix_validator); + if (this.bech32_prefix_consensus.length) + writer.writeString(4, this.bech32_prefix_consensus); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + message.authority = reader.readString(); + break; + case 3: + message.bech32_prefix_validator = reader.readString(); + break; + case 4: + message.bech32_prefix_consensus = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/staking/module/v1/module_pb.d.ts b/codegen/cosmos/staking/module/v1/module_pb.d.ts similarity index 82% rename from proto/cosmos/staking/module/v1/module_pb.d.ts rename to codegen/cosmos/staking/module/v1/module_pb.d.ts index 504d7d7..e98cdc2 100644 --- a/proto/cosmos/staking/module/v1/module_pb.d.ts +++ b/codegen/cosmos/staking/module/v1/module_pb.d.ts @@ -13,6 +13,12 @@ export class Module extends jspb.Message { getAuthority(): string; setAuthority(value: string): void; + getBech32PrefixValidator(): string; + setBech32PrefixValidator(value: string): void; + + getBech32PrefixConsensus(): string; + setBech32PrefixConsensus(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Module.AsObject; static toObject(includeInstance: boolean, msg: Module): Module.AsObject; @@ -27,6 +33,8 @@ export namespace Module { export type AsObject = { hooksOrderList: Array, authority: string, + bech32PrefixValidator: string, + bech32PrefixConsensus: string, } } diff --git a/proto/cosmos/staking/module/v1/module_pb.js b/codegen/cosmos/staking/module/v1/module_pb.js similarity index 80% rename from proto/cosmos/staking/module/v1/module_pb.js rename to codegen/cosmos/staking/module/v1/module_pb.js index 6bbc299..fe8790d 100644 --- a/proto/cosmos/staking/module/v1/module_pb.js +++ b/codegen/cosmos/staking/module/v1/module_pb.js @@ -79,7 +79,9 @@ proto.cosmos.staking.module.v1.Module.prototype.toObject = function(opt_includeI proto.cosmos.staking.module.v1.Module.toObject = function(includeInstance, msg) { var f, obj = { hooksOrderList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - authority: jspb.Message.getFieldWithDefault(msg, 2, "") + authority: jspb.Message.getFieldWithDefault(msg, 2, ""), + bech32PrefixValidator: jspb.Message.getFieldWithDefault(msg, 3, ""), + bech32PrefixConsensus: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -124,6 +126,14 @@ proto.cosmos.staking.module.v1.Module.deserializeBinaryFromReader = function(msg var value = /** @type {string} */ (reader.readString()); msg.setAuthority(value); break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBech32PrefixValidator(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBech32PrefixConsensus(value); + break; default: reader.skipField(); break; @@ -167,6 +177,20 @@ proto.cosmos.staking.module.v1.Module.serializeBinaryToWriter = function(message f ); } + f = message.getBech32PrefixValidator(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBech32PrefixConsensus(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } }; @@ -225,4 +249,40 @@ proto.cosmos.staking.module.v1.Module.prototype.setAuthority = function(value) { }; +/** + * optional string bech32_prefix_validator = 3; + * @return {string} + */ +proto.cosmos.staking.module.v1.Module.prototype.getBech32PrefixValidator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.module.v1.Module} returns this + */ +proto.cosmos.staking.module.v1.Module.prototype.setBech32PrefixValidator = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string bech32_prefix_consensus = 4; + * @return {string} + */ +proto.cosmos.staking.module.v1.Module.prototype.getBech32PrefixConsensus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.module.v1.Module} returns this + */ +proto.cosmos.staking.module.v1.Module.prototype.setBech32PrefixConsensus = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + goog.object.extend(exports, proto.cosmos.staking.module.v1); diff --git a/proto/cosmos/staking/module/v1/module_pb_service.d.ts b/codegen/cosmos/staking/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/staking/module/v1/module_pb_service.d.ts rename to codegen/cosmos/staking/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/staking/module/v1/module_pb_service.js b/codegen/cosmos/staking/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/staking/module/v1/module_pb_service.js rename to codegen/cosmos/staking/module/v1/module_pb_service.js diff --git a/codegen/cosmos/staking/v1beta1/authz.ts b/codegen/cosmos/staking/v1beta1/authz.ts new file mode 100644 index 0000000..bf4419f --- /dev/null +++ b/codegen/cosmos/staking/v1beta1/authz.ts @@ -0,0 +1,247 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/staking/v1beta1/authz.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../base/v1beta1/coin"; +import * as dependency_4 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.staking.v1beta1 { + export enum AuthorizationType { + AUTHORIZATION_TYPE_UNSPECIFIED = 0, + AUTHORIZATION_TYPE_DELEGATE = 1, + AUTHORIZATION_TYPE_UNDELEGATE = 2, + AUTHORIZATION_TYPE_REDELEGATE = 3, + AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION = 4 + } + export class StakeAuthorization extends pb_1.Message { + #one_of_decls: number[][] = [[2, 3]]; + constructor(data?: any[] | ({ + max_tokens?: dependency_3.cosmos.base.v1beta1.Coin; + authorization_type?: AuthorizationType; + } & (({ + allow_list?: StakeAuthorization.Validators; + deny_list?: never; + } | { + allow_list?: never; + deny_list?: StakeAuthorization.Validators; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("max_tokens" in data && data.max_tokens != undefined) { + this.max_tokens = data.max_tokens; + } + if ("allow_list" in data && data.allow_list != undefined) { + this.allow_list = data.allow_list; + } + if ("deny_list" in data && data.deny_list != undefined) { + this.deny_list = data.deny_list; + } + if ("authorization_type" in data && data.authorization_type != undefined) { + this.authorization_type = data.authorization_type; + } + } + } + get max_tokens() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 1) as dependency_3.cosmos.base.v1beta1.Coin; + } + set max_tokens(value: dependency_3.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_max_tokens() { + return pb_1.Message.getField(this, 1) != null; + } + get allow_list() { + return pb_1.Message.getWrapperField(this, StakeAuthorization.Validators, 2) as StakeAuthorization.Validators; + } + set allow_list(value: StakeAuthorization.Validators) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_allow_list() { + return pb_1.Message.getField(this, 2) != null; + } + get deny_list() { + return pb_1.Message.getWrapperField(this, StakeAuthorization.Validators, 3) as StakeAuthorization.Validators; + } + set deny_list(value: StakeAuthorization.Validators) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_deny_list() { + return pb_1.Message.getField(this, 3) != null; + } + get authorization_type() { + return pb_1.Message.getFieldWithDefault(this, 4, AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED) as AuthorizationType; + } + set authorization_type(value: AuthorizationType) { + pb_1.Message.setField(this, 4, value); + } + get validators() { + const cases: { + [index: number]: "none" | "allow_list" | "deny_list"; + } = { + 0: "none", + 2: "allow_list", + 3: "deny_list" + }; + return cases[pb_1.Message.computeOneofCase(this, [2, 3])]; + } + static fromObject(data: { + max_tokens?: ReturnType; + allow_list?: ReturnType; + deny_list?: ReturnType; + authorization_type?: AuthorizationType; + }): StakeAuthorization { + const message = new StakeAuthorization({}); + if (data.max_tokens != null) { + message.max_tokens = dependency_3.cosmos.base.v1beta1.Coin.fromObject(data.max_tokens); + } + if (data.allow_list != null) { + message.allow_list = StakeAuthorization.Validators.fromObject(data.allow_list); + } + if (data.deny_list != null) { + message.deny_list = StakeAuthorization.Validators.fromObject(data.deny_list); + } + if (data.authorization_type != null) { + message.authorization_type = data.authorization_type; + } + return message; + } + toObject() { + const data: { + max_tokens?: ReturnType; + allow_list?: ReturnType; + deny_list?: ReturnType; + authorization_type?: AuthorizationType; + } = {}; + if (this.max_tokens != null) { + data.max_tokens = this.max_tokens.toObject(); + } + if (this.allow_list != null) { + data.allow_list = this.allow_list.toObject(); + } + if (this.deny_list != null) { + data.deny_list = this.deny_list.toObject(); + } + if (this.authorization_type != null) { + data.authorization_type = this.authorization_type; + } + 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_max_tokens) + writer.writeMessage(1, this.max_tokens, () => this.max_tokens.serialize(writer)); + if (this.has_allow_list) + writer.writeMessage(2, this.allow_list, () => this.allow_list.serialize(writer)); + if (this.has_deny_list) + writer.writeMessage(3, this.deny_list, () => this.deny_list.serialize(writer)); + if (this.authorization_type != AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED) + writer.writeEnum(4, this.authorization_type); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StakeAuthorization { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StakeAuthorization(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.max_tokens, () => message.max_tokens = dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + case 2: + reader.readMessage(message.allow_list, () => message.allow_list = StakeAuthorization.Validators.deserialize(reader)); + break; + case 3: + reader.readMessage(message.deny_list, () => message.deny_list = StakeAuthorization.Validators.deserialize(reader)); + break; + case 4: + message.authorization_type = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): StakeAuthorization { + return StakeAuthorization.deserialize(bytes); + } + } + export namespace StakeAuthorization { + export class Validators extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string[]; + }) { + 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set address(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string[]; + }): Validators { + const message = new Validators({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string[]; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeRepeatedString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Validators { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Validators(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Validators { + return Validators.deserialize(bytes); + } + } + } +} diff --git a/proto/cosmos/staking/v1beta1/authz_pb.d.ts b/codegen/cosmos/staking/v1beta1/authz_pb.d.ts similarity index 98% rename from proto/cosmos/staking/v1beta1/authz_pb.d.ts rename to codegen/cosmos/staking/v1beta1/authz_pb.d.ts index d45abc8..07f768e 100644 --- a/proto/cosmos/staking/v1beta1/authz_pb.d.ts +++ b/codegen/cosmos/staking/v1beta1/authz_pb.d.ts @@ -79,6 +79,7 @@ export interface AuthorizationTypeMap { AUTHORIZATION_TYPE_DELEGATE: 1; AUTHORIZATION_TYPE_UNDELEGATE: 2; AUTHORIZATION_TYPE_REDELEGATE: 3; + AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION: 4; } export const AuthorizationType: AuthorizationTypeMap; diff --git a/proto/cosmos/staking/v1beta1/authz_pb.js b/codegen/cosmos/staking/v1beta1/authz_pb.js similarity index 99% rename from proto/cosmos/staking/v1beta1/authz_pb.js rename to codegen/cosmos/staking/v1beta1/authz_pb.js index 4ce33c6..f04fad1 100644 --- a/proto/cosmos/staking/v1beta1/authz_pb.js +++ b/codegen/cosmos/staking/v1beta1/authz_pb.js @@ -541,7 +541,8 @@ proto.cosmos.staking.v1beta1.AuthorizationType = { AUTHORIZATION_TYPE_UNSPECIFIED: 0, AUTHORIZATION_TYPE_DELEGATE: 1, AUTHORIZATION_TYPE_UNDELEGATE: 2, - AUTHORIZATION_TYPE_REDELEGATE: 3 + AUTHORIZATION_TYPE_REDELEGATE: 3, + AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION: 4 }; goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/proto/cosmos/staking/v1beta1/authz_pb_service.d.ts b/codegen/cosmos/staking/v1beta1/authz_pb_service.d.ts similarity index 100% rename from proto/cosmos/staking/v1beta1/authz_pb_service.d.ts rename to codegen/cosmos/staking/v1beta1/authz_pb_service.d.ts diff --git a/proto/cosmos/staking/v1beta1/authz_pb_service.js b/codegen/cosmos/staking/v1beta1/authz_pb_service.js similarity index 100% rename from proto/cosmos/staking/v1beta1/authz_pb_service.js rename to codegen/cosmos/staking/v1beta1/authz_pb_service.js diff --git a/codegen/cosmos/staking/v1beta1/genesis.ts b/codegen/cosmos/staking/v1beta1/genesis.ts new file mode 100644 index 0000000..4923860 --- /dev/null +++ b/codegen/cosmos/staking/v1beta1/genesis.ts @@ -0,0 +1,333 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/staking/v1beta1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./staking"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.staking.v1beta1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_2.cosmos.staking.v1beta1.Params; + last_total_power?: Uint8Array; + last_validator_powers?: LastValidatorPower[]; + validators?: dependency_2.cosmos.staking.v1beta1.Validator[]; + delegations?: dependency_2.cosmos.staking.v1beta1.Delegation[]; + unbonding_delegations?: dependency_2.cosmos.staking.v1beta1.UnbondingDelegation[]; + redelegations?: dependency_2.cosmos.staking.v1beta1.Redelegation[]; + exported?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4, 5, 6, 7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("last_total_power" in data && data.last_total_power != undefined) { + this.last_total_power = data.last_total_power; + } + if ("last_validator_powers" in data && data.last_validator_powers != undefined) { + this.last_validator_powers = data.last_validator_powers; + } + if ("validators" in data && data.validators != undefined) { + this.validators = data.validators; + } + if ("delegations" in data && data.delegations != undefined) { + this.delegations = data.delegations; + } + if ("unbonding_delegations" in data && data.unbonding_delegations != undefined) { + this.unbonding_delegations = data.unbonding_delegations; + } + if ("redelegations" in data && data.redelegations != undefined) { + this.redelegations = data.redelegations; + } + if ("exported" in data && data.exported != undefined) { + this.exported = data.exported; + } + } + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.staking.v1beta1.Params, 1) as dependency_2.cosmos.staking.v1beta1.Params; + } + set params(value: dependency_2.cosmos.staking.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + get last_total_power() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set last_total_power(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get last_validator_powers() { + return pb_1.Message.getRepeatedWrapperField(this, LastValidatorPower, 3) as LastValidatorPower[]; + } + set last_validator_powers(value: LastValidatorPower[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get validators() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.staking.v1beta1.Validator, 4) as dependency_2.cosmos.staking.v1beta1.Validator[]; + } + set validators(value: dependency_2.cosmos.staking.v1beta1.Validator[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get delegations() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.staking.v1beta1.Delegation, 5) as dependency_2.cosmos.staking.v1beta1.Delegation[]; + } + set delegations(value: dependency_2.cosmos.staking.v1beta1.Delegation[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get unbonding_delegations() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.staking.v1beta1.UnbondingDelegation, 6) as dependency_2.cosmos.staking.v1beta1.UnbondingDelegation[]; + } + set unbonding_delegations(value: dependency_2.cosmos.staking.v1beta1.UnbondingDelegation[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get redelegations() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.staking.v1beta1.Redelegation, 7) as dependency_2.cosmos.staking.v1beta1.Redelegation[]; + } + set redelegations(value: dependency_2.cosmos.staking.v1beta1.Redelegation[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get exported() { + return pb_1.Message.getFieldWithDefault(this, 8, false) as boolean; + } + set exported(value: boolean) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + params?: ReturnType; + last_total_power?: Uint8Array; + last_validator_powers?: ReturnType[]; + validators?: ReturnType[]; + delegations?: ReturnType[]; + unbonding_delegations?: ReturnType[]; + redelegations?: ReturnType[]; + exported?: boolean; + }): GenesisState { + const message = new GenesisState({}); + if (data.params != null) { + message.params = dependency_2.cosmos.staking.v1beta1.Params.fromObject(data.params); + } + if (data.last_total_power != null) { + message.last_total_power = data.last_total_power; + } + if (data.last_validator_powers != null) { + message.last_validator_powers = data.last_validator_powers.map(item => LastValidatorPower.fromObject(item)); + } + if (data.validators != null) { + message.validators = data.validators.map(item => dependency_2.cosmos.staking.v1beta1.Validator.fromObject(item)); + } + if (data.delegations != null) { + message.delegations = data.delegations.map(item => dependency_2.cosmos.staking.v1beta1.Delegation.fromObject(item)); + } + if (data.unbonding_delegations != null) { + message.unbonding_delegations = data.unbonding_delegations.map(item => dependency_2.cosmos.staking.v1beta1.UnbondingDelegation.fromObject(item)); + } + if (data.redelegations != null) { + message.redelegations = data.redelegations.map(item => dependency_2.cosmos.staking.v1beta1.Redelegation.fromObject(item)); + } + if (data.exported != null) { + message.exported = data.exported; + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + last_total_power?: Uint8Array; + last_validator_powers?: ReturnType[]; + validators?: ReturnType[]; + delegations?: ReturnType[]; + unbonding_delegations?: ReturnType[]; + redelegations?: ReturnType[]; + exported?: boolean; + } = {}; + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.last_total_power != null) { + data.last_total_power = this.last_total_power; + } + if (this.last_validator_powers != null) { + data.last_validator_powers = this.last_validator_powers.map((item: LastValidatorPower) => item.toObject()); + } + if (this.validators != null) { + data.validators = this.validators.map((item: dependency_2.cosmos.staking.v1beta1.Validator) => item.toObject()); + } + if (this.delegations != null) { + data.delegations = this.delegations.map((item: dependency_2.cosmos.staking.v1beta1.Delegation) => item.toObject()); + } + if (this.unbonding_delegations != null) { + data.unbonding_delegations = this.unbonding_delegations.map((item: dependency_2.cosmos.staking.v1beta1.UnbondingDelegation) => item.toObject()); + } + if (this.redelegations != null) { + data.redelegations = this.redelegations.map((item: dependency_2.cosmos.staking.v1beta1.Redelegation) => item.toObject()); + } + if (this.exported != null) { + data.exported = this.exported; + } + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (this.last_total_power.length) + writer.writeBytes(2, this.last_total_power); + if (this.last_validator_powers.length) + writer.writeRepeatedMessage(3, this.last_validator_powers, (item: LastValidatorPower) => item.serialize(writer)); + if (this.validators.length) + writer.writeRepeatedMessage(4, this.validators, (item: dependency_2.cosmos.staking.v1beta1.Validator) => item.serialize(writer)); + if (this.delegations.length) + writer.writeRepeatedMessage(5, this.delegations, (item: dependency_2.cosmos.staking.v1beta1.Delegation) => item.serialize(writer)); + if (this.unbonding_delegations.length) + writer.writeRepeatedMessage(6, this.unbonding_delegations, (item: dependency_2.cosmos.staking.v1beta1.UnbondingDelegation) => item.serialize(writer)); + if (this.redelegations.length) + writer.writeRepeatedMessage(7, this.redelegations, (item: dependency_2.cosmos.staking.v1beta1.Redelegation) => item.serialize(writer)); + if (this.exported != false) + writer.writeBool(8, this.exported); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_2.cosmos.staking.v1beta1.Params.deserialize(reader)); + break; + case 2: + message.last_total_power = reader.readBytes(); + break; + case 3: + reader.readMessage(message.last_validator_powers, () => pb_1.Message.addToRepeatedWrapperField(message, 3, LastValidatorPower.deserialize(reader), LastValidatorPower)); + break; + case 4: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.cosmos.staking.v1beta1.Validator.deserialize(reader), dependency_2.cosmos.staking.v1beta1.Validator)); + break; + case 5: + reader.readMessage(message.delegations, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_2.cosmos.staking.v1beta1.Delegation.deserialize(reader), dependency_2.cosmos.staking.v1beta1.Delegation)); + break; + case 6: + reader.readMessage(message.unbonding_delegations, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_2.cosmos.staking.v1beta1.UnbondingDelegation.deserialize(reader), dependency_2.cosmos.staking.v1beta1.UnbondingDelegation)); + break; + case 7: + reader.readMessage(message.redelegations, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_2.cosmos.staking.v1beta1.Redelegation.deserialize(reader), dependency_2.cosmos.staking.v1beta1.Redelegation)); + break; + case 8: + message.exported = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class LastValidatorPower extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + power?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set power(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + address?: string; + power?: number; + }): LastValidatorPower { + const message = new LastValidatorPower({}); + if (data.address != null) { + message.address = data.address; + } + if (data.power != null) { + message.power = data.power; + } + return message; + } + toObject() { + const data: { + address?: string; + power?: number; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.power != null) { + data.power = this.power; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.power != 0) + writer.writeInt64(2, this.power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LastValidatorPower { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LastValidatorPower(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + message.power = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): LastValidatorPower { + return LastValidatorPower.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/staking/v1beta1/genesis_pb.d.ts b/codegen/cosmos/staking/v1beta1/genesis_pb.d.ts similarity index 100% rename from proto/cosmos/staking/v1beta1/genesis_pb.d.ts rename to codegen/cosmos/staking/v1beta1/genesis_pb.d.ts diff --git a/proto/cosmos/staking/v1beta1/genesis_pb.js b/codegen/cosmos/staking/v1beta1/genesis_pb.js similarity index 100% rename from proto/cosmos/staking/v1beta1/genesis_pb.js rename to codegen/cosmos/staking/v1beta1/genesis_pb.js diff --git a/proto/cosmos/staking/v1beta1/genesis_pb_service.d.ts b/codegen/cosmos/staking/v1beta1/genesis_pb_service.d.ts similarity index 100% rename from proto/cosmos/staking/v1beta1/genesis_pb_service.d.ts rename to codegen/cosmos/staking/v1beta1/genesis_pb_service.d.ts diff --git a/proto/cosmos/staking/v1beta1/genesis_pb_service.js b/codegen/cosmos/staking/v1beta1/genesis_pb_service.js similarity index 100% rename from proto/cosmos/staking/v1beta1/genesis_pb_service.js rename to codegen/cosmos/staking/v1beta1/genesis_pb_service.js diff --git a/codegen/cosmos/staking/v1beta1/query.ts b/codegen/cosmos/staking/v1beta1/query.ts new file mode 100644 index 0000000..06e78e6 --- /dev/null +++ b/codegen/cosmos/staking/v1beta1/query.ts @@ -0,0 +1,2554 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/staking/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/api/annotations"; +import * as dependency_4 from "./staking"; +import * as dependency_5 from "./../../../cosmos_proto/cosmos"; +import * as dependency_6 from "./../../query/v1/query"; +import * as dependency_7 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.staking.v1beta1 { + export class QueryValidatorsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + status?: string; + pagination?: dependency_1.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 ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + status?: string; + pagination?: ReturnType; + }): QueryValidatorsRequest { + const message = new QueryValidatorsRequest({}); + if (data.status != null) { + message.status = data.status; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + status?: string; + pagination?: ReturnType; + } = {}; + if (this.status != null) { + data.status = this.status; + } + 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.status.length) + writer.writeString(1, this.status); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.status = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorsRequest { + return QueryValidatorsRequest.deserialize(bytes); + } + } + export class QueryValidatorsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validators?: dependency_4.cosmos.staking.v1beta1.Validator[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("validators" in data && data.validators != undefined) { + this.validators = data.validators; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get validators() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.staking.v1beta1.Validator, 1) as dependency_4.cosmos.staking.v1beta1.Validator[]; + } + set validators(value: dependency_4.cosmos.staking.v1beta1.Validator[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + validators?: ReturnType[]; + pagination?: ReturnType; + }): QueryValidatorsResponse { + const message = new QueryValidatorsResponse({}); + if (data.validators != null) { + message.validators = data.validators.map(item => dependency_4.cosmos.staking.v1beta1.Validator.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + validators?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.validators != null) { + data.validators = this.validators.map((item: dependency_4.cosmos.staking.v1beta1.Validator) => item.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.validators.length) + writer.writeRepeatedMessage(1, this.validators, (item: dependency_4.cosmos.staking.v1beta1.Validator) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.staking.v1beta1.Validator.deserialize(reader), dependency_4.cosmos.staking.v1beta1.Validator)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorsResponse { + return QueryValidatorsResponse.deserialize(bytes); + } + } + export class QueryValidatorRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_addr?: 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 ("validator_addr" in data && data.validator_addr != undefined) { + this.validator_addr = data.validator_addr; + } + } + } + get validator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + validator_addr?: string; + }): QueryValidatorRequest { + const message = new QueryValidatorRequest({}); + if (data.validator_addr != null) { + message.validator_addr = data.validator_addr; + } + return message; + } + toObject() { + const data: { + validator_addr?: string; + } = {}; + if (this.validator_addr != null) { + data.validator_addr = this.validator_addr; + } + 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.validator_addr.length) + writer.writeString(1, this.validator_addr); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_addr = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorRequest { + return QueryValidatorRequest.deserialize(bytes); + } + } + export class QueryValidatorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: dependency_4.cosmos.staking.v1beta1.Validator; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + } + } + get validator() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.staking.v1beta1.Validator, 1) as dependency_4.cosmos.staking.v1beta1.Validator; + } + set validator(value: dependency_4.cosmos.staking.v1beta1.Validator) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_validator() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + validator?: ReturnType; + }): QueryValidatorResponse { + const message = new QueryValidatorResponse({}); + if (data.validator != null) { + message.validator = dependency_4.cosmos.staking.v1beta1.Validator.fromObject(data.validator); + } + return message; + } + toObject() { + const data: { + validator?: ReturnType; + } = {}; + if (this.validator != null) { + data.validator = this.validator.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_validator) + writer.writeMessage(1, this.validator, () => this.validator.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validator, () => message.validator = dependency_4.cosmos.staking.v1beta1.Validator.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorResponse { + return QueryValidatorResponse.deserialize(bytes); + } + } + export class QueryValidatorDelegationsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_addr?: string; + pagination?: dependency_1.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 ("validator_addr" in data && data.validator_addr != undefined) { + this.validator_addr = data.validator_addr; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get validator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + validator_addr?: string; + pagination?: ReturnType; + }): QueryValidatorDelegationsRequest { + const message = new QueryValidatorDelegationsRequest({}); + if (data.validator_addr != null) { + message.validator_addr = data.validator_addr; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + validator_addr?: string; + pagination?: ReturnType; + } = {}; + if (this.validator_addr != null) { + data.validator_addr = this.validator_addr; + } + 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.validator_addr.length) + writer.writeString(1, this.validator_addr); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorDelegationsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorDelegationsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_addr = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorDelegationsRequest { + return QueryValidatorDelegationsRequest.deserialize(bytes); + } + } + export class QueryValidatorDelegationsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegation_responses?: dependency_4.cosmos.staking.v1beta1.DelegationResponse[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("delegation_responses" in data && data.delegation_responses != undefined) { + this.delegation_responses = data.delegation_responses; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get delegation_responses() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.staking.v1beta1.DelegationResponse, 1) as dependency_4.cosmos.staking.v1beta1.DelegationResponse[]; + } + set delegation_responses(value: dependency_4.cosmos.staking.v1beta1.DelegationResponse[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + delegation_responses?: ReturnType[]; + pagination?: ReturnType; + }): QueryValidatorDelegationsResponse { + const message = new QueryValidatorDelegationsResponse({}); + if (data.delegation_responses != null) { + message.delegation_responses = data.delegation_responses.map(item => dependency_4.cosmos.staking.v1beta1.DelegationResponse.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + delegation_responses?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.delegation_responses != null) { + data.delegation_responses = this.delegation_responses.map((item: dependency_4.cosmos.staking.v1beta1.DelegationResponse) => item.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.delegation_responses.length) + writer.writeRepeatedMessage(1, this.delegation_responses, (item: dependency_4.cosmos.staking.v1beta1.DelegationResponse) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorDelegationsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorDelegationsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.delegation_responses, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.staking.v1beta1.DelegationResponse.deserialize(reader), dependency_4.cosmos.staking.v1beta1.DelegationResponse)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorDelegationsResponse { + return QueryValidatorDelegationsResponse.deserialize(bytes); + } + } + export class QueryValidatorUnbondingDelegationsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator_addr?: string; + pagination?: dependency_1.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 ("validator_addr" in data && data.validator_addr != undefined) { + this.validator_addr = data.validator_addr; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get validator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set validator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + validator_addr?: string; + pagination?: ReturnType; + }): QueryValidatorUnbondingDelegationsRequest { + const message = new QueryValidatorUnbondingDelegationsRequest({}); + if (data.validator_addr != null) { + message.validator_addr = data.validator_addr; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + validator_addr?: string; + pagination?: ReturnType; + } = {}; + if (this.validator_addr != null) { + data.validator_addr = this.validator_addr; + } + 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.validator_addr.length) + writer.writeString(1, this.validator_addr); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorUnbondingDelegationsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorUnbondingDelegationsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.validator_addr = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorUnbondingDelegationsRequest { + return QueryValidatorUnbondingDelegationsRequest.deserialize(bytes); + } + } + export class QueryValidatorUnbondingDelegationsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + unbonding_responses?: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("unbonding_responses" in data && data.unbonding_responses != undefined) { + this.unbonding_responses = data.unbonding_responses; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get unbonding_responses() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.staking.v1beta1.UnbondingDelegation, 1) as dependency_4.cosmos.staking.v1beta1.UnbondingDelegation[]; + } + set unbonding_responses(value: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + unbonding_responses?: ReturnType[]; + pagination?: ReturnType; + }): QueryValidatorUnbondingDelegationsResponse { + const message = new QueryValidatorUnbondingDelegationsResponse({}); + if (data.unbonding_responses != null) { + message.unbonding_responses = data.unbonding_responses.map(item => dependency_4.cosmos.staking.v1beta1.UnbondingDelegation.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + unbonding_responses?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.unbonding_responses != null) { + data.unbonding_responses = this.unbonding_responses.map((item: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation) => item.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.unbonding_responses.length) + writer.writeRepeatedMessage(1, this.unbonding_responses, (item: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryValidatorUnbondingDelegationsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryValidatorUnbondingDelegationsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.unbonding_responses, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.staking.v1beta1.UnbondingDelegation.deserialize(reader), dependency_4.cosmos.staking.v1beta1.UnbondingDelegation)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryValidatorUnbondingDelegationsResponse { + return QueryValidatorUnbondingDelegationsResponse.deserialize(bytes); + } + } + export class QueryDelegationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_addr?: string; + validator_addr?: 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 ("delegator_addr" in data && data.delegator_addr != undefined) { + this.delegator_addr = data.delegator_addr; + } + if ("validator_addr" in data && data.validator_addr != undefined) { + this.validator_addr = data.validator_addr; + } + } + } + get delegator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_addr() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_addr(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + delegator_addr?: string; + validator_addr?: string; + }): QueryDelegationRequest { + const message = new QueryDelegationRequest({}); + if (data.delegator_addr != null) { + message.delegator_addr = data.delegator_addr; + } + if (data.validator_addr != null) { + message.validator_addr = data.validator_addr; + } + return message; + } + toObject() { + const data: { + delegator_addr?: string; + validator_addr?: string; + } = {}; + if (this.delegator_addr != null) { + data.delegator_addr = this.delegator_addr; + } + if (this.validator_addr != null) { + data.validator_addr = this.validator_addr; + } + 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.delegator_addr.length) + writer.writeString(1, this.delegator_addr); + if (this.validator_addr.length) + writer.writeString(2, this.validator_addr); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_addr = reader.readString(); + break; + case 2: + message.validator_addr = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegationRequest { + return QueryDelegationRequest.deserialize(bytes); + } + } + export class QueryDelegationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegation_response?: dependency_4.cosmos.staking.v1beta1.DelegationResponse; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("delegation_response" in data && data.delegation_response != undefined) { + this.delegation_response = data.delegation_response; + } + } + } + get delegation_response() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.staking.v1beta1.DelegationResponse, 1) as dependency_4.cosmos.staking.v1beta1.DelegationResponse; + } + set delegation_response(value: dependency_4.cosmos.staking.v1beta1.DelegationResponse) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_delegation_response() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + delegation_response?: ReturnType; + }): QueryDelegationResponse { + const message = new QueryDelegationResponse({}); + if (data.delegation_response != null) { + message.delegation_response = dependency_4.cosmos.staking.v1beta1.DelegationResponse.fromObject(data.delegation_response); + } + return message; + } + toObject() { + const data: { + delegation_response?: ReturnType; + } = {}; + if (this.delegation_response != null) { + data.delegation_response = this.delegation_response.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_delegation_response) + writer.writeMessage(1, this.delegation_response, () => this.delegation_response.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.delegation_response, () => message.delegation_response = dependency_4.cosmos.staking.v1beta1.DelegationResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegationResponse { + return QueryDelegationResponse.deserialize(bytes); + } + } + export class QueryUnbondingDelegationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_addr?: string; + validator_addr?: 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 ("delegator_addr" in data && data.delegator_addr != undefined) { + this.delegator_addr = data.delegator_addr; + } + if ("validator_addr" in data && data.validator_addr != undefined) { + this.validator_addr = data.validator_addr; + } + } + } + get delegator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_addr() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_addr(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + delegator_addr?: string; + validator_addr?: string; + }): QueryUnbondingDelegationRequest { + const message = new QueryUnbondingDelegationRequest({}); + if (data.delegator_addr != null) { + message.delegator_addr = data.delegator_addr; + } + if (data.validator_addr != null) { + message.validator_addr = data.validator_addr; + } + return message; + } + toObject() { + const data: { + delegator_addr?: string; + validator_addr?: string; + } = {}; + if (this.delegator_addr != null) { + data.delegator_addr = this.delegator_addr; + } + if (this.validator_addr != null) { + data.validator_addr = this.validator_addr; + } + 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.delegator_addr.length) + writer.writeString(1, this.delegator_addr); + if (this.validator_addr.length) + writer.writeString(2, this.validator_addr); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUnbondingDelegationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUnbondingDelegationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_addr = reader.readString(); + break; + case 2: + message.validator_addr = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUnbondingDelegationRequest { + return QueryUnbondingDelegationRequest.deserialize(bytes); + } + } + export class QueryUnbondingDelegationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + unbond?: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("unbond" in data && data.unbond != undefined) { + this.unbond = data.unbond; + } + } + } + get unbond() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.staking.v1beta1.UnbondingDelegation, 1) as dependency_4.cosmos.staking.v1beta1.UnbondingDelegation; + } + set unbond(value: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_unbond() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + unbond?: ReturnType; + }): QueryUnbondingDelegationResponse { + const message = new QueryUnbondingDelegationResponse({}); + if (data.unbond != null) { + message.unbond = dependency_4.cosmos.staking.v1beta1.UnbondingDelegation.fromObject(data.unbond); + } + return message; + } + toObject() { + const data: { + unbond?: ReturnType; + } = {}; + if (this.unbond != null) { + data.unbond = this.unbond.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_unbond) + writer.writeMessage(1, this.unbond, () => this.unbond.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUnbondingDelegationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUnbondingDelegationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.unbond, () => message.unbond = dependency_4.cosmos.staking.v1beta1.UnbondingDelegation.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUnbondingDelegationResponse { + return QueryUnbondingDelegationResponse.deserialize(bytes); + } + } + export class QueryDelegatorDelegationsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_addr?: string; + pagination?: dependency_1.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 ("delegator_addr" in data && data.delegator_addr != undefined) { + this.delegator_addr = data.delegator_addr; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get delegator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + delegator_addr?: string; + pagination?: ReturnType; + }): QueryDelegatorDelegationsRequest { + const message = new QueryDelegatorDelegationsRequest({}); + if (data.delegator_addr != null) { + message.delegator_addr = data.delegator_addr; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + delegator_addr?: string; + pagination?: ReturnType; + } = {}; + if (this.delegator_addr != null) { + data.delegator_addr = this.delegator_addr; + } + 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.delegator_addr.length) + writer.writeString(1, this.delegator_addr); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorDelegationsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorDelegationsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_addr = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorDelegationsRequest { + return QueryDelegatorDelegationsRequest.deserialize(bytes); + } + } + export class QueryDelegatorDelegationsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegation_responses?: dependency_4.cosmos.staking.v1beta1.DelegationResponse[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("delegation_responses" in data && data.delegation_responses != undefined) { + this.delegation_responses = data.delegation_responses; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get delegation_responses() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.staking.v1beta1.DelegationResponse, 1) as dependency_4.cosmos.staking.v1beta1.DelegationResponse[]; + } + set delegation_responses(value: dependency_4.cosmos.staking.v1beta1.DelegationResponse[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + delegation_responses?: ReturnType[]; + pagination?: ReturnType; + }): QueryDelegatorDelegationsResponse { + const message = new QueryDelegatorDelegationsResponse({}); + if (data.delegation_responses != null) { + message.delegation_responses = data.delegation_responses.map(item => dependency_4.cosmos.staking.v1beta1.DelegationResponse.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + delegation_responses?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.delegation_responses != null) { + data.delegation_responses = this.delegation_responses.map((item: dependency_4.cosmos.staking.v1beta1.DelegationResponse) => item.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.delegation_responses.length) + writer.writeRepeatedMessage(1, this.delegation_responses, (item: dependency_4.cosmos.staking.v1beta1.DelegationResponse) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorDelegationsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorDelegationsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.delegation_responses, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.staking.v1beta1.DelegationResponse.deserialize(reader), dependency_4.cosmos.staking.v1beta1.DelegationResponse)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorDelegationsResponse { + return QueryDelegatorDelegationsResponse.deserialize(bytes); + } + } + export class QueryDelegatorUnbondingDelegationsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_addr?: string; + pagination?: dependency_1.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 ("delegator_addr" in data && data.delegator_addr != undefined) { + this.delegator_addr = data.delegator_addr; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get delegator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + delegator_addr?: string; + pagination?: ReturnType; + }): QueryDelegatorUnbondingDelegationsRequest { + const message = new QueryDelegatorUnbondingDelegationsRequest({}); + if (data.delegator_addr != null) { + message.delegator_addr = data.delegator_addr; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + delegator_addr?: string; + pagination?: ReturnType; + } = {}; + if (this.delegator_addr != null) { + data.delegator_addr = this.delegator_addr; + } + 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.delegator_addr.length) + writer.writeString(1, this.delegator_addr); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorUnbondingDelegationsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorUnbondingDelegationsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_addr = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorUnbondingDelegationsRequest { + return QueryDelegatorUnbondingDelegationsRequest.deserialize(bytes); + } + } + export class QueryDelegatorUnbondingDelegationsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + unbonding_responses?: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("unbonding_responses" in data && data.unbonding_responses != undefined) { + this.unbonding_responses = data.unbonding_responses; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get unbonding_responses() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.staking.v1beta1.UnbondingDelegation, 1) as dependency_4.cosmos.staking.v1beta1.UnbondingDelegation[]; + } + set unbonding_responses(value: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + unbonding_responses?: ReturnType[]; + pagination?: ReturnType; + }): QueryDelegatorUnbondingDelegationsResponse { + const message = new QueryDelegatorUnbondingDelegationsResponse({}); + if (data.unbonding_responses != null) { + message.unbonding_responses = data.unbonding_responses.map(item => dependency_4.cosmos.staking.v1beta1.UnbondingDelegation.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + unbonding_responses?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.unbonding_responses != null) { + data.unbonding_responses = this.unbonding_responses.map((item: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation) => item.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.unbonding_responses.length) + writer.writeRepeatedMessage(1, this.unbonding_responses, (item: dependency_4.cosmos.staking.v1beta1.UnbondingDelegation) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorUnbondingDelegationsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorUnbondingDelegationsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.unbonding_responses, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.staking.v1beta1.UnbondingDelegation.deserialize(reader), dependency_4.cosmos.staking.v1beta1.UnbondingDelegation)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorUnbondingDelegationsResponse { + return QueryDelegatorUnbondingDelegationsResponse.deserialize(bytes); + } + } + export class QueryRedelegationsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_addr?: string; + src_validator_addr?: string; + dst_validator_addr?: string; + pagination?: dependency_1.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 ("delegator_addr" in data && data.delegator_addr != undefined) { + this.delegator_addr = data.delegator_addr; + } + if ("src_validator_addr" in data && data.src_validator_addr != undefined) { + this.src_validator_addr = data.src_validator_addr; + } + if ("dst_validator_addr" in data && data.dst_validator_addr != undefined) { + this.dst_validator_addr = data.dst_validator_addr; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get delegator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + get src_validator_addr() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set src_validator_addr(value: string) { + pb_1.Message.setField(this, 2, value); + } + get dst_validator_addr() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set dst_validator_addr(value: string) { + pb_1.Message.setField(this, 3, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 4) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + delegator_addr?: string; + src_validator_addr?: string; + dst_validator_addr?: string; + pagination?: ReturnType; + }): QueryRedelegationsRequest { + const message = new QueryRedelegationsRequest({}); + if (data.delegator_addr != null) { + message.delegator_addr = data.delegator_addr; + } + if (data.src_validator_addr != null) { + message.src_validator_addr = data.src_validator_addr; + } + if (data.dst_validator_addr != null) { + message.dst_validator_addr = data.dst_validator_addr; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + delegator_addr?: string; + src_validator_addr?: string; + dst_validator_addr?: string; + pagination?: ReturnType; + } = {}; + if (this.delegator_addr != null) { + data.delegator_addr = this.delegator_addr; + } + if (this.src_validator_addr != null) { + data.src_validator_addr = this.src_validator_addr; + } + if (this.dst_validator_addr != null) { + data.dst_validator_addr = this.dst_validator_addr; + } + 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.delegator_addr.length) + writer.writeString(1, this.delegator_addr); + if (this.src_validator_addr.length) + writer.writeString(2, this.src_validator_addr); + if (this.dst_validator_addr.length) + writer.writeString(3, this.dst_validator_addr); + if (this.has_pagination) + writer.writeMessage(4, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRedelegationsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRedelegationsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_addr = reader.readString(); + break; + case 2: + message.src_validator_addr = reader.readString(); + break; + case 3: + message.dst_validator_addr = reader.readString(); + break; + case 4: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRedelegationsRequest { + return QueryRedelegationsRequest.deserialize(bytes); + } + } + export class QueryRedelegationsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + redelegation_responses?: dependency_4.cosmos.staking.v1beta1.RedelegationResponse[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("redelegation_responses" in data && data.redelegation_responses != undefined) { + this.redelegation_responses = data.redelegation_responses; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get redelegation_responses() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.staking.v1beta1.RedelegationResponse, 1) as dependency_4.cosmos.staking.v1beta1.RedelegationResponse[]; + } + set redelegation_responses(value: dependency_4.cosmos.staking.v1beta1.RedelegationResponse[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + redelegation_responses?: ReturnType[]; + pagination?: ReturnType; + }): QueryRedelegationsResponse { + const message = new QueryRedelegationsResponse({}); + if (data.redelegation_responses != null) { + message.redelegation_responses = data.redelegation_responses.map(item => dependency_4.cosmos.staking.v1beta1.RedelegationResponse.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + redelegation_responses?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.redelegation_responses != null) { + data.redelegation_responses = this.redelegation_responses.map((item: dependency_4.cosmos.staking.v1beta1.RedelegationResponse) => item.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.redelegation_responses.length) + writer.writeRepeatedMessage(1, this.redelegation_responses, (item: dependency_4.cosmos.staking.v1beta1.RedelegationResponse) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRedelegationsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRedelegationsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.redelegation_responses, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.staking.v1beta1.RedelegationResponse.deserialize(reader), dependency_4.cosmos.staking.v1beta1.RedelegationResponse)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRedelegationsResponse { + return QueryRedelegationsResponse.deserialize(bytes); + } + } + export class QueryDelegatorValidatorsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_addr?: string; + pagination?: dependency_1.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 ("delegator_addr" in data && data.delegator_addr != undefined) { + this.delegator_addr = data.delegator_addr; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get delegator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + delegator_addr?: string; + pagination?: ReturnType; + }): QueryDelegatorValidatorsRequest { + const message = new QueryDelegatorValidatorsRequest({}); + if (data.delegator_addr != null) { + message.delegator_addr = data.delegator_addr; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + delegator_addr?: string; + pagination?: ReturnType; + } = {}; + if (this.delegator_addr != null) { + data.delegator_addr = this.delegator_addr; + } + 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.delegator_addr.length) + writer.writeString(1, this.delegator_addr); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorValidatorsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorValidatorsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_addr = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorValidatorsRequest { + return QueryDelegatorValidatorsRequest.deserialize(bytes); + } + } + export class QueryDelegatorValidatorsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validators?: dependency_4.cosmos.staking.v1beta1.Validator[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("validators" in data && data.validators != undefined) { + this.validators = data.validators; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get validators() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.staking.v1beta1.Validator, 1) as dependency_4.cosmos.staking.v1beta1.Validator[]; + } + set validators(value: dependency_4.cosmos.staking.v1beta1.Validator[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + validators?: ReturnType[]; + pagination?: ReturnType; + }): QueryDelegatorValidatorsResponse { + const message = new QueryDelegatorValidatorsResponse({}); + if (data.validators != null) { + message.validators = data.validators.map(item => dependency_4.cosmos.staking.v1beta1.Validator.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + validators?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.validators != null) { + data.validators = this.validators.map((item: dependency_4.cosmos.staking.v1beta1.Validator) => item.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.validators.length) + writer.writeRepeatedMessage(1, this.validators, (item: dependency_4.cosmos.staking.v1beta1.Validator) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorValidatorsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorValidatorsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.staking.v1beta1.Validator.deserialize(reader), dependency_4.cosmos.staking.v1beta1.Validator)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorValidatorsResponse { + return QueryDelegatorValidatorsResponse.deserialize(bytes); + } + } + export class QueryDelegatorValidatorRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_addr?: string; + validator_addr?: 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 ("delegator_addr" in data && data.delegator_addr != undefined) { + this.delegator_addr = data.delegator_addr; + } + if ("validator_addr" in data && data.validator_addr != undefined) { + this.validator_addr = data.validator_addr; + } + } + } + get delegator_addr() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_addr(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_addr() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_addr(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + delegator_addr?: string; + validator_addr?: string; + }): QueryDelegatorValidatorRequest { + const message = new QueryDelegatorValidatorRequest({}); + if (data.delegator_addr != null) { + message.delegator_addr = data.delegator_addr; + } + if (data.validator_addr != null) { + message.validator_addr = data.validator_addr; + } + return message; + } + toObject() { + const data: { + delegator_addr?: string; + validator_addr?: string; + } = {}; + if (this.delegator_addr != null) { + data.delegator_addr = this.delegator_addr; + } + if (this.validator_addr != null) { + data.validator_addr = this.validator_addr; + } + 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.delegator_addr.length) + writer.writeString(1, this.delegator_addr); + if (this.validator_addr.length) + writer.writeString(2, this.validator_addr); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorValidatorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorValidatorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_addr = reader.readString(); + break; + case 2: + message.validator_addr = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorValidatorRequest { + return QueryDelegatorValidatorRequest.deserialize(bytes); + } + } + export class QueryDelegatorValidatorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: dependency_4.cosmos.staking.v1beta1.Validator; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + } + } + get validator() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.staking.v1beta1.Validator, 1) as dependency_4.cosmos.staking.v1beta1.Validator; + } + set validator(value: dependency_4.cosmos.staking.v1beta1.Validator) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_validator() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + validator?: ReturnType; + }): QueryDelegatorValidatorResponse { + const message = new QueryDelegatorValidatorResponse({}); + if (data.validator != null) { + message.validator = dependency_4.cosmos.staking.v1beta1.Validator.fromObject(data.validator); + } + return message; + } + toObject() { + const data: { + validator?: ReturnType; + } = {}; + if (this.validator != null) { + data.validator = this.validator.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_validator) + writer.writeMessage(1, this.validator, () => this.validator.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDelegatorValidatorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDelegatorValidatorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validator, () => message.validator = dependency_4.cosmos.staking.v1beta1.Validator.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDelegatorValidatorResponse { + return QueryDelegatorValidatorResponse.deserialize(bytes); + } + } + export class QueryHistoricalInfoRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + 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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + height?: number; + }): QueryHistoricalInfoRequest { + const message = new QueryHistoricalInfoRequest({}); + if (data.height != null) { + message.height = data.height; + } + return message; + } + toObject() { + const data: { + height?: number; + } = {}; + if (this.height != null) { + data.height = this.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.height != 0) + writer.writeInt64(1, this.height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryHistoricalInfoRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryHistoricalInfoRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryHistoricalInfoRequest { + return QueryHistoricalInfoRequest.deserialize(bytes); + } + } + export class QueryHistoricalInfoResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hist?: dependency_4.cosmos.staking.v1beta1.HistoricalInfo; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("hist" in data && data.hist != undefined) { + this.hist = data.hist; + } + } + } + get hist() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.staking.v1beta1.HistoricalInfo, 1) as dependency_4.cosmos.staking.v1beta1.HistoricalInfo; + } + set hist(value: dependency_4.cosmos.staking.v1beta1.HistoricalInfo) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_hist() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + hist?: ReturnType; + }): QueryHistoricalInfoResponse { + const message = new QueryHistoricalInfoResponse({}); + if (data.hist != null) { + message.hist = dependency_4.cosmos.staking.v1beta1.HistoricalInfo.fromObject(data.hist); + } + return message; + } + toObject() { + const data: { + hist?: ReturnType; + } = {}; + if (this.hist != null) { + data.hist = this.hist.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_hist) + writer.writeMessage(1, this.hist, () => this.hist.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryHistoricalInfoResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryHistoricalInfoResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.hist, () => message.hist = dependency_4.cosmos.staking.v1beta1.HistoricalInfo.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryHistoricalInfoResponse { + return QueryHistoricalInfoResponse.deserialize(bytes); + } + } + export class QueryPoolRequest 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: {}): QueryPoolRequest { + const message = new QueryPoolRequest({}); + 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): QueryPoolRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPoolRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPoolRequest { + return QueryPoolRequest.deserialize(bytes); + } + } + export class QueryPoolResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pool?: dependency_4.cosmos.staking.v1beta1.Pool; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("pool" in data && data.pool != undefined) { + this.pool = data.pool; + } + } + } + get pool() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.staking.v1beta1.Pool, 1) as dependency_4.cosmos.staking.v1beta1.Pool; + } + set pool(value: dependency_4.cosmos.staking.v1beta1.Pool) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_pool() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + pool?: ReturnType; + }): QueryPoolResponse { + const message = new QueryPoolResponse({}); + if (data.pool != null) { + message.pool = dependency_4.cosmos.staking.v1beta1.Pool.fromObject(data.pool); + } + return message; + } + toObject() { + const data: { + pool?: ReturnType; + } = {}; + if (this.pool != null) { + data.pool = this.pool.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_pool) + writer.writeMessage(1, this.pool, () => this.pool.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPoolResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPoolResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pool, () => message.pool = dependency_4.cosmos.staking.v1beta1.Pool.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPoolResponse { + return QueryPoolResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_4.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.Params, 1) as dependency_4.cosmos.staking.v1beta1.Params; + } + set params(value: dependency_4.cosmos.staking.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_params() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + params?: ReturnType; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_4.cosmos.staking.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_4.cosmos.staking.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Validators: { + path: "/cosmos.staking.v1beta1.Query/Validators", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorsResponse.deserialize(new Uint8Array(bytes)) + }, + Validator: { + path: "/cosmos.staking.v1beta1.Query/Validator", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorResponse.deserialize(new Uint8Array(bytes)) + }, + ValidatorDelegations: { + path: "/cosmos.staking.v1beta1.Query/ValidatorDelegations", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorDelegationsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorDelegationsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorDelegationsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorDelegationsResponse.deserialize(new Uint8Array(bytes)) + }, + ValidatorUnbondingDelegations: { + path: "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryValidatorUnbondingDelegationsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryValidatorUnbondingDelegationsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryValidatorUnbondingDelegationsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryValidatorUnbondingDelegationsResponse.deserialize(new Uint8Array(bytes)) + }, + Delegation: { + path: "/cosmos.staking.v1beta1.Query/Delegation", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDelegationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDelegationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDelegationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDelegationResponse.deserialize(new Uint8Array(bytes)) + }, + UnbondingDelegation: { + path: "/cosmos.staking.v1beta1.Query/UnbondingDelegation", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryUnbondingDelegationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryUnbondingDelegationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryUnbondingDelegationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryUnbondingDelegationResponse.deserialize(new Uint8Array(bytes)) + }, + DelegatorDelegations: { + path: "/cosmos.staking.v1beta1.Query/DelegatorDelegations", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDelegatorDelegationsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDelegatorDelegationsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDelegatorDelegationsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDelegatorDelegationsResponse.deserialize(new Uint8Array(bytes)) + }, + DelegatorUnbondingDelegations: { + path: "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDelegatorUnbondingDelegationsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDelegatorUnbondingDelegationsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDelegatorUnbondingDelegationsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDelegatorUnbondingDelegationsResponse.deserialize(new Uint8Array(bytes)) + }, + Redelegations: { + path: "/cosmos.staking.v1beta1.Query/Redelegations", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryRedelegationsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryRedelegationsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryRedelegationsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryRedelegationsResponse.deserialize(new Uint8Array(bytes)) + }, + DelegatorValidators: { + path: "/cosmos.staking.v1beta1.Query/DelegatorValidators", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDelegatorValidatorsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDelegatorValidatorsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDelegatorValidatorsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDelegatorValidatorsResponse.deserialize(new Uint8Array(bytes)) + }, + DelegatorValidator: { + path: "/cosmos.staking.v1beta1.Query/DelegatorValidator", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDelegatorValidatorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDelegatorValidatorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDelegatorValidatorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDelegatorValidatorResponse.deserialize(new Uint8Array(bytes)) + }, + HistoricalInfo: { + path: "/cosmos.staking.v1beta1.Query/HistoricalInfo", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryHistoricalInfoRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryHistoricalInfoRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryHistoricalInfoResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryHistoricalInfoResponse.deserialize(new Uint8Array(bytes)) + }, + Pool: { + path: "/cosmos.staking.v1beta1.Query/Pool", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPoolRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPoolRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPoolResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPoolResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/cosmos.staking.v1beta1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Validators(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Validator(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ValidatorDelegations(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ValidatorUnbondingDelegations(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Delegation(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UnbondingDelegation(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DelegatorDelegations(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DelegatorUnbondingDelegations(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Redelegations(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DelegatorValidators(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DelegatorValidator(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract HistoricalInfo(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Pool(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Validators: GrpcUnaryServiceInterface = (message: QueryValidatorsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Validators(message, metadata, options, callback); + }; + Validator: GrpcUnaryServiceInterface = (message: QueryValidatorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Validator(message, metadata, options, callback); + }; + ValidatorDelegations: GrpcUnaryServiceInterface = (message: QueryValidatorDelegationsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ValidatorDelegations(message, metadata, options, callback); + }; + ValidatorUnbondingDelegations: GrpcUnaryServiceInterface = (message: QueryValidatorUnbondingDelegationsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ValidatorUnbondingDelegations(message, metadata, options, callback); + }; + Delegation: GrpcUnaryServiceInterface = (message: QueryDelegationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Delegation(message, metadata, options, callback); + }; + UnbondingDelegation: GrpcUnaryServiceInterface = (message: QueryUnbondingDelegationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UnbondingDelegation(message, metadata, options, callback); + }; + DelegatorDelegations: GrpcUnaryServiceInterface = (message: QueryDelegatorDelegationsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DelegatorDelegations(message, metadata, options, callback); + }; + DelegatorUnbondingDelegations: GrpcUnaryServiceInterface = (message: QueryDelegatorUnbondingDelegationsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DelegatorUnbondingDelegations(message, metadata, options, callback); + }; + Redelegations: GrpcUnaryServiceInterface = (message: QueryRedelegationsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Redelegations(message, metadata, options, callback); + }; + DelegatorValidators: GrpcUnaryServiceInterface = (message: QueryDelegatorValidatorsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DelegatorValidators(message, metadata, options, callback); + }; + DelegatorValidator: GrpcUnaryServiceInterface = (message: QueryDelegatorValidatorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DelegatorValidator(message, metadata, options, callback); + }; + HistoricalInfo: GrpcUnaryServiceInterface = (message: QueryHistoricalInfoRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.HistoricalInfo(message, metadata, options, callback); + }; + Pool: GrpcUnaryServiceInterface = (message: QueryPoolRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Pool(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/staking/v1beta1/query_pb.d.ts b/codegen/cosmos/staking/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/staking/v1beta1/query_pb.d.ts rename to codegen/cosmos/staking/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/staking/v1beta1/query_pb.js b/codegen/cosmos/staking/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/staking/v1beta1/query_pb.js rename to codegen/cosmos/staking/v1beta1/query_pb.js diff --git a/proto/cosmos/staking/v1beta1/query_pb_service.d.ts b/codegen/cosmos/staking/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/staking/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/staking/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/staking/v1beta1/query_pb_service.js b/codegen/cosmos/staking/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/staking/v1beta1/query_pb_service.js rename to codegen/cosmos/staking/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/staking/v1beta1/staking.ts b/codegen/cosmos/staking/v1beta1/staking.ts new file mode 100644 index 0000000..8b9d626 --- /dev/null +++ b/codegen/cosmos/staking/v1beta1/staking.ts @@ -0,0 +1,2604 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/staking/v1beta1/staking.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/any"; +import * as dependency_3 from "./../../../google/protobuf/duration"; +import * as dependency_4 from "./../../../google/protobuf/timestamp"; +import * as dependency_5 from "./../../../cosmos_proto/cosmos"; +import * as dependency_6 from "./../../base/v1beta1/coin"; +import * as dependency_7 from "./../../../amino/amino"; +import * as dependency_8 from "./../../../tendermint/types/types"; +import * as dependency_9 from "./../../../tendermint/abci/types"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.staking.v1beta1 { + export enum BondStatus { + BOND_STATUS_UNSPECIFIED = 0, + BOND_STATUS_UNBONDED = 1, + BOND_STATUS_UNBONDING = 2, + BOND_STATUS_BONDED = 3 + } + export enum Infraction { + INFRACTION_UNSPECIFIED = 0, + INFRACTION_DOUBLE_SIGN = 1, + INFRACTION_DOWNTIME = 2 + } + export class HistoricalInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + header?: dependency_8.tendermint.types.Header; + valset?: Validator[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("header" in data && data.header != undefined) { + this.header = data.header; + } + if ("valset" in data && data.valset != undefined) { + this.valset = data.valset; + } + } + } + get header() { + return pb_1.Message.getWrapperField(this, dependency_8.tendermint.types.Header, 1) as dependency_8.tendermint.types.Header; + } + set header(value: dependency_8.tendermint.types.Header) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_header() { + return pb_1.Message.getField(this, 1) != null; + } + get valset() { + return pb_1.Message.getRepeatedWrapperField(this, Validator, 2) as Validator[]; + } + set valset(value: Validator[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + header?: ReturnType; + valset?: ReturnType[]; + }): HistoricalInfo { + const message = new HistoricalInfo({}); + if (data.header != null) { + message.header = dependency_8.tendermint.types.Header.fromObject(data.header); + } + if (data.valset != null) { + message.valset = data.valset.map(item => Validator.fromObject(item)); + } + return message; + } + toObject() { + const data: { + header?: ReturnType; + valset?: ReturnType[]; + } = {}; + if (this.header != null) { + data.header = this.header.toObject(); + } + if (this.valset != null) { + data.valset = this.valset.map((item: Validator) => item.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_header) + writer.writeMessage(1, this.header, () => this.header.serialize(writer)); + if (this.valset.length) + writer.writeRepeatedMessage(2, this.valset, (item: Validator) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HistoricalInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HistoricalInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.header, () => message.header = dependency_8.tendermint.types.Header.deserialize(reader)); + break; + case 2: + reader.readMessage(message.valset, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Validator.deserialize(reader), Validator)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): HistoricalInfo { + return HistoricalInfo.deserialize(bytes); + } + } + export class CommissionRates extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + rate?: string; + max_rate?: string; + max_change_rate?: 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 ("rate" in data && data.rate != undefined) { + this.rate = data.rate; + } + if ("max_rate" in data && data.max_rate != undefined) { + this.max_rate = data.max_rate; + } + if ("max_change_rate" in data && data.max_change_rate != undefined) { + this.max_change_rate = data.max_change_rate; + } + } + } + get rate() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set rate(value: string) { + pb_1.Message.setField(this, 1, value); + } + get max_rate() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set max_rate(value: string) { + pb_1.Message.setField(this, 2, value); + } + get max_change_rate() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set max_change_rate(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + rate?: string; + max_rate?: string; + max_change_rate?: string; + }): CommissionRates { + const message = new CommissionRates({}); + if (data.rate != null) { + message.rate = data.rate; + } + if (data.max_rate != null) { + message.max_rate = data.max_rate; + } + if (data.max_change_rate != null) { + message.max_change_rate = data.max_change_rate; + } + return message; + } + toObject() { + const data: { + rate?: string; + max_rate?: string; + max_change_rate?: string; + } = {}; + if (this.rate != null) { + data.rate = this.rate; + } + if (this.max_rate != null) { + data.max_rate = this.max_rate; + } + if (this.max_change_rate != null) { + data.max_change_rate = this.max_change_rate; + } + 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.rate.length) + writer.writeString(1, this.rate); + if (this.max_rate.length) + writer.writeString(2, this.max_rate); + if (this.max_change_rate.length) + writer.writeString(3, this.max_change_rate); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommissionRates { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommissionRates(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.rate = reader.readString(); + break; + case 2: + message.max_rate = reader.readString(); + break; + case 3: + message.max_change_rate = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommissionRates { + return CommissionRates.deserialize(bytes); + } + } + export class Commission extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + commission_rates?: CommissionRates; + update_time?: dependency_4.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("commission_rates" in data && data.commission_rates != undefined) { + this.commission_rates = data.commission_rates; + } + if ("update_time" in data && data.update_time != undefined) { + this.update_time = data.update_time; + } + } + } + get commission_rates() { + return pb_1.Message.getWrapperField(this, CommissionRates, 1) as CommissionRates; + } + set commission_rates(value: CommissionRates) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_commission_rates() { + return pb_1.Message.getField(this, 1) != null; + } + get update_time() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Timestamp, 2) as dependency_4.google.protobuf.Timestamp; + } + set update_time(value: dependency_4.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_update_time() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + commission_rates?: ReturnType; + update_time?: ReturnType; + }): Commission { + const message = new Commission({}); + if (data.commission_rates != null) { + message.commission_rates = CommissionRates.fromObject(data.commission_rates); + } + if (data.update_time != null) { + message.update_time = dependency_4.google.protobuf.Timestamp.fromObject(data.update_time); + } + return message; + } + toObject() { + const data: { + commission_rates?: ReturnType; + update_time?: ReturnType; + } = {}; + if (this.commission_rates != null) { + data.commission_rates = this.commission_rates.toObject(); + } + if (this.update_time != null) { + data.update_time = this.update_time.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_commission_rates) + writer.writeMessage(1, this.commission_rates, () => this.commission_rates.serialize(writer)); + if (this.has_update_time) + writer.writeMessage(2, this.update_time, () => this.update_time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Commission { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Commission(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.commission_rates, () => message.commission_rates = CommissionRates.deserialize(reader)); + break; + case 2: + reader.readMessage(message.update_time, () => message.update_time = dependency_4.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Commission { + return Commission.deserialize(bytes); + } + } + export class Description extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + moniker?: string; + identity?: string; + website?: string; + security_contact?: string; + details?: 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 ("moniker" in data && data.moniker != undefined) { + this.moniker = data.moniker; + } + if ("identity" in data && data.identity != undefined) { + this.identity = data.identity; + } + if ("website" in data && data.website != undefined) { + this.website = data.website; + } + if ("security_contact" in data && data.security_contact != undefined) { + this.security_contact = data.security_contact; + } + if ("details" in data && data.details != undefined) { + this.details = data.details; + } + } + } + get moniker() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set moniker(value: string) { + pb_1.Message.setField(this, 1, value); + } + get identity() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set identity(value: string) { + pb_1.Message.setField(this, 2, value); + } + get website() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set website(value: string) { + pb_1.Message.setField(this, 3, value); + } + get security_contact() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set security_contact(value: string) { + pb_1.Message.setField(this, 4, value); + } + get details() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set details(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + moniker?: string; + identity?: string; + website?: string; + security_contact?: string; + details?: string; + }): Description { + const message = new Description({}); + if (data.moniker != null) { + message.moniker = data.moniker; + } + if (data.identity != null) { + message.identity = data.identity; + } + if (data.website != null) { + message.website = data.website; + } + if (data.security_contact != null) { + message.security_contact = data.security_contact; + } + if (data.details != null) { + message.details = data.details; + } + return message; + } + toObject() { + const data: { + moniker?: string; + identity?: string; + website?: string; + security_contact?: string; + details?: string; + } = {}; + if (this.moniker != null) { + data.moniker = this.moniker; + } + if (this.identity != null) { + data.identity = this.identity; + } + if (this.website != null) { + data.website = this.website; + } + if (this.security_contact != null) { + data.security_contact = this.security_contact; + } + if (this.details != null) { + data.details = this.details; + } + 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.moniker.length) + writer.writeString(1, this.moniker); + if (this.identity.length) + writer.writeString(2, this.identity); + if (this.website.length) + writer.writeString(3, this.website); + if (this.security_contact.length) + writer.writeString(4, this.security_contact); + if (this.details.length) + writer.writeString(5, this.details); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Description { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Description(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.moniker = reader.readString(); + break; + case 2: + message.identity = reader.readString(); + break; + case 3: + message.website = reader.readString(); + break; + case 4: + message.security_contact = reader.readString(); + break; + case 5: + message.details = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Description { + return Description.deserialize(bytes); + } + } + export class Validator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + operator_address?: string; + consensus_pubkey?: dependency_2.google.protobuf.Any; + jailed?: boolean; + status?: BondStatus; + tokens?: string; + delegator_shares?: string; + description?: Description; + unbonding_height?: number; + unbonding_time?: dependency_4.google.protobuf.Timestamp; + commission?: Commission; + min_self_delegation?: string; + unbonding_on_hold_ref_count?: number; + unbonding_ids?: number[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [13], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("operator_address" in data && data.operator_address != undefined) { + this.operator_address = data.operator_address; + } + if ("consensus_pubkey" in data && data.consensus_pubkey != undefined) { + this.consensus_pubkey = data.consensus_pubkey; + } + if ("jailed" in data && data.jailed != undefined) { + this.jailed = data.jailed; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("tokens" in data && data.tokens != undefined) { + this.tokens = data.tokens; + } + if ("delegator_shares" in data && data.delegator_shares != undefined) { + this.delegator_shares = data.delegator_shares; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("unbonding_height" in data && data.unbonding_height != undefined) { + this.unbonding_height = data.unbonding_height; + } + if ("unbonding_time" in data && data.unbonding_time != undefined) { + this.unbonding_time = data.unbonding_time; + } + if ("commission" in data && data.commission != undefined) { + this.commission = data.commission; + } + if ("min_self_delegation" in data && data.min_self_delegation != undefined) { + this.min_self_delegation = data.min_self_delegation; + } + if ("unbonding_on_hold_ref_count" in data && data.unbonding_on_hold_ref_count != undefined) { + this.unbonding_on_hold_ref_count = data.unbonding_on_hold_ref_count; + } + if ("unbonding_ids" in data && data.unbonding_ids != undefined) { + this.unbonding_ids = data.unbonding_ids; + } + } + } + get operator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set operator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get consensus_pubkey() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 2) as dependency_2.google.protobuf.Any; + } + set consensus_pubkey(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_consensus_pubkey() { + return pb_1.Message.getField(this, 2) != null; + } + get jailed() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set jailed(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 4, BondStatus.BOND_STATUS_UNSPECIFIED) as BondStatus; + } + set status(value: BondStatus) { + pb_1.Message.setField(this, 4, value); + } + get tokens() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set tokens(value: string) { + pb_1.Message.setField(this, 5, value); + } + get delegator_shares() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set delegator_shares(value: string) { + pb_1.Message.setField(this, 6, value); + } + get description() { + return pb_1.Message.getWrapperField(this, Description, 7) as Description; + } + set description(value: Description) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_description() { + return pb_1.Message.getField(this, 7) != null; + } + get unbonding_height() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set unbonding_height(value: number) { + pb_1.Message.setField(this, 8, value); + } + get unbonding_time() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Timestamp, 9) as dependency_4.google.protobuf.Timestamp; + } + set unbonding_time(value: dependency_4.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_unbonding_time() { + return pb_1.Message.getField(this, 9) != null; + } + get commission() { + return pb_1.Message.getWrapperField(this, Commission, 10) as Commission; + } + set commission(value: Commission) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_commission() { + return pb_1.Message.getField(this, 10) != null; + } + get min_self_delegation() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set min_self_delegation(value: string) { + pb_1.Message.setField(this, 11, value); + } + get unbonding_on_hold_ref_count() { + return pb_1.Message.getFieldWithDefault(this, 12, 0) as number; + } + set unbonding_on_hold_ref_count(value: number) { + pb_1.Message.setField(this, 12, value); + } + get unbonding_ids() { + return pb_1.Message.getFieldWithDefault(this, 13, []) as number[]; + } + set unbonding_ids(value: number[]) { + pb_1.Message.setField(this, 13, value); + } + static fromObject(data: { + operator_address?: string; + consensus_pubkey?: ReturnType; + jailed?: boolean; + status?: BondStatus; + tokens?: string; + delegator_shares?: string; + description?: ReturnType; + unbonding_height?: number; + unbonding_time?: ReturnType; + commission?: ReturnType; + min_self_delegation?: string; + unbonding_on_hold_ref_count?: number; + unbonding_ids?: number[]; + }): Validator { + const message = new Validator({}); + if (data.operator_address != null) { + message.operator_address = data.operator_address; + } + if (data.consensus_pubkey != null) { + message.consensus_pubkey = dependency_2.google.protobuf.Any.fromObject(data.consensus_pubkey); + } + if (data.jailed != null) { + message.jailed = data.jailed; + } + if (data.status != null) { + message.status = data.status; + } + if (data.tokens != null) { + message.tokens = data.tokens; + } + if (data.delegator_shares != null) { + message.delegator_shares = data.delegator_shares; + } + if (data.description != null) { + message.description = Description.fromObject(data.description); + } + if (data.unbonding_height != null) { + message.unbonding_height = data.unbonding_height; + } + if (data.unbonding_time != null) { + message.unbonding_time = dependency_4.google.protobuf.Timestamp.fromObject(data.unbonding_time); + } + if (data.commission != null) { + message.commission = Commission.fromObject(data.commission); + } + if (data.min_self_delegation != null) { + message.min_self_delegation = data.min_self_delegation; + } + if (data.unbonding_on_hold_ref_count != null) { + message.unbonding_on_hold_ref_count = data.unbonding_on_hold_ref_count; + } + if (data.unbonding_ids != null) { + message.unbonding_ids = data.unbonding_ids; + } + return message; + } + toObject() { + const data: { + operator_address?: string; + consensus_pubkey?: ReturnType; + jailed?: boolean; + status?: BondStatus; + tokens?: string; + delegator_shares?: string; + description?: ReturnType; + unbonding_height?: number; + unbonding_time?: ReturnType; + commission?: ReturnType; + min_self_delegation?: string; + unbonding_on_hold_ref_count?: number; + unbonding_ids?: number[]; + } = {}; + if (this.operator_address != null) { + data.operator_address = this.operator_address; + } + if (this.consensus_pubkey != null) { + data.consensus_pubkey = this.consensus_pubkey.toObject(); + } + if (this.jailed != null) { + data.jailed = this.jailed; + } + if (this.status != null) { + data.status = this.status; + } + if (this.tokens != null) { + data.tokens = this.tokens; + } + if (this.delegator_shares != null) { + data.delegator_shares = this.delegator_shares; + } + if (this.description != null) { + data.description = this.description.toObject(); + } + if (this.unbonding_height != null) { + data.unbonding_height = this.unbonding_height; + } + if (this.unbonding_time != null) { + data.unbonding_time = this.unbonding_time.toObject(); + } + if (this.commission != null) { + data.commission = this.commission.toObject(); + } + if (this.min_self_delegation != null) { + data.min_self_delegation = this.min_self_delegation; + } + if (this.unbonding_on_hold_ref_count != null) { + data.unbonding_on_hold_ref_count = this.unbonding_on_hold_ref_count; + } + if (this.unbonding_ids != null) { + data.unbonding_ids = this.unbonding_ids; + } + 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.operator_address.length) + writer.writeString(1, this.operator_address); + if (this.has_consensus_pubkey) + writer.writeMessage(2, this.consensus_pubkey, () => this.consensus_pubkey.serialize(writer)); + if (this.jailed != false) + writer.writeBool(3, this.jailed); + if (this.status != BondStatus.BOND_STATUS_UNSPECIFIED) + writer.writeEnum(4, this.status); + if (this.tokens.length) + writer.writeString(5, this.tokens); + if (this.delegator_shares.length) + writer.writeString(6, this.delegator_shares); + if (this.has_description) + writer.writeMessage(7, this.description, () => this.description.serialize(writer)); + if (this.unbonding_height != 0) + writer.writeInt64(8, this.unbonding_height); + if (this.has_unbonding_time) + writer.writeMessage(9, this.unbonding_time, () => this.unbonding_time.serialize(writer)); + if (this.has_commission) + writer.writeMessage(10, this.commission, () => this.commission.serialize(writer)); + if (this.min_self_delegation.length) + writer.writeString(11, this.min_self_delegation); + if (this.unbonding_on_hold_ref_count != 0) + writer.writeInt64(12, this.unbonding_on_hold_ref_count); + if (this.unbonding_ids.length) + writer.writePackedUint64(13, this.unbonding_ids); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Validator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Validator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.operator_address = reader.readString(); + break; + case 2: + reader.readMessage(message.consensus_pubkey, () => message.consensus_pubkey = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + case 3: + message.jailed = reader.readBool(); + break; + case 4: + message.status = reader.readEnum(); + break; + case 5: + message.tokens = reader.readString(); + break; + case 6: + message.delegator_shares = reader.readString(); + break; + case 7: + reader.readMessage(message.description, () => message.description = Description.deserialize(reader)); + break; + case 8: + message.unbonding_height = reader.readInt64(); + break; + case 9: + reader.readMessage(message.unbonding_time, () => message.unbonding_time = dependency_4.google.protobuf.Timestamp.deserialize(reader)); + break; + case 10: + reader.readMessage(message.commission, () => message.commission = Commission.deserialize(reader)); + break; + case 11: + message.min_self_delegation = reader.readString(); + break; + case 12: + message.unbonding_on_hold_ref_count = reader.readInt64(); + break; + case 13: + message.unbonding_ids = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Validator { + return Validator.deserialize(bytes); + } + } + export class ValAddresses extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + addresses?: string[]; + }) { + 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 ("addresses" in data && data.addresses != undefined) { + this.addresses = data.addresses; + } + } + } + get addresses() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set addresses(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + addresses?: string[]; + }): ValAddresses { + const message = new ValAddresses({}); + if (data.addresses != null) { + message.addresses = data.addresses; + } + return message; + } + toObject() { + const data: { + addresses?: string[]; + } = {}; + if (this.addresses != null) { + data.addresses = this.addresses; + } + 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.addresses.length) + writer.writeRepeatedString(1, this.addresses); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValAddresses { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValAddresses(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValAddresses { + return ValAddresses.deserialize(bytes); + } + } + export class DVPair extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_address?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + delegator_address?: string; + validator_address?: string; + }): DVPair { + const message = new DVPair({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_address?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DVPair { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DVPair(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DVPair { + return DVPair.deserialize(bytes); + } + } + export class DVPairs extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pairs?: DVPair[]; + }) { + 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 ("pairs" in data && data.pairs != undefined) { + this.pairs = data.pairs; + } + } + } + get pairs() { + return pb_1.Message.getRepeatedWrapperField(this, DVPair, 1) as DVPair[]; + } + set pairs(value: DVPair[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + pairs?: ReturnType[]; + }): DVPairs { + const message = new DVPairs({}); + if (data.pairs != null) { + message.pairs = data.pairs.map(item => DVPair.fromObject(item)); + } + return message; + } + toObject() { + const data: { + pairs?: ReturnType[]; + } = {}; + if (this.pairs != null) { + data.pairs = this.pairs.map((item: DVPair) => item.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.pairs.length) + writer.writeRepeatedMessage(1, this.pairs, (item: DVPair) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DVPairs { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DVPairs(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pairs, () => pb_1.Message.addToRepeatedWrapperField(message, 1, DVPair.deserialize(reader), DVPair)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DVPairs { + return DVPairs.deserialize(bytes); + } + } + export class DVVTriplet extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_src_address?: string; + validator_dst_address?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_src_address" in data && data.validator_src_address != undefined) { + this.validator_src_address = data.validator_src_address; + } + if ("validator_dst_address" in data && data.validator_dst_address != undefined) { + this.validator_dst_address = data.validator_dst_address; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_src_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_src_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get validator_dst_address() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set validator_dst_address(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + delegator_address?: string; + validator_src_address?: string; + validator_dst_address?: string; + }): DVVTriplet { + const message = new DVVTriplet({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_src_address != null) { + message.validator_src_address = data.validator_src_address; + } + if (data.validator_dst_address != null) { + message.validator_dst_address = data.validator_dst_address; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_src_address?: string; + validator_dst_address?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_src_address != null) { + data.validator_src_address = this.validator_src_address; + } + if (this.validator_dst_address != null) { + data.validator_dst_address = this.validator_dst_address; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_src_address.length) + writer.writeString(2, this.validator_src_address); + if (this.validator_dst_address.length) + writer.writeString(3, this.validator_dst_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DVVTriplet { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DVVTriplet(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_src_address = reader.readString(); + break; + case 3: + message.validator_dst_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DVVTriplet { + return DVVTriplet.deserialize(bytes); + } + } + export class DVVTriplets extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + triplets?: DVVTriplet[]; + }) { + 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 ("triplets" in data && data.triplets != undefined) { + this.triplets = data.triplets; + } + } + } + get triplets() { + return pb_1.Message.getRepeatedWrapperField(this, DVVTriplet, 1) as DVVTriplet[]; + } + set triplets(value: DVVTriplet[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + triplets?: ReturnType[]; + }): DVVTriplets { + const message = new DVVTriplets({}); + if (data.triplets != null) { + message.triplets = data.triplets.map(item => DVVTriplet.fromObject(item)); + } + return message; + } + toObject() { + const data: { + triplets?: ReturnType[]; + } = {}; + if (this.triplets != null) { + data.triplets = this.triplets.map((item: DVVTriplet) => item.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.triplets.length) + writer.writeRepeatedMessage(1, this.triplets, (item: DVVTriplet) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DVVTriplets { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DVVTriplets(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.triplets, () => pb_1.Message.addToRepeatedWrapperField(message, 1, DVVTriplet.deserialize(reader), DVVTriplet)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DVVTriplets { + return DVVTriplets.deserialize(bytes); + } + } + export class Delegation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_address?: string; + shares?: 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("shares" in data && data.shares != undefined) { + this.shares = data.shares; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get shares() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set shares(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + delegator_address?: string; + validator_address?: string; + shares?: string; + }): Delegation { + const message = new Delegation({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.shares != null) { + message.shares = data.shares; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_address?: string; + shares?: string; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.shares != null) { + data.shares = this.shares; + } + 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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (this.shares.length) + writer.writeString(3, this.shares); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Delegation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Delegation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + case 3: + message.shares = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Delegation { + return Delegation.deserialize(bytes); + } + } + export class UnbondingDelegation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_address?: string; + entries?: UnbondingDelegationEntry[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("entries" in data && data.entries != undefined) { + this.entries = data.entries; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get entries() { + return pb_1.Message.getRepeatedWrapperField(this, UnbondingDelegationEntry, 3) as UnbondingDelegationEntry[]; + } + set entries(value: UnbondingDelegationEntry[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + delegator_address?: string; + validator_address?: string; + entries?: ReturnType[]; + }): UnbondingDelegation { + const message = new UnbondingDelegation({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.entries != null) { + message.entries = data.entries.map(item => UnbondingDelegationEntry.fromObject(item)); + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_address?: string; + entries?: ReturnType[]; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.entries != null) { + data.entries = this.entries.map((item: UnbondingDelegationEntry) => item.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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (this.entries.length) + writer.writeRepeatedMessage(3, this.entries, (item: UnbondingDelegationEntry) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UnbondingDelegation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UnbondingDelegation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + case 3: + reader.readMessage(message.entries, () => pb_1.Message.addToRepeatedWrapperField(message, 3, UnbondingDelegationEntry.deserialize(reader), UnbondingDelegationEntry)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UnbondingDelegation { + return UnbondingDelegation.deserialize(bytes); + } + } + export class UnbondingDelegationEntry extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + creation_height?: number; + completion_time?: dependency_4.google.protobuf.Timestamp; + initial_balance?: string; + balance?: string; + unbonding_id?: number; + unbonding_on_hold_ref_count?: 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 ("creation_height" in data && data.creation_height != undefined) { + this.creation_height = data.creation_height; + } + if ("completion_time" in data && data.completion_time != undefined) { + this.completion_time = data.completion_time; + } + if ("initial_balance" in data && data.initial_balance != undefined) { + this.initial_balance = data.initial_balance; + } + if ("balance" in data && data.balance != undefined) { + this.balance = data.balance; + } + if ("unbonding_id" in data && data.unbonding_id != undefined) { + this.unbonding_id = data.unbonding_id; + } + if ("unbonding_on_hold_ref_count" in data && data.unbonding_on_hold_ref_count != undefined) { + this.unbonding_on_hold_ref_count = data.unbonding_on_hold_ref_count; + } + } + } + get creation_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set creation_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get completion_time() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Timestamp, 2) as dependency_4.google.protobuf.Timestamp; + } + set completion_time(value: dependency_4.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_completion_time() { + return pb_1.Message.getField(this, 2) != null; + } + get initial_balance() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set initial_balance(value: string) { + pb_1.Message.setField(this, 3, value); + } + get balance() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set balance(value: string) { + pb_1.Message.setField(this, 4, value); + } + get unbonding_id() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set unbonding_id(value: number) { + pb_1.Message.setField(this, 5, value); + } + get unbonding_on_hold_ref_count() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set unbonding_on_hold_ref_count(value: number) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + creation_height?: number; + completion_time?: ReturnType; + initial_balance?: string; + balance?: string; + unbonding_id?: number; + unbonding_on_hold_ref_count?: number; + }): UnbondingDelegationEntry { + const message = new UnbondingDelegationEntry({}); + if (data.creation_height != null) { + message.creation_height = data.creation_height; + } + if (data.completion_time != null) { + message.completion_time = dependency_4.google.protobuf.Timestamp.fromObject(data.completion_time); + } + if (data.initial_balance != null) { + message.initial_balance = data.initial_balance; + } + if (data.balance != null) { + message.balance = data.balance; + } + if (data.unbonding_id != null) { + message.unbonding_id = data.unbonding_id; + } + if (data.unbonding_on_hold_ref_count != null) { + message.unbonding_on_hold_ref_count = data.unbonding_on_hold_ref_count; + } + return message; + } + toObject() { + const data: { + creation_height?: number; + completion_time?: ReturnType; + initial_balance?: string; + balance?: string; + unbonding_id?: number; + unbonding_on_hold_ref_count?: number; + } = {}; + if (this.creation_height != null) { + data.creation_height = this.creation_height; + } + if (this.completion_time != null) { + data.completion_time = this.completion_time.toObject(); + } + if (this.initial_balance != null) { + data.initial_balance = this.initial_balance; + } + if (this.balance != null) { + data.balance = this.balance; + } + if (this.unbonding_id != null) { + data.unbonding_id = this.unbonding_id; + } + if (this.unbonding_on_hold_ref_count != null) { + data.unbonding_on_hold_ref_count = this.unbonding_on_hold_ref_count; + } + 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.creation_height != 0) + writer.writeInt64(1, this.creation_height); + if (this.has_completion_time) + writer.writeMessage(2, this.completion_time, () => this.completion_time.serialize(writer)); + if (this.initial_balance.length) + writer.writeString(3, this.initial_balance); + if (this.balance.length) + writer.writeString(4, this.balance); + if (this.unbonding_id != 0) + writer.writeUint64(5, this.unbonding_id); + if (this.unbonding_on_hold_ref_count != 0) + writer.writeInt64(6, this.unbonding_on_hold_ref_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UnbondingDelegationEntry { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UnbondingDelegationEntry(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.creation_height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.completion_time, () => message.completion_time = dependency_4.google.protobuf.Timestamp.deserialize(reader)); + break; + case 3: + message.initial_balance = reader.readString(); + break; + case 4: + message.balance = reader.readString(); + break; + case 5: + message.unbonding_id = reader.readUint64(); + break; + case 6: + message.unbonding_on_hold_ref_count = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UnbondingDelegationEntry { + return UnbondingDelegationEntry.deserialize(bytes); + } + } + export class RedelegationEntry extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + creation_height?: number; + completion_time?: dependency_4.google.protobuf.Timestamp; + initial_balance?: string; + shares_dst?: string; + unbonding_id?: number; + unbonding_on_hold_ref_count?: 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 ("creation_height" in data && data.creation_height != undefined) { + this.creation_height = data.creation_height; + } + if ("completion_time" in data && data.completion_time != undefined) { + this.completion_time = data.completion_time; + } + if ("initial_balance" in data && data.initial_balance != undefined) { + this.initial_balance = data.initial_balance; + } + if ("shares_dst" in data && data.shares_dst != undefined) { + this.shares_dst = data.shares_dst; + } + if ("unbonding_id" in data && data.unbonding_id != undefined) { + this.unbonding_id = data.unbonding_id; + } + if ("unbonding_on_hold_ref_count" in data && data.unbonding_on_hold_ref_count != undefined) { + this.unbonding_on_hold_ref_count = data.unbonding_on_hold_ref_count; + } + } + } + get creation_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set creation_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get completion_time() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Timestamp, 2) as dependency_4.google.protobuf.Timestamp; + } + set completion_time(value: dependency_4.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_completion_time() { + return pb_1.Message.getField(this, 2) != null; + } + get initial_balance() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set initial_balance(value: string) { + pb_1.Message.setField(this, 3, value); + } + get shares_dst() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set shares_dst(value: string) { + pb_1.Message.setField(this, 4, value); + } + get unbonding_id() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set unbonding_id(value: number) { + pb_1.Message.setField(this, 5, value); + } + get unbonding_on_hold_ref_count() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set unbonding_on_hold_ref_count(value: number) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + creation_height?: number; + completion_time?: ReturnType; + initial_balance?: string; + shares_dst?: string; + unbonding_id?: number; + unbonding_on_hold_ref_count?: number; + }): RedelegationEntry { + const message = new RedelegationEntry({}); + if (data.creation_height != null) { + message.creation_height = data.creation_height; + } + if (data.completion_time != null) { + message.completion_time = dependency_4.google.protobuf.Timestamp.fromObject(data.completion_time); + } + if (data.initial_balance != null) { + message.initial_balance = data.initial_balance; + } + if (data.shares_dst != null) { + message.shares_dst = data.shares_dst; + } + if (data.unbonding_id != null) { + message.unbonding_id = data.unbonding_id; + } + if (data.unbonding_on_hold_ref_count != null) { + message.unbonding_on_hold_ref_count = data.unbonding_on_hold_ref_count; + } + return message; + } + toObject() { + const data: { + creation_height?: number; + completion_time?: ReturnType; + initial_balance?: string; + shares_dst?: string; + unbonding_id?: number; + unbonding_on_hold_ref_count?: number; + } = {}; + if (this.creation_height != null) { + data.creation_height = this.creation_height; + } + if (this.completion_time != null) { + data.completion_time = this.completion_time.toObject(); + } + if (this.initial_balance != null) { + data.initial_balance = this.initial_balance; + } + if (this.shares_dst != null) { + data.shares_dst = this.shares_dst; + } + if (this.unbonding_id != null) { + data.unbonding_id = this.unbonding_id; + } + if (this.unbonding_on_hold_ref_count != null) { + data.unbonding_on_hold_ref_count = this.unbonding_on_hold_ref_count; + } + 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.creation_height != 0) + writer.writeInt64(1, this.creation_height); + if (this.has_completion_time) + writer.writeMessage(2, this.completion_time, () => this.completion_time.serialize(writer)); + if (this.initial_balance.length) + writer.writeString(3, this.initial_balance); + if (this.shares_dst.length) + writer.writeString(4, this.shares_dst); + if (this.unbonding_id != 0) + writer.writeUint64(5, this.unbonding_id); + if (this.unbonding_on_hold_ref_count != 0) + writer.writeInt64(6, this.unbonding_on_hold_ref_count); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RedelegationEntry { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RedelegationEntry(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.creation_height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.completion_time, () => message.completion_time = dependency_4.google.protobuf.Timestamp.deserialize(reader)); + break; + case 3: + message.initial_balance = reader.readString(); + break; + case 4: + message.shares_dst = reader.readString(); + break; + case 5: + message.unbonding_id = reader.readUint64(); + break; + case 6: + message.unbonding_on_hold_ref_count = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RedelegationEntry { + return RedelegationEntry.deserialize(bytes); + } + } + export class Redelegation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_src_address?: string; + validator_dst_address?: string; + entries?: RedelegationEntry[]; + }) { + 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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_src_address" in data && data.validator_src_address != undefined) { + this.validator_src_address = data.validator_src_address; + } + if ("validator_dst_address" in data && data.validator_dst_address != undefined) { + this.validator_dst_address = data.validator_dst_address; + } + if ("entries" in data && data.entries != undefined) { + this.entries = data.entries; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_src_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_src_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get validator_dst_address() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set validator_dst_address(value: string) { + pb_1.Message.setField(this, 3, value); + } + get entries() { + return pb_1.Message.getRepeatedWrapperField(this, RedelegationEntry, 4) as RedelegationEntry[]; + } + set entries(value: RedelegationEntry[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + delegator_address?: string; + validator_src_address?: string; + validator_dst_address?: string; + entries?: ReturnType[]; + }): Redelegation { + const message = new Redelegation({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_src_address != null) { + message.validator_src_address = data.validator_src_address; + } + if (data.validator_dst_address != null) { + message.validator_dst_address = data.validator_dst_address; + } + if (data.entries != null) { + message.entries = data.entries.map(item => RedelegationEntry.fromObject(item)); + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_src_address?: string; + validator_dst_address?: string; + entries?: ReturnType[]; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_src_address != null) { + data.validator_src_address = this.validator_src_address; + } + if (this.validator_dst_address != null) { + data.validator_dst_address = this.validator_dst_address; + } + if (this.entries != null) { + data.entries = this.entries.map((item: RedelegationEntry) => item.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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_src_address.length) + writer.writeString(2, this.validator_src_address); + if (this.validator_dst_address.length) + writer.writeString(3, this.validator_dst_address); + if (this.entries.length) + writer.writeRepeatedMessage(4, this.entries, (item: RedelegationEntry) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Redelegation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Redelegation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_src_address = reader.readString(); + break; + case 3: + message.validator_dst_address = reader.readString(); + break; + case 4: + reader.readMessage(message.entries, () => pb_1.Message.addToRepeatedWrapperField(message, 4, RedelegationEntry.deserialize(reader), RedelegationEntry)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Redelegation { + return Redelegation.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + unbonding_time?: dependency_3.google.protobuf.Duration; + max_validators?: number; + max_entries?: number; + historical_entries?: number; + bond_denom?: string; + min_commission_rate?: 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 ("unbonding_time" in data && data.unbonding_time != undefined) { + this.unbonding_time = data.unbonding_time; + } + if ("max_validators" in data && data.max_validators != undefined) { + this.max_validators = data.max_validators; + } + if ("max_entries" in data && data.max_entries != undefined) { + this.max_entries = data.max_entries; + } + if ("historical_entries" in data && data.historical_entries != undefined) { + this.historical_entries = data.historical_entries; + } + if ("bond_denom" in data && data.bond_denom != undefined) { + this.bond_denom = data.bond_denom; + } + if ("min_commission_rate" in data && data.min_commission_rate != undefined) { + this.min_commission_rate = data.min_commission_rate; + } + } + } + get unbonding_time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Duration, 1) as dependency_3.google.protobuf.Duration; + } + set unbonding_time(value: dependency_3.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_unbonding_time() { + return pb_1.Message.getField(this, 1) != null; + } + get max_validators() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set max_validators(value: number) { + pb_1.Message.setField(this, 2, value); + } + get max_entries() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set max_entries(value: number) { + pb_1.Message.setField(this, 3, value); + } + get historical_entries() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set historical_entries(value: number) { + pb_1.Message.setField(this, 4, value); + } + get bond_denom() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set bond_denom(value: string) { + pb_1.Message.setField(this, 5, value); + } + get min_commission_rate() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set min_commission_rate(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + unbonding_time?: ReturnType; + max_validators?: number; + max_entries?: number; + historical_entries?: number; + bond_denom?: string; + min_commission_rate?: string; + }): Params { + const message = new Params({}); + if (data.unbonding_time != null) { + message.unbonding_time = dependency_3.google.protobuf.Duration.fromObject(data.unbonding_time); + } + if (data.max_validators != null) { + message.max_validators = data.max_validators; + } + if (data.max_entries != null) { + message.max_entries = data.max_entries; + } + if (data.historical_entries != null) { + message.historical_entries = data.historical_entries; + } + if (data.bond_denom != null) { + message.bond_denom = data.bond_denom; + } + if (data.min_commission_rate != null) { + message.min_commission_rate = data.min_commission_rate; + } + return message; + } + toObject() { + const data: { + unbonding_time?: ReturnType; + max_validators?: number; + max_entries?: number; + historical_entries?: number; + bond_denom?: string; + min_commission_rate?: string; + } = {}; + if (this.unbonding_time != null) { + data.unbonding_time = this.unbonding_time.toObject(); + } + if (this.max_validators != null) { + data.max_validators = this.max_validators; + } + if (this.max_entries != null) { + data.max_entries = this.max_entries; + } + if (this.historical_entries != null) { + data.historical_entries = this.historical_entries; + } + if (this.bond_denom != null) { + data.bond_denom = this.bond_denom; + } + if (this.min_commission_rate != null) { + data.min_commission_rate = this.min_commission_rate; + } + 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_unbonding_time) + writer.writeMessage(1, this.unbonding_time, () => this.unbonding_time.serialize(writer)); + if (this.max_validators != 0) + writer.writeUint32(2, this.max_validators); + if (this.max_entries != 0) + writer.writeUint32(3, this.max_entries); + if (this.historical_entries != 0) + writer.writeUint32(4, this.historical_entries); + if (this.bond_denom.length) + writer.writeString(5, this.bond_denom); + if (this.min_commission_rate.length) + writer.writeString(6, this.min_commission_rate); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.unbonding_time, () => message.unbonding_time = dependency_3.google.protobuf.Duration.deserialize(reader)); + break; + case 2: + message.max_validators = reader.readUint32(); + break; + case 3: + message.max_entries = reader.readUint32(); + break; + case 4: + message.historical_entries = reader.readUint32(); + break; + case 5: + message.bond_denom = reader.readString(); + break; + case 6: + message.min_commission_rate = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } + export class DelegationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegation?: Delegation; + balance?: dependency_6.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("delegation" in data && data.delegation != undefined) { + this.delegation = data.delegation; + } + if ("balance" in data && data.balance != undefined) { + this.balance = data.balance; + } + } + } + get delegation() { + return pb_1.Message.getWrapperField(this, Delegation, 1) as Delegation; + } + set delegation(value: Delegation) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_delegation() { + return pb_1.Message.getField(this, 1) != null; + } + get balance() { + return pb_1.Message.getWrapperField(this, dependency_6.cosmos.base.v1beta1.Coin, 2) as dependency_6.cosmos.base.v1beta1.Coin; + } + set balance(value: dependency_6.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_balance() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + delegation?: ReturnType; + balance?: ReturnType; + }): DelegationResponse { + const message = new DelegationResponse({}); + if (data.delegation != null) { + message.delegation = Delegation.fromObject(data.delegation); + } + if (data.balance != null) { + message.balance = dependency_6.cosmos.base.v1beta1.Coin.fromObject(data.balance); + } + return message; + } + toObject() { + const data: { + delegation?: ReturnType; + balance?: ReturnType; + } = {}; + if (this.delegation != null) { + data.delegation = this.delegation.toObject(); + } + if (this.balance != null) { + data.balance = this.balance.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_delegation) + writer.writeMessage(1, this.delegation, () => this.delegation.serialize(writer)); + if (this.has_balance) + writer.writeMessage(2, this.balance, () => this.balance.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DelegationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DelegationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.delegation, () => message.delegation = Delegation.deserialize(reader)); + break; + case 2: + reader.readMessage(message.balance, () => message.balance = dependency_6.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DelegationResponse { + return DelegationResponse.deserialize(bytes); + } + } + export class RedelegationEntryResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + redelegation_entry?: RedelegationEntry; + balance?: 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 ("redelegation_entry" in data && data.redelegation_entry != undefined) { + this.redelegation_entry = data.redelegation_entry; + } + if ("balance" in data && data.balance != undefined) { + this.balance = data.balance; + } + } + } + get redelegation_entry() { + return pb_1.Message.getWrapperField(this, RedelegationEntry, 1) as RedelegationEntry; + } + set redelegation_entry(value: RedelegationEntry) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_redelegation_entry() { + return pb_1.Message.getField(this, 1) != null; + } + get balance() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set balance(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + redelegation_entry?: ReturnType; + balance?: string; + }): RedelegationEntryResponse { + const message = new RedelegationEntryResponse({}); + if (data.redelegation_entry != null) { + message.redelegation_entry = RedelegationEntry.fromObject(data.redelegation_entry); + } + if (data.balance != null) { + message.balance = data.balance; + } + return message; + } + toObject() { + const data: { + redelegation_entry?: ReturnType; + balance?: string; + } = {}; + if (this.redelegation_entry != null) { + data.redelegation_entry = this.redelegation_entry.toObject(); + } + if (this.balance != null) { + data.balance = this.balance; + } + 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_redelegation_entry) + writer.writeMessage(1, this.redelegation_entry, () => this.redelegation_entry.serialize(writer)); + if (this.balance.length) + writer.writeString(4, this.balance); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RedelegationEntryResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RedelegationEntryResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.redelegation_entry, () => message.redelegation_entry = RedelegationEntry.deserialize(reader)); + break; + case 4: + message.balance = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RedelegationEntryResponse { + return RedelegationEntryResponse.deserialize(bytes); + } + } + export class RedelegationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + redelegation?: Redelegation; + entries?: RedelegationEntryResponse[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("redelegation" in data && data.redelegation != undefined) { + this.redelegation = data.redelegation; + } + if ("entries" in data && data.entries != undefined) { + this.entries = data.entries; + } + } + } + get redelegation() { + return pb_1.Message.getWrapperField(this, Redelegation, 1) as Redelegation; + } + set redelegation(value: Redelegation) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_redelegation() { + return pb_1.Message.getField(this, 1) != null; + } + get entries() { + return pb_1.Message.getRepeatedWrapperField(this, RedelegationEntryResponse, 2) as RedelegationEntryResponse[]; + } + set entries(value: RedelegationEntryResponse[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + redelegation?: ReturnType; + entries?: ReturnType[]; + }): RedelegationResponse { + const message = new RedelegationResponse({}); + if (data.redelegation != null) { + message.redelegation = Redelegation.fromObject(data.redelegation); + } + if (data.entries != null) { + message.entries = data.entries.map(item => RedelegationEntryResponse.fromObject(item)); + } + return message; + } + toObject() { + const data: { + redelegation?: ReturnType; + entries?: ReturnType[]; + } = {}; + if (this.redelegation != null) { + data.redelegation = this.redelegation.toObject(); + } + if (this.entries != null) { + data.entries = this.entries.map((item: RedelegationEntryResponse) => item.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_redelegation) + writer.writeMessage(1, this.redelegation, () => this.redelegation.serialize(writer)); + if (this.entries.length) + writer.writeRepeatedMessage(2, this.entries, (item: RedelegationEntryResponse) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RedelegationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RedelegationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.redelegation, () => message.redelegation = Redelegation.deserialize(reader)); + break; + case 2: + reader.readMessage(message.entries, () => pb_1.Message.addToRepeatedWrapperField(message, 2, RedelegationEntryResponse.deserialize(reader), RedelegationEntryResponse)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RedelegationResponse { + return RedelegationResponse.deserialize(bytes); + } + } + export class Pool extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + not_bonded_tokens?: string; + bonded_tokens?: 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 ("not_bonded_tokens" in data && data.not_bonded_tokens != undefined) { + this.not_bonded_tokens = data.not_bonded_tokens; + } + if ("bonded_tokens" in data && data.bonded_tokens != undefined) { + this.bonded_tokens = data.bonded_tokens; + } + } + } + get not_bonded_tokens() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set not_bonded_tokens(value: string) { + pb_1.Message.setField(this, 1, value); + } + get bonded_tokens() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set bonded_tokens(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + not_bonded_tokens?: string; + bonded_tokens?: string; + }): Pool { + const message = new Pool({}); + if (data.not_bonded_tokens != null) { + message.not_bonded_tokens = data.not_bonded_tokens; + } + if (data.bonded_tokens != null) { + message.bonded_tokens = data.bonded_tokens; + } + return message; + } + toObject() { + const data: { + not_bonded_tokens?: string; + bonded_tokens?: string; + } = {}; + if (this.not_bonded_tokens != null) { + data.not_bonded_tokens = this.not_bonded_tokens; + } + if (this.bonded_tokens != null) { + data.bonded_tokens = this.bonded_tokens; + } + 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.not_bonded_tokens.length) + writer.writeString(1, this.not_bonded_tokens); + if (this.bonded_tokens.length) + writer.writeString(2, this.bonded_tokens); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Pool { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Pool(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.not_bonded_tokens = reader.readString(); + break; + case 2: + message.bonded_tokens = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Pool { + return Pool.deserialize(bytes); + } + } + export class ValidatorUpdates extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + updates?: dependency_9.tendermint.abci.ValidatorUpdate[]; + }) { + 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 ("updates" in data && data.updates != undefined) { + this.updates = data.updates; + } + } + } + get updates() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_9.tendermint.abci.ValidatorUpdate, 1) as dependency_9.tendermint.abci.ValidatorUpdate[]; + } + set updates(value: dependency_9.tendermint.abci.ValidatorUpdate[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + updates?: ReturnType[]; + }): ValidatorUpdates { + const message = new ValidatorUpdates({}); + if (data.updates != null) { + message.updates = data.updates.map(item => dependency_9.tendermint.abci.ValidatorUpdate.fromObject(item)); + } + return message; + } + toObject() { + const data: { + updates?: ReturnType[]; + } = {}; + if (this.updates != null) { + data.updates = this.updates.map((item: dependency_9.tendermint.abci.ValidatorUpdate) => item.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.updates.length) + writer.writeRepeatedMessage(1, this.updates, (item: dependency_9.tendermint.abci.ValidatorUpdate) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorUpdates { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorUpdates(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.updates, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_9.tendermint.abci.ValidatorUpdate.deserialize(reader), dependency_9.tendermint.abci.ValidatorUpdate)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorUpdates { + return ValidatorUpdates.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/staking/v1beta1/staking_pb.d.ts b/codegen/cosmos/staking/v1beta1/staking_pb.d.ts similarity index 100% rename from proto/cosmos/staking/v1beta1/staking_pb.d.ts rename to codegen/cosmos/staking/v1beta1/staking_pb.d.ts diff --git a/proto/cosmos/staking/v1beta1/staking_pb.js b/codegen/cosmos/staking/v1beta1/staking_pb.js similarity index 100% rename from proto/cosmos/staking/v1beta1/staking_pb.js rename to codegen/cosmos/staking/v1beta1/staking_pb.js diff --git a/proto/cosmos/staking/v1beta1/staking_pb_service.d.ts b/codegen/cosmos/staking/v1beta1/staking_pb_service.d.ts similarity index 100% rename from proto/cosmos/staking/v1beta1/staking_pb_service.d.ts rename to codegen/cosmos/staking/v1beta1/staking_pb_service.d.ts diff --git a/proto/cosmos/staking/v1beta1/staking_pb_service.js b/codegen/cosmos/staking/v1beta1/staking_pb_service.js similarity index 100% rename from proto/cosmos/staking/v1beta1/staking_pb_service.js rename to codegen/cosmos/staking/v1beta1/staking_pb_service.js diff --git a/codegen/cosmos/staking/v1beta1/tx.ts b/codegen/cosmos/staking/v1beta1/tx.ts new file mode 100644 index 0000000..46863de --- /dev/null +++ b/codegen/cosmos/staking/v1beta1/tx.ts @@ -0,0 +1,1470 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/staking/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/any"; +import * as dependency_2 from "./../../../google/protobuf/timestamp"; +import * as dependency_3 from "./../../../gogoproto/gogo"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../base/v1beta1/coin"; +import * as dependency_6 from "./staking"; +import * as dependency_7 from "./../../msg/v1/msg"; +import * as dependency_8 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.staking.v1beta1 { + export class MsgCreateValidator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + description?: dependency_6.cosmos.staking.v1beta1.Description; + commission?: dependency_6.cosmos.staking.v1beta1.CommissionRates; + min_self_delegation?: string; + /** @deprecated*/ + delegator_address?: string; + validator_address?: string; + pubkey?: dependency_1.google.protobuf.Any; + value?: dependency_5.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("commission" in data && data.commission != undefined) { + this.commission = data.commission; + } + if ("min_self_delegation" in data && data.min_self_delegation != undefined) { + this.min_self_delegation = data.min_self_delegation; + } + if ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("pubkey" in data && data.pubkey != undefined) { + this.pubkey = data.pubkey; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get description() { + return pb_1.Message.getWrapperField(this, dependency_6.cosmos.staking.v1beta1.Description, 1) as dependency_6.cosmos.staking.v1beta1.Description; + } + set description(value: dependency_6.cosmos.staking.v1beta1.Description) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_description() { + return pb_1.Message.getField(this, 1) != null; + } + get commission() { + return pb_1.Message.getWrapperField(this, dependency_6.cosmos.staking.v1beta1.CommissionRates, 2) as dependency_6.cosmos.staking.v1beta1.CommissionRates; + } + set commission(value: dependency_6.cosmos.staking.v1beta1.CommissionRates) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_commission() { + return pb_1.Message.getField(this, 2) != null; + } + get min_self_delegation() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set min_self_delegation(value: string) { + pb_1.Message.setField(this, 3, value); + } + /** @deprecated*/ + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + /** @deprecated*/ + set delegator_address(value: string) { + pb_1.Message.setField(this, 4, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 5, value); + } + get pubkey() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 6) as dependency_1.google.protobuf.Any; + } + set pubkey(value: dependency_1.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_pubkey() { + return pb_1.Message.getField(this, 6) != null; + } + get value() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 7) as dependency_5.cosmos.base.v1beta1.Coin; + } + set value(value: dependency_5.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_value() { + return pb_1.Message.getField(this, 7) != null; + } + static fromObject(data: { + description?: ReturnType; + commission?: ReturnType; + min_self_delegation?: string; + delegator_address?: string; + validator_address?: string; + pubkey?: ReturnType; + value?: ReturnType; + }): MsgCreateValidator { + const message = new MsgCreateValidator({}); + if (data.description != null) { + message.description = dependency_6.cosmos.staking.v1beta1.Description.fromObject(data.description); + } + if (data.commission != null) { + message.commission = dependency_6.cosmos.staking.v1beta1.CommissionRates.fromObject(data.commission); + } + if (data.min_self_delegation != null) { + message.min_self_delegation = data.min_self_delegation; + } + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.pubkey != null) { + message.pubkey = dependency_1.google.protobuf.Any.fromObject(data.pubkey); + } + if (data.value != null) { + message.value = dependency_5.cosmos.base.v1beta1.Coin.fromObject(data.value); + } + return message; + } + toObject() { + const data: { + description?: ReturnType; + commission?: ReturnType; + min_self_delegation?: string; + delegator_address?: string; + validator_address?: string; + pubkey?: ReturnType; + value?: ReturnType; + } = {}; + if (this.description != null) { + data.description = this.description.toObject(); + } + if (this.commission != null) { + data.commission = this.commission.toObject(); + } + if (this.min_self_delegation != null) { + data.min_self_delegation = this.min_self_delegation; + } + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.pubkey != null) { + data.pubkey = this.pubkey.toObject(); + } + if (this.value != null) { + data.value = this.value.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_description) + writer.writeMessage(1, this.description, () => this.description.serialize(writer)); + if (this.has_commission) + writer.writeMessage(2, this.commission, () => this.commission.serialize(writer)); + if (this.min_self_delegation.length) + writer.writeString(3, this.min_self_delegation); + if (this.delegator_address.length) + writer.writeString(4, this.delegator_address); + if (this.validator_address.length) + writer.writeString(5, this.validator_address); + if (this.has_pubkey) + writer.writeMessage(6, this.pubkey, () => this.pubkey.serialize(writer)); + if (this.has_value) + writer.writeMessage(7, this.value, () => this.value.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateValidator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateValidator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.description, () => message.description = dependency_6.cosmos.staking.v1beta1.Description.deserialize(reader)); + break; + case 2: + reader.readMessage(message.commission, () => message.commission = dependency_6.cosmos.staking.v1beta1.CommissionRates.deserialize(reader)); + break; + case 3: + message.min_self_delegation = reader.readString(); + break; + case 4: + message.delegator_address = reader.readString(); + break; + case 5: + message.validator_address = reader.readString(); + break; + case 6: + reader.readMessage(message.pubkey, () => message.pubkey = dependency_1.google.protobuf.Any.deserialize(reader)); + break; + case 7: + reader.readMessage(message.value, () => message.value = dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateValidator { + return MsgCreateValidator.deserialize(bytes); + } + } + export class MsgCreateValidatorResponse 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: {}): MsgCreateValidatorResponse { + const message = new MsgCreateValidatorResponse({}); + 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): MsgCreateValidatorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateValidatorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateValidatorResponse { + return MsgCreateValidatorResponse.deserialize(bytes); + } + } + export class MsgEditValidator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + description?: dependency_6.cosmos.staking.v1beta1.Description; + validator_address?: string; + commission_rate?: string; + min_self_delegation?: 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 ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("commission_rate" in data && data.commission_rate != undefined) { + this.commission_rate = data.commission_rate; + } + if ("min_self_delegation" in data && data.min_self_delegation != undefined) { + this.min_self_delegation = data.min_self_delegation; + } + } + } + get description() { + return pb_1.Message.getWrapperField(this, dependency_6.cosmos.staking.v1beta1.Description, 1) as dependency_6.cosmos.staking.v1beta1.Description; + } + set description(value: dependency_6.cosmos.staking.v1beta1.Description) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_description() { + return pb_1.Message.getField(this, 1) != null; + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get commission_rate() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set commission_rate(value: string) { + pb_1.Message.setField(this, 3, value); + } + get min_self_delegation() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set min_self_delegation(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + description?: ReturnType; + validator_address?: string; + commission_rate?: string; + min_self_delegation?: string; + }): MsgEditValidator { + const message = new MsgEditValidator({}); + if (data.description != null) { + message.description = dependency_6.cosmos.staking.v1beta1.Description.fromObject(data.description); + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.commission_rate != null) { + message.commission_rate = data.commission_rate; + } + if (data.min_self_delegation != null) { + message.min_self_delegation = data.min_self_delegation; + } + return message; + } + toObject() { + const data: { + description?: ReturnType; + validator_address?: string; + commission_rate?: string; + min_self_delegation?: string; + } = {}; + if (this.description != null) { + data.description = this.description.toObject(); + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.commission_rate != null) { + data.commission_rate = this.commission_rate; + } + if (this.min_self_delegation != null) { + data.min_self_delegation = this.min_self_delegation; + } + 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_description) + writer.writeMessage(1, this.description, () => this.description.serialize(writer)); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (this.commission_rate.length) + writer.writeString(3, this.commission_rate); + if (this.min_self_delegation.length) + writer.writeString(4, this.min_self_delegation); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgEditValidator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgEditValidator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.description, () => message.description = dependency_6.cosmos.staking.v1beta1.Description.deserialize(reader)); + break; + case 2: + message.validator_address = reader.readString(); + break; + case 3: + message.commission_rate = reader.readString(); + break; + case 4: + message.min_self_delegation = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgEditValidator { + return MsgEditValidator.deserialize(bytes); + } + } + export class MsgEditValidatorResponse 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: {}): MsgEditValidatorResponse { + const message = new MsgEditValidatorResponse({}); + 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): MsgEditValidatorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgEditValidatorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgEditValidatorResponse { + return MsgEditValidatorResponse.deserialize(bytes); + } + } + export class MsgDelegate extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_address?: string; + amount?: dependency_5.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 3) as dependency_5.cosmos.base.v1beta1.Coin; + } + set amount(value: dependency_5.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_amount() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + delegator_address?: string; + validator_address?: string; + amount?: ReturnType; + }): MsgDelegate { + const message = new MsgDelegate({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.amount != null) { + message.amount = dependency_5.cosmos.base.v1beta1.Coin.fromObject(data.amount); + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_address?: string; + amount?: ReturnType; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.amount != null) { + data.amount = this.amount.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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (this.has_amount) + writer.writeMessage(3, this.amount, () => this.amount.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDelegate { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDelegate(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => message.amount = dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDelegate { + return MsgDelegate.deserialize(bytes); + } + } + export class MsgDelegateResponse 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: {}): MsgDelegateResponse { + const message = new MsgDelegateResponse({}); + 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): MsgDelegateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDelegateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgDelegateResponse { + return MsgDelegateResponse.deserialize(bytes); + } + } + export class MsgBeginRedelegate extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_src_address?: string; + validator_dst_address?: string; + amount?: dependency_5.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_src_address" in data && data.validator_src_address != undefined) { + this.validator_src_address = data.validator_src_address; + } + if ("validator_dst_address" in data && data.validator_dst_address != undefined) { + this.validator_dst_address = data.validator_dst_address; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_src_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_src_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get validator_dst_address() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set validator_dst_address(value: string) { + pb_1.Message.setField(this, 3, value); + } + get amount() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 4) as dependency_5.cosmos.base.v1beta1.Coin; + } + set amount(value: dependency_5.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_amount() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + delegator_address?: string; + validator_src_address?: string; + validator_dst_address?: string; + amount?: ReturnType; + }): MsgBeginRedelegate { + const message = new MsgBeginRedelegate({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_src_address != null) { + message.validator_src_address = data.validator_src_address; + } + if (data.validator_dst_address != null) { + message.validator_dst_address = data.validator_dst_address; + } + if (data.amount != null) { + message.amount = dependency_5.cosmos.base.v1beta1.Coin.fromObject(data.amount); + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_src_address?: string; + validator_dst_address?: string; + amount?: ReturnType; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_src_address != null) { + data.validator_src_address = this.validator_src_address; + } + if (this.validator_dst_address != null) { + data.validator_dst_address = this.validator_dst_address; + } + if (this.amount != null) { + data.amount = this.amount.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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_src_address.length) + writer.writeString(2, this.validator_src_address); + if (this.validator_dst_address.length) + writer.writeString(3, this.validator_dst_address); + if (this.has_amount) + writer.writeMessage(4, this.amount, () => this.amount.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgBeginRedelegate { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgBeginRedelegate(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_src_address = reader.readString(); + break; + case 3: + message.validator_dst_address = reader.readString(); + break; + case 4: + reader.readMessage(message.amount, () => message.amount = dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgBeginRedelegate { + return MsgBeginRedelegate.deserialize(bytes); + } + } + export class MsgBeginRedelegateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + completion_time?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("completion_time" in data && data.completion_time != undefined) { + this.completion_time = data.completion_time; + } + } + } + get completion_time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 1) as dependency_2.google.protobuf.Timestamp; + } + set completion_time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_completion_time() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + completion_time?: ReturnType; + }): MsgBeginRedelegateResponse { + const message = new MsgBeginRedelegateResponse({}); + if (data.completion_time != null) { + message.completion_time = dependency_2.google.protobuf.Timestamp.fromObject(data.completion_time); + } + return message; + } + toObject() { + const data: { + completion_time?: ReturnType; + } = {}; + if (this.completion_time != null) { + data.completion_time = this.completion_time.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_completion_time) + writer.writeMessage(1, this.completion_time, () => this.completion_time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgBeginRedelegateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgBeginRedelegateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.completion_time, () => message.completion_time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgBeginRedelegateResponse { + return MsgBeginRedelegateResponse.deserialize(bytes); + } + } + export class MsgUndelegate extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_address?: string; + amount?: dependency_5.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 3) as dependency_5.cosmos.base.v1beta1.Coin; + } + set amount(value: dependency_5.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_amount() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + delegator_address?: string; + validator_address?: string; + amount?: ReturnType; + }): MsgUndelegate { + const message = new MsgUndelegate({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.amount != null) { + message.amount = dependency_5.cosmos.base.v1beta1.Coin.fromObject(data.amount); + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_address?: string; + amount?: ReturnType; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.amount != null) { + data.amount = this.amount.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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (this.has_amount) + writer.writeMessage(3, this.amount, () => this.amount.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUndelegate { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUndelegate(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => message.amount = dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUndelegate { + return MsgUndelegate.deserialize(bytes); + } + } + export class MsgUndelegateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + completion_time?: dependency_2.google.protobuf.Timestamp; + amount?: dependency_5.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("completion_time" in data && data.completion_time != undefined) { + this.completion_time = data.completion_time; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get completion_time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 1) as dependency_2.google.protobuf.Timestamp; + } + set completion_time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_completion_time() { + return pb_1.Message.getField(this, 1) != null; + } + get amount() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 2) as dependency_5.cosmos.base.v1beta1.Coin; + } + set amount(value: dependency_5.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_amount() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + completion_time?: ReturnType; + amount?: ReturnType; + }): MsgUndelegateResponse { + const message = new MsgUndelegateResponse({}); + if (data.completion_time != null) { + message.completion_time = dependency_2.google.protobuf.Timestamp.fromObject(data.completion_time); + } + if (data.amount != null) { + message.amount = dependency_5.cosmos.base.v1beta1.Coin.fromObject(data.amount); + } + return message; + } + toObject() { + const data: { + completion_time?: ReturnType; + amount?: ReturnType; + } = {}; + if (this.completion_time != null) { + data.completion_time = this.completion_time.toObject(); + } + if (this.amount != null) { + data.amount = this.amount.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_completion_time) + writer.writeMessage(1, this.completion_time, () => this.completion_time.serialize(writer)); + if (this.has_amount) + writer.writeMessage(2, this.amount, () => this.amount.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUndelegateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUndelegateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.completion_time, () => message.completion_time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 2: + reader.readMessage(message.amount, () => message.amount = dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUndelegateResponse { + return MsgUndelegateResponse.deserialize(bytes); + } + } + export class MsgCancelUnbondingDelegation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + delegator_address?: string; + validator_address?: string; + amount?: dependency_5.cosmos.base.v1beta1.Coin; + creation_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 ("delegator_address" in data && data.delegator_address != undefined) { + this.delegator_address = data.delegator_address; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("creation_height" in data && data.creation_height != undefined) { + this.creation_height = data.creation_height; + } + } + } + get delegator_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set delegator_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set validator_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 3) as dependency_5.cosmos.base.v1beta1.Coin; + } + set amount(value: dependency_5.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_amount() { + return pb_1.Message.getField(this, 3) != null; + } + get creation_height() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set creation_height(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + delegator_address?: string; + validator_address?: string; + amount?: ReturnType; + creation_height?: number; + }): MsgCancelUnbondingDelegation { + const message = new MsgCancelUnbondingDelegation({}); + if (data.delegator_address != null) { + message.delegator_address = data.delegator_address; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.amount != null) { + message.amount = dependency_5.cosmos.base.v1beta1.Coin.fromObject(data.amount); + } + if (data.creation_height != null) { + message.creation_height = data.creation_height; + } + return message; + } + toObject() { + const data: { + delegator_address?: string; + validator_address?: string; + amount?: ReturnType; + creation_height?: number; + } = {}; + if (this.delegator_address != null) { + data.delegator_address = this.delegator_address; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.amount != null) { + data.amount = this.amount.toObject(); + } + if (this.creation_height != null) { + data.creation_height = this.creation_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.delegator_address.length) + writer.writeString(1, this.delegator_address); + if (this.validator_address.length) + writer.writeString(2, this.validator_address); + if (this.has_amount) + writer.writeMessage(3, this.amount, () => this.amount.serialize(writer)); + if (this.creation_height != 0) + writer.writeInt64(4, this.creation_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelUnbondingDelegation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelUnbondingDelegation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.delegator_address = reader.readString(); + break; + case 2: + message.validator_address = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => message.amount = dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + case 4: + message.creation_height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCancelUnbondingDelegation { + return MsgCancelUnbondingDelegation.deserialize(bytes); + } + } + export class MsgCancelUnbondingDelegationResponse 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: {}): MsgCancelUnbondingDelegationResponse { + const message = new MsgCancelUnbondingDelegationResponse({}); + 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): MsgCancelUnbondingDelegationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelUnbondingDelegationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCancelUnbondingDelegationResponse { + return MsgCancelUnbondingDelegationResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_6.cosmos.staking.v1beta1.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_6.cosmos.staking.v1beta1.Params, 2) as dependency_6.cosmos.staking.v1beta1.Params; + } + set params(value: dependency_6.cosmos.staking.v1beta1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_6.cosmos.staking.v1beta1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_6.cosmos.staking.v1beta1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + CreateValidator: { + path: "/cosmos.staking.v1beta1.Msg/CreateValidator", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreateValidator) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreateValidator.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreateValidatorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreateValidatorResponse.deserialize(new Uint8Array(bytes)) + }, + EditValidator: { + path: "/cosmos.staking.v1beta1.Msg/EditValidator", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgEditValidator) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgEditValidator.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgEditValidatorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgEditValidatorResponse.deserialize(new Uint8Array(bytes)) + }, + Delegate: { + path: "/cosmos.staking.v1beta1.Msg/Delegate", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgDelegate) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgDelegate.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgDelegateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgDelegateResponse.deserialize(new Uint8Array(bytes)) + }, + BeginRedelegate: { + path: "/cosmos.staking.v1beta1.Msg/BeginRedelegate", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgBeginRedelegate) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgBeginRedelegate.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgBeginRedelegateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgBeginRedelegateResponse.deserialize(new Uint8Array(bytes)) + }, + Undelegate: { + path: "/cosmos.staking.v1beta1.Msg/Undelegate", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUndelegate) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUndelegate.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUndelegateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUndelegateResponse.deserialize(new Uint8Array(bytes)) + }, + CancelUnbondingDelegation: { + path: "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCancelUnbondingDelegation) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCancelUnbondingDelegation.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCancelUnbondingDelegationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCancelUnbondingDelegationResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/cosmos.staking.v1beta1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CreateValidator(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract EditValidator(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Delegate(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract BeginRedelegate(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Undelegate(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CancelUnbondingDelegation(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CreateValidator: GrpcUnaryServiceInterface = (message: MsgCreateValidator, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateValidator(message, metadata, options, callback); + }; + EditValidator: GrpcUnaryServiceInterface = (message: MsgEditValidator, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.EditValidator(message, metadata, options, callback); + }; + Delegate: GrpcUnaryServiceInterface = (message: MsgDelegate, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Delegate(message, metadata, options, callback); + }; + BeginRedelegate: GrpcUnaryServiceInterface = (message: MsgBeginRedelegate, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.BeginRedelegate(message, metadata, options, callback); + }; + Undelegate: GrpcUnaryServiceInterface = (message: MsgUndelegate, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Undelegate(message, metadata, options, callback); + }; + CancelUnbondingDelegation: GrpcUnaryServiceInterface = (message: MsgCancelUnbondingDelegation, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CancelUnbondingDelegation(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/staking/v1beta1/tx_pb.d.ts b/codegen/cosmos/staking/v1beta1/tx_pb.d.ts similarity index 98% rename from proto/cosmos/staking/v1beta1/tx_pb.d.ts rename to codegen/cosmos/staking/v1beta1/tx_pb.d.ts index 28dd184..8dc7c4e 100644 --- a/proto/cosmos/staking/v1beta1/tx_pb.d.ts +++ b/codegen/cosmos/staking/v1beta1/tx_pb.d.ts @@ -267,6 +267,11 @@ export class MsgUndelegateResponse extends jspb.Message { getCompletionTime(): google_protobuf_timestamp_pb.Timestamp | undefined; setCompletionTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + hasAmount(): boolean; + clearAmount(): void; + getAmount(): cosmos_base_v1beta1_coin_pb.Coin | undefined; + setAmount(value?: cosmos_base_v1beta1_coin_pb.Coin): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgUndelegateResponse.AsObject; static toObject(includeInstance: boolean, msg: MsgUndelegateResponse): MsgUndelegateResponse.AsObject; @@ -280,6 +285,7 @@ export class MsgUndelegateResponse extends jspb.Message { export namespace MsgUndelegateResponse { export type AsObject = { completionTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + amount?: cosmos_base_v1beta1_coin_pb.Coin.AsObject, } } diff --git a/proto/cosmos/staking/v1beta1/tx_pb.js b/codegen/cosmos/staking/v1beta1/tx_pb.js similarity index 98% rename from proto/cosmos/staking/v1beta1/tx_pb.js rename to codegen/cosmos/staking/v1beta1/tx_pb.js index bb6e989..771f66e 100644 --- a/proto/cosmos/staking/v1beta1/tx_pb.js +++ b/codegen/cosmos/staking/v1beta1/tx_pb.js @@ -2123,7 +2123,8 @@ proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.toObject = function */ proto.cosmos.staking.v1beta1.MsgUndelegateResponse.toObject = function(includeInstance, msg) { var f, obj = { - completionTime: (f = msg.getCompletionTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + completionTime: (f = msg.getCompletionTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + amount: (f = msg.getAmount()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f) }; if (includeInstance) { @@ -2165,6 +2166,11 @@ proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinaryFromReader = reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setCompletionTime(value); break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setAmount(value); + break; default: reader.skipField(); break; @@ -2202,6 +2208,14 @@ proto.cosmos.staking.v1beta1.MsgUndelegateResponse.serializeBinaryToWriter = fun google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } }; @@ -2242,6 +2256,43 @@ proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.hasCompletionTime = }; +/** + * optional cosmos.base.v1beta1.Coin amount = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} returns this +*/ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} returns this + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.hasAmount = function() { + return jspb.Message.getField(this, 2) != null; +}; + + diff --git a/proto/cosmos/staking/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/staking/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/staking/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/staking/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/staking/v1beta1/tx_pb_service.js b/codegen/cosmos/staking/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/staking/v1beta1/tx_pb_service.js rename to codegen/cosmos/staking/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/store/internal/kv/v1beta1/kv.ts b/codegen/cosmos/store/internal/kv/v1beta1/kv.ts new file mode 100644 index 0000000..5b2dd65 --- /dev/null +++ b/codegen/cosmos/store/internal/kv/v1beta1/kv.ts @@ -0,0 +1,166 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/store/internal/kv/v1beta1/kv.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.store.internal.kv.v1beta1 { + export class Pairs extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pairs?: Pair[]; + }) { + 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 ("pairs" in data && data.pairs != undefined) { + this.pairs = data.pairs; + } + } + } + get pairs() { + return pb_1.Message.getRepeatedWrapperField(this, Pair, 1) as Pair[]; + } + set pairs(value: Pair[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + pairs?: ReturnType[]; + }): Pairs { + const message = new Pairs({}); + if (data.pairs != null) { + message.pairs = data.pairs.map(item => Pair.fromObject(item)); + } + return message; + } + toObject() { + const data: { + pairs?: ReturnType[]; + } = {}; + if (this.pairs != null) { + data.pairs = this.pairs.map((item: Pair) => item.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.pairs.length) + writer.writeRepeatedMessage(1, this.pairs, (item: Pair) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Pairs { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Pairs(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pairs, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Pair.deserialize(reader), Pair)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Pairs { + return Pairs.deserialize(bytes); + } + } + export class Pair extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + value?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + key?: Uint8Array; + value?: Uint8Array; + }): Pair { + const message = new Pair({}); + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + value?: Uint8Array; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + 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.key.length) + writer.writeBytes(1, this.key); + if (this.value.length) + writer.writeBytes(2, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Pair { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Pair(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + case 2: + message.value = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Pair { + return Pair.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/base/kv/v1beta1/kv_pb.d.ts b/codegen/cosmos/store/internal/kv/v1beta1/kv_pb.d.ts similarity index 91% rename from proto/cosmos/base/kv/v1beta1/kv_pb.d.ts rename to codegen/cosmos/store/internal/kv/v1beta1/kv_pb.d.ts index 96f0233..9605c17 100644 --- a/proto/cosmos/base/kv/v1beta1/kv_pb.d.ts +++ b/codegen/cosmos/store/internal/kv/v1beta1/kv_pb.d.ts @@ -1,8 +1,8 @@ -// package: cosmos.base.kv.v1beta1 -// file: cosmos/base/kv/v1beta1/kv.proto +// package: cosmos.store.internal.kv.v1beta1 +// file: cosmos/store/internal/kv/v1beta1/kv.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "../../../../../gogoproto/gogo_pb"; export class Pairs extends jspb.Message { clearPairsList(): void; diff --git a/proto/cosmos/base/kv/v1beta1/kv_pb.js b/codegen/cosmos/store/internal/kv/v1beta1/kv_pb.js similarity index 59% rename from proto/cosmos/base/kv/v1beta1/kv_pb.js rename to codegen/cosmos/store/internal/kv/v1beta1/kv_pb.js index 0e39a96..88d5f36 100644 --- a/proto/cosmos/base/kv/v1beta1/kv_pb.js +++ b/codegen/cosmos/store/internal/kv/v1beta1/kv_pb.js @@ -1,4 +1,4 @@ -// source: cosmos/base/kv/v1beta1/kv.proto +// source: cosmos/store/internal/kv/v1beta1/kv.proto /** * @fileoverview * @enhanceable @@ -15,10 +15,10 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('../../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -goog.exportSymbol('proto.cosmos.base.kv.v1beta1.Pair', null, global); -goog.exportSymbol('proto.cosmos.base.kv.v1beta1.Pairs', null, global); +goog.exportSymbol('proto.cosmos.store.internal.kv.v1beta1.Pair', null, global); +goog.exportSymbol('proto.cosmos.store.internal.kv.v1beta1.Pairs', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -29,16 +29,16 @@ goog.exportSymbol('proto.cosmos.base.kv.v1beta1.Pairs', null, global); * @extends {jspb.Message} * @constructor */ -proto.cosmos.base.kv.v1beta1.Pairs = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.kv.v1beta1.Pairs.repeatedFields_, null); +proto.cosmos.store.internal.kv.v1beta1.Pairs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.store.internal.kv.v1beta1.Pairs.repeatedFields_, null); }; -goog.inherits(proto.cosmos.base.kv.v1beta1.Pairs, jspb.Message); +goog.inherits(proto.cosmos.store.internal.kv.v1beta1.Pairs, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.base.kv.v1beta1.Pairs.displayName = 'proto.cosmos.base.kv.v1beta1.Pairs'; + proto.cosmos.store.internal.kv.v1beta1.Pairs.displayName = 'proto.cosmos.store.internal.kv.v1beta1.Pairs'; } /** * Generated by JsPbCodeGenerator. @@ -50,16 +50,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.cosmos.base.kv.v1beta1.Pair = function(opt_data) { +proto.cosmos.store.internal.kv.v1beta1.Pair = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.base.kv.v1beta1.Pair, jspb.Message); +goog.inherits(proto.cosmos.store.internal.kv.v1beta1.Pair, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.base.kv.v1beta1.Pair.displayName = 'proto.cosmos.base.kv.v1beta1.Pair'; + proto.cosmos.store.internal.kv.v1beta1.Pair.displayName = 'proto.cosmos.store.internal.kv.v1beta1.Pair'; } /** @@ -67,7 +67,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.cosmos.base.kv.v1beta1.Pairs.repeatedFields_ = [1]; +proto.cosmos.store.internal.kv.v1beta1.Pairs.repeatedFields_ = [1]; @@ -84,8 +84,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.base.kv.v1beta1.Pairs.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.kv.v1beta1.Pairs.toObject(opt_includeInstance, this); +proto.cosmos.store.internal.kv.v1beta1.Pairs.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.internal.kv.v1beta1.Pairs.toObject(opt_includeInstance, this); }; @@ -94,14 +94,14 @@ proto.cosmos.base.kv.v1beta1.Pairs.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.base.kv.v1beta1.Pairs} msg The msg instance to transform. + * @param {!proto.cosmos.store.internal.kv.v1beta1.Pairs} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.kv.v1beta1.Pairs.toObject = function(includeInstance, msg) { +proto.cosmos.store.internal.kv.v1beta1.Pairs.toObject = function(includeInstance, msg) { var f, obj = { pairsList: jspb.Message.toObjectList(msg.getPairsList(), - proto.cosmos.base.kv.v1beta1.Pair.toObject, includeInstance) + proto.cosmos.store.internal.kv.v1beta1.Pair.toObject, includeInstance) }; if (includeInstance) { @@ -115,23 +115,23 @@ proto.cosmos.base.kv.v1beta1.Pairs.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.kv.v1beta1.Pairs} + * @return {!proto.cosmos.store.internal.kv.v1beta1.Pairs} */ -proto.cosmos.base.kv.v1beta1.Pairs.deserializeBinary = function(bytes) { +proto.cosmos.store.internal.kv.v1beta1.Pairs.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.kv.v1beta1.Pairs; - return proto.cosmos.base.kv.v1beta1.Pairs.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.store.internal.kv.v1beta1.Pairs; + return proto.cosmos.store.internal.kv.v1beta1.Pairs.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.base.kv.v1beta1.Pairs} msg The message object to deserialize into. + * @param {!proto.cosmos.store.internal.kv.v1beta1.Pairs} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.kv.v1beta1.Pairs} + * @return {!proto.cosmos.store.internal.kv.v1beta1.Pairs} */ -proto.cosmos.base.kv.v1beta1.Pairs.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.store.internal.kv.v1beta1.Pairs.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -139,8 +139,8 @@ proto.cosmos.base.kv.v1beta1.Pairs.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.cosmos.base.kv.v1beta1.Pair; - reader.readMessage(value,proto.cosmos.base.kv.v1beta1.Pair.deserializeBinaryFromReader); + var value = new proto.cosmos.store.internal.kv.v1beta1.Pair; + reader.readMessage(value,proto.cosmos.store.internal.kv.v1beta1.Pair.deserializeBinaryFromReader); msg.addPairs(value); break; default: @@ -156,9 +156,9 @@ proto.cosmos.base.kv.v1beta1.Pairs.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.base.kv.v1beta1.Pairs.prototype.serializeBinary = function() { +proto.cosmos.store.internal.kv.v1beta1.Pairs.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.base.kv.v1beta1.Pairs.serializeBinaryToWriter(this, writer); + proto.cosmos.store.internal.kv.v1beta1.Pairs.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -166,18 +166,18 @@ proto.cosmos.base.kv.v1beta1.Pairs.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.kv.v1beta1.Pairs} message + * @param {!proto.cosmos.store.internal.kv.v1beta1.Pairs} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.kv.v1beta1.Pairs.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.store.internal.kv.v1beta1.Pairs.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPairsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.cosmos.base.kv.v1beta1.Pair.serializeBinaryToWriter + proto.cosmos.store.internal.kv.v1beta1.Pair.serializeBinaryToWriter ); } }; @@ -185,38 +185,38 @@ proto.cosmos.base.kv.v1beta1.Pairs.serializeBinaryToWriter = function(message, w /** * repeated Pair pairs = 1; - * @return {!Array} + * @return {!Array} */ -proto.cosmos.base.kv.v1beta1.Pairs.prototype.getPairsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.kv.v1beta1.Pair, 1)); +proto.cosmos.store.internal.kv.v1beta1.Pairs.prototype.getPairsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.store.internal.kv.v1beta1.Pair, 1)); }; /** - * @param {!Array} value - * @return {!proto.cosmos.base.kv.v1beta1.Pairs} returns this + * @param {!Array} value + * @return {!proto.cosmos.store.internal.kv.v1beta1.Pairs} returns this */ -proto.cosmos.base.kv.v1beta1.Pairs.prototype.setPairsList = function(value) { +proto.cosmos.store.internal.kv.v1beta1.Pairs.prototype.setPairsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.cosmos.base.kv.v1beta1.Pair=} opt_value + * @param {!proto.cosmos.store.internal.kv.v1beta1.Pair=} opt_value * @param {number=} opt_index - * @return {!proto.cosmos.base.kv.v1beta1.Pair} + * @return {!proto.cosmos.store.internal.kv.v1beta1.Pair} */ -proto.cosmos.base.kv.v1beta1.Pairs.prototype.addPairs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.kv.v1beta1.Pair, opt_index); +proto.cosmos.store.internal.kv.v1beta1.Pairs.prototype.addPairs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.store.internal.kv.v1beta1.Pair, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.cosmos.base.kv.v1beta1.Pairs} returns this + * @return {!proto.cosmos.store.internal.kv.v1beta1.Pairs} returns this */ -proto.cosmos.base.kv.v1beta1.Pairs.prototype.clearPairsList = function() { +proto.cosmos.store.internal.kv.v1beta1.Pairs.prototype.clearPairsList = function() { return this.setPairsList([]); }; @@ -237,8 +237,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.kv.v1beta1.Pair.toObject(opt_includeInstance, this); +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.internal.kv.v1beta1.Pair.toObject(opt_includeInstance, this); }; @@ -247,11 +247,11 @@ proto.cosmos.base.kv.v1beta1.Pair.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.base.kv.v1beta1.Pair} msg The msg instance to transform. + * @param {!proto.cosmos.store.internal.kv.v1beta1.Pair} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.kv.v1beta1.Pair.toObject = function(includeInstance, msg) { +proto.cosmos.store.internal.kv.v1beta1.Pair.toObject = function(includeInstance, msg) { var f, obj = { key: msg.getKey_asB64(), value: msg.getValue_asB64() @@ -268,23 +268,23 @@ proto.cosmos.base.kv.v1beta1.Pair.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.kv.v1beta1.Pair} + * @return {!proto.cosmos.store.internal.kv.v1beta1.Pair} */ -proto.cosmos.base.kv.v1beta1.Pair.deserializeBinary = function(bytes) { +proto.cosmos.store.internal.kv.v1beta1.Pair.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.kv.v1beta1.Pair; - return proto.cosmos.base.kv.v1beta1.Pair.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.store.internal.kv.v1beta1.Pair; + return proto.cosmos.store.internal.kv.v1beta1.Pair.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.base.kv.v1beta1.Pair} msg The message object to deserialize into. + * @param {!proto.cosmos.store.internal.kv.v1beta1.Pair} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.kv.v1beta1.Pair} + * @return {!proto.cosmos.store.internal.kv.v1beta1.Pair} */ -proto.cosmos.base.kv.v1beta1.Pair.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.store.internal.kv.v1beta1.Pair.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -312,9 +312,9 @@ proto.cosmos.base.kv.v1beta1.Pair.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.serializeBinary = function() { +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.base.kv.v1beta1.Pair.serializeBinaryToWriter(this, writer); + proto.cosmos.store.internal.kv.v1beta1.Pair.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -322,11 +322,11 @@ proto.cosmos.base.kv.v1beta1.Pair.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.kv.v1beta1.Pair} message + * @param {!proto.cosmos.store.internal.kv.v1beta1.Pair} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.kv.v1beta1.Pair.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.store.internal.kv.v1beta1.Pair.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getKey_asU8(); if (f.length > 0) { @@ -349,7 +349,7 @@ proto.cosmos.base.kv.v1beta1.Pair.serializeBinaryToWriter = function(message, wr * optional bytes key = 1; * @return {!(string|Uint8Array)} */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.getKey = function() { +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.getKey = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -359,7 +359,7 @@ proto.cosmos.base.kv.v1beta1.Pair.prototype.getKey = function() { * This is a type-conversion wrapper around `getKey()` * @return {string} */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.getKey_asB64 = function() { +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.getKey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getKey())); }; @@ -372,7 +372,7 @@ proto.cosmos.base.kv.v1beta1.Pair.prototype.getKey_asB64 = function() { * This is a type-conversion wrapper around `getKey()` * @return {!Uint8Array} */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.getKey_asU8 = function() { +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.getKey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getKey())); }; @@ -380,9 +380,9 @@ proto.cosmos.base.kv.v1beta1.Pair.prototype.getKey_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.kv.v1beta1.Pair} returns this + * @return {!proto.cosmos.store.internal.kv.v1beta1.Pair} returns this */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.setKey = function(value) { +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.setKey = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -391,7 +391,7 @@ proto.cosmos.base.kv.v1beta1.Pair.prototype.setKey = function(value) { * optional bytes value = 2; * @return {!(string|Uint8Array)} */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.getValue = function() { +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.getValue = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -401,7 +401,7 @@ proto.cosmos.base.kv.v1beta1.Pair.prototype.getValue = function() { * This is a type-conversion wrapper around `getValue()` * @return {string} */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.getValue_asB64 = function() { +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.getValue_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getValue())); }; @@ -414,7 +414,7 @@ proto.cosmos.base.kv.v1beta1.Pair.prototype.getValue_asB64 = function() { * This is a type-conversion wrapper around `getValue()` * @return {!Uint8Array} */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.getValue_asU8 = function() { +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.getValue_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getValue())); }; @@ -422,11 +422,11 @@ proto.cosmos.base.kv.v1beta1.Pair.prototype.getValue_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.kv.v1beta1.Pair} returns this + * @return {!proto.cosmos.store.internal.kv.v1beta1.Pair} returns this */ -proto.cosmos.base.kv.v1beta1.Pair.prototype.setValue = function(value) { +proto.cosmos.store.internal.kv.v1beta1.Pair.prototype.setValue = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; -goog.object.extend(exports, proto.cosmos.base.kv.v1beta1); +goog.object.extend(exports, proto.cosmos.store.internal.kv.v1beta1); diff --git a/codegen/cosmos/store/internal/kv/v1beta1/kv_pb_service.d.ts b/codegen/cosmos/store/internal/kv/v1beta1/kv_pb_service.d.ts new file mode 100644 index 0000000..16af3df --- /dev/null +++ b/codegen/cosmos/store/internal/kv/v1beta1/kv_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: cosmos.store.internal.kv.v1beta1 +// file: cosmos/store/internal/kv/v1beta1/kv.proto + diff --git a/codegen/cosmos/store/internal/kv/v1beta1/kv_pb_service.js b/codegen/cosmos/store/internal/kv/v1beta1/kv_pb_service.js new file mode 100644 index 0000000..16af3df --- /dev/null +++ b/codegen/cosmos/store/internal/kv/v1beta1/kv_pb_service.js @@ -0,0 +1,3 @@ +// package: cosmos.store.internal.kv.v1beta1 +// file: cosmos/store/internal/kv/v1beta1/kv.proto + diff --git a/codegen/cosmos/store/snapshots/v1/snapshot.ts b/codegen/cosmos/store/snapshots/v1/snapshot.ts new file mode 100644 index 0000000..e574737 --- /dev/null +++ b/codegen/cosmos/store/snapshots/v1/snapshot.ts @@ -0,0 +1,773 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/store/snapshots/v1/snapshot.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.store.snapshots.v1 { + export class Snapshot extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + format?: number; + chunks?: number; + hash?: Uint8Array; + metadata?: Metadata; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("format" in data && data.format != undefined) { + this.format = data.format; + } + if ("chunks" in data && data.chunks != undefined) { + this.chunks = data.chunks; + } + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get format() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set format(value: number) { + pb_1.Message.setField(this, 2, value); + } + get chunks() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set chunks(value: number) { + pb_1.Message.setField(this, 3, value); + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get metadata() { + return pb_1.Message.getWrapperField(this, Metadata, 5) as Metadata; + } + set metadata(value: Metadata) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_metadata() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + height?: number; + format?: number; + chunks?: number; + hash?: Uint8Array; + metadata?: ReturnType; + }): Snapshot { + const message = new Snapshot({}); + if (data.height != null) { + message.height = data.height; + } + if (data.format != null) { + message.format = data.format; + } + if (data.chunks != null) { + message.chunks = data.chunks; + } + if (data.hash != null) { + message.hash = data.hash; + } + if (data.metadata != null) { + message.metadata = Metadata.fromObject(data.metadata); + } + return message; + } + toObject() { + const data: { + height?: number; + format?: number; + chunks?: number; + hash?: Uint8Array; + metadata?: ReturnType; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.format != null) { + data.format = this.format; + } + if (this.chunks != null) { + data.chunks = this.chunks; + } + if (this.hash != null) { + data.hash = this.hash; + } + if (this.metadata != null) { + data.metadata = this.metadata.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.height != 0) + writer.writeUint64(1, this.height); + if (this.format != 0) + writer.writeUint32(2, this.format); + if (this.chunks != 0) + writer.writeUint32(3, this.chunks); + if (this.hash.length) + writer.writeBytes(4, this.hash); + if (this.has_metadata) + writer.writeMessage(5, this.metadata, () => this.metadata.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Snapshot { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Snapshot(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readUint64(); + break; + case 2: + message.format = reader.readUint32(); + break; + case 3: + message.chunks = reader.readUint32(); + break; + case 4: + message.hash = reader.readBytes(); + break; + case 5: + reader.readMessage(message.metadata, () => message.metadata = Metadata.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Snapshot { + return Snapshot.deserialize(bytes); + } + } + export class Metadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + chunk_hashes?: Uint8Array[]; + }) { + 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 ("chunk_hashes" in data && data.chunk_hashes != undefined) { + this.chunk_hashes = data.chunk_hashes; + } + } + } + get chunk_hashes() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as Uint8Array[]; + } + set chunk_hashes(value: Uint8Array[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + chunk_hashes?: Uint8Array[]; + }): Metadata { + const message = new Metadata({}); + if (data.chunk_hashes != null) { + message.chunk_hashes = data.chunk_hashes; + } + return message; + } + toObject() { + const data: { + chunk_hashes?: Uint8Array[]; + } = {}; + if (this.chunk_hashes != null) { + data.chunk_hashes = this.chunk_hashes; + } + 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.chunk_hashes.length) + writer.writeRepeatedBytes(1, this.chunk_hashes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Metadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Metadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Metadata { + return Metadata.deserialize(bytes); + } + } + export class SnapshotItem extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2, 3, 4]]; + constructor(data?: any[] | ({} & (({ + store?: SnapshotStoreItem; + iavl?: never; + extension?: never; + extension_payload?: never; + } | { + store?: never; + iavl?: SnapshotIAVLItem; + extension?: never; + extension_payload?: never; + } | { + store?: never; + iavl?: never; + extension?: SnapshotExtensionMeta; + extension_payload?: never; + } | { + store?: never; + iavl?: never; + extension?: never; + extension_payload?: SnapshotExtensionPayload; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("store" in data && data.store != undefined) { + this.store = data.store; + } + if ("iavl" in data && data.iavl != undefined) { + this.iavl = data.iavl; + } + if ("extension" in data && data.extension != undefined) { + this.extension = data.extension; + } + if ("extension_payload" in data && data.extension_payload != undefined) { + this.extension_payload = data.extension_payload; + } + } + } + get store() { + return pb_1.Message.getWrapperField(this, SnapshotStoreItem, 1) as SnapshotStoreItem; + } + set store(value: SnapshotStoreItem) { + pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); + } + get has_store() { + return pb_1.Message.getField(this, 1) != null; + } + get iavl() { + return pb_1.Message.getWrapperField(this, SnapshotIAVLItem, 2) as SnapshotIAVLItem; + } + set iavl(value: SnapshotIAVLItem) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_iavl() { + return pb_1.Message.getField(this, 2) != null; + } + get extension() { + return pb_1.Message.getWrapperField(this, SnapshotExtensionMeta, 3) as SnapshotExtensionMeta; + } + set extension(value: SnapshotExtensionMeta) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_extension() { + return pb_1.Message.getField(this, 3) != null; + } + get extension_payload() { + return pb_1.Message.getWrapperField(this, SnapshotExtensionPayload, 4) as SnapshotExtensionPayload; + } + set extension_payload(value: SnapshotExtensionPayload) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_extension_payload() { + return pb_1.Message.getField(this, 4) != null; + } + get item() { + const cases: { + [index: number]: "none" | "store" | "iavl" | "extension" | "extension_payload"; + } = { + 0: "none", + 1: "store", + 2: "iavl", + 3: "extension", + 4: "extension_payload" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4])]; + } + static fromObject(data: { + store?: ReturnType; + iavl?: ReturnType; + extension?: ReturnType; + extension_payload?: ReturnType; + }): SnapshotItem { + const message = new SnapshotItem({}); + if (data.store != null) { + message.store = SnapshotStoreItem.fromObject(data.store); + } + if (data.iavl != null) { + message.iavl = SnapshotIAVLItem.fromObject(data.iavl); + } + if (data.extension != null) { + message.extension = SnapshotExtensionMeta.fromObject(data.extension); + } + if (data.extension_payload != null) { + message.extension_payload = SnapshotExtensionPayload.fromObject(data.extension_payload); + } + return message; + } + toObject() { + const data: { + store?: ReturnType; + iavl?: ReturnType; + extension?: ReturnType; + extension_payload?: ReturnType; + } = {}; + if (this.store != null) { + data.store = this.store.toObject(); + } + if (this.iavl != null) { + data.iavl = this.iavl.toObject(); + } + if (this.extension != null) { + data.extension = this.extension.toObject(); + } + if (this.extension_payload != null) { + data.extension_payload = this.extension_payload.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_store) + writer.writeMessage(1, this.store, () => this.store.serialize(writer)); + if (this.has_iavl) + writer.writeMessage(2, this.iavl, () => this.iavl.serialize(writer)); + if (this.has_extension) + writer.writeMessage(3, this.extension, () => this.extension.serialize(writer)); + if (this.has_extension_payload) + writer.writeMessage(4, this.extension_payload, () => this.extension_payload.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SnapshotItem { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SnapshotItem(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.store, () => message.store = SnapshotStoreItem.deserialize(reader)); + break; + case 2: + reader.readMessage(message.iavl, () => message.iavl = SnapshotIAVLItem.deserialize(reader)); + break; + case 3: + reader.readMessage(message.extension, () => message.extension = SnapshotExtensionMeta.deserialize(reader)); + break; + case 4: + reader.readMessage(message.extension_payload, () => message.extension_payload = SnapshotExtensionPayload.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SnapshotItem { + return SnapshotItem.deserialize(bytes); + } + } + export class SnapshotStoreItem extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + name?: string; + }): SnapshotStoreItem { + const message = new SnapshotStoreItem({}); + if (data.name != null) { + message.name = data.name; + } + return message; + } + toObject() { + const data: { + name?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + 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.name.length) + writer.writeString(1, this.name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SnapshotStoreItem { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SnapshotStoreItem(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SnapshotStoreItem { + return SnapshotStoreItem.deserialize(bytes); + } + } + export class SnapshotIAVLItem extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + value?: Uint8Array; + version?: number; + 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 ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set version(value: number) { + pb_1.Message.setField(this, 3, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + key?: Uint8Array; + value?: Uint8Array; + version?: number; + height?: number; + }): SnapshotIAVLItem { + const message = new SnapshotIAVLItem({}); + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + if (data.version != null) { + message.version = data.version; + } + if (data.height != null) { + message.height = data.height; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + value?: Uint8Array; + version?: number; + height?: number; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + if (this.version != null) { + data.version = this.version; + } + if (this.height != null) { + data.height = this.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.key.length) + writer.writeBytes(1, this.key); + if (this.value.length) + writer.writeBytes(2, this.value); + if (this.version != 0) + writer.writeInt64(3, this.version); + if (this.height != 0) + writer.writeInt32(4, this.height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SnapshotIAVLItem { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SnapshotIAVLItem(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + case 2: + message.value = reader.readBytes(); + break; + case 3: + message.version = reader.readInt64(); + break; + case 4: + message.height = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SnapshotIAVLItem { + return SnapshotIAVLItem.deserialize(bytes); + } + } + export class SnapshotExtensionMeta extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + format?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("format" in data && data.format != undefined) { + this.format = data.format; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get format() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set format(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + name?: string; + format?: number; + }): SnapshotExtensionMeta { + const message = new SnapshotExtensionMeta({}); + if (data.name != null) { + message.name = data.name; + } + if (data.format != null) { + message.format = data.format; + } + return message; + } + toObject() { + const data: { + name?: string; + format?: number; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.format != null) { + data.format = this.format; + } + 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.name.length) + writer.writeString(1, this.name); + if (this.format != 0) + writer.writeUint32(2, this.format); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SnapshotExtensionMeta { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SnapshotExtensionMeta(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.format = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SnapshotExtensionMeta { + return SnapshotExtensionMeta.deserialize(bytes); + } + } + export class SnapshotExtensionPayload extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + payload?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("payload" in data && data.payload != undefined) { + this.payload = data.payload; + } + } + } + get payload() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set payload(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + payload?: Uint8Array; + }): SnapshotExtensionPayload { + const message = new SnapshotExtensionPayload({}); + if (data.payload != null) { + message.payload = data.payload; + } + return message; + } + toObject() { + const data: { + payload?: Uint8Array; + } = {}; + if (this.payload != null) { + data.payload = this.payload; + } + 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.payload.length) + writer.writeBytes(1, this.payload); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SnapshotExtensionPayload { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SnapshotExtensionPayload(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.payload = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SnapshotExtensionPayload { + return SnapshotExtensionPayload.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/base/snapshots/v1beta1/snapshot_pb.d.ts b/codegen/cosmos/store/snapshots/v1/snapshot_pb.d.ts similarity index 75% rename from proto/cosmos/base/snapshots/v1beta1/snapshot_pb.d.ts rename to codegen/cosmos/store/snapshots/v1/snapshot_pb.d.ts index 72fe600..d5f27da 100644 --- a/proto/cosmos/base/snapshots/v1beta1/snapshot_pb.d.ts +++ b/codegen/cosmos/store/snapshots/v1/snapshot_pb.d.ts @@ -1,5 +1,5 @@ -// package: cosmos.base.snapshots.v1beta1 -// file: cosmos/base/snapshots/v1beta1/snapshot.proto +// package: cosmos.store.snapshots.v1 +// file: cosmos/store/snapshots/v1/snapshot.proto import * as jspb from "google-protobuf"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; @@ -89,16 +89,6 @@ export class SnapshotItem extends jspb.Message { getExtensionPayload(): SnapshotExtensionPayload | undefined; setExtensionPayload(value?: SnapshotExtensionPayload): void; - hasKv(): boolean; - clearKv(): void; - getKv(): SnapshotKVItem | undefined; - setKv(value?: SnapshotKVItem): void; - - hasSchema(): boolean; - clearSchema(): void; - getSchema(): SnapshotSchema | undefined; - setSchema(value?: SnapshotSchema): void; - getItemCase(): SnapshotItem.ItemCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SnapshotItem.AsObject; @@ -116,8 +106,6 @@ export namespace SnapshotItem { iavl?: SnapshotIAVLItem.AsObject, extension?: SnapshotExtensionMeta.AsObject, extensionPayload?: SnapshotExtensionPayload.AsObject, - kv?: SnapshotKVItem.AsObject, - schema?: SnapshotSchema.AsObject, } export enum ItemCase { @@ -126,8 +114,6 @@ export namespace SnapshotItem { IAVL = 2, EXTENSION = 3, EXTENSION_PAYLOAD = 4, - KV = 5, - SCHEMA = 6, } } @@ -233,55 +219,3 @@ export namespace SnapshotExtensionPayload { } } -export class SnapshotKVItem extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - getValue(): Uint8Array | string; - getValue_asU8(): Uint8Array; - getValue_asB64(): string; - setValue(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SnapshotKVItem.AsObject; - static toObject(includeInstance: boolean, msg: SnapshotKVItem): SnapshotKVItem.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SnapshotKVItem, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SnapshotKVItem; - static deserializeBinaryFromReader(message: SnapshotKVItem, reader: jspb.BinaryReader): SnapshotKVItem; -} - -export namespace SnapshotKVItem { - export type AsObject = { - key: Uint8Array | string, - value: Uint8Array | string, - } -} - -export class SnapshotSchema extends jspb.Message { - clearKeysList(): void; - getKeysList(): Array; - getKeysList_asU8(): Array; - getKeysList_asB64(): Array; - setKeysList(value: Array): void; - addKeys(value: Uint8Array | string, index?: number): Uint8Array | string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SnapshotSchema.AsObject; - static toObject(includeInstance: boolean, msg: SnapshotSchema): SnapshotSchema.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SnapshotSchema, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SnapshotSchema; - static deserializeBinaryFromReader(message: SnapshotSchema, reader: jspb.BinaryReader): SnapshotSchema; -} - -export namespace SnapshotSchema { - export type AsObject = { - keysList: Array, - } -} - diff --git a/codegen/cosmos/store/snapshots/v1/snapshot_pb.js b/codegen/cosmos/store/snapshots/v1/snapshot_pb.js new file mode 100644 index 0000000..d33ae2b --- /dev/null +++ b/codegen/cosmos/store/snapshots/v1/snapshot_pb.js @@ -0,0 +1,1694 @@ +// source: cosmos/store/snapshots/v1/snapshot.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.cosmos.store.snapshots.v1.Metadata', null, global); +goog.exportSymbol('proto.cosmos.store.snapshots.v1.Snapshot', null, global); +goog.exportSymbol('proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta', null, global); +goog.exportSymbol('proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload', null, global); +goog.exportSymbol('proto.cosmos.store.snapshots.v1.SnapshotIAVLItem', null, global); +goog.exportSymbol('proto.cosmos.store.snapshots.v1.SnapshotItem', null, global); +goog.exportSymbol('proto.cosmos.store.snapshots.v1.SnapshotItem.ItemCase', null, global); +goog.exportSymbol('proto.cosmos.store.snapshots.v1.SnapshotStoreItem', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.snapshots.v1.Snapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.snapshots.v1.Snapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.snapshots.v1.Snapshot.displayName = 'proto.cosmos.store.snapshots.v1.Snapshot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.snapshots.v1.Metadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.store.snapshots.v1.Metadata.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.store.snapshots.v1.Metadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.snapshots.v1.Metadata.displayName = 'proto.cosmos.store.snapshots.v1.Metadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.snapshots.v1.SnapshotItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.store.snapshots.v1.SnapshotItem.oneofGroups_); +}; +goog.inherits(proto.cosmos.store.snapshots.v1.SnapshotItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.snapshots.v1.SnapshotItem.displayName = 'proto.cosmos.store.snapshots.v1.SnapshotItem'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.snapshots.v1.SnapshotStoreItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.snapshots.v1.SnapshotStoreItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.snapshots.v1.SnapshotStoreItem.displayName = 'proto.cosmos.store.snapshots.v1.SnapshotStoreItem'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.snapshots.v1.SnapshotIAVLItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.displayName = 'proto.cosmos.store.snapshots.v1.SnapshotIAVLItem'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.displayName = 'proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.displayName = 'proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.snapshots.v1.Snapshot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.snapshots.v1.Snapshot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.Snapshot.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + format: jspb.Message.getFieldWithDefault(msg, 2, 0), + chunks: jspb.Message.getFieldWithDefault(msg, 3, 0), + hash: msg.getHash_asB64(), + metadata: (f = msg.getMetadata()) && proto.cosmos.store.snapshots.v1.Metadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.snapshots.v1.Snapshot} + */ +proto.cosmos.store.snapshots.v1.Snapshot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.snapshots.v1.Snapshot; + return proto.cosmos.store.snapshots.v1.Snapshot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.snapshots.v1.Snapshot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.snapshots.v1.Snapshot} + */ +proto.cosmos.store.snapshots.v1.Snapshot.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFormat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChunks(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 5: + var value = new proto.cosmos.store.snapshots.v1.Metadata; + reader.readMessage(value,proto.cosmos.store.snapshots.v1.Metadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.snapshots.v1.Snapshot.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.snapshots.v1.Snapshot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.Snapshot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getFormat(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getChunks(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.cosmos.store.snapshots.v1.Metadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.store.snapshots.v1.Snapshot} returns this + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.store.snapshots.v1.Snapshot} returns this + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 chunks = 3; + * @return {number} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.getChunks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.store.snapshots.v1.Snapshot} returns this + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.setChunks = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes hash = 4; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.store.snapshots.v1.Snapshot} returns this + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional Metadata metadata = 5; + * @return {?proto.cosmos.store.snapshots.v1.Metadata} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.getMetadata = function() { + return /** @type{?proto.cosmos.store.snapshots.v1.Metadata} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.store.snapshots.v1.Metadata, 5)); +}; + + +/** + * @param {?proto.cosmos.store.snapshots.v1.Metadata|undefined} value + * @return {!proto.cosmos.store.snapshots.v1.Snapshot} returns this +*/ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.snapshots.v1.Snapshot} returns this + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.snapshots.v1.Snapshot.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.store.snapshots.v1.Metadata.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.snapshots.v1.Metadata.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.snapshots.v1.Metadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.snapshots.v1.Metadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.Metadata.toObject = function(includeInstance, msg) { + var f, obj = { + chunkHashesList: msg.getChunkHashesList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.snapshots.v1.Metadata} + */ +proto.cosmos.store.snapshots.v1.Metadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.snapshots.v1.Metadata; + return proto.cosmos.store.snapshots.v1.Metadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.snapshots.v1.Metadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.snapshots.v1.Metadata} + */ +proto.cosmos.store.snapshots.v1.Metadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addChunkHashes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.Metadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.snapshots.v1.Metadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.snapshots.v1.Metadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.Metadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChunkHashesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes chunk_hashes = 1; + * @return {!(Array|Array)} + */ +proto.cosmos.store.snapshots.v1.Metadata.prototype.getChunkHashesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes chunk_hashes = 1; + * This is a type-conversion wrapper around `getChunkHashesList()` + * @return {!Array} + */ +proto.cosmos.store.snapshots.v1.Metadata.prototype.getChunkHashesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getChunkHashesList())); +}; + + +/** + * repeated bytes chunk_hashes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChunkHashesList()` + * @return {!Array} + */ +proto.cosmos.store.snapshots.v1.Metadata.prototype.getChunkHashesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getChunkHashesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.store.snapshots.v1.Metadata} returns this + */ +proto.cosmos.store.snapshots.v1.Metadata.prototype.setChunkHashesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.store.snapshots.v1.Metadata} returns this + */ +proto.cosmos.store.snapshots.v1.Metadata.prototype.addChunkHashes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.store.snapshots.v1.Metadata} returns this + */ +proto.cosmos.store.snapshots.v1.Metadata.prototype.clearChunkHashesList = function() { + return this.setChunkHashesList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.oneofGroups_ = [[1,2,3,4]]; + +/** + * @enum {number} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.ItemCase = { + ITEM_NOT_SET: 0, + STORE: 1, + IAVL: 2, + EXTENSION: 3, + EXTENSION_PAYLOAD: 4 +}; + +/** + * @return {proto.cosmos.store.snapshots.v1.SnapshotItem.ItemCase} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.getItemCase = function() { + return /** @type {proto.cosmos.store.snapshots.v1.SnapshotItem.ItemCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.store.snapshots.v1.SnapshotItem.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.snapshots.v1.SnapshotItem.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.snapshots.v1.SnapshotItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.toObject = function(includeInstance, msg) { + var f, obj = { + store: (f = msg.getStore()) && proto.cosmos.store.snapshots.v1.SnapshotStoreItem.toObject(includeInstance, f), + iavl: (f = msg.getIavl()) && proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.toObject(includeInstance, f), + extension: (f = msg.getExtension$()) && proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.toObject(includeInstance, f), + extensionPayload: (f = msg.getExtensionPayload()) && proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.snapshots.v1.SnapshotItem; + return proto.cosmos.store.snapshots.v1.SnapshotItem.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.store.snapshots.v1.SnapshotStoreItem; + reader.readMessage(value,proto.cosmos.store.snapshots.v1.SnapshotStoreItem.deserializeBinaryFromReader); + msg.setStore(value); + break; + case 2: + var value = new proto.cosmos.store.snapshots.v1.SnapshotIAVLItem; + reader.readMessage(value,proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.deserializeBinaryFromReader); + msg.setIavl(value); + break; + case 3: + var value = new proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta; + reader.readMessage(value,proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.deserializeBinaryFromReader); + msg.setExtension$(value); + break; + case 4: + var value = new proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload; + reader.readMessage(value,proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.deserializeBinaryFromReader); + msg.setExtensionPayload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.snapshots.v1.SnapshotItem.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStore(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.store.snapshots.v1.SnapshotStoreItem.serializeBinaryToWriter + ); + } + f = message.getIavl(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.serializeBinaryToWriter + ); + } + f = message.getExtension$(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.serializeBinaryToWriter + ); + } + f = message.getExtensionPayload(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SnapshotStoreItem store = 1; + * @return {?proto.cosmos.store.snapshots.v1.SnapshotStoreItem} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.getStore = function() { + return /** @type{?proto.cosmos.store.snapshots.v1.SnapshotStoreItem} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.store.snapshots.v1.SnapshotStoreItem, 1)); +}; + + +/** + * @param {?proto.cosmos.store.snapshots.v1.SnapshotStoreItem|undefined} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} returns this +*/ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.setStore = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cosmos.store.snapshots.v1.SnapshotItem.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.clearStore = function() { + return this.setStore(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.hasStore = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SnapshotIAVLItem iavl = 2; + * @return {?proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.getIavl = function() { + return /** @type{?proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.store.snapshots.v1.SnapshotIAVLItem, 2)); +}; + + +/** + * @param {?proto.cosmos.store.snapshots.v1.SnapshotIAVLItem|undefined} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} returns this +*/ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.setIavl = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.store.snapshots.v1.SnapshotItem.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.clearIavl = function() { + return this.setIavl(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.hasIavl = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional SnapshotExtensionMeta extension = 3; + * @return {?proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.getExtension$ = function() { + return /** @type{?proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta, 3)); +}; + + +/** + * @param {?proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta|undefined} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} returns this +*/ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.setExtension$ = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.cosmos.store.snapshots.v1.SnapshotItem.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.clearExtension$ = function() { + return this.setExtension$(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.hasExtension$ = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional SnapshotExtensionPayload extension_payload = 4; + * @return {?proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.getExtensionPayload = function() { + return /** @type{?proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload, 4)); +}; + + +/** + * @param {?proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload|undefined} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} returns this +*/ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.setExtensionPayload = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.cosmos.store.snapshots.v1.SnapshotItem.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotItem} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.clearExtensionPayload = function() { + return this.setExtensionPayload(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.snapshots.v1.SnapshotItem.prototype.hasExtensionPayload = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.snapshots.v1.SnapshotStoreItem.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.snapshots.v1.SnapshotStoreItem.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.snapshots.v1.SnapshotStoreItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotStoreItem.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotStoreItem} + */ +proto.cosmos.store.snapshots.v1.SnapshotStoreItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.snapshots.v1.SnapshotStoreItem; + return proto.cosmos.store.snapshots.v1.SnapshotStoreItem.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotStoreItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotStoreItem} + */ +proto.cosmos.store.snapshots.v1.SnapshotStoreItem.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.SnapshotStoreItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.snapshots.v1.SnapshotStoreItem.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotStoreItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotStoreItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.store.snapshots.v1.SnapshotStoreItem.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotStoreItem} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotStoreItem.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + value: msg.getValue_asB64(), + version: jspb.Message.getFieldWithDefault(msg, 3, 0), + height: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.snapshots.v1.SnapshotIAVLItem; + return proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getVersion(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes value = 2; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 version = 3; + * @return {number} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 height = 4; + * @return {number} + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotIAVLItem} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotIAVLItem.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + format: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta; + return proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFormat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFormat(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionMeta.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.toObject = function(includeInstance, msg) { + var f, obj = { + payload: msg.getPayload_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload; + return proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPayload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPayload_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes payload = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.prototype.getPayload = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes payload = 1; + * This is a type-conversion wrapper around `getPayload()` + * @return {string} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.prototype.getPayload_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPayload())); +}; + + +/** + * optional bytes payload = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPayload()` + * @return {!Uint8Array} + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.prototype.getPayload_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPayload())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload} returns this + */ +proto.cosmos.store.snapshots.v1.SnapshotExtensionPayload.prototype.setPayload = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.store.snapshots.v1); diff --git a/codegen/cosmos/store/snapshots/v1/snapshot_pb_service.d.ts b/codegen/cosmos/store/snapshots/v1/snapshot_pb_service.d.ts new file mode 100644 index 0000000..b00dec7 --- /dev/null +++ b/codegen/cosmos/store/snapshots/v1/snapshot_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: cosmos.store.snapshots.v1 +// file: cosmos/store/snapshots/v1/snapshot.proto + diff --git a/codegen/cosmos/store/snapshots/v1/snapshot_pb_service.js b/codegen/cosmos/store/snapshots/v1/snapshot_pb_service.js new file mode 100644 index 0000000..b00dec7 --- /dev/null +++ b/codegen/cosmos/store/snapshots/v1/snapshot_pb_service.js @@ -0,0 +1,3 @@ +// package: cosmos.store.snapshots.v1 +// file: cosmos/store/snapshots/v1/snapshot.proto + diff --git a/codegen/cosmos/store/streaming/abci/grpc.ts b/codegen/cosmos/store/streaming/abci/grpc.ts new file mode 100644 index 0000000..6c22dab --- /dev/null +++ b/codegen/cosmos/store/streaming/abci/grpc.ts @@ -0,0 +1,363 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/store/streaming/abci/grpc.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../tendermint/abci/types"; +import * as dependency_2 from "./../../v1beta1/listening"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.store.streaming.abci { + export class ListenFinalizeBlockRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + req?: dependency_1.tendermint.abci.RequestFinalizeBlock; + res?: dependency_1.tendermint.abci.ResponseFinalizeBlock; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("req" in data && data.req != undefined) { + this.req = data.req; + } + if ("res" in data && data.res != undefined) { + this.res = data.res; + } + } + } + get req() { + return pb_1.Message.getWrapperField(this, dependency_1.tendermint.abci.RequestFinalizeBlock, 1) as dependency_1.tendermint.abci.RequestFinalizeBlock; + } + set req(value: dependency_1.tendermint.abci.RequestFinalizeBlock) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_req() { + return pb_1.Message.getField(this, 1) != null; + } + get res() { + return pb_1.Message.getWrapperField(this, dependency_1.tendermint.abci.ResponseFinalizeBlock, 2) as dependency_1.tendermint.abci.ResponseFinalizeBlock; + } + set res(value: dependency_1.tendermint.abci.ResponseFinalizeBlock) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_res() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + req?: ReturnType; + res?: ReturnType; + }): ListenFinalizeBlockRequest { + const message = new ListenFinalizeBlockRequest({}); + if (data.req != null) { + message.req = dependency_1.tendermint.abci.RequestFinalizeBlock.fromObject(data.req); + } + if (data.res != null) { + message.res = dependency_1.tendermint.abci.ResponseFinalizeBlock.fromObject(data.res); + } + return message; + } + toObject() { + const data: { + req?: ReturnType; + res?: ReturnType; + } = {}; + if (this.req != null) { + data.req = this.req.toObject(); + } + if (this.res != null) { + data.res = this.res.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_req) + writer.writeMessage(1, this.req, () => this.req.serialize(writer)); + if (this.has_res) + writer.writeMessage(2, this.res, () => this.res.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListenFinalizeBlockRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListenFinalizeBlockRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.req, () => message.req = dependency_1.tendermint.abci.RequestFinalizeBlock.deserialize(reader)); + break; + case 2: + reader.readMessage(message.res, () => message.res = dependency_1.tendermint.abci.ResponseFinalizeBlock.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListenFinalizeBlockRequest { + return ListenFinalizeBlockRequest.deserialize(bytes); + } + } + export class ListenFinalizeBlockResponse 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: {}): ListenFinalizeBlockResponse { + const message = new ListenFinalizeBlockResponse({}); + 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): ListenFinalizeBlockResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListenFinalizeBlockResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListenFinalizeBlockResponse { + return ListenFinalizeBlockResponse.deserialize(bytes); + } + } + export class ListenCommitRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_height?: number; + res?: dependency_1.tendermint.abci.ResponseCommit; + change_set?: dependency_2.cosmos.store.v1beta1.StoreKVPair[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_height" in data && data.block_height != undefined) { + this.block_height = data.block_height; + } + if ("res" in data && data.res != undefined) { + this.res = data.res; + } + if ("change_set" in data && data.change_set != undefined) { + this.change_set = data.change_set; + } + } + } + get block_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set block_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get res() { + return pb_1.Message.getWrapperField(this, dependency_1.tendermint.abci.ResponseCommit, 2) as dependency_1.tendermint.abci.ResponseCommit; + } + set res(value: dependency_1.tendermint.abci.ResponseCommit) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_res() { + return pb_1.Message.getField(this, 2) != null; + } + get change_set() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.store.v1beta1.StoreKVPair, 3) as dependency_2.cosmos.store.v1beta1.StoreKVPair[]; + } + set change_set(value: dependency_2.cosmos.store.v1beta1.StoreKVPair[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + block_height?: number; + res?: ReturnType; + change_set?: ReturnType[]; + }): ListenCommitRequest { + const message = new ListenCommitRequest({}); + if (data.block_height != null) { + message.block_height = data.block_height; + } + if (data.res != null) { + message.res = dependency_1.tendermint.abci.ResponseCommit.fromObject(data.res); + } + if (data.change_set != null) { + message.change_set = data.change_set.map(item => dependency_2.cosmos.store.v1beta1.StoreKVPair.fromObject(item)); + } + return message; + } + toObject() { + const data: { + block_height?: number; + res?: ReturnType; + change_set?: ReturnType[]; + } = {}; + if (this.block_height != null) { + data.block_height = this.block_height; + } + if (this.res != null) { + data.res = this.res.toObject(); + } + if (this.change_set != null) { + data.change_set = this.change_set.map((item: dependency_2.cosmos.store.v1beta1.StoreKVPair) => item.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.block_height != 0) + writer.writeInt64(1, this.block_height); + if (this.has_res) + writer.writeMessage(2, this.res, () => this.res.serialize(writer)); + if (this.change_set.length) + writer.writeRepeatedMessage(3, this.change_set, (item: dependency_2.cosmos.store.v1beta1.StoreKVPair) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListenCommitRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListenCommitRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.res, () => message.res = dependency_1.tendermint.abci.ResponseCommit.deserialize(reader)); + break; + case 3: + reader.readMessage(message.change_set, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.store.v1beta1.StoreKVPair.deserialize(reader), dependency_2.cosmos.store.v1beta1.StoreKVPair)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListenCommitRequest { + return ListenCommitRequest.deserialize(bytes); + } + } + export class ListenCommitResponse 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: {}): ListenCommitResponse { + const message = new ListenCommitResponse({}); + 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): ListenCommitResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListenCommitResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListenCommitResponse { + return ListenCommitResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedABCIListenerServiceService { + static definition = { + ListenFinalizeBlock: { + path: "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", + requestStream: false, + responseStream: false, + requestSerialize: (message: ListenFinalizeBlockRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ListenFinalizeBlockRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ListenFinalizeBlockResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ListenFinalizeBlockResponse.deserialize(new Uint8Array(bytes)) + }, + ListenCommit: { + path: "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", + requestStream: false, + responseStream: false, + requestSerialize: (message: ListenCommitRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ListenCommitRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ListenCommitResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ListenCommitResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract ListenFinalizeBlock(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ListenCommit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ABCIListenerServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedABCIListenerServiceService.definition, "ABCIListenerService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + ListenFinalizeBlock: GrpcUnaryServiceInterface = (message: ListenFinalizeBlockRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ListenFinalizeBlock(message, metadata, options, callback); + }; + ListenCommit: GrpcUnaryServiceInterface = (message: ListenCommitRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ListenCommit(message, metadata, options, callback); + }; + } +} diff --git a/codegen/cosmos/store/streaming/abci/grpc_pb.d.ts b/codegen/cosmos/store/streaming/abci/grpc_pb.d.ts new file mode 100644 index 0000000..1b52a4a --- /dev/null +++ b/codegen/cosmos/store/streaming/abci/grpc_pb.d.ts @@ -0,0 +1,99 @@ +// package: cosmos.store.streaming.abci +// file: cosmos/store/streaming/abci/grpc.proto + +import * as jspb from "google-protobuf"; +import * as tendermint_abci_types_pb from "../../../../tendermint/abci/types_pb"; +import * as cosmos_store_v1beta1_listening_pb from "../../../../cosmos/store/v1beta1/listening_pb"; + +export class ListenFinalizeBlockRequest extends jspb.Message { + hasReq(): boolean; + clearReq(): void; + getReq(): tendermint_abci_types_pb.RequestFinalizeBlock | undefined; + setReq(value?: tendermint_abci_types_pb.RequestFinalizeBlock): void; + + hasRes(): boolean; + clearRes(): void; + getRes(): tendermint_abci_types_pb.ResponseFinalizeBlock | undefined; + setRes(value?: tendermint_abci_types_pb.ResponseFinalizeBlock): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListenFinalizeBlockRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListenFinalizeBlockRequest): ListenFinalizeBlockRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListenFinalizeBlockRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListenFinalizeBlockRequest; + static deserializeBinaryFromReader(message: ListenFinalizeBlockRequest, reader: jspb.BinaryReader): ListenFinalizeBlockRequest; +} + +export namespace ListenFinalizeBlockRequest { + export type AsObject = { + req?: tendermint_abci_types_pb.RequestFinalizeBlock.AsObject, + res?: tendermint_abci_types_pb.ResponseFinalizeBlock.AsObject, + } +} + +export class ListenFinalizeBlockResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListenFinalizeBlockResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListenFinalizeBlockResponse): ListenFinalizeBlockResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListenFinalizeBlockResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListenFinalizeBlockResponse; + static deserializeBinaryFromReader(message: ListenFinalizeBlockResponse, reader: jspb.BinaryReader): ListenFinalizeBlockResponse; +} + +export namespace ListenFinalizeBlockResponse { + export type AsObject = { + } +} + +export class ListenCommitRequest extends jspb.Message { + getBlockHeight(): number; + setBlockHeight(value: number): void; + + hasRes(): boolean; + clearRes(): void; + getRes(): tendermint_abci_types_pb.ResponseCommit | undefined; + setRes(value?: tendermint_abci_types_pb.ResponseCommit): void; + + clearChangeSetList(): void; + getChangeSetList(): Array; + setChangeSetList(value: Array): void; + addChangeSet(value?: cosmos_store_v1beta1_listening_pb.StoreKVPair, index?: number): cosmos_store_v1beta1_listening_pb.StoreKVPair; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListenCommitRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListenCommitRequest): ListenCommitRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListenCommitRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListenCommitRequest; + static deserializeBinaryFromReader(message: ListenCommitRequest, reader: jspb.BinaryReader): ListenCommitRequest; +} + +export namespace ListenCommitRequest { + export type AsObject = { + blockHeight: number, + res?: tendermint_abci_types_pb.ResponseCommit.AsObject, + changeSetList: Array, + } +} + +export class ListenCommitResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListenCommitResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListenCommitResponse): ListenCommitResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListenCommitResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListenCommitResponse; + static deserializeBinaryFromReader(message: ListenCommitResponse, reader: jspb.BinaryReader): ListenCommitResponse; +} + +export namespace ListenCommitResponse { + export type AsObject = { + } +} + diff --git a/codegen/cosmos/store/streaming/abci/grpc_pb.js b/codegen/cosmos/store/streaming/abci/grpc_pb.js new file mode 100644 index 0000000..20ccf58 --- /dev/null +++ b/codegen/cosmos/store/streaming/abci/grpc_pb.js @@ -0,0 +1,755 @@ +// source: cosmos/store/streaming/abci/grpc.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var tendermint_abci_types_pb = require('../../../../tendermint/abci/types_pb.js'); +goog.object.extend(proto, tendermint_abci_types_pb); +var cosmos_store_v1beta1_listening_pb = require('../../../../cosmos/store/v1beta1/listening_pb.js'); +goog.object.extend(proto, cosmos_store_v1beta1_listening_pb); +goog.exportSymbol('proto.cosmos.store.streaming.abci.ListenCommitRequest', null, global); +goog.exportSymbol('proto.cosmos.store.streaming.abci.ListenCommitResponse', null, global); +goog.exportSymbol('proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest', null, global); +goog.exportSymbol('proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.displayName = 'proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.displayName = 'proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.store.streaming.abci.ListenCommitRequest.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.store.streaming.abci.ListenCommitRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.streaming.abci.ListenCommitRequest.displayName = 'proto.cosmos.store.streaming.abci.ListenCommitRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.streaming.abci.ListenCommitResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.streaming.abci.ListenCommitResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.streaming.abci.ListenCommitResponse.displayName = 'proto.cosmos.store.streaming.abci.ListenCommitResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.toObject = function(includeInstance, msg) { + var f, obj = { + req: (f = msg.getReq()) && tendermint_abci_types_pb.RequestFinalizeBlock.toObject(includeInstance, f), + res: (f = msg.getRes()) && tendermint_abci_types_pb.ResponseFinalizeBlock.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest; + return proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_abci_types_pb.RequestFinalizeBlock; + reader.readMessage(value,tendermint_abci_types_pb.RequestFinalizeBlock.deserializeBinaryFromReader); + msg.setReq(value); + break; + case 2: + var value = new tendermint_abci_types_pb.ResponseFinalizeBlock; + reader.readMessage(value,tendermint_abci_types_pb.ResponseFinalizeBlock.deserializeBinaryFromReader); + msg.setRes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReq(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_abci_types_pb.RequestFinalizeBlock.serializeBinaryToWriter + ); + } + f = message.getRes(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_abci_types_pb.ResponseFinalizeBlock.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.abci.RequestFinalizeBlock req = 1; + * @return {?proto.tendermint.abci.RequestFinalizeBlock} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.getReq = function() { + return /** @type{?proto.tendermint.abci.RequestFinalizeBlock} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.RequestFinalizeBlock, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestFinalizeBlock|undefined} value + * @return {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest} returns this +*/ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.setReq = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest} returns this + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.clearReq = function() { + return this.setReq(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.hasReq = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.abci.ResponseFinalizeBlock res = 2; + * @return {?proto.tendermint.abci.ResponseFinalizeBlock} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.getRes = function() { + return /** @type{?proto.tendermint.abci.ResponseFinalizeBlock} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseFinalizeBlock, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseFinalizeBlock|undefined} value + * @return {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest} returns this +*/ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.setRes = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest} returns this + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.clearRes = function() { + return this.setRes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockRequest.prototype.hasRes = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse; + return proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.streaming.abci.ListenFinalizeBlockResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.streaming.abci.ListenCommitRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.streaming.abci.ListenCommitRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + res: (f = msg.getRes()) && tendermint_abci_types_pb.ResponseCommit.toObject(includeInstance, f), + changeSetList: jspb.Message.toObjectList(msg.getChangeSetList(), + cosmos_store_v1beta1_listening_pb.StoreKVPair.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.streaming.abci.ListenCommitRequest} + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.streaming.abci.ListenCommitRequest; + return proto.cosmos.store.streaming.abci.ListenCommitRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.streaming.abci.ListenCommitRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.streaming.abci.ListenCommitRequest} + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockHeight(value); + break; + case 2: + var value = new tendermint_abci_types_pb.ResponseCommit; + reader.readMessage(value,tendermint_abci_types_pb.ResponseCommit.deserializeBinaryFromReader); + msg.setRes(value); + break; + case 3: + var value = new cosmos_store_v1beta1_listening_pb.StoreKVPair; + reader.readMessage(value,cosmos_store_v1beta1_listening_pb.StoreKVPair.deserializeBinaryFromReader); + msg.addChangeSet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.streaming.abci.ListenCommitRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.streaming.abci.ListenCommitRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRes(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_abci_types_pb.ResponseCommit.serializeBinaryToWriter + ); + } + f = message.getChangeSetList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_store_v1beta1_listening_pb.StoreKVPair.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 block_height = 1; + * @return {number} + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.store.streaming.abci.ListenCommitRequest} returns this + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional tendermint.abci.ResponseCommit res = 2; + * @return {?proto.tendermint.abci.ResponseCommit} + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.getRes = function() { + return /** @type{?proto.tendermint.abci.ResponseCommit} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseCommit, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseCommit|undefined} value + * @return {!proto.cosmos.store.streaming.abci.ListenCommitRequest} returns this +*/ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.setRes = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.streaming.abci.ListenCommitRequest} returns this + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.clearRes = function() { + return this.setRes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.hasRes = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated cosmos.store.v1beta1.StoreKVPair change_set = 3; + * @return {!Array} + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.getChangeSetList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_store_v1beta1_listening_pb.StoreKVPair, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.store.streaming.abci.ListenCommitRequest} returns this +*/ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.setChangeSetList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.store.v1beta1.StoreKVPair=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.store.v1beta1.StoreKVPair} + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.addChangeSet = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.store.v1beta1.StoreKVPair, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.store.streaming.abci.ListenCommitRequest} returns this + */ +proto.cosmos.store.streaming.abci.ListenCommitRequest.prototype.clearChangeSetList = function() { + return this.setChangeSetList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.streaming.abci.ListenCommitResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.streaming.abci.ListenCommitResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.streaming.abci.ListenCommitResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.streaming.abci.ListenCommitResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.streaming.abci.ListenCommitResponse} + */ +proto.cosmos.store.streaming.abci.ListenCommitResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.streaming.abci.ListenCommitResponse; + return proto.cosmos.store.streaming.abci.ListenCommitResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.streaming.abci.ListenCommitResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.streaming.abci.ListenCommitResponse} + */ +proto.cosmos.store.streaming.abci.ListenCommitResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.streaming.abci.ListenCommitResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.streaming.abci.ListenCommitResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.streaming.abci.ListenCommitResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.streaming.abci.ListenCommitResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.store.streaming.abci); diff --git a/codegen/cosmos/store/streaming/abci/grpc_pb_service.d.ts b/codegen/cosmos/store/streaming/abci/grpc_pb_service.d.ts new file mode 100644 index 0000000..9f037fe --- /dev/null +++ b/codegen/cosmos/store/streaming/abci/grpc_pb_service.d.ts @@ -0,0 +1,82 @@ +// package: cosmos.store.streaming.abci +// file: cosmos/store/streaming/abci/grpc.proto + +import * as cosmos_store_streaming_abci_grpc_pb from "../../../../cosmos/store/streaming/abci/grpc_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type ABCIListenerServiceListenFinalizeBlock = { + readonly methodName: string; + readonly service: typeof ABCIListenerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_store_streaming_abci_grpc_pb.ListenFinalizeBlockRequest; + readonly responseType: typeof cosmos_store_streaming_abci_grpc_pb.ListenFinalizeBlockResponse; +}; + +type ABCIListenerServiceListenCommit = { + readonly methodName: string; + readonly service: typeof ABCIListenerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof cosmos_store_streaming_abci_grpc_pb.ListenCommitRequest; + readonly responseType: typeof cosmos_store_streaming_abci_grpc_pb.ListenCommitResponse; +}; + +export class ABCIListenerService { + static readonly serviceName: string; + static readonly ListenFinalizeBlock: ABCIListenerServiceListenFinalizeBlock; + static readonly ListenCommit: ABCIListenerServiceListenCommit; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class ABCIListenerServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + listenFinalizeBlock( + requestMessage: cosmos_store_streaming_abci_grpc_pb.ListenFinalizeBlockRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_store_streaming_abci_grpc_pb.ListenFinalizeBlockResponse|null) => void + ): UnaryResponse; + listenFinalizeBlock( + requestMessage: cosmos_store_streaming_abci_grpc_pb.ListenFinalizeBlockRequest, + callback: (error: ServiceError|null, responseMessage: cosmos_store_streaming_abci_grpc_pb.ListenFinalizeBlockResponse|null) => void + ): UnaryResponse; + listenCommit( + requestMessage: cosmos_store_streaming_abci_grpc_pb.ListenCommitRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: cosmos_store_streaming_abci_grpc_pb.ListenCommitResponse|null) => void + ): UnaryResponse; + listenCommit( + requestMessage: cosmos_store_streaming_abci_grpc_pb.ListenCommitRequest, + callback: (error: ServiceError|null, responseMessage: cosmos_store_streaming_abci_grpc_pb.ListenCommitResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/cosmos/store/streaming/abci/grpc_pb_service.js b/codegen/cosmos/store/streaming/abci/grpc_pb_service.js new file mode 100644 index 0000000..98d0108 --- /dev/null +++ b/codegen/cosmos/store/streaming/abci/grpc_pb_service.js @@ -0,0 +1,101 @@ +// package: cosmos.store.streaming.abci +// file: cosmos/store/streaming/abci/grpc.proto + +var cosmos_store_streaming_abci_grpc_pb = require("../../../../cosmos/store/streaming/abci/grpc_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var ABCIListenerService = (function () { + function ABCIListenerService() {} + ABCIListenerService.serviceName = "cosmos.store.streaming.abci.ABCIListenerService"; + return ABCIListenerService; +}()); + +ABCIListenerService.ListenFinalizeBlock = { + methodName: "ListenFinalizeBlock", + service: ABCIListenerService, + requestStream: false, + responseStream: false, + requestType: cosmos_store_streaming_abci_grpc_pb.ListenFinalizeBlockRequest, + responseType: cosmos_store_streaming_abci_grpc_pb.ListenFinalizeBlockResponse +}; + +ABCIListenerService.ListenCommit = { + methodName: "ListenCommit", + service: ABCIListenerService, + requestStream: false, + responseStream: false, + requestType: cosmos_store_streaming_abci_grpc_pb.ListenCommitRequest, + responseType: cosmos_store_streaming_abci_grpc_pb.ListenCommitResponse +}; + +exports.ABCIListenerService = ABCIListenerService; + +function ABCIListenerServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +ABCIListenerServiceClient.prototype.listenFinalizeBlock = function listenFinalizeBlock(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ABCIListenerService.ListenFinalizeBlock, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ABCIListenerServiceClient.prototype.listenCommit = function listenCommit(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ABCIListenerService.ListenCommit, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.ABCIListenerServiceClient = ABCIListenerServiceClient; + diff --git a/codegen/cosmos/store/v1beta1/commit_info.ts b/codegen/cosmos/store/v1beta1/commit_info.ts new file mode 100644 index 0000000..5fcf162 --- /dev/null +++ b/codegen/cosmos/store/v1beta1/commit_info.ts @@ -0,0 +1,309 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/store/v1beta1/commit_info.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../google/protobuf/timestamp"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.store.v1beta1 { + export class CommitInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + version?: number; + store_infos?: StoreInfo[]; + timestamp?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("store_infos" in data && data.store_infos != undefined) { + this.store_infos = data.store_infos; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set version(value: number) { + pb_1.Message.setField(this, 1, value); + } + get store_infos() { + return pb_1.Message.getRepeatedWrapperField(this, StoreInfo, 2) as StoreInfo[]; + } + set store_infos(value: StoreInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 3) as dependency_2.google.protobuf.Timestamp; + } + set timestamp(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + version?: number; + store_infos?: ReturnType[]; + timestamp?: ReturnType; + }): CommitInfo { + const message = new CommitInfo({}); + if (data.version != null) { + message.version = data.version; + } + if (data.store_infos != null) { + message.store_infos = data.store_infos.map(item => StoreInfo.fromObject(item)); + } + if (data.timestamp != null) { + message.timestamp = dependency_2.google.protobuf.Timestamp.fromObject(data.timestamp); + } + return message; + } + toObject() { + const data: { + version?: number; + store_infos?: ReturnType[]; + timestamp?: ReturnType; + } = {}; + if (this.version != null) { + data.version = this.version; + } + if (this.store_infos != null) { + data.store_infos = this.store_infos.map((item: StoreInfo) => item.toObject()); + } + if (this.timestamp != null) { + data.timestamp = this.timestamp.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.version != 0) + writer.writeInt64(1, this.version); + if (this.store_infos.length) + writer.writeRepeatedMessage(2, this.store_infos, (item: StoreInfo) => item.serialize(writer)); + if (this.has_timestamp) + writer.writeMessage(3, this.timestamp, () => this.timestamp.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommitInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommitInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.version = reader.readInt64(); + break; + case 2: + reader.readMessage(message.store_infos, () => pb_1.Message.addToRepeatedWrapperField(message, 2, StoreInfo.deserialize(reader), StoreInfo)); + break; + case 3: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommitInfo { + return CommitInfo.deserialize(bytes); + } + } + export class StoreInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + commit_id?: CommitID; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("commit_id" in data && data.commit_id != undefined) { + this.commit_id = data.commit_id; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get commit_id() { + return pb_1.Message.getWrapperField(this, CommitID, 2) as CommitID; + } + set commit_id(value: CommitID) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_commit_id() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + name?: string; + commit_id?: ReturnType; + }): StoreInfo { + const message = new StoreInfo({}); + if (data.name != null) { + message.name = data.name; + } + if (data.commit_id != null) { + message.commit_id = CommitID.fromObject(data.commit_id); + } + return message; + } + toObject() { + const data: { + name?: string; + commit_id?: ReturnType; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.commit_id != null) { + data.commit_id = this.commit_id.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.name.length) + writer.writeString(1, this.name); + if (this.has_commit_id) + writer.writeMessage(2, this.commit_id, () => this.commit_id.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StoreInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StoreInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + reader.readMessage(message.commit_id, () => message.commit_id = CommitID.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): StoreInfo { + return StoreInfo.deserialize(bytes); + } + } + export class CommitID extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + version?: number; + hash?: Uint8Array; + }) { + 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 ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + } + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set version(value: number) { + pb_1.Message.setField(this, 1, value); + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + version?: number; + hash?: Uint8Array; + }): CommitID { + const message = new CommitID({}); + if (data.version != null) { + message.version = data.version; + } + if (data.hash != null) { + message.hash = data.hash; + } + return message; + } + toObject() { + const data: { + version?: number; + hash?: Uint8Array; + } = {}; + if (this.version != null) { + data.version = this.version; + } + if (this.hash != null) { + data.hash = this.hash; + } + 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 != 0) + writer.writeInt64(1, this.version); + if (this.hash.length) + writer.writeBytes(2, this.hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommitID { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommitID(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.version = reader.readInt64(); + break; + case 2: + message.hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommitID { + return CommitID.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/base/store/v1beta1/commit_info_pb.d.ts b/codegen/cosmos/store/v1beta1/commit_info_pb.d.ts similarity index 95% rename from proto/cosmos/base/store/v1beta1/commit_info_pb.d.ts rename to codegen/cosmos/store/v1beta1/commit_info_pb.d.ts index 27cac2b..4427656 100644 --- a/proto/cosmos/base/store/v1beta1/commit_info_pb.d.ts +++ b/codegen/cosmos/store/v1beta1/commit_info_pb.d.ts @@ -1,8 +1,8 @@ -// package: cosmos.base.store.v1beta1 -// file: cosmos/base/store/v1beta1/commit_info.proto +// package: cosmos.store.v1beta1 +// file: cosmos/store/v1beta1/commit_info.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; export class CommitInfo extends jspb.Message { diff --git a/proto/cosmos/base/store/v1beta1/commit_info_pb.js b/codegen/cosmos/store/v1beta1/commit_info_pb.js similarity index 60% rename from proto/cosmos/base/store/v1beta1/commit_info_pb.js rename to codegen/cosmos/store/v1beta1/commit_info_pb.js index 43080ef..3836bd9 100644 --- a/proto/cosmos/base/store/v1beta1/commit_info_pb.js +++ b/codegen/cosmos/store/v1beta1/commit_info_pb.js @@ -1,4 +1,4 @@ -// source: cosmos/base/store/v1beta1/commit_info.proto +// source: cosmos/store/v1beta1/commit_info.proto /** * @fileoverview * @enhanceable @@ -15,13 +15,13 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); -goog.exportSymbol('proto.cosmos.base.store.v1beta1.CommitID', null, global); -goog.exportSymbol('proto.cosmos.base.store.v1beta1.CommitInfo', null, global); -goog.exportSymbol('proto.cosmos.base.store.v1beta1.StoreInfo', null, global); +goog.exportSymbol('proto.cosmos.store.v1beta1.CommitID', null, global); +goog.exportSymbol('proto.cosmos.store.v1beta1.CommitInfo', null, global); +goog.exportSymbol('proto.cosmos.store.v1beta1.StoreInfo', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,16 +32,16 @@ goog.exportSymbol('proto.cosmos.base.store.v1beta1.StoreInfo', null, global); * @extends {jspb.Message} * @constructor */ -proto.cosmos.base.store.v1beta1.CommitInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.store.v1beta1.CommitInfo.repeatedFields_, null); +proto.cosmos.store.v1beta1.CommitInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.store.v1beta1.CommitInfo.repeatedFields_, null); }; -goog.inherits(proto.cosmos.base.store.v1beta1.CommitInfo, jspb.Message); +goog.inherits(proto.cosmos.store.v1beta1.CommitInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.base.store.v1beta1.CommitInfo.displayName = 'proto.cosmos.base.store.v1beta1.CommitInfo'; + proto.cosmos.store.v1beta1.CommitInfo.displayName = 'proto.cosmos.store.v1beta1.CommitInfo'; } /** * Generated by JsPbCodeGenerator. @@ -53,16 +53,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.cosmos.base.store.v1beta1.StoreInfo = function(opt_data) { +proto.cosmos.store.v1beta1.StoreInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.base.store.v1beta1.StoreInfo, jspb.Message); +goog.inherits(proto.cosmos.store.v1beta1.StoreInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.base.store.v1beta1.StoreInfo.displayName = 'proto.cosmos.base.store.v1beta1.StoreInfo'; + proto.cosmos.store.v1beta1.StoreInfo.displayName = 'proto.cosmos.store.v1beta1.StoreInfo'; } /** * Generated by JsPbCodeGenerator. @@ -74,16 +74,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.cosmos.base.store.v1beta1.CommitID = function(opt_data) { +proto.cosmos.store.v1beta1.CommitID = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.cosmos.base.store.v1beta1.CommitID, jspb.Message); +goog.inherits(proto.cosmos.store.v1beta1.CommitID, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.cosmos.base.store.v1beta1.CommitID.displayName = 'proto.cosmos.base.store.v1beta1.CommitID'; + proto.cosmos.store.v1beta1.CommitID.displayName = 'proto.cosmos.store.v1beta1.CommitID'; } /** @@ -91,7 +91,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.cosmos.base.store.v1beta1.CommitInfo.repeatedFields_ = [2]; +proto.cosmos.store.v1beta1.CommitInfo.repeatedFields_ = [2]; @@ -108,8 +108,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.store.v1beta1.CommitInfo.toObject(opt_includeInstance, this); +proto.cosmos.store.v1beta1.CommitInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.v1beta1.CommitInfo.toObject(opt_includeInstance, this); }; @@ -118,15 +118,15 @@ proto.cosmos.base.store.v1beta1.CommitInfo.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.base.store.v1beta1.CommitInfo} msg The msg instance to transform. + * @param {!proto.cosmos.store.v1beta1.CommitInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.store.v1beta1.CommitInfo.toObject = function(includeInstance, msg) { +proto.cosmos.store.v1beta1.CommitInfo.toObject = function(includeInstance, msg) { var f, obj = { version: jspb.Message.getFieldWithDefault(msg, 1, 0), storeInfosList: jspb.Message.toObjectList(msg.getStoreInfosList(), - proto.cosmos.base.store.v1beta1.StoreInfo.toObject, includeInstance), + proto.cosmos.store.v1beta1.StoreInfo.toObject, includeInstance), timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; @@ -141,23 +141,23 @@ proto.cosmos.base.store.v1beta1.CommitInfo.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} + * @return {!proto.cosmos.store.v1beta1.CommitInfo} */ -proto.cosmos.base.store.v1beta1.CommitInfo.deserializeBinary = function(bytes) { +proto.cosmos.store.v1beta1.CommitInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.store.v1beta1.CommitInfo; - return proto.cosmos.base.store.v1beta1.CommitInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.store.v1beta1.CommitInfo; + return proto.cosmos.store.v1beta1.CommitInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.base.store.v1beta1.CommitInfo} msg The message object to deserialize into. + * @param {!proto.cosmos.store.v1beta1.CommitInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} + * @return {!proto.cosmos.store.v1beta1.CommitInfo} */ -proto.cosmos.base.store.v1beta1.CommitInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.store.v1beta1.CommitInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -169,8 +169,8 @@ proto.cosmos.base.store.v1beta1.CommitInfo.deserializeBinaryFromReader = functio msg.setVersion(value); break; case 2: - var value = new proto.cosmos.base.store.v1beta1.StoreInfo; - reader.readMessage(value,proto.cosmos.base.store.v1beta1.StoreInfo.deserializeBinaryFromReader); + var value = new proto.cosmos.store.v1beta1.StoreInfo; + reader.readMessage(value,proto.cosmos.store.v1beta1.StoreInfo.deserializeBinaryFromReader); msg.addStoreInfos(value); break; case 3: @@ -191,9 +191,9 @@ proto.cosmos.base.store.v1beta1.CommitInfo.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.serializeBinary = function() { +proto.cosmos.store.v1beta1.CommitInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.base.store.v1beta1.CommitInfo.serializeBinaryToWriter(this, writer); + proto.cosmos.store.v1beta1.CommitInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -201,11 +201,11 @@ proto.cosmos.base.store.v1beta1.CommitInfo.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.store.v1beta1.CommitInfo} message + * @param {!proto.cosmos.store.v1beta1.CommitInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.store.v1beta1.CommitInfo.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.store.v1beta1.CommitInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getVersion(); if (f !== 0) { @@ -219,7 +219,7 @@ proto.cosmos.base.store.v1beta1.CommitInfo.serializeBinaryToWriter = function(me writer.writeRepeatedMessage( 2, f, - proto.cosmos.base.store.v1beta1.StoreInfo.serializeBinaryToWriter + proto.cosmos.store.v1beta1.StoreInfo.serializeBinaryToWriter ); } f = message.getTimestamp(); @@ -237,54 +237,54 @@ proto.cosmos.base.store.v1beta1.CommitInfo.serializeBinaryToWriter = function(me * optional int64 version = 1; * @return {number} */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.getVersion = function() { +proto.cosmos.store.v1beta1.CommitInfo.prototype.getVersion = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} returns this + * @return {!proto.cosmos.store.v1beta1.CommitInfo} returns this */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.setVersion = function(value) { +proto.cosmos.store.v1beta1.CommitInfo.prototype.setVersion = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * repeated StoreInfo store_infos = 2; - * @return {!Array} + * @return {!Array} */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.getStoreInfosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.store.v1beta1.StoreInfo, 2)); +proto.cosmos.store.v1beta1.CommitInfo.prototype.getStoreInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.store.v1beta1.StoreInfo, 2)); }; /** - * @param {!Array} value - * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} returns this + * @param {!Array} value + * @return {!proto.cosmos.store.v1beta1.CommitInfo} returns this */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.setStoreInfosList = function(value) { +proto.cosmos.store.v1beta1.CommitInfo.prototype.setStoreInfosList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {!proto.cosmos.base.store.v1beta1.StoreInfo=} opt_value + * @param {!proto.cosmos.store.v1beta1.StoreInfo=} opt_value * @param {number=} opt_index - * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} + * @return {!proto.cosmos.store.v1beta1.StoreInfo} */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.addStoreInfos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.store.v1beta1.StoreInfo, opt_index); +proto.cosmos.store.v1beta1.CommitInfo.prototype.addStoreInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.store.v1beta1.StoreInfo, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} returns this + * @return {!proto.cosmos.store.v1beta1.CommitInfo} returns this */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.clearStoreInfosList = function() { +proto.cosmos.store.v1beta1.CommitInfo.prototype.clearStoreInfosList = function() { return this.setStoreInfosList([]); }; @@ -293,7 +293,7 @@ proto.cosmos.base.store.v1beta1.CommitInfo.prototype.clearStoreInfosList = funct * optional google.protobuf.Timestamp timestamp = 3; * @return {?proto.google.protobuf.Timestamp} */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.getTimestamp = function() { +proto.cosmos.store.v1beta1.CommitInfo.prototype.getTimestamp = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; @@ -301,18 +301,18 @@ proto.cosmos.base.store.v1beta1.CommitInfo.prototype.getTimestamp = function() { /** * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} returns this + * @return {!proto.cosmos.store.v1beta1.CommitInfo} returns this */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.setTimestamp = function(value) { +proto.cosmos.store.v1beta1.CommitInfo.prototype.setTimestamp = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} returns this + * @return {!proto.cosmos.store.v1beta1.CommitInfo} returns this */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.clearTimestamp = function() { +proto.cosmos.store.v1beta1.CommitInfo.prototype.clearTimestamp = function() { return this.setTimestamp(undefined); }; @@ -321,7 +321,7 @@ proto.cosmos.base.store.v1beta1.CommitInfo.prototype.clearTimestamp = function() * Returns whether this field is set. * @return {boolean} */ -proto.cosmos.base.store.v1beta1.CommitInfo.prototype.hasTimestamp = function() { +proto.cosmos.store.v1beta1.CommitInfo.prototype.hasTimestamp = function() { return jspb.Message.getField(this, 3) != null; }; @@ -342,8 +342,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.base.store.v1beta1.StoreInfo.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.store.v1beta1.StoreInfo.toObject(opt_includeInstance, this); +proto.cosmos.store.v1beta1.StoreInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.v1beta1.StoreInfo.toObject(opt_includeInstance, this); }; @@ -352,14 +352,14 @@ proto.cosmos.base.store.v1beta1.StoreInfo.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.base.store.v1beta1.StoreInfo} msg The msg instance to transform. + * @param {!proto.cosmos.store.v1beta1.StoreInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.store.v1beta1.StoreInfo.toObject = function(includeInstance, msg) { +proto.cosmos.store.v1beta1.StoreInfo.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), - commitId: (f = msg.getCommitId()) && proto.cosmos.base.store.v1beta1.CommitID.toObject(includeInstance, f) + commitId: (f = msg.getCommitId()) && proto.cosmos.store.v1beta1.CommitID.toObject(includeInstance, f) }; if (includeInstance) { @@ -373,23 +373,23 @@ proto.cosmos.base.store.v1beta1.StoreInfo.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} + * @return {!proto.cosmos.store.v1beta1.StoreInfo} */ -proto.cosmos.base.store.v1beta1.StoreInfo.deserializeBinary = function(bytes) { +proto.cosmos.store.v1beta1.StoreInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.store.v1beta1.StoreInfo; - return proto.cosmos.base.store.v1beta1.StoreInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.store.v1beta1.StoreInfo; + return proto.cosmos.store.v1beta1.StoreInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.base.store.v1beta1.StoreInfo} msg The message object to deserialize into. + * @param {!proto.cosmos.store.v1beta1.StoreInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} + * @return {!proto.cosmos.store.v1beta1.StoreInfo} */ -proto.cosmos.base.store.v1beta1.StoreInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.store.v1beta1.StoreInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -401,8 +401,8 @@ proto.cosmos.base.store.v1beta1.StoreInfo.deserializeBinaryFromReader = function msg.setName(value); break; case 2: - var value = new proto.cosmos.base.store.v1beta1.CommitID; - reader.readMessage(value,proto.cosmos.base.store.v1beta1.CommitID.deserializeBinaryFromReader); + var value = new proto.cosmos.store.v1beta1.CommitID; + reader.readMessage(value,proto.cosmos.store.v1beta1.CommitID.deserializeBinaryFromReader); msg.setCommitId(value); break; default: @@ -418,9 +418,9 @@ proto.cosmos.base.store.v1beta1.StoreInfo.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.base.store.v1beta1.StoreInfo.prototype.serializeBinary = function() { +proto.cosmos.store.v1beta1.StoreInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.base.store.v1beta1.StoreInfo.serializeBinaryToWriter(this, writer); + proto.cosmos.store.v1beta1.StoreInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -428,11 +428,11 @@ proto.cosmos.base.store.v1beta1.StoreInfo.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.store.v1beta1.StoreInfo} message + * @param {!proto.cosmos.store.v1beta1.StoreInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.store.v1beta1.StoreInfo.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.store.v1beta1.StoreInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { @@ -446,7 +446,7 @@ proto.cosmos.base.store.v1beta1.StoreInfo.serializeBinaryToWriter = function(mes writer.writeMessage( 2, f, - proto.cosmos.base.store.v1beta1.CommitID.serializeBinaryToWriter + proto.cosmos.store.v1beta1.CommitID.serializeBinaryToWriter ); } }; @@ -456,44 +456,44 @@ proto.cosmos.base.store.v1beta1.StoreInfo.serializeBinaryToWriter = function(mes * optional string name = 1; * @return {string} */ -proto.cosmos.base.store.v1beta1.StoreInfo.prototype.getName = function() { +proto.cosmos.store.v1beta1.StoreInfo.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} returns this + * @return {!proto.cosmos.store.v1beta1.StoreInfo} returns this */ -proto.cosmos.base.store.v1beta1.StoreInfo.prototype.setName = function(value) { +proto.cosmos.store.v1beta1.StoreInfo.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional CommitID commit_id = 2; - * @return {?proto.cosmos.base.store.v1beta1.CommitID} + * @return {?proto.cosmos.store.v1beta1.CommitID} */ -proto.cosmos.base.store.v1beta1.StoreInfo.prototype.getCommitId = function() { - return /** @type{?proto.cosmos.base.store.v1beta1.CommitID} */ ( - jspb.Message.getWrapperField(this, proto.cosmos.base.store.v1beta1.CommitID, 2)); +proto.cosmos.store.v1beta1.StoreInfo.prototype.getCommitId = function() { + return /** @type{?proto.cosmos.store.v1beta1.CommitID} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.store.v1beta1.CommitID, 2)); }; /** - * @param {?proto.cosmos.base.store.v1beta1.CommitID|undefined} value - * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} returns this + * @param {?proto.cosmos.store.v1beta1.CommitID|undefined} value + * @return {!proto.cosmos.store.v1beta1.StoreInfo} returns this */ -proto.cosmos.base.store.v1beta1.StoreInfo.prototype.setCommitId = function(value) { +proto.cosmos.store.v1beta1.StoreInfo.prototype.setCommitId = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} returns this + * @return {!proto.cosmos.store.v1beta1.StoreInfo} returns this */ -proto.cosmos.base.store.v1beta1.StoreInfo.prototype.clearCommitId = function() { +proto.cosmos.store.v1beta1.StoreInfo.prototype.clearCommitId = function() { return this.setCommitId(undefined); }; @@ -502,7 +502,7 @@ proto.cosmos.base.store.v1beta1.StoreInfo.prototype.clearCommitId = function() { * Returns whether this field is set. * @return {boolean} */ -proto.cosmos.base.store.v1beta1.StoreInfo.prototype.hasCommitId = function() { +proto.cosmos.store.v1beta1.StoreInfo.prototype.hasCommitId = function() { return jspb.Message.getField(this, 2) != null; }; @@ -523,8 +523,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.cosmos.base.store.v1beta1.CommitID.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.store.v1beta1.CommitID.toObject(opt_includeInstance, this); +proto.cosmos.store.v1beta1.CommitID.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.v1beta1.CommitID.toObject(opt_includeInstance, this); }; @@ -533,11 +533,11 @@ proto.cosmos.base.store.v1beta1.CommitID.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.cosmos.base.store.v1beta1.CommitID} msg The msg instance to transform. + * @param {!proto.cosmos.store.v1beta1.CommitID} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.store.v1beta1.CommitID.toObject = function(includeInstance, msg) { +proto.cosmos.store.v1beta1.CommitID.toObject = function(includeInstance, msg) { var f, obj = { version: jspb.Message.getFieldWithDefault(msg, 1, 0), hash: msg.getHash_asB64() @@ -554,23 +554,23 @@ proto.cosmos.base.store.v1beta1.CommitID.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.store.v1beta1.CommitID} + * @return {!proto.cosmos.store.v1beta1.CommitID} */ -proto.cosmos.base.store.v1beta1.CommitID.deserializeBinary = function(bytes) { +proto.cosmos.store.v1beta1.CommitID.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.store.v1beta1.CommitID; - return proto.cosmos.base.store.v1beta1.CommitID.deserializeBinaryFromReader(msg, reader); + var msg = new proto.cosmos.store.v1beta1.CommitID; + return proto.cosmos.store.v1beta1.CommitID.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.cosmos.base.store.v1beta1.CommitID} msg The message object to deserialize into. + * @param {!proto.cosmos.store.v1beta1.CommitID} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.store.v1beta1.CommitID} + * @return {!proto.cosmos.store.v1beta1.CommitID} */ -proto.cosmos.base.store.v1beta1.CommitID.deserializeBinaryFromReader = function(msg, reader) { +proto.cosmos.store.v1beta1.CommitID.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -598,9 +598,9 @@ proto.cosmos.base.store.v1beta1.CommitID.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.cosmos.base.store.v1beta1.CommitID.prototype.serializeBinary = function() { +proto.cosmos.store.v1beta1.CommitID.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.cosmos.base.store.v1beta1.CommitID.serializeBinaryToWriter(this, writer); + proto.cosmos.store.v1beta1.CommitID.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -608,11 +608,11 @@ proto.cosmos.base.store.v1beta1.CommitID.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.store.v1beta1.CommitID} message + * @param {!proto.cosmos.store.v1beta1.CommitID} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.cosmos.base.store.v1beta1.CommitID.serializeBinaryToWriter = function(message, writer) { +proto.cosmos.store.v1beta1.CommitID.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getVersion(); if (f !== 0) { @@ -635,16 +635,16 @@ proto.cosmos.base.store.v1beta1.CommitID.serializeBinaryToWriter = function(mess * optional int64 version = 1; * @return {number} */ -proto.cosmos.base.store.v1beta1.CommitID.prototype.getVersion = function() { +proto.cosmos.store.v1beta1.CommitID.prototype.getVersion = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.cosmos.base.store.v1beta1.CommitID} returns this + * @return {!proto.cosmos.store.v1beta1.CommitID} returns this */ -proto.cosmos.base.store.v1beta1.CommitID.prototype.setVersion = function(value) { +proto.cosmos.store.v1beta1.CommitID.prototype.setVersion = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -653,7 +653,7 @@ proto.cosmos.base.store.v1beta1.CommitID.prototype.setVersion = function(value) * optional bytes hash = 2; * @return {!(string|Uint8Array)} */ -proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash = function() { +proto.cosmos.store.v1beta1.CommitID.prototype.getHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -663,7 +663,7 @@ proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash = function() { * This is a type-conversion wrapper around `getHash()` * @return {string} */ -proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash_asB64 = function() { +proto.cosmos.store.v1beta1.CommitID.prototype.getHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getHash())); }; @@ -676,7 +676,7 @@ proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash_asB64 = function() { * This is a type-conversion wrapper around `getHash()` * @return {!Uint8Array} */ -proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash_asU8 = function() { +proto.cosmos.store.v1beta1.CommitID.prototype.getHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getHash())); }; @@ -684,11 +684,11 @@ proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.store.v1beta1.CommitID} returns this + * @return {!proto.cosmos.store.v1beta1.CommitID} returns this */ -proto.cosmos.base.store.v1beta1.CommitID.prototype.setHash = function(value) { +proto.cosmos.store.v1beta1.CommitID.prototype.setHash = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; -goog.object.extend(exports, proto.cosmos.base.store.v1beta1); +goog.object.extend(exports, proto.cosmos.store.v1beta1); diff --git a/codegen/cosmos/store/v1beta1/commit_info_pb_service.d.ts b/codegen/cosmos/store/v1beta1/commit_info_pb_service.d.ts new file mode 100644 index 0000000..b7dbedc --- /dev/null +++ b/codegen/cosmos/store/v1beta1/commit_info_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: cosmos.store.v1beta1 +// file: cosmos/store/v1beta1/commit_info.proto + diff --git a/codegen/cosmos/store/v1beta1/commit_info_pb_service.js b/codegen/cosmos/store/v1beta1/commit_info_pb_service.js new file mode 100644 index 0000000..b7dbedc --- /dev/null +++ b/codegen/cosmos/store/v1beta1/commit_info_pb_service.js @@ -0,0 +1,3 @@ +// package: cosmos.store.v1beta1 +// file: cosmos/store/v1beta1/commit_info.proto + diff --git a/codegen/cosmos/store/v1beta1/listening.ts b/codegen/cosmos/store/v1beta1/listening.ts new file mode 100644 index 0000000..03910e5 --- /dev/null +++ b/codegen/cosmos/store/v1beta1/listening.ts @@ -0,0 +1,267 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/store/v1beta1/listening.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../tendermint/abci/types"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.store.v1beta1 { + export class StoreKVPair extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + store_key?: string; + delete?: boolean; + key?: Uint8Array; + value?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("store_key" in data && data.store_key != undefined) { + this.store_key = data.store_key; + } + if ("delete" in data && data.delete != undefined) { + this.delete = data.delete; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get store_key() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set store_key(value: string) { + pb_1.Message.setField(this, 1, value); + } + get delete() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set delete(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + store_key?: string; + delete?: boolean; + key?: Uint8Array; + value?: Uint8Array; + }): StoreKVPair { + const message = new StoreKVPair({}); + if (data.store_key != null) { + message.store_key = data.store_key; + } + if (data.delete != null) { + message.delete = data.delete; + } + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + store_key?: string; + delete?: boolean; + key?: Uint8Array; + value?: Uint8Array; + } = {}; + if (this.store_key != null) { + data.store_key = this.store_key; + } + if (this.delete != null) { + data.delete = this.delete; + } + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + 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.store_key.length) + writer.writeString(1, this.store_key); + if (this.delete != false) + writer.writeBool(2, this.delete); + if (this.key.length) + writer.writeBytes(3, this.key); + if (this.value.length) + writer.writeBytes(4, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StoreKVPair { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StoreKVPair(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.store_key = reader.readString(); + break; + case 2: + message.delete = reader.readBool(); + break; + case 3: + message.key = reader.readBytes(); + break; + case 4: + message.value = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): StoreKVPair { + return StoreKVPair.deserialize(bytes); + } + } + export class BlockMetadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + response_commit?: dependency_1.tendermint.abci.ResponseCommit; + request_finalize_block?: dependency_1.tendermint.abci.RequestFinalizeBlock; + response_finalize_block?: dependency_1.tendermint.abci.ResponseFinalizeBlock; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("response_commit" in data && data.response_commit != undefined) { + this.response_commit = data.response_commit; + } + if ("request_finalize_block" in data && data.request_finalize_block != undefined) { + this.request_finalize_block = data.request_finalize_block; + } + if ("response_finalize_block" in data && data.response_finalize_block != undefined) { + this.response_finalize_block = data.response_finalize_block; + } + } + } + get response_commit() { + return pb_1.Message.getWrapperField(this, dependency_1.tendermint.abci.ResponseCommit, 6) as dependency_1.tendermint.abci.ResponseCommit; + } + set response_commit(value: dependency_1.tendermint.abci.ResponseCommit) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_response_commit() { + return pb_1.Message.getField(this, 6) != null; + } + get request_finalize_block() { + return pb_1.Message.getWrapperField(this, dependency_1.tendermint.abci.RequestFinalizeBlock, 7) as dependency_1.tendermint.abci.RequestFinalizeBlock; + } + set request_finalize_block(value: dependency_1.tendermint.abci.RequestFinalizeBlock) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_request_finalize_block() { + return pb_1.Message.getField(this, 7) != null; + } + get response_finalize_block() { + return pb_1.Message.getWrapperField(this, dependency_1.tendermint.abci.ResponseFinalizeBlock, 8) as dependency_1.tendermint.abci.ResponseFinalizeBlock; + } + set response_finalize_block(value: dependency_1.tendermint.abci.ResponseFinalizeBlock) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_response_finalize_block() { + return pb_1.Message.getField(this, 8) != null; + } + static fromObject(data: { + response_commit?: ReturnType; + request_finalize_block?: ReturnType; + response_finalize_block?: ReturnType; + }): BlockMetadata { + const message = new BlockMetadata({}); + if (data.response_commit != null) { + message.response_commit = dependency_1.tendermint.abci.ResponseCommit.fromObject(data.response_commit); + } + if (data.request_finalize_block != null) { + message.request_finalize_block = dependency_1.tendermint.abci.RequestFinalizeBlock.fromObject(data.request_finalize_block); + } + if (data.response_finalize_block != null) { + message.response_finalize_block = dependency_1.tendermint.abci.ResponseFinalizeBlock.fromObject(data.response_finalize_block); + } + return message; + } + toObject() { + const data: { + response_commit?: ReturnType; + request_finalize_block?: ReturnType; + response_finalize_block?: ReturnType; + } = {}; + if (this.response_commit != null) { + data.response_commit = this.response_commit.toObject(); + } + if (this.request_finalize_block != null) { + data.request_finalize_block = this.request_finalize_block.toObject(); + } + if (this.response_finalize_block != null) { + data.response_finalize_block = this.response_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_response_commit) + writer.writeMessage(6, this.response_commit, () => this.response_commit.serialize(writer)); + if (this.has_request_finalize_block) + writer.writeMessage(7, this.request_finalize_block, () => this.request_finalize_block.serialize(writer)); + if (this.has_response_finalize_block) + writer.writeMessage(8, this.response_finalize_block, () => this.response_finalize_block.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockMetadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BlockMetadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 6: + reader.readMessage(message.response_commit, () => message.response_commit = dependency_1.tendermint.abci.ResponseCommit.deserialize(reader)); + break; + case 7: + reader.readMessage(message.request_finalize_block, () => message.request_finalize_block = dependency_1.tendermint.abci.RequestFinalizeBlock.deserialize(reader)); + break; + case 8: + reader.readMessage(message.response_finalize_block, () => message.response_finalize_block = dependency_1.tendermint.abci.ResponseFinalizeBlock.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BlockMetadata { + return BlockMetadata.deserialize(bytes); + } + } +} diff --git a/codegen/cosmos/store/v1beta1/listening_pb.d.ts b/codegen/cosmos/store/v1beta1/listening_pb.d.ts new file mode 100644 index 0000000..004af63 --- /dev/null +++ b/codegen/cosmos/store/v1beta1/listening_pb.d.ts @@ -0,0 +1,76 @@ +// package: cosmos.store.v1beta1 +// file: cosmos/store/v1beta1/listening.proto + +import * as jspb from "google-protobuf"; +import * as tendermint_abci_types_pb from "../../../tendermint/abci/types_pb"; + +export class StoreKVPair extends jspb.Message { + getStoreKey(): string; + setStoreKey(value: string): void; + + getDelete(): boolean; + setDelete(value: boolean): void; + + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StoreKVPair.AsObject; + static toObject(includeInstance: boolean, msg: StoreKVPair): StoreKVPair.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StoreKVPair, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StoreKVPair; + static deserializeBinaryFromReader(message: StoreKVPair, reader: jspb.BinaryReader): StoreKVPair; +} + +export namespace StoreKVPair { + export type AsObject = { + storeKey: string, + pb_delete: boolean, + key: Uint8Array | string, + value: Uint8Array | string, + } +} + +export class BlockMetadata extends jspb.Message { + hasResponseCommit(): boolean; + clearResponseCommit(): void; + getResponseCommit(): tendermint_abci_types_pb.ResponseCommit | undefined; + setResponseCommit(value?: tendermint_abci_types_pb.ResponseCommit): void; + + hasRequestFinalizeBlock(): boolean; + clearRequestFinalizeBlock(): void; + getRequestFinalizeBlock(): tendermint_abci_types_pb.RequestFinalizeBlock | undefined; + setRequestFinalizeBlock(value?: tendermint_abci_types_pb.RequestFinalizeBlock): void; + + hasResponseFinalizeBlock(): boolean; + clearResponseFinalizeBlock(): void; + getResponseFinalizeBlock(): tendermint_abci_types_pb.ResponseFinalizeBlock | undefined; + setResponseFinalizeBlock(value?: tendermint_abci_types_pb.ResponseFinalizeBlock): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockMetadata.AsObject; + static toObject(includeInstance: boolean, msg: BlockMetadata): BlockMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockMetadata; + static deserializeBinaryFromReader(message: BlockMetadata, reader: jspb.BinaryReader): BlockMetadata; +} + +export namespace BlockMetadata { + export type AsObject = { + responseCommit?: tendermint_abci_types_pb.ResponseCommit.AsObject, + requestFinalizeBlock?: tendermint_abci_types_pb.RequestFinalizeBlock.AsObject, + responseFinalizeBlock?: tendermint_abci_types_pb.ResponseFinalizeBlock.AsObject, + } +} + diff --git a/codegen/cosmos/store/v1beta1/listening_pb.js b/codegen/cosmos/store/v1beta1/listening_pb.js new file mode 100644 index 0000000..142dea1 --- /dev/null +++ b/codegen/cosmos/store/v1beta1/listening_pb.js @@ -0,0 +1,585 @@ +// source: cosmos/store/v1beta1/listening.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var tendermint_abci_types_pb = require('../../../tendermint/abci/types_pb.js'); +goog.object.extend(proto, tendermint_abci_types_pb); +goog.exportSymbol('proto.cosmos.store.v1beta1.BlockMetadata', null, global); +goog.exportSymbol('proto.cosmos.store.v1beta1.StoreKVPair', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.v1beta1.StoreKVPair = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.v1beta1.StoreKVPair, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.v1beta1.StoreKVPair.displayName = 'proto.cosmos.store.v1beta1.StoreKVPair'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cosmos.store.v1beta1.BlockMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.store.v1beta1.BlockMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.store.v1beta1.BlockMetadata.displayName = 'proto.cosmos.store.v1beta1.BlockMetadata'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.v1beta1.StoreKVPair.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.v1beta1.StoreKVPair} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.v1beta1.StoreKVPair.toObject = function(includeInstance, msg) { + var f, obj = { + storeKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + pb_delete: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + key: msg.getKey_asB64(), + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.v1beta1.StoreKVPair} + */ +proto.cosmos.store.v1beta1.StoreKVPair.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.v1beta1.StoreKVPair; + return proto.cosmos.store.v1beta1.StoreKVPair.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.v1beta1.StoreKVPair} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.v1beta1.StoreKVPair} + */ +proto.cosmos.store.v1beta1.StoreKVPair.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setStoreKey(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDelete(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.v1beta1.StoreKVPair.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.v1beta1.StoreKVPair} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.v1beta1.StoreKVPair.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDelete(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string store_key = 1; + * @return {string} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.getStoreKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.setStoreKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool delete = 2; + * @return {boolean} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.getDelete = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.setDelete = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes key = 3; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes key = 3; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes value = 4; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes value = 4; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.store.v1beta1.StoreKVPair} returns this + */ +proto.cosmos.store.v1beta1.StoreKVPair.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.store.v1beta1.BlockMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cosmos.store.v1beta1.BlockMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.v1beta1.BlockMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + responseCommit: (f = msg.getResponseCommit()) && tendermint_abci_types_pb.ResponseCommit.toObject(includeInstance, f), + requestFinalizeBlock: (f = msg.getRequestFinalizeBlock()) && tendermint_abci_types_pb.RequestFinalizeBlock.toObject(includeInstance, f), + responseFinalizeBlock: (f = msg.getResponseFinalizeBlock()) && tendermint_abci_types_pb.ResponseFinalizeBlock.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.store.v1beta1.BlockMetadata} + */ +proto.cosmos.store.v1beta1.BlockMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.store.v1beta1.BlockMetadata; + return proto.cosmos.store.v1beta1.BlockMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.store.v1beta1.BlockMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.store.v1beta1.BlockMetadata} + */ +proto.cosmos.store.v1beta1.BlockMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 6: + var value = new tendermint_abci_types_pb.ResponseCommit; + reader.readMessage(value,tendermint_abci_types_pb.ResponseCommit.deserializeBinaryFromReader); + msg.setResponseCommit(value); + break; + case 7: + var value = new tendermint_abci_types_pb.RequestFinalizeBlock; + reader.readMessage(value,tendermint_abci_types_pb.RequestFinalizeBlock.deserializeBinaryFromReader); + msg.setRequestFinalizeBlock(value); + break; + case 8: + var value = new tendermint_abci_types_pb.ResponseFinalizeBlock; + reader.readMessage(value,tendermint_abci_types_pb.ResponseFinalizeBlock.deserializeBinaryFromReader); + msg.setResponseFinalizeBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.store.v1beta1.BlockMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cosmos.store.v1beta1.BlockMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.store.v1beta1.BlockMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResponseCommit(); + if (f != null) { + writer.writeMessage( + 6, + f, + tendermint_abci_types_pb.ResponseCommit.serializeBinaryToWriter + ); + } + f = message.getRequestFinalizeBlock(); + if (f != null) { + writer.writeMessage( + 7, + f, + tendermint_abci_types_pb.RequestFinalizeBlock.serializeBinaryToWriter + ); + } + f = message.getResponseFinalizeBlock(); + if (f != null) { + writer.writeMessage( + 8, + f, + tendermint_abci_types_pb.ResponseFinalizeBlock.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.abci.ResponseCommit response_commit = 6; + * @return {?proto.tendermint.abci.ResponseCommit} + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.getResponseCommit = function() { + return /** @type{?proto.tendermint.abci.ResponseCommit} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseCommit, 6)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseCommit|undefined} value + * @return {!proto.cosmos.store.v1beta1.BlockMetadata} returns this +*/ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.setResponseCommit = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.v1beta1.BlockMetadata} returns this + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.clearResponseCommit = function() { + return this.setResponseCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.hasResponseCommit = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional tendermint.abci.RequestFinalizeBlock request_finalize_block = 7; + * @return {?proto.tendermint.abci.RequestFinalizeBlock} + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.getRequestFinalizeBlock = function() { + return /** @type{?proto.tendermint.abci.RequestFinalizeBlock} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.RequestFinalizeBlock, 7)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestFinalizeBlock|undefined} value + * @return {!proto.cosmos.store.v1beta1.BlockMetadata} returns this +*/ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.setRequestFinalizeBlock = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.v1beta1.BlockMetadata} returns this + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.clearRequestFinalizeBlock = function() { + return this.setRequestFinalizeBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.hasRequestFinalizeBlock = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional tendermint.abci.ResponseFinalizeBlock response_finalize_block = 8; + * @return {?proto.tendermint.abci.ResponseFinalizeBlock} + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.getResponseFinalizeBlock = function() { + return /** @type{?proto.tendermint.abci.ResponseFinalizeBlock} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseFinalizeBlock, 8)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseFinalizeBlock|undefined} value + * @return {!proto.cosmos.store.v1beta1.BlockMetadata} returns this +*/ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.setResponseFinalizeBlock = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.store.v1beta1.BlockMetadata} returns this + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.clearResponseFinalizeBlock = function() { + return this.setResponseFinalizeBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.store.v1beta1.BlockMetadata.prototype.hasResponseFinalizeBlock = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +goog.object.extend(exports, proto.cosmos.store.v1beta1); diff --git a/codegen/cosmos/store/v1beta1/listening_pb_service.d.ts b/codegen/cosmos/store/v1beta1/listening_pb_service.d.ts new file mode 100644 index 0000000..b6b7d48 --- /dev/null +++ b/codegen/cosmos/store/v1beta1/listening_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: cosmos.store.v1beta1 +// file: cosmos/store/v1beta1/listening.proto + diff --git a/codegen/cosmos/store/v1beta1/listening_pb_service.js b/codegen/cosmos/store/v1beta1/listening_pb_service.js new file mode 100644 index 0000000..b6b7d48 --- /dev/null +++ b/codegen/cosmos/store/v1beta1/listening_pb_service.js @@ -0,0 +1,3 @@ +// package: cosmos.store.v1beta1 +// file: cosmos/store/v1beta1/listening.proto + diff --git a/codegen/cosmos/tx/config/v1/config.ts b/codegen/cosmos/tx/config/v1/config.ts new file mode 100644 index 0000000..1bd6453 --- /dev/null +++ b/codegen/cosmos/tx/config/v1/config.ts @@ -0,0 +1,99 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/tx/config/v1/config.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.tx.config.v1 { + export class Config extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + skip_ante_handler?: boolean; + skip_post_handler?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("skip_ante_handler" in data && data.skip_ante_handler != undefined) { + this.skip_ante_handler = data.skip_ante_handler; + } + if ("skip_post_handler" in data && data.skip_post_handler != undefined) { + this.skip_post_handler = data.skip_post_handler; + } + } + } + get skip_ante_handler() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set skip_ante_handler(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + get skip_post_handler() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set skip_post_handler(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + skip_ante_handler?: boolean; + skip_post_handler?: boolean; + }): Config { + const message = new Config({}); + if (data.skip_ante_handler != null) { + message.skip_ante_handler = data.skip_ante_handler; + } + if (data.skip_post_handler != null) { + message.skip_post_handler = data.skip_post_handler; + } + return message; + } + toObject() { + const data: { + skip_ante_handler?: boolean; + skip_post_handler?: boolean; + } = {}; + if (this.skip_ante_handler != null) { + data.skip_ante_handler = this.skip_ante_handler; + } + if (this.skip_post_handler != null) { + data.skip_post_handler = this.skip_post_handler; + } + 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.skip_ante_handler != false) + writer.writeBool(1, this.skip_ante_handler); + if (this.skip_post_handler != false) + writer.writeBool(2, this.skip_post_handler); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Config { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Config(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.skip_ante_handler = reader.readBool(); + break; + case 2: + message.skip_post_handler = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Config { + return Config.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/tx/config/v1/config_pb.d.ts b/codegen/cosmos/tx/config/v1/config_pb.d.ts similarity index 100% rename from proto/cosmos/tx/config/v1/config_pb.d.ts rename to codegen/cosmos/tx/config/v1/config_pb.d.ts diff --git a/proto/cosmos/tx/config/v1/config_pb.js b/codegen/cosmos/tx/config/v1/config_pb.js similarity index 100% rename from proto/cosmos/tx/config/v1/config_pb.js rename to codegen/cosmos/tx/config/v1/config_pb.js diff --git a/proto/cosmos/tx/config/v1/config_pb_service.d.ts b/codegen/cosmos/tx/config/v1/config_pb_service.d.ts similarity index 100% rename from proto/cosmos/tx/config/v1/config_pb_service.d.ts rename to codegen/cosmos/tx/config/v1/config_pb_service.d.ts diff --git a/proto/cosmos/tx/config/v1/config_pb_service.js b/codegen/cosmos/tx/config/v1/config_pb_service.js similarity index 100% rename from proto/cosmos/tx/config/v1/config_pb_service.js rename to codegen/cosmos/tx/config/v1/config_pb_service.js diff --git a/codegen/cosmos/tx/signing/v1beta1/signing.ts b/codegen/cosmos/tx/signing/v1beta1/signing.ts new file mode 100644 index 0000000..5a362e5 --- /dev/null +++ b/codegen/cosmos/tx/signing/v1beta1/signing.ts @@ -0,0 +1,500 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/tx/signing/v1beta1/signing.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../crypto/multisig/v1beta1/multisig"; +import * as dependency_2 from "./../../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.tx.signing.v1beta1 { + export enum SignMode { + SIGN_MODE_UNSPECIFIED = 0, + SIGN_MODE_DIRECT = 1, + SIGN_MODE_TEXTUAL = 2, + SIGN_MODE_DIRECT_AUX = 3, + SIGN_MODE_LEGACY_AMINO_JSON = 127, + SIGN_MODE_EIP_191 = 191 + } + export class SignatureDescriptors extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signatures?: SignatureDescriptor[]; + }) { + 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 ("signatures" in data && data.signatures != undefined) { + this.signatures = data.signatures; + } + } + } + get signatures() { + return pb_1.Message.getRepeatedWrapperField(this, SignatureDescriptor, 1) as SignatureDescriptor[]; + } + set signatures(value: SignatureDescriptor[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + signatures?: ReturnType[]; + }): SignatureDescriptors { + const message = new SignatureDescriptors({}); + if (data.signatures != null) { + message.signatures = data.signatures.map(item => SignatureDescriptor.fromObject(item)); + } + return message; + } + toObject() { + const data: { + signatures?: ReturnType[]; + } = {}; + if (this.signatures != null) { + data.signatures = this.signatures.map((item: SignatureDescriptor) => item.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.signatures.length) + writer.writeRepeatedMessage(1, this.signatures, (item: SignatureDescriptor) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignatureDescriptors { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignatureDescriptors(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signatures, () => pb_1.Message.addToRepeatedWrapperField(message, 1, SignatureDescriptor.deserialize(reader), SignatureDescriptor)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignatureDescriptors { + return SignatureDescriptors.deserialize(bytes); + } + } + export class SignatureDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + public_key?: dependency_2.google.protobuf.Any; + data?: SignatureDescriptor.Data; + sequence?: 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 ("public_key" in data && data.public_key != undefined) { + this.public_key = data.public_key; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get public_key() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 1) as dependency_2.google.protobuf.Any; + } + set public_key(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_public_key() { + return pb_1.Message.getField(this, 1) != null; + } + get data() { + return pb_1.Message.getWrapperField(this, SignatureDescriptor.Data, 2) as SignatureDescriptor.Data; + } + set data(value: SignatureDescriptor.Data) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_data() { + return pb_1.Message.getField(this, 2) != null; + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + public_key?: ReturnType; + data?: ReturnType; + sequence?: number; + }): SignatureDescriptor { + const message = new SignatureDescriptor({}); + if (data.public_key != null) { + message.public_key = dependency_2.google.protobuf.Any.fromObject(data.public_key); + } + if (data.data != null) { + message.data = SignatureDescriptor.Data.fromObject(data.data); + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + public_key?: ReturnType; + data?: ReturnType; + sequence?: number; + } = {}; + if (this.public_key != null) { + data.public_key = this.public_key.toObject(); + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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_public_key) + writer.writeMessage(1, this.public_key, () => this.public_key.serialize(writer)); + if (this.has_data) + writer.writeMessage(2, this.data, () => this.data.serialize(writer)); + if (this.sequence != 0) + writer.writeUint64(3, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignatureDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignatureDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.public_key, () => message.public_key = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + case 2: + reader.readMessage(message.data, () => message.data = SignatureDescriptor.Data.deserialize(reader)); + break; + case 3: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignatureDescriptor { + return SignatureDescriptor.deserialize(bytes); + } + } + export namespace SignatureDescriptor { + export class Data extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2]]; + constructor(data?: any[] | ({} & (({ + single?: SignatureDescriptor.Data.Single; + multi?: never; + } | { + single?: never; + multi?: SignatureDescriptor.Data.Multi; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("single" in data && data.single != undefined) { + this.single = data.single; + } + if ("multi" in data && data.multi != undefined) { + this.multi = data.multi; + } + } + } + get single() { + return pb_1.Message.getWrapperField(this, SignatureDescriptor.Data.Single, 1) as SignatureDescriptor.Data.Single; + } + set single(value: SignatureDescriptor.Data.Single) { + pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); + } + get has_single() { + return pb_1.Message.getField(this, 1) != null; + } + get multi() { + return pb_1.Message.getWrapperField(this, SignatureDescriptor.Data.Multi, 2) as SignatureDescriptor.Data.Multi; + } + set multi(value: SignatureDescriptor.Data.Multi) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_multi() { + return pb_1.Message.getField(this, 2) != null; + } + get sum() { + const cases: { + [index: number]: "none" | "single" | "multi"; + } = { + 0: "none", + 1: "single", + 2: "multi" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2])]; + } + static fromObject(data: { + single?: ReturnType; + multi?: ReturnType; + }): Data { + const message = new Data({}); + if (data.single != null) { + message.single = SignatureDescriptor.Data.Single.fromObject(data.single); + } + if (data.multi != null) { + message.multi = SignatureDescriptor.Data.Multi.fromObject(data.multi); + } + return message; + } + toObject() { + const data: { + single?: ReturnType; + multi?: ReturnType; + } = {}; + if (this.single != null) { + data.single = this.single.toObject(); + } + if (this.multi != null) { + data.multi = this.multi.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_single) + writer.writeMessage(1, this.single, () => this.single.serialize(writer)); + if (this.has_multi) + writer.writeMessage(2, this.multi, () => this.multi.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Data { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Data(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.single, () => message.single = SignatureDescriptor.Data.Single.deserialize(reader)); + break; + case 2: + reader.readMessage(message.multi, () => message.multi = SignatureDescriptor.Data.Multi.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Data { + return Data.deserialize(bytes); + } + } + export namespace Data { + export class Single extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + mode?: SignMode; + signature?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("mode" in data && data.mode != undefined) { + this.mode = data.mode; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + } + } + get mode() { + return pb_1.Message.getFieldWithDefault(this, 1, SignMode.SIGN_MODE_UNSPECIFIED) as SignMode; + } + set mode(value: SignMode) { + pb_1.Message.setField(this, 1, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + mode?: SignMode; + signature?: Uint8Array; + }): Single { + const message = new Single({}); + if (data.mode != null) { + message.mode = data.mode; + } + if (data.signature != null) { + message.signature = data.signature; + } + return message; + } + toObject() { + const data: { + mode?: SignMode; + signature?: Uint8Array; + } = {}; + if (this.mode != null) { + data.mode = this.mode; + } + if (this.signature != null) { + data.signature = this.signature; + } + 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.mode != SignMode.SIGN_MODE_UNSPECIFIED) + writer.writeEnum(1, this.mode); + if (this.signature.length) + writer.writeBytes(2, this.signature); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Single { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Single(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.mode = reader.readEnum(); + break; + case 2: + message.signature = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Single { + return Single.deserialize(bytes); + } + } + export class Multi extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + bitarray?: dependency_1.cosmos.crypto.multisig.v1beta1.CompactBitArray; + signatures?: SignatureDescriptor.Data[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("bitarray" in data && data.bitarray != undefined) { + this.bitarray = data.bitarray; + } + if ("signatures" in data && data.signatures != undefined) { + this.signatures = data.signatures; + } + } + } + get bitarray() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.crypto.multisig.v1beta1.CompactBitArray, 1) as dependency_1.cosmos.crypto.multisig.v1beta1.CompactBitArray; + } + set bitarray(value: dependency_1.cosmos.crypto.multisig.v1beta1.CompactBitArray) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_bitarray() { + return pb_1.Message.getField(this, 1) != null; + } + get signatures() { + return pb_1.Message.getRepeatedWrapperField(this, SignatureDescriptor.Data, 2) as SignatureDescriptor.Data[]; + } + set signatures(value: SignatureDescriptor.Data[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + bitarray?: ReturnType; + signatures?: ReturnType[]; + }): Multi { + const message = new Multi({}); + if (data.bitarray != null) { + message.bitarray = dependency_1.cosmos.crypto.multisig.v1beta1.CompactBitArray.fromObject(data.bitarray); + } + if (data.signatures != null) { + message.signatures = data.signatures.map(item => SignatureDescriptor.Data.fromObject(item)); + } + return message; + } + toObject() { + const data: { + bitarray?: ReturnType; + signatures?: ReturnType[]; + } = {}; + if (this.bitarray != null) { + data.bitarray = this.bitarray.toObject(); + } + if (this.signatures != null) { + data.signatures = this.signatures.map((item: SignatureDescriptor.Data) => item.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_bitarray) + writer.writeMessage(1, this.bitarray, () => this.bitarray.serialize(writer)); + if (this.signatures.length) + writer.writeRepeatedMessage(2, this.signatures, (item: SignatureDescriptor.Data) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Multi { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Multi(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.bitarray, () => message.bitarray = dependency_1.cosmos.crypto.multisig.v1beta1.CompactBitArray.deserialize(reader)); + break; + case 2: + reader.readMessage(message.signatures, () => pb_1.Message.addToRepeatedWrapperField(message, 2, SignatureDescriptor.Data.deserialize(reader), SignatureDescriptor.Data)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Multi { + return Multi.deserialize(bytes); + } + } + } + } +} diff --git a/proto/cosmos/tx/signing/v1beta1/signing_pb.d.ts b/codegen/cosmos/tx/signing/v1beta1/signing_pb.d.ts similarity index 100% rename from proto/cosmos/tx/signing/v1beta1/signing_pb.d.ts rename to codegen/cosmos/tx/signing/v1beta1/signing_pb.d.ts diff --git a/proto/cosmos/tx/signing/v1beta1/signing_pb.js b/codegen/cosmos/tx/signing/v1beta1/signing_pb.js similarity index 100% rename from proto/cosmos/tx/signing/v1beta1/signing_pb.js rename to codegen/cosmos/tx/signing/v1beta1/signing_pb.js diff --git a/proto/cosmos/tx/signing/v1beta1/signing_pb_service.d.ts b/codegen/cosmos/tx/signing/v1beta1/signing_pb_service.d.ts similarity index 100% rename from proto/cosmos/tx/signing/v1beta1/signing_pb_service.d.ts rename to codegen/cosmos/tx/signing/v1beta1/signing_pb_service.d.ts diff --git a/proto/cosmos/tx/signing/v1beta1/signing_pb_service.js b/codegen/cosmos/tx/signing/v1beta1/signing_pb_service.js similarity index 100% rename from proto/cosmos/tx/signing/v1beta1/signing_pb_service.js rename to codegen/cosmos/tx/signing/v1beta1/signing_pb_service.js diff --git a/codegen/cosmos/tx/v1beta1/service.ts b/codegen/cosmos/tx/v1beta1/service.ts new file mode 100644 index 0000000..236c731 --- /dev/null +++ b/codegen/cosmos/tx/v1beta1/service.ts @@ -0,0 +1,1809 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/tx/v1beta1/service.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/api/annotations"; +import * as dependency_2 from "./../../base/abci/v1beta1/abci"; +import * as dependency_3 from "./tx"; +import * as dependency_4 from "./../../base/query/v1beta1/pagination"; +import * as dependency_5 from "./../../../tendermint/types/block"; +import * as dependency_6 from "./../../../tendermint/types/types"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.tx.v1beta1 { + export enum OrderBy { + ORDER_BY_UNSPECIFIED = 0, + ORDER_BY_ASC = 1, + ORDER_BY_DESC = 2 + } + export enum BroadcastMode { + BROADCAST_MODE_UNSPECIFIED = 0, + /** @deprecated*/ + BROADCAST_MODE_BLOCK = 1, + BROADCAST_MODE_SYNC = 2, + BROADCAST_MODE_ASYNC = 3 + } + export class GetTxsEventRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + /** @deprecated*/ + events?: string[]; + /** @deprecated*/ + pagination?: dependency_4.cosmos.base.query.v1beta1.PageRequest; + order_by?: OrderBy; + page?: number; + limit?: number; + query?: string; + }) { + 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 ("events" in data && data.events != undefined) { + this.events = data.events; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("order_by" in data && data.order_by != undefined) { + this.order_by = data.order_by; + } + if ("page" in data && data.page != undefined) { + this.page = data.page; + } + if ("limit" in data && data.limit != undefined) { + this.limit = data.limit; + } + if ("query" in data && data.query != undefined) { + this.query = data.query; + } + } + } + /** @deprecated*/ + get events() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + /** @deprecated*/ + set events(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + /** @deprecated*/ + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + /** @deprecated*/ + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + /** @deprecated*/ + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + get order_by() { + return pb_1.Message.getFieldWithDefault(this, 3, OrderBy.ORDER_BY_UNSPECIFIED) as OrderBy; + } + set order_by(value: OrderBy) { + pb_1.Message.setField(this, 3, value); + } + get page() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set page(value: number) { + pb_1.Message.setField(this, 4, value); + } + get limit() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set limit(value: number) { + pb_1.Message.setField(this, 5, value); + } + get query() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set query(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + events?: string[]; + pagination?: ReturnType; + order_by?: OrderBy; + page?: number; + limit?: number; + query?: string; + }): GetTxsEventRequest { + const message = new GetTxsEventRequest({}); + if (data.events != null) { + message.events = data.events; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + if (data.order_by != null) { + message.order_by = data.order_by; + } + if (data.page != null) { + message.page = data.page; + } + if (data.limit != null) { + message.limit = data.limit; + } + if (data.query != null) { + message.query = data.query; + } + return message; + } + toObject() { + const data: { + events?: string[]; + pagination?: ReturnType; + order_by?: OrderBy; + page?: number; + limit?: number; + query?: string; + } = {}; + if (this.events != null) { + data.events = this.events; + } + if (this.pagination != null) { + data.pagination = this.pagination.toObject(); + } + if (this.order_by != null) { + data.order_by = this.order_by; + } + if (this.page != null) { + data.page = this.page; + } + if (this.limit != null) { + data.limit = this.limit; + } + if (this.query != null) { + data.query = this.query; + } + 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.events.length) + writer.writeRepeatedString(1, this.events); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (this.order_by != OrderBy.ORDER_BY_UNSPECIFIED) + writer.writeEnum(3, this.order_by); + if (this.page != 0) + writer.writeUint64(4, this.page); + if (this.limit != 0) + writer.writeUint64(5, this.limit); + if (this.query.length) + writer.writeString(6, this.query); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTxsEventRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTxsEventRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + case 3: + message.order_by = reader.readEnum(); + break; + case 4: + message.page = reader.readUint64(); + break; + case 5: + message.limit = reader.readUint64(); + break; + case 6: + message.query = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetTxsEventRequest { + return GetTxsEventRequest.deserialize(bytes); + } + } + export class GetTxsEventResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + txs?: dependency_3.cosmos.tx.v1beta1.Tx[]; + tx_responses?: dependency_2.cosmos.base.abci.v1beta1.TxResponse[]; + /** @deprecated*/ + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + total?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("txs" in data && data.txs != undefined) { + this.txs = data.txs; + } + if ("tx_responses" in data && data.tx_responses != undefined) { + this.tx_responses = data.tx_responses; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("total" in data && data.total != undefined) { + this.total = data.total; + } + } + } + get txs() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.tx.v1beta1.Tx, 1) as dependency_3.cosmos.tx.v1beta1.Tx[]; + } + set txs(value: dependency_3.cosmos.tx.v1beta1.Tx[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get tx_responses() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.abci.v1beta1.TxResponse, 2) as dependency_2.cosmos.base.abci.v1beta1.TxResponse[]; + } + set tx_responses(value: dependency_2.cosmos.base.abci.v1beta1.TxResponse[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + /** @deprecated*/ + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 3) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + /** @deprecated*/ + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 3, value); + } + /** @deprecated*/ + get has_pagination() { + return pb_1.Message.getField(this, 3) != null; + } + get total() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set total(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + txs?: ReturnType[]; + tx_responses?: ReturnType[]; + pagination?: ReturnType; + total?: number; + }): GetTxsEventResponse { + const message = new GetTxsEventResponse({}); + if (data.txs != null) { + message.txs = data.txs.map(item => dependency_3.cosmos.tx.v1beta1.Tx.fromObject(item)); + } + if (data.tx_responses != null) { + message.tx_responses = data.tx_responses.map(item => dependency_2.cosmos.base.abci.v1beta1.TxResponse.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + if (data.total != null) { + message.total = data.total; + } + return message; + } + toObject() { + const data: { + txs?: ReturnType[]; + tx_responses?: ReturnType[]; + pagination?: ReturnType; + total?: number; + } = {}; + if (this.txs != null) { + data.txs = this.txs.map((item: dependency_3.cosmos.tx.v1beta1.Tx) => item.toObject()); + } + if (this.tx_responses != null) { + data.tx_responses = this.tx_responses.map((item: dependency_2.cosmos.base.abci.v1beta1.TxResponse) => item.toObject()); + } + if (this.pagination != null) { + data.pagination = this.pagination.toObject(); + } + if (this.total != null) { + data.total = this.total; + } + 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.txs.length) + writer.writeRepeatedMessage(1, this.txs, (item: dependency_3.cosmos.tx.v1beta1.Tx) => item.serialize(writer)); + if (this.tx_responses.length) + writer.writeRepeatedMessage(2, this.tx_responses, (item: dependency_2.cosmos.base.abci.v1beta1.TxResponse) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer)); + if (this.total != 0) + writer.writeUint64(4, this.total); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTxsEventResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTxsEventResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.txs, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.tx.v1beta1.Tx.deserialize(reader), dependency_3.cosmos.tx.v1beta1.Tx)); + break; + case 2: + reader.readMessage(message.tx_responses, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.cosmos.base.abci.v1beta1.TxResponse.deserialize(reader), dependency_2.cosmos.base.abci.v1beta1.TxResponse)); + break; + case 3: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + case 4: + message.total = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetTxsEventResponse { + return GetTxsEventResponse.deserialize(bytes); + } + } + export class BroadcastTxRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx_bytes?: Uint8Array; + mode?: BroadcastMode; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx_bytes" in data && data.tx_bytes != undefined) { + this.tx_bytes = data.tx_bytes; + } + if ("mode" in data && data.mode != undefined) { + this.mode = data.mode; + } + } + } + get tx_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set tx_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get mode() { + return pb_1.Message.getFieldWithDefault(this, 2, BroadcastMode.BROADCAST_MODE_UNSPECIFIED) as BroadcastMode; + } + set mode(value: BroadcastMode) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tx_bytes?: Uint8Array; + mode?: BroadcastMode; + }): BroadcastTxRequest { + const message = new BroadcastTxRequest({}); + if (data.tx_bytes != null) { + message.tx_bytes = data.tx_bytes; + } + if (data.mode != null) { + message.mode = data.mode; + } + return message; + } + toObject() { + const data: { + tx_bytes?: Uint8Array; + mode?: BroadcastMode; + } = {}; + if (this.tx_bytes != null) { + data.tx_bytes = this.tx_bytes; + } + if (this.mode != null) { + data.mode = this.mode; + } + 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.tx_bytes.length) + writer.writeBytes(1, this.tx_bytes); + if (this.mode != BroadcastMode.BROADCAST_MODE_UNSPECIFIED) + writer.writeEnum(2, this.mode); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BroadcastTxRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BroadcastTxRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tx_bytes = reader.readBytes(); + break; + case 2: + message.mode = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BroadcastTxRequest { + return BroadcastTxRequest.deserialize(bytes); + } + } + export class BroadcastTxResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx_response?: dependency_2.cosmos.base.abci.v1beta1.TxResponse; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx_response" in data && data.tx_response != undefined) { + this.tx_response = data.tx_response; + } + } + } + get tx_response() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.abci.v1beta1.TxResponse, 1) as dependency_2.cosmos.base.abci.v1beta1.TxResponse; + } + set tx_response(value: dependency_2.cosmos.base.abci.v1beta1.TxResponse) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tx_response() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + tx_response?: ReturnType; + }): BroadcastTxResponse { + const message = new BroadcastTxResponse({}); + if (data.tx_response != null) { + message.tx_response = dependency_2.cosmos.base.abci.v1beta1.TxResponse.fromObject(data.tx_response); + } + return message; + } + toObject() { + const data: { + tx_response?: ReturnType; + } = {}; + if (this.tx_response != null) { + data.tx_response = this.tx_response.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_tx_response) + writer.writeMessage(1, this.tx_response, () => this.tx_response.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BroadcastTxResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BroadcastTxResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tx_response, () => message.tx_response = dependency_2.cosmos.base.abci.v1beta1.TxResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BroadcastTxResponse { + return BroadcastTxResponse.deserialize(bytes); + } + } + export class SimulateRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + /** @deprecated*/ + tx?: dependency_3.cosmos.tx.v1beta1.Tx; + tx_bytes?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + if ("tx_bytes" in data && data.tx_bytes != undefined) { + this.tx_bytes = data.tx_bytes; + } + } + } + /** @deprecated*/ + get tx() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.tx.v1beta1.Tx, 1) as dependency_3.cosmos.tx.v1beta1.Tx; + } + /** @deprecated*/ + set tx(value: dependency_3.cosmos.tx.v1beta1.Tx) { + pb_1.Message.setWrapperField(this, 1, value); + } + /** @deprecated*/ + get has_tx() { + return pb_1.Message.getField(this, 1) != null; + } + get tx_bytes() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set tx_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tx?: ReturnType; + tx_bytes?: Uint8Array; + }): SimulateRequest { + const message = new SimulateRequest({}); + if (data.tx != null) { + message.tx = dependency_3.cosmos.tx.v1beta1.Tx.fromObject(data.tx); + } + if (data.tx_bytes != null) { + message.tx_bytes = data.tx_bytes; + } + return message; + } + toObject() { + const data: { + tx?: ReturnType; + tx_bytes?: Uint8Array; + } = {}; + if (this.tx != null) { + data.tx = this.tx.toObject(); + } + if (this.tx_bytes != null) { + data.tx_bytes = this.tx_bytes; + } + 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_tx) + writer.writeMessage(1, this.tx, () => this.tx.serialize(writer)); + if (this.tx_bytes.length) + writer.writeBytes(2, this.tx_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SimulateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SimulateRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tx, () => message.tx = dependency_3.cosmos.tx.v1beta1.Tx.deserialize(reader)); + break; + case 2: + message.tx_bytes = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SimulateRequest { + return SimulateRequest.deserialize(bytes); + } + } + export class SimulateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + gas_info?: dependency_2.cosmos.base.abci.v1beta1.GasInfo; + result?: dependency_2.cosmos.base.abci.v1beta1.Result; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("gas_info" in data && data.gas_info != undefined) { + this.gas_info = data.gas_info; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get gas_info() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.abci.v1beta1.GasInfo, 1) as dependency_2.cosmos.base.abci.v1beta1.GasInfo; + } + set gas_info(value: dependency_2.cosmos.base.abci.v1beta1.GasInfo) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_gas_info() { + return pb_1.Message.getField(this, 1) != null; + } + get result() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.abci.v1beta1.Result, 2) as dependency_2.cosmos.base.abci.v1beta1.Result; + } + set result(value: dependency_2.cosmos.base.abci.v1beta1.Result) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_result() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + gas_info?: ReturnType; + result?: ReturnType; + }): SimulateResponse { + const message = new SimulateResponse({}); + if (data.gas_info != null) { + message.gas_info = dependency_2.cosmos.base.abci.v1beta1.GasInfo.fromObject(data.gas_info); + } + if (data.result != null) { + message.result = dependency_2.cosmos.base.abci.v1beta1.Result.fromObject(data.result); + } + return message; + } + toObject() { + const data: { + gas_info?: ReturnType; + result?: ReturnType; + } = {}; + if (this.gas_info != null) { + data.gas_info = this.gas_info.toObject(); + } + if (this.result != null) { + data.result = this.result.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_gas_info) + writer.writeMessage(1, this.gas_info, () => this.gas_info.serialize(writer)); + if (this.has_result) + writer.writeMessage(2, this.result, () => this.result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SimulateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SimulateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.gas_info, () => message.gas_info = dependency_2.cosmos.base.abci.v1beta1.GasInfo.deserialize(reader)); + break; + case 2: + reader.readMessage(message.result, () => message.result = dependency_2.cosmos.base.abci.v1beta1.Result.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SimulateResponse { + return SimulateResponse.deserialize(bytes); + } + } + export class GetTxRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: 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 ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set hash(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + hash?: string; + }): GetTxRequest { + const message = new GetTxRequest({}); + if (data.hash != null) { + message.hash = data.hash; + } + return message; + } + toObject() { + const data: { + hash?: string; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + 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.hash.length) + writer.writeString(1, this.hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTxRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTxRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hash = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetTxRequest { + return GetTxRequest.deserialize(bytes); + } + } + export class GetTxResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx?: dependency_3.cosmos.tx.v1beta1.Tx; + tx_response?: dependency_2.cosmos.base.abci.v1beta1.TxResponse; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + if ("tx_response" in data && data.tx_response != undefined) { + this.tx_response = data.tx_response; + } + } + } + get tx() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.tx.v1beta1.Tx, 1) as dependency_3.cosmos.tx.v1beta1.Tx; + } + set tx(value: dependency_3.cosmos.tx.v1beta1.Tx) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tx() { + return pb_1.Message.getField(this, 1) != null; + } + get tx_response() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.abci.v1beta1.TxResponse, 2) as dependency_2.cosmos.base.abci.v1beta1.TxResponse; + } + set tx_response(value: dependency_2.cosmos.base.abci.v1beta1.TxResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_tx_response() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + tx?: ReturnType; + tx_response?: ReturnType; + }): GetTxResponse { + const message = new GetTxResponse({}); + if (data.tx != null) { + message.tx = dependency_3.cosmos.tx.v1beta1.Tx.fromObject(data.tx); + } + if (data.tx_response != null) { + message.tx_response = dependency_2.cosmos.base.abci.v1beta1.TxResponse.fromObject(data.tx_response); + } + return message; + } + toObject() { + const data: { + tx?: ReturnType; + tx_response?: ReturnType; + } = {}; + if (this.tx != null) { + data.tx = this.tx.toObject(); + } + if (this.tx_response != null) { + data.tx_response = this.tx_response.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_tx) + writer.writeMessage(1, this.tx, () => this.tx.serialize(writer)); + if (this.has_tx_response) + writer.writeMessage(2, this.tx_response, () => this.tx_response.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTxResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTxResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tx, () => message.tx = dependency_3.cosmos.tx.v1beta1.Tx.deserialize(reader)); + break; + case 2: + reader.readMessage(message.tx_response, () => message.tx_response = dependency_2.cosmos.base.abci.v1beta1.TxResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetTxResponse { + return GetTxResponse.deserialize(bytes); + } + } + export class GetBlockWithTxsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + pagination?: dependency_4.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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + height?: number; + pagination?: ReturnType; + }): GetBlockWithTxsRequest { + const message = new GetBlockWithTxsRequest({}); + if (data.height != null) { + message.height = data.height; + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + height?: number; + pagination?: ReturnType; + } = {}; + if (this.height != null) { + data.height = this.height; + } + 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.height != 0) + writer.writeInt64(1, this.height); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockWithTxsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBlockWithTxsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetBlockWithTxsRequest { + return GetBlockWithTxsRequest.deserialize(bytes); + } + } + export class GetBlockWithTxsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + txs?: dependency_3.cosmos.tx.v1beta1.Tx[]; + block_id?: dependency_6.tendermint.types.BlockID; + block?: dependency_5.tendermint.types.Block; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("txs" in data && data.txs != undefined) { + this.txs = data.txs; + } + if ("block_id" in data && data.block_id != undefined) { + this.block_id = data.block_id; + } + if ("block" in data && data.block != undefined) { + this.block = data.block; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get txs() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.tx.v1beta1.Tx, 1) as dependency_3.cosmos.tx.v1beta1.Tx[]; + } + set txs(value: dependency_3.cosmos.tx.v1beta1.Tx[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get block_id() { + return pb_1.Message.getWrapperField(this, dependency_6.tendermint.types.BlockID, 2) as dependency_6.tendermint.types.BlockID; + } + set block_id(value: dependency_6.tendermint.types.BlockID) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_block_id() { + return pb_1.Message.getField(this, 2) != null; + } + get block() { + return pb_1.Message.getWrapperField(this, dependency_5.tendermint.types.Block, 3) as dependency_5.tendermint.types.Block; + } + set block(value: dependency_5.tendermint.types.Block) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_block() { + return pb_1.Message.getField(this, 3) != null; + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 4) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + txs?: ReturnType[]; + block_id?: ReturnType; + block?: ReturnType; + pagination?: ReturnType; + }): GetBlockWithTxsResponse { + const message = new GetBlockWithTxsResponse({}); + if (data.txs != null) { + message.txs = data.txs.map(item => dependency_3.cosmos.tx.v1beta1.Tx.fromObject(item)); + } + if (data.block_id != null) { + message.block_id = dependency_6.tendermint.types.BlockID.fromObject(data.block_id); + } + if (data.block != null) { + message.block = dependency_5.tendermint.types.Block.fromObject(data.block); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + txs?: ReturnType[]; + block_id?: ReturnType; + block?: ReturnType; + pagination?: ReturnType; + } = {}; + if (this.txs != null) { + data.txs = this.txs.map((item: dependency_3.cosmos.tx.v1beta1.Tx) => item.toObject()); + } + if (this.block_id != null) { + data.block_id = this.block_id.toObject(); + } + if (this.block != null) { + data.block = this.block.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.txs.length) + writer.writeRepeatedMessage(1, this.txs, (item: dependency_3.cosmos.tx.v1beta1.Tx) => item.serialize(writer)); + if (this.has_block_id) + writer.writeMessage(2, this.block_id, () => this.block_id.serialize(writer)); + if (this.has_block) + writer.writeMessage(3, this.block, () => this.block.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(4, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockWithTxsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBlockWithTxsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.txs, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.tx.v1beta1.Tx.deserialize(reader), dependency_3.cosmos.tx.v1beta1.Tx)); + break; + case 2: + reader.readMessage(message.block_id, () => message.block_id = dependency_6.tendermint.types.BlockID.deserialize(reader)); + break; + case 3: + reader.readMessage(message.block, () => message.block = dependency_5.tendermint.types.Block.deserialize(reader)); + break; + case 4: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetBlockWithTxsResponse { + return GetBlockWithTxsResponse.deserialize(bytes); + } + } + export class TxDecodeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx_bytes?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx_bytes" in data && data.tx_bytes != undefined) { + this.tx_bytes = data.tx_bytes; + } + } + } + get tx_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set tx_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + tx_bytes?: Uint8Array; + }): TxDecodeRequest { + const message = new TxDecodeRequest({}); + if (data.tx_bytes != null) { + message.tx_bytes = data.tx_bytes; + } + return message; + } + toObject() { + const data: { + tx_bytes?: Uint8Array; + } = {}; + if (this.tx_bytes != null) { + data.tx_bytes = this.tx_bytes; + } + 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.tx_bytes.length) + writer.writeBytes(1, this.tx_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxDecodeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxDecodeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tx_bytes = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxDecodeRequest { + return TxDecodeRequest.deserialize(bytes); + } + } + export class TxDecodeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx?: dependency_3.cosmos.tx.v1beta1.Tx; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + } + } + get tx() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.tx.v1beta1.Tx, 1) as dependency_3.cosmos.tx.v1beta1.Tx; + } + set tx(value: dependency_3.cosmos.tx.v1beta1.Tx) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tx() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + tx?: ReturnType; + }): TxDecodeResponse { + const message = new TxDecodeResponse({}); + if (data.tx != null) { + message.tx = dependency_3.cosmos.tx.v1beta1.Tx.fromObject(data.tx); + } + return message; + } + toObject() { + const data: { + tx?: ReturnType; + } = {}; + if (this.tx != null) { + data.tx = this.tx.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_tx) + writer.writeMessage(1, this.tx, () => this.tx.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxDecodeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxDecodeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tx, () => message.tx = dependency_3.cosmos.tx.v1beta1.Tx.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxDecodeResponse { + return TxDecodeResponse.deserialize(bytes); + } + } + export class TxEncodeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx?: dependency_3.cosmos.tx.v1beta1.Tx; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + } + } + get tx() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.tx.v1beta1.Tx, 1) as dependency_3.cosmos.tx.v1beta1.Tx; + } + set tx(value: dependency_3.cosmos.tx.v1beta1.Tx) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_tx() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + tx?: ReturnType; + }): TxEncodeRequest { + const message = new TxEncodeRequest({}); + if (data.tx != null) { + message.tx = dependency_3.cosmos.tx.v1beta1.Tx.fromObject(data.tx); + } + return message; + } + toObject() { + const data: { + tx?: ReturnType; + } = {}; + if (this.tx != null) { + data.tx = this.tx.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_tx) + writer.writeMessage(1, this.tx, () => this.tx.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxEncodeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxEncodeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.tx, () => message.tx = dependency_3.cosmos.tx.v1beta1.Tx.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxEncodeRequest { + return TxEncodeRequest.deserialize(bytes); + } + } + export class TxEncodeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx_bytes?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx_bytes" in data && data.tx_bytes != undefined) { + this.tx_bytes = data.tx_bytes; + } + } + } + get tx_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set tx_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + tx_bytes?: Uint8Array; + }): TxEncodeResponse { + const message = new TxEncodeResponse({}); + if (data.tx_bytes != null) { + message.tx_bytes = data.tx_bytes; + } + return message; + } + toObject() { + const data: { + tx_bytes?: Uint8Array; + } = {}; + if (this.tx_bytes != null) { + data.tx_bytes = this.tx_bytes; + } + 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.tx_bytes.length) + writer.writeBytes(1, this.tx_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxEncodeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxEncodeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tx_bytes = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxEncodeResponse { + return TxEncodeResponse.deserialize(bytes); + } + } + export class TxEncodeAminoRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amino_json?: 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 ("amino_json" in data && data.amino_json != undefined) { + this.amino_json = data.amino_json; + } + } + } + get amino_json() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set amino_json(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + amino_json?: string; + }): TxEncodeAminoRequest { + const message = new TxEncodeAminoRequest({}); + if (data.amino_json != null) { + message.amino_json = data.amino_json; + } + return message; + } + toObject() { + const data: { + amino_json?: string; + } = {}; + if (this.amino_json != null) { + data.amino_json = this.amino_json; + } + 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.amino_json.length) + writer.writeString(1, this.amino_json); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxEncodeAminoRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxEncodeAminoRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.amino_json = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxEncodeAminoRequest { + return TxEncodeAminoRequest.deserialize(bytes); + } + } + export class TxEncodeAminoResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amino_binary?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("amino_binary" in data && data.amino_binary != undefined) { + this.amino_binary = data.amino_binary; + } + } + } + get amino_binary() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set amino_binary(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + amino_binary?: Uint8Array; + }): TxEncodeAminoResponse { + const message = new TxEncodeAminoResponse({}); + if (data.amino_binary != null) { + message.amino_binary = data.amino_binary; + } + return message; + } + toObject() { + const data: { + amino_binary?: Uint8Array; + } = {}; + if (this.amino_binary != null) { + data.amino_binary = this.amino_binary; + } + 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.amino_binary.length) + writer.writeBytes(1, this.amino_binary); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxEncodeAminoResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxEncodeAminoResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.amino_binary = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxEncodeAminoResponse { + return TxEncodeAminoResponse.deserialize(bytes); + } + } + export class TxDecodeAminoRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amino_binary?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("amino_binary" in data && data.amino_binary != undefined) { + this.amino_binary = data.amino_binary; + } + } + } + get amino_binary() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set amino_binary(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + amino_binary?: Uint8Array; + }): TxDecodeAminoRequest { + const message = new TxDecodeAminoRequest({}); + if (data.amino_binary != null) { + message.amino_binary = data.amino_binary; + } + return message; + } + toObject() { + const data: { + amino_binary?: Uint8Array; + } = {}; + if (this.amino_binary != null) { + data.amino_binary = this.amino_binary; + } + 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.amino_binary.length) + writer.writeBytes(1, this.amino_binary); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxDecodeAminoRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxDecodeAminoRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.amino_binary = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxDecodeAminoRequest { + return TxDecodeAminoRequest.deserialize(bytes); + } + } + export class TxDecodeAminoResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amino_json?: 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 ("amino_json" in data && data.amino_json != undefined) { + this.amino_json = data.amino_json; + } + } + } + get amino_json() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set amino_json(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + amino_json?: string; + }): TxDecodeAminoResponse { + const message = new TxDecodeAminoResponse({}); + if (data.amino_json != null) { + message.amino_json = data.amino_json; + } + return message; + } + toObject() { + const data: { + amino_json?: string; + } = {}; + if (this.amino_json != null) { + data.amino_json = this.amino_json; + } + 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.amino_json.length) + writer.writeString(1, this.amino_json); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxDecodeAminoResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxDecodeAminoResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.amino_json = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxDecodeAminoResponse { + return TxDecodeAminoResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedServiceService { + static definition = { + Simulate: { + path: "/cosmos.tx.v1beta1.Service/Simulate", + requestStream: false, + responseStream: false, + requestSerialize: (message: SimulateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => SimulateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: SimulateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => SimulateResponse.deserialize(new Uint8Array(bytes)) + }, + GetTx: { + path: "/cosmos.tx.v1beta1.Service/GetTx", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetTxRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetTxRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetTxResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetTxResponse.deserialize(new Uint8Array(bytes)) + }, + BroadcastTx: { + path: "/cosmos.tx.v1beta1.Service/BroadcastTx", + requestStream: false, + responseStream: false, + requestSerialize: (message: BroadcastTxRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => BroadcastTxRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: BroadcastTxResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => BroadcastTxResponse.deserialize(new Uint8Array(bytes)) + }, + GetTxsEvent: { + path: "/cosmos.tx.v1beta1.Service/GetTxsEvent", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetTxsEventRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetTxsEventRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetTxsEventResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetTxsEventResponse.deserialize(new Uint8Array(bytes)) + }, + GetBlockWithTxs: { + path: "/cosmos.tx.v1beta1.Service/GetBlockWithTxs", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetBlockWithTxsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetBlockWithTxsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetBlockWithTxsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetBlockWithTxsResponse.deserialize(new Uint8Array(bytes)) + }, + TxDecode: { + path: "/cosmos.tx.v1beta1.Service/TxDecode", + requestStream: false, + responseStream: false, + requestSerialize: (message: TxDecodeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => TxDecodeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: TxDecodeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => TxDecodeResponse.deserialize(new Uint8Array(bytes)) + }, + TxEncode: { + path: "/cosmos.tx.v1beta1.Service/TxEncode", + requestStream: false, + responseStream: false, + requestSerialize: (message: TxEncodeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => TxEncodeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: TxEncodeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => TxEncodeResponse.deserialize(new Uint8Array(bytes)) + }, + TxEncodeAmino: { + path: "/cosmos.tx.v1beta1.Service/TxEncodeAmino", + requestStream: false, + responseStream: false, + requestSerialize: (message: TxEncodeAminoRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => TxEncodeAminoRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: TxEncodeAminoResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => TxEncodeAminoResponse.deserialize(new Uint8Array(bytes)) + }, + TxDecodeAmino: { + path: "/cosmos.tx.v1beta1.Service/TxDecodeAmino", + requestStream: false, + responseStream: false, + requestSerialize: (message: TxDecodeAminoRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => TxDecodeAminoRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: TxDecodeAminoResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => TxDecodeAminoResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Simulate(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetTx(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract BroadcastTx(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetTxsEvent(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetBlockWithTxs(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TxDecode(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TxEncode(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TxEncodeAmino(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TxDecodeAmino(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedServiceService.definition, "Service", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Simulate: GrpcUnaryServiceInterface = (message: SimulateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Simulate(message, metadata, options, callback); + }; + GetTx: GrpcUnaryServiceInterface = (message: GetTxRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetTx(message, metadata, options, callback); + }; + BroadcastTx: GrpcUnaryServiceInterface = (message: BroadcastTxRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.BroadcastTx(message, metadata, options, callback); + }; + GetTxsEvent: GrpcUnaryServiceInterface = (message: GetTxsEventRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetTxsEvent(message, metadata, options, callback); + }; + GetBlockWithTxs: GrpcUnaryServiceInterface = (message: GetBlockWithTxsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetBlockWithTxs(message, metadata, options, callback); + }; + TxDecode: GrpcUnaryServiceInterface = (message: TxDecodeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TxDecode(message, metadata, options, callback); + }; + TxEncode: GrpcUnaryServiceInterface = (message: TxEncodeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TxEncode(message, metadata, options, callback); + }; + TxEncodeAmino: GrpcUnaryServiceInterface = (message: TxEncodeAminoRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TxEncodeAmino(message, metadata, options, callback); + }; + TxDecodeAmino: GrpcUnaryServiceInterface = (message: TxDecodeAminoRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TxDecodeAmino(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/tx/v1beta1/service_pb.d.ts b/codegen/cosmos/tx/v1beta1/service_pb.d.ts similarity index 99% rename from proto/cosmos/tx/v1beta1/service_pb.d.ts rename to codegen/cosmos/tx/v1beta1/service_pb.d.ts index a1e7aba..5d99b08 100644 --- a/proto/cosmos/tx/v1beta1/service_pb.d.ts +++ b/codegen/cosmos/tx/v1beta1/service_pb.d.ts @@ -29,6 +29,9 @@ export class GetTxsEventRequest extends jspb.Message { getLimit(): number; setLimit(value: number): void; + getQuery(): string; + setQuery(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetTxsEventRequest.AsObject; static toObject(includeInstance: boolean, msg: GetTxsEventRequest): GetTxsEventRequest.AsObject; @@ -46,6 +49,7 @@ export namespace GetTxsEventRequest { orderBy: OrderByMap[keyof OrderByMap], page: number, limit: number, + query: string, } } diff --git a/proto/cosmos/tx/v1beta1/service_pb.js b/codegen/cosmos/tx/v1beta1/service_pb.js similarity index 99% rename from proto/cosmos/tx/v1beta1/service_pb.js rename to codegen/cosmos/tx/v1beta1/service_pb.js index 16dca86..68c6aab 100644 --- a/proto/cosmos/tx/v1beta1/service_pb.js +++ b/codegen/cosmos/tx/v1beta1/service_pb.js @@ -468,7 +468,8 @@ proto.cosmos.tx.v1beta1.GetTxsEventRequest.toObject = function(includeInstance, pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f), orderBy: jspb.Message.getFieldWithDefault(msg, 3, 0), page: jspb.Message.getFieldWithDefault(msg, 4, 0), - limit: jspb.Message.getFieldWithDefault(msg, 5, 0) + limit: jspb.Message.getFieldWithDefault(msg, 5, 0), + query: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -526,6 +527,10 @@ proto.cosmos.tx.v1beta1.GetTxsEventRequest.deserializeBinaryFromReader = functio var value = /** @type {number} */ (reader.readUint64()); msg.setLimit(value); break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; default: reader.skipField(); break; @@ -591,6 +596,13 @@ proto.cosmos.tx.v1beta1.GetTxsEventRequest.serializeBinaryToWriter = function(me f ); } + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } }; @@ -722,6 +734,24 @@ proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.setLimit = function(value) }; +/** + * optional string query = 6; + * @return {string} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.getQuery = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.setQuery = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + /** * List of repeated fields within this message type. diff --git a/proto/cosmos/tx/v1beta1/service_pb_service.d.ts b/codegen/cosmos/tx/v1beta1/service_pb_service.d.ts similarity index 100% rename from proto/cosmos/tx/v1beta1/service_pb_service.d.ts rename to codegen/cosmos/tx/v1beta1/service_pb_service.d.ts diff --git a/proto/cosmos/tx/v1beta1/service_pb_service.js b/codegen/cosmos/tx/v1beta1/service_pb_service.js similarity index 100% rename from proto/cosmos/tx/v1beta1/service_pb_service.js rename to codegen/cosmos/tx/v1beta1/service_pb_service.js diff --git a/codegen/cosmos/tx/v1beta1/tx.ts b/codegen/cosmos/tx/v1beta1/tx.ts new file mode 100644 index 0000000..e7b4f98 --- /dev/null +++ b/codegen/cosmos/tx/v1beta1/tx.ts @@ -0,0 +1,1613 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/tx/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../crypto/multisig/v1beta1/multisig"; +import * as dependency_4 from "./../../base/v1beta1/coin"; +import * as dependency_5 from "./../signing/v1beta1/signing"; +import * as dependency_6 from "./../../../google/protobuf/any"; +import * as dependency_7 from "./../../../cosmos_proto/cosmos"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.tx.v1beta1 { + export class Tx extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + body?: TxBody; + auth_info?: AuthInfo; + signatures?: Uint8Array[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("body" in data && data.body != undefined) { + this.body = data.body; + } + if ("auth_info" in data && data.auth_info != undefined) { + this.auth_info = data.auth_info; + } + if ("signatures" in data && data.signatures != undefined) { + this.signatures = data.signatures; + } + } + } + get body() { + return pb_1.Message.getWrapperField(this, TxBody, 1) as TxBody; + } + set body(value: TxBody) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_body() { + return pb_1.Message.getField(this, 1) != null; + } + get auth_info() { + return pb_1.Message.getWrapperField(this, AuthInfo, 2) as AuthInfo; + } + set auth_info(value: AuthInfo) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_auth_info() { + return pb_1.Message.getField(this, 2) != null; + } + get signatures() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as Uint8Array[]; + } + set signatures(value: Uint8Array[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + body?: ReturnType; + auth_info?: ReturnType; + signatures?: Uint8Array[]; + }): Tx { + const message = new Tx({}); + if (data.body != null) { + message.body = TxBody.fromObject(data.body); + } + if (data.auth_info != null) { + message.auth_info = AuthInfo.fromObject(data.auth_info); + } + if (data.signatures != null) { + message.signatures = data.signatures; + } + return message; + } + toObject() { + const data: { + body?: ReturnType; + auth_info?: ReturnType; + signatures?: Uint8Array[]; + } = {}; + if (this.body != null) { + data.body = this.body.toObject(); + } + if (this.auth_info != null) { + data.auth_info = this.auth_info.toObject(); + } + if (this.signatures != null) { + data.signatures = this.signatures; + } + 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_body) + writer.writeMessage(1, this.body, () => this.body.serialize(writer)); + if (this.has_auth_info) + writer.writeMessage(2, this.auth_info, () => this.auth_info.serialize(writer)); + if (this.signatures.length) + writer.writeRepeatedBytes(3, this.signatures); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Tx { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Tx(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.body, () => message.body = TxBody.deserialize(reader)); + break; + case 2: + reader.readMessage(message.auth_info, () => message.auth_info = AuthInfo.deserialize(reader)); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Tx { + return Tx.deserialize(bytes); + } + } + export class TxRaw extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + body_bytes?: Uint8Array; + auth_info_bytes?: Uint8Array; + signatures?: Uint8Array[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("body_bytes" in data && data.body_bytes != undefined) { + this.body_bytes = data.body_bytes; + } + if ("auth_info_bytes" in data && data.auth_info_bytes != undefined) { + this.auth_info_bytes = data.auth_info_bytes; + } + if ("signatures" in data && data.signatures != undefined) { + this.signatures = data.signatures; + } + } + } + get body_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set body_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get auth_info_bytes() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set auth_info_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get signatures() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as Uint8Array[]; + } + set signatures(value: Uint8Array[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + body_bytes?: Uint8Array; + auth_info_bytes?: Uint8Array; + signatures?: Uint8Array[]; + }): TxRaw { + const message = new TxRaw({}); + if (data.body_bytes != null) { + message.body_bytes = data.body_bytes; + } + if (data.auth_info_bytes != null) { + message.auth_info_bytes = data.auth_info_bytes; + } + if (data.signatures != null) { + message.signatures = data.signatures; + } + return message; + } + toObject() { + const data: { + body_bytes?: Uint8Array; + auth_info_bytes?: Uint8Array; + signatures?: Uint8Array[]; + } = {}; + if (this.body_bytes != null) { + data.body_bytes = this.body_bytes; + } + if (this.auth_info_bytes != null) { + data.auth_info_bytes = this.auth_info_bytes; + } + if (this.signatures != null) { + data.signatures = this.signatures; + } + 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.body_bytes.length) + writer.writeBytes(1, this.body_bytes); + if (this.auth_info_bytes.length) + writer.writeBytes(2, this.auth_info_bytes); + if (this.signatures.length) + writer.writeRepeatedBytes(3, this.signatures); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxRaw { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxRaw(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.body_bytes = reader.readBytes(); + break; + case 2: + message.auth_info_bytes = reader.readBytes(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxRaw { + return TxRaw.deserialize(bytes); + } + } + export class SignDoc extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + body_bytes?: Uint8Array; + auth_info_bytes?: Uint8Array; + chain_id?: string; + account_number?: 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 ("body_bytes" in data && data.body_bytes != undefined) { + this.body_bytes = data.body_bytes; + } + if ("auth_info_bytes" in data && data.auth_info_bytes != undefined) { + this.auth_info_bytes = data.auth_info_bytes; + } + if ("chain_id" in data && data.chain_id != undefined) { + this.chain_id = data.chain_id; + } + if ("account_number" in data && data.account_number != undefined) { + this.account_number = data.account_number; + } + } + } + get body_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set body_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get auth_info_bytes() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set auth_info_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get chain_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set chain_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get account_number() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set account_number(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + body_bytes?: Uint8Array; + auth_info_bytes?: Uint8Array; + chain_id?: string; + account_number?: number; + }): SignDoc { + const message = new SignDoc({}); + if (data.body_bytes != null) { + message.body_bytes = data.body_bytes; + } + if (data.auth_info_bytes != null) { + message.auth_info_bytes = data.auth_info_bytes; + } + if (data.chain_id != null) { + message.chain_id = data.chain_id; + } + if (data.account_number != null) { + message.account_number = data.account_number; + } + return message; + } + toObject() { + const data: { + body_bytes?: Uint8Array; + auth_info_bytes?: Uint8Array; + chain_id?: string; + account_number?: number; + } = {}; + if (this.body_bytes != null) { + data.body_bytes = this.body_bytes; + } + if (this.auth_info_bytes != null) { + data.auth_info_bytes = this.auth_info_bytes; + } + if (this.chain_id != null) { + data.chain_id = this.chain_id; + } + if (this.account_number != null) { + data.account_number = this.account_number; + } + 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.body_bytes.length) + writer.writeBytes(1, this.body_bytes); + if (this.auth_info_bytes.length) + writer.writeBytes(2, this.auth_info_bytes); + if (this.chain_id.length) + writer.writeString(3, this.chain_id); + if (this.account_number != 0) + writer.writeUint64(4, this.account_number); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignDoc { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignDoc(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.body_bytes = reader.readBytes(); + break; + case 2: + message.auth_info_bytes = reader.readBytes(); + break; + case 3: + message.chain_id = reader.readString(); + break; + case 4: + message.account_number = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignDoc { + return SignDoc.deserialize(bytes); + } + } + export class SignDocDirectAux extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + body_bytes?: Uint8Array; + public_key?: dependency_6.google.protobuf.Any; + chain_id?: string; + account_number?: number; + sequence?: number; + /** @deprecated*/ + tip?: Tip; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("body_bytes" in data && data.body_bytes != undefined) { + this.body_bytes = data.body_bytes; + } + if ("public_key" in data && data.public_key != undefined) { + this.public_key = data.public_key; + } + if ("chain_id" in data && data.chain_id != undefined) { + this.chain_id = data.chain_id; + } + if ("account_number" in data && data.account_number != undefined) { + this.account_number = data.account_number; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("tip" in data && data.tip != undefined) { + this.tip = data.tip; + } + } + } + get body_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set body_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get public_key() { + return pb_1.Message.getWrapperField(this, dependency_6.google.protobuf.Any, 2) as dependency_6.google.protobuf.Any; + } + set public_key(value: dependency_6.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_public_key() { + return pb_1.Message.getField(this, 2) != null; + } + get chain_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set chain_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get account_number() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set account_number(value: number) { + pb_1.Message.setField(this, 4, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 5, value); + } + /** @deprecated*/ + get tip() { + return pb_1.Message.getWrapperField(this, Tip, 6) as Tip; + } + /** @deprecated*/ + set tip(value: Tip) { + pb_1.Message.setWrapperField(this, 6, value); + } + /** @deprecated*/ + get has_tip() { + return pb_1.Message.getField(this, 6) != null; + } + static fromObject(data: { + body_bytes?: Uint8Array; + public_key?: ReturnType; + chain_id?: string; + account_number?: number; + sequence?: number; + tip?: ReturnType; + }): SignDocDirectAux { + const message = new SignDocDirectAux({}); + if (data.body_bytes != null) { + message.body_bytes = data.body_bytes; + } + if (data.public_key != null) { + message.public_key = dependency_6.google.protobuf.Any.fromObject(data.public_key); + } + if (data.chain_id != null) { + message.chain_id = data.chain_id; + } + if (data.account_number != null) { + message.account_number = data.account_number; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.tip != null) { + message.tip = Tip.fromObject(data.tip); + } + return message; + } + toObject() { + const data: { + body_bytes?: Uint8Array; + public_key?: ReturnType; + chain_id?: string; + account_number?: number; + sequence?: number; + tip?: ReturnType; + } = {}; + if (this.body_bytes != null) { + data.body_bytes = this.body_bytes; + } + if (this.public_key != null) { + data.public_key = this.public_key.toObject(); + } + if (this.chain_id != null) { + data.chain_id = this.chain_id; + } + if (this.account_number != null) { + data.account_number = this.account_number; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.tip != null) { + data.tip = this.tip.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.body_bytes.length) + writer.writeBytes(1, this.body_bytes); + if (this.has_public_key) + writer.writeMessage(2, this.public_key, () => this.public_key.serialize(writer)); + if (this.chain_id.length) + writer.writeString(3, this.chain_id); + if (this.account_number != 0) + writer.writeUint64(4, this.account_number); + if (this.sequence != 0) + writer.writeUint64(5, this.sequence); + if (this.has_tip) + writer.writeMessage(6, this.tip, () => this.tip.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignDocDirectAux { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignDocDirectAux(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.body_bytes = reader.readBytes(); + break; + case 2: + reader.readMessage(message.public_key, () => message.public_key = dependency_6.google.protobuf.Any.deserialize(reader)); + break; + case 3: + message.chain_id = reader.readString(); + break; + case 4: + message.account_number = reader.readUint64(); + break; + case 5: + message.sequence = reader.readUint64(); + break; + case 6: + reader.readMessage(message.tip, () => message.tip = Tip.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignDocDirectAux { + return SignDocDirectAux.deserialize(bytes); + } + } + export class TxBody extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + messages?: dependency_6.google.protobuf.Any[]; + memo?: string; + timeout_height?: number; + extension_options?: dependency_6.google.protobuf.Any[]; + non_critical_extension_options?: dependency_6.google.protobuf.Any[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 1023, 2047], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("messages" in data && data.messages != undefined) { + this.messages = data.messages; + } + if ("memo" in data && data.memo != undefined) { + this.memo = data.memo; + } + if ("timeout_height" in data && data.timeout_height != undefined) { + this.timeout_height = data.timeout_height; + } + if ("extension_options" in data && data.extension_options != undefined) { + this.extension_options = data.extension_options; + } + if ("non_critical_extension_options" in data && data.non_critical_extension_options != undefined) { + this.non_critical_extension_options = data.non_critical_extension_options; + } + } + } + get messages() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_6.google.protobuf.Any, 1) as dependency_6.google.protobuf.Any[]; + } + set messages(value: dependency_6.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get memo() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set memo(value: string) { + pb_1.Message.setField(this, 2, value); + } + get timeout_height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set timeout_height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get extension_options() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_6.google.protobuf.Any, 1023) as dependency_6.google.protobuf.Any[]; + } + set extension_options(value: dependency_6.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 1023, value); + } + get non_critical_extension_options() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_6.google.protobuf.Any, 2047) as dependency_6.google.protobuf.Any[]; + } + set non_critical_extension_options(value: dependency_6.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 2047, value); + } + static fromObject(data: { + messages?: ReturnType[]; + memo?: string; + timeout_height?: number; + extension_options?: ReturnType[]; + non_critical_extension_options?: ReturnType[]; + }): TxBody { + const message = new TxBody({}); + if (data.messages != null) { + message.messages = data.messages.map(item => dependency_6.google.protobuf.Any.fromObject(item)); + } + if (data.memo != null) { + message.memo = data.memo; + } + if (data.timeout_height != null) { + message.timeout_height = data.timeout_height; + } + if (data.extension_options != null) { + message.extension_options = data.extension_options.map(item => dependency_6.google.protobuf.Any.fromObject(item)); + } + if (data.non_critical_extension_options != null) { + message.non_critical_extension_options = data.non_critical_extension_options.map(item => dependency_6.google.protobuf.Any.fromObject(item)); + } + return message; + } + toObject() { + const data: { + messages?: ReturnType[]; + memo?: string; + timeout_height?: number; + extension_options?: ReturnType[]; + non_critical_extension_options?: ReturnType[]; + } = {}; + if (this.messages != null) { + data.messages = this.messages.map((item: dependency_6.google.protobuf.Any) => item.toObject()); + } + if (this.memo != null) { + data.memo = this.memo; + } + if (this.timeout_height != null) { + data.timeout_height = this.timeout_height; + } + if (this.extension_options != null) { + data.extension_options = this.extension_options.map((item: dependency_6.google.protobuf.Any) => item.toObject()); + } + if (this.non_critical_extension_options != null) { + data.non_critical_extension_options = this.non_critical_extension_options.map((item: dependency_6.google.protobuf.Any) => item.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.messages.length) + writer.writeRepeatedMessage(1, this.messages, (item: dependency_6.google.protobuf.Any) => item.serialize(writer)); + if (this.memo.length) + writer.writeString(2, this.memo); + if (this.timeout_height != 0) + writer.writeUint64(3, this.timeout_height); + if (this.extension_options.length) + writer.writeRepeatedMessage(1023, this.extension_options, (item: dependency_6.google.protobuf.Any) => item.serialize(writer)); + if (this.non_critical_extension_options.length) + writer.writeRepeatedMessage(2047, this.non_critical_extension_options, (item: dependency_6.google.protobuf.Any) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxBody { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxBody(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.messages, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_6.google.protobuf.Any.deserialize(reader), dependency_6.google.protobuf.Any)); + break; + case 2: + message.memo = reader.readString(); + break; + case 3: + message.timeout_height = reader.readUint64(); + break; + case 1023: + reader.readMessage(message.extension_options, () => pb_1.Message.addToRepeatedWrapperField(message, 1023, dependency_6.google.protobuf.Any.deserialize(reader), dependency_6.google.protobuf.Any)); + break; + case 2047: + reader.readMessage(message.non_critical_extension_options, () => pb_1.Message.addToRepeatedWrapperField(message, 2047, dependency_6.google.protobuf.Any.deserialize(reader), dependency_6.google.protobuf.Any)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxBody { + return TxBody.deserialize(bytes); + } + } + export class AuthInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer_infos?: SignerInfo[]; + fee?: Fee; + /** @deprecated*/ + tip?: Tip; + }) { + 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 ("signer_infos" in data && data.signer_infos != undefined) { + this.signer_infos = data.signer_infos; + } + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + if ("tip" in data && data.tip != undefined) { + this.tip = data.tip; + } + } + } + get signer_infos() { + return pb_1.Message.getRepeatedWrapperField(this, SignerInfo, 1) as SignerInfo[]; + } + set signer_infos(value: SignerInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get fee() { + return pb_1.Message.getWrapperField(this, Fee, 2) as Fee; + } + set fee(value: Fee) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_fee() { + return pb_1.Message.getField(this, 2) != null; + } + /** @deprecated*/ + get tip() { + return pb_1.Message.getWrapperField(this, Tip, 3) as Tip; + } + /** @deprecated*/ + set tip(value: Tip) { + pb_1.Message.setWrapperField(this, 3, value); + } + /** @deprecated*/ + get has_tip() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + signer_infos?: ReturnType[]; + fee?: ReturnType; + tip?: ReturnType; + }): AuthInfo { + const message = new AuthInfo({}); + if (data.signer_infos != null) { + message.signer_infos = data.signer_infos.map(item => SignerInfo.fromObject(item)); + } + if (data.fee != null) { + message.fee = Fee.fromObject(data.fee); + } + if (data.tip != null) { + message.tip = Tip.fromObject(data.tip); + } + return message; + } + toObject() { + const data: { + signer_infos?: ReturnType[]; + fee?: ReturnType; + tip?: ReturnType; + } = {}; + if (this.signer_infos != null) { + data.signer_infos = this.signer_infos.map((item: SignerInfo) => item.toObject()); + } + if (this.fee != null) { + data.fee = this.fee.toObject(); + } + if (this.tip != null) { + data.tip = this.tip.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.signer_infos.length) + writer.writeRepeatedMessage(1, this.signer_infos, (item: SignerInfo) => item.serialize(writer)); + if (this.has_fee) + writer.writeMessage(2, this.fee, () => this.fee.serialize(writer)); + if (this.has_tip) + writer.writeMessage(3, this.tip, () => this.tip.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuthInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuthInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signer_infos, () => pb_1.Message.addToRepeatedWrapperField(message, 1, SignerInfo.deserialize(reader), SignerInfo)); + break; + case 2: + reader.readMessage(message.fee, () => message.fee = Fee.deserialize(reader)); + break; + case 3: + reader.readMessage(message.tip, () => message.tip = Tip.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AuthInfo { + return AuthInfo.deserialize(bytes); + } + } + export class SignerInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + public_key?: dependency_6.google.protobuf.Any; + mode_info?: ModeInfo; + sequence?: 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 ("public_key" in data && data.public_key != undefined) { + this.public_key = data.public_key; + } + if ("mode_info" in data && data.mode_info != undefined) { + this.mode_info = data.mode_info; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get public_key() { + return pb_1.Message.getWrapperField(this, dependency_6.google.protobuf.Any, 1) as dependency_6.google.protobuf.Any; + } + set public_key(value: dependency_6.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_public_key() { + return pb_1.Message.getField(this, 1) != null; + } + get mode_info() { + return pb_1.Message.getWrapperField(this, ModeInfo, 2) as ModeInfo; + } + set mode_info(value: ModeInfo) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_mode_info() { + return pb_1.Message.getField(this, 2) != null; + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + public_key?: ReturnType; + mode_info?: ReturnType; + sequence?: number; + }): SignerInfo { + const message = new SignerInfo({}); + if (data.public_key != null) { + message.public_key = dependency_6.google.protobuf.Any.fromObject(data.public_key); + } + if (data.mode_info != null) { + message.mode_info = ModeInfo.fromObject(data.mode_info); + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + public_key?: ReturnType; + mode_info?: ReturnType; + sequence?: number; + } = {}; + if (this.public_key != null) { + data.public_key = this.public_key.toObject(); + } + if (this.mode_info != null) { + data.mode_info = this.mode_info.toObject(); + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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_public_key) + writer.writeMessage(1, this.public_key, () => this.public_key.serialize(writer)); + if (this.has_mode_info) + writer.writeMessage(2, this.mode_info, () => this.mode_info.serialize(writer)); + if (this.sequence != 0) + writer.writeUint64(3, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignerInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignerInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.public_key, () => message.public_key = dependency_6.google.protobuf.Any.deserialize(reader)); + break; + case 2: + reader.readMessage(message.mode_info, () => message.mode_info = ModeInfo.deserialize(reader)); + break; + case 3: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignerInfo { + return SignerInfo.deserialize(bytes); + } + } + export class ModeInfo extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2]]; + constructor(data?: any[] | ({} & (({ + single?: ModeInfo.Single; + multi?: never; + } | { + single?: never; + multi?: ModeInfo.Multi; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("single" in data && data.single != undefined) { + this.single = data.single; + } + if ("multi" in data && data.multi != undefined) { + this.multi = data.multi; + } + } + } + get single() { + return pb_1.Message.getWrapperField(this, ModeInfo.Single, 1) as ModeInfo.Single; + } + set single(value: ModeInfo.Single) { + pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); + } + get has_single() { + return pb_1.Message.getField(this, 1) != null; + } + get multi() { + return pb_1.Message.getWrapperField(this, ModeInfo.Multi, 2) as ModeInfo.Multi; + } + set multi(value: ModeInfo.Multi) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_multi() { + return pb_1.Message.getField(this, 2) != null; + } + get sum() { + const cases: { + [index: number]: "none" | "single" | "multi"; + } = { + 0: "none", + 1: "single", + 2: "multi" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2])]; + } + static fromObject(data: { + single?: ReturnType; + multi?: ReturnType; + }): ModeInfo { + const message = new ModeInfo({}); + if (data.single != null) { + message.single = ModeInfo.Single.fromObject(data.single); + } + if (data.multi != null) { + message.multi = ModeInfo.Multi.fromObject(data.multi); + } + return message; + } + toObject() { + const data: { + single?: ReturnType; + multi?: ReturnType; + } = {}; + if (this.single != null) { + data.single = this.single.toObject(); + } + if (this.multi != null) { + data.multi = this.multi.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_single) + writer.writeMessage(1, this.single, () => this.single.serialize(writer)); + if (this.has_multi) + writer.writeMessage(2, this.multi, () => this.multi.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModeInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModeInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.single, () => message.single = ModeInfo.Single.deserialize(reader)); + break; + case 2: + reader.readMessage(message.multi, () => message.multi = ModeInfo.Multi.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ModeInfo { + return ModeInfo.deserialize(bytes); + } + } + export namespace ModeInfo { + export class Single extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + mode?: dependency_5.cosmos.tx.signing.v1beta1.SignMode; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("mode" in data && data.mode != undefined) { + this.mode = data.mode; + } + } + } + get mode() { + return pb_1.Message.getFieldWithDefault(this, 1, dependency_5.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_UNSPECIFIED) as dependency_5.cosmos.tx.signing.v1beta1.SignMode; + } + set mode(value: dependency_5.cosmos.tx.signing.v1beta1.SignMode) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + mode?: dependency_5.cosmos.tx.signing.v1beta1.SignMode; + }): Single { + const message = new Single({}); + if (data.mode != null) { + message.mode = data.mode; + } + return message; + } + toObject() { + const data: { + mode?: dependency_5.cosmos.tx.signing.v1beta1.SignMode; + } = {}; + if (this.mode != null) { + data.mode = this.mode; + } + 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.mode != dependency_5.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_UNSPECIFIED) + writer.writeEnum(1, this.mode); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Single { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Single(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.mode = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Single { + return Single.deserialize(bytes); + } + } + export class Multi extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + bitarray?: dependency_3.cosmos.crypto.multisig.v1beta1.CompactBitArray; + mode_infos?: ModeInfo[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("bitarray" in data && data.bitarray != undefined) { + this.bitarray = data.bitarray; + } + if ("mode_infos" in data && data.mode_infos != undefined) { + this.mode_infos = data.mode_infos; + } + } + } + get bitarray() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.crypto.multisig.v1beta1.CompactBitArray, 1) as dependency_3.cosmos.crypto.multisig.v1beta1.CompactBitArray; + } + set bitarray(value: dependency_3.cosmos.crypto.multisig.v1beta1.CompactBitArray) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_bitarray() { + return pb_1.Message.getField(this, 1) != null; + } + get mode_infos() { + return pb_1.Message.getRepeatedWrapperField(this, ModeInfo, 2) as ModeInfo[]; + } + set mode_infos(value: ModeInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + bitarray?: ReturnType; + mode_infos?: ReturnType[]; + }): Multi { + const message = new Multi({}); + if (data.bitarray != null) { + message.bitarray = dependency_3.cosmos.crypto.multisig.v1beta1.CompactBitArray.fromObject(data.bitarray); + } + if (data.mode_infos != null) { + message.mode_infos = data.mode_infos.map(item => ModeInfo.fromObject(item)); + } + return message; + } + toObject() { + const data: { + bitarray?: ReturnType; + mode_infos?: ReturnType[]; + } = {}; + if (this.bitarray != null) { + data.bitarray = this.bitarray.toObject(); + } + if (this.mode_infos != null) { + data.mode_infos = this.mode_infos.map((item: ModeInfo) => item.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_bitarray) + writer.writeMessage(1, this.bitarray, () => this.bitarray.serialize(writer)); + if (this.mode_infos.length) + writer.writeRepeatedMessage(2, this.mode_infos, (item: ModeInfo) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Multi { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Multi(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.bitarray, () => message.bitarray = dependency_3.cosmos.crypto.multisig.v1beta1.CompactBitArray.deserialize(reader)); + break; + case 2: + reader.readMessage(message.mode_infos, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ModeInfo.deserialize(reader), ModeInfo)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Multi { + return Multi.deserialize(bytes); + } + } + } + export class Fee extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: dependency_4.cosmos.base.v1beta1.Coin[]; + gas_limit?: number; + payer?: string; + granter?: string; + }) { + 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 ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("gas_limit" in data && data.gas_limit != undefined) { + this.gas_limit = data.gas_limit; + } + if ("payer" in data && data.payer != undefined) { + this.payer = data.payer; + } + if ("granter" in data && data.granter != undefined) { + this.granter = data.granter; + } + } + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get gas_limit() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set gas_limit(value: number) { + pb_1.Message.setField(this, 2, value); + } + get payer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set payer(value: string) { + pb_1.Message.setField(this, 3, value); + } + get granter() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set granter(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + amount?: ReturnType[]; + gas_limit?: number; + payer?: string; + granter?: string; + }): Fee { + const message = new Fee({}); + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.gas_limit != null) { + message.gas_limit = data.gas_limit; + } + if (data.payer != null) { + message.payer = data.payer; + } + if (data.granter != null) { + message.granter = data.granter; + } + return message; + } + toObject() { + const data: { + amount?: ReturnType[]; + gas_limit?: number; + payer?: string; + granter?: string; + } = {}; + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.gas_limit != null) { + data.gas_limit = this.gas_limit; + } + if (this.payer != null) { + data.payer = this.payer; + } + if (this.granter != null) { + data.granter = this.granter; + } + 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.amount.length) + writer.writeRepeatedMessage(1, this.amount, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.gas_limit != 0) + writer.writeUint64(2, this.gas_limit); + if (this.payer.length) + writer.writeString(3, this.payer); + if (this.granter.length) + writer.writeString(4, this.granter); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Fee { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Fee(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 2: + message.gas_limit = reader.readUint64(); + break; + case 3: + message.payer = reader.readString(); + break; + case 4: + message.granter = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Fee { + return Fee.deserialize(bytes); + } + } + /** @deprecated*/ + export class Tip extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: dependency_4.cosmos.base.v1beta1.Coin[]; + tipper?: string; + }) { + 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 ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("tipper" in data && data.tipper != undefined) { + this.tipper = data.tipper; + } + } + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_4.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get tipper() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set tipper(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + amount?: ReturnType[]; + tipper?: string; + }): Tip { + const message = new Tip({}); + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.tipper != null) { + message.tipper = data.tipper; + } + return message; + } + toObject() { + const data: { + amount?: ReturnType[]; + tipper?: string; + } = {}; + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.tipper != null) { + data.tipper = this.tipper; + } + 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.amount.length) + writer.writeRepeatedMessage(1, this.amount, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.tipper.length) + writer.writeString(2, this.tipper); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Tip { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Tip(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); + break; + case 2: + message.tipper = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Tip { + return Tip.deserialize(bytes); + } + } + export class AuxSignerData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + sign_doc?: SignDocDirectAux; + mode?: dependency_5.cosmos.tx.signing.v1beta1.SignMode; + sig?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("sign_doc" in data && data.sign_doc != undefined) { + this.sign_doc = data.sign_doc; + } + if ("mode" in data && data.mode != undefined) { + this.mode = data.mode; + } + if ("sig" in data && data.sig != undefined) { + this.sig = data.sig; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get sign_doc() { + return pb_1.Message.getWrapperField(this, SignDocDirectAux, 2) as SignDocDirectAux; + } + set sign_doc(value: SignDocDirectAux) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_sign_doc() { + return pb_1.Message.getField(this, 2) != null; + } + get mode() { + return pb_1.Message.getFieldWithDefault(this, 3, dependency_5.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_UNSPECIFIED) as dependency_5.cosmos.tx.signing.v1beta1.SignMode; + } + set mode(value: dependency_5.cosmos.tx.signing.v1beta1.SignMode) { + pb_1.Message.setField(this, 3, value); + } + get sig() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set sig(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + address?: string; + sign_doc?: ReturnType; + mode?: dependency_5.cosmos.tx.signing.v1beta1.SignMode; + sig?: Uint8Array; + }): AuxSignerData { + const message = new AuxSignerData({}); + if (data.address != null) { + message.address = data.address; + } + if (data.sign_doc != null) { + message.sign_doc = SignDocDirectAux.fromObject(data.sign_doc); + } + if (data.mode != null) { + message.mode = data.mode; + } + if (data.sig != null) { + message.sig = data.sig; + } + return message; + } + toObject() { + const data: { + address?: string; + sign_doc?: ReturnType; + mode?: dependency_5.cosmos.tx.signing.v1beta1.SignMode; + sig?: Uint8Array; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.sign_doc != null) { + data.sign_doc = this.sign_doc.toObject(); + } + if (this.mode != null) { + data.mode = this.mode; + } + if (this.sig != null) { + data.sig = this.sig; + } + 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.address.length) + writer.writeString(1, this.address); + if (this.has_sign_doc) + writer.writeMessage(2, this.sign_doc, () => this.sign_doc.serialize(writer)); + if (this.mode != dependency_5.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_UNSPECIFIED) + writer.writeEnum(3, this.mode); + if (this.sig.length) + writer.writeBytes(4, this.sig); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuxSignerData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuxSignerData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.sign_doc, () => message.sign_doc = SignDocDirectAux.deserialize(reader)); + break; + case 3: + message.mode = reader.readEnum(); + break; + case 4: + message.sig = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AuxSignerData { + return AuxSignerData.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/tx/v1beta1/tx_pb.d.ts b/codegen/cosmos/tx/v1beta1/tx_pb.d.ts similarity index 99% rename from proto/cosmos/tx/v1beta1/tx_pb.d.ts rename to codegen/cosmos/tx/v1beta1/tx_pb.d.ts index 643cb2c..a6d6204 100644 --- a/proto/cosmos/tx/v1beta1/tx_pb.d.ts +++ b/codegen/cosmos/tx/v1beta1/tx_pb.d.ts @@ -2,6 +2,7 @@ // file: cosmos/tx/v1beta1/tx.proto import * as jspb from "google-protobuf"; +import * as amino_amino_pb from "../../../amino/amino_pb"; import * as gogoproto_gogo_pb from "../../../gogoproto/gogo_pb"; import * as cosmos_crypto_multisig_v1beta1_multisig_pb from "../../../cosmos/crypto/multisig/v1beta1/multisig_pb"; import * as cosmos_base_v1beta1_coin_pb from "../../../cosmos/base/v1beta1/coin_pb"; diff --git a/proto/cosmos/tx/v1beta1/tx_pb.js b/codegen/cosmos/tx/v1beta1/tx_pb.js similarity index 99% rename from proto/cosmos/tx/v1beta1/tx_pb.js rename to codegen/cosmos/tx/v1beta1/tx_pb.js index 6383a56..19fd446 100644 --- a/proto/cosmos/tx/v1beta1/tx_pb.js +++ b/codegen/cosmos/tx/v1beta1/tx_pb.js @@ -15,6 +15,8 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var amino_amino_pb = require('../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var cosmos_crypto_multisig_v1beta1_multisig_pb = require('../../../cosmos/crypto/multisig/v1beta1/multisig_pb.js'); diff --git a/proto/cosmos/tx/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/tx/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/tx/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/tx/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/tx/v1beta1/tx_pb_service.js b/codegen/cosmos/tx/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/tx/v1beta1/tx_pb_service.js rename to codegen/cosmos/tx/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/upgrade/module/v1/module.ts b/codegen/cosmos/upgrade/module/v1/module.ts new file mode 100644 index 0000000..f39b55f --- /dev/null +++ b/codegen/cosmos/upgrade/module/v1/module.ts @@ -0,0 +1,76 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/upgrade/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.upgrade.module.v1 { + export class Module extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: 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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + authority?: string; + }): Module { + const message = new Module({}); + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + authority?: string; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/upgrade/module/v1/module_pb.d.ts b/codegen/cosmos/upgrade/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/upgrade/module/v1/module_pb.d.ts rename to codegen/cosmos/upgrade/module/v1/module_pb.d.ts diff --git a/proto/cosmos/upgrade/module/v1/module_pb.js b/codegen/cosmos/upgrade/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/upgrade/module/v1/module_pb.js rename to codegen/cosmos/upgrade/module/v1/module_pb.js diff --git a/proto/cosmos/upgrade/module/v1/module_pb_service.d.ts b/codegen/cosmos/upgrade/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/upgrade/module/v1/module_pb_service.d.ts rename to codegen/cosmos/upgrade/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/upgrade/module/v1/module_pb_service.js b/codegen/cosmos/upgrade/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/upgrade/module/v1/module_pb_service.js rename to codegen/cosmos/upgrade/module/v1/module_pb_service.js diff --git a/codegen/cosmos/upgrade/v1beta1/query.ts b/codegen/cosmos/upgrade/v1beta1/query.ts new file mode 100644 index 0000000..ae6e8e3 --- /dev/null +++ b/codegen/cosmos/upgrade/v1beta1/query.ts @@ -0,0 +1,732 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/upgrade/v1beta1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/api/annotations"; +import * as dependency_2 from "./upgrade"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.upgrade.v1beta1 { + export class QueryCurrentPlanRequest 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: {}): QueryCurrentPlanRequest { + const message = new QueryCurrentPlanRequest({}); + 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): QueryCurrentPlanRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCurrentPlanRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCurrentPlanRequest { + return QueryCurrentPlanRequest.deserialize(bytes); + } + } + export class QueryCurrentPlanResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + plan?: dependency_2.cosmos.upgrade.v1beta1.Plan; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("plan" in data && data.plan != undefined) { + this.plan = data.plan; + } + } + } + get plan() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.upgrade.v1beta1.Plan, 1) as dependency_2.cosmos.upgrade.v1beta1.Plan; + } + set plan(value: dependency_2.cosmos.upgrade.v1beta1.Plan) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_plan() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + plan?: ReturnType; + }): QueryCurrentPlanResponse { + const message = new QueryCurrentPlanResponse({}); + if (data.plan != null) { + message.plan = dependency_2.cosmos.upgrade.v1beta1.Plan.fromObject(data.plan); + } + return message; + } + toObject() { + const data: { + plan?: ReturnType; + } = {}; + if (this.plan != null) { + data.plan = this.plan.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_plan) + writer.writeMessage(1, this.plan, () => this.plan.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCurrentPlanResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCurrentPlanResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.plan, () => message.plan = dependency_2.cosmos.upgrade.v1beta1.Plan.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCurrentPlanResponse { + return QueryCurrentPlanResponse.deserialize(bytes); + } + } + export class QueryAppliedPlanRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + name?: string; + }): QueryAppliedPlanRequest { + const message = new QueryAppliedPlanRequest({}); + if (data.name != null) { + message.name = data.name; + } + return message; + } + toObject() { + const data: { + name?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + 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.name.length) + writer.writeString(1, this.name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAppliedPlanRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAppliedPlanRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAppliedPlanRequest { + return QueryAppliedPlanRequest.deserialize(bytes); + } + } + export class QueryAppliedPlanResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + 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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + height?: number; + }): QueryAppliedPlanResponse { + const message = new QueryAppliedPlanResponse({}); + if (data.height != null) { + message.height = data.height; + } + return message; + } + toObject() { + const data: { + height?: number; + } = {}; + if (this.height != null) { + data.height = this.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.height != 0) + writer.writeInt64(1, this.height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAppliedPlanResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAppliedPlanResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAppliedPlanResponse { + return QueryAppliedPlanResponse.deserialize(bytes); + } + } + /** @deprecated*/ + export class QueryUpgradedConsensusStateRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + last_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 ("last_height" in data && data.last_height != undefined) { + this.last_height = data.last_height; + } + } + } + get last_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set last_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + last_height?: number; + }): QueryUpgradedConsensusStateRequest { + const message = new QueryUpgradedConsensusStateRequest({}); + if (data.last_height != null) { + message.last_height = data.last_height; + } + return message; + } + toObject() { + const data: { + last_height?: number; + } = {}; + if (this.last_height != null) { + data.last_height = this.last_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.last_height != 0) + writer.writeInt64(1, this.last_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUpgradedConsensusStateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradedConsensusStateRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.last_height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradedConsensusStateRequest { + return QueryUpgradedConsensusStateRequest.deserialize(bytes); + } + } + /** @deprecated*/ + export class QueryUpgradedConsensusStateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + upgraded_consensus_state?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("upgraded_consensus_state" in data && data.upgraded_consensus_state != undefined) { + this.upgraded_consensus_state = data.upgraded_consensus_state; + } + } + } + get upgraded_consensus_state() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set upgraded_consensus_state(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + upgraded_consensus_state?: Uint8Array; + }): QueryUpgradedConsensusStateResponse { + const message = new QueryUpgradedConsensusStateResponse({}); + if (data.upgraded_consensus_state != null) { + message.upgraded_consensus_state = data.upgraded_consensus_state; + } + return message; + } + toObject() { + const data: { + upgraded_consensus_state?: Uint8Array; + } = {}; + if (this.upgraded_consensus_state != null) { + data.upgraded_consensus_state = this.upgraded_consensus_state; + } + 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.upgraded_consensus_state.length) + writer.writeBytes(2, this.upgraded_consensus_state); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUpgradedConsensusStateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradedConsensusStateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.upgraded_consensus_state = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradedConsensusStateResponse { + return QueryUpgradedConsensusStateResponse.deserialize(bytes); + } + } + export class QueryModuleVersionsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + module_name?: 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 ("module_name" in data && data.module_name != undefined) { + this.module_name = data.module_name; + } + } + } + get module_name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set module_name(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + module_name?: string; + }): QueryModuleVersionsRequest { + const message = new QueryModuleVersionsRequest({}); + if (data.module_name != null) { + message.module_name = data.module_name; + } + return message; + } + toObject() { + const data: { + module_name?: string; + } = {}; + if (this.module_name != null) { + data.module_name = this.module_name; + } + 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.module_name.length) + writer.writeString(1, this.module_name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryModuleVersionsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryModuleVersionsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.module_name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryModuleVersionsRequest { + return QueryModuleVersionsRequest.deserialize(bytes); + } + } + export class QueryModuleVersionsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + module_versions?: dependency_2.cosmos.upgrade.v1beta1.ModuleVersion[]; + }) { + 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 ("module_versions" in data && data.module_versions != undefined) { + this.module_versions = data.module_versions; + } + } + } + get module_versions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.upgrade.v1beta1.ModuleVersion, 1) as dependency_2.cosmos.upgrade.v1beta1.ModuleVersion[]; + } + set module_versions(value: dependency_2.cosmos.upgrade.v1beta1.ModuleVersion[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + module_versions?: ReturnType[]; + }): QueryModuleVersionsResponse { + const message = new QueryModuleVersionsResponse({}); + if (data.module_versions != null) { + message.module_versions = data.module_versions.map(item => dependency_2.cosmos.upgrade.v1beta1.ModuleVersion.fromObject(item)); + } + return message; + } + toObject() { + const data: { + module_versions?: ReturnType[]; + } = {}; + if (this.module_versions != null) { + data.module_versions = this.module_versions.map((item: dependency_2.cosmos.upgrade.v1beta1.ModuleVersion) => item.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.module_versions.length) + writer.writeRepeatedMessage(1, this.module_versions, (item: dependency_2.cosmos.upgrade.v1beta1.ModuleVersion) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryModuleVersionsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryModuleVersionsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.module_versions, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.upgrade.v1beta1.ModuleVersion.deserialize(reader), dependency_2.cosmos.upgrade.v1beta1.ModuleVersion)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryModuleVersionsResponse { + return QueryModuleVersionsResponse.deserialize(bytes); + } + } + export class QueryAuthorityRequest 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: {}): QueryAuthorityRequest { + const message = new QueryAuthorityRequest({}); + 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): QueryAuthorityRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAuthorityRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAuthorityRequest { + return QueryAuthorityRequest.deserialize(bytes); + } + } + export class QueryAuthorityResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): QueryAuthorityResponse { + const message = new QueryAuthorityResponse({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryAuthorityResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryAuthorityResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryAuthorityResponse { + return QueryAuthorityResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + CurrentPlan: { + path: "/cosmos.upgrade.v1beta1.Query/CurrentPlan", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryCurrentPlanRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryCurrentPlanRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryCurrentPlanResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryCurrentPlanResponse.deserialize(new Uint8Array(bytes)) + }, + AppliedPlan: { + path: "/cosmos.upgrade.v1beta1.Query/AppliedPlan", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAppliedPlanRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAppliedPlanRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAppliedPlanResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAppliedPlanResponse.deserialize(new Uint8Array(bytes)) + }, + UpgradedConsensusState: { + path: "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryUpgradedConsensusStateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryUpgradedConsensusStateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryUpgradedConsensusStateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryUpgradedConsensusStateResponse.deserialize(new Uint8Array(bytes)) + }, + ModuleVersions: { + path: "/cosmos.upgrade.v1beta1.Query/ModuleVersions", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryModuleVersionsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryModuleVersionsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryModuleVersionsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryModuleVersionsResponse.deserialize(new Uint8Array(bytes)) + }, + Authority: { + path: "/cosmos.upgrade.v1beta1.Query/Authority", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryAuthorityRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryAuthorityRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryAuthorityResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryAuthorityResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CurrentPlan(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AppliedPlan(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpgradedConsensusState(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ModuleVersions(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Authority(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CurrentPlan: GrpcUnaryServiceInterface = (message: QueryCurrentPlanRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CurrentPlan(message, metadata, options, callback); + }; + AppliedPlan: GrpcUnaryServiceInterface = (message: QueryAppliedPlanRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AppliedPlan(message, metadata, options, callback); + }; + /** @deprecated*/ + UpgradedConsensusState: GrpcUnaryServiceInterface = (message: QueryUpgradedConsensusStateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpgradedConsensusState(message, metadata, options, callback); + }; + ModuleVersions: GrpcUnaryServiceInterface = (message: QueryModuleVersionsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ModuleVersions(message, metadata, options, callback); + }; + Authority: GrpcUnaryServiceInterface = (message: QueryAuthorityRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Authority(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/upgrade/v1beta1/query_pb.d.ts b/codegen/cosmos/upgrade/v1beta1/query_pb.d.ts similarity index 100% rename from proto/cosmos/upgrade/v1beta1/query_pb.d.ts rename to codegen/cosmos/upgrade/v1beta1/query_pb.d.ts diff --git a/proto/cosmos/upgrade/v1beta1/query_pb.js b/codegen/cosmos/upgrade/v1beta1/query_pb.js similarity index 100% rename from proto/cosmos/upgrade/v1beta1/query_pb.js rename to codegen/cosmos/upgrade/v1beta1/query_pb.js diff --git a/proto/cosmos/upgrade/v1beta1/query_pb_service.d.ts b/codegen/cosmos/upgrade/v1beta1/query_pb_service.d.ts similarity index 100% rename from proto/cosmos/upgrade/v1beta1/query_pb_service.d.ts rename to codegen/cosmos/upgrade/v1beta1/query_pb_service.d.ts diff --git a/proto/cosmos/upgrade/v1beta1/query_pb_service.js b/codegen/cosmos/upgrade/v1beta1/query_pb_service.js similarity index 100% rename from proto/cosmos/upgrade/v1beta1/query_pb_service.js rename to codegen/cosmos/upgrade/v1beta1/query_pb_service.js diff --git a/codegen/cosmos/upgrade/v1beta1/tx.ts b/codegen/cosmos/upgrade/v1beta1/tx.ts new file mode 100644 index 0000000..dc0fa2c --- /dev/null +++ b/codegen/cosmos/upgrade/v1beta1/tx.ts @@ -0,0 +1,314 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/upgrade/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./upgrade"; +import * as dependency_4 from "./../../msg/v1/msg"; +import * as dependency_5 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.upgrade.v1beta1 { + export class MsgSoftwareUpgrade extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + plan?: dependency_3.cosmos.upgrade.v1beta1.Plan; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("plan" in data && data.plan != undefined) { + this.plan = data.plan; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get plan() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.upgrade.v1beta1.Plan, 2) as dependency_3.cosmos.upgrade.v1beta1.Plan; + } + set plan(value: dependency_3.cosmos.upgrade.v1beta1.Plan) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_plan() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + plan?: ReturnType; + }): MsgSoftwareUpgrade { + const message = new MsgSoftwareUpgrade({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.plan != null) { + message.plan = dependency_3.cosmos.upgrade.v1beta1.Plan.fromObject(data.plan); + } + return message; + } + toObject() { + const data: { + authority?: string; + plan?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + if (this.plan != null) { + data.plan = this.plan.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.authority.length) + writer.writeString(1, this.authority); + if (this.has_plan) + writer.writeMessage(2, this.plan, () => this.plan.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSoftwareUpgrade { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSoftwareUpgrade(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.plan, () => message.plan = dependency_3.cosmos.upgrade.v1beta1.Plan.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSoftwareUpgrade { + return MsgSoftwareUpgrade.deserialize(bytes); + } + } + export class MsgSoftwareUpgradeResponse 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: {}): MsgSoftwareUpgradeResponse { + const message = new MsgSoftwareUpgradeResponse({}); + 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): MsgSoftwareUpgradeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSoftwareUpgradeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSoftwareUpgradeResponse { + return MsgSoftwareUpgradeResponse.deserialize(bytes); + } + } + export class MsgCancelUpgrade extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: 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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + authority?: string; + }): MsgCancelUpgrade { + const message = new MsgCancelUpgrade({}); + if (data.authority != null) { + message.authority = data.authority; + } + return message; + } + toObject() { + const data: { + authority?: string; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelUpgrade { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelUpgrade(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCancelUpgrade { + return MsgCancelUpgrade.deserialize(bytes); + } + } + export class MsgCancelUpgradeResponse 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: {}): MsgCancelUpgradeResponse { + const message = new MsgCancelUpgradeResponse({}); + 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): MsgCancelUpgradeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelUpgradeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCancelUpgradeResponse { + return MsgCancelUpgradeResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + SoftwareUpgrade: { + path: "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSoftwareUpgrade) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSoftwareUpgrade.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSoftwareUpgradeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSoftwareUpgradeResponse.deserialize(new Uint8Array(bytes)) + }, + CancelUpgrade: { + path: "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCancelUpgrade) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCancelUpgrade.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCancelUpgradeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCancelUpgradeResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract SoftwareUpgrade(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CancelUpgrade(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + SoftwareUpgrade: GrpcUnaryServiceInterface = (message: MsgSoftwareUpgrade, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SoftwareUpgrade(message, metadata, options, callback); + }; + CancelUpgrade: GrpcUnaryServiceInterface = (message: MsgCancelUpgrade, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CancelUpgrade(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/upgrade/v1beta1/tx_pb.d.ts b/codegen/cosmos/upgrade/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/upgrade/v1beta1/tx_pb.d.ts rename to codegen/cosmos/upgrade/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/upgrade/v1beta1/tx_pb.js b/codegen/cosmos/upgrade/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/upgrade/v1beta1/tx_pb.js rename to codegen/cosmos/upgrade/v1beta1/tx_pb.js diff --git a/proto/cosmos/upgrade/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/upgrade/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/upgrade/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/upgrade/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/upgrade/v1beta1/tx_pb_service.js b/codegen/cosmos/upgrade/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/upgrade/v1beta1/tx_pb_service.js rename to codegen/cosmos/upgrade/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/upgrade/v1beta1/upgrade.ts b/codegen/cosmos/upgrade/v1beta1/upgrade.ts new file mode 100644 index 0000000..a87a012 --- /dev/null +++ b/codegen/cosmos/upgrade/v1beta1/upgrade.ts @@ -0,0 +1,484 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/upgrade/v1beta1/upgrade.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../google/protobuf/any"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../google/protobuf/timestamp"; +import * as dependency_4 from "./../../../cosmos_proto/cosmos"; +import * as dependency_5 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.upgrade.v1beta1 { + export class Plan extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + /** @deprecated*/ + time?: dependency_3.google.protobuf.Timestamp; + height?: number; + info?: string; + /** @deprecated*/ + upgraded_client_state?: dependency_1.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("info" in data && data.info != undefined) { + this.info = data.info; + } + if ("upgraded_client_state" in data && data.upgraded_client_state != undefined) { + this.upgraded_client_state = data.upgraded_client_state; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + /** @deprecated*/ + get time() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 2) as dependency_3.google.protobuf.Timestamp; + } + /** @deprecated*/ + set time(value: dependency_3.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 2, value); + } + /** @deprecated*/ + get has_time() { + return pb_1.Message.getField(this, 2) != null; + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get info() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set info(value: string) { + pb_1.Message.setField(this, 4, value); + } + /** @deprecated*/ + get upgraded_client_state() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 5) as dependency_1.google.protobuf.Any; + } + /** @deprecated*/ + set upgraded_client_state(value: dependency_1.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 5, value); + } + /** @deprecated*/ + get has_upgraded_client_state() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + name?: string; + time?: ReturnType; + height?: number; + info?: string; + upgraded_client_state?: ReturnType; + }): Plan { + const message = new Plan({}); + if (data.name != null) { + message.name = data.name; + } + if (data.time != null) { + message.time = dependency_3.google.protobuf.Timestamp.fromObject(data.time); + } + if (data.height != null) { + message.height = data.height; + } + if (data.info != null) { + message.info = data.info; + } + if (data.upgraded_client_state != null) { + message.upgraded_client_state = dependency_1.google.protobuf.Any.fromObject(data.upgraded_client_state); + } + return message; + } + toObject() { + const data: { + name?: string; + time?: ReturnType; + height?: number; + info?: string; + upgraded_client_state?: ReturnType; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.height != null) { + data.height = this.height; + } + if (this.info != null) { + data.info = this.info; + } + if (this.upgraded_client_state != null) { + data.upgraded_client_state = this.upgraded_client_state.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.name.length) + writer.writeString(1, this.name); + if (this.has_time) + writer.writeMessage(2, this.time, () => this.time.serialize(writer)); + if (this.height != 0) + writer.writeInt64(3, this.height); + if (this.info.length) + writer.writeString(4, this.info); + if (this.has_upgraded_client_state) + writer.writeMessage(5, this.upgraded_client_state, () => this.upgraded_client_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Plan { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Plan(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + reader.readMessage(message.time, () => message.time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); + break; + case 3: + message.height = reader.readInt64(); + break; + case 4: + message.info = reader.readString(); + break; + case 5: + reader.readMessage(message.upgraded_client_state, () => message.upgraded_client_state = dependency_1.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Plan { + return Plan.deserialize(bytes); + } + } + /** @deprecated*/ + export class SoftwareUpgradeProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + title?: string; + description?: string; + plan?: Plan; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("plan" in data && data.plan != undefined) { + this.plan = data.plan; + } + } + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get plan() { + return pb_1.Message.getWrapperField(this, Plan, 3) as Plan; + } + set plan(value: Plan) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_plan() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + title?: string; + description?: string; + plan?: ReturnType; + }): SoftwareUpgradeProposal { + const message = new SoftwareUpgradeProposal({}); + if (data.title != null) { + message.title = data.title; + } + if (data.description != null) { + message.description = data.description; + } + if (data.plan != null) { + message.plan = Plan.fromObject(data.plan); + } + return message; + } + toObject() { + const data: { + title?: string; + description?: string; + plan?: ReturnType; + } = {}; + if (this.title != null) { + data.title = this.title; + } + if (this.description != null) { + data.description = this.description; + } + if (this.plan != null) { + data.plan = this.plan.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.title.length) + writer.writeString(1, this.title); + if (this.description.length) + writer.writeString(2, this.description); + if (this.has_plan) + writer.writeMessage(3, this.plan, () => this.plan.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SoftwareUpgradeProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SoftwareUpgradeProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.title = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + reader.readMessage(message.plan, () => message.plan = Plan.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SoftwareUpgradeProposal { + return SoftwareUpgradeProposal.deserialize(bytes); + } + } + /** @deprecated*/ + export class CancelSoftwareUpgradeProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + title?: string; + description?: 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 ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + title?: string; + description?: string; + }): CancelSoftwareUpgradeProposal { + const message = new CancelSoftwareUpgradeProposal({}); + if (data.title != null) { + message.title = data.title; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + title?: string; + description?: string; + } = {}; + if (this.title != null) { + data.title = this.title; + } + if (this.description != null) { + data.description = this.description; + } + 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.title.length) + writer.writeString(1, this.title); + if (this.description.length) + writer.writeString(2, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CancelSoftwareUpgradeProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CancelSoftwareUpgradeProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.title = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CancelSoftwareUpgradeProposal { + return CancelSoftwareUpgradeProposal.deserialize(bytes); + } + } + export class ModuleVersion extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + version?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set version(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + name?: string; + version?: number; + }): ModuleVersion { + const message = new ModuleVersion({}); + if (data.name != null) { + message.name = data.name; + } + if (data.version != null) { + message.version = data.version; + } + return message; + } + toObject() { + const data: { + name?: string; + version?: number; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.version != null) { + data.version = this.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.name.length) + writer.writeString(1, this.name); + if (this.version != 0) + writer.writeUint64(2, this.version); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModuleVersion { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModuleVersion(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.version = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ModuleVersion { + return ModuleVersion.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/upgrade/v1beta1/upgrade_pb.d.ts b/codegen/cosmos/upgrade/v1beta1/upgrade_pb.d.ts similarity index 100% rename from proto/cosmos/upgrade/v1beta1/upgrade_pb.d.ts rename to codegen/cosmos/upgrade/v1beta1/upgrade_pb.d.ts diff --git a/proto/cosmos/upgrade/v1beta1/upgrade_pb.js b/codegen/cosmos/upgrade/v1beta1/upgrade_pb.js similarity index 100% rename from proto/cosmos/upgrade/v1beta1/upgrade_pb.js rename to codegen/cosmos/upgrade/v1beta1/upgrade_pb.js diff --git a/proto/cosmos/upgrade/v1beta1/upgrade_pb_service.d.ts b/codegen/cosmos/upgrade/v1beta1/upgrade_pb_service.d.ts similarity index 100% rename from proto/cosmos/upgrade/v1beta1/upgrade_pb_service.d.ts rename to codegen/cosmos/upgrade/v1beta1/upgrade_pb_service.d.ts diff --git a/proto/cosmos/upgrade/v1beta1/upgrade_pb_service.js b/codegen/cosmos/upgrade/v1beta1/upgrade_pb_service.js similarity index 100% rename from proto/cosmos/upgrade/v1beta1/upgrade_pb_service.js rename to codegen/cosmos/upgrade/v1beta1/upgrade_pb_service.js diff --git a/codegen/cosmos/vesting/module/v1/module.ts b/codegen/cosmos/vesting/module/v1/module.ts new file mode 100644 index 0000000..b249977 --- /dev/null +++ b/codegen/cosmos/vesting/module/v1/module.ts @@ -0,0 +1,49 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/vesting/module/v1/module.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../app/v1alpha1/module"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.vesting.module.v1 { + export class Module 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: {}): Module { + const message = new Module({}); + 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): Module { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Module { + return Module.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/vesting/module/v1/module_pb.d.ts b/codegen/cosmos/vesting/module/v1/module_pb.d.ts similarity index 100% rename from proto/cosmos/vesting/module/v1/module_pb.d.ts rename to codegen/cosmos/vesting/module/v1/module_pb.d.ts diff --git a/proto/cosmos/vesting/module/v1/module_pb.js b/codegen/cosmos/vesting/module/v1/module_pb.js similarity index 100% rename from proto/cosmos/vesting/module/v1/module_pb.js rename to codegen/cosmos/vesting/module/v1/module_pb.js diff --git a/proto/cosmos/vesting/module/v1/module_pb_service.d.ts b/codegen/cosmos/vesting/module/v1/module_pb_service.d.ts similarity index 100% rename from proto/cosmos/vesting/module/v1/module_pb_service.d.ts rename to codegen/cosmos/vesting/module/v1/module_pb_service.d.ts diff --git a/proto/cosmos/vesting/module/v1/module_pb_service.js b/codegen/cosmos/vesting/module/v1/module_pb_service.js similarity index 100% rename from proto/cosmos/vesting/module/v1/module_pb_service.js rename to codegen/cosmos/vesting/module/v1/module_pb_service.js diff --git a/codegen/cosmos/vesting/v1beta1/tx.ts b/codegen/cosmos/vesting/v1beta1/tx.ts new file mode 100644 index 0000000..ef845f9 --- /dev/null +++ b/codegen/cosmos/vesting/v1beta1/tx.ts @@ -0,0 +1,616 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/vesting/v1beta1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../gogoproto/gogo"; +import * as dependency_2 from "./../../base/v1beta1/coin"; +import * as dependency_3 from "./../../../cosmos_proto/cosmos"; +import * as dependency_4 from "./vesting"; +import * as dependency_5 from "./../../msg/v1/msg"; +import * as dependency_6 from "./../../../amino/amino"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace cosmos.vesting.v1beta1 { + export class MsgCreateVestingAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + from_address?: string; + to_address?: string; + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + end_time?: number; + delayed?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("from_address" in data && data.from_address != undefined) { + this.from_address = data.from_address; + } + if ("to_address" in data && data.to_address != undefined) { + this.to_address = data.to_address; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("end_time" in data && data.end_time != undefined) { + this.end_time = data.end_time; + } + if ("delayed" in data && data.delayed != undefined) { + this.delayed = data.delayed; + } + } + } + get from_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set from_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get to_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set to_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get end_time() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set end_time(value: number) { + pb_1.Message.setField(this, 4, value); + } + get delayed() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set delayed(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + from_address?: string; + to_address?: string; + amount?: ReturnType[]; + end_time?: number; + delayed?: boolean; + }): MsgCreateVestingAccount { + const message = new MsgCreateVestingAccount({}); + if (data.from_address != null) { + message.from_address = data.from_address; + } + if (data.to_address != null) { + message.to_address = data.to_address; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.end_time != null) { + message.end_time = data.end_time; + } + if (data.delayed != null) { + message.delayed = data.delayed; + } + return message; + } + toObject() { + const data: { + from_address?: string; + to_address?: string; + amount?: ReturnType[]; + end_time?: number; + delayed?: boolean; + } = {}; + if (this.from_address != null) { + data.from_address = this.from_address; + } + if (this.to_address != null) { + data.to_address = this.to_address; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.end_time != null) { + data.end_time = this.end_time; + } + if (this.delayed != null) { + data.delayed = this.delayed; + } + 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.from_address.length) + writer.writeString(1, this.from_address); + if (this.to_address.length) + writer.writeString(2, this.to_address); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.end_time != 0) + writer.writeInt64(4, this.end_time); + if (this.delayed != false) + writer.writeBool(5, this.delayed); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateVestingAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateVestingAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.from_address = reader.readString(); + break; + case 2: + message.to_address = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + case 4: + message.end_time = reader.readInt64(); + break; + case 5: + message.delayed = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateVestingAccount { + return MsgCreateVestingAccount.deserialize(bytes); + } + } + export class MsgCreateVestingAccountResponse 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: {}): MsgCreateVestingAccountResponse { + const message = new MsgCreateVestingAccountResponse({}); + 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): MsgCreateVestingAccountResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateVestingAccountResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateVestingAccountResponse { + return MsgCreateVestingAccountResponse.deserialize(bytes); + } + } + export class MsgCreatePermanentLockedAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + from_address?: string; + to_address?: string; + amount?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("from_address" in data && data.from_address != undefined) { + this.from_address = data.from_address; + } + if ("to_address" in data && data.to_address != undefined) { + this.to_address = data.to_address; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get from_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set from_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get to_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set to_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + from_address?: string; + to_address?: string; + amount?: ReturnType[]; + }): MsgCreatePermanentLockedAccount { + const message = new MsgCreatePermanentLockedAccount({}); + if (data.from_address != null) { + message.from_address = data.from_address; + } + if (data.to_address != null) { + message.to_address = data.to_address; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + from_address?: string; + to_address?: string; + amount?: ReturnType[]; + } = {}; + if (this.from_address != null) { + data.from_address = this.from_address; + } + if (this.to_address != null) { + data.to_address = this.to_address; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.from_address.length) + writer.writeString(1, this.from_address); + if (this.to_address.length) + writer.writeString(2, this.to_address); + if (this.amount.length) + writer.writeRepeatedMessage(3, this.amount, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreatePermanentLockedAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreatePermanentLockedAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.from_address = reader.readString(); + break; + case 2: + message.to_address = reader.readString(); + break; + case 3: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreatePermanentLockedAccount { + return MsgCreatePermanentLockedAccount.deserialize(bytes); + } + } + export class MsgCreatePermanentLockedAccountResponse 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: {}): MsgCreatePermanentLockedAccountResponse { + const message = new MsgCreatePermanentLockedAccountResponse({}); + 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): MsgCreatePermanentLockedAccountResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreatePermanentLockedAccountResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreatePermanentLockedAccountResponse { + return MsgCreatePermanentLockedAccountResponse.deserialize(bytes); + } + } + export class MsgCreatePeriodicVestingAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + from_address?: string; + to_address?: string; + start_time?: number; + vesting_periods?: dependency_4.cosmos.vesting.v1beta1.Period[]; + }) { + 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 ("from_address" in data && data.from_address != undefined) { + this.from_address = data.from_address; + } + if ("to_address" in data && data.to_address != undefined) { + this.to_address = data.to_address; + } + if ("start_time" in data && data.start_time != undefined) { + this.start_time = data.start_time; + } + if ("vesting_periods" in data && data.vesting_periods != undefined) { + this.vesting_periods = data.vesting_periods; + } + } + } + get from_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set from_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get to_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set to_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get start_time() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set start_time(value: number) { + pb_1.Message.setField(this, 3, value); + } + get vesting_periods() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.vesting.v1beta1.Period, 4) as dependency_4.cosmos.vesting.v1beta1.Period[]; + } + set vesting_periods(value: dependency_4.cosmos.vesting.v1beta1.Period[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + from_address?: string; + to_address?: string; + start_time?: number; + vesting_periods?: ReturnType[]; + }): MsgCreatePeriodicVestingAccount { + const message = new MsgCreatePeriodicVestingAccount({}); + if (data.from_address != null) { + message.from_address = data.from_address; + } + if (data.to_address != null) { + message.to_address = data.to_address; + } + if (data.start_time != null) { + message.start_time = data.start_time; + } + if (data.vesting_periods != null) { + message.vesting_periods = data.vesting_periods.map(item => dependency_4.cosmos.vesting.v1beta1.Period.fromObject(item)); + } + return message; + } + toObject() { + const data: { + from_address?: string; + to_address?: string; + start_time?: number; + vesting_periods?: ReturnType[]; + } = {}; + if (this.from_address != null) { + data.from_address = this.from_address; + } + if (this.to_address != null) { + data.to_address = this.to_address; + } + if (this.start_time != null) { + data.start_time = this.start_time; + } + if (this.vesting_periods != null) { + data.vesting_periods = this.vesting_periods.map((item: dependency_4.cosmos.vesting.v1beta1.Period) => item.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.from_address.length) + writer.writeString(1, this.from_address); + if (this.to_address.length) + writer.writeString(2, this.to_address); + if (this.start_time != 0) + writer.writeInt64(3, this.start_time); + if (this.vesting_periods.length) + writer.writeRepeatedMessage(4, this.vesting_periods, (item: dependency_4.cosmos.vesting.v1beta1.Period) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreatePeriodicVestingAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreatePeriodicVestingAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.from_address = reader.readString(); + break; + case 2: + message.to_address = reader.readString(); + break; + case 3: + message.start_time = reader.readInt64(); + break; + case 4: + reader.readMessage(message.vesting_periods, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_4.cosmos.vesting.v1beta1.Period.deserialize(reader), dependency_4.cosmos.vesting.v1beta1.Period)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreatePeriodicVestingAccount { + return MsgCreatePeriodicVestingAccount.deserialize(bytes); + } + } + export class MsgCreatePeriodicVestingAccountResponse 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: {}): MsgCreatePeriodicVestingAccountResponse { + const message = new MsgCreatePeriodicVestingAccountResponse({}); + 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): MsgCreatePeriodicVestingAccountResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreatePeriodicVestingAccountResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreatePeriodicVestingAccountResponse { + return MsgCreatePeriodicVestingAccountResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + CreateVestingAccount: { + path: "/cosmos.vesting.v1beta1.Msg/CreateVestingAccount", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreateVestingAccount) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreateVestingAccount.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreateVestingAccountResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreateVestingAccountResponse.deserialize(new Uint8Array(bytes)) + }, + CreatePermanentLockedAccount: { + path: "/cosmos.vesting.v1beta1.Msg/CreatePermanentLockedAccount", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreatePermanentLockedAccount) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreatePermanentLockedAccount.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreatePermanentLockedAccountResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreatePermanentLockedAccountResponse.deserialize(new Uint8Array(bytes)) + }, + CreatePeriodicVestingAccount: { + path: "/cosmos.vesting.v1beta1.Msg/CreatePeriodicVestingAccount", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreatePeriodicVestingAccount) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreatePeriodicVestingAccount.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreatePeriodicVestingAccountResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreatePeriodicVestingAccountResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CreateVestingAccount(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreatePermanentLockedAccount(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreatePeriodicVestingAccount(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CreateVestingAccount: GrpcUnaryServiceInterface = (message: MsgCreateVestingAccount, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateVestingAccount(message, metadata, options, callback); + }; + CreatePermanentLockedAccount: GrpcUnaryServiceInterface = (message: MsgCreatePermanentLockedAccount, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreatePermanentLockedAccount(message, metadata, options, callback); + }; + CreatePeriodicVestingAccount: GrpcUnaryServiceInterface = (message: MsgCreatePeriodicVestingAccount, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreatePeriodicVestingAccount(message, metadata, options, callback); + }; + } +} diff --git a/proto/cosmos/vesting/v1beta1/tx_pb.d.ts b/codegen/cosmos/vesting/v1beta1/tx_pb.d.ts similarity index 100% rename from proto/cosmos/vesting/v1beta1/tx_pb.d.ts rename to codegen/cosmos/vesting/v1beta1/tx_pb.d.ts diff --git a/proto/cosmos/vesting/v1beta1/tx_pb.js b/codegen/cosmos/vesting/v1beta1/tx_pb.js similarity index 100% rename from proto/cosmos/vesting/v1beta1/tx_pb.js rename to codegen/cosmos/vesting/v1beta1/tx_pb.js diff --git a/proto/cosmos/vesting/v1beta1/tx_pb_service.d.ts b/codegen/cosmos/vesting/v1beta1/tx_pb_service.d.ts similarity index 100% rename from proto/cosmos/vesting/v1beta1/tx_pb_service.d.ts rename to codegen/cosmos/vesting/v1beta1/tx_pb_service.d.ts diff --git a/proto/cosmos/vesting/v1beta1/tx_pb_service.js b/codegen/cosmos/vesting/v1beta1/tx_pb_service.js similarity index 100% rename from proto/cosmos/vesting/v1beta1/tx_pb_service.js rename to codegen/cosmos/vesting/v1beta1/tx_pb_service.js diff --git a/codegen/cosmos/vesting/v1beta1/vesting.ts b/codegen/cosmos/vesting/v1beta1/vesting.ts new file mode 100644 index 0000000..adc2476 --- /dev/null +++ b/codegen/cosmos/vesting/v1beta1/vesting.ts @@ -0,0 +1,613 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos/vesting/v1beta1/vesting.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../amino/amino"; +import * as dependency_2 from "./../../../gogoproto/gogo"; +import * as dependency_3 from "./../../base/v1beta1/coin"; +import * as dependency_4 from "./../../auth/v1beta1/auth"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos.vesting.v1beta1 { + export class BaseVestingAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + base_account?: dependency_4.cosmos.auth.v1beta1.BaseAccount; + original_vesting?: dependency_3.cosmos.base.v1beta1.Coin[]; + delegated_free?: dependency_3.cosmos.base.v1beta1.Coin[]; + delegated_vesting?: dependency_3.cosmos.base.v1beta1.Coin[]; + end_time?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("base_account" in data && data.base_account != undefined) { + this.base_account = data.base_account; + } + if ("original_vesting" in data && data.original_vesting != undefined) { + this.original_vesting = data.original_vesting; + } + if ("delegated_free" in data && data.delegated_free != undefined) { + this.delegated_free = data.delegated_free; + } + if ("delegated_vesting" in data && data.delegated_vesting != undefined) { + this.delegated_vesting = data.delegated_vesting; + } + if ("end_time" in data && data.end_time != undefined) { + this.end_time = data.end_time; + } + } + } + get base_account() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.auth.v1beta1.BaseAccount, 1) as dependency_4.cosmos.auth.v1beta1.BaseAccount; + } + set base_account(value: dependency_4.cosmos.auth.v1beta1.BaseAccount) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_base_account() { + return pb_1.Message.getField(this, 1) != null; + } + get original_vesting() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 2) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set original_vesting(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get delegated_free() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 3) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set delegated_free(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get delegated_vesting() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 4) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set delegated_vesting(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get end_time() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set end_time(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + base_account?: ReturnType; + original_vesting?: ReturnType[]; + delegated_free?: ReturnType[]; + delegated_vesting?: ReturnType[]; + end_time?: number; + }): BaseVestingAccount { + const message = new BaseVestingAccount({}); + if (data.base_account != null) { + message.base_account = dependency_4.cosmos.auth.v1beta1.BaseAccount.fromObject(data.base_account); + } + if (data.original_vesting != null) { + message.original_vesting = data.original_vesting.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.delegated_free != null) { + message.delegated_free = data.delegated_free.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.delegated_vesting != null) { + message.delegated_vesting = data.delegated_vesting.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.end_time != null) { + message.end_time = data.end_time; + } + return message; + } + toObject() { + const data: { + base_account?: ReturnType; + original_vesting?: ReturnType[]; + delegated_free?: ReturnType[]; + delegated_vesting?: ReturnType[]; + end_time?: number; + } = {}; + if (this.base_account != null) { + data.base_account = this.base_account.toObject(); + } + if (this.original_vesting != null) { + data.original_vesting = this.original_vesting.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.delegated_free != null) { + data.delegated_free = this.delegated_free.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.delegated_vesting != null) { + data.delegated_vesting = this.delegated_vesting.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.end_time != null) { + data.end_time = this.end_time; + } + 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_base_account) + writer.writeMessage(1, this.base_account, () => this.base_account.serialize(writer)); + if (this.original_vesting.length) + writer.writeRepeatedMessage(2, this.original_vesting, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.delegated_free.length) + writer.writeRepeatedMessage(3, this.delegated_free, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.delegated_vesting.length) + writer.writeRepeatedMessage(4, this.delegated_vesting, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.end_time != 0) + writer.writeInt64(5, this.end_time); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BaseVestingAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BaseVestingAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.base_account, () => message.base_account = dependency_4.cosmos.auth.v1beta1.BaseAccount.deserialize(reader)); + break; + case 2: + reader.readMessage(message.original_vesting, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + case 3: + reader.readMessage(message.delegated_free, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + case 4: + reader.readMessage(message.delegated_vesting, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + case 5: + message.end_time = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BaseVestingAccount { + return BaseVestingAccount.deserialize(bytes); + } + } + export class ContinuousVestingAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + base_vesting_account?: BaseVestingAccount; + start_time?: 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 ("base_vesting_account" in data && data.base_vesting_account != undefined) { + this.base_vesting_account = data.base_vesting_account; + } + if ("start_time" in data && data.start_time != undefined) { + this.start_time = data.start_time; + } + } + } + get base_vesting_account() { + return pb_1.Message.getWrapperField(this, BaseVestingAccount, 1) as BaseVestingAccount; + } + set base_vesting_account(value: BaseVestingAccount) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_base_vesting_account() { + return pb_1.Message.getField(this, 1) != null; + } + get start_time() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set start_time(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + base_vesting_account?: ReturnType; + start_time?: number; + }): ContinuousVestingAccount { + const message = new ContinuousVestingAccount({}); + if (data.base_vesting_account != null) { + message.base_vesting_account = BaseVestingAccount.fromObject(data.base_vesting_account); + } + if (data.start_time != null) { + message.start_time = data.start_time; + } + return message; + } + toObject() { + const data: { + base_vesting_account?: ReturnType; + start_time?: number; + } = {}; + if (this.base_vesting_account != null) { + data.base_vesting_account = this.base_vesting_account.toObject(); + } + if (this.start_time != null) { + data.start_time = this.start_time; + } + 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_base_vesting_account) + writer.writeMessage(1, this.base_vesting_account, () => this.base_vesting_account.serialize(writer)); + if (this.start_time != 0) + writer.writeInt64(2, this.start_time); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ContinuousVestingAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ContinuousVestingAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.base_vesting_account, () => message.base_vesting_account = BaseVestingAccount.deserialize(reader)); + break; + case 2: + message.start_time = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ContinuousVestingAccount { + return ContinuousVestingAccount.deserialize(bytes); + } + } + export class DelayedVestingAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + base_vesting_account?: BaseVestingAccount; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("base_vesting_account" in data && data.base_vesting_account != undefined) { + this.base_vesting_account = data.base_vesting_account; + } + } + } + get base_vesting_account() { + return pb_1.Message.getWrapperField(this, BaseVestingAccount, 1) as BaseVestingAccount; + } + set base_vesting_account(value: BaseVestingAccount) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_base_vesting_account() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + base_vesting_account?: ReturnType; + }): DelayedVestingAccount { + const message = new DelayedVestingAccount({}); + if (data.base_vesting_account != null) { + message.base_vesting_account = BaseVestingAccount.fromObject(data.base_vesting_account); + } + return message; + } + toObject() { + const data: { + base_vesting_account?: ReturnType; + } = {}; + if (this.base_vesting_account != null) { + data.base_vesting_account = this.base_vesting_account.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_base_vesting_account) + writer.writeMessage(1, this.base_vesting_account, () => this.base_vesting_account.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DelayedVestingAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DelayedVestingAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.base_vesting_account, () => message.base_vesting_account = BaseVestingAccount.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DelayedVestingAccount { + return DelayedVestingAccount.deserialize(bytes); + } + } + export class Period extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + length?: number; + amount?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("length" in data && data.length != undefined) { + this.length = data.length; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get length() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set length(value: number) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 2) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set amount(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + length?: number; + amount?: ReturnType[]; + }): Period { + const message = new Period({}); + if (data.length != null) { + message.length = data.length; + } + if (data.amount != null) { + message.amount = data.amount.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + length?: number; + amount?: ReturnType[]; + } = {}; + if (this.length != null) { + data.length = this.length; + } + if (this.amount != null) { + data.amount = this.amount.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.length != 0) + writer.writeInt64(1, this.length); + if (this.amount.length) + writer.writeRepeatedMessage(2, this.amount, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Period { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Period(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.length = reader.readInt64(); + break; + case 2: + reader.readMessage(message.amount, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Period { + return Period.deserialize(bytes); + } + } + export class PeriodicVestingAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + base_vesting_account?: BaseVestingAccount; + start_time?: number; + vesting_periods?: Period[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("base_vesting_account" in data && data.base_vesting_account != undefined) { + this.base_vesting_account = data.base_vesting_account; + } + if ("start_time" in data && data.start_time != undefined) { + this.start_time = data.start_time; + } + if ("vesting_periods" in data && data.vesting_periods != undefined) { + this.vesting_periods = data.vesting_periods; + } + } + } + get base_vesting_account() { + return pb_1.Message.getWrapperField(this, BaseVestingAccount, 1) as BaseVestingAccount; + } + set base_vesting_account(value: BaseVestingAccount) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_base_vesting_account() { + return pb_1.Message.getField(this, 1) != null; + } + get start_time() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set start_time(value: number) { + pb_1.Message.setField(this, 2, value); + } + get vesting_periods() { + return pb_1.Message.getRepeatedWrapperField(this, Period, 3) as Period[]; + } + set vesting_periods(value: Period[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + base_vesting_account?: ReturnType; + start_time?: number; + vesting_periods?: ReturnType[]; + }): PeriodicVestingAccount { + const message = new PeriodicVestingAccount({}); + if (data.base_vesting_account != null) { + message.base_vesting_account = BaseVestingAccount.fromObject(data.base_vesting_account); + } + if (data.start_time != null) { + message.start_time = data.start_time; + } + if (data.vesting_periods != null) { + message.vesting_periods = data.vesting_periods.map(item => Period.fromObject(item)); + } + return message; + } + toObject() { + const data: { + base_vesting_account?: ReturnType; + start_time?: number; + vesting_periods?: ReturnType[]; + } = {}; + if (this.base_vesting_account != null) { + data.base_vesting_account = this.base_vesting_account.toObject(); + } + if (this.start_time != null) { + data.start_time = this.start_time; + } + if (this.vesting_periods != null) { + data.vesting_periods = this.vesting_periods.map((item: Period) => item.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_base_vesting_account) + writer.writeMessage(1, this.base_vesting_account, () => this.base_vesting_account.serialize(writer)); + if (this.start_time != 0) + writer.writeInt64(2, this.start_time); + if (this.vesting_periods.length) + writer.writeRepeatedMessage(3, this.vesting_periods, (item: Period) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PeriodicVestingAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PeriodicVestingAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.base_vesting_account, () => message.base_vesting_account = BaseVestingAccount.deserialize(reader)); + break; + case 2: + message.start_time = reader.readInt64(); + break; + case 3: + reader.readMessage(message.vesting_periods, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Period.deserialize(reader), Period)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PeriodicVestingAccount { + return PeriodicVestingAccount.deserialize(bytes); + } + } + export class PermanentLockedAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + base_vesting_account?: BaseVestingAccount; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("base_vesting_account" in data && data.base_vesting_account != undefined) { + this.base_vesting_account = data.base_vesting_account; + } + } + } + get base_vesting_account() { + return pb_1.Message.getWrapperField(this, BaseVestingAccount, 1) as BaseVestingAccount; + } + set base_vesting_account(value: BaseVestingAccount) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_base_vesting_account() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + base_vesting_account?: ReturnType; + }): PermanentLockedAccount { + const message = new PermanentLockedAccount({}); + if (data.base_vesting_account != null) { + message.base_vesting_account = BaseVestingAccount.fromObject(data.base_vesting_account); + } + return message; + } + toObject() { + const data: { + base_vesting_account?: ReturnType; + } = {}; + if (this.base_vesting_account != null) { + data.base_vesting_account = this.base_vesting_account.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_base_vesting_account) + writer.writeMessage(1, this.base_vesting_account, () => this.base_vesting_account.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PermanentLockedAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PermanentLockedAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.base_vesting_account, () => message.base_vesting_account = BaseVestingAccount.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PermanentLockedAccount { + return PermanentLockedAccount.deserialize(bytes); + } + } +} diff --git a/proto/cosmos/vesting/v1beta1/vesting_pb.d.ts b/codegen/cosmos/vesting/v1beta1/vesting_pb.d.ts similarity index 100% rename from proto/cosmos/vesting/v1beta1/vesting_pb.d.ts rename to codegen/cosmos/vesting/v1beta1/vesting_pb.d.ts diff --git a/proto/cosmos/vesting/v1beta1/vesting_pb.js b/codegen/cosmos/vesting/v1beta1/vesting_pb.js similarity index 100% rename from proto/cosmos/vesting/v1beta1/vesting_pb.js rename to codegen/cosmos/vesting/v1beta1/vesting_pb.js diff --git a/proto/cosmos/vesting/v1beta1/vesting_pb_service.d.ts b/codegen/cosmos/vesting/v1beta1/vesting_pb_service.d.ts similarity index 100% rename from proto/cosmos/vesting/v1beta1/vesting_pb_service.d.ts rename to codegen/cosmos/vesting/v1beta1/vesting_pb_service.d.ts diff --git a/proto/cosmos/vesting/v1beta1/vesting_pb_service.js b/codegen/cosmos/vesting/v1beta1/vesting_pb_service.js similarity index 100% rename from proto/cosmos/vesting/v1beta1/vesting_pb_service.js rename to codegen/cosmos/vesting/v1beta1/vesting_pb_service.js diff --git a/codegen/cosmos_proto/cosmos.ts b/codegen/cosmos_proto/cosmos.ts new file mode 100644 index 0000000..474fe53 --- /dev/null +++ b/codegen/cosmos_proto/cosmos.ts @@ -0,0 +1,217 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: cosmos_proto/cosmos.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../google/protobuf/descriptor"; +import * as pb_1 from "google-protobuf"; +export namespace cosmos_proto { + export enum ScalarType { + SCALAR_TYPE_UNSPECIFIED = 0, + SCALAR_TYPE_STRING = 1, + SCALAR_TYPE_BYTES = 2 + } + export class InterfaceDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + description?: 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 ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + name?: string; + description?: string; + }): InterfaceDescriptor { + const message = new InterfaceDescriptor({}); + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + name?: string; + description?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + 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.name.length) + writer.writeString(1, this.name); + if (this.description.length) + writer.writeString(2, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InterfaceDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InterfaceDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InterfaceDescriptor { + return InterfaceDescriptor.deserialize(bytes); + } + } + export class ScalarDescriptor extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + description?: string; + field_type?: ScalarType[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("field_type" in data && data.field_type != undefined) { + this.field_type = data.field_type; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get field_type() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as ScalarType[]; + } + set field_type(value: ScalarType[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + name?: string; + description?: string; + field_type?: ScalarType[]; + }): ScalarDescriptor { + const message = new ScalarDescriptor({}); + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.field_type != null) { + message.field_type = data.field_type; + } + return message; + } + toObject() { + const data: { + name?: string; + description?: string; + field_type?: ScalarType[]; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.field_type != null) { + data.field_type = this.field_type; + } + 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.name.length) + writer.writeString(1, this.name); + if (this.description.length) + writer.writeString(2, this.description); + if (this.field_type.length) + writer.writePackedEnum(3, this.field_type); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ScalarDescriptor { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ScalarDescriptor(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + message.field_type = reader.readPackedEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ScalarDescriptor { + return ScalarDescriptor.deserialize(bytes); + } + } +} diff --git a/proto/cosmos_proto/cosmos_pb.d.ts b/codegen/cosmos_proto/cosmos_pb.d.ts similarity index 91% rename from proto/cosmos_proto/cosmos_pb.d.ts rename to codegen/cosmos_proto/cosmos_pb.d.ts index cac177a..ee7c25e 100644 --- a/proto/cosmos_proto/cosmos_pb.d.ts +++ b/codegen/cosmos_proto/cosmos_pb.d.ts @@ -58,16 +58,24 @@ export namespace ScalarDescriptor { } } + export const methodAddedIn: jspb.ExtensionFieldInfo; + export const implementsInterface: jspb.ExtensionFieldInfo; + export const messageAddedIn: jspb.ExtensionFieldInfo; + export const acceptsInterface: jspb.ExtensionFieldInfo; export const scalar: jspb.ExtensionFieldInfo; + export const fieldAddedIn: jspb.ExtensionFieldInfo; + export const declareInterface: jspb.ExtensionFieldInfo; export const declareScalar: jspb.ExtensionFieldInfo; + export const fileAddedIn: jspb.ExtensionFieldInfo; + export interface ScalarTypeMap { SCALAR_TYPE_UNSPECIFIED: 0; SCALAR_TYPE_STRING: 1; diff --git a/proto/cosmos_proto/cosmos_pb.js b/codegen/cosmos_proto/cosmos_pb.js similarity index 83% rename from proto/cosmos_proto/cosmos_pb.js rename to codegen/cosmos_proto/cosmos_pb.js index dc7c98c..ebd3ae1 100644 --- a/proto/cosmos_proto/cosmos_pb.js +++ b/codegen/cosmos_proto/cosmos_pb.js @@ -23,7 +23,11 @@ goog.exportSymbol('proto.cosmos_proto.ScalarType', null, global); goog.exportSymbol('proto.cosmos_proto.acceptsInterface', null, global); goog.exportSymbol('proto.cosmos_proto.declareInterfaceList', null, global); goog.exportSymbol('proto.cosmos_proto.declareScalarList', null, global); +goog.exportSymbol('proto.cosmos_proto.fieldAddedIn', null, global); +goog.exportSymbol('proto.cosmos_proto.fileAddedIn', null, global); goog.exportSymbol('proto.cosmos_proto.implementsInterfaceList', null, global); +goog.exportSymbol('proto.cosmos_proto.messageAddedIn', null, global); +goog.exportSymbol('proto.cosmos_proto.methodAddedIn', null, global); goog.exportSymbol('proto.cosmos_proto.scalar', null, global); /** * Generated by JsPbCodeGenerator. @@ -455,6 +459,31 @@ proto.cosmos_proto.ScalarType = { }; +/** + * A tuple of {field number, class constructor} for the extension + * field named `methodAddedIn`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.methodAddedIn = new jspb.ExtensionFieldInfo( + 93001, + {methodAddedIn: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[93001] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.methodAddedIn, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[93001] = proto.cosmos_proto.methodAddedIn; + + /** * A tuple of {field number, class constructor} for the extension * field named `implementsInterfaceList`. @@ -480,6 +509,31 @@ google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[93001] = new jspb. google_protobuf_descriptor_pb.MessageOptions.extensions[93001] = proto.cosmos_proto.implementsInterfaceList; +/** + * A tuple of {field number, class constructor} for the extension + * field named `messageAddedIn`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.messageAddedIn = new jspb.ExtensionFieldInfo( + 93002, + {messageAddedIn: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[93002] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.messageAddedIn, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[93002] = proto.cosmos_proto.messageAddedIn; + + /** * A tuple of {field number, class constructor} for the extension * field named `acceptsInterface`. @@ -530,6 +584,31 @@ google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[93002] = new jspb.Ex google_protobuf_descriptor_pb.FieldOptions.extensions[93002] = proto.cosmos_proto.scalar; +/** + * A tuple of {field number, class constructor} for the extension + * field named `fieldAddedIn`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.fieldAddedIn = new jspb.ExtensionFieldInfo( + 93003, + {fieldAddedIn: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[93003] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.fieldAddedIn, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[93003] = proto.cosmos_proto.fieldAddedIn; + + /** * A tuple of {field number, class constructor} for the extension * field named `declareInterfaceList`. @@ -579,4 +658,29 @@ google_protobuf_descriptor_pb.FileOptions.extensionsBinary[793022] = new jspb.Ex // toObject() will function correctly. google_protobuf_descriptor_pb.FileOptions.extensions[793022] = proto.cosmos_proto.declareScalarList; + +/** + * A tuple of {field number, class constructor} for the extension + * field named `fileAddedIn`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.fileAddedIn = new jspb.ExtensionFieldInfo( + 793023, + {fileAddedIn: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[793023] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.fileAddedIn, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[793023] = proto.cosmos_proto.fileAddedIn; + goog.object.extend(exports, proto.cosmos_proto); diff --git a/proto/cosmos_proto/cosmos_pb_service.d.ts b/codegen/cosmos_proto/cosmos_pb_service.d.ts similarity index 100% rename from proto/cosmos_proto/cosmos_pb_service.d.ts rename to codegen/cosmos_proto/cosmos_pb_service.d.ts diff --git a/proto/cosmos_proto/cosmos_pb_service.js b/codegen/cosmos_proto/cosmos_pb_service.js similarity index 100% rename from proto/cosmos_proto/cosmos_pb_service.js rename to codegen/cosmos_proto/cosmos_pb_service.js diff --git a/codegen/gogoproto/gogo.ts b/codegen/gogoproto/gogo.ts new file mode 100644 index 0000000..f64cb20 --- /dev/null +++ b/codegen/gogoproto/gogo.ts @@ -0,0 +1,7 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: gogoproto/gogo.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../google/protobuf/descriptor"; +export namespace gogoproto { } diff --git a/proto/gogoproto/gogo_pb.d.ts b/codegen/gogoproto/gogo_pb.d.ts similarity index 100% rename from proto/gogoproto/gogo_pb.d.ts rename to codegen/gogoproto/gogo_pb.d.ts diff --git a/proto/gogoproto/gogo_pb.js b/codegen/gogoproto/gogo_pb.js similarity index 100% rename from proto/gogoproto/gogo_pb.js rename to codegen/gogoproto/gogo_pb.js diff --git a/proto/gogoproto/gogo_pb_service.d.ts b/codegen/gogoproto/gogo_pb_service.d.ts similarity index 100% rename from proto/gogoproto/gogo_pb_service.d.ts rename to codegen/gogoproto/gogo_pb_service.d.ts diff --git a/proto/gogoproto/gogo_pb_service.js b/codegen/gogoproto/gogo_pb_service.js similarity index 100% rename from proto/gogoproto/gogo_pb_service.js rename to codegen/gogoproto/gogo_pb_service.js diff --git a/codegen/google/api/annotations.ts b/codegen/google/api/annotations.ts new file mode 100644 index 0000000..8328291 --- /dev/null +++ b/codegen/google/api/annotations.ts @@ -0,0 +1,8 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: google/api/annotations.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./http"; +import * as dependency_2 from "./../protobuf/descriptor"; +export namespace google.api { } diff --git a/proto/google/api/annotations_pb.d.ts b/codegen/google/api/annotations_pb.d.ts similarity index 100% rename from proto/google/api/annotations_pb.d.ts rename to codegen/google/api/annotations_pb.d.ts diff --git a/proto/google/api/annotations_pb.js b/codegen/google/api/annotations_pb.js similarity index 100% rename from proto/google/api/annotations_pb.js rename to codegen/google/api/annotations_pb.js diff --git a/proto/google/api/annotations_pb_service.d.ts b/codegen/google/api/annotations_pb_service.d.ts similarity index 100% rename from proto/google/api/annotations_pb_service.d.ts rename to codegen/google/api/annotations_pb_service.d.ts diff --git a/proto/google/api/annotations_pb_service.js b/codegen/google/api/annotations_pb_service.js similarity index 100% rename from proto/google/api/annotations_pb_service.js rename to codegen/google/api/annotations_pb_service.js diff --git a/codegen/google/api/http.ts b/codegen/google/api/http.ts new file mode 100644 index 0000000..921c01d --- /dev/null +++ b/codegen/google/api/http.ts @@ -0,0 +1,530 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: google/api/http.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace google.api { + export class Http extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + rules?: HttpRule[]; + fully_decode_reserved_expansion?: boolean; + }) { + 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 ("rules" in data && data.rules != undefined) { + this.rules = data.rules; + } + if ("fully_decode_reserved_expansion" in data && data.fully_decode_reserved_expansion != undefined) { + this.fully_decode_reserved_expansion = data.fully_decode_reserved_expansion; + } + } + } + get rules() { + return pb_1.Message.getRepeatedWrapperField(this, HttpRule, 1) as HttpRule[]; + } + set rules(value: HttpRule[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get fully_decode_reserved_expansion() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set fully_decode_reserved_expansion(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + rules?: ReturnType[]; + fully_decode_reserved_expansion?: boolean; + }): Http { + const message = new Http({}); + if (data.rules != null) { + message.rules = data.rules.map(item => HttpRule.fromObject(item)); + } + if (data.fully_decode_reserved_expansion != null) { + message.fully_decode_reserved_expansion = data.fully_decode_reserved_expansion; + } + return message; + } + toObject() { + const data: { + rules?: ReturnType[]; + fully_decode_reserved_expansion?: boolean; + } = {}; + if (this.rules != null) { + data.rules = this.rules.map((item: HttpRule) => item.toObject()); + } + if (this.fully_decode_reserved_expansion != null) { + data.fully_decode_reserved_expansion = this.fully_decode_reserved_expansion; + } + 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.rules.length) + writer.writeRepeatedMessage(1, this.rules, (item: HttpRule) => item.serialize(writer)); + if (this.fully_decode_reserved_expansion != false) + writer.writeBool(2, this.fully_decode_reserved_expansion); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Http { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Http(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.rules, () => pb_1.Message.addToRepeatedWrapperField(message, 1, HttpRule.deserialize(reader), HttpRule)); + break; + case 2: + message.fully_decode_reserved_expansion = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Http { + return Http.deserialize(bytes); + } + } + export class HttpRule extends pb_1.Message { + #one_of_decls: number[][] = [[2, 3, 4, 5, 6, 8]]; + constructor(data?: any[] | ({ + selector?: string; + body?: string; + response_body?: string; + additional_bindings?: HttpRule[]; + } & (({ + get?: string; + put?: never; + post?: never; + delete?: never; + patch?: never; + custom?: never; + } | { + get?: never; + put?: string; + post?: never; + delete?: never; + patch?: never; + custom?: never; + } | { + get?: never; + put?: never; + post?: string; + delete?: never; + patch?: never; + custom?: never; + } | { + get?: never; + put?: never; + post?: never; + delete?: string; + patch?: never; + custom?: never; + } | { + get?: never; + put?: never; + post?: never; + delete?: never; + patch?: string; + custom?: never; + } | { + get?: never; + put?: never; + post?: never; + delete?: never; + patch?: never; + custom?: CustomHttpPattern; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [11], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("selector" in data && data.selector != undefined) { + this.selector = data.selector; + } + if ("get" in data && data.get != undefined) { + this.get = data.get; + } + if ("put" in data && data.put != undefined) { + this.put = data.put; + } + if ("post" in data && data.post != undefined) { + this.post = data.post; + } + if ("delete" in data && data.delete != undefined) { + this.delete = data.delete; + } + if ("patch" in data && data.patch != undefined) { + this.patch = data.patch; + } + if ("custom" in data && data.custom != undefined) { + this.custom = data.custom; + } + if ("body" in data && data.body != undefined) { + this.body = data.body; + } + if ("response_body" in data && data.response_body != undefined) { + this.response_body = data.response_body; + } + if ("additional_bindings" in data && data.additional_bindings != undefined) { + this.additional_bindings = data.additional_bindings; + } + } + } + get selector() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set selector(value: string) { + pb_1.Message.setField(this, 1, value); + } + get get() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set get(value: string) { + pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value); + } + get has_get() { + return pb_1.Message.getField(this, 2) != null; + } + get put() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set put(value: string) { + pb_1.Message.setOneofField(this, 3, this.#one_of_decls[0], value); + } + get has_put() { + return pb_1.Message.getField(this, 3) != null; + } + get post() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set post(value: string) { + pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); + } + get has_post() { + return pb_1.Message.getField(this, 4) != null; + } + get delete() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set delete(value: string) { + pb_1.Message.setOneofField(this, 5, this.#one_of_decls[0], value); + } + get has_delete() { + return pb_1.Message.getField(this, 5) != null; + } + get patch() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set patch(value: string) { + pb_1.Message.setOneofField(this, 6, this.#one_of_decls[0], value); + } + get has_patch() { + return pb_1.Message.getField(this, 6) != null; + } + get custom() { + return pb_1.Message.getWrapperField(this, CustomHttpPattern, 8) as CustomHttpPattern; + } + set custom(value: CustomHttpPattern) { + pb_1.Message.setOneofWrapperField(this, 8, this.#one_of_decls[0], value); + } + get has_custom() { + return pb_1.Message.getField(this, 8) != null; + } + get body() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set body(value: string) { + pb_1.Message.setField(this, 7, value); + } + get response_body() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set response_body(value: string) { + pb_1.Message.setField(this, 12, value); + } + get additional_bindings() { + return pb_1.Message.getRepeatedWrapperField(this, HttpRule, 11) as HttpRule[]; + } + set additional_bindings(value: HttpRule[]) { + pb_1.Message.setRepeatedWrapperField(this, 11, value); + } + get pattern() { + const cases: { + [index: number]: "none" | "get" | "put" | "post" | "delete" | "patch" | "custom"; + } = { + 0: "none", + 2: "get", + 3: "put", + 4: "post", + 5: "delete", + 6: "patch", + 8: "custom" + }; + return cases[pb_1.Message.computeOneofCase(this, [2, 3, 4, 5, 6, 8])]; + } + static fromObject(data: { + selector?: string; + get?: string; + put?: string; + post?: string; + delete?: string; + patch?: string; + custom?: ReturnType; + body?: string; + response_body?: string; + additional_bindings?: ReturnType[]; + }): HttpRule { + const message = new HttpRule({}); + if (data.selector != null) { + message.selector = data.selector; + } + if (data.get != null) { + message.get = data.get; + } + if (data.put != null) { + message.put = data.put; + } + if (data.post != null) { + message.post = data.post; + } + if (data.delete != null) { + message.delete = data.delete; + } + if (data.patch != null) { + message.patch = data.patch; + } + if (data.custom != null) { + message.custom = CustomHttpPattern.fromObject(data.custom); + } + if (data.body != null) { + message.body = data.body; + } + if (data.response_body != null) { + message.response_body = data.response_body; + } + if (data.additional_bindings != null) { + message.additional_bindings = data.additional_bindings.map(item => HttpRule.fromObject(item)); + } + return message; + } + toObject() { + const data: { + selector?: string; + get?: string; + put?: string; + post?: string; + delete?: string; + patch?: string; + custom?: ReturnType; + body?: string; + response_body?: string; + additional_bindings?: ReturnType[]; + } = {}; + if (this.selector != null) { + data.selector = this.selector; + } + if (this.get != null) { + data.get = this.get; + } + if (this.put != null) { + data.put = this.put; + } + if (this.post != null) { + data.post = this.post; + } + if (this.delete != null) { + data.delete = this.delete; + } + if (this.patch != null) { + data.patch = this.patch; + } + if (this.custom != null) { + data.custom = this.custom.toObject(); + } + if (this.body != null) { + data.body = this.body; + } + if (this.response_body != null) { + data.response_body = this.response_body; + } + if (this.additional_bindings != null) { + data.additional_bindings = this.additional_bindings.map((item: HttpRule) => item.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.selector.length) + writer.writeString(1, this.selector); + if (this.has_get) + writer.writeString(2, this.get); + if (this.has_put) + writer.writeString(3, this.put); + if (this.has_post) + writer.writeString(4, this.post); + if (this.has_delete) + writer.writeString(5, this.delete); + if (this.has_patch) + writer.writeString(6, this.patch); + if (this.has_custom) + writer.writeMessage(8, this.custom, () => this.custom.serialize(writer)); + if (this.body.length) + writer.writeString(7, this.body); + if (this.response_body.length) + writer.writeString(12, this.response_body); + if (this.additional_bindings.length) + writer.writeRepeatedMessage(11, this.additional_bindings, (item: HttpRule) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HttpRule { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HttpRule(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.selector = reader.readString(); + break; + case 2: + message.get = reader.readString(); + break; + case 3: + message.put = reader.readString(); + break; + case 4: + message.post = reader.readString(); + break; + case 5: + message.delete = reader.readString(); + break; + case 6: + message.patch = reader.readString(); + break; + case 8: + reader.readMessage(message.custom, () => message.custom = CustomHttpPattern.deserialize(reader)); + break; + case 7: + message.body = reader.readString(); + break; + case 12: + message.response_body = reader.readString(); + break; + case 11: + reader.readMessage(message.additional_bindings, () => pb_1.Message.addToRepeatedWrapperField(message, 11, HttpRule.deserialize(reader), HttpRule)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): HttpRule { + return HttpRule.deserialize(bytes); + } + } + export class CustomHttpPattern extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + kind?: string; + path?: 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 ("kind" in data && data.kind != undefined) { + this.kind = data.kind; + } + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + } + } + get kind() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set kind(value: string) { + pb_1.Message.setField(this, 1, value); + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set path(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + kind?: string; + path?: string; + }): CustomHttpPattern { + const message = new CustomHttpPattern({}); + if (data.kind != null) { + message.kind = data.kind; + } + if (data.path != null) { + message.path = data.path; + } + return message; + } + toObject() { + const data: { + kind?: string; + path?: string; + } = {}; + if (this.kind != null) { + data.kind = this.kind; + } + if (this.path != null) { + data.path = this.path; + } + 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.kind.length) + writer.writeString(1, this.kind); + if (this.path.length) + writer.writeString(2, this.path); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CustomHttpPattern { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CustomHttpPattern(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.kind = reader.readString(); + break; + case 2: + message.path = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CustomHttpPattern { + return CustomHttpPattern.deserialize(bytes); + } + } +} diff --git a/proto/google/api/http_pb.d.ts b/codegen/google/api/http_pb.d.ts similarity index 100% rename from proto/google/api/http_pb.d.ts rename to codegen/google/api/http_pb.d.ts diff --git a/proto/google/api/http_pb.js b/codegen/google/api/http_pb.js similarity index 100% rename from proto/google/api/http_pb.js rename to codegen/google/api/http_pb.js diff --git a/proto/google/api/http_pb_service.d.ts b/codegen/google/api/http_pb_service.d.ts similarity index 100% rename from proto/google/api/http_pb_service.d.ts rename to codegen/google/api/http_pb_service.d.ts diff --git a/proto/google/api/http_pb_service.js b/codegen/google/api/http_pb_service.js similarity index 100% rename from proto/google/api/http_pb_service.js rename to codegen/google/api/http_pb_service.js diff --git a/codegen/google/protobuf/any.ts b/codegen/google/protobuf/any.ts new file mode 100644 index 0000000..47ed0b4 --- /dev/null +++ b/codegen/google/protobuf/any.ts @@ -0,0 +1,98 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: google/protobuf/any.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace google.protobuf { + export class Any extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type_url?: string; + value?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type_url" in data && data.type_url != undefined) { + this.type_url = data.type_url; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get type_url() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set type_url(value: string) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + type_url?: string; + value?: Uint8Array; + }): Any { + const message = new Any({}); + if (data.type_url != null) { + message.type_url = data.type_url; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + type_url?: string; + value?: Uint8Array; + } = {}; + if (this.type_url != null) { + data.type_url = this.type_url; + } + if (this.value != null) { + data.value = this.value; + } + 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.type_url.length) + writer.writeString(1, this.type_url); + if (this.value.length) + writer.writeBytes(2, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Any { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Any(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type_url = reader.readString(); + break; + case 2: + message.value = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Any { + return Any.deserialize(bytes); + } + } +} diff --git a/codegen/google/protobuf/descriptor.ts b/codegen/google/protobuf/descriptor.ts new file mode 100644 index 0000000..92a3c77 --- /dev/null +++ b/codegen/google/protobuf/descriptor.ts @@ -0,0 +1,4286 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: google/protobuf/descriptor.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace google.protobuf { + export class FileDescriptorSet extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + file: FileDescriptorProto[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + this.file = data.file; + } + } + get file() { + return pb_1.Message.getRepeatedWrapperField(this, FileDescriptorProto, 1) as FileDescriptorProto[]; + } + set file(value: FileDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + file?: ReturnType[]; + }): FileDescriptorSet { + const message = new FileDescriptorSet({ + file: data.file.map(item => FileDescriptorProto.fromObject(item)) + }); + return message; + } + toObject() { + const data: { + file?: ReturnType[]; + } = {}; + if (this.file != null) { + data.file = this.file.map((item: FileDescriptorProto) => item.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.file.length) + writer.writeRepeatedMessage(1, this.file, (item: FileDescriptorProto) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FileDescriptorSet { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FileDescriptorSet(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.file, () => pb_1.Message.addToRepeatedWrapperField(message, 1, FileDescriptorProto.deserialize(reader), FileDescriptorProto)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FileDescriptorSet { + return FileDescriptorSet.deserialize(bytes); + } + } + export class FileDescriptorProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + package?: string; + dependency: string[]; + public_dependency: number[]; + weak_dependency: number[]; + message_type: DescriptorProto[]; + enum_type: EnumDescriptorProto[]; + service: ServiceDescriptorProto[]; + extension: FieldDescriptorProto[]; + options?: FileOptions; + source_code_info?: SourceCodeInfo; + syntax?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 10, 11, 4, 5, 6, 7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("package" in data && data.package != undefined) { + this.package = data.package; + } + this.dependency = data.dependency; + this.public_dependency = data.public_dependency; + this.weak_dependency = data.weak_dependency; + this.message_type = data.message_type; + this.enum_type = data.enum_type; + this.service = data.service; + this.extension = data.extension; + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + if ("source_code_info" in data && data.source_code_info != undefined) { + this.source_code_info = data.source_code_info; + } + if ("syntax" in data && data.syntax != undefined) { + this.syntax = data.syntax; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_name() { + return pb_1.Message.getField(this, 1) != null; + } + get package() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set package(value: string) { + pb_1.Message.setField(this, 2, value); + } + get has_package() { + return pb_1.Message.getField(this, 2) != null; + } + get dependency() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set dependency(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + get public_dependency() { + return pb_1.Message.getFieldWithDefault(this, 10, []) as number[]; + } + set public_dependency(value: number[]) { + pb_1.Message.setField(this, 10, value); + } + get weak_dependency() { + return pb_1.Message.getFieldWithDefault(this, 11, []) as number[]; + } + set weak_dependency(value: number[]) { + pb_1.Message.setField(this, 11, value); + } + get message_type() { + return pb_1.Message.getRepeatedWrapperField(this, DescriptorProto, 4) as DescriptorProto[]; + } + set message_type(value: DescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get enum_type() { + return pb_1.Message.getRepeatedWrapperField(this, EnumDescriptorProto, 5) as EnumDescriptorProto[]; + } + set enum_type(value: EnumDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get service() { + return pb_1.Message.getRepeatedWrapperField(this, ServiceDescriptorProto, 6) as ServiceDescriptorProto[]; + } + set service(value: ServiceDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get extension() { + return pb_1.Message.getRepeatedWrapperField(this, FieldDescriptorProto, 7) as FieldDescriptorProto[]; + } + set extension(value: FieldDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get options() { + return pb_1.Message.getWrapperField(this, FileOptions, 8) as FileOptions; + } + set options(value: FileOptions) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_options() { + return pb_1.Message.getField(this, 8) != null; + } + get source_code_info() { + return pb_1.Message.getWrapperField(this, SourceCodeInfo, 9) as SourceCodeInfo; + } + set source_code_info(value: SourceCodeInfo) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_source_code_info() { + return pb_1.Message.getField(this, 9) != null; + } + get syntax() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set syntax(value: string) { + pb_1.Message.setField(this, 12, value); + } + get has_syntax() { + return pb_1.Message.getField(this, 12) != null; + } + static fromObject(data: { + name?: string; + package?: string; + dependency: string[]; + public_dependency: number[]; + weak_dependency: number[]; + message_type?: ReturnType[]; + enum_type?: ReturnType[]; + service?: ReturnType[]; + extension?: ReturnType[]; + options?: ReturnType; + source_code_info?: ReturnType; + syntax?: string; + }): FileDescriptorProto { + const message = new FileDescriptorProto({ + dependency: data.dependency, + public_dependency: data.public_dependency, + weak_dependency: data.weak_dependency, + message_type: data.message_type.map(item => DescriptorProto.fromObject(item)), + enum_type: data.enum_type.map(item => EnumDescriptorProto.fromObject(item)), + service: data.service.map(item => ServiceDescriptorProto.fromObject(item)), + extension: data.extension.map(item => FieldDescriptorProto.fromObject(item)) + }); + if (data.name != null) { + message.name = data.name; + } + if (data.package != null) { + message.package = data.package; + } + if (data.options != null) { + message.options = FileOptions.fromObject(data.options); + } + if (data.source_code_info != null) { + message.source_code_info = SourceCodeInfo.fromObject(data.source_code_info); + } + if (data.syntax != null) { + message.syntax = data.syntax; + } + return message; + } + toObject() { + const data: { + name?: string; + package?: string; + dependency: string[]; + public_dependency: number[]; + weak_dependency: number[]; + message_type?: ReturnType[]; + enum_type?: ReturnType[]; + service?: ReturnType[]; + extension?: ReturnType[]; + options?: ReturnType; + source_code_info?: ReturnType; + syntax?: string; + } = { + dependency: this.dependency, + public_dependency: this.public_dependency, + weak_dependency: this.weak_dependency + }; + if (this.name != null) { + data.name = this.name; + } + if (this.package != null) { + data.package = this.package; + } + if (this.message_type != null) { + data.message_type = this.message_type.map((item: DescriptorProto) => item.toObject()); + } + if (this.enum_type != null) { + data.enum_type = this.enum_type.map((item: EnumDescriptorProto) => item.toObject()); + } + if (this.service != null) { + data.service = this.service.map((item: ServiceDescriptorProto) => item.toObject()); + } + if (this.extension != null) { + data.extension = this.extension.map((item: FieldDescriptorProto) => item.toObject()); + } + if (this.options != null) { + data.options = this.options.toObject(); + } + if (this.source_code_info != null) { + data.source_code_info = this.source_code_info.toObject(); + } + if (this.syntax != null) { + data.syntax = this.syntax; + } + 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_name && this.name.length) + writer.writeString(1, this.name); + if (this.has_package && this.package.length) + writer.writeString(2, this.package); + if (this.dependency.length) + writer.writeRepeatedString(3, this.dependency); + if (this.public_dependency.length) + writer.writeRepeatedInt32(10, this.public_dependency); + if (this.weak_dependency.length) + writer.writeRepeatedInt32(11, this.weak_dependency); + if (this.message_type.length) + writer.writeRepeatedMessage(4, this.message_type, (item: DescriptorProto) => item.serialize(writer)); + if (this.enum_type.length) + writer.writeRepeatedMessage(5, this.enum_type, (item: EnumDescriptorProto) => item.serialize(writer)); + if (this.service.length) + writer.writeRepeatedMessage(6, this.service, (item: ServiceDescriptorProto) => item.serialize(writer)); + if (this.extension.length) + writer.writeRepeatedMessage(7, this.extension, (item: FieldDescriptorProto) => item.serialize(writer)); + if (this.has_options) + writer.writeMessage(8, this.options, () => this.options.serialize(writer)); + if (this.has_source_code_info) + writer.writeMessage(9, this.source_code_info, () => this.source_code_info.serialize(writer)); + if (this.has_syntax && this.syntax.length) + writer.writeString(12, this.syntax); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FileDescriptorProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FileDescriptorProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.package = reader.readString(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + case 10: + pb_1.Message.addToRepeatedField(message, 10, reader.readInt32()); + break; + case 11: + pb_1.Message.addToRepeatedField(message, 11, reader.readInt32()); + break; + case 4: + reader.readMessage(message.message_type, () => pb_1.Message.addToRepeatedWrapperField(message, 4, DescriptorProto.deserialize(reader), DescriptorProto)); + break; + case 5: + reader.readMessage(message.enum_type, () => pb_1.Message.addToRepeatedWrapperField(message, 5, EnumDescriptorProto.deserialize(reader), EnumDescriptorProto)); + break; + case 6: + reader.readMessage(message.service, () => pb_1.Message.addToRepeatedWrapperField(message, 6, ServiceDescriptorProto.deserialize(reader), ServiceDescriptorProto)); + break; + case 7: + reader.readMessage(message.extension, () => pb_1.Message.addToRepeatedWrapperField(message, 7, FieldDescriptorProto.deserialize(reader), FieldDescriptorProto)); + break; + case 8: + reader.readMessage(message.options, () => message.options = FileOptions.deserialize(reader)); + break; + case 9: + reader.readMessage(message.source_code_info, () => message.source_code_info = SourceCodeInfo.deserialize(reader)); + break; + case 12: + message.syntax = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FileDescriptorProto { + return FileDescriptorProto.deserialize(bytes); + } + } + export class DescriptorProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + field: FieldDescriptorProto[]; + extension: FieldDescriptorProto[]; + nested_type: DescriptorProto[]; + enum_type: EnumDescriptorProto[]; + extension_range: DescriptorProto.ExtensionRange[]; + oneof_decl: OneofDescriptorProto[]; + options?: MessageOptions; + reserved_range: DescriptorProto.ReservedRange[]; + reserved_name: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 6, 3, 4, 5, 8, 9, 10], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + this.field = data.field; + this.extension = data.extension; + this.nested_type = data.nested_type; + this.enum_type = data.enum_type; + this.extension_range = data.extension_range; + this.oneof_decl = data.oneof_decl; + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + this.reserved_range = data.reserved_range; + this.reserved_name = data.reserved_name; + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_name() { + return pb_1.Message.getField(this, 1) != null; + } + get field() { + return pb_1.Message.getRepeatedWrapperField(this, FieldDescriptorProto, 2) as FieldDescriptorProto[]; + } + set field(value: FieldDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get extension() { + return pb_1.Message.getRepeatedWrapperField(this, FieldDescriptorProto, 6) as FieldDescriptorProto[]; + } + set extension(value: FieldDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get nested_type() { + return pb_1.Message.getRepeatedWrapperField(this, DescriptorProto, 3) as DescriptorProto[]; + } + set nested_type(value: DescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get enum_type() { + return pb_1.Message.getRepeatedWrapperField(this, EnumDescriptorProto, 4) as EnumDescriptorProto[]; + } + set enum_type(value: EnumDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get extension_range() { + return pb_1.Message.getRepeatedWrapperField(this, DescriptorProto.ExtensionRange, 5) as DescriptorProto.ExtensionRange[]; + } + set extension_range(value: DescriptorProto.ExtensionRange[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get oneof_decl() { + return pb_1.Message.getRepeatedWrapperField(this, OneofDescriptorProto, 8) as OneofDescriptorProto[]; + } + set oneof_decl(value: OneofDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + get options() { + return pb_1.Message.getWrapperField(this, MessageOptions, 7) as MessageOptions; + } + set options(value: MessageOptions) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_options() { + return pb_1.Message.getField(this, 7) != null; + } + get reserved_range() { + return pb_1.Message.getRepeatedWrapperField(this, DescriptorProto.ReservedRange, 9) as DescriptorProto.ReservedRange[]; + } + set reserved_range(value: DescriptorProto.ReservedRange[]) { + pb_1.Message.setRepeatedWrapperField(this, 9, value); + } + get reserved_name() { + return pb_1.Message.getFieldWithDefault(this, 10, []) as string[]; + } + set reserved_name(value: string[]) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + name?: string; + field?: ReturnType[]; + extension?: ReturnType[]; + nested_type?: ReturnType[]; + enum_type?: ReturnType[]; + extension_range?: ReturnType[]; + oneof_decl?: ReturnType[]; + options?: ReturnType; + reserved_range?: ReturnType[]; + reserved_name: string[]; + }): DescriptorProto { + const message = new DescriptorProto({ + field: data.field.map(item => FieldDescriptorProto.fromObject(item)), + extension: data.extension.map(item => FieldDescriptorProto.fromObject(item)), + nested_type: data.nested_type.map(item => DescriptorProto.fromObject(item)), + enum_type: data.enum_type.map(item => EnumDescriptorProto.fromObject(item)), + extension_range: data.extension_range.map(item => DescriptorProto.ExtensionRange.fromObject(item)), + oneof_decl: data.oneof_decl.map(item => OneofDescriptorProto.fromObject(item)), + reserved_range: data.reserved_range.map(item => DescriptorProto.ReservedRange.fromObject(item)), + reserved_name: data.reserved_name + }); + if (data.name != null) { + message.name = data.name; + } + if (data.options != null) { + message.options = MessageOptions.fromObject(data.options); + } + return message; + } + toObject() { + const data: { + name?: string; + field?: ReturnType[]; + extension?: ReturnType[]; + nested_type?: ReturnType[]; + enum_type?: ReturnType[]; + extension_range?: ReturnType[]; + oneof_decl?: ReturnType[]; + options?: ReturnType; + reserved_range?: ReturnType[]; + reserved_name: string[]; + } = { + reserved_name: this.reserved_name + }; + if (this.name != null) { + data.name = this.name; + } + if (this.field != null) { + data.field = this.field.map((item: FieldDescriptorProto) => item.toObject()); + } + if (this.extension != null) { + data.extension = this.extension.map((item: FieldDescriptorProto) => item.toObject()); + } + if (this.nested_type != null) { + data.nested_type = this.nested_type.map((item: DescriptorProto) => item.toObject()); + } + if (this.enum_type != null) { + data.enum_type = this.enum_type.map((item: EnumDescriptorProto) => item.toObject()); + } + if (this.extension_range != null) { + data.extension_range = this.extension_range.map((item: DescriptorProto.ExtensionRange) => item.toObject()); + } + if (this.oneof_decl != null) { + data.oneof_decl = this.oneof_decl.map((item: OneofDescriptorProto) => item.toObject()); + } + if (this.options != null) { + data.options = this.options.toObject(); + } + if (this.reserved_range != null) { + data.reserved_range = this.reserved_range.map((item: DescriptorProto.ReservedRange) => item.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_name && this.name.length) + writer.writeString(1, this.name); + if (this.field.length) + writer.writeRepeatedMessage(2, this.field, (item: FieldDescriptorProto) => item.serialize(writer)); + if (this.extension.length) + writer.writeRepeatedMessage(6, this.extension, (item: FieldDescriptorProto) => item.serialize(writer)); + if (this.nested_type.length) + writer.writeRepeatedMessage(3, this.nested_type, (item: DescriptorProto) => item.serialize(writer)); + if (this.enum_type.length) + writer.writeRepeatedMessage(4, this.enum_type, (item: EnumDescriptorProto) => item.serialize(writer)); + if (this.extension_range.length) + writer.writeRepeatedMessage(5, this.extension_range, (item: DescriptorProto.ExtensionRange) => item.serialize(writer)); + if (this.oneof_decl.length) + writer.writeRepeatedMessage(8, this.oneof_decl, (item: OneofDescriptorProto) => item.serialize(writer)); + if (this.has_options) + writer.writeMessage(7, this.options, () => this.options.serialize(writer)); + if (this.reserved_range.length) + writer.writeRepeatedMessage(9, this.reserved_range, (item: DescriptorProto.ReservedRange) => item.serialize(writer)); + if (this.reserved_name.length) + writer.writeRepeatedString(10, this.reserved_name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DescriptorProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DescriptorProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + reader.readMessage(message.field, () => pb_1.Message.addToRepeatedWrapperField(message, 2, FieldDescriptorProto.deserialize(reader), FieldDescriptorProto)); + break; + case 6: + reader.readMessage(message.extension, () => pb_1.Message.addToRepeatedWrapperField(message, 6, FieldDescriptorProto.deserialize(reader), FieldDescriptorProto)); + break; + case 3: + reader.readMessage(message.nested_type, () => pb_1.Message.addToRepeatedWrapperField(message, 3, DescriptorProto.deserialize(reader), DescriptorProto)); + break; + case 4: + reader.readMessage(message.enum_type, () => pb_1.Message.addToRepeatedWrapperField(message, 4, EnumDescriptorProto.deserialize(reader), EnumDescriptorProto)); + break; + case 5: + reader.readMessage(message.extension_range, () => pb_1.Message.addToRepeatedWrapperField(message, 5, DescriptorProto.ExtensionRange.deserialize(reader), DescriptorProto.ExtensionRange)); + break; + case 8: + reader.readMessage(message.oneof_decl, () => pb_1.Message.addToRepeatedWrapperField(message, 8, OneofDescriptorProto.deserialize(reader), OneofDescriptorProto)); + break; + case 7: + reader.readMessage(message.options, () => message.options = MessageOptions.deserialize(reader)); + break; + case 9: + reader.readMessage(message.reserved_range, () => pb_1.Message.addToRepeatedWrapperField(message, 9, DescriptorProto.ReservedRange.deserialize(reader), DescriptorProto.ReservedRange)); + break; + case 10: + pb_1.Message.addToRepeatedField(message, 10, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DescriptorProto { + return DescriptorProto.deserialize(bytes); + } + } + export namespace DescriptorProto { + export class ExtensionRange extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + start?: number; + end?: number; + options?: ExtensionRangeOptions; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("start" in data && data.start != undefined) { + this.start = data.start; + } + if ("end" in data && data.end != undefined) { + this.end = data.end; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + } + } + get start() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set start(value: number) { + pb_1.Message.setField(this, 1, value); + } + get has_start() { + return pb_1.Message.getField(this, 1) != null; + } + get end() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set end(value: number) { + pb_1.Message.setField(this, 2, value); + } + get has_end() { + return pb_1.Message.getField(this, 2) != null; + } + get options() { + return pb_1.Message.getWrapperField(this, ExtensionRangeOptions, 3) as ExtensionRangeOptions; + } + set options(value: ExtensionRangeOptions) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_options() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + start?: number; + end?: number; + options?: ReturnType; + }): ExtensionRange { + const message = new ExtensionRange({}); + if (data.start != null) { + message.start = data.start; + } + if (data.end != null) { + message.end = data.end; + } + if (data.options != null) { + message.options = ExtensionRangeOptions.fromObject(data.options); + } + return message; + } + toObject() { + const data: { + start?: number; + end?: number; + options?: ReturnType; + } = {}; + if (this.start != null) { + data.start = this.start; + } + if (this.end != null) { + data.end = this.end; + } + if (this.options != null) { + data.options = this.options.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_start) + writer.writeInt32(1, this.start); + if (this.has_end) + writer.writeInt32(2, this.end); + if (this.has_options) + writer.writeMessage(3, this.options, () => this.options.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExtensionRange { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExtensionRange(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.start = reader.readInt32(); + break; + case 2: + message.end = reader.readInt32(); + break; + case 3: + reader.readMessage(message.options, () => message.options = ExtensionRangeOptions.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ExtensionRange { + return ExtensionRange.deserialize(bytes); + } + } + export class ReservedRange extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + start?: number; + end?: 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 ("start" in data && data.start != undefined) { + this.start = data.start; + } + if ("end" in data && data.end != undefined) { + this.end = data.end; + } + } + } + get start() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set start(value: number) { + pb_1.Message.setField(this, 1, value); + } + get has_start() { + return pb_1.Message.getField(this, 1) != null; + } + get end() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set end(value: number) { + pb_1.Message.setField(this, 2, value); + } + get has_end() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + start?: number; + end?: number; + }): ReservedRange { + const message = new ReservedRange({}); + if (data.start != null) { + message.start = data.start; + } + if (data.end != null) { + message.end = data.end; + } + return message; + } + toObject() { + const data: { + start?: number; + end?: number; + } = {}; + if (this.start != null) { + data.start = this.start; + } + if (this.end != null) { + data.end = this.end; + } + 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_start) + writer.writeInt32(1, this.start); + if (this.has_end) + writer.writeInt32(2, this.end); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ReservedRange { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ReservedRange(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.start = reader.readInt32(); + break; + case 2: + message.end = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ReservedRange { + return ReservedRange.deserialize(bytes); + } + } + } + export class ExtensionRangeOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + uninterpreted_option: UninterpretedOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + this.uninterpreted_option = data.uninterpreted_option; + } + } + get uninterpreted_option() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; + } + set uninterpreted_option(value: UninterpretedOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 999, value); + } + static fromObject(data: { + uninterpreted_option?: ReturnType[]; + }): ExtensionRangeOptions { + const message = new ExtensionRangeOptions({ + uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) + }); + return message; + } + toObject() { + const data: { + uninterpreted_option?: ReturnType[]; + } = {}; + if (this.uninterpreted_option != null) { + data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.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.uninterpreted_option.length) + writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExtensionRangeOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExtensionRangeOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 999: + reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ExtensionRangeOptions { + return ExtensionRangeOptions.deserialize(bytes); + } + } + export class FieldDescriptorProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + number?: number; + label?: FieldDescriptorProto.Label; + type?: FieldDescriptorProto.Type; + type_name?: string; + extendee?: string; + default_value?: string; + oneof_index?: number; + json_name?: string; + options?: FieldOptions; + proto3_optional?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("number" in data && data.number != undefined) { + this.number = data.number; + } + if ("label" in data && data.label != undefined) { + this.label = data.label; + } + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("type_name" in data && data.type_name != undefined) { + this.type_name = data.type_name; + } + if ("extendee" in data && data.extendee != undefined) { + this.extendee = data.extendee; + } + if ("default_value" in data && data.default_value != undefined) { + this.default_value = data.default_value; + } + if ("oneof_index" in data && data.oneof_index != undefined) { + this.oneof_index = data.oneof_index; + } + if ("json_name" in data && data.json_name != undefined) { + this.json_name = data.json_name; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + if ("proto3_optional" in data && data.proto3_optional != undefined) { + this.proto3_optional = data.proto3_optional; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_name() { + return pb_1.Message.getField(this, 1) != null; + } + get number() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set number(value: number) { + pb_1.Message.setField(this, 3, value); + } + get has_number() { + return pb_1.Message.getField(this, 3) != null; + } + get label() { + return pb_1.Message.getFieldWithDefault(this, 4, FieldDescriptorProto.Label.LABEL_OPTIONAL) as FieldDescriptorProto.Label; + } + set label(value: FieldDescriptorProto.Label) { + pb_1.Message.setField(this, 4, value); + } + get has_label() { + return pb_1.Message.getField(this, 4) != null; + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 5, FieldDescriptorProto.Type.TYPE_DOUBLE) as FieldDescriptorProto.Type; + } + set type(value: FieldDescriptorProto.Type) { + pb_1.Message.setField(this, 5, value); + } + get has_type() { + return pb_1.Message.getField(this, 5) != null; + } + get type_name() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set type_name(value: string) { + pb_1.Message.setField(this, 6, value); + } + get has_type_name() { + return pb_1.Message.getField(this, 6) != null; + } + get extendee() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set extendee(value: string) { + pb_1.Message.setField(this, 2, value); + } + get has_extendee() { + return pb_1.Message.getField(this, 2) != null; + } + get default_value() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set default_value(value: string) { + pb_1.Message.setField(this, 7, value); + } + get has_default_value() { + return pb_1.Message.getField(this, 7) != null; + } + get oneof_index() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set oneof_index(value: number) { + pb_1.Message.setField(this, 9, value); + } + get has_oneof_index() { + return pb_1.Message.getField(this, 9) != null; + } + get json_name() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set json_name(value: string) { + pb_1.Message.setField(this, 10, value); + } + get has_json_name() { + return pb_1.Message.getField(this, 10) != null; + } + get options() { + return pb_1.Message.getWrapperField(this, FieldOptions, 8) as FieldOptions; + } + set options(value: FieldOptions) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_options() { + return pb_1.Message.getField(this, 8) != null; + } + get proto3_optional() { + return pb_1.Message.getFieldWithDefault(this, 17, false) as boolean; + } + set proto3_optional(value: boolean) { + pb_1.Message.setField(this, 17, value); + } + get has_proto3_optional() { + return pb_1.Message.getField(this, 17) != null; + } + static fromObject(data: { + name?: string; + number?: number; + label?: FieldDescriptorProto.Label; + type?: FieldDescriptorProto.Type; + type_name?: string; + extendee?: string; + default_value?: string; + oneof_index?: number; + json_name?: string; + options?: ReturnType; + proto3_optional?: boolean; + }): FieldDescriptorProto { + const message = new FieldDescriptorProto({}); + if (data.name != null) { + message.name = data.name; + } + if (data.number != null) { + message.number = data.number; + } + if (data.label != null) { + message.label = data.label; + } + if (data.type != null) { + message.type = data.type; + } + if (data.type_name != null) { + message.type_name = data.type_name; + } + if (data.extendee != null) { + message.extendee = data.extendee; + } + if (data.default_value != null) { + message.default_value = data.default_value; + } + if (data.oneof_index != null) { + message.oneof_index = data.oneof_index; + } + if (data.json_name != null) { + message.json_name = data.json_name; + } + if (data.options != null) { + message.options = FieldOptions.fromObject(data.options); + } + if (data.proto3_optional != null) { + message.proto3_optional = data.proto3_optional; + } + return message; + } + toObject() { + const data: { + name?: string; + number?: number; + label?: FieldDescriptorProto.Label; + type?: FieldDescriptorProto.Type; + type_name?: string; + extendee?: string; + default_value?: string; + oneof_index?: number; + json_name?: string; + options?: ReturnType; + proto3_optional?: boolean; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.number != null) { + data.number = this.number; + } + if (this.label != null) { + data.label = this.label; + } + if (this.type != null) { + data.type = this.type; + } + if (this.type_name != null) { + data.type_name = this.type_name; + } + if (this.extendee != null) { + data.extendee = this.extendee; + } + if (this.default_value != null) { + data.default_value = this.default_value; + } + if (this.oneof_index != null) { + data.oneof_index = this.oneof_index; + } + if (this.json_name != null) { + data.json_name = this.json_name; + } + if (this.options != null) { + data.options = this.options.toObject(); + } + if (this.proto3_optional != null) { + data.proto3_optional = this.proto3_optional; + } + 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_name && this.name.length) + writer.writeString(1, this.name); + if (this.has_number) + writer.writeInt32(3, this.number); + if (this.has_label) + writer.writeEnum(4, this.label); + if (this.has_type) + writer.writeEnum(5, this.type); + if (this.has_type_name && this.type_name.length) + writer.writeString(6, this.type_name); + if (this.has_extendee && this.extendee.length) + writer.writeString(2, this.extendee); + if (this.has_default_value && this.default_value.length) + writer.writeString(7, this.default_value); + if (this.has_oneof_index) + writer.writeInt32(9, this.oneof_index); + if (this.has_json_name && this.json_name.length) + writer.writeString(10, this.json_name); + if (this.has_options) + writer.writeMessage(8, this.options, () => this.options.serialize(writer)); + if (this.has_proto3_optional) + writer.writeBool(17, this.proto3_optional); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FieldDescriptorProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FieldDescriptorProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 3: + message.number = reader.readInt32(); + break; + case 4: + message.label = reader.readEnum(); + break; + case 5: + message.type = reader.readEnum(); + break; + case 6: + message.type_name = reader.readString(); + break; + case 2: + message.extendee = reader.readString(); + break; + case 7: + message.default_value = reader.readString(); + break; + case 9: + message.oneof_index = reader.readInt32(); + break; + case 10: + message.json_name = reader.readString(); + break; + case 8: + reader.readMessage(message.options, () => message.options = FieldOptions.deserialize(reader)); + break; + case 17: + message.proto3_optional = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FieldDescriptorProto { + return FieldDescriptorProto.deserialize(bytes); + } + } + export namespace FieldDescriptorProto { + export enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + export enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + export class OneofDescriptorProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + options?: OneofOptions; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_name() { + return pb_1.Message.getField(this, 1) != null; + } + get options() { + return pb_1.Message.getWrapperField(this, OneofOptions, 2) as OneofOptions; + } + set options(value: OneofOptions) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_options() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + name?: string; + options?: ReturnType; + }): OneofDescriptorProto { + const message = new OneofDescriptorProto({}); + if (data.name != null) { + message.name = data.name; + } + if (data.options != null) { + message.options = OneofOptions.fromObject(data.options); + } + return message; + } + toObject() { + const data: { + name?: string; + options?: ReturnType; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.options != null) { + data.options = this.options.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_name && this.name.length) + writer.writeString(1, this.name); + if (this.has_options) + writer.writeMessage(2, this.options, () => this.options.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OneofDescriptorProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OneofDescriptorProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + reader.readMessage(message.options, () => message.options = OneofOptions.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OneofDescriptorProto { + return OneofDescriptorProto.deserialize(bytes); + } + } + export class EnumDescriptorProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + value: EnumValueDescriptorProto[]; + options?: EnumOptions; + reserved_range: EnumDescriptorProto.EnumReservedRange[]; + reserved_name: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 4, 5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + this.value = data.value; + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + this.reserved_range = data.reserved_range; + this.reserved_name = data.reserved_name; + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_name() { + return pb_1.Message.getField(this, 1) != null; + } + get value() { + return pb_1.Message.getRepeatedWrapperField(this, EnumValueDescriptorProto, 2) as EnumValueDescriptorProto[]; + } + set value(value: EnumValueDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get options() { + return pb_1.Message.getWrapperField(this, EnumOptions, 3) as EnumOptions; + } + set options(value: EnumOptions) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_options() { + return pb_1.Message.getField(this, 3) != null; + } + get reserved_range() { + return pb_1.Message.getRepeatedWrapperField(this, EnumDescriptorProto.EnumReservedRange, 4) as EnumDescriptorProto.EnumReservedRange[]; + } + set reserved_range(value: EnumDescriptorProto.EnumReservedRange[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get reserved_name() { + return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; + } + set reserved_name(value: string[]) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + name?: string; + value?: ReturnType[]; + options?: ReturnType; + reserved_range?: ReturnType[]; + reserved_name: string[]; + }): EnumDescriptorProto { + const message = new EnumDescriptorProto({ + value: data.value.map(item => EnumValueDescriptorProto.fromObject(item)), + reserved_range: data.reserved_range.map(item => EnumDescriptorProto.EnumReservedRange.fromObject(item)), + reserved_name: data.reserved_name + }); + if (data.name != null) { + message.name = data.name; + } + if (data.options != null) { + message.options = EnumOptions.fromObject(data.options); + } + return message; + } + toObject() { + const data: { + name?: string; + value?: ReturnType[]; + options?: ReturnType; + reserved_range?: ReturnType[]; + reserved_name: string[]; + } = { + reserved_name: this.reserved_name + }; + if (this.name != null) { + data.name = this.name; + } + if (this.value != null) { + data.value = this.value.map((item: EnumValueDescriptorProto) => item.toObject()); + } + if (this.options != null) { + data.options = this.options.toObject(); + } + if (this.reserved_range != null) { + data.reserved_range = this.reserved_range.map((item: EnumDescriptorProto.EnumReservedRange) => item.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_name && this.name.length) + writer.writeString(1, this.name); + if (this.value.length) + writer.writeRepeatedMessage(2, this.value, (item: EnumValueDescriptorProto) => item.serialize(writer)); + if (this.has_options) + writer.writeMessage(3, this.options, () => this.options.serialize(writer)); + if (this.reserved_range.length) + writer.writeRepeatedMessage(4, this.reserved_range, (item: EnumDescriptorProto.EnumReservedRange) => item.serialize(writer)); + if (this.reserved_name.length) + writer.writeRepeatedString(5, this.reserved_name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumDescriptorProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumDescriptorProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + reader.readMessage(message.value, () => pb_1.Message.addToRepeatedWrapperField(message, 2, EnumValueDescriptorProto.deserialize(reader), EnumValueDescriptorProto)); + break; + case 3: + reader.readMessage(message.options, () => message.options = EnumOptions.deserialize(reader)); + break; + case 4: + reader.readMessage(message.reserved_range, () => pb_1.Message.addToRepeatedWrapperField(message, 4, EnumDescriptorProto.EnumReservedRange.deserialize(reader), EnumDescriptorProto.EnumReservedRange)); + break; + case 5: + pb_1.Message.addToRepeatedField(message, 5, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EnumDescriptorProto { + return EnumDescriptorProto.deserialize(bytes); + } + } + export namespace EnumDescriptorProto { + export class EnumReservedRange extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + start?: number; + end?: 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 ("start" in data && data.start != undefined) { + this.start = data.start; + } + if ("end" in data && data.end != undefined) { + this.end = data.end; + } + } + } + get start() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set start(value: number) { + pb_1.Message.setField(this, 1, value); + } + get has_start() { + return pb_1.Message.getField(this, 1) != null; + } + get end() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set end(value: number) { + pb_1.Message.setField(this, 2, value); + } + get has_end() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + start?: number; + end?: number; + }): EnumReservedRange { + const message = new EnumReservedRange({}); + if (data.start != null) { + message.start = data.start; + } + if (data.end != null) { + message.end = data.end; + } + return message; + } + toObject() { + const data: { + start?: number; + end?: number; + } = {}; + if (this.start != null) { + data.start = this.start; + } + if (this.end != null) { + data.end = this.end; + } + 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_start) + writer.writeInt32(1, this.start); + if (this.has_end) + writer.writeInt32(2, this.end); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumReservedRange { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumReservedRange(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.start = reader.readInt32(); + break; + case 2: + message.end = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EnumReservedRange { + return EnumReservedRange.deserialize(bytes); + } + } + } + export class EnumValueDescriptorProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + number?: number; + options?: EnumValueOptions; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("number" in data && data.number != undefined) { + this.number = data.number; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_name() { + return pb_1.Message.getField(this, 1) != null; + } + get number() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set number(value: number) { + pb_1.Message.setField(this, 2, value); + } + get has_number() { + return pb_1.Message.getField(this, 2) != null; + } + get options() { + return pb_1.Message.getWrapperField(this, EnumValueOptions, 3) as EnumValueOptions; + } + set options(value: EnumValueOptions) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_options() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + name?: string; + number?: number; + options?: ReturnType; + }): EnumValueDescriptorProto { + const message = new EnumValueDescriptorProto({}); + if (data.name != null) { + message.name = data.name; + } + if (data.number != null) { + message.number = data.number; + } + if (data.options != null) { + message.options = EnumValueOptions.fromObject(data.options); + } + return message; + } + toObject() { + const data: { + name?: string; + number?: number; + options?: ReturnType; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.number != null) { + data.number = this.number; + } + if (this.options != null) { + data.options = this.options.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_name && this.name.length) + writer.writeString(1, this.name); + if (this.has_number) + writer.writeInt32(2, this.number); + if (this.has_options) + writer.writeMessage(3, this.options, () => this.options.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumValueDescriptorProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumValueDescriptorProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.number = reader.readInt32(); + break; + case 3: + reader.readMessage(message.options, () => message.options = EnumValueOptions.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EnumValueDescriptorProto { + return EnumValueDescriptorProto.deserialize(bytes); + } + } + export class ServiceDescriptorProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + method: MethodDescriptorProto[]; + options?: ServiceOptions; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + this.method = data.method; + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_name() { + return pb_1.Message.getField(this, 1) != null; + } + get method() { + return pb_1.Message.getRepeatedWrapperField(this, MethodDescriptorProto, 2) as MethodDescriptorProto[]; + } + set method(value: MethodDescriptorProto[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get options() { + return pb_1.Message.getWrapperField(this, ServiceOptions, 3) as ServiceOptions; + } + set options(value: ServiceOptions) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_options() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + name?: string; + method?: ReturnType[]; + options?: ReturnType; + }): ServiceDescriptorProto { + const message = new ServiceDescriptorProto({ + method: data.method.map(item => MethodDescriptorProto.fromObject(item)) + }); + if (data.name != null) { + message.name = data.name; + } + if (data.options != null) { + message.options = ServiceOptions.fromObject(data.options); + } + return message; + } + toObject() { + const data: { + name?: string; + method?: ReturnType[]; + options?: ReturnType; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.method != null) { + data.method = this.method.map((item: MethodDescriptorProto) => item.toObject()); + } + if (this.options != null) { + data.options = this.options.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_name && this.name.length) + writer.writeString(1, this.name); + if (this.method.length) + writer.writeRepeatedMessage(2, this.method, (item: MethodDescriptorProto) => item.serialize(writer)); + if (this.has_options) + writer.writeMessage(3, this.options, () => this.options.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ServiceDescriptorProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ServiceDescriptorProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + reader.readMessage(message.method, () => pb_1.Message.addToRepeatedWrapperField(message, 2, MethodDescriptorProto.deserialize(reader), MethodDescriptorProto)); + break; + case 3: + reader.readMessage(message.options, () => message.options = ServiceOptions.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ServiceDescriptorProto { + return ServiceDescriptorProto.deserialize(bytes); + } + } + export class MethodDescriptorProto extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + input_type?: string; + output_type?: string; + options?: MethodOptions; + client_streaming?: boolean; + server_streaming?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("input_type" in data && data.input_type != undefined) { + this.input_type = data.input_type; + } + if ("output_type" in data && data.output_type != undefined) { + this.output_type = data.output_type; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + if ("client_streaming" in data && data.client_streaming != undefined) { + this.client_streaming = data.client_streaming; + } + if ("server_streaming" in data && data.server_streaming != undefined) { + this.server_streaming = data.server_streaming; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_name() { + return pb_1.Message.getField(this, 1) != null; + } + get input_type() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set input_type(value: string) { + pb_1.Message.setField(this, 2, value); + } + get has_input_type() { + return pb_1.Message.getField(this, 2) != null; + } + get output_type() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set output_type(value: string) { + pb_1.Message.setField(this, 3, value); + } + get has_output_type() { + return pb_1.Message.getField(this, 3) != null; + } + get options() { + return pb_1.Message.getWrapperField(this, MethodOptions, 4) as MethodOptions; + } + set options(value: MethodOptions) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_options() { + return pb_1.Message.getField(this, 4) != null; + } + get client_streaming() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set client_streaming(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + get has_client_streaming() { + return pb_1.Message.getField(this, 5) != null; + } + get server_streaming() { + return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean; + } + set server_streaming(value: boolean) { + pb_1.Message.setField(this, 6, value); + } + get has_server_streaming() { + return pb_1.Message.getField(this, 6) != null; + } + static fromObject(data: { + name?: string; + input_type?: string; + output_type?: string; + options?: ReturnType; + client_streaming?: boolean; + server_streaming?: boolean; + }): MethodDescriptorProto { + const message = new MethodDescriptorProto({}); + if (data.name != null) { + message.name = data.name; + } + if (data.input_type != null) { + message.input_type = data.input_type; + } + if (data.output_type != null) { + message.output_type = data.output_type; + } + if (data.options != null) { + message.options = MethodOptions.fromObject(data.options); + } + if (data.client_streaming != null) { + message.client_streaming = data.client_streaming; + } + if (data.server_streaming != null) { + message.server_streaming = data.server_streaming; + } + return message; + } + toObject() { + const data: { + name?: string; + input_type?: string; + output_type?: string; + options?: ReturnType; + client_streaming?: boolean; + server_streaming?: boolean; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.input_type != null) { + data.input_type = this.input_type; + } + if (this.output_type != null) { + data.output_type = this.output_type; + } + if (this.options != null) { + data.options = this.options.toObject(); + } + if (this.client_streaming != null) { + data.client_streaming = this.client_streaming; + } + if (this.server_streaming != null) { + data.server_streaming = this.server_streaming; + } + 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_name && this.name.length) + writer.writeString(1, this.name); + if (this.has_input_type && this.input_type.length) + writer.writeString(2, this.input_type); + if (this.has_output_type && this.output_type.length) + writer.writeString(3, this.output_type); + if (this.has_options) + writer.writeMessage(4, this.options, () => this.options.serialize(writer)); + if (this.has_client_streaming) + writer.writeBool(5, this.client_streaming); + if (this.has_server_streaming) + writer.writeBool(6, this.server_streaming); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MethodDescriptorProto { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MethodDescriptorProto(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.input_type = reader.readString(); + break; + case 3: + message.output_type = reader.readString(); + break; + case 4: + reader.readMessage(message.options, () => message.options = MethodOptions.deserialize(reader)); + break; + case 5: + message.client_streaming = reader.readBool(); + break; + case 6: + message.server_streaming = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MethodDescriptorProto { + return MethodDescriptorProto.deserialize(bytes); + } + } + export class FileOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + java_package?: string; + java_outer_classname?: string; + java_multiple_files?: boolean; + /** @deprecated*/ + java_generate_equals_and_hash?: boolean; + java_string_check_utf8?: boolean; + optimize_for?: FileOptions.OptimizeMode; + go_package?: string; + cc_generic_services?: boolean; + java_generic_services?: boolean; + py_generic_services?: boolean; + php_generic_services?: boolean; + deprecated?: boolean; + cc_enable_arenas?: boolean; + objc_class_prefix?: string; + csharp_namespace?: string; + swift_prefix?: string; + php_class_prefix?: string; + php_namespace?: string; + php_metadata_namespace?: string; + ruby_package?: string; + uninterpreted_option: UninterpretedOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("java_package" in data && data.java_package != undefined) { + this.java_package = data.java_package; + } + if ("java_outer_classname" in data && data.java_outer_classname != undefined) { + this.java_outer_classname = data.java_outer_classname; + } + if ("java_multiple_files" in data && data.java_multiple_files != undefined) { + this.java_multiple_files = data.java_multiple_files; + } + if ("java_generate_equals_and_hash" in data && data.java_generate_equals_and_hash != undefined) { + this.java_generate_equals_and_hash = data.java_generate_equals_and_hash; + } + if ("java_string_check_utf8" in data && data.java_string_check_utf8 != undefined) { + this.java_string_check_utf8 = data.java_string_check_utf8; + } + if ("optimize_for" in data && data.optimize_for != undefined) { + this.optimize_for = data.optimize_for; + } + if ("go_package" in data && data.go_package != undefined) { + this.go_package = data.go_package; + } + if ("cc_generic_services" in data && data.cc_generic_services != undefined) { + this.cc_generic_services = data.cc_generic_services; + } + if ("java_generic_services" in data && data.java_generic_services != undefined) { + this.java_generic_services = data.java_generic_services; + } + if ("py_generic_services" in data && data.py_generic_services != undefined) { + this.py_generic_services = data.py_generic_services; + } + if ("php_generic_services" in data && data.php_generic_services != undefined) { + this.php_generic_services = data.php_generic_services; + } + if ("deprecated" in data && data.deprecated != undefined) { + this.deprecated = data.deprecated; + } + if ("cc_enable_arenas" in data && data.cc_enable_arenas != undefined) { + this.cc_enable_arenas = data.cc_enable_arenas; + } + if ("objc_class_prefix" in data && data.objc_class_prefix != undefined) { + this.objc_class_prefix = data.objc_class_prefix; + } + if ("csharp_namespace" in data && data.csharp_namespace != undefined) { + this.csharp_namespace = data.csharp_namespace; + } + if ("swift_prefix" in data && data.swift_prefix != undefined) { + this.swift_prefix = data.swift_prefix; + } + if ("php_class_prefix" in data && data.php_class_prefix != undefined) { + this.php_class_prefix = data.php_class_prefix; + } + if ("php_namespace" in data && data.php_namespace != undefined) { + this.php_namespace = data.php_namespace; + } + if ("php_metadata_namespace" in data && data.php_metadata_namespace != undefined) { + this.php_metadata_namespace = data.php_metadata_namespace; + } + if ("ruby_package" in data && data.ruby_package != undefined) { + this.ruby_package = data.ruby_package; + } + this.uninterpreted_option = data.uninterpreted_option; + } + } + get java_package() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set java_package(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_java_package() { + return pb_1.Message.getField(this, 1) != null; + } + get java_outer_classname() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set java_outer_classname(value: string) { + pb_1.Message.setField(this, 8, value); + } + get has_java_outer_classname() { + return pb_1.Message.getField(this, 8) != null; + } + get java_multiple_files() { + return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean; + } + set java_multiple_files(value: boolean) { + pb_1.Message.setField(this, 10, value); + } + get has_java_multiple_files() { + return pb_1.Message.getField(this, 10) != null; + } + /** @deprecated*/ + get java_generate_equals_and_hash() { + return pb_1.Message.getFieldWithDefault(this, 20, false) as boolean; + } + /** @deprecated*/ + set java_generate_equals_and_hash(value: boolean) { + pb_1.Message.setField(this, 20, value); + } + /** @deprecated*/ + get has_java_generate_equals_and_hash() { + return pb_1.Message.getField(this, 20) != null; + } + get java_string_check_utf8() { + return pb_1.Message.getFieldWithDefault(this, 27, false) as boolean; + } + set java_string_check_utf8(value: boolean) { + pb_1.Message.setField(this, 27, value); + } + get has_java_string_check_utf8() { + return pb_1.Message.getField(this, 27) != null; + } + get optimize_for() { + return pb_1.Message.getFieldWithDefault(this, 9, FileOptions.OptimizeMode.SPEED) as FileOptions.OptimizeMode; + } + set optimize_for(value: FileOptions.OptimizeMode) { + pb_1.Message.setField(this, 9, value); + } + get has_optimize_for() { + return pb_1.Message.getField(this, 9) != null; + } + get go_package() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set go_package(value: string) { + pb_1.Message.setField(this, 11, value); + } + get has_go_package() { + return pb_1.Message.getField(this, 11) != null; + } + get cc_generic_services() { + return pb_1.Message.getFieldWithDefault(this, 16, false) as boolean; + } + set cc_generic_services(value: boolean) { + pb_1.Message.setField(this, 16, value); + } + get has_cc_generic_services() { + return pb_1.Message.getField(this, 16) != null; + } + get java_generic_services() { + return pb_1.Message.getFieldWithDefault(this, 17, false) as boolean; + } + set java_generic_services(value: boolean) { + pb_1.Message.setField(this, 17, value); + } + get has_java_generic_services() { + return pb_1.Message.getField(this, 17) != null; + } + get py_generic_services() { + return pb_1.Message.getFieldWithDefault(this, 18, false) as boolean; + } + set py_generic_services(value: boolean) { + pb_1.Message.setField(this, 18, value); + } + get has_py_generic_services() { + return pb_1.Message.getField(this, 18) != null; + } + get php_generic_services() { + return pb_1.Message.getFieldWithDefault(this, 42, false) as boolean; + } + set php_generic_services(value: boolean) { + pb_1.Message.setField(this, 42, value); + } + get has_php_generic_services() { + return pb_1.Message.getField(this, 42) != null; + } + get deprecated() { + return pb_1.Message.getFieldWithDefault(this, 23, false) as boolean; + } + set deprecated(value: boolean) { + pb_1.Message.setField(this, 23, value); + } + get has_deprecated() { + return pb_1.Message.getField(this, 23) != null; + } + get cc_enable_arenas() { + return pb_1.Message.getFieldWithDefault(this, 31, true) as boolean; + } + set cc_enable_arenas(value: boolean) { + pb_1.Message.setField(this, 31, value); + } + get has_cc_enable_arenas() { + return pb_1.Message.getField(this, 31) != null; + } + get objc_class_prefix() { + return pb_1.Message.getFieldWithDefault(this, 36, "") as string; + } + set objc_class_prefix(value: string) { + pb_1.Message.setField(this, 36, value); + } + get has_objc_class_prefix() { + return pb_1.Message.getField(this, 36) != null; + } + get csharp_namespace() { + return pb_1.Message.getFieldWithDefault(this, 37, "") as string; + } + set csharp_namespace(value: string) { + pb_1.Message.setField(this, 37, value); + } + get has_csharp_namespace() { + return pb_1.Message.getField(this, 37) != null; + } + get swift_prefix() { + return pb_1.Message.getFieldWithDefault(this, 39, "") as string; + } + set swift_prefix(value: string) { + pb_1.Message.setField(this, 39, value); + } + get has_swift_prefix() { + return pb_1.Message.getField(this, 39) != null; + } + get php_class_prefix() { + return pb_1.Message.getFieldWithDefault(this, 40, "") as string; + } + set php_class_prefix(value: string) { + pb_1.Message.setField(this, 40, value); + } + get has_php_class_prefix() { + return pb_1.Message.getField(this, 40) != null; + } + get php_namespace() { + return pb_1.Message.getFieldWithDefault(this, 41, "") as string; + } + set php_namespace(value: string) { + pb_1.Message.setField(this, 41, value); + } + get has_php_namespace() { + return pb_1.Message.getField(this, 41) != null; + } + get php_metadata_namespace() { + return pb_1.Message.getFieldWithDefault(this, 44, "") as string; + } + set php_metadata_namespace(value: string) { + pb_1.Message.setField(this, 44, value); + } + get has_php_metadata_namespace() { + return pb_1.Message.getField(this, 44) != null; + } + get ruby_package() { + return pb_1.Message.getFieldWithDefault(this, 45, "") as string; + } + set ruby_package(value: string) { + pb_1.Message.setField(this, 45, value); + } + get has_ruby_package() { + return pb_1.Message.getField(this, 45) != null; + } + get uninterpreted_option() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; + } + set uninterpreted_option(value: UninterpretedOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 999, value); + } + static fromObject(data: { + java_package?: string; + java_outer_classname?: string; + java_multiple_files?: boolean; + java_generate_equals_and_hash?: boolean; + java_string_check_utf8?: boolean; + optimize_for?: FileOptions.OptimizeMode; + go_package?: string; + cc_generic_services?: boolean; + java_generic_services?: boolean; + py_generic_services?: boolean; + php_generic_services?: boolean; + deprecated?: boolean; + cc_enable_arenas?: boolean; + objc_class_prefix?: string; + csharp_namespace?: string; + swift_prefix?: string; + php_class_prefix?: string; + php_namespace?: string; + php_metadata_namespace?: string; + ruby_package?: string; + uninterpreted_option?: ReturnType[]; + }): FileOptions { + const message = new FileOptions({ + uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) + }); + if (data.java_package != null) { + message.java_package = data.java_package; + } + if (data.java_outer_classname != null) { + message.java_outer_classname = data.java_outer_classname; + } + if (data.java_multiple_files != null) { + message.java_multiple_files = data.java_multiple_files; + } + if (data.java_generate_equals_and_hash != null) { + message.java_generate_equals_and_hash = data.java_generate_equals_and_hash; + } + if (data.java_string_check_utf8 != null) { + message.java_string_check_utf8 = data.java_string_check_utf8; + } + if (data.optimize_for != null) { + message.optimize_for = data.optimize_for; + } + if (data.go_package != null) { + message.go_package = data.go_package; + } + if (data.cc_generic_services != null) { + message.cc_generic_services = data.cc_generic_services; + } + if (data.java_generic_services != null) { + message.java_generic_services = data.java_generic_services; + } + if (data.py_generic_services != null) { + message.py_generic_services = data.py_generic_services; + } + if (data.php_generic_services != null) { + message.php_generic_services = data.php_generic_services; + } + if (data.deprecated != null) { + message.deprecated = data.deprecated; + } + if (data.cc_enable_arenas != null) { + message.cc_enable_arenas = data.cc_enable_arenas; + } + if (data.objc_class_prefix != null) { + message.objc_class_prefix = data.objc_class_prefix; + } + if (data.csharp_namespace != null) { + message.csharp_namespace = data.csharp_namespace; + } + if (data.swift_prefix != null) { + message.swift_prefix = data.swift_prefix; + } + if (data.php_class_prefix != null) { + message.php_class_prefix = data.php_class_prefix; + } + if (data.php_namespace != null) { + message.php_namespace = data.php_namespace; + } + if (data.php_metadata_namespace != null) { + message.php_metadata_namespace = data.php_metadata_namespace; + } + if (data.ruby_package != null) { + message.ruby_package = data.ruby_package; + } + return message; + } + toObject() { + const data: { + java_package?: string; + java_outer_classname?: string; + java_multiple_files?: boolean; + java_generate_equals_and_hash?: boolean; + java_string_check_utf8?: boolean; + optimize_for?: FileOptions.OptimizeMode; + go_package?: string; + cc_generic_services?: boolean; + java_generic_services?: boolean; + py_generic_services?: boolean; + php_generic_services?: boolean; + deprecated?: boolean; + cc_enable_arenas?: boolean; + objc_class_prefix?: string; + csharp_namespace?: string; + swift_prefix?: string; + php_class_prefix?: string; + php_namespace?: string; + php_metadata_namespace?: string; + ruby_package?: string; + uninterpreted_option?: ReturnType[]; + } = {}; + if (this.java_package != null) { + data.java_package = this.java_package; + } + if (this.java_outer_classname != null) { + data.java_outer_classname = this.java_outer_classname; + } + if (this.java_multiple_files != null) { + data.java_multiple_files = this.java_multiple_files; + } + if (this.java_generate_equals_and_hash != null) { + data.java_generate_equals_and_hash = this.java_generate_equals_and_hash; + } + if (this.java_string_check_utf8 != null) { + data.java_string_check_utf8 = this.java_string_check_utf8; + } + if (this.optimize_for != null) { + data.optimize_for = this.optimize_for; + } + if (this.go_package != null) { + data.go_package = this.go_package; + } + if (this.cc_generic_services != null) { + data.cc_generic_services = this.cc_generic_services; + } + if (this.java_generic_services != null) { + data.java_generic_services = this.java_generic_services; + } + if (this.py_generic_services != null) { + data.py_generic_services = this.py_generic_services; + } + if (this.php_generic_services != null) { + data.php_generic_services = this.php_generic_services; + } + if (this.deprecated != null) { + data.deprecated = this.deprecated; + } + if (this.cc_enable_arenas != null) { + data.cc_enable_arenas = this.cc_enable_arenas; + } + if (this.objc_class_prefix != null) { + data.objc_class_prefix = this.objc_class_prefix; + } + if (this.csharp_namespace != null) { + data.csharp_namespace = this.csharp_namespace; + } + if (this.swift_prefix != null) { + data.swift_prefix = this.swift_prefix; + } + if (this.php_class_prefix != null) { + data.php_class_prefix = this.php_class_prefix; + } + if (this.php_namespace != null) { + data.php_namespace = this.php_namespace; + } + if (this.php_metadata_namespace != null) { + data.php_metadata_namespace = this.php_metadata_namespace; + } + if (this.ruby_package != null) { + data.ruby_package = this.ruby_package; + } + if (this.uninterpreted_option != null) { + data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.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_java_package && this.java_package.length) + writer.writeString(1, this.java_package); + if (this.has_java_outer_classname && this.java_outer_classname.length) + writer.writeString(8, this.java_outer_classname); + if (this.has_java_multiple_files) + writer.writeBool(10, this.java_multiple_files); + if (this.has_java_generate_equals_and_hash) + writer.writeBool(20, this.java_generate_equals_and_hash); + if (this.has_java_string_check_utf8) + writer.writeBool(27, this.java_string_check_utf8); + if (this.has_optimize_for) + writer.writeEnum(9, this.optimize_for); + if (this.has_go_package && this.go_package.length) + writer.writeString(11, this.go_package); + if (this.has_cc_generic_services) + writer.writeBool(16, this.cc_generic_services); + if (this.has_java_generic_services) + writer.writeBool(17, this.java_generic_services); + if (this.has_py_generic_services) + writer.writeBool(18, this.py_generic_services); + if (this.has_php_generic_services) + writer.writeBool(42, this.php_generic_services); + if (this.has_deprecated) + writer.writeBool(23, this.deprecated); + if (this.has_cc_enable_arenas) + writer.writeBool(31, this.cc_enable_arenas); + if (this.has_objc_class_prefix && this.objc_class_prefix.length) + writer.writeString(36, this.objc_class_prefix); + if (this.has_csharp_namespace && this.csharp_namespace.length) + writer.writeString(37, this.csharp_namespace); + if (this.has_swift_prefix && this.swift_prefix.length) + writer.writeString(39, this.swift_prefix); + if (this.has_php_class_prefix && this.php_class_prefix.length) + writer.writeString(40, this.php_class_prefix); + if (this.has_php_namespace && this.php_namespace.length) + writer.writeString(41, this.php_namespace); + if (this.has_php_metadata_namespace && this.php_metadata_namespace.length) + writer.writeString(44, this.php_metadata_namespace); + if (this.has_ruby_package && this.ruby_package.length) + writer.writeString(45, this.ruby_package); + if (this.uninterpreted_option.length) + writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FileOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FileOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.java_package = reader.readString(); + break; + case 8: + message.java_outer_classname = reader.readString(); + break; + case 10: + message.java_multiple_files = reader.readBool(); + break; + case 20: + message.java_generate_equals_and_hash = reader.readBool(); + break; + case 27: + message.java_string_check_utf8 = reader.readBool(); + break; + case 9: + message.optimize_for = reader.readEnum(); + break; + case 11: + message.go_package = reader.readString(); + break; + case 16: + message.cc_generic_services = reader.readBool(); + break; + case 17: + message.java_generic_services = reader.readBool(); + break; + case 18: + message.py_generic_services = reader.readBool(); + break; + case 42: + message.php_generic_services = reader.readBool(); + break; + case 23: + message.deprecated = reader.readBool(); + break; + case 31: + message.cc_enable_arenas = reader.readBool(); + break; + case 36: + message.objc_class_prefix = reader.readString(); + break; + case 37: + message.csharp_namespace = reader.readString(); + break; + case 39: + message.swift_prefix = reader.readString(); + break; + case 40: + message.php_class_prefix = reader.readString(); + break; + case 41: + message.php_namespace = reader.readString(); + break; + case 44: + message.php_metadata_namespace = reader.readString(); + break; + case 45: + message.ruby_package = reader.readString(); + break; + case 999: + reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FileOptions { + return FileOptions.deserialize(bytes); + } + } + export namespace FileOptions { + export enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + export class MessageOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + message_set_wire_format?: boolean; + no_standard_descriptor_accessor?: boolean; + deprecated?: boolean; + map_entry?: boolean; + uninterpreted_option: UninterpretedOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("message_set_wire_format" in data && data.message_set_wire_format != undefined) { + this.message_set_wire_format = data.message_set_wire_format; + } + if ("no_standard_descriptor_accessor" in data && data.no_standard_descriptor_accessor != undefined) { + this.no_standard_descriptor_accessor = data.no_standard_descriptor_accessor; + } + if ("deprecated" in data && data.deprecated != undefined) { + this.deprecated = data.deprecated; + } + if ("map_entry" in data && data.map_entry != undefined) { + this.map_entry = data.map_entry; + } + this.uninterpreted_option = data.uninterpreted_option; + } + } + get message_set_wire_format() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set message_set_wire_format(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + get has_message_set_wire_format() { + return pb_1.Message.getField(this, 1) != null; + } + get no_standard_descriptor_accessor() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set no_standard_descriptor_accessor(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get has_no_standard_descriptor_accessor() { + return pb_1.Message.getField(this, 2) != null; + } + get deprecated() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set deprecated(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get has_deprecated() { + return pb_1.Message.getField(this, 3) != null; + } + get map_entry() { + return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean; + } + set map_entry(value: boolean) { + pb_1.Message.setField(this, 7, value); + } + get has_map_entry() { + return pb_1.Message.getField(this, 7) != null; + } + get uninterpreted_option() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; + } + set uninterpreted_option(value: UninterpretedOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 999, value); + } + static fromObject(data: { + message_set_wire_format?: boolean; + no_standard_descriptor_accessor?: boolean; + deprecated?: boolean; + map_entry?: boolean; + uninterpreted_option?: ReturnType[]; + }): MessageOptions { + const message = new MessageOptions({ + uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) + }); + if (data.message_set_wire_format != null) { + message.message_set_wire_format = data.message_set_wire_format; + } + if (data.no_standard_descriptor_accessor != null) { + message.no_standard_descriptor_accessor = data.no_standard_descriptor_accessor; + } + if (data.deprecated != null) { + message.deprecated = data.deprecated; + } + if (data.map_entry != null) { + message.map_entry = data.map_entry; + } + return message; + } + toObject() { + const data: { + message_set_wire_format?: boolean; + no_standard_descriptor_accessor?: boolean; + deprecated?: boolean; + map_entry?: boolean; + uninterpreted_option?: ReturnType[]; + } = {}; + if (this.message_set_wire_format != null) { + data.message_set_wire_format = this.message_set_wire_format; + } + if (this.no_standard_descriptor_accessor != null) { + data.no_standard_descriptor_accessor = this.no_standard_descriptor_accessor; + } + if (this.deprecated != null) { + data.deprecated = this.deprecated; + } + if (this.map_entry != null) { + data.map_entry = this.map_entry; + } + if (this.uninterpreted_option != null) { + data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.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_message_set_wire_format) + writer.writeBool(1, this.message_set_wire_format); + if (this.has_no_standard_descriptor_accessor) + writer.writeBool(2, this.no_standard_descriptor_accessor); + if (this.has_deprecated) + writer.writeBool(3, this.deprecated); + if (this.has_map_entry) + writer.writeBool(7, this.map_entry); + if (this.uninterpreted_option.length) + writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MessageOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MessageOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.message_set_wire_format = reader.readBool(); + break; + case 2: + message.no_standard_descriptor_accessor = reader.readBool(); + break; + case 3: + message.deprecated = reader.readBool(); + break; + case 7: + message.map_entry = reader.readBool(); + break; + case 999: + reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MessageOptions { + return MessageOptions.deserialize(bytes); + } + } + export class FieldOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + ctype?: FieldOptions.CType; + packed?: boolean; + jstype?: FieldOptions.JSType; + lazy?: boolean; + unverified_lazy?: boolean; + deprecated?: boolean; + weak?: boolean; + uninterpreted_option: UninterpretedOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("ctype" in data && data.ctype != undefined) { + this.ctype = data.ctype; + } + if ("packed" in data && data.packed != undefined) { + this.packed = data.packed; + } + if ("jstype" in data && data.jstype != undefined) { + this.jstype = data.jstype; + } + if ("lazy" in data && data.lazy != undefined) { + this.lazy = data.lazy; + } + if ("unverified_lazy" in data && data.unverified_lazy != undefined) { + this.unverified_lazy = data.unverified_lazy; + } + if ("deprecated" in data && data.deprecated != undefined) { + this.deprecated = data.deprecated; + } + if ("weak" in data && data.weak != undefined) { + this.weak = data.weak; + } + this.uninterpreted_option = data.uninterpreted_option; + } + } + get ctype() { + return pb_1.Message.getFieldWithDefault(this, 1, FieldOptions.CType.STRING) as FieldOptions.CType; + } + set ctype(value: FieldOptions.CType) { + pb_1.Message.setField(this, 1, value); + } + get has_ctype() { + return pb_1.Message.getField(this, 1) != null; + } + get packed() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set packed(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get has_packed() { + return pb_1.Message.getField(this, 2) != null; + } + get jstype() { + return pb_1.Message.getFieldWithDefault(this, 6, FieldOptions.JSType.JS_NORMAL) as FieldOptions.JSType; + } + set jstype(value: FieldOptions.JSType) { + pb_1.Message.setField(this, 6, value); + } + get has_jstype() { + return pb_1.Message.getField(this, 6) != null; + } + get lazy() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set lazy(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + get has_lazy() { + return pb_1.Message.getField(this, 5) != null; + } + get unverified_lazy() { + return pb_1.Message.getFieldWithDefault(this, 15, false) as boolean; + } + set unverified_lazy(value: boolean) { + pb_1.Message.setField(this, 15, value); + } + get has_unverified_lazy() { + return pb_1.Message.getField(this, 15) != null; + } + get deprecated() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set deprecated(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get has_deprecated() { + return pb_1.Message.getField(this, 3) != null; + } + get weak() { + return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean; + } + set weak(value: boolean) { + pb_1.Message.setField(this, 10, value); + } + get has_weak() { + return pb_1.Message.getField(this, 10) != null; + } + get uninterpreted_option() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; + } + set uninterpreted_option(value: UninterpretedOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 999, value); + } + static fromObject(data: { + ctype?: FieldOptions.CType; + packed?: boolean; + jstype?: FieldOptions.JSType; + lazy?: boolean; + unverified_lazy?: boolean; + deprecated?: boolean; + weak?: boolean; + uninterpreted_option?: ReturnType[]; + }): FieldOptions { + const message = new FieldOptions({ + uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) + }); + if (data.ctype != null) { + message.ctype = data.ctype; + } + if (data.packed != null) { + message.packed = data.packed; + } + if (data.jstype != null) { + message.jstype = data.jstype; + } + if (data.lazy != null) { + message.lazy = data.lazy; + } + if (data.unverified_lazy != null) { + message.unverified_lazy = data.unverified_lazy; + } + if (data.deprecated != null) { + message.deprecated = data.deprecated; + } + if (data.weak != null) { + message.weak = data.weak; + } + return message; + } + toObject() { + const data: { + ctype?: FieldOptions.CType; + packed?: boolean; + jstype?: FieldOptions.JSType; + lazy?: boolean; + unverified_lazy?: boolean; + deprecated?: boolean; + weak?: boolean; + uninterpreted_option?: ReturnType[]; + } = {}; + if (this.ctype != null) { + data.ctype = this.ctype; + } + if (this.packed != null) { + data.packed = this.packed; + } + if (this.jstype != null) { + data.jstype = this.jstype; + } + if (this.lazy != null) { + data.lazy = this.lazy; + } + if (this.unverified_lazy != null) { + data.unverified_lazy = this.unverified_lazy; + } + if (this.deprecated != null) { + data.deprecated = this.deprecated; + } + if (this.weak != null) { + data.weak = this.weak; + } + if (this.uninterpreted_option != null) { + data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.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_ctype) + writer.writeEnum(1, this.ctype); + if (this.has_packed) + writer.writeBool(2, this.packed); + if (this.has_jstype) + writer.writeEnum(6, this.jstype); + if (this.has_lazy) + writer.writeBool(5, this.lazy); + if (this.has_unverified_lazy) + writer.writeBool(15, this.unverified_lazy); + if (this.has_deprecated) + writer.writeBool(3, this.deprecated); + if (this.has_weak) + writer.writeBool(10, this.weak); + if (this.uninterpreted_option.length) + writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FieldOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FieldOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.ctype = reader.readEnum(); + break; + case 2: + message.packed = reader.readBool(); + break; + case 6: + message.jstype = reader.readEnum(); + break; + case 5: + message.lazy = reader.readBool(); + break; + case 15: + message.unverified_lazy = reader.readBool(); + break; + case 3: + message.deprecated = reader.readBool(); + break; + case 10: + message.weak = reader.readBool(); + break; + case 999: + reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FieldOptions { + return FieldOptions.deserialize(bytes); + } + } + export namespace FieldOptions { + export enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + export enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + export class OneofOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + uninterpreted_option: UninterpretedOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + this.uninterpreted_option = data.uninterpreted_option; + } + } + get uninterpreted_option() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; + } + set uninterpreted_option(value: UninterpretedOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 999, value); + } + static fromObject(data: { + uninterpreted_option?: ReturnType[]; + }): OneofOptions { + const message = new OneofOptions({ + uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) + }); + return message; + } + toObject() { + const data: { + uninterpreted_option?: ReturnType[]; + } = {}; + if (this.uninterpreted_option != null) { + data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.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.uninterpreted_option.length) + writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OneofOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OneofOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 999: + reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OneofOptions { + return OneofOptions.deserialize(bytes); + } + } + export class EnumOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + allow_alias?: boolean; + deprecated?: boolean; + uninterpreted_option: UninterpretedOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("allow_alias" in data && data.allow_alias != undefined) { + this.allow_alias = data.allow_alias; + } + if ("deprecated" in data && data.deprecated != undefined) { + this.deprecated = data.deprecated; + } + this.uninterpreted_option = data.uninterpreted_option; + } + } + get allow_alias() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set allow_alias(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get has_allow_alias() { + return pb_1.Message.getField(this, 2) != null; + } + get deprecated() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set deprecated(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get has_deprecated() { + return pb_1.Message.getField(this, 3) != null; + } + get uninterpreted_option() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; + } + set uninterpreted_option(value: UninterpretedOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 999, value); + } + static fromObject(data: { + allow_alias?: boolean; + deprecated?: boolean; + uninterpreted_option?: ReturnType[]; + }): EnumOptions { + const message = new EnumOptions({ + uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) + }); + if (data.allow_alias != null) { + message.allow_alias = data.allow_alias; + } + if (data.deprecated != null) { + message.deprecated = data.deprecated; + } + return message; + } + toObject() { + const data: { + allow_alias?: boolean; + deprecated?: boolean; + uninterpreted_option?: ReturnType[]; + } = {}; + if (this.allow_alias != null) { + data.allow_alias = this.allow_alias; + } + if (this.deprecated != null) { + data.deprecated = this.deprecated; + } + if (this.uninterpreted_option != null) { + data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.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_allow_alias) + writer.writeBool(2, this.allow_alias); + if (this.has_deprecated) + writer.writeBool(3, this.deprecated); + if (this.uninterpreted_option.length) + writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.allow_alias = reader.readBool(); + break; + case 3: + message.deprecated = reader.readBool(); + break; + case 999: + reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EnumOptions { + return EnumOptions.deserialize(bytes); + } + } + export class EnumValueOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + deprecated?: boolean; + uninterpreted_option: UninterpretedOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("deprecated" in data && data.deprecated != undefined) { + this.deprecated = data.deprecated; + } + this.uninterpreted_option = data.uninterpreted_option; + } + } + get deprecated() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set deprecated(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + get has_deprecated() { + return pb_1.Message.getField(this, 1) != null; + } + get uninterpreted_option() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; + } + set uninterpreted_option(value: UninterpretedOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 999, value); + } + static fromObject(data: { + deprecated?: boolean; + uninterpreted_option?: ReturnType[]; + }): EnumValueOptions { + const message = new EnumValueOptions({ + uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) + }); + if (data.deprecated != null) { + message.deprecated = data.deprecated; + } + return message; + } + toObject() { + const data: { + deprecated?: boolean; + uninterpreted_option?: ReturnType[]; + } = {}; + if (this.deprecated != null) { + data.deprecated = this.deprecated; + } + if (this.uninterpreted_option != null) { + data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.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_deprecated) + writer.writeBool(1, this.deprecated); + if (this.uninterpreted_option.length) + writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumValueOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumValueOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.deprecated = reader.readBool(); + break; + case 999: + reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EnumValueOptions { + return EnumValueOptions.deserialize(bytes); + } + } + export class ServiceOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + deprecated?: boolean; + uninterpreted_option: UninterpretedOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("deprecated" in data && data.deprecated != undefined) { + this.deprecated = data.deprecated; + } + this.uninterpreted_option = data.uninterpreted_option; + } + } + get deprecated() { + return pb_1.Message.getFieldWithDefault(this, 33, false) as boolean; + } + set deprecated(value: boolean) { + pb_1.Message.setField(this, 33, value); + } + get has_deprecated() { + return pb_1.Message.getField(this, 33) != null; + } + get uninterpreted_option() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; + } + set uninterpreted_option(value: UninterpretedOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 999, value); + } + static fromObject(data: { + deprecated?: boolean; + uninterpreted_option?: ReturnType[]; + }): ServiceOptions { + const message = new ServiceOptions({ + uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) + }); + if (data.deprecated != null) { + message.deprecated = data.deprecated; + } + return message; + } + toObject() { + const data: { + deprecated?: boolean; + uninterpreted_option?: ReturnType[]; + } = {}; + if (this.deprecated != null) { + data.deprecated = this.deprecated; + } + if (this.uninterpreted_option != null) { + data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.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_deprecated) + writer.writeBool(33, this.deprecated); + if (this.uninterpreted_option.length) + writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ServiceOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ServiceOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 33: + message.deprecated = reader.readBool(); + break; + case 999: + reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ServiceOptions { + return ServiceOptions.deserialize(bytes); + } + } + export class MethodOptions extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + deprecated?: boolean; + idempotency_level?: MethodOptions.IdempotencyLevel; + uninterpreted_option: UninterpretedOption[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("deprecated" in data && data.deprecated != undefined) { + this.deprecated = data.deprecated; + } + if ("idempotency_level" in data && data.idempotency_level != undefined) { + this.idempotency_level = data.idempotency_level; + } + this.uninterpreted_option = data.uninterpreted_option; + } + } + get deprecated() { + return pb_1.Message.getFieldWithDefault(this, 33, false) as boolean; + } + set deprecated(value: boolean) { + pb_1.Message.setField(this, 33, value); + } + get has_deprecated() { + return pb_1.Message.getField(this, 33) != null; + } + get idempotency_level() { + return pb_1.Message.getFieldWithDefault(this, 34, MethodOptions.IdempotencyLevel.IDEMPOTENCY_UNKNOWN) as MethodOptions.IdempotencyLevel; + } + set idempotency_level(value: MethodOptions.IdempotencyLevel) { + pb_1.Message.setField(this, 34, value); + } + get has_idempotency_level() { + return pb_1.Message.getField(this, 34) != null; + } + get uninterpreted_option() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; + } + set uninterpreted_option(value: UninterpretedOption[]) { + pb_1.Message.setRepeatedWrapperField(this, 999, value); + } + static fromObject(data: { + deprecated?: boolean; + idempotency_level?: MethodOptions.IdempotencyLevel; + uninterpreted_option?: ReturnType[]; + }): MethodOptions { + const message = new MethodOptions({ + uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) + }); + if (data.deprecated != null) { + message.deprecated = data.deprecated; + } + if (data.idempotency_level != null) { + message.idempotency_level = data.idempotency_level; + } + return message; + } + toObject() { + const data: { + deprecated?: boolean; + idempotency_level?: MethodOptions.IdempotencyLevel; + uninterpreted_option?: ReturnType[]; + } = {}; + if (this.deprecated != null) { + data.deprecated = this.deprecated; + } + if (this.idempotency_level != null) { + data.idempotency_level = this.idempotency_level; + } + if (this.uninterpreted_option != null) { + data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.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_deprecated) + writer.writeBool(33, this.deprecated); + if (this.has_idempotency_level) + writer.writeEnum(34, this.idempotency_level); + if (this.uninterpreted_option.length) + writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MethodOptions { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MethodOptions(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 33: + message.deprecated = reader.readBool(); + break; + case 34: + message.idempotency_level = reader.readEnum(); + break; + case 999: + reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MethodOptions { + return MethodOptions.deserialize(bytes); + } + } + export namespace MethodOptions { + export enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + export class UninterpretedOption extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name: UninterpretedOption.NamePart[]; + identifier_value?: string; + positive_int_value?: number; + negative_int_value?: number; + double_value?: number; + string_value?: Uint8Array; + aggregate_value?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + this.name = data.name; + if ("identifier_value" in data && data.identifier_value != undefined) { + this.identifier_value = data.identifier_value; + } + if ("positive_int_value" in data && data.positive_int_value != undefined) { + this.positive_int_value = data.positive_int_value; + } + if ("negative_int_value" in data && data.negative_int_value != undefined) { + this.negative_int_value = data.negative_int_value; + } + if ("double_value" in data && data.double_value != undefined) { + this.double_value = data.double_value; + } + if ("string_value" in data && data.string_value != undefined) { + this.string_value = data.string_value; + } + if ("aggregate_value" in data && data.aggregate_value != undefined) { + this.aggregate_value = data.aggregate_value; + } + } + } + get name() { + return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption.NamePart, 2) as UninterpretedOption.NamePart[]; + } + set name(value: UninterpretedOption.NamePart[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get identifier_value() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set identifier_value(value: string) { + pb_1.Message.setField(this, 3, value); + } + get has_identifier_value() { + return pb_1.Message.getField(this, 3) != null; + } + get positive_int_value() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set positive_int_value(value: number) { + pb_1.Message.setField(this, 4, value); + } + get has_positive_int_value() { + return pb_1.Message.getField(this, 4) != null; + } + get negative_int_value() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set negative_int_value(value: number) { + pb_1.Message.setField(this, 5, value); + } + get has_negative_int_value() { + return pb_1.Message.getField(this, 5) != null; + } + get double_value() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set double_value(value: number) { + pb_1.Message.setField(this, 6, value); + } + get has_double_value() { + return pb_1.Message.getField(this, 6) != null; + } + get string_value() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set string_value(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get has_string_value() { + return pb_1.Message.getField(this, 7) != null; + } + get aggregate_value() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set aggregate_value(value: string) { + pb_1.Message.setField(this, 8, value); + } + get has_aggregate_value() { + return pb_1.Message.getField(this, 8) != null; + } + static fromObject(data: { + name?: ReturnType[]; + identifier_value?: string; + positive_int_value?: number; + negative_int_value?: number; + double_value?: number; + string_value?: Uint8Array; + aggregate_value?: string; + }): UninterpretedOption { + const message = new UninterpretedOption({ + name: data.name.map(item => UninterpretedOption.NamePart.fromObject(item)) + }); + if (data.identifier_value != null) { + message.identifier_value = data.identifier_value; + } + if (data.positive_int_value != null) { + message.positive_int_value = data.positive_int_value; + } + if (data.negative_int_value != null) { + message.negative_int_value = data.negative_int_value; + } + if (data.double_value != null) { + message.double_value = data.double_value; + } + if (data.string_value != null) { + message.string_value = data.string_value; + } + if (data.aggregate_value != null) { + message.aggregate_value = data.aggregate_value; + } + return message; + } + toObject() { + const data: { + name?: ReturnType[]; + identifier_value?: string; + positive_int_value?: number; + negative_int_value?: number; + double_value?: number; + string_value?: Uint8Array; + aggregate_value?: string; + } = {}; + if (this.name != null) { + data.name = this.name.map((item: UninterpretedOption.NamePart) => item.toObject()); + } + if (this.identifier_value != null) { + data.identifier_value = this.identifier_value; + } + if (this.positive_int_value != null) { + data.positive_int_value = this.positive_int_value; + } + if (this.negative_int_value != null) { + data.negative_int_value = this.negative_int_value; + } + if (this.double_value != null) { + data.double_value = this.double_value; + } + if (this.string_value != null) { + data.string_value = this.string_value; + } + if (this.aggregate_value != null) { + data.aggregate_value = this.aggregate_value; + } + 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.name.length) + writer.writeRepeatedMessage(2, this.name, (item: UninterpretedOption.NamePart) => item.serialize(writer)); + if (this.has_identifier_value && this.identifier_value.length) + writer.writeString(3, this.identifier_value); + if (this.has_positive_int_value) + writer.writeUint64(4, this.positive_int_value); + if (this.has_negative_int_value) + writer.writeInt64(5, this.negative_int_value); + if (this.has_double_value) + writer.writeDouble(6, this.double_value); + if (this.has_string_value && this.string_value.length) + writer.writeBytes(7, this.string_value); + if (this.has_aggregate_value && this.aggregate_value.length) + writer.writeString(8, this.aggregate_value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UninterpretedOption { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UninterpretedOption(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + reader.readMessage(message.name, () => pb_1.Message.addToRepeatedWrapperField(message, 2, UninterpretedOption.NamePart.deserialize(reader), UninterpretedOption.NamePart)); + break; + case 3: + message.identifier_value = reader.readString(); + break; + case 4: + message.positive_int_value = reader.readUint64(); + break; + case 5: + message.negative_int_value = reader.readInt64(); + break; + case 6: + message.double_value = reader.readDouble(); + break; + case 7: + message.string_value = reader.readBytes(); + break; + case 8: + message.aggregate_value = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UninterpretedOption { + return UninterpretedOption.deserialize(bytes); + } + } + export namespace UninterpretedOption { + export class NamePart extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name_part: string; + is_extension: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + this.name_part = data.name_part; + this.is_extension = data.is_extension; + } + } + get name_part() { + return pb_1.Message.getField(this, 1) as string; + } + set name_part(value: string) { + pb_1.Message.setField(this, 1, value); + } + get has_name_part() { + return pb_1.Message.getField(this, 1) != null; + } + get is_extension() { + return pb_1.Message.getField(this, 2) as boolean; + } + set is_extension(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get has_is_extension() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + name_part?: string; + is_extension?: boolean; + }): NamePart { + const message = new NamePart({ + name_part: data.name_part, + is_extension: data.is_extension + }); + return message; + } + toObject() { + const data: { + name_part?: string; + is_extension?: boolean; + } = {}; + if (this.name_part != null) { + data.name_part = this.name_part; + } + if (this.is_extension != null) { + data.is_extension = this.is_extension; + } + 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_name_part && this.name_part.length) + writer.writeString(1, this.name_part); + if (this.has_is_extension) + writer.writeBool(2, this.is_extension); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NamePart { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NamePart(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name_part = reader.readString(); + break; + case 2: + message.is_extension = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): NamePart { + return NamePart.deserialize(bytes); + } + } + } + export class SourceCodeInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + location: SourceCodeInfo.Location[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + this.location = data.location; + } + } + get location() { + return pb_1.Message.getRepeatedWrapperField(this, SourceCodeInfo.Location, 1) as SourceCodeInfo.Location[]; + } + set location(value: SourceCodeInfo.Location[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + location?: ReturnType[]; + }): SourceCodeInfo { + const message = new SourceCodeInfo({ + location: data.location.map(item => SourceCodeInfo.Location.fromObject(item)) + }); + return message; + } + toObject() { + const data: { + location?: ReturnType[]; + } = {}; + if (this.location != null) { + data.location = this.location.map((item: SourceCodeInfo.Location) => item.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.location.length) + writer.writeRepeatedMessage(1, this.location, (item: SourceCodeInfo.Location) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SourceCodeInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SourceCodeInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.location, () => pb_1.Message.addToRepeatedWrapperField(message, 1, SourceCodeInfo.Location.deserialize(reader), SourceCodeInfo.Location)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SourceCodeInfo { + return SourceCodeInfo.deserialize(bytes); + } + } + export namespace SourceCodeInfo { + export class Location extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path: number[]; + span: number[]; + leading_comments?: string; + trailing_comments?: string; + leading_detached_comments: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + this.path = data.path; + this.span = data.span; + if ("leading_comments" in data && data.leading_comments != undefined) { + this.leading_comments = data.leading_comments; + } + if ("trailing_comments" in data && data.trailing_comments != undefined) { + this.trailing_comments = data.trailing_comments; + } + this.leading_detached_comments = data.leading_detached_comments; + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set path(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + get span() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as number[]; + } + set span(value: number[]) { + pb_1.Message.setField(this, 2, value); + } + get leading_comments() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set leading_comments(value: string) { + pb_1.Message.setField(this, 3, value); + } + get has_leading_comments() { + return pb_1.Message.getField(this, 3) != null; + } + get trailing_comments() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set trailing_comments(value: string) { + pb_1.Message.setField(this, 4, value); + } + get has_trailing_comments() { + return pb_1.Message.getField(this, 4) != null; + } + get leading_detached_comments() { + return pb_1.Message.getFieldWithDefault(this, 6, []) as string[]; + } + set leading_detached_comments(value: string[]) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + path: number[]; + span: number[]; + leading_comments?: string; + trailing_comments?: string; + leading_detached_comments: string[]; + }): Location { + const message = new Location({ + path: data.path, + span: data.span, + leading_detached_comments: data.leading_detached_comments + }); + if (data.leading_comments != null) { + message.leading_comments = data.leading_comments; + } + if (data.trailing_comments != null) { + message.trailing_comments = data.trailing_comments; + } + return message; + } + toObject() { + const data: { + path: number[]; + span: number[]; + leading_comments?: string; + trailing_comments?: string; + leading_detached_comments: string[]; + } = { + path: this.path, + span: this.span, + leading_detached_comments: this.leading_detached_comments + }; + if (this.leading_comments != null) { + data.leading_comments = this.leading_comments; + } + if (this.trailing_comments != null) { + data.trailing_comments = this.trailing_comments; + } + 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.path.length) + writer.writePackedInt32(1, this.path); + if (this.span.length) + writer.writePackedInt32(2, this.span); + if (this.has_leading_comments && this.leading_comments.length) + writer.writeString(3, this.leading_comments); + if (this.has_trailing_comments && this.trailing_comments.length) + writer.writeString(4, this.trailing_comments); + if (this.leading_detached_comments.length) + writer.writeRepeatedString(6, this.leading_detached_comments); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Location { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Location(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readPackedInt32(); + break; + case 2: + message.span = reader.readPackedInt32(); + break; + case 3: + message.leading_comments = reader.readString(); + break; + case 4: + message.trailing_comments = reader.readString(); + break; + case 6: + pb_1.Message.addToRepeatedField(message, 6, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Location { + return Location.deserialize(bytes); + } + } + } + export class GeneratedCodeInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + annotation: GeneratedCodeInfo.Annotation[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + this.annotation = data.annotation; + } + } + get annotation() { + return pb_1.Message.getRepeatedWrapperField(this, GeneratedCodeInfo.Annotation, 1) as GeneratedCodeInfo.Annotation[]; + } + set annotation(value: GeneratedCodeInfo.Annotation[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + annotation?: ReturnType[]; + }): GeneratedCodeInfo { + const message = new GeneratedCodeInfo({ + annotation: data.annotation.map(item => GeneratedCodeInfo.Annotation.fromObject(item)) + }); + return message; + } + toObject() { + const data: { + annotation?: ReturnType[]; + } = {}; + if (this.annotation != null) { + data.annotation = this.annotation.map((item: GeneratedCodeInfo.Annotation) => item.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.annotation.length) + writer.writeRepeatedMessage(1, this.annotation, (item: GeneratedCodeInfo.Annotation) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GeneratedCodeInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GeneratedCodeInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.annotation, () => pb_1.Message.addToRepeatedWrapperField(message, 1, GeneratedCodeInfo.Annotation.deserialize(reader), GeneratedCodeInfo.Annotation)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GeneratedCodeInfo { + return GeneratedCodeInfo.deserialize(bytes); + } + } + export namespace GeneratedCodeInfo { + export class Annotation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path: number[]; + source_file?: string; + begin?: number; + end?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + this.path = data.path; + if ("source_file" in data && data.source_file != undefined) { + this.source_file = data.source_file; + } + if ("begin" in data && data.begin != undefined) { + this.begin = data.begin; + } + if ("end" in data && data.end != undefined) { + this.end = data.end; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set path(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + get source_file() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set source_file(value: string) { + pb_1.Message.setField(this, 2, value); + } + get has_source_file() { + return pb_1.Message.getField(this, 2) != null; + } + get begin() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set begin(value: number) { + pb_1.Message.setField(this, 3, value); + } + get has_begin() { + return pb_1.Message.getField(this, 3) != null; + } + get end() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set end(value: number) { + pb_1.Message.setField(this, 4, value); + } + get has_end() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + path: number[]; + source_file?: string; + begin?: number; + end?: number; + }): Annotation { + const message = new Annotation({ + path: data.path + }); + if (data.source_file != null) { + message.source_file = data.source_file; + } + if (data.begin != null) { + message.begin = data.begin; + } + if (data.end != null) { + message.end = data.end; + } + return message; + } + toObject() { + const data: { + path: number[]; + source_file?: string; + begin?: number; + end?: number; + } = { + path: this.path + }; + if (this.source_file != null) { + data.source_file = this.source_file; + } + if (this.begin != null) { + data.begin = this.begin; + } + if (this.end != null) { + data.end = this.end; + } + 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.path.length) + writer.writePackedInt32(1, this.path); + if (this.has_source_file && this.source_file.length) + writer.writeString(2, this.source_file); + if (this.has_begin) + writer.writeInt32(3, this.begin); + if (this.has_end) + writer.writeInt32(4, this.end); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Annotation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Annotation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readPackedInt32(); + break; + case 2: + message.source_file = reader.readString(); + break; + case 3: + message.begin = reader.readInt32(); + break; + case 4: + message.end = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Annotation { + return Annotation.deserialize(bytes); + } + } + } +} diff --git a/codegen/google/protobuf/duration.ts b/codegen/google/protobuf/duration.ts new file mode 100644 index 0000000..fa3f84a --- /dev/null +++ b/codegen/google/protobuf/duration.ts @@ -0,0 +1,98 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: google/protobuf/duration.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace google.protobuf { + export class Duration extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + seconds?: number; + nanos?: 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 ("seconds" in data && data.seconds != undefined) { + this.seconds = data.seconds; + } + if ("nanos" in data && data.nanos != undefined) { + this.nanos = data.nanos; + } + } + } + get seconds() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set seconds(value: number) { + pb_1.Message.setField(this, 1, value); + } + get nanos() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set nanos(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + seconds?: number; + nanos?: number; + }): Duration { + const message = new Duration({}); + if (data.seconds != null) { + message.seconds = data.seconds; + } + if (data.nanos != null) { + message.nanos = data.nanos; + } + return message; + } + toObject() { + const data: { + seconds?: number; + nanos?: number; + } = {}; + if (this.seconds != null) { + data.seconds = this.seconds; + } + if (this.nanos != null) { + data.nanos = this.nanos; + } + 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.seconds != 0) + writer.writeInt64(1, this.seconds); + if (this.nanos != 0) + writer.writeInt32(2, this.nanos); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Duration { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Duration(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.seconds = reader.readInt64(); + break; + case 2: + message.nanos = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Duration { + return Duration.deserialize(bytes); + } + } +} diff --git a/codegen/google/protobuf/timestamp.ts b/codegen/google/protobuf/timestamp.ts new file mode 100644 index 0000000..fdd77ba --- /dev/null +++ b/codegen/google/protobuf/timestamp.ts @@ -0,0 +1,98 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: google/protobuf/timestamp.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace google.protobuf { + export class Timestamp extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + seconds?: number; + nanos?: 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 ("seconds" in data && data.seconds != undefined) { + this.seconds = data.seconds; + } + if ("nanos" in data && data.nanos != undefined) { + this.nanos = data.nanos; + } + } + } + get seconds() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set seconds(value: number) { + pb_1.Message.setField(this, 1, value); + } + get nanos() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set nanos(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + seconds?: number; + nanos?: number; + }): Timestamp { + const message = new Timestamp({}); + if (data.seconds != null) { + message.seconds = data.seconds; + } + if (data.nanos != null) { + message.nanos = data.nanos; + } + return message; + } + toObject() { + const data: { + seconds?: number; + nanos?: number; + } = {}; + if (this.seconds != null) { + data.seconds = this.seconds; + } + if (this.nanos != null) { + data.nanos = this.nanos; + } + 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.seconds != 0) + writer.writeInt64(1, this.seconds); + if (this.nanos != 0) + writer.writeInt32(2, this.nanos); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Timestamp { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Timestamp(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.seconds = reader.readInt64(); + break; + case 2: + message.nanos = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Timestamp { + return Timestamp.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/fee/v1/ack.ts b/codegen/ibc/applications/fee/v1/ack.ts new file mode 100644 index 0000000..2c1fabb --- /dev/null +++ b/codegen/ibc/applications/fee/v1/ack.ts @@ -0,0 +1,121 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/fee/v1/ack.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.fee.v1 { + export class IncentivizedAcknowledgement extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + app_acknowledgement?: Uint8Array; + forward_relayer_address?: string; + underlying_app_success?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("app_acknowledgement" in data && data.app_acknowledgement != undefined) { + this.app_acknowledgement = data.app_acknowledgement; + } + if ("forward_relayer_address" in data && data.forward_relayer_address != undefined) { + this.forward_relayer_address = data.forward_relayer_address; + } + if ("underlying_app_success" in data && data.underlying_app_success != undefined) { + this.underlying_app_success = data.underlying_app_success; + } + } + } + get app_acknowledgement() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set app_acknowledgement(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get forward_relayer_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set forward_relayer_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get underlying_app_success() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set underlying_app_success(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + app_acknowledgement?: Uint8Array; + forward_relayer_address?: string; + underlying_app_success?: boolean; + }): IncentivizedAcknowledgement { + const message = new IncentivizedAcknowledgement({}); + if (data.app_acknowledgement != null) { + message.app_acknowledgement = data.app_acknowledgement; + } + if (data.forward_relayer_address != null) { + message.forward_relayer_address = data.forward_relayer_address; + } + if (data.underlying_app_success != null) { + message.underlying_app_success = data.underlying_app_success; + } + return message; + } + toObject() { + const data: { + app_acknowledgement?: Uint8Array; + forward_relayer_address?: string; + underlying_app_success?: boolean; + } = {}; + if (this.app_acknowledgement != null) { + data.app_acknowledgement = this.app_acknowledgement; + } + if (this.forward_relayer_address != null) { + data.forward_relayer_address = this.forward_relayer_address; + } + if (this.underlying_app_success != null) { + data.underlying_app_success = this.underlying_app_success; + } + 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.app_acknowledgement.length) + writer.writeBytes(1, this.app_acknowledgement); + if (this.forward_relayer_address.length) + writer.writeString(2, this.forward_relayer_address); + if (this.underlying_app_success != false) + writer.writeBool(3, this.underlying_app_success); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IncentivizedAcknowledgement { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IncentivizedAcknowledgement(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.app_acknowledgement = reader.readBytes(); + break; + case 2: + message.forward_relayer_address = reader.readString(); + break; + case 3: + message.underlying_app_success = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IncentivizedAcknowledgement { + return IncentivizedAcknowledgement.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/fee/v1/ack_pb.d.ts b/codegen/ibc/applications/fee/v1/ack_pb.d.ts new file mode 100644 index 0000000..6a1a603 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/ack_pb.d.ts @@ -0,0 +1,35 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/ack.proto + +import * as jspb from "google-protobuf"; + +export class IncentivizedAcknowledgement extends jspb.Message { + getAppAcknowledgement(): Uint8Array | string; + getAppAcknowledgement_asU8(): Uint8Array; + getAppAcknowledgement_asB64(): string; + setAppAcknowledgement(value: Uint8Array | string): void; + + getForwardRelayerAddress(): string; + setForwardRelayerAddress(value: string): void; + + getUnderlyingAppSuccess(): boolean; + setUnderlyingAppSuccess(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IncentivizedAcknowledgement.AsObject; + static toObject(includeInstance: boolean, msg: IncentivizedAcknowledgement): IncentivizedAcknowledgement.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IncentivizedAcknowledgement, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IncentivizedAcknowledgement; + static deserializeBinaryFromReader(message: IncentivizedAcknowledgement, reader: jspb.BinaryReader): IncentivizedAcknowledgement; +} + +export namespace IncentivizedAcknowledgement { + export type AsObject = { + appAcknowledgement: Uint8Array | string, + forwardRelayerAddress: string, + underlyingAppSuccess: boolean, + } +} + diff --git a/codegen/ibc/applications/fee/v1/ack_pb.js b/codegen/ibc/applications/fee/v1/ack_pb.js new file mode 100644 index 0000000..c88dcec --- /dev/null +++ b/codegen/ibc/applications/fee/v1/ack_pb.js @@ -0,0 +1,254 @@ +// source: ibc/applications/fee/v1/ack.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.ibc.applications.fee.v1.IncentivizedAcknowledgement', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.IncentivizedAcknowledgement, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.displayName = 'proto.ibc.applications.fee.v1.IncentivizedAcknowledgement'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.IncentivizedAcknowledgement} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.toObject = function(includeInstance, msg) { + var f, obj = { + appAcknowledgement: msg.getAppAcknowledgement_asB64(), + forwardRelayerAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + underlyingAppSuccess: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.IncentivizedAcknowledgement} + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.IncentivizedAcknowledgement; + return proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.IncentivizedAcknowledgement} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.IncentivizedAcknowledgement} + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppAcknowledgement(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setForwardRelayerAddress(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUnderlyingAppSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.IncentivizedAcknowledgement} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAppAcknowledgement_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getForwardRelayerAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUnderlyingAppSuccess(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional bytes app_acknowledgement = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.getAppAcknowledgement = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes app_acknowledgement = 1; + * This is a type-conversion wrapper around `getAppAcknowledgement()` + * @return {string} + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.getAppAcknowledgement_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppAcknowledgement())); +}; + + +/** + * optional bytes app_acknowledgement = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppAcknowledgement()` + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.getAppAcknowledgement_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppAcknowledgement())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.applications.fee.v1.IncentivizedAcknowledgement} returns this + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.setAppAcknowledgement = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string forward_relayer_address = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.getForwardRelayerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.IncentivizedAcknowledgement} returns this + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.setForwardRelayerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool underlying_app_success = 3; + * @return {boolean} + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.getUnderlyingAppSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.applications.fee.v1.IncentivizedAcknowledgement} returns this + */ +proto.ibc.applications.fee.v1.IncentivizedAcknowledgement.prototype.setUnderlyingAppSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.fee.v1); diff --git a/codegen/ibc/applications/fee/v1/ack_pb_service.d.ts b/codegen/ibc/applications/fee/v1/ack_pb_service.d.ts new file mode 100644 index 0000000..e9b7df1 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/ack_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/ack.proto + diff --git a/codegen/ibc/applications/fee/v1/ack_pb_service.js b/codegen/ibc/applications/fee/v1/ack_pb_service.js new file mode 100644 index 0000000..e9b7df1 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/ack_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/ack.proto + diff --git a/codegen/ibc/applications/fee/v1/fee.ts b/codegen/ibc/applications/fee/v1/fee.ts new file mode 100644 index 0000000..29b2e4d --- /dev/null +++ b/codegen/ibc/applications/fee/v1/fee.ts @@ -0,0 +1,402 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/fee/v1/fee.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../amino/amino"; +import * as dependency_2 from "./../../../../cosmos/base/v1beta1/coin"; +import * as dependency_3 from "./../../../../gogoproto/gogo"; +import * as dependency_4 from "./../../../core/channel/v1/channel"; +import * as dependency_5 from "./../../../../cosmos/msg/v1/msg"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.fee.v1 { + export class Fee extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + recv_fee?: dependency_2.cosmos.base.v1beta1.Coin[]; + ack_fee?: dependency_2.cosmos.base.v1beta1.Coin[]; + timeout_fee?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("recv_fee" in data && data.recv_fee != undefined) { + this.recv_fee = data.recv_fee; + } + if ("ack_fee" in data && data.ack_fee != undefined) { + this.ack_fee = data.ack_fee; + } + if ("timeout_fee" in data && data.timeout_fee != undefined) { + this.timeout_fee = data.timeout_fee; + } + } + } + get recv_fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 1) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set recv_fee(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get ack_fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 2) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set ack_fee(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get timeout_fee() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set timeout_fee(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + recv_fee?: ReturnType[]; + ack_fee?: ReturnType[]; + timeout_fee?: ReturnType[]; + }): Fee { + const message = new Fee({}); + if (data.recv_fee != null) { + message.recv_fee = data.recv_fee.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.ack_fee != null) { + message.ack_fee = data.ack_fee.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.timeout_fee != null) { + message.timeout_fee = data.timeout_fee.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + recv_fee?: ReturnType[]; + ack_fee?: ReturnType[]; + timeout_fee?: ReturnType[]; + } = {}; + if (this.recv_fee != null) { + data.recv_fee = this.recv_fee.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.ack_fee != null) { + data.ack_fee = this.ack_fee.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.timeout_fee != null) { + data.timeout_fee = this.timeout_fee.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.recv_fee.length) + writer.writeRepeatedMessage(1, this.recv_fee, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.ack_fee.length) + writer.writeRepeatedMessage(2, this.ack_fee, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.timeout_fee.length) + writer.writeRepeatedMessage(3, this.timeout_fee, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Fee { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Fee(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.recv_fee, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + case 2: + reader.readMessage(message.ack_fee, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + case 3: + reader.readMessage(message.timeout_fee, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Fee { + return Fee.deserialize(bytes); + } + } + export class PacketFee extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fee?: Fee; + refund_address?: string; + relayers?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + if ("refund_address" in data && data.refund_address != undefined) { + this.refund_address = data.refund_address; + } + if ("relayers" in data && data.relayers != undefined) { + this.relayers = data.relayers; + } + } + } + get fee() { + return pb_1.Message.getWrapperField(this, Fee, 1) as Fee; + } + set fee(value: Fee) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_fee() { + return pb_1.Message.getField(this, 1) != null; + } + get refund_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set refund_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + get relayers() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set relayers(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + fee?: ReturnType; + refund_address?: string; + relayers?: string[]; + }): PacketFee { + const message = new PacketFee({}); + if (data.fee != null) { + message.fee = Fee.fromObject(data.fee); + } + if (data.refund_address != null) { + message.refund_address = data.refund_address; + } + if (data.relayers != null) { + message.relayers = data.relayers; + } + return message; + } + toObject() { + const data: { + fee?: ReturnType; + refund_address?: string; + relayers?: string[]; + } = {}; + if (this.fee != null) { + data.fee = this.fee.toObject(); + } + if (this.refund_address != null) { + data.refund_address = this.refund_address; + } + if (this.relayers != null) { + data.relayers = this.relayers; + } + 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_fee) + writer.writeMessage(1, this.fee, () => this.fee.serialize(writer)); + if (this.refund_address.length) + writer.writeString(2, this.refund_address); + if (this.relayers.length) + writer.writeRepeatedString(3, this.relayers); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PacketFee { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PacketFee(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.fee, () => message.fee = Fee.deserialize(reader)); + break; + case 2: + message.refund_address = reader.readString(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PacketFee { + return PacketFee.deserialize(bytes); + } + } + export class PacketFees extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet_fees?: PacketFee[]; + }) { + 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 ("packet_fees" in data && data.packet_fees != undefined) { + this.packet_fees = data.packet_fees; + } + } + } + get packet_fees() { + return pb_1.Message.getRepeatedWrapperField(this, PacketFee, 1) as PacketFee[]; + } + set packet_fees(value: PacketFee[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + packet_fees?: ReturnType[]; + }): PacketFees { + const message = new PacketFees({}); + if (data.packet_fees != null) { + message.packet_fees = data.packet_fees.map(item => PacketFee.fromObject(item)); + } + return message; + } + toObject() { + const data: { + packet_fees?: ReturnType[]; + } = {}; + if (this.packet_fees != null) { + data.packet_fees = this.packet_fees.map((item: PacketFee) => item.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.packet_fees.length) + writer.writeRepeatedMessage(1, this.packet_fees, (item: PacketFee) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PacketFees { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PacketFees(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet_fees, () => pb_1.Message.addToRepeatedWrapperField(message, 1, PacketFee.deserialize(reader), PacketFee)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PacketFees { + return PacketFees.deserialize(bytes); + } + } + export class IdentifiedPacketFees extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet_id?: dependency_4.ibc.core.channel.v1.PacketId; + packet_fees?: PacketFee[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("packet_id" in data && data.packet_id != undefined) { + this.packet_id = data.packet_id; + } + if ("packet_fees" in data && data.packet_fees != undefined) { + this.packet_fees = data.packet_fees; + } + } + } + get packet_id() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.PacketId, 1) as dependency_4.ibc.core.channel.v1.PacketId; + } + set packet_id(value: dependency_4.ibc.core.channel.v1.PacketId) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet_id() { + return pb_1.Message.getField(this, 1) != null; + } + get packet_fees() { + return pb_1.Message.getRepeatedWrapperField(this, PacketFee, 2) as PacketFee[]; + } + set packet_fees(value: PacketFee[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + packet_id?: ReturnType; + packet_fees?: ReturnType[]; + }): IdentifiedPacketFees { + const message = new IdentifiedPacketFees({}); + if (data.packet_id != null) { + message.packet_id = dependency_4.ibc.core.channel.v1.PacketId.fromObject(data.packet_id); + } + if (data.packet_fees != null) { + message.packet_fees = data.packet_fees.map(item => PacketFee.fromObject(item)); + } + return message; + } + toObject() { + const data: { + packet_id?: ReturnType; + packet_fees?: ReturnType[]; + } = {}; + if (this.packet_id != null) { + data.packet_id = this.packet_id.toObject(); + } + if (this.packet_fees != null) { + data.packet_fees = this.packet_fees.map((item: PacketFee) => item.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_packet_id) + writer.writeMessage(1, this.packet_id, () => this.packet_id.serialize(writer)); + if (this.packet_fees.length) + writer.writeRepeatedMessage(2, this.packet_fees, (item: PacketFee) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IdentifiedPacketFees { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IdentifiedPacketFees(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet_id, () => message.packet_id = dependency_4.ibc.core.channel.v1.PacketId.deserialize(reader)); + break; + case 2: + reader.readMessage(message.packet_fees, () => pb_1.Message.addToRepeatedWrapperField(message, 2, PacketFee.deserialize(reader), PacketFee)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IdentifiedPacketFees { + return IdentifiedPacketFees.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/fee/v1/fee_pb.d.ts b/codegen/ibc/applications/fee/v1/fee_pb.d.ts new file mode 100644 index 0000000..c459677 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/fee_pb.d.ts @@ -0,0 +1,126 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/fee.proto + +import * as jspb from "google-protobuf"; +import * as amino_amino_pb from "../../../../amino/amino_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../../cosmos/base/v1beta1/coin_pb"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as ibc_core_channel_v1_channel_pb from "../../../../ibc/core/channel/v1/channel_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../../cosmos/msg/v1/msg_pb"; + +export class Fee extends jspb.Message { + clearRecvFeeList(): void; + getRecvFeeList(): Array; + setRecvFeeList(value: Array): void; + addRecvFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + clearAckFeeList(): void; + getAckFeeList(): Array; + setAckFeeList(value: Array): void; + addAckFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + clearTimeoutFeeList(): void; + getTimeoutFeeList(): Array; + setTimeoutFeeList(value: Array): void; + addTimeoutFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Fee.AsObject; + static toObject(includeInstance: boolean, msg: Fee): Fee.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Fee, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Fee; + static deserializeBinaryFromReader(message: Fee, reader: jspb.BinaryReader): Fee; +} + +export namespace Fee { + export type AsObject = { + recvFeeList: Array, + ackFeeList: Array, + timeoutFeeList: Array, + } +} + +export class PacketFee extends jspb.Message { + hasFee(): boolean; + clearFee(): void; + getFee(): Fee | undefined; + setFee(value?: Fee): void; + + getRefundAddress(): string; + setRefundAddress(value: string): void; + + clearRelayersList(): void; + getRelayersList(): Array; + setRelayersList(value: Array): void; + addRelayers(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PacketFee.AsObject; + static toObject(includeInstance: boolean, msg: PacketFee): PacketFee.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PacketFee, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PacketFee; + static deserializeBinaryFromReader(message: PacketFee, reader: jspb.BinaryReader): PacketFee; +} + +export namespace PacketFee { + export type AsObject = { + fee?: Fee.AsObject, + refundAddress: string, + relayersList: Array, + } +} + +export class PacketFees extends jspb.Message { + clearPacketFeesList(): void; + getPacketFeesList(): Array; + setPacketFeesList(value: Array): void; + addPacketFees(value?: PacketFee, index?: number): PacketFee; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PacketFees.AsObject; + static toObject(includeInstance: boolean, msg: PacketFees): PacketFees.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PacketFees, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PacketFees; + static deserializeBinaryFromReader(message: PacketFees, reader: jspb.BinaryReader): PacketFees; +} + +export namespace PacketFees { + export type AsObject = { + packetFeesList: Array, + } +} + +export class IdentifiedPacketFees extends jspb.Message { + hasPacketId(): boolean; + clearPacketId(): void; + getPacketId(): ibc_core_channel_v1_channel_pb.PacketId | undefined; + setPacketId(value?: ibc_core_channel_v1_channel_pb.PacketId): void; + + clearPacketFeesList(): void; + getPacketFeesList(): Array; + setPacketFeesList(value: Array): void; + addPacketFees(value?: PacketFee, index?: number): PacketFee; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentifiedPacketFees.AsObject; + static toObject(includeInstance: boolean, msg: IdentifiedPacketFees): IdentifiedPacketFees.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentifiedPacketFees, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentifiedPacketFees; + static deserializeBinaryFromReader(message: IdentifiedPacketFees, reader: jspb.BinaryReader): IdentifiedPacketFees; +} + +export namespace IdentifiedPacketFees { + export type AsObject = { + packetId?: ibc_core_channel_v1_channel_pb.PacketId.AsObject, + packetFeesList: Array, + } +} + diff --git a/codegen/ibc/applications/fee/v1/fee_pb.js b/codegen/ibc/applications/fee/v1/fee_pb.js new file mode 100644 index 0000000..8ac63ba --- /dev/null +++ b/codegen/ibc/applications/fee/v1/fee_pb.js @@ -0,0 +1,990 @@ +// source: ibc/applications/fee/v1/fee.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var amino_amino_pb = require('../../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +var cosmos_msg_v1_msg_pb = require('../../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +goog.exportSymbol('proto.ibc.applications.fee.v1.Fee', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.IdentifiedPacketFees', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.PacketFee', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.PacketFees', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.Fee = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.Fee.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.Fee, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.Fee.displayName = 'proto.ibc.applications.fee.v1.Fee'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.PacketFee = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.PacketFee.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.PacketFee, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.PacketFee.displayName = 'proto.ibc.applications.fee.v1.PacketFee'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.PacketFees = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.PacketFees.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.PacketFees, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.PacketFees.displayName = 'proto.ibc.applications.fee.v1.PacketFees'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.IdentifiedPacketFees.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.IdentifiedPacketFees, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.IdentifiedPacketFees.displayName = 'proto.ibc.applications.fee.v1.IdentifiedPacketFees'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.Fee.repeatedFields_ = [1,2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.Fee.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.Fee.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.Fee} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.Fee.toObject = function(includeInstance, msg) { + var f, obj = { + recvFeeList: jspb.Message.toObjectList(msg.getRecvFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + ackFeeList: jspb.Message.toObjectList(msg.getAckFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + timeoutFeeList: jspb.Message.toObjectList(msg.getTimeoutFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.Fee} + */ +proto.ibc.applications.fee.v1.Fee.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.Fee; + return proto.ibc.applications.fee.v1.Fee.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.Fee} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.Fee} + */ +proto.ibc.applications.fee.v1.Fee.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRecvFee(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAckFee(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addTimeoutFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.Fee.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.Fee.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.Fee} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.Fee.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecvFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getAckFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTimeoutFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin recv_fee = 1; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.Fee.prototype.getRecvFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.Fee} returns this +*/ +proto.ibc.applications.fee.v1.Fee.prototype.setRecvFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.fee.v1.Fee.prototype.addRecvFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.Fee} returns this + */ +proto.ibc.applications.fee.v1.Fee.prototype.clearRecvFeeList = function() { + return this.setRecvFeeList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin ack_fee = 2; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.Fee.prototype.getAckFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.Fee} returns this +*/ +proto.ibc.applications.fee.v1.Fee.prototype.setAckFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.fee.v1.Fee.prototype.addAckFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.Fee} returns this + */ +proto.ibc.applications.fee.v1.Fee.prototype.clearAckFeeList = function() { + return this.setAckFeeList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin timeout_fee = 3; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.Fee.prototype.getTimeoutFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.Fee} returns this +*/ +proto.ibc.applications.fee.v1.Fee.prototype.setTimeoutFeeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.fee.v1.Fee.prototype.addTimeoutFee = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.Fee} returns this + */ +proto.ibc.applications.fee.v1.Fee.prototype.clearTimeoutFeeList = function() { + return this.setTimeoutFeeList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.PacketFee.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.PacketFee.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.PacketFee} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.PacketFee.toObject = function(includeInstance, msg) { + var f, obj = { + fee: (f = msg.getFee()) && proto.ibc.applications.fee.v1.Fee.toObject(includeInstance, f), + refundAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + relayersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.PacketFee} + */ +proto.ibc.applications.fee.v1.PacketFee.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.PacketFee; + return proto.ibc.applications.fee.v1.PacketFee.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.PacketFee} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.PacketFee} + */ +proto.ibc.applications.fee.v1.PacketFee.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ibc.applications.fee.v1.Fee; + reader.readMessage(value,proto.ibc.applications.fee.v1.Fee.deserializeBinaryFromReader); + msg.setFee(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRefundAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addRelayers(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.PacketFee.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.PacketFee} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.PacketFee.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFee(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ibc.applications.fee.v1.Fee.serializeBinaryToWriter + ); + } + f = message.getRefundAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRelayersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional Fee fee = 1; + * @return {?proto.ibc.applications.fee.v1.Fee} + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.getFee = function() { + return /** @type{?proto.ibc.applications.fee.v1.Fee} */ ( + jspb.Message.getWrapperField(this, proto.ibc.applications.fee.v1.Fee, 1)); +}; + + +/** + * @param {?proto.ibc.applications.fee.v1.Fee|undefined} value + * @return {!proto.ibc.applications.fee.v1.PacketFee} returns this +*/ +proto.ibc.applications.fee.v1.PacketFee.prototype.setFee = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.PacketFee} returns this + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.clearFee = function() { + return this.setFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.hasFee = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string refund_address = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.getRefundAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.PacketFee} returns this + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.setRefundAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string relayers = 3; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.getRelayersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.PacketFee} returns this + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.setRelayersList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.PacketFee} returns this + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.addRelayers = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.PacketFee} returns this + */ +proto.ibc.applications.fee.v1.PacketFee.prototype.clearRelayersList = function() { + return this.setRelayersList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.PacketFees.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.PacketFees.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.PacketFees.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.PacketFees} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.PacketFees.toObject = function(includeInstance, msg) { + var f, obj = { + packetFeesList: jspb.Message.toObjectList(msg.getPacketFeesList(), + proto.ibc.applications.fee.v1.PacketFee.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.PacketFees} + */ +proto.ibc.applications.fee.v1.PacketFees.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.PacketFees; + return proto.ibc.applications.fee.v1.PacketFees.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.PacketFees} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.PacketFees} + */ +proto.ibc.applications.fee.v1.PacketFees.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ibc.applications.fee.v1.PacketFee; + reader.readMessage(value,proto.ibc.applications.fee.v1.PacketFee.deserializeBinaryFromReader); + msg.addPacketFees(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.PacketFees.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.PacketFees.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.PacketFees} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.PacketFees.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacketFeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.ibc.applications.fee.v1.PacketFee.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PacketFee packet_fees = 1; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.PacketFees.prototype.getPacketFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.fee.v1.PacketFee, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.PacketFees} returns this +*/ +proto.ibc.applications.fee.v1.PacketFees.prototype.setPacketFeesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.PacketFee=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.PacketFee} + */ +proto.ibc.applications.fee.v1.PacketFees.prototype.addPacketFees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.fee.v1.PacketFee, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.PacketFees} returns this + */ +proto.ibc.applications.fee.v1.PacketFees.prototype.clearPacketFeesList = function() { + return this.setPacketFeesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.IdentifiedPacketFees.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.toObject = function(includeInstance, msg) { + var f, obj = { + packetId: (f = msg.getPacketId()) && ibc_core_channel_v1_channel_pb.PacketId.toObject(includeInstance, f), + packetFeesList: jspb.Message.toObjectList(msg.getPacketFeesList(), + proto.ibc.applications.fee.v1.PacketFee.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.IdentifiedPacketFees; + return proto.ibc.applications.fee.v1.IdentifiedPacketFees.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.PacketId; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketId.deserializeBinaryFromReader); + msg.setPacketId(value); + break; + case 2: + var value = new proto.ibc.applications.fee.v1.PacketFee; + reader.readMessage(value,proto.ibc.applications.fee.v1.PacketFee.deserializeBinaryFromReader); + msg.addPacketFees(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.IdentifiedPacketFees.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacketId(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketId.serializeBinaryToWriter + ); + } + f = message.getPacketFeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.applications.fee.v1.PacketFee.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ibc.core.channel.v1.PacketId packet_id = 1; + * @return {?proto.ibc.core.channel.v1.PacketId} + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.getPacketId = function() { + return /** @type{?proto.ibc.core.channel.v1.PacketId} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.PacketId, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.PacketId|undefined} value + * @return {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} returns this +*/ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.setPacketId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} returns this + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.clearPacketId = function() { + return this.setPacketId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.hasPacketId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated PacketFee packet_fees = 2; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.getPacketFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.fee.v1.PacketFee, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} returns this +*/ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.setPacketFeesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.PacketFee=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.PacketFee} + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.addPacketFees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.applications.fee.v1.PacketFee, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} returns this + */ +proto.ibc.applications.fee.v1.IdentifiedPacketFees.prototype.clearPacketFeesList = function() { + return this.setPacketFeesList([]); +}; + + +goog.object.extend(exports, proto.ibc.applications.fee.v1); diff --git a/codegen/ibc/applications/fee/v1/fee_pb_service.d.ts b/codegen/ibc/applications/fee/v1/fee_pb_service.d.ts new file mode 100644 index 0000000..51a947b --- /dev/null +++ b/codegen/ibc/applications/fee/v1/fee_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/fee.proto + diff --git a/codegen/ibc/applications/fee/v1/fee_pb_service.js b/codegen/ibc/applications/fee/v1/fee_pb_service.js new file mode 100644 index 0000000..51a947b --- /dev/null +++ b/codegen/ibc/applications/fee/v1/fee_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/fee.proto + diff --git a/codegen/ibc/applications/fee/v1/genesis.ts b/codegen/ibc/applications/fee/v1/genesis.ts new file mode 100644 index 0000000..0b5805d --- /dev/null +++ b/codegen/ibc/applications/fee/v1/genesis.ts @@ -0,0 +1,579 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/fee/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./fee"; +import * as dependency_3 from "./../../../core/channel/v1/channel"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.fee.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + identified_fees?: dependency_2.ibc.applications.fee.v1.IdentifiedPacketFees[]; + fee_enabled_channels?: FeeEnabledChannel[]; + registered_payees?: RegisteredPayee[]; + registered_counterparty_payees?: RegisteredCounterpartyPayee[]; + forward_relayers?: ForwardRelayerAddress[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3, 4, 5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("identified_fees" in data && data.identified_fees != undefined) { + this.identified_fees = data.identified_fees; + } + if ("fee_enabled_channels" in data && data.fee_enabled_channels != undefined) { + this.fee_enabled_channels = data.fee_enabled_channels; + } + if ("registered_payees" in data && data.registered_payees != undefined) { + this.registered_payees = data.registered_payees; + } + if ("registered_counterparty_payees" in data && data.registered_counterparty_payees != undefined) { + this.registered_counterparty_payees = data.registered_counterparty_payees; + } + if ("forward_relayers" in data && data.forward_relayers != undefined) { + this.forward_relayers = data.forward_relayers; + } + } + } + get identified_fees() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.ibc.applications.fee.v1.IdentifiedPacketFees, 1) as dependency_2.ibc.applications.fee.v1.IdentifiedPacketFees[]; + } + set identified_fees(value: dependency_2.ibc.applications.fee.v1.IdentifiedPacketFees[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get fee_enabled_channels() { + return pb_1.Message.getRepeatedWrapperField(this, FeeEnabledChannel, 2) as FeeEnabledChannel[]; + } + set fee_enabled_channels(value: FeeEnabledChannel[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get registered_payees() { + return pb_1.Message.getRepeatedWrapperField(this, RegisteredPayee, 3) as RegisteredPayee[]; + } + set registered_payees(value: RegisteredPayee[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get registered_counterparty_payees() { + return pb_1.Message.getRepeatedWrapperField(this, RegisteredCounterpartyPayee, 4) as RegisteredCounterpartyPayee[]; + } + set registered_counterparty_payees(value: RegisteredCounterpartyPayee[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get forward_relayers() { + return pb_1.Message.getRepeatedWrapperField(this, ForwardRelayerAddress, 5) as ForwardRelayerAddress[]; + } + set forward_relayers(value: ForwardRelayerAddress[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + static fromObject(data: { + identified_fees?: ReturnType[]; + fee_enabled_channels?: ReturnType[]; + registered_payees?: ReturnType[]; + registered_counterparty_payees?: ReturnType[]; + forward_relayers?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.identified_fees != null) { + message.identified_fees = data.identified_fees.map(item => dependency_2.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(item)); + } + if (data.fee_enabled_channels != null) { + message.fee_enabled_channels = data.fee_enabled_channels.map(item => FeeEnabledChannel.fromObject(item)); + } + if (data.registered_payees != null) { + message.registered_payees = data.registered_payees.map(item => RegisteredPayee.fromObject(item)); + } + if (data.registered_counterparty_payees != null) { + message.registered_counterparty_payees = data.registered_counterparty_payees.map(item => RegisteredCounterpartyPayee.fromObject(item)); + } + if (data.forward_relayers != null) { + message.forward_relayers = data.forward_relayers.map(item => ForwardRelayerAddress.fromObject(item)); + } + return message; + } + toObject() { + const data: { + identified_fees?: ReturnType[]; + fee_enabled_channels?: ReturnType[]; + registered_payees?: ReturnType[]; + registered_counterparty_payees?: ReturnType[]; + forward_relayers?: ReturnType[]; + } = {}; + if (this.identified_fees != null) { + data.identified_fees = this.identified_fees.map((item: dependency_2.ibc.applications.fee.v1.IdentifiedPacketFees) => item.toObject()); + } + if (this.fee_enabled_channels != null) { + data.fee_enabled_channels = this.fee_enabled_channels.map((item: FeeEnabledChannel) => item.toObject()); + } + if (this.registered_payees != null) { + data.registered_payees = this.registered_payees.map((item: RegisteredPayee) => item.toObject()); + } + if (this.registered_counterparty_payees != null) { + data.registered_counterparty_payees = this.registered_counterparty_payees.map((item: RegisteredCounterpartyPayee) => item.toObject()); + } + if (this.forward_relayers != null) { + data.forward_relayers = this.forward_relayers.map((item: ForwardRelayerAddress) => item.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.identified_fees.length) + writer.writeRepeatedMessage(1, this.identified_fees, (item: dependency_2.ibc.applications.fee.v1.IdentifiedPacketFees) => item.serialize(writer)); + if (this.fee_enabled_channels.length) + writer.writeRepeatedMessage(2, this.fee_enabled_channels, (item: FeeEnabledChannel) => item.serialize(writer)); + if (this.registered_payees.length) + writer.writeRepeatedMessage(3, this.registered_payees, (item: RegisteredPayee) => item.serialize(writer)); + if (this.registered_counterparty_payees.length) + writer.writeRepeatedMessage(4, this.registered_counterparty_payees, (item: RegisteredCounterpartyPayee) => item.serialize(writer)); + if (this.forward_relayers.length) + writer.writeRepeatedMessage(5, this.forward_relayers, (item: ForwardRelayerAddress) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.identified_fees, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.ibc.applications.fee.v1.IdentifiedPacketFees.deserialize(reader), dependency_2.ibc.applications.fee.v1.IdentifiedPacketFees)); + break; + case 2: + reader.readMessage(message.fee_enabled_channels, () => pb_1.Message.addToRepeatedWrapperField(message, 2, FeeEnabledChannel.deserialize(reader), FeeEnabledChannel)); + break; + case 3: + reader.readMessage(message.registered_payees, () => pb_1.Message.addToRepeatedWrapperField(message, 3, RegisteredPayee.deserialize(reader), RegisteredPayee)); + break; + case 4: + reader.readMessage(message.registered_counterparty_payees, () => pb_1.Message.addToRepeatedWrapperField(message, 4, RegisteredCounterpartyPayee.deserialize(reader), RegisteredCounterpartyPayee)); + break; + case 5: + reader.readMessage(message.forward_relayers, () => pb_1.Message.addToRepeatedWrapperField(message, 5, ForwardRelayerAddress.deserialize(reader), ForwardRelayerAddress)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class FeeEnabledChannel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): FeeEnabledChannel { + const message = new FeeEnabledChannel({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FeeEnabledChannel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FeeEnabledChannel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FeeEnabledChannel { + return FeeEnabledChannel.deserialize(bytes); + } + } + export class RegisteredPayee extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channel_id?: string; + relayer?: string; + payee?: 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 ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("relayer" in data && data.relayer != undefined) { + this.relayer = data.relayer; + } + if ("payee" in data && data.payee != undefined) { + this.payee = data.payee; + } + } + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get relayer() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set relayer(value: string) { + pb_1.Message.setField(this, 2, value); + } + get payee() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set payee(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + channel_id?: string; + relayer?: string; + payee?: string; + }): RegisteredPayee { + const message = new RegisteredPayee({}); + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.relayer != null) { + message.relayer = data.relayer; + } + if (data.payee != null) { + message.payee = data.payee; + } + return message; + } + toObject() { + const data: { + channel_id?: string; + relayer?: string; + payee?: string; + } = {}; + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.relayer != null) { + data.relayer = this.relayer; + } + if (this.payee != null) { + data.payee = this.payee; + } + 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.channel_id.length) + writer.writeString(1, this.channel_id); + if (this.relayer.length) + writer.writeString(2, this.relayer); + if (this.payee.length) + writer.writeString(3, this.payee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RegisteredPayee { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RegisteredPayee(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.channel_id = reader.readString(); + break; + case 2: + message.relayer = reader.readString(); + break; + case 3: + message.payee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RegisteredPayee { + return RegisteredPayee.deserialize(bytes); + } + } + export class RegisteredCounterpartyPayee extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channel_id?: string; + relayer?: string; + counterparty_payee?: 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 ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("relayer" in data && data.relayer != undefined) { + this.relayer = data.relayer; + } + if ("counterparty_payee" in data && data.counterparty_payee != undefined) { + this.counterparty_payee = data.counterparty_payee; + } + } + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get relayer() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set relayer(value: string) { + pb_1.Message.setField(this, 2, value); + } + get counterparty_payee() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set counterparty_payee(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + channel_id?: string; + relayer?: string; + counterparty_payee?: string; + }): RegisteredCounterpartyPayee { + const message = new RegisteredCounterpartyPayee({}); + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.relayer != null) { + message.relayer = data.relayer; + } + if (data.counterparty_payee != null) { + message.counterparty_payee = data.counterparty_payee; + } + return message; + } + toObject() { + const data: { + channel_id?: string; + relayer?: string; + counterparty_payee?: string; + } = {}; + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.relayer != null) { + data.relayer = this.relayer; + } + if (this.counterparty_payee != null) { + data.counterparty_payee = this.counterparty_payee; + } + 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.channel_id.length) + writer.writeString(1, this.channel_id); + if (this.relayer.length) + writer.writeString(2, this.relayer); + if (this.counterparty_payee.length) + writer.writeString(3, this.counterparty_payee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RegisteredCounterpartyPayee { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RegisteredCounterpartyPayee(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.channel_id = reader.readString(); + break; + case 2: + message.relayer = reader.readString(); + break; + case 3: + message.counterparty_payee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RegisteredCounterpartyPayee { + return RegisteredCounterpartyPayee.deserialize(bytes); + } + } + export class ForwardRelayerAddress extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: string; + packet_id?: dependency_3.ibc.core.channel.v1.PacketId; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("packet_id" in data && data.packet_id != undefined) { + this.packet_id = data.packet_id; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + get packet_id() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.channel.v1.PacketId, 2) as dependency_3.ibc.core.channel.v1.PacketId; + } + set packet_id(value: dependency_3.ibc.core.channel.v1.PacketId) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_packet_id() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + address?: string; + packet_id?: ReturnType; + }): ForwardRelayerAddress { + const message = new ForwardRelayerAddress({}); + if (data.address != null) { + message.address = data.address; + } + if (data.packet_id != null) { + message.packet_id = dependency_3.ibc.core.channel.v1.PacketId.fromObject(data.packet_id); + } + return message; + } + toObject() { + const data: { + address?: string; + packet_id?: ReturnType; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.packet_id != null) { + data.packet_id = this.packet_id.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.address.length) + writer.writeString(1, this.address); + if (this.has_packet_id) + writer.writeMessage(2, this.packet_id, () => this.packet_id.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ForwardRelayerAddress { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ForwardRelayerAddress(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + case 2: + reader.readMessage(message.packet_id, () => message.packet_id = dependency_3.ibc.core.channel.v1.PacketId.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ForwardRelayerAddress { + return ForwardRelayerAddress.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/fee/v1/genesis_pb.d.ts b/codegen/ibc/applications/fee/v1/genesis_pb.d.ts new file mode 100644 index 0000000..0dbbe50 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/genesis_pb.d.ts @@ -0,0 +1,160 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as ibc_applications_fee_v1_fee_pb from "../../../../ibc/applications/fee/v1/fee_pb"; +import * as ibc_core_channel_v1_channel_pb from "../../../../ibc/core/channel/v1/channel_pb"; + +export class GenesisState extends jspb.Message { + clearIdentifiedFeesList(): void; + getIdentifiedFeesList(): Array; + setIdentifiedFeesList(value: Array): void; + addIdentifiedFees(value?: ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees, index?: number): ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees; + + clearFeeEnabledChannelsList(): void; + getFeeEnabledChannelsList(): Array; + setFeeEnabledChannelsList(value: Array): void; + addFeeEnabledChannels(value?: FeeEnabledChannel, index?: number): FeeEnabledChannel; + + clearRegisteredPayeesList(): void; + getRegisteredPayeesList(): Array; + setRegisteredPayeesList(value: Array): void; + addRegisteredPayees(value?: RegisteredPayee, index?: number): RegisteredPayee; + + clearRegisteredCounterpartyPayeesList(): void; + getRegisteredCounterpartyPayeesList(): Array; + setRegisteredCounterpartyPayeesList(value: Array): void; + addRegisteredCounterpartyPayees(value?: RegisteredCounterpartyPayee, index?: number): RegisteredCounterpartyPayee; + + clearForwardRelayersList(): void; + getForwardRelayersList(): Array; + setForwardRelayersList(value: Array): void; + addForwardRelayers(value?: ForwardRelayerAddress, index?: number): ForwardRelayerAddress; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + identifiedFeesList: Array, + feeEnabledChannelsList: Array, + registeredPayeesList: Array, + registeredCounterpartyPayeesList: Array, + forwardRelayersList: Array, + } +} + +export class FeeEnabledChannel extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeeEnabledChannel.AsObject; + static toObject(includeInstance: boolean, msg: FeeEnabledChannel): FeeEnabledChannel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FeeEnabledChannel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FeeEnabledChannel; + static deserializeBinaryFromReader(message: FeeEnabledChannel, reader: jspb.BinaryReader): FeeEnabledChannel; +} + +export namespace FeeEnabledChannel { + export type AsObject = { + portId: string, + channelId: string, + } +} + +export class RegisteredPayee extends jspb.Message { + getChannelId(): string; + setChannelId(value: string): void; + + getRelayer(): string; + setRelayer(value: string): void; + + getPayee(): string; + setPayee(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegisteredPayee.AsObject; + static toObject(includeInstance: boolean, msg: RegisteredPayee): RegisteredPayee.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RegisteredPayee, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegisteredPayee; + static deserializeBinaryFromReader(message: RegisteredPayee, reader: jspb.BinaryReader): RegisteredPayee; +} + +export namespace RegisteredPayee { + export type AsObject = { + channelId: string, + relayer: string, + payee: string, + } +} + +export class RegisteredCounterpartyPayee extends jspb.Message { + getChannelId(): string; + setChannelId(value: string): void; + + getRelayer(): string; + setRelayer(value: string): void; + + getCounterpartyPayee(): string; + setCounterpartyPayee(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegisteredCounterpartyPayee.AsObject; + static toObject(includeInstance: boolean, msg: RegisteredCounterpartyPayee): RegisteredCounterpartyPayee.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RegisteredCounterpartyPayee, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegisteredCounterpartyPayee; + static deserializeBinaryFromReader(message: RegisteredCounterpartyPayee, reader: jspb.BinaryReader): RegisteredCounterpartyPayee; +} + +export namespace RegisteredCounterpartyPayee { + export type AsObject = { + channelId: string, + relayer: string, + counterpartyPayee: string, + } +} + +export class ForwardRelayerAddress extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + hasPacketId(): boolean; + clearPacketId(): void; + getPacketId(): ibc_core_channel_v1_channel_pb.PacketId | undefined; + setPacketId(value?: ibc_core_channel_v1_channel_pb.PacketId): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ForwardRelayerAddress.AsObject; + static toObject(includeInstance: boolean, msg: ForwardRelayerAddress): ForwardRelayerAddress.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ForwardRelayerAddress, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ForwardRelayerAddress; + static deserializeBinaryFromReader(message: ForwardRelayerAddress, reader: jspb.BinaryReader): ForwardRelayerAddress; +} + +export namespace ForwardRelayerAddress { + export type AsObject = { + address: string, + packetId?: ibc_core_channel_v1_channel_pb.PacketId.AsObject, + } +} + diff --git a/codegen/ibc/applications/fee/v1/genesis_pb.js b/codegen/ibc/applications/fee/v1/genesis_pb.js new file mode 100644 index 0000000..752b771 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/genesis_pb.js @@ -0,0 +1,1227 @@ +// source: ibc/applications/fee/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var ibc_applications_fee_v1_fee_pb = require('../../../../ibc/applications/fee/v1/fee_pb.js'); +goog.object.extend(proto, ibc_applications_fee_v1_fee_pb); +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +goog.exportSymbol('proto.ibc.applications.fee.v1.FeeEnabledChannel', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.ForwardRelayerAddress', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.GenesisState', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.RegisteredPayee', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.GenesisState.displayName = 'proto.ibc.applications.fee.v1.GenesisState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.FeeEnabledChannel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.FeeEnabledChannel.displayName = 'proto.ibc.applications.fee.v1.FeeEnabledChannel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.RegisteredPayee = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.RegisteredPayee, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.RegisteredPayee.displayName = 'proto.ibc.applications.fee.v1.RegisteredPayee'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.displayName = 'proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.ForwardRelayerAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.ForwardRelayerAddress.displayName = 'proto.ibc.applications.fee.v1.ForwardRelayerAddress'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.GenesisState.repeatedFields_ = [1,2,3,4,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + identifiedFeesList: jspb.Message.toObjectList(msg.getIdentifiedFeesList(), + ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.toObject, includeInstance), + feeEnabledChannelsList: jspb.Message.toObjectList(msg.getFeeEnabledChannelsList(), + proto.ibc.applications.fee.v1.FeeEnabledChannel.toObject, includeInstance), + registeredPayeesList: jspb.Message.toObjectList(msg.getRegisteredPayeesList(), + proto.ibc.applications.fee.v1.RegisteredPayee.toObject, includeInstance), + registeredCounterpartyPayeesList: jspb.Message.toObjectList(msg.getRegisteredCounterpartyPayeesList(), + proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.toObject, includeInstance), + forwardRelayersList: jspb.Message.toObjectList(msg.getForwardRelayersList(), + proto.ibc.applications.fee.v1.ForwardRelayerAddress.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.GenesisState} + */ +proto.ibc.applications.fee.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.GenesisState; + return proto.ibc.applications.fee.v1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.GenesisState} + */ +proto.ibc.applications.fee.v1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees; + reader.readMessage(value,ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.deserializeBinaryFromReader); + msg.addIdentifiedFees(value); + break; + case 2: + var value = new proto.ibc.applications.fee.v1.FeeEnabledChannel; + reader.readMessage(value,proto.ibc.applications.fee.v1.FeeEnabledChannel.deserializeBinaryFromReader); + msg.addFeeEnabledChannels(value); + break; + case 3: + var value = new proto.ibc.applications.fee.v1.RegisteredPayee; + reader.readMessage(value,proto.ibc.applications.fee.v1.RegisteredPayee.deserializeBinaryFromReader); + msg.addRegisteredPayees(value); + break; + case 4: + var value = new proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee; + reader.readMessage(value,proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.deserializeBinaryFromReader); + msg.addRegisteredCounterpartyPayees(value); + break; + case 5: + var value = new proto.ibc.applications.fee.v1.ForwardRelayerAddress; + reader.readMessage(value,proto.ibc.applications.fee.v1.ForwardRelayerAddress.deserializeBinaryFromReader); + msg.addForwardRelayers(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentifiedFeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.serializeBinaryToWriter + ); + } + f = message.getFeeEnabledChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.applications.fee.v1.FeeEnabledChannel.serializeBinaryToWriter + ); + } + f = message.getRegisteredPayeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.ibc.applications.fee.v1.RegisteredPayee.serializeBinaryToWriter + ); + } + f = message.getRegisteredCounterpartyPayeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.serializeBinaryToWriter + ); + } + f = message.getForwardRelayersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.ibc.applications.fee.v1.ForwardRelayerAddress.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedPacketFees identified_fees = 1; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.getIdentifiedFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this +*/ +proto.ibc.applications.fee.v1.GenesisState.prototype.setIdentifiedFeesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.IdentifiedPacketFees=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.addIdentifiedFees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.fee.v1.IdentifiedPacketFees, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.clearIdentifiedFeesList = function() { + return this.setIdentifiedFeesList([]); +}; + + +/** + * repeated FeeEnabledChannel fee_enabled_channels = 2; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.getFeeEnabledChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.fee.v1.FeeEnabledChannel, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this +*/ +proto.ibc.applications.fee.v1.GenesisState.prototype.setFeeEnabledChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.FeeEnabledChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.FeeEnabledChannel} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.addFeeEnabledChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.applications.fee.v1.FeeEnabledChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.clearFeeEnabledChannelsList = function() { + return this.setFeeEnabledChannelsList([]); +}; + + +/** + * repeated RegisteredPayee registered_payees = 3; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.getRegisteredPayeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.fee.v1.RegisteredPayee, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this +*/ +proto.ibc.applications.fee.v1.GenesisState.prototype.setRegisteredPayeesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.RegisteredPayee=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.RegisteredPayee} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.addRegisteredPayees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ibc.applications.fee.v1.RegisteredPayee, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.clearRegisteredPayeesList = function() { + return this.setRegisteredPayeesList([]); +}; + + +/** + * repeated RegisteredCounterpartyPayee registered_counterparty_payees = 4; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.getRegisteredCounterpartyPayeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this +*/ +proto.ibc.applications.fee.v1.GenesisState.prototype.setRegisteredCounterpartyPayeesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.addRegisteredCounterpartyPayees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.clearRegisteredCounterpartyPayeesList = function() { + return this.setRegisteredCounterpartyPayeesList([]); +}; + + +/** + * repeated ForwardRelayerAddress forward_relayers = 5; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.getForwardRelayersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.fee.v1.ForwardRelayerAddress, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this +*/ +proto.ibc.applications.fee.v1.GenesisState.prototype.setForwardRelayersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.ForwardRelayerAddress=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.ForwardRelayerAddress} + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.addForwardRelayers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.ibc.applications.fee.v1.ForwardRelayerAddress, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.GenesisState} returns this + */ +proto.ibc.applications.fee.v1.GenesisState.prototype.clearForwardRelayersList = function() { + return this.setForwardRelayersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.FeeEnabledChannel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.FeeEnabledChannel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.FeeEnabledChannel} + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.FeeEnabledChannel; + return proto.ibc.applications.fee.v1.FeeEnabledChannel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.FeeEnabledChannel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.FeeEnabledChannel} + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.FeeEnabledChannel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.FeeEnabledChannel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.FeeEnabledChannel} returns this + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.FeeEnabledChannel} returns this + */ +proto.ibc.applications.fee.v1.FeeEnabledChannel.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.RegisteredPayee.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.RegisteredPayee.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.RegisteredPayee} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.RegisteredPayee.toObject = function(includeInstance, msg) { + var f, obj = { + channelId: jspb.Message.getFieldWithDefault(msg, 1, ""), + relayer: jspb.Message.getFieldWithDefault(msg, 2, ""), + payee: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.RegisteredPayee} + */ +proto.ibc.applications.fee.v1.RegisteredPayee.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.RegisteredPayee; + return proto.ibc.applications.fee.v1.RegisteredPayee.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.RegisteredPayee} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.RegisteredPayee} + */ +proto.ibc.applications.fee.v1.RegisteredPayee.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRelayer(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPayee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.RegisteredPayee.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.RegisteredPayee.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.RegisteredPayee} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.RegisteredPayee.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRelayer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPayee(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string channel_id = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.RegisteredPayee.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.RegisteredPayee} returns this + */ +proto.ibc.applications.fee.v1.RegisteredPayee.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string relayer = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.RegisteredPayee.prototype.getRelayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.RegisteredPayee} returns this + */ +proto.ibc.applications.fee.v1.RegisteredPayee.prototype.setRelayer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string payee = 3; + * @return {string} + */ +proto.ibc.applications.fee.v1.RegisteredPayee.prototype.getPayee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.RegisteredPayee} returns this + */ +proto.ibc.applications.fee.v1.RegisteredPayee.prototype.setPayee = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.toObject = function(includeInstance, msg) { + var f, obj = { + channelId: jspb.Message.getFieldWithDefault(msg, 1, ""), + relayer: jspb.Message.getFieldWithDefault(msg, 2, ""), + counterpartyPayee: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee} + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee; + return proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee} + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRelayer(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCounterpartyPayee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRelayer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCounterpartyPayee(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string channel_id = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee} returns this + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string relayer = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.prototype.getRelayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee} returns this + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.prototype.setRelayer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string counterparty_payee = 3; + * @return {string} + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.prototype.getCounterpartyPayee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee} returns this + */ +proto.ibc.applications.fee.v1.RegisteredCounterpartyPayee.prototype.setCounterpartyPayee = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.ForwardRelayerAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.ForwardRelayerAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + packetId: (f = msg.getPacketId()) && ibc_core_channel_v1_channel_pb.PacketId.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.ForwardRelayerAddress} + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.ForwardRelayerAddress; + return proto.ibc.applications.fee.v1.ForwardRelayerAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.ForwardRelayerAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.ForwardRelayerAddress} + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = new ibc_core_channel_v1_channel_pb.PacketId; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketId.deserializeBinaryFromReader); + msg.setPacketId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.ForwardRelayerAddress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.ForwardRelayerAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPacketId(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_channel_v1_channel_pb.PacketId.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.ForwardRelayerAddress} returns this + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional ibc.core.channel.v1.PacketId packet_id = 2; + * @return {?proto.ibc.core.channel.v1.PacketId} + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.prototype.getPacketId = function() { + return /** @type{?proto.ibc.core.channel.v1.PacketId} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.PacketId, 2)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.PacketId|undefined} value + * @return {!proto.ibc.applications.fee.v1.ForwardRelayerAddress} returns this +*/ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.prototype.setPacketId = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.ForwardRelayerAddress} returns this + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.prototype.clearPacketId = function() { + return this.setPacketId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.ForwardRelayerAddress.prototype.hasPacketId = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.ibc.applications.fee.v1); diff --git a/codegen/ibc/applications/fee/v1/genesis_pb_service.d.ts b/codegen/ibc/applications/fee/v1/genesis_pb_service.d.ts new file mode 100644 index 0000000..e957ffe --- /dev/null +++ b/codegen/ibc/applications/fee/v1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/genesis.proto + diff --git a/codegen/ibc/applications/fee/v1/genesis_pb_service.js b/codegen/ibc/applications/fee/v1/genesis_pb_service.js new file mode 100644 index 0000000..e957ffe --- /dev/null +++ b/codegen/ibc/applications/fee/v1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/genesis.proto + diff --git a/codegen/ibc/applications/fee/v1/metadata.ts b/codegen/ibc/applications/fee/v1/metadata.ts new file mode 100644 index 0000000..53e7799 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/metadata.ts @@ -0,0 +1,98 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/fee/v1/metadata.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.fee.v1 { + export class Metadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fee_version?: string; + app_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 ("fee_version" in data && data.fee_version != undefined) { + this.fee_version = data.fee_version; + } + if ("app_version" in data && data.app_version != undefined) { + this.app_version = data.app_version; + } + } + } + get fee_version() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set fee_version(value: string) { + pb_1.Message.setField(this, 1, value); + } + get app_version() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set app_version(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + fee_version?: string; + app_version?: string; + }): Metadata { + const message = new Metadata({}); + if (data.fee_version != null) { + message.fee_version = data.fee_version; + } + if (data.app_version != null) { + message.app_version = data.app_version; + } + return message; + } + toObject() { + const data: { + fee_version?: string; + app_version?: string; + } = {}; + if (this.fee_version != null) { + data.fee_version = this.fee_version; + } + if (this.app_version != null) { + data.app_version = this.app_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.fee_version.length) + writer.writeString(1, this.fee_version); + if (this.app_version.length) + writer.writeString(2, this.app_version); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Metadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Metadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fee_version = reader.readString(); + break; + case 2: + message.app_version = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Metadata { + return Metadata.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/fee/v1/metadata_pb.d.ts b/codegen/ibc/applications/fee/v1/metadata_pb.d.ts new file mode 100644 index 0000000..ed474d0 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/metadata_pb.d.ts @@ -0,0 +1,29 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/metadata.proto + +import * as jspb from "google-protobuf"; + +export class Metadata extends jspb.Message { + getFeeVersion(): string; + setFeeVersion(value: string): void; + + getAppVersion(): string; + setAppVersion(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Metadata.AsObject; + static toObject(includeInstance: boolean, msg: Metadata): Metadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Metadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Metadata; + static deserializeBinaryFromReader(message: Metadata, reader: jspb.BinaryReader): Metadata; +} + +export namespace Metadata { + export type AsObject = { + feeVersion: string, + appVersion: string, + } +} + diff --git a/codegen/ibc/applications/fee/v1/metadata_pb.js b/codegen/ibc/applications/fee/v1/metadata_pb.js new file mode 100644 index 0000000..2e22c9c --- /dev/null +++ b/codegen/ibc/applications/fee/v1/metadata_pb.js @@ -0,0 +1,200 @@ +// source: ibc/applications/fee/v1/metadata.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.ibc.applications.fee.v1.Metadata', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.Metadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.Metadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.Metadata.displayName = 'proto.ibc.applications.fee.v1.Metadata'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.Metadata.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.Metadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.Metadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.Metadata.toObject = function(includeInstance, msg) { + var f, obj = { + feeVersion: jspb.Message.getFieldWithDefault(msg, 1, ""), + appVersion: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.Metadata} + */ +proto.ibc.applications.fee.v1.Metadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.Metadata; + return proto.ibc.applications.fee.v1.Metadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.Metadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.Metadata} + */ +proto.ibc.applications.fee.v1.Metadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFeeVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAppVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.Metadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.Metadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.Metadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.Metadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeeVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAppVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string fee_version = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.Metadata.prototype.getFeeVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.Metadata} returns this + */ +proto.ibc.applications.fee.v1.Metadata.prototype.setFeeVersion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string app_version = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.Metadata.prototype.getAppVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.Metadata} returns this + */ +proto.ibc.applications.fee.v1.Metadata.prototype.setAppVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.fee.v1); diff --git a/codegen/ibc/applications/fee/v1/metadata_pb_service.d.ts b/codegen/ibc/applications/fee/v1/metadata_pb_service.d.ts new file mode 100644 index 0000000..6dbeb8c --- /dev/null +++ b/codegen/ibc/applications/fee/v1/metadata_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/metadata.proto + diff --git a/codegen/ibc/applications/fee/v1/metadata_pb_service.js b/codegen/ibc/applications/fee/v1/metadata_pb_service.js new file mode 100644 index 0000000..6dbeb8c --- /dev/null +++ b/codegen/ibc/applications/fee/v1/metadata_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/metadata.proto + diff --git a/codegen/ibc/applications/fee/v1/query.ts b/codegen/ibc/applications/fee/v1/query.ts new file mode 100644 index 0000000..ebf85aa --- /dev/null +++ b/codegen/ibc/applications/fee/v1/query.ts @@ -0,0 +1,1829 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/fee/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../google/api/annotations"; +import * as dependency_3 from "./../../../../cosmos/base/v1beta1/coin"; +import * as dependency_4 from "./../../../../cosmos/base/query/v1beta1/pagination"; +import * as dependency_5 from "./fee"; +import * as dependency_6 from "./genesis"; +import * as dependency_7 from "./../../../core/channel/v1/channel"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.applications.fee.v1 { + export class QueryIncentivizedPacketsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_4.cosmos.base.query.v1beta1.PageRequest; + query_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 ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("query_height" in data && data.query_height != undefined) { + this.query_height = data.query_height; + } + } + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 1) != null; + } + get query_height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set query_height(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + pagination?: ReturnType; + query_height?: number; + }): QueryIncentivizedPacketsRequest { + const message = new QueryIncentivizedPacketsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + if (data.query_height != null) { + message.query_height = data.query_height; + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + query_height?: number; + } = {}; + if (this.pagination != null) { + data.pagination = this.pagination.toObject(); + } + if (this.query_height != null) { + data.query_height = this.query_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_pagination) + writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer)); + if (this.query_height != 0) + writer.writeUint64(2, this.query_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIncentivizedPacketsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIncentivizedPacketsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + case 2: + message.query_height = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketsRequest { + return QueryIncentivizedPacketsRequest.deserialize(bytes); + } + } + export class QueryIncentivizedPacketsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + incentivized_packets?: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("incentivized_packets" in data && data.incentivized_packets != undefined) { + this.incentivized_packets = data.incentivized_packets; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get incentivized_packets() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees, 1) as dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees[]; + } + set incentivized_packets(value: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + incentivized_packets?: ReturnType[]; + pagination?: ReturnType; + }): QueryIncentivizedPacketsResponse { + const message = new QueryIncentivizedPacketsResponse({}); + if (data.incentivized_packets != null) { + message.incentivized_packets = data.incentivized_packets.map(item => dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + incentivized_packets?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.incentivized_packets != null) { + data.incentivized_packets = this.incentivized_packets.map((item: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees) => item.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.incentivized_packets.length) + writer.writeRepeatedMessage(1, this.incentivized_packets, (item: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIncentivizedPacketsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIncentivizedPacketsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.incentivized_packets, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees.deserialize(reader), dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketsResponse { + return QueryIncentivizedPacketsResponse.deserialize(bytes); + } + } + export class QueryIncentivizedPacketRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet_id?: dependency_7.ibc.core.channel.v1.PacketId; + query_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 ("packet_id" in data && data.packet_id != undefined) { + this.packet_id = data.packet_id; + } + if ("query_height" in data && data.query_height != undefined) { + this.query_height = data.query_height; + } + } + } + get packet_id() { + return pb_1.Message.getWrapperField(this, dependency_7.ibc.core.channel.v1.PacketId, 1) as dependency_7.ibc.core.channel.v1.PacketId; + } + set packet_id(value: dependency_7.ibc.core.channel.v1.PacketId) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet_id() { + return pb_1.Message.getField(this, 1) != null; + } + get query_height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set query_height(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + packet_id?: ReturnType; + query_height?: number; + }): QueryIncentivizedPacketRequest { + const message = new QueryIncentivizedPacketRequest({}); + if (data.packet_id != null) { + message.packet_id = dependency_7.ibc.core.channel.v1.PacketId.fromObject(data.packet_id); + } + if (data.query_height != null) { + message.query_height = data.query_height; + } + return message; + } + toObject() { + const data: { + packet_id?: ReturnType; + query_height?: number; + } = {}; + if (this.packet_id != null) { + data.packet_id = this.packet_id.toObject(); + } + if (this.query_height != null) { + data.query_height = this.query_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_packet_id) + writer.writeMessage(1, this.packet_id, () => this.packet_id.serialize(writer)); + if (this.query_height != 0) + writer.writeUint64(2, this.query_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIncentivizedPacketRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIncentivizedPacketRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet_id, () => message.packet_id = dependency_7.ibc.core.channel.v1.PacketId.deserialize(reader)); + break; + case 2: + message.query_height = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketRequest { + return QueryIncentivizedPacketRequest.deserialize(bytes); + } + } + export class QueryIncentivizedPacketResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + incentivized_packet?: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("incentivized_packet" in data && data.incentivized_packet != undefined) { + this.incentivized_packet = data.incentivized_packet; + } + } + } + get incentivized_packet() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees, 1) as dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees; + } + set incentivized_packet(value: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_incentivized_packet() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + incentivized_packet?: ReturnType; + }): QueryIncentivizedPacketResponse { + const message = new QueryIncentivizedPacketResponse({}); + if (data.incentivized_packet != null) { + message.incentivized_packet = dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(data.incentivized_packet); + } + return message; + } + toObject() { + const data: { + incentivized_packet?: ReturnType; + } = {}; + if (this.incentivized_packet != null) { + data.incentivized_packet = this.incentivized_packet.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_incentivized_packet) + writer.writeMessage(1, this.incentivized_packet, () => this.incentivized_packet.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIncentivizedPacketResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIncentivizedPacketResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.incentivized_packet, () => message.incentivized_packet = dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketResponse { + return QueryIncentivizedPacketResponse.deserialize(bytes); + } + } + export class QueryIncentivizedPacketsForChannelRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_4.cosmos.base.query.v1beta1.PageRequest; + port_id?: string; + channel_id?: string; + query_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 ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("query_height" in data && data.query_height != undefined) { + this.query_height = data.query_height; + } + } + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 1) != null; + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get query_height() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set query_height(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + pagination?: ReturnType; + port_id?: string; + channel_id?: string; + query_height?: number; + }): QueryIncentivizedPacketsForChannelRequest { + const message = new QueryIncentivizedPacketsForChannelRequest({}); + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.query_height != null) { + message.query_height = data.query_height; + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + port_id?: string; + channel_id?: string; + query_height?: number; + } = {}; + if (this.pagination != null) { + data.pagination = this.pagination.toObject(); + } + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.query_height != null) { + data.query_height = this.query_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_pagination) + writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer)); + if (this.port_id.length) + writer.writeString(2, this.port_id); + if (this.channel_id.length) + writer.writeString(3, this.channel_id); + if (this.query_height != 0) + writer.writeUint64(4, this.query_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIncentivizedPacketsForChannelRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIncentivizedPacketsForChannelRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + case 2: + message.port_id = reader.readString(); + break; + case 3: + message.channel_id = reader.readString(); + break; + case 4: + message.query_height = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketsForChannelRequest { + return QueryIncentivizedPacketsForChannelRequest.deserialize(bytes); + } + } + export class QueryIncentivizedPacketsForChannelResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + incentivized_packets?: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("incentivized_packets" in data && data.incentivized_packets != undefined) { + this.incentivized_packets = data.incentivized_packets; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get incentivized_packets() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees, 1) as dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees[]; + } + set incentivized_packets(value: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + incentivized_packets?: ReturnType[]; + pagination?: ReturnType; + }): QueryIncentivizedPacketsForChannelResponse { + const message = new QueryIncentivizedPacketsForChannelResponse({}); + if (data.incentivized_packets != null) { + message.incentivized_packets = data.incentivized_packets.map(item => dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + incentivized_packets?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.incentivized_packets != null) { + data.incentivized_packets = this.incentivized_packets.map((item: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees) => item.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.incentivized_packets.length) + writer.writeRepeatedMessage(1, this.incentivized_packets, (item: dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryIncentivizedPacketsForChannelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryIncentivizedPacketsForChannelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.incentivized_packets, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees.deserialize(reader), dependency_5.ibc.applications.fee.v1.IdentifiedPacketFees)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketsForChannelResponse { + return QueryIncentivizedPacketsForChannelResponse.deserialize(bytes); + } + } + export class QueryTotalRecvFeesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet_id?: dependency_7.ibc.core.channel.v1.PacketId; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("packet_id" in data && data.packet_id != undefined) { + this.packet_id = data.packet_id; + } + } + } + get packet_id() { + return pb_1.Message.getWrapperField(this, dependency_7.ibc.core.channel.v1.PacketId, 1) as dependency_7.ibc.core.channel.v1.PacketId; + } + set packet_id(value: dependency_7.ibc.core.channel.v1.PacketId) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet_id() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + packet_id?: ReturnType; + }): QueryTotalRecvFeesRequest { + const message = new QueryTotalRecvFeesRequest({}); + if (data.packet_id != null) { + message.packet_id = dependency_7.ibc.core.channel.v1.PacketId.fromObject(data.packet_id); + } + return message; + } + toObject() { + const data: { + packet_id?: ReturnType; + } = {}; + if (this.packet_id != null) { + data.packet_id = this.packet_id.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_packet_id) + writer.writeMessage(1, this.packet_id, () => this.packet_id.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalRecvFeesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalRecvFeesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet_id, () => message.packet_id = dependency_7.ibc.core.channel.v1.PacketId.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalRecvFeesRequest { + return QueryTotalRecvFeesRequest.deserialize(bytes); + } + } + export class QueryTotalRecvFeesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + recv_fees?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + 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 ("recv_fees" in data && data.recv_fees != undefined) { + this.recv_fees = data.recv_fees; + } + } + } + get recv_fees() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 1) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set recv_fees(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + recv_fees?: ReturnType[]; + }): QueryTotalRecvFeesResponse { + const message = new QueryTotalRecvFeesResponse({}); + if (data.recv_fees != null) { + message.recv_fees = data.recv_fees.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + recv_fees?: ReturnType[]; + } = {}; + if (this.recv_fees != null) { + data.recv_fees = this.recv_fees.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.recv_fees.length) + writer.writeRepeatedMessage(1, this.recv_fees, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalRecvFeesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalRecvFeesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.recv_fees, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalRecvFeesResponse { + return QueryTotalRecvFeesResponse.deserialize(bytes); + } + } + export class QueryTotalAckFeesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet_id?: dependency_7.ibc.core.channel.v1.PacketId; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("packet_id" in data && data.packet_id != undefined) { + this.packet_id = data.packet_id; + } + } + } + get packet_id() { + return pb_1.Message.getWrapperField(this, dependency_7.ibc.core.channel.v1.PacketId, 1) as dependency_7.ibc.core.channel.v1.PacketId; + } + set packet_id(value: dependency_7.ibc.core.channel.v1.PacketId) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet_id() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + packet_id?: ReturnType; + }): QueryTotalAckFeesRequest { + const message = new QueryTotalAckFeesRequest({}); + if (data.packet_id != null) { + message.packet_id = dependency_7.ibc.core.channel.v1.PacketId.fromObject(data.packet_id); + } + return message; + } + toObject() { + const data: { + packet_id?: ReturnType; + } = {}; + if (this.packet_id != null) { + data.packet_id = this.packet_id.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_packet_id) + writer.writeMessage(1, this.packet_id, () => this.packet_id.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalAckFeesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalAckFeesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet_id, () => message.packet_id = dependency_7.ibc.core.channel.v1.PacketId.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalAckFeesRequest { + return QueryTotalAckFeesRequest.deserialize(bytes); + } + } + export class QueryTotalAckFeesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + ack_fees?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + 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 ("ack_fees" in data && data.ack_fees != undefined) { + this.ack_fees = data.ack_fees; + } + } + } + get ack_fees() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 1) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set ack_fees(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + ack_fees?: ReturnType[]; + }): QueryTotalAckFeesResponse { + const message = new QueryTotalAckFeesResponse({}); + if (data.ack_fees != null) { + message.ack_fees = data.ack_fees.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + ack_fees?: ReturnType[]; + } = {}; + if (this.ack_fees != null) { + data.ack_fees = this.ack_fees.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.ack_fees.length) + writer.writeRepeatedMessage(1, this.ack_fees, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalAckFeesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalAckFeesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.ack_fees, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalAckFeesResponse { + return QueryTotalAckFeesResponse.deserialize(bytes); + } + } + export class QueryTotalTimeoutFeesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet_id?: dependency_7.ibc.core.channel.v1.PacketId; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("packet_id" in data && data.packet_id != undefined) { + this.packet_id = data.packet_id; + } + } + } + get packet_id() { + return pb_1.Message.getWrapperField(this, dependency_7.ibc.core.channel.v1.PacketId, 1) as dependency_7.ibc.core.channel.v1.PacketId; + } + set packet_id(value: dependency_7.ibc.core.channel.v1.PacketId) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet_id() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + packet_id?: ReturnType; + }): QueryTotalTimeoutFeesRequest { + const message = new QueryTotalTimeoutFeesRequest({}); + if (data.packet_id != null) { + message.packet_id = dependency_7.ibc.core.channel.v1.PacketId.fromObject(data.packet_id); + } + return message; + } + toObject() { + const data: { + packet_id?: ReturnType; + } = {}; + if (this.packet_id != null) { + data.packet_id = this.packet_id.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_packet_id) + writer.writeMessage(1, this.packet_id, () => this.packet_id.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalTimeoutFeesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalTimeoutFeesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet_id, () => message.packet_id = dependency_7.ibc.core.channel.v1.PacketId.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalTimeoutFeesRequest { + return QueryTotalTimeoutFeesRequest.deserialize(bytes); + } + } + export class QueryTotalTimeoutFeesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + timeout_fees?: dependency_3.cosmos.base.v1beta1.Coin[]; + }) { + 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 ("timeout_fees" in data && data.timeout_fees != undefined) { + this.timeout_fees = data.timeout_fees; + } + } + } + get timeout_fees() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 1) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set timeout_fees(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + timeout_fees?: ReturnType[]; + }): QueryTotalTimeoutFeesResponse { + const message = new QueryTotalTimeoutFeesResponse({}); + if (data.timeout_fees != null) { + message.timeout_fees = data.timeout_fees.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + timeout_fees?: ReturnType[]; + } = {}; + if (this.timeout_fees != null) { + data.timeout_fees = this.timeout_fees.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.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.timeout_fees.length) + writer.writeRepeatedMessage(1, this.timeout_fees, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalTimeoutFeesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalTimeoutFeesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.timeout_fees, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalTimeoutFeesResponse { + return QueryTotalTimeoutFeesResponse.deserialize(bytes); + } + } + export class QueryPayeeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channel_id?: string; + relayer?: 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 ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("relayer" in data && data.relayer != undefined) { + this.relayer = data.relayer; + } + } + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get relayer() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set relayer(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + channel_id?: string; + relayer?: string; + }): QueryPayeeRequest { + const message = new QueryPayeeRequest({}); + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.relayer != null) { + message.relayer = data.relayer; + } + return message; + } + toObject() { + const data: { + channel_id?: string; + relayer?: string; + } = {}; + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.relayer != null) { + data.relayer = this.relayer; + } + 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.channel_id.length) + writer.writeString(1, this.channel_id); + if (this.relayer.length) + writer.writeString(2, this.relayer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPayeeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPayeeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.channel_id = reader.readString(); + break; + case 2: + message.relayer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPayeeRequest { + return QueryPayeeRequest.deserialize(bytes); + } + } + export class QueryPayeeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + payee_address?: 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 ("payee_address" in data && data.payee_address != undefined) { + this.payee_address = data.payee_address; + } + } + } + get payee_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set payee_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + payee_address?: string; + }): QueryPayeeResponse { + const message = new QueryPayeeResponse({}); + if (data.payee_address != null) { + message.payee_address = data.payee_address; + } + return message; + } + toObject() { + const data: { + payee_address?: string; + } = {}; + if (this.payee_address != null) { + data.payee_address = this.payee_address; + } + 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.payee_address.length) + writer.writeString(1, this.payee_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPayeeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPayeeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.payee_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPayeeResponse { + return QueryPayeeResponse.deserialize(bytes); + } + } + export class QueryCounterpartyPayeeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channel_id?: string; + relayer?: 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 ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("relayer" in data && data.relayer != undefined) { + this.relayer = data.relayer; + } + } + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get relayer() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set relayer(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + channel_id?: string; + relayer?: string; + }): QueryCounterpartyPayeeRequest { + const message = new QueryCounterpartyPayeeRequest({}); + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.relayer != null) { + message.relayer = data.relayer; + } + return message; + } + toObject() { + const data: { + channel_id?: string; + relayer?: string; + } = {}; + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.relayer != null) { + data.relayer = this.relayer; + } + 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.channel_id.length) + writer.writeString(1, this.channel_id); + if (this.relayer.length) + writer.writeString(2, this.relayer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCounterpartyPayeeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCounterpartyPayeeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.channel_id = reader.readString(); + break; + case 2: + message.relayer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCounterpartyPayeeRequest { + return QueryCounterpartyPayeeRequest.deserialize(bytes); + } + } + export class QueryCounterpartyPayeeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + counterparty_payee?: 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 ("counterparty_payee" in data && data.counterparty_payee != undefined) { + this.counterparty_payee = data.counterparty_payee; + } + } + } + get counterparty_payee() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set counterparty_payee(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + counterparty_payee?: string; + }): QueryCounterpartyPayeeResponse { + const message = new QueryCounterpartyPayeeResponse({}); + if (data.counterparty_payee != null) { + message.counterparty_payee = data.counterparty_payee; + } + return message; + } + toObject() { + const data: { + counterparty_payee?: string; + } = {}; + if (this.counterparty_payee != null) { + data.counterparty_payee = this.counterparty_payee; + } + 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.counterparty_payee.length) + writer.writeString(1, this.counterparty_payee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCounterpartyPayeeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCounterpartyPayeeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.counterparty_payee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCounterpartyPayeeResponse { + return QueryCounterpartyPayeeResponse.deserialize(bytes); + } + } + export class QueryFeeEnabledChannelsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_4.cosmos.base.query.v1beta1.PageRequest; + query_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 ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("query_height" in data && data.query_height != undefined) { + this.query_height = data.query_height; + } + } + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_4.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 1) != null; + } + get query_height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set query_height(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + pagination?: ReturnType; + query_height?: number; + }): QueryFeeEnabledChannelsRequest { + const message = new QueryFeeEnabledChannelsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + if (data.query_height != null) { + message.query_height = data.query_height; + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + query_height?: number; + } = {}; + if (this.pagination != null) { + data.pagination = this.pagination.toObject(); + } + if (this.query_height != null) { + data.query_height = this.query_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_pagination) + writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer)); + if (this.query_height != 0) + writer.writeUint64(2, this.query_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryFeeEnabledChannelsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryFeeEnabledChannelsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + case 2: + message.query_height = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryFeeEnabledChannelsRequest { + return QueryFeeEnabledChannelsRequest.deserialize(bytes); + } + } + export class QueryFeeEnabledChannelsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fee_enabled_channels?: dependency_6.ibc.applications.fee.v1.FeeEnabledChannel[]; + pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("fee_enabled_channels" in data && data.fee_enabled_channels != undefined) { + this.fee_enabled_channels = data.fee_enabled_channels; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get fee_enabled_channels() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_6.ibc.applications.fee.v1.FeeEnabledChannel, 1) as dependency_6.ibc.applications.fee.v1.FeeEnabledChannel[]; + } + set fee_enabled_channels(value: dependency_6.ibc.applications.fee.v1.FeeEnabledChannel[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + fee_enabled_channels?: ReturnType[]; + pagination?: ReturnType; + }): QueryFeeEnabledChannelsResponse { + const message = new QueryFeeEnabledChannelsResponse({}); + if (data.fee_enabled_channels != null) { + message.fee_enabled_channels = data.fee_enabled_channels.map(item => dependency_6.ibc.applications.fee.v1.FeeEnabledChannel.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + fee_enabled_channels?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.fee_enabled_channels != null) { + data.fee_enabled_channels = this.fee_enabled_channels.map((item: dependency_6.ibc.applications.fee.v1.FeeEnabledChannel) => item.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.fee_enabled_channels.length) + writer.writeRepeatedMessage(1, this.fee_enabled_channels, (item: dependency_6.ibc.applications.fee.v1.FeeEnabledChannel) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryFeeEnabledChannelsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryFeeEnabledChannelsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.fee_enabled_channels, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_6.ibc.applications.fee.v1.FeeEnabledChannel.deserialize(reader), dependency_6.ibc.applications.fee.v1.FeeEnabledChannel)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryFeeEnabledChannelsResponse { + return QueryFeeEnabledChannelsResponse.deserialize(bytes); + } + } + export class QueryFeeEnabledChannelRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): QueryFeeEnabledChannelRequest { + const message = new QueryFeeEnabledChannelRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryFeeEnabledChannelRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryFeeEnabledChannelRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryFeeEnabledChannelRequest { + return QueryFeeEnabledChannelRequest.deserialize(bytes); + } + } + export class QueryFeeEnabledChannelResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fee_enabled?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fee_enabled" in data && data.fee_enabled != undefined) { + this.fee_enabled = data.fee_enabled; + } + } + } + get fee_enabled() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set fee_enabled(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + fee_enabled?: boolean; + }): QueryFeeEnabledChannelResponse { + const message = new QueryFeeEnabledChannelResponse({}); + if (data.fee_enabled != null) { + message.fee_enabled = data.fee_enabled; + } + return message; + } + toObject() { + const data: { + fee_enabled?: boolean; + } = {}; + if (this.fee_enabled != null) { + data.fee_enabled = this.fee_enabled; + } + 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.fee_enabled != false) + writer.writeBool(1, this.fee_enabled); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryFeeEnabledChannelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryFeeEnabledChannelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.fee_enabled = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryFeeEnabledChannelResponse { + return QueryFeeEnabledChannelResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + IncentivizedPackets: { + path: "/ibc.applications.fee.v1.Query/IncentivizedPackets", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryIncentivizedPacketsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryIncentivizedPacketsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryIncentivizedPacketsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryIncentivizedPacketsResponse.deserialize(new Uint8Array(bytes)) + }, + IncentivizedPacket: { + path: "/ibc.applications.fee.v1.Query/IncentivizedPacket", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryIncentivizedPacketRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryIncentivizedPacketRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryIncentivizedPacketResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryIncentivizedPacketResponse.deserialize(new Uint8Array(bytes)) + }, + IncentivizedPacketsForChannel: { + path: "/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryIncentivizedPacketsForChannelRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryIncentivizedPacketsForChannelRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryIncentivizedPacketsForChannelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryIncentivizedPacketsForChannelResponse.deserialize(new Uint8Array(bytes)) + }, + TotalRecvFees: { + path: "/ibc.applications.fee.v1.Query/TotalRecvFees", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTotalRecvFeesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTotalRecvFeesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTotalRecvFeesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTotalRecvFeesResponse.deserialize(new Uint8Array(bytes)) + }, + TotalAckFees: { + path: "/ibc.applications.fee.v1.Query/TotalAckFees", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTotalAckFeesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTotalAckFeesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTotalAckFeesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTotalAckFeesResponse.deserialize(new Uint8Array(bytes)) + }, + TotalTimeoutFees: { + path: "/ibc.applications.fee.v1.Query/TotalTimeoutFees", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTotalTimeoutFeesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTotalTimeoutFeesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTotalTimeoutFeesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTotalTimeoutFeesResponse.deserialize(new Uint8Array(bytes)) + }, + Payee: { + path: "/ibc.applications.fee.v1.Query/Payee", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPayeeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPayeeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPayeeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPayeeResponse.deserialize(new Uint8Array(bytes)) + }, + CounterpartyPayee: { + path: "/ibc.applications.fee.v1.Query/CounterpartyPayee", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryCounterpartyPayeeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryCounterpartyPayeeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryCounterpartyPayeeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryCounterpartyPayeeResponse.deserialize(new Uint8Array(bytes)) + }, + FeeEnabledChannels: { + path: "/ibc.applications.fee.v1.Query/FeeEnabledChannels", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryFeeEnabledChannelsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryFeeEnabledChannelsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryFeeEnabledChannelsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryFeeEnabledChannelsResponse.deserialize(new Uint8Array(bytes)) + }, + FeeEnabledChannel: { + path: "/ibc.applications.fee.v1.Query/FeeEnabledChannel", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryFeeEnabledChannelRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryFeeEnabledChannelRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryFeeEnabledChannelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryFeeEnabledChannelResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract IncentivizedPackets(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract IncentivizedPacket(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract IncentivizedPacketsForChannel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TotalRecvFees(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TotalAckFees(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TotalTimeoutFees(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Payee(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CounterpartyPayee(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract FeeEnabledChannels(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract FeeEnabledChannel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + IncentivizedPackets: GrpcUnaryServiceInterface = (message: QueryIncentivizedPacketsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.IncentivizedPackets(message, metadata, options, callback); + }; + IncentivizedPacket: GrpcUnaryServiceInterface = (message: QueryIncentivizedPacketRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.IncentivizedPacket(message, metadata, options, callback); + }; + IncentivizedPacketsForChannel: GrpcUnaryServiceInterface = (message: QueryIncentivizedPacketsForChannelRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.IncentivizedPacketsForChannel(message, metadata, options, callback); + }; + TotalRecvFees: GrpcUnaryServiceInterface = (message: QueryTotalRecvFeesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TotalRecvFees(message, metadata, options, callback); + }; + TotalAckFees: GrpcUnaryServiceInterface = (message: QueryTotalAckFeesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TotalAckFees(message, metadata, options, callback); + }; + TotalTimeoutFees: GrpcUnaryServiceInterface = (message: QueryTotalTimeoutFeesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TotalTimeoutFees(message, metadata, options, callback); + }; + Payee: GrpcUnaryServiceInterface = (message: QueryPayeeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Payee(message, metadata, options, callback); + }; + CounterpartyPayee: GrpcUnaryServiceInterface = (message: QueryCounterpartyPayeeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CounterpartyPayee(message, metadata, options, callback); + }; + FeeEnabledChannels: GrpcUnaryServiceInterface = (message: QueryFeeEnabledChannelsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.FeeEnabledChannels(message, metadata, options, callback); + }; + FeeEnabledChannel: GrpcUnaryServiceInterface = (message: QueryFeeEnabledChannelRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.FeeEnabledChannel(message, metadata, options, callback); + }; + } +} diff --git a/codegen/ibc/applications/fee/v1/query_pb.d.ts b/codegen/ibc/applications/fee/v1/query_pb.d.ts new file mode 100644 index 0000000..b6b8ebe --- /dev/null +++ b/codegen/ibc/applications/fee/v1/query_pb.d.ts @@ -0,0 +1,494 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/query.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as google_api_annotations_pb from "../../../../google/api/annotations_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../../cosmos/base/v1beta1/coin_pb"; +import * as cosmos_base_query_v1beta1_pagination_pb from "../../../../cosmos/base/query/v1beta1/pagination_pb"; +import * as ibc_applications_fee_v1_fee_pb from "../../../../ibc/applications/fee/v1/fee_pb"; +import * as ibc_applications_fee_v1_genesis_pb from "../../../../ibc/applications/fee/v1/genesis_pb"; +import * as ibc_core_channel_v1_channel_pb from "../../../../ibc/core/channel/v1/channel_pb"; + +export class QueryIncentivizedPacketsRequest extends jspb.Message { + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + getQueryHeight(): number; + setQueryHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIncentivizedPacketsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryIncentivizedPacketsRequest): QueryIncentivizedPacketsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIncentivizedPacketsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketsRequest; + static deserializeBinaryFromReader(message: QueryIncentivizedPacketsRequest, reader: jspb.BinaryReader): QueryIncentivizedPacketsRequest; +} + +export namespace QueryIncentivizedPacketsRequest { + export type AsObject = { + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + queryHeight: number, + } +} + +export class QueryIncentivizedPacketsResponse extends jspb.Message { + clearIncentivizedPacketsList(): void; + getIncentivizedPacketsList(): Array; + setIncentivizedPacketsList(value: Array): void; + addIncentivizedPackets(value?: ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees, index?: number): ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIncentivizedPacketsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryIncentivizedPacketsResponse): QueryIncentivizedPacketsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIncentivizedPacketsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketsResponse; + static deserializeBinaryFromReader(message: QueryIncentivizedPacketsResponse, reader: jspb.BinaryReader): QueryIncentivizedPacketsResponse; +} + +export namespace QueryIncentivizedPacketsResponse { + export type AsObject = { + incentivizedPacketsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryIncentivizedPacketRequest extends jspb.Message { + hasPacketId(): boolean; + clearPacketId(): void; + getPacketId(): ibc_core_channel_v1_channel_pb.PacketId | undefined; + setPacketId(value?: ibc_core_channel_v1_channel_pb.PacketId): void; + + getQueryHeight(): number; + setQueryHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIncentivizedPacketRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryIncentivizedPacketRequest): QueryIncentivizedPacketRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIncentivizedPacketRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketRequest; + static deserializeBinaryFromReader(message: QueryIncentivizedPacketRequest, reader: jspb.BinaryReader): QueryIncentivizedPacketRequest; +} + +export namespace QueryIncentivizedPacketRequest { + export type AsObject = { + packetId?: ibc_core_channel_v1_channel_pb.PacketId.AsObject, + queryHeight: number, + } +} + +export class QueryIncentivizedPacketResponse extends jspb.Message { + hasIncentivizedPacket(): boolean; + clearIncentivizedPacket(): void; + getIncentivizedPacket(): ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees | undefined; + setIncentivizedPacket(value?: ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIncentivizedPacketResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryIncentivizedPacketResponse): QueryIncentivizedPacketResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIncentivizedPacketResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketResponse; + static deserializeBinaryFromReader(message: QueryIncentivizedPacketResponse, reader: jspb.BinaryReader): QueryIncentivizedPacketResponse; +} + +export namespace QueryIncentivizedPacketResponse { + export type AsObject = { + incentivizedPacket?: ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.AsObject, + } +} + +export class QueryIncentivizedPacketsForChannelRequest extends jspb.Message { + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getQueryHeight(): number; + setQueryHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIncentivizedPacketsForChannelRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryIncentivizedPacketsForChannelRequest): QueryIncentivizedPacketsForChannelRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIncentivizedPacketsForChannelRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketsForChannelRequest; + static deserializeBinaryFromReader(message: QueryIncentivizedPacketsForChannelRequest, reader: jspb.BinaryReader): QueryIncentivizedPacketsForChannelRequest; +} + +export namespace QueryIncentivizedPacketsForChannelRequest { + export type AsObject = { + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + portId: string, + channelId: string, + queryHeight: number, + } +} + +export class QueryIncentivizedPacketsForChannelResponse extends jspb.Message { + clearIncentivizedPacketsList(): void; + getIncentivizedPacketsList(): Array; + setIncentivizedPacketsList(value: Array): void; + addIncentivizedPackets(value?: ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees, index?: number): ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryIncentivizedPacketsForChannelResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryIncentivizedPacketsForChannelResponse): QueryIncentivizedPacketsForChannelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryIncentivizedPacketsForChannelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryIncentivizedPacketsForChannelResponse; + static deserializeBinaryFromReader(message: QueryIncentivizedPacketsForChannelResponse, reader: jspb.BinaryReader): QueryIncentivizedPacketsForChannelResponse; +} + +export namespace QueryIncentivizedPacketsForChannelResponse { + export type AsObject = { + incentivizedPacketsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryTotalRecvFeesRequest extends jspb.Message { + hasPacketId(): boolean; + clearPacketId(): void; + getPacketId(): ibc_core_channel_v1_channel_pb.PacketId | undefined; + setPacketId(value?: ibc_core_channel_v1_channel_pb.PacketId): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalRecvFeesRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalRecvFeesRequest): QueryTotalRecvFeesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalRecvFeesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalRecvFeesRequest; + static deserializeBinaryFromReader(message: QueryTotalRecvFeesRequest, reader: jspb.BinaryReader): QueryTotalRecvFeesRequest; +} + +export namespace QueryTotalRecvFeesRequest { + export type AsObject = { + packetId?: ibc_core_channel_v1_channel_pb.PacketId.AsObject, + } +} + +export class QueryTotalRecvFeesResponse extends jspb.Message { + clearRecvFeesList(): void; + getRecvFeesList(): Array; + setRecvFeesList(value: Array): void; + addRecvFees(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalRecvFeesResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalRecvFeesResponse): QueryTotalRecvFeesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalRecvFeesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalRecvFeesResponse; + static deserializeBinaryFromReader(message: QueryTotalRecvFeesResponse, reader: jspb.BinaryReader): QueryTotalRecvFeesResponse; +} + +export namespace QueryTotalRecvFeesResponse { + export type AsObject = { + recvFeesList: Array, + } +} + +export class QueryTotalAckFeesRequest extends jspb.Message { + hasPacketId(): boolean; + clearPacketId(): void; + getPacketId(): ibc_core_channel_v1_channel_pb.PacketId | undefined; + setPacketId(value?: ibc_core_channel_v1_channel_pb.PacketId): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalAckFeesRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalAckFeesRequest): QueryTotalAckFeesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalAckFeesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalAckFeesRequest; + static deserializeBinaryFromReader(message: QueryTotalAckFeesRequest, reader: jspb.BinaryReader): QueryTotalAckFeesRequest; +} + +export namespace QueryTotalAckFeesRequest { + export type AsObject = { + packetId?: ibc_core_channel_v1_channel_pb.PacketId.AsObject, + } +} + +export class QueryTotalAckFeesResponse extends jspb.Message { + clearAckFeesList(): void; + getAckFeesList(): Array; + setAckFeesList(value: Array): void; + addAckFees(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalAckFeesResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalAckFeesResponse): QueryTotalAckFeesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalAckFeesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalAckFeesResponse; + static deserializeBinaryFromReader(message: QueryTotalAckFeesResponse, reader: jspb.BinaryReader): QueryTotalAckFeesResponse; +} + +export namespace QueryTotalAckFeesResponse { + export type AsObject = { + ackFeesList: Array, + } +} + +export class QueryTotalTimeoutFeesRequest extends jspb.Message { + hasPacketId(): boolean; + clearPacketId(): void; + getPacketId(): ibc_core_channel_v1_channel_pb.PacketId | undefined; + setPacketId(value?: ibc_core_channel_v1_channel_pb.PacketId): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalTimeoutFeesRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalTimeoutFeesRequest): QueryTotalTimeoutFeesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalTimeoutFeesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalTimeoutFeesRequest; + static deserializeBinaryFromReader(message: QueryTotalTimeoutFeesRequest, reader: jspb.BinaryReader): QueryTotalTimeoutFeesRequest; +} + +export namespace QueryTotalTimeoutFeesRequest { + export type AsObject = { + packetId?: ibc_core_channel_v1_channel_pb.PacketId.AsObject, + } +} + +export class QueryTotalTimeoutFeesResponse extends jspb.Message { + clearTimeoutFeesList(): void; + getTimeoutFeesList(): Array; + setTimeoutFeesList(value: Array): void; + addTimeoutFees(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalTimeoutFeesResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalTimeoutFeesResponse): QueryTotalTimeoutFeesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalTimeoutFeesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalTimeoutFeesResponse; + static deserializeBinaryFromReader(message: QueryTotalTimeoutFeesResponse, reader: jspb.BinaryReader): QueryTotalTimeoutFeesResponse; +} + +export namespace QueryTotalTimeoutFeesResponse { + export type AsObject = { + timeoutFeesList: Array, + } +} + +export class QueryPayeeRequest extends jspb.Message { + getChannelId(): string; + setChannelId(value: string): void; + + getRelayer(): string; + setRelayer(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryPayeeRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryPayeeRequest): QueryPayeeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryPayeeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPayeeRequest; + static deserializeBinaryFromReader(message: QueryPayeeRequest, reader: jspb.BinaryReader): QueryPayeeRequest; +} + +export namespace QueryPayeeRequest { + export type AsObject = { + channelId: string, + relayer: string, + } +} + +export class QueryPayeeResponse extends jspb.Message { + getPayeeAddress(): string; + setPayeeAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryPayeeResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryPayeeResponse): QueryPayeeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryPayeeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryPayeeResponse; + static deserializeBinaryFromReader(message: QueryPayeeResponse, reader: jspb.BinaryReader): QueryPayeeResponse; +} + +export namespace QueryPayeeResponse { + export type AsObject = { + payeeAddress: string, + } +} + +export class QueryCounterpartyPayeeRequest extends jspb.Message { + getChannelId(): string; + setChannelId(value: string): void; + + getRelayer(): string; + setRelayer(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCounterpartyPayeeRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryCounterpartyPayeeRequest): QueryCounterpartyPayeeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCounterpartyPayeeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCounterpartyPayeeRequest; + static deserializeBinaryFromReader(message: QueryCounterpartyPayeeRequest, reader: jspb.BinaryReader): QueryCounterpartyPayeeRequest; +} + +export namespace QueryCounterpartyPayeeRequest { + export type AsObject = { + channelId: string, + relayer: string, + } +} + +export class QueryCounterpartyPayeeResponse extends jspb.Message { + getCounterpartyPayee(): string; + setCounterpartyPayee(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCounterpartyPayeeResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryCounterpartyPayeeResponse): QueryCounterpartyPayeeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCounterpartyPayeeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCounterpartyPayeeResponse; + static deserializeBinaryFromReader(message: QueryCounterpartyPayeeResponse, reader: jspb.BinaryReader): QueryCounterpartyPayeeResponse; +} + +export namespace QueryCounterpartyPayeeResponse { + export type AsObject = { + counterpartyPayee: string, + } +} + +export class QueryFeeEnabledChannelsRequest extends jspb.Message { + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + getQueryHeight(): number; + setQueryHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryFeeEnabledChannelsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryFeeEnabledChannelsRequest): QueryFeeEnabledChannelsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryFeeEnabledChannelsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryFeeEnabledChannelsRequest; + static deserializeBinaryFromReader(message: QueryFeeEnabledChannelsRequest, reader: jspb.BinaryReader): QueryFeeEnabledChannelsRequest; +} + +export namespace QueryFeeEnabledChannelsRequest { + export type AsObject = { + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + queryHeight: number, + } +} + +export class QueryFeeEnabledChannelsResponse extends jspb.Message { + clearFeeEnabledChannelsList(): void; + getFeeEnabledChannelsList(): Array; + setFeeEnabledChannelsList(value: Array): void; + addFeeEnabledChannels(value?: ibc_applications_fee_v1_genesis_pb.FeeEnabledChannel, index?: number): ibc_applications_fee_v1_genesis_pb.FeeEnabledChannel; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryFeeEnabledChannelsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryFeeEnabledChannelsResponse): QueryFeeEnabledChannelsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryFeeEnabledChannelsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryFeeEnabledChannelsResponse; + static deserializeBinaryFromReader(message: QueryFeeEnabledChannelsResponse, reader: jspb.BinaryReader): QueryFeeEnabledChannelsResponse; +} + +export namespace QueryFeeEnabledChannelsResponse { + export type AsObject = { + feeEnabledChannelsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryFeeEnabledChannelRequest extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryFeeEnabledChannelRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryFeeEnabledChannelRequest): QueryFeeEnabledChannelRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryFeeEnabledChannelRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryFeeEnabledChannelRequest; + static deserializeBinaryFromReader(message: QueryFeeEnabledChannelRequest, reader: jspb.BinaryReader): QueryFeeEnabledChannelRequest; +} + +export namespace QueryFeeEnabledChannelRequest { + export type AsObject = { + portId: string, + channelId: string, + } +} + +export class QueryFeeEnabledChannelResponse extends jspb.Message { + getFeeEnabled(): boolean; + setFeeEnabled(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryFeeEnabledChannelResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryFeeEnabledChannelResponse): QueryFeeEnabledChannelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryFeeEnabledChannelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryFeeEnabledChannelResponse; + static deserializeBinaryFromReader(message: QueryFeeEnabledChannelResponse, reader: jspb.BinaryReader): QueryFeeEnabledChannelResponse; +} + +export namespace QueryFeeEnabledChannelResponse { + export type AsObject = { + feeEnabled: boolean, + } +} + diff --git a/codegen/ibc/applications/fee/v1/query_pb.js b/codegen/ibc/applications/fee/v1/query_pb.js new file mode 100644 index 0000000..efa6fc4 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/query_pb.js @@ -0,0 +1,3843 @@ +// source: ibc/applications/fee/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js'); +goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); +var ibc_applications_fee_v1_fee_pb = require('../../../../ibc/applications/fee/v1/fee_pb.js'); +goog.object.extend(proto, ibc_applications_fee_v1_fee_pb); +var ibc_applications_fee_v1_genesis_pb = require('../../../../ibc/applications/fee/v1/genesis_pb.js'); +goog.object.extend(proto, ibc_applications_fee_v1_genesis_pb); +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryPayeeRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryPayeeResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.displayName = 'proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.displayName = 'proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.displayName = 'proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.displayName = 'proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.displayName = 'proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.displayName = 'proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.displayName = 'proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.displayName = 'proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.displayName = 'proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.displayName = 'proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.displayName = 'proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.displayName = 'proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryPayeeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryPayeeRequest.displayName = 'proto.ibc.applications.fee.v1.QueryPayeeRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryPayeeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryPayeeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryPayeeResponse.displayName = 'proto.ibc.applications.fee.v1.QueryPayeeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.displayName = 'proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.displayName = 'proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.displayName = 'proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.displayName = 'proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.displayName = 'proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.displayName = 'proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f), + queryHeight: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest; + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQueryHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } + f = message.getQueryHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} returns this +*/ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 query_height = 2; + * @return {number} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.prototype.getQueryHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.prototype.setQueryHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + incentivizedPacketsList: jspb.Message.toObjectList(msg.getIncentivizedPacketsList(), + ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse; + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees; + reader.readMessage(value,ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.deserializeBinaryFromReader); + msg.addIncentivizedPackets(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncentivizedPacketsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedPacketFees incentivized_packets = 1; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.getIncentivizedPacketsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.setIncentivizedPacketsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.IdentifiedPacketFees=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.addIncentivizedPackets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.fee.v1.IdentifiedPacketFees, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.clearIncentivizedPacketsList = function() { + return this.setIncentivizedPacketsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.toObject = function(includeInstance, msg) { + var f, obj = { + packetId: (f = msg.getPacketId()) && ibc_core_channel_v1_channel_pb.PacketId.toObject(includeInstance, f), + queryHeight: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest; + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.PacketId; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketId.deserializeBinaryFromReader); + msg.setPacketId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQueryHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacketId(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketId.serializeBinaryToWriter + ); + } + f = message.getQueryHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional ibc.core.channel.v1.PacketId packet_id = 1; + * @return {?proto.ibc.core.channel.v1.PacketId} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.prototype.getPacketId = function() { + return /** @type{?proto.ibc.core.channel.v1.PacketId} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.PacketId, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.PacketId|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest} returns this +*/ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.prototype.setPacketId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.prototype.clearPacketId = function() { + return this.setPacketId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.prototype.hasPacketId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 query_height = 2; + * @return {number} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.prototype.getQueryHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketRequest.prototype.setQueryHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.toObject = function(includeInstance, msg) { + var f, obj = { + incentivizedPacket: (f = msg.getIncentivizedPacket()) && ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse; + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees; + reader.readMessage(value,ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.deserializeBinaryFromReader); + msg.setIncentivizedPacket(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncentivizedPacket(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.serializeBinaryToWriter + ); + } +}; + + +/** + * optional IdentifiedPacketFees incentivized_packet = 1; + * @return {?proto.ibc.applications.fee.v1.IdentifiedPacketFees} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.prototype.getIncentivizedPacket = function() { + return /** @type{?proto.ibc.applications.fee.v1.IdentifiedPacketFees} */ ( + jspb.Message.getWrapperField(this, ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees, 1)); +}; + + +/** + * @param {?proto.ibc.applications.fee.v1.IdentifiedPacketFees|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.prototype.setIncentivizedPacket = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.prototype.clearIncentivizedPacket = function() { + return this.setIncentivizedPacket(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketResponse.prototype.hasIncentivizedPacket = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f), + portId: jspb.Message.getFieldWithDefault(msg, 2, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 3, ""), + queryHeight: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest; + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQueryHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getQueryHeight(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} returns this +*/ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string port_id = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string channel_id = 3; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 query_height = 4; + * @return {number} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.getQueryHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.prototype.setQueryHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + incentivizedPacketsList: jspb.Message.toObjectList(msg.getIncentivizedPacketsList(), + ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse; + return proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees; + reader.readMessage(value,ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.deserializeBinaryFromReader); + msg.addIncentivizedPackets(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncentivizedPacketsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedPacketFees incentivized_packets = 1; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.getIncentivizedPacketsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_applications_fee_v1_fee_pb.IdentifiedPacketFees, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.setIncentivizedPacketsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.IdentifiedPacketFees=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.IdentifiedPacketFees} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.addIncentivizedPackets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.fee.v1.IdentifiedPacketFees, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.clearIncentivizedPacketsList = function() { + return this.setIncentivizedPacketsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + packetId: (f = msg.getPacketId()) && ibc_core_channel_v1_channel_pb.PacketId.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest; + return proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.PacketId; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketId.deserializeBinaryFromReader); + msg.setPacketId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacketId(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketId.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ibc.core.channel.v1.PacketId packet_id = 1; + * @return {?proto.ibc.core.channel.v1.PacketId} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.prototype.getPacketId = function() { + return /** @type{?proto.ibc.core.channel.v1.PacketId} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.PacketId, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.PacketId|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest} returns this +*/ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.prototype.setPacketId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.prototype.clearPacketId = function() { + return this.setPacketId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesRequest.prototype.hasPacketId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + recvFeesList: jspb.Message.toObjectList(msg.getRecvFeesList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse; + return proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addRecvFees(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecvFeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin recv_fees = 1; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.prototype.getRecvFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.prototype.setRecvFeesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.prototype.addRecvFees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryTotalRecvFeesResponse.prototype.clearRecvFeesList = function() { + return this.setRecvFeesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + packetId: (f = msg.getPacketId()) && ibc_core_channel_v1_channel_pb.PacketId.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest; + return proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.PacketId; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketId.deserializeBinaryFromReader); + msg.setPacketId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacketId(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketId.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ibc.core.channel.v1.PacketId packet_id = 1; + * @return {?proto.ibc.core.channel.v1.PacketId} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.prototype.getPacketId = function() { + return /** @type{?proto.ibc.core.channel.v1.PacketId} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.PacketId, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.PacketId|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest} returns this +*/ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.prototype.setPacketId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.prototype.clearPacketId = function() { + return this.setPacketId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesRequest.prototype.hasPacketId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + ackFeesList: jspb.Message.toObjectList(msg.getAckFeesList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse; + return proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAckFees(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAckFeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin ack_fees = 1; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.prototype.getAckFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.prototype.setAckFeesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.prototype.addAckFees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryTotalAckFeesResponse.prototype.clearAckFeesList = function() { + return this.setAckFeesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + packetId: (f = msg.getPacketId()) && ibc_core_channel_v1_channel_pb.PacketId.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest; + return proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.PacketId; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketId.deserializeBinaryFromReader); + msg.setPacketId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacketId(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketId.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ibc.core.channel.v1.PacketId packet_id = 1; + * @return {?proto.ibc.core.channel.v1.PacketId} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.prototype.getPacketId = function() { + return /** @type{?proto.ibc.core.channel.v1.PacketId} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.PacketId, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.PacketId|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} returns this +*/ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.prototype.setPacketId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.prototype.clearPacketId = function() { + return this.setPacketId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.prototype.hasPacketId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + timeoutFeesList: jspb.Message.toObjectList(msg.getTimeoutFeesList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse; + return proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addTimeoutFees(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimeoutFeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin timeout_fees = 1; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.prototype.getTimeoutFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.prototype.setTimeoutFeesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.prototype.addTimeoutFees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.prototype.clearTimeoutFeesList = function() { + return this.setTimeoutFeesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryPayeeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryPayeeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + channelId: jspb.Message.getFieldWithDefault(msg, 1, ""), + relayer: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryPayeeRequest} + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryPayeeRequest; + return proto.ibc.applications.fee.v1.QueryPayeeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryPayeeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryPayeeRequest} + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRelayer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryPayeeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryPayeeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRelayer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string channel_id = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryPayeeRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string relayer = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.prototype.getRelayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryPayeeRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryPayeeRequest.prototype.setRelayer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryPayeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryPayeeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryPayeeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryPayeeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + payeeAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryPayeeResponse} + */ +proto.ibc.applications.fee.v1.QueryPayeeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryPayeeResponse; + return proto.ibc.applications.fee.v1.QueryPayeeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryPayeeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryPayeeResponse} + */ +proto.ibc.applications.fee.v1.QueryPayeeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPayeeAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryPayeeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryPayeeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryPayeeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryPayeeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPayeeAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string payee_address = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryPayeeResponse.prototype.getPayeeAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryPayeeResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryPayeeResponse.prototype.setPayeeAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + channelId: jspb.Message.getFieldWithDefault(msg, 1, ""), + relayer: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest; + return proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRelayer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRelayer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string channel_id = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string relayer = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.prototype.getRelayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.prototype.setRelayer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + counterpartyPayee: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse; + return proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCounterpartyPayee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCounterpartyPayee(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string counterparty_payee = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.prototype.getCounterpartyPayee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.prototype.setCounterpartyPayee = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f), + queryHeight: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest; + return proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQueryHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } + f = message.getQueryHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} returns this +*/ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 query_height = 2; + * @return {number} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.prototype.getQueryHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.prototype.setQueryHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feeEnabledChannelsList: jspb.Message.toObjectList(msg.getFeeEnabledChannelsList(), + ibc_applications_fee_v1_genesis_pb.FeeEnabledChannel.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse; + return proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_fee_v1_genesis_pb.FeeEnabledChannel; + reader.readMessage(value,ibc_applications_fee_v1_genesis_pb.FeeEnabledChannel.deserializeBinaryFromReader); + msg.addFeeEnabledChannels(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeeEnabledChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_applications_fee_v1_genesis_pb.FeeEnabledChannel.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FeeEnabledChannel fee_enabled_channels = 1; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.getFeeEnabledChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_applications_fee_v1_genesis_pb.FeeEnabledChannel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.setFeeEnabledChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.fee.v1.FeeEnabledChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.FeeEnabledChannel} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.addFeeEnabledChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.fee.v1.FeeEnabledChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.clearFeeEnabledChannelsList = function() { + return this.setFeeEnabledChannelsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} returns this +*/ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest; + return proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} returns this + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feeEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse; + return proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFeeEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeeEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool fee_enabled = 1; + * @return {boolean} + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.prototype.getFeeEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} returns this + */ +proto.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.prototype.setFeeEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.fee.v1); diff --git a/codegen/ibc/applications/fee/v1/query_pb_service.d.ts b/codegen/ibc/applications/fee/v1/query_pb_service.d.ts new file mode 100644 index 0000000..b157648 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/query_pb_service.d.ts @@ -0,0 +1,234 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/query.proto + +import * as ibc_applications_fee_v1_query_pb from "../../../../ibc/applications/fee/v1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryIncentivizedPackets = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsResponse; +}; + +type QueryIncentivizedPacket = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketResponse; +}; + +type QueryIncentivizedPacketsForChannel = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsForChannelRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsForChannelResponse; +}; + +type QueryTotalRecvFees = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryTotalRecvFeesRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryTotalRecvFeesResponse; +}; + +type QueryTotalAckFees = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryTotalAckFeesRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryTotalAckFeesResponse; +}; + +type QueryTotalTimeoutFees = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryTotalTimeoutFeesRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryTotalTimeoutFeesResponse; +}; + +type QueryPayee = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryPayeeRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryPayeeResponse; +}; + +type QueryCounterpartyPayee = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryCounterpartyPayeeRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryCounterpartyPayeeResponse; +}; + +type QueryFeeEnabledChannels = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelsRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelsResponse; +}; + +type QueryFeeEnabledChannel = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelRequest; + readonly responseType: typeof ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly IncentivizedPackets: QueryIncentivizedPackets; + static readonly IncentivizedPacket: QueryIncentivizedPacket; + static readonly IncentivizedPacketsForChannel: QueryIncentivizedPacketsForChannel; + static readonly TotalRecvFees: QueryTotalRecvFees; + static readonly TotalAckFees: QueryTotalAckFees; + static readonly TotalTimeoutFees: QueryTotalTimeoutFees; + static readonly Payee: QueryPayee; + static readonly CounterpartyPayee: QueryCounterpartyPayee; + static readonly FeeEnabledChannels: QueryFeeEnabledChannels; + static readonly FeeEnabledChannel: QueryFeeEnabledChannel; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + incentivizedPackets( + requestMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsResponse|null) => void + ): UnaryResponse; + incentivizedPackets( + requestMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsResponse|null) => void + ): UnaryResponse; + incentivizedPacket( + requestMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketResponse|null) => void + ): UnaryResponse; + incentivizedPacket( + requestMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketResponse|null) => void + ): UnaryResponse; + incentivizedPacketsForChannel( + requestMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsForChannelRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsForChannelResponse|null) => void + ): UnaryResponse; + incentivizedPacketsForChannel( + requestMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsForChannelRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsForChannelResponse|null) => void + ): UnaryResponse; + totalRecvFees( + requestMessage: ibc_applications_fee_v1_query_pb.QueryTotalRecvFeesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryTotalRecvFeesResponse|null) => void + ): UnaryResponse; + totalRecvFees( + requestMessage: ibc_applications_fee_v1_query_pb.QueryTotalRecvFeesRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryTotalRecvFeesResponse|null) => void + ): UnaryResponse; + totalAckFees( + requestMessage: ibc_applications_fee_v1_query_pb.QueryTotalAckFeesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryTotalAckFeesResponse|null) => void + ): UnaryResponse; + totalAckFees( + requestMessage: ibc_applications_fee_v1_query_pb.QueryTotalAckFeesRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryTotalAckFeesResponse|null) => void + ): UnaryResponse; + totalTimeoutFees( + requestMessage: ibc_applications_fee_v1_query_pb.QueryTotalTimeoutFeesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryTotalTimeoutFeesResponse|null) => void + ): UnaryResponse; + totalTimeoutFees( + requestMessage: ibc_applications_fee_v1_query_pb.QueryTotalTimeoutFeesRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryTotalTimeoutFeesResponse|null) => void + ): UnaryResponse; + payee( + requestMessage: ibc_applications_fee_v1_query_pb.QueryPayeeRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryPayeeResponse|null) => void + ): UnaryResponse; + payee( + requestMessage: ibc_applications_fee_v1_query_pb.QueryPayeeRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryPayeeResponse|null) => void + ): UnaryResponse; + counterpartyPayee( + requestMessage: ibc_applications_fee_v1_query_pb.QueryCounterpartyPayeeRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryCounterpartyPayeeResponse|null) => void + ): UnaryResponse; + counterpartyPayee( + requestMessage: ibc_applications_fee_v1_query_pb.QueryCounterpartyPayeeRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryCounterpartyPayeeResponse|null) => void + ): UnaryResponse; + feeEnabledChannels( + requestMessage: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelsResponse|null) => void + ): UnaryResponse; + feeEnabledChannels( + requestMessage: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelsRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelsResponse|null) => void + ): UnaryResponse; + feeEnabledChannel( + requestMessage: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelResponse|null) => void + ): UnaryResponse; + feeEnabledChannel( + requestMessage: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelResponse|null) => void + ): UnaryResponse; +} + diff --git a/proto/ibc/core/channel/v1/tx_pb_service.js b/codegen/ibc/applications/fee/v1/query_pb_service.js similarity index 63% rename from proto/ibc/core/channel/v1/tx_pb_service.js rename to codegen/ibc/applications/fee/v1/query_pb_service.js index 22a6005..a124439 100644 --- a/proto/ibc/core/channel/v1/tx_pb_service.js +++ b/codegen/ibc/applications/fee/v1/query_pb_service.js @@ -1,117 +1,117 @@ -// package: ibc.core.channel.v1 -// file: ibc/core/channel/v1/tx.proto +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/query.proto -var ibc_core_channel_v1_tx_pb = require("../../../../ibc/core/channel/v1/tx_pb"); +var ibc_applications_fee_v1_query_pb = require("../../../../ibc/applications/fee/v1/query_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; -var Msg = (function () { - function Msg() {} - Msg.serviceName = "ibc.core.channel.v1.Msg"; - return Msg; +var Query = (function () { + function Query() {} + Query.serviceName = "ibc.applications.fee.v1.Query"; + return Query; }()); -Msg.ChannelOpenInit = { - methodName: "ChannelOpenInit", - service: Msg, +Query.IncentivizedPackets = { + methodName: "IncentivizedPackets", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgChannelOpenInit, - responseType: ibc_core_channel_v1_tx_pb.MsgChannelOpenInitResponse + requestType: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsResponse }; -Msg.ChannelOpenTry = { - methodName: "ChannelOpenTry", - service: Msg, +Query.IncentivizedPacket = { + methodName: "IncentivizedPacket", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgChannelOpenTry, - responseType: ibc_core_channel_v1_tx_pb.MsgChannelOpenTryResponse + requestType: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketResponse }; -Msg.ChannelOpenAck = { - methodName: "ChannelOpenAck", - service: Msg, +Query.IncentivizedPacketsForChannel = { + methodName: "IncentivizedPacketsForChannel", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgChannelOpenAck, - responseType: ibc_core_channel_v1_tx_pb.MsgChannelOpenAckResponse + requestType: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsForChannelRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryIncentivizedPacketsForChannelResponse }; -Msg.ChannelOpenConfirm = { - methodName: "ChannelOpenConfirm", - service: Msg, +Query.TotalRecvFees = { + methodName: "TotalRecvFees", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgChannelOpenConfirm, - responseType: ibc_core_channel_v1_tx_pb.MsgChannelOpenConfirmResponse + requestType: ibc_applications_fee_v1_query_pb.QueryTotalRecvFeesRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryTotalRecvFeesResponse }; -Msg.ChannelCloseInit = { - methodName: "ChannelCloseInit", - service: Msg, +Query.TotalAckFees = { + methodName: "TotalAckFees", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgChannelCloseInit, - responseType: ibc_core_channel_v1_tx_pb.MsgChannelCloseInitResponse + requestType: ibc_applications_fee_v1_query_pb.QueryTotalAckFeesRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryTotalAckFeesResponse }; -Msg.ChannelCloseConfirm = { - methodName: "ChannelCloseConfirm", - service: Msg, +Query.TotalTimeoutFees = { + methodName: "TotalTimeoutFees", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgChannelCloseConfirm, - responseType: ibc_core_channel_v1_tx_pb.MsgChannelCloseConfirmResponse + requestType: ibc_applications_fee_v1_query_pb.QueryTotalTimeoutFeesRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryTotalTimeoutFeesResponse }; -Msg.RecvPacket = { - methodName: "RecvPacket", - service: Msg, +Query.Payee = { + methodName: "Payee", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgRecvPacket, - responseType: ibc_core_channel_v1_tx_pb.MsgRecvPacketResponse + requestType: ibc_applications_fee_v1_query_pb.QueryPayeeRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryPayeeResponse }; -Msg.Timeout = { - methodName: "Timeout", - service: Msg, +Query.CounterpartyPayee = { + methodName: "CounterpartyPayee", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgTimeout, - responseType: ibc_core_channel_v1_tx_pb.MsgTimeoutResponse + requestType: ibc_applications_fee_v1_query_pb.QueryCounterpartyPayeeRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryCounterpartyPayeeResponse }; -Msg.TimeoutOnClose = { - methodName: "TimeoutOnClose", - service: Msg, +Query.FeeEnabledChannels = { + methodName: "FeeEnabledChannels", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgTimeoutOnClose, - responseType: ibc_core_channel_v1_tx_pb.MsgTimeoutOnCloseResponse + requestType: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelsRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelsResponse }; -Msg.Acknowledgement = { - methodName: "Acknowledgement", - service: Msg, +Query.FeeEnabledChannel = { + methodName: "FeeEnabledChannel", + service: Query, requestStream: false, responseStream: false, - requestType: ibc_core_channel_v1_tx_pb.MsgAcknowledgement, - responseType: ibc_core_channel_v1_tx_pb.MsgAcknowledgementResponse + requestType: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelRequest, + responseType: ibc_applications_fee_v1_query_pb.QueryFeeEnabledChannelResponse }; -exports.Msg = Msg; +exports.Query = Query; -function MsgClient(serviceHost, options) { +function QueryClient(serviceHost, options) { this.serviceHost = serviceHost; this.options = options || {}; } -MsgClient.prototype.channelOpenInit = function channelOpenInit(requestMessage, metadata, callback) { +QueryClient.prototype.incentivizedPackets = function incentivizedPackets(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.ChannelOpenInit, { + var client = grpc.unary(Query.IncentivizedPackets, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -138,11 +138,11 @@ MsgClient.prototype.channelOpenInit = function channelOpenInit(requestMessage, m }; }; -MsgClient.prototype.channelOpenTry = function channelOpenTry(requestMessage, metadata, callback) { +QueryClient.prototype.incentivizedPacket = function incentivizedPacket(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.ChannelOpenTry, { + var client = grpc.unary(Query.IncentivizedPacket, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -169,11 +169,11 @@ MsgClient.prototype.channelOpenTry = function channelOpenTry(requestMessage, met }; }; -MsgClient.prototype.channelOpenAck = function channelOpenAck(requestMessage, metadata, callback) { +QueryClient.prototype.incentivizedPacketsForChannel = function incentivizedPacketsForChannel(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.ChannelOpenAck, { + var client = grpc.unary(Query.IncentivizedPacketsForChannel, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -200,11 +200,11 @@ MsgClient.prototype.channelOpenAck = function channelOpenAck(requestMessage, met }; }; -MsgClient.prototype.channelOpenConfirm = function channelOpenConfirm(requestMessage, metadata, callback) { +QueryClient.prototype.totalRecvFees = function totalRecvFees(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.ChannelOpenConfirm, { + var client = grpc.unary(Query.TotalRecvFees, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -231,11 +231,11 @@ MsgClient.prototype.channelOpenConfirm = function channelOpenConfirm(requestMess }; }; -MsgClient.prototype.channelCloseInit = function channelCloseInit(requestMessage, metadata, callback) { +QueryClient.prototype.totalAckFees = function totalAckFees(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.ChannelCloseInit, { + var client = grpc.unary(Query.TotalAckFees, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -262,11 +262,11 @@ MsgClient.prototype.channelCloseInit = function channelCloseInit(requestMessage, }; }; -MsgClient.prototype.channelCloseConfirm = function channelCloseConfirm(requestMessage, metadata, callback) { +QueryClient.prototype.totalTimeoutFees = function totalTimeoutFees(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.ChannelCloseConfirm, { + var client = grpc.unary(Query.TotalTimeoutFees, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -293,11 +293,11 @@ MsgClient.prototype.channelCloseConfirm = function channelCloseConfirm(requestMe }; }; -MsgClient.prototype.recvPacket = function recvPacket(requestMessage, metadata, callback) { +QueryClient.prototype.payee = function payee(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.RecvPacket, { + var client = grpc.unary(Query.Payee, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -324,11 +324,11 @@ MsgClient.prototype.recvPacket = function recvPacket(requestMessage, metadata, c }; }; -MsgClient.prototype.timeout = function timeout(requestMessage, metadata, callback) { +QueryClient.prototype.counterpartyPayee = function counterpartyPayee(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.Timeout, { + var client = grpc.unary(Query.CounterpartyPayee, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -355,11 +355,11 @@ MsgClient.prototype.timeout = function timeout(requestMessage, metadata, callbac }; }; -MsgClient.prototype.timeoutOnClose = function timeoutOnClose(requestMessage, metadata, callback) { +QueryClient.prototype.feeEnabledChannels = function feeEnabledChannels(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.TimeoutOnClose, { + var client = grpc.unary(Query.FeeEnabledChannels, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -386,11 +386,11 @@ MsgClient.prototype.timeoutOnClose = function timeoutOnClose(requestMessage, met }; }; -MsgClient.prototype.acknowledgement = function acknowledgement(requestMessage, metadata, callback) { +QueryClient.prototype.feeEnabledChannel = function feeEnabledChannel(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.Acknowledgement, { + var client = grpc.unary(Query.FeeEnabledChannel, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -417,5 +417,5 @@ MsgClient.prototype.acknowledgement = function acknowledgement(requestMessage, m }; }; -exports.MsgClient = MsgClient; +exports.QueryClient = QueryClient; diff --git a/codegen/ibc/applications/fee/v1/tx.ts b/codegen/ibc/applications/fee/v1/tx.ts new file mode 100644 index 0000000..ff9737a --- /dev/null +++ b/codegen/ibc/applications/fee/v1/tx.ts @@ -0,0 +1,790 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/fee/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../amino/amino"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as dependency_3 from "./fee"; +import * as dependency_4 from "./../../../core/channel/v1/channel"; +import * as dependency_5 from "./../../../../cosmos/msg/v1/msg"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.applications.fee.v1 { + export class MsgRegisterPayee extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + relayer?: string; + payee?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("relayer" in data && data.relayer != undefined) { + this.relayer = data.relayer; + } + if ("payee" in data && data.payee != undefined) { + this.payee = data.payee; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get relayer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set relayer(value: string) { + pb_1.Message.setField(this, 3, value); + } + get payee() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set payee(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + relayer?: string; + payee?: string; + }): MsgRegisterPayee { + const message = new MsgRegisterPayee({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.relayer != null) { + message.relayer = data.relayer; + } + if (data.payee != null) { + message.payee = data.payee; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + relayer?: string; + payee?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.relayer != null) { + data.relayer = this.relayer; + } + if (this.payee != null) { + data.payee = this.payee; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.relayer.length) + writer.writeString(3, this.relayer); + if (this.payee.length) + writer.writeString(4, this.payee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRegisterPayee { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRegisterPayee(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.relayer = reader.readString(); + break; + case 4: + message.payee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRegisterPayee { + return MsgRegisterPayee.deserialize(bytes); + } + } + export class MsgRegisterPayeeResponse 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: {}): MsgRegisterPayeeResponse { + const message = new MsgRegisterPayeeResponse({}); + 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): MsgRegisterPayeeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRegisterPayeeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRegisterPayeeResponse { + return MsgRegisterPayeeResponse.deserialize(bytes); + } + } + export class MsgRegisterCounterpartyPayee extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + relayer?: string; + counterparty_payee?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("relayer" in data && data.relayer != undefined) { + this.relayer = data.relayer; + } + if ("counterparty_payee" in data && data.counterparty_payee != undefined) { + this.counterparty_payee = data.counterparty_payee; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get relayer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set relayer(value: string) { + pb_1.Message.setField(this, 3, value); + } + get counterparty_payee() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set counterparty_payee(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + relayer?: string; + counterparty_payee?: string; + }): MsgRegisterCounterpartyPayee { + const message = new MsgRegisterCounterpartyPayee({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.relayer != null) { + message.relayer = data.relayer; + } + if (data.counterparty_payee != null) { + message.counterparty_payee = data.counterparty_payee; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + relayer?: string; + counterparty_payee?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.relayer != null) { + data.relayer = this.relayer; + } + if (this.counterparty_payee != null) { + data.counterparty_payee = this.counterparty_payee; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.relayer.length) + writer.writeString(3, this.relayer); + if (this.counterparty_payee.length) + writer.writeString(4, this.counterparty_payee); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRegisterCounterpartyPayee { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRegisterCounterpartyPayee(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.relayer = reader.readString(); + break; + case 4: + message.counterparty_payee = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRegisterCounterpartyPayee { + return MsgRegisterCounterpartyPayee.deserialize(bytes); + } + } + export class MsgRegisterCounterpartyPayeeResponse 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: {}): MsgRegisterCounterpartyPayeeResponse { + const message = new MsgRegisterCounterpartyPayeeResponse({}); + 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): MsgRegisterCounterpartyPayeeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRegisterCounterpartyPayeeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRegisterCounterpartyPayeeResponse { + return MsgRegisterCounterpartyPayeeResponse.deserialize(bytes); + } + } + export class MsgPayPacketFee extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fee?: dependency_3.ibc.applications.fee.v1.Fee; + source_port_id?: string; + source_channel_id?: string; + signer?: string; + relayers?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + if ("source_port_id" in data && data.source_port_id != undefined) { + this.source_port_id = data.source_port_id; + } + if ("source_channel_id" in data && data.source_channel_id != undefined) { + this.source_channel_id = data.source_channel_id; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("relayers" in data && data.relayers != undefined) { + this.relayers = data.relayers; + } + } + } + get fee() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.applications.fee.v1.Fee, 1) as dependency_3.ibc.applications.fee.v1.Fee; + } + set fee(value: dependency_3.ibc.applications.fee.v1.Fee) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_fee() { + return pb_1.Message.getField(this, 1) != null; + } + get source_port_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set source_port_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get source_channel_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set source_channel_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 4, value); + } + get relayers() { + return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; + } + set relayers(value: string[]) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + fee?: ReturnType; + source_port_id?: string; + source_channel_id?: string; + signer?: string; + relayers?: string[]; + }): MsgPayPacketFee { + const message = new MsgPayPacketFee({}); + if (data.fee != null) { + message.fee = dependency_3.ibc.applications.fee.v1.Fee.fromObject(data.fee); + } + if (data.source_port_id != null) { + message.source_port_id = data.source_port_id; + } + if (data.source_channel_id != null) { + message.source_channel_id = data.source_channel_id; + } + if (data.signer != null) { + message.signer = data.signer; + } + if (data.relayers != null) { + message.relayers = data.relayers; + } + return message; + } + toObject() { + const data: { + fee?: ReturnType; + source_port_id?: string; + source_channel_id?: string; + signer?: string; + relayers?: string[]; + } = {}; + if (this.fee != null) { + data.fee = this.fee.toObject(); + } + if (this.source_port_id != null) { + data.source_port_id = this.source_port_id; + } + if (this.source_channel_id != null) { + data.source_channel_id = this.source_channel_id; + } + if (this.signer != null) { + data.signer = this.signer; + } + if (this.relayers != null) { + data.relayers = this.relayers; + } + 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_fee) + writer.writeMessage(1, this.fee, () => this.fee.serialize(writer)); + if (this.source_port_id.length) + writer.writeString(2, this.source_port_id); + if (this.source_channel_id.length) + writer.writeString(3, this.source_channel_id); + if (this.signer.length) + writer.writeString(4, this.signer); + if (this.relayers.length) + writer.writeRepeatedString(5, this.relayers); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgPayPacketFee { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgPayPacketFee(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.fee, () => message.fee = dependency_3.ibc.applications.fee.v1.Fee.deserialize(reader)); + break; + case 2: + message.source_port_id = reader.readString(); + break; + case 3: + message.source_channel_id = reader.readString(); + break; + case 4: + message.signer = reader.readString(); + break; + case 5: + pb_1.Message.addToRepeatedField(message, 5, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgPayPacketFee { + return MsgPayPacketFee.deserialize(bytes); + } + } + export class MsgPayPacketFeeResponse 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: {}): MsgPayPacketFeeResponse { + const message = new MsgPayPacketFeeResponse({}); + 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): MsgPayPacketFeeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgPayPacketFeeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgPayPacketFeeResponse { + return MsgPayPacketFeeResponse.deserialize(bytes); + } + } + export class MsgPayPacketFeeAsync extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet_id?: dependency_4.ibc.core.channel.v1.PacketId; + packet_fee?: dependency_3.ibc.applications.fee.v1.PacketFee; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("packet_id" in data && data.packet_id != undefined) { + this.packet_id = data.packet_id; + } + if ("packet_fee" in data && data.packet_fee != undefined) { + this.packet_fee = data.packet_fee; + } + } + } + get packet_id() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.PacketId, 1) as dependency_4.ibc.core.channel.v1.PacketId; + } + set packet_id(value: dependency_4.ibc.core.channel.v1.PacketId) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet_id() { + return pb_1.Message.getField(this, 1) != null; + } + get packet_fee() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.applications.fee.v1.PacketFee, 2) as dependency_3.ibc.applications.fee.v1.PacketFee; + } + set packet_fee(value: dependency_3.ibc.applications.fee.v1.PacketFee) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_packet_fee() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + packet_id?: ReturnType; + packet_fee?: ReturnType; + }): MsgPayPacketFeeAsync { + const message = new MsgPayPacketFeeAsync({}); + if (data.packet_id != null) { + message.packet_id = dependency_4.ibc.core.channel.v1.PacketId.fromObject(data.packet_id); + } + if (data.packet_fee != null) { + message.packet_fee = dependency_3.ibc.applications.fee.v1.PacketFee.fromObject(data.packet_fee); + } + return message; + } + toObject() { + const data: { + packet_id?: ReturnType; + packet_fee?: ReturnType; + } = {}; + if (this.packet_id != null) { + data.packet_id = this.packet_id.toObject(); + } + if (this.packet_fee != null) { + data.packet_fee = this.packet_fee.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_packet_id) + writer.writeMessage(1, this.packet_id, () => this.packet_id.serialize(writer)); + if (this.has_packet_fee) + writer.writeMessage(2, this.packet_fee, () => this.packet_fee.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgPayPacketFeeAsync { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgPayPacketFeeAsync(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet_id, () => message.packet_id = dependency_4.ibc.core.channel.v1.PacketId.deserialize(reader)); + break; + case 2: + reader.readMessage(message.packet_fee, () => message.packet_fee = dependency_3.ibc.applications.fee.v1.PacketFee.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgPayPacketFeeAsync { + return MsgPayPacketFeeAsync.deserialize(bytes); + } + } + export class MsgPayPacketFeeAsyncResponse 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: {}): MsgPayPacketFeeAsyncResponse { + const message = new MsgPayPacketFeeAsyncResponse({}); + 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): MsgPayPacketFeeAsyncResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgPayPacketFeeAsyncResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgPayPacketFeeAsyncResponse { + return MsgPayPacketFeeAsyncResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + RegisterPayee: { + path: "/ibc.applications.fee.v1.Msg/RegisterPayee", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRegisterPayee) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRegisterPayee.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRegisterPayeeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRegisterPayeeResponse.deserialize(new Uint8Array(bytes)) + }, + RegisterCounterpartyPayee: { + path: "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRegisterCounterpartyPayee) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRegisterCounterpartyPayee.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRegisterCounterpartyPayeeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRegisterCounterpartyPayeeResponse.deserialize(new Uint8Array(bytes)) + }, + PayPacketFee: { + path: "/ibc.applications.fee.v1.Msg/PayPacketFee", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgPayPacketFee) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgPayPacketFee.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgPayPacketFeeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgPayPacketFeeResponse.deserialize(new Uint8Array(bytes)) + }, + PayPacketFeeAsync: { + path: "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgPayPacketFeeAsync) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgPayPacketFeeAsync.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgPayPacketFeeAsyncResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgPayPacketFeeAsyncResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract RegisterPayee(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RegisterCounterpartyPayee(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PayPacketFee(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PayPacketFeeAsync(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + RegisterPayee: GrpcUnaryServiceInterface = (message: MsgRegisterPayee, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RegisterPayee(message, metadata, options, callback); + }; + RegisterCounterpartyPayee: GrpcUnaryServiceInterface = (message: MsgRegisterCounterpartyPayee, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RegisterCounterpartyPayee(message, metadata, options, callback); + }; + PayPacketFee: GrpcUnaryServiceInterface = (message: MsgPayPacketFee, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PayPacketFee(message, metadata, options, callback); + }; + PayPacketFeeAsync: GrpcUnaryServiceInterface = (message: MsgPayPacketFeeAsync, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PayPacketFeeAsync(message, metadata, options, callback); + }; + } +} diff --git a/codegen/ibc/applications/fee/v1/tx_pb.d.ts b/codegen/ibc/applications/fee/v1/tx_pb.d.ts new file mode 100644 index 0000000..311eeab --- /dev/null +++ b/codegen/ibc/applications/fee/v1/tx_pb.d.ts @@ -0,0 +1,206 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/tx.proto + +import * as jspb from "google-protobuf"; +import * as amino_amino_pb from "../../../../amino/amino_pb"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as ibc_applications_fee_v1_fee_pb from "../../../../ibc/applications/fee/v1/fee_pb"; +import * as ibc_core_channel_v1_channel_pb from "../../../../ibc/core/channel/v1/channel_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../../cosmos/msg/v1/msg_pb"; + +export class MsgRegisterPayee extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getRelayer(): string; + setRelayer(value: string): void; + + getPayee(): string; + setPayee(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRegisterPayee.AsObject; + static toObject(includeInstance: boolean, msg: MsgRegisterPayee): MsgRegisterPayee.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRegisterPayee, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRegisterPayee; + static deserializeBinaryFromReader(message: MsgRegisterPayee, reader: jspb.BinaryReader): MsgRegisterPayee; +} + +export namespace MsgRegisterPayee { + export type AsObject = { + portId: string, + channelId: string, + relayer: string, + payee: string, + } +} + +export class MsgRegisterPayeeResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRegisterPayeeResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgRegisterPayeeResponse): MsgRegisterPayeeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRegisterPayeeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRegisterPayeeResponse; + static deserializeBinaryFromReader(message: MsgRegisterPayeeResponse, reader: jspb.BinaryReader): MsgRegisterPayeeResponse; +} + +export namespace MsgRegisterPayeeResponse { + export type AsObject = { + } +} + +export class MsgRegisterCounterpartyPayee extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getRelayer(): string; + setRelayer(value: string): void; + + getCounterpartyPayee(): string; + setCounterpartyPayee(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRegisterCounterpartyPayee.AsObject; + static toObject(includeInstance: boolean, msg: MsgRegisterCounterpartyPayee): MsgRegisterCounterpartyPayee.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRegisterCounterpartyPayee, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRegisterCounterpartyPayee; + static deserializeBinaryFromReader(message: MsgRegisterCounterpartyPayee, reader: jspb.BinaryReader): MsgRegisterCounterpartyPayee; +} + +export namespace MsgRegisterCounterpartyPayee { + export type AsObject = { + portId: string, + channelId: string, + relayer: string, + counterpartyPayee: string, + } +} + +export class MsgRegisterCounterpartyPayeeResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRegisterCounterpartyPayeeResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgRegisterCounterpartyPayeeResponse): MsgRegisterCounterpartyPayeeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRegisterCounterpartyPayeeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRegisterCounterpartyPayeeResponse; + static deserializeBinaryFromReader(message: MsgRegisterCounterpartyPayeeResponse, reader: jspb.BinaryReader): MsgRegisterCounterpartyPayeeResponse; +} + +export namespace MsgRegisterCounterpartyPayeeResponse { + export type AsObject = { + } +} + +export class MsgPayPacketFee extends jspb.Message { + hasFee(): boolean; + clearFee(): void; + getFee(): ibc_applications_fee_v1_fee_pb.Fee | undefined; + setFee(value?: ibc_applications_fee_v1_fee_pb.Fee): void; + + getSourcePortId(): string; + setSourcePortId(value: string): void; + + getSourceChannelId(): string; + setSourceChannelId(value: string): void; + + getSigner(): string; + setSigner(value: string): void; + + clearRelayersList(): void; + getRelayersList(): Array; + setRelayersList(value: Array): void; + addRelayers(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgPayPacketFee.AsObject; + static toObject(includeInstance: boolean, msg: MsgPayPacketFee): MsgPayPacketFee.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgPayPacketFee, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgPayPacketFee; + static deserializeBinaryFromReader(message: MsgPayPacketFee, reader: jspb.BinaryReader): MsgPayPacketFee; +} + +export namespace MsgPayPacketFee { + export type AsObject = { + fee?: ibc_applications_fee_v1_fee_pb.Fee.AsObject, + sourcePortId: string, + sourceChannelId: string, + signer: string, + relayersList: Array, + } +} + +export class MsgPayPacketFeeResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgPayPacketFeeResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgPayPacketFeeResponse): MsgPayPacketFeeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgPayPacketFeeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgPayPacketFeeResponse; + static deserializeBinaryFromReader(message: MsgPayPacketFeeResponse, reader: jspb.BinaryReader): MsgPayPacketFeeResponse; +} + +export namespace MsgPayPacketFeeResponse { + export type AsObject = { + } +} + +export class MsgPayPacketFeeAsync extends jspb.Message { + hasPacketId(): boolean; + clearPacketId(): void; + getPacketId(): ibc_core_channel_v1_channel_pb.PacketId | undefined; + setPacketId(value?: ibc_core_channel_v1_channel_pb.PacketId): void; + + hasPacketFee(): boolean; + clearPacketFee(): void; + getPacketFee(): ibc_applications_fee_v1_fee_pb.PacketFee | undefined; + setPacketFee(value?: ibc_applications_fee_v1_fee_pb.PacketFee): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgPayPacketFeeAsync.AsObject; + static toObject(includeInstance: boolean, msg: MsgPayPacketFeeAsync): MsgPayPacketFeeAsync.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgPayPacketFeeAsync, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgPayPacketFeeAsync; + static deserializeBinaryFromReader(message: MsgPayPacketFeeAsync, reader: jspb.BinaryReader): MsgPayPacketFeeAsync; +} + +export namespace MsgPayPacketFeeAsync { + export type AsObject = { + packetId?: ibc_core_channel_v1_channel_pb.PacketId.AsObject, + packetFee?: ibc_applications_fee_v1_fee_pb.PacketFee.AsObject, + } +} + +export class MsgPayPacketFeeAsyncResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgPayPacketFeeAsyncResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgPayPacketFeeAsyncResponse): MsgPayPacketFeeAsyncResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgPayPacketFeeAsyncResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgPayPacketFeeAsyncResponse; + static deserializeBinaryFromReader(message: MsgPayPacketFeeAsyncResponse, reader: jspb.BinaryReader): MsgPayPacketFeeAsyncResponse; +} + +export namespace MsgPayPacketFeeAsyncResponse { + export type AsObject = { + } +} + diff --git a/codegen/ibc/applications/fee/v1/tx_pb.js b/codegen/ibc/applications/fee/v1/tx_pb.js new file mode 100644 index 0000000..2bcbafc --- /dev/null +++ b/codegen/ibc/applications/fee/v1/tx_pb.js @@ -0,0 +1,1547 @@ +// source: ibc/applications/fee/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var amino_amino_pb = require('../../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var ibc_applications_fee_v1_fee_pb = require('../../../../ibc/applications/fee/v1/fee_pb.js'); +goog.object.extend(proto, ibc_applications_fee_v1_fee_pb); +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +var cosmos_msg_v1_msg_pb = require('../../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +goog.exportSymbol('proto.ibc.applications.fee.v1.MsgPayPacketFee', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.MsgRegisterPayee', null, global); +goog.exportSymbol('proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.MsgRegisterPayee, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.MsgRegisterPayee.displayName = 'proto.ibc.applications.fee.v1.MsgRegisterPayee'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.displayName = 'proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.displayName = 'proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.displayName = 'proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.fee.v1.MsgPayPacketFee.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.MsgPayPacketFee, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.MsgPayPacketFee.displayName = 'proto.ibc.applications.fee.v1.MsgPayPacketFee'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.displayName = 'proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.displayName = 'proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.displayName = 'proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.MsgRegisterPayee.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.MsgRegisterPayee} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + relayer: jspb.Message.getFieldWithDefault(msg, 3, ""), + payee: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.MsgRegisterPayee} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.MsgRegisterPayee; + return proto.ibc.applications.fee.v1.MsgRegisterPayee.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.MsgRegisterPayee} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.MsgRegisterPayee} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRelayer(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPayee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.MsgRegisterPayee.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.MsgRegisterPayee} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRelayer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPayee(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgRegisterPayee} returns this + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgRegisterPayee} returns this + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string relayer = 3; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.getRelayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgRegisterPayee} returns this + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.setRelayer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string payee = 4; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.getPayee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgRegisterPayee} returns this + */ +proto.ibc.applications.fee.v1.MsgRegisterPayee.prototype.setPayee = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse; + return proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgRegisterPayeeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + relayer: jspb.Message.getFieldWithDefault(msg, 3, ""), + counterpartyPayee: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee; + return proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRelayer(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCounterpartyPayee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRelayer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCounterpartyPayee(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} returns this + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} returns this + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string relayer = 3; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.getRelayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} returns this + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.setRelayer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string counterparty_payee = 4; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.getCounterpartyPayee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} returns this + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.prototype.setCounterpartyPayee = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse; + return proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.repeatedFields_ = [5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.MsgPayPacketFee.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFee} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.toObject = function(includeInstance, msg) { + var f, obj = { + fee: (f = msg.getFee()) && ibc_applications_fee_v1_fee_pb.Fee.toObject(includeInstance, f), + sourcePortId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sourceChannelId: jspb.Message.getFieldWithDefault(msg, 3, ""), + signer: jspb.Message.getFieldWithDefault(msg, 4, ""), + relayersList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.MsgPayPacketFee; + return proto.ibc.applications.fee.v1.MsgPayPacketFee.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFee} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_fee_v1_fee_pb.Fee; + reader.readMessage(value,ibc_applications_fee_v1_fee_pb.Fee.deserializeBinaryFromReader); + msg.setFee(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSourcePortId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceChannelId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addRelayers(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.MsgPayPacketFee.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFee} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFee(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_applications_fee_v1_fee_pb.Fee.serializeBinaryToWriter + ); + } + f = message.getSourcePortId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSourceChannelId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRelayersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } +}; + + +/** + * optional Fee fee = 1; + * @return {?proto.ibc.applications.fee.v1.Fee} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.getFee = function() { + return /** @type{?proto.ibc.applications.fee.v1.Fee} */ ( + jspb.Message.getWrapperField(this, ibc_applications_fee_v1_fee_pb.Fee, 1)); +}; + + +/** + * @param {?proto.ibc.applications.fee.v1.Fee|undefined} value + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} returns this +*/ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.setFee = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} returns this + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.clearFee = function() { + return this.setFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.hasFee = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string source_port_id = 2; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.getSourcePortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} returns this + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.setSourcePortId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string source_channel_id = 3; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.getSourceChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} returns this + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.setSourceChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string signer = 4; + * @return {string} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} returns this + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated string relayers = 5; + * @return {!Array} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.getRelayersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} returns this + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.setRelayersList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} returns this + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.addRelayers = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFee} returns this + */ +proto.ibc.applications.fee.v1.MsgPayPacketFee.prototype.clearRelayersList = function() { + return this.setRelayersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse; + return proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.toObject = function(includeInstance, msg) { + var f, obj = { + packetId: (f = msg.getPacketId()) && ibc_core_channel_v1_channel_pb.PacketId.toObject(includeInstance, f), + packetFee: (f = msg.getPacketFee()) && ibc_applications_fee_v1_fee_pb.PacketFee.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync; + return proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.PacketId; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketId.deserializeBinaryFromReader); + msg.setPacketId(value); + break; + case 2: + var value = new ibc_applications_fee_v1_fee_pb.PacketFee; + reader.readMessage(value,ibc_applications_fee_v1_fee_pb.PacketFee.deserializeBinaryFromReader); + msg.setPacketFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacketId(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketId.serializeBinaryToWriter + ); + } + f = message.getPacketFee(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_applications_fee_v1_fee_pb.PacketFee.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ibc.core.channel.v1.PacketId packet_id = 1; + * @return {?proto.ibc.core.channel.v1.PacketId} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.getPacketId = function() { + return /** @type{?proto.ibc.core.channel.v1.PacketId} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.PacketId, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.PacketId|undefined} value + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync} returns this +*/ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.setPacketId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync} returns this + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.clearPacketId = function() { + return this.setPacketId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.hasPacketId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional PacketFee packet_fee = 2; + * @return {?proto.ibc.applications.fee.v1.PacketFee} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.getPacketFee = function() { + return /** @type{?proto.ibc.applications.fee.v1.PacketFee} */ ( + jspb.Message.getWrapperField(this, ibc_applications_fee_v1_fee_pb.PacketFee, 2)); +}; + + +/** + * @param {?proto.ibc.applications.fee.v1.PacketFee|undefined} value + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync} returns this +*/ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.setPacketFee = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync} returns this + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.clearPacketFee = function() { + return this.setPacketFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsync.prototype.hasPacketFee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse; + return proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.ibc.applications.fee.v1); diff --git a/codegen/ibc/applications/fee/v1/tx_pb_service.d.ts b/codegen/ibc/applications/fee/v1/tx_pb_service.d.ts new file mode 100644 index 0000000..0986ae3 --- /dev/null +++ b/codegen/ibc/applications/fee/v1/tx_pb_service.d.ts @@ -0,0 +1,120 @@ +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/tx.proto + +import * as ibc_applications_fee_v1_tx_pb from "../../../../ibc/applications/fee/v1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgRegisterPayee = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_tx_pb.MsgRegisterPayee; + readonly responseType: typeof ibc_applications_fee_v1_tx_pb.MsgRegisterPayeeResponse; +}; + +type MsgRegisterCounterpartyPayee = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_tx_pb.MsgRegisterCounterpartyPayee; + readonly responseType: typeof ibc_applications_fee_v1_tx_pb.MsgRegisterCounterpartyPayeeResponse; +}; + +type MsgPayPacketFee = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_tx_pb.MsgPayPacketFee; + readonly responseType: typeof ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeResponse; +}; + +type MsgPayPacketFeeAsync = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeAsync; + readonly responseType: typeof ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeAsyncResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly RegisterPayee: MsgRegisterPayee; + static readonly RegisterCounterpartyPayee: MsgRegisterCounterpartyPayee; + static readonly PayPacketFee: MsgPayPacketFee; + static readonly PayPacketFeeAsync: MsgPayPacketFeeAsync; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + registerPayee( + requestMessage: ibc_applications_fee_v1_tx_pb.MsgRegisterPayee, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_tx_pb.MsgRegisterPayeeResponse|null) => void + ): UnaryResponse; + registerPayee( + requestMessage: ibc_applications_fee_v1_tx_pb.MsgRegisterPayee, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_tx_pb.MsgRegisterPayeeResponse|null) => void + ): UnaryResponse; + registerCounterpartyPayee( + requestMessage: ibc_applications_fee_v1_tx_pb.MsgRegisterCounterpartyPayee, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_tx_pb.MsgRegisterCounterpartyPayeeResponse|null) => void + ): UnaryResponse; + registerCounterpartyPayee( + requestMessage: ibc_applications_fee_v1_tx_pb.MsgRegisterCounterpartyPayee, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_tx_pb.MsgRegisterCounterpartyPayeeResponse|null) => void + ): UnaryResponse; + payPacketFee( + requestMessage: ibc_applications_fee_v1_tx_pb.MsgPayPacketFee, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeResponse|null) => void + ): UnaryResponse; + payPacketFee( + requestMessage: ibc_applications_fee_v1_tx_pb.MsgPayPacketFee, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeResponse|null) => void + ): UnaryResponse; + payPacketFeeAsync( + requestMessage: ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeAsync, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeAsyncResponse|null) => void + ): UnaryResponse; + payPacketFeeAsync( + requestMessage: ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeAsync, + callback: (error: ServiceError|null, responseMessage: ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeAsyncResponse|null) => void + ): UnaryResponse; +} + diff --git a/proto/ibc/core/client/v1/tx_pb_service.js b/codegen/ibc/applications/fee/v1/tx_pb_service.js similarity index 67% rename from proto/ibc/core/client/v1/tx_pb_service.js rename to codegen/ibc/applications/fee/v1/tx_pb_service.js index 149ffb1..26d881f 100644 --- a/proto/ibc/core/client/v1/tx_pb_service.js +++ b/codegen/ibc/applications/fee/v1/tx_pb_service.js @@ -1,49 +1,49 @@ -// package: ibc.core.client.v1 -// file: ibc/core/client/v1/tx.proto +// package: ibc.applications.fee.v1 +// file: ibc/applications/fee/v1/tx.proto -var ibc_core_client_v1_tx_pb = require("../../../../ibc/core/client/v1/tx_pb"); +var ibc_applications_fee_v1_tx_pb = require("../../../../ibc/applications/fee/v1/tx_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; var Msg = (function () { function Msg() {} - Msg.serviceName = "ibc.core.client.v1.Msg"; + Msg.serviceName = "ibc.applications.fee.v1.Msg"; return Msg; }()); -Msg.CreateClient = { - methodName: "CreateClient", +Msg.RegisterPayee = { + methodName: "RegisterPayee", service: Msg, requestStream: false, responseStream: false, - requestType: ibc_core_client_v1_tx_pb.MsgCreateClient, - responseType: ibc_core_client_v1_tx_pb.MsgCreateClientResponse + requestType: ibc_applications_fee_v1_tx_pb.MsgRegisterPayee, + responseType: ibc_applications_fee_v1_tx_pb.MsgRegisterPayeeResponse }; -Msg.UpdateClient = { - methodName: "UpdateClient", +Msg.RegisterCounterpartyPayee = { + methodName: "RegisterCounterpartyPayee", service: Msg, requestStream: false, responseStream: false, - requestType: ibc_core_client_v1_tx_pb.MsgUpdateClient, - responseType: ibc_core_client_v1_tx_pb.MsgUpdateClientResponse + requestType: ibc_applications_fee_v1_tx_pb.MsgRegisterCounterpartyPayee, + responseType: ibc_applications_fee_v1_tx_pb.MsgRegisterCounterpartyPayeeResponse }; -Msg.UpgradeClient = { - methodName: "UpgradeClient", +Msg.PayPacketFee = { + methodName: "PayPacketFee", service: Msg, requestStream: false, responseStream: false, - requestType: ibc_core_client_v1_tx_pb.MsgUpgradeClient, - responseType: ibc_core_client_v1_tx_pb.MsgUpgradeClientResponse + requestType: ibc_applications_fee_v1_tx_pb.MsgPayPacketFee, + responseType: ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeResponse }; -Msg.SubmitMisbehaviour = { - methodName: "SubmitMisbehaviour", +Msg.PayPacketFeeAsync = { + methodName: "PayPacketFeeAsync", service: Msg, requestStream: false, responseStream: false, - requestType: ibc_core_client_v1_tx_pb.MsgSubmitMisbehaviour, - responseType: ibc_core_client_v1_tx_pb.MsgSubmitMisbehaviourResponse + requestType: ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeAsync, + responseType: ibc_applications_fee_v1_tx_pb.MsgPayPacketFeeAsyncResponse }; exports.Msg = Msg; @@ -53,11 +53,11 @@ function MsgClient(serviceHost, options) { this.options = options || {}; } -MsgClient.prototype.createClient = function createClient(requestMessage, metadata, callback) { +MsgClient.prototype.registerPayee = function registerPayee(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.CreateClient, { + var client = grpc.unary(Msg.RegisterPayee, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -84,11 +84,11 @@ MsgClient.prototype.createClient = function createClient(requestMessage, metadat }; }; -MsgClient.prototype.updateClient = function updateClient(requestMessage, metadata, callback) { +MsgClient.prototype.registerCounterpartyPayee = function registerCounterpartyPayee(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.UpdateClient, { + var client = grpc.unary(Msg.RegisterCounterpartyPayee, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -115,11 +115,11 @@ MsgClient.prototype.updateClient = function updateClient(requestMessage, metadat }; }; -MsgClient.prototype.upgradeClient = function upgradeClient(requestMessage, metadata, callback) { +MsgClient.prototype.payPacketFee = function payPacketFee(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.UpgradeClient, { + var client = grpc.unary(Msg.PayPacketFee, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -146,11 +146,11 @@ MsgClient.prototype.upgradeClient = function upgradeClient(requestMessage, metad }; }; -MsgClient.prototype.submitMisbehaviour = function submitMisbehaviour(requestMessage, metadata, callback) { +MsgClient.prototype.payPacketFeeAsync = function payPacketFeeAsync(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Msg.SubmitMisbehaviour, { + var client = grpc.unary(Msg.PayPacketFeeAsync, { request: requestMessage, host: this.serviceHost, metadata: metadata, diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts b/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts new file mode 100644 index 0000000..538a2e5 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts @@ -0,0 +1,75 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/controller/v1/controller.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.interchain_accounts.controller.v1 { + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + controller_enabled?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("controller_enabled" in data && data.controller_enabled != undefined) { + this.controller_enabled = data.controller_enabled; + } + } + } + get controller_enabled() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set controller_enabled(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + controller_enabled?: boolean; + }): Params { + const message = new Params({}); + if (data.controller_enabled != null) { + message.controller_enabled = data.controller_enabled; + } + return message; + } + toObject() { + const data: { + controller_enabled?: boolean; + } = {}; + if (this.controller_enabled != null) { + data.controller_enabled = this.controller_enabled; + } + 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.controller_enabled != false) + writer.writeBool(1, this.controller_enabled); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.controller_enabled = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb.d.ts b/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb.d.ts new file mode 100644 index 0000000..d30519d --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb.d.ts @@ -0,0 +1,25 @@ +// package: ibc.applications.interchain_accounts.controller.v1 +// file: ibc/applications/interchain_accounts/controller/v1/controller.proto + +import * as jspb from "google-protobuf"; + +export class Params extends jspb.Message { + getControllerEnabled(): boolean; + setControllerEnabled(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + controllerEnabled: boolean, + } +} + diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb.js b/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb.js new file mode 100644 index 0000000..97e736a --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb.js @@ -0,0 +1,170 @@ +// source: ibc/applications/interchain_accounts/controller/v1/controller.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.Params', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.Params.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.Params'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + controllerEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.Params} + */ +proto.ibc.applications.interchain_accounts.controller.v1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.Params; + return proto.ibc.applications.interchain_accounts.controller.v1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.Params} + */ +proto.ibc.applications.interchain_accounts.controller.v1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setControllerEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getControllerEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool controller_enabled = 1; + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.controller.v1.Params.prototype.getControllerEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.Params} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.Params.prototype.setControllerEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.controller.v1); diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb_service.d.ts new file mode 100644 index 0000000..b4bd633 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.controller.v1 +// file: ibc/applications/interchain_accounts/controller/v1/controller.proto + diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb_service.js b/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb_service.js new file mode 100644 index 0000000..b4bd633 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/controller_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.controller.v1 +// file: ibc/applications/interchain_accounts/controller/v1/controller.proto + diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts b/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts new file mode 100644 index 0000000..5f2220a --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts @@ -0,0 +1,338 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/controller/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./controller"; +import * as dependency_2 from "./../../../../../google/api/annotations"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.applications.interchain_accounts.controller.v1 { + export class QueryInterchainAccountRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + owner?: string; + 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 ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("connection_id" in data && data.connection_id != undefined) { + this.connection_id = data.connection_id; + } + } + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 1, value); + } + get connection_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set connection_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + owner?: string; + connection_id?: string; + }): QueryInterchainAccountRequest { + const message = new QueryInterchainAccountRequest({}); + if (data.owner != null) { + message.owner = data.owner; + } + if (data.connection_id != null) { + message.connection_id = data.connection_id; + } + return message; + } + toObject() { + const data: { + owner?: string; + connection_id?: string; + } = {}; + if (this.owner != null) { + data.owner = this.owner; + } + 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.owner.length) + writer.writeString(1, this.owner); + if (this.connection_id.length) + writer.writeString(2, this.connection_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryInterchainAccountRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryInterchainAccountRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.owner = reader.readString(); + break; + case 2: + message.connection_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryInterchainAccountRequest { + return QueryInterchainAccountRequest.deserialize(bytes); + } + } + export class QueryInterchainAccountResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + address?: string; + }): QueryInterchainAccountResponse { + const message = new QueryInterchainAccountResponse({}); + if (data.address != null) { + message.address = data.address; + } + return message; + } + toObject() { + const data: { + address?: string; + } = {}; + if (this.address != null) { + data.address = this.address; + } + 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.address.length) + writer.writeString(1, this.address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryInterchainAccountResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryInterchainAccountResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryInterchainAccountResponse { + return QueryInterchainAccountResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_1.ibc.applications.interchain_accounts.controller.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_1.ibc.applications.interchain_accounts.controller.v1.Params, 1) as dependency_1.ibc.applications.interchain_accounts.controller.v1.Params; + } + set params(value: dependency_1.ibc.applications.interchain_accounts.controller.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; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_1.ibc.applications.interchain_accounts.controller.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_1.ibc.applications.interchain_accounts.controller.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + InterchainAccount: { + path: "/ibc.applications.interchain_accounts.controller.v1.Query/InterchainAccount", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryInterchainAccountRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryInterchainAccountRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryInterchainAccountResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryInterchainAccountResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/ibc.applications.interchain_accounts.controller.v1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract InterchainAccount(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + InterchainAccount: GrpcUnaryServiceInterface = (message: QueryInterchainAccountRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.InterchainAccount(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + } +} diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb.d.ts b/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb.d.ts new file mode 100644 index 0000000..a81adc2 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb.d.ts @@ -0,0 +1,89 @@ +// package: ibc.applications.interchain_accounts.controller.v1 +// file: ibc/applications/interchain_accounts/controller/v1/query.proto + +import * as jspb from "google-protobuf"; +import * as ibc_applications_interchain_accounts_controller_v1_controller_pb from "../../../../../ibc/applications/interchain_accounts/controller/v1/controller_pb"; +import * as google_api_annotations_pb from "../../../../../google/api/annotations_pb"; + +export class QueryInterchainAccountRequest extends jspb.Message { + getOwner(): string; + setOwner(value: string): void; + + getConnectionId(): string; + setConnectionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryInterchainAccountRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryInterchainAccountRequest): QueryInterchainAccountRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryInterchainAccountRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryInterchainAccountRequest; + static deserializeBinaryFromReader(message: QueryInterchainAccountRequest, reader: jspb.BinaryReader): QueryInterchainAccountRequest; +} + +export namespace QueryInterchainAccountRequest { + export type AsObject = { + owner: string, + connectionId: string, + } +} + +export class QueryInterchainAccountResponse extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryInterchainAccountResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryInterchainAccountResponse): QueryInterchainAccountResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryInterchainAccountResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryInterchainAccountResponse; + static deserializeBinaryFromReader(message: QueryInterchainAccountResponse, reader: jspb.BinaryReader): QueryInterchainAccountResponse; +} + +export namespace QueryInterchainAccountResponse { + export type AsObject = { + address: string, + } +} + +export class QueryParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; + static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; +} + +export namespace QueryParamsRequest { + export type AsObject = { + } +} + +export class QueryParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_applications_interchain_accounts_controller_v1_controller_pb.Params | undefined; + setParams(value?: ibc_applications_interchain_accounts_controller_v1_controller_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; + static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; +} + +export namespace QueryParamsResponse { + export type AsObject = { + params?: ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.AsObject, + } +} + diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb.js b/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb.js new file mode 100644 index 0000000..b0a6912 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb.js @@ -0,0 +1,652 @@ +// source: ibc/applications/interchain_accounts/controller/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var ibc_applications_interchain_accounts_controller_v1_controller_pb = require('../../../../../ibc/applications/interchain_accounts/controller/v1/controller_pb.js'); +goog.object.extend(proto, ibc_applications_interchain_accounts_controller_v1_controller_pb); +var google_api_annotations_pb = require('../../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + connectionId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest; + return proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConnectionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string connection_id = 2; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse; + return proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest; + return proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse; + return proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_interchain_accounts_controller_v1_controller_pb.Params; + reader.readMessage(value,ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.ibc.applications.interchain_accounts.controller.v1.Params} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.interchain_accounts.controller.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_interchain_accounts_controller_v1_controller_pb.Params, 1)); +}; + + +/** + * @param {?proto.ibc.applications.interchain_accounts.controller.v1.Params|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} returns this +*/ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.controller.v1); diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb_service.d.ts new file mode 100644 index 0000000..0469ac3 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb_service.d.ts @@ -0,0 +1,82 @@ +// package: ibc.applications.interchain_accounts.controller.v1 +// file: ibc/applications/interchain_accounts/controller/v1/query.proto + +import * as ibc_applications_interchain_accounts_controller_v1_query_pb from "../../../../../ibc/applications/interchain_accounts/controller/v1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryInterchainAccount = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_interchain_accounts_controller_v1_query_pb.QueryInterchainAccountRequest; + readonly responseType: typeof ibc_applications_interchain_accounts_controller_v1_query_pb.QueryInterchainAccountResponse; +}; + +type QueryParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_interchain_accounts_controller_v1_query_pb.QueryParamsRequest; + readonly responseType: typeof ibc_applications_interchain_accounts_controller_v1_query_pb.QueryParamsResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly InterchainAccount: QueryInterchainAccount; + static readonly Params: QueryParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + interchainAccount( + requestMessage: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryInterchainAccountRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryInterchainAccountResponse|null) => void + ): UnaryResponse; + interchainAccount( + requestMessage: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryInterchainAccountRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryInterchainAccountResponse|null) => void + ): UnaryResponse; + params( + requestMessage: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryParamsRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb_service.js b/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb_service.js new file mode 100644 index 0000000..e7b2807 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/query_pb_service.js @@ -0,0 +1,101 @@ +// package: ibc.applications.interchain_accounts.controller.v1 +// file: ibc/applications/interchain_accounts/controller/v1/query.proto + +var ibc_applications_interchain_accounts_controller_v1_query_pb = require("../../../../../ibc/applications/interchain_accounts/controller/v1/query_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Query = (function () { + function Query() {} + Query.serviceName = "ibc.applications.interchain_accounts.controller.v1.Query"; + return Query; +}()); + +Query.InterchainAccount = { + methodName: "InterchainAccount", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryInterchainAccountRequest, + responseType: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryInterchainAccountResponse +}; + +Query.Params = { + methodName: "Params", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryParamsRequest, + responseType: ibc_applications_interchain_accounts_controller_v1_query_pb.QueryParamsResponse +}; + +exports.Query = Query; + +function QueryClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +QueryClient.prototype.interchainAccount = function interchainAccount(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.InterchainAccount, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Params, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.QueryClient = QueryClient; + diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts b/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts new file mode 100644 index 0000000..63ec4b8 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts @@ -0,0 +1,652 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/controller/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../v1/packet"; +import * as dependency_3 from "./controller"; +import * as dependency_4 from "./../../../../../cosmos/msg/v1/msg"; +import * as dependency_5 from "./../../../../core/channel/v1/channel"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.applications.interchain_accounts.controller.v1 { + export class MsgRegisterInterchainAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + owner?: string; + connection_id?: string; + version?: string; + ordering?: dependency_5.ibc.core.channel.v1.Order; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("connection_id" in data && data.connection_id != undefined) { + this.connection_id = data.connection_id; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("ordering" in data && data.ordering != undefined) { + this.ordering = data.ordering; + } + } + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 1, value); + } + get connection_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set connection_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 3, value); + } + get ordering() { + return pb_1.Message.getFieldWithDefault(this, 4, dependency_5.ibc.core.channel.v1.Order.ORDER_NONE_UNSPECIFIED) as dependency_5.ibc.core.channel.v1.Order; + } + set ordering(value: dependency_5.ibc.core.channel.v1.Order) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + owner?: string; + connection_id?: string; + version?: string; + ordering?: dependency_5.ibc.core.channel.v1.Order; + }): MsgRegisterInterchainAccount { + const message = new MsgRegisterInterchainAccount({}); + if (data.owner != null) { + message.owner = data.owner; + } + if (data.connection_id != null) { + message.connection_id = data.connection_id; + } + if (data.version != null) { + message.version = data.version; + } + if (data.ordering != null) { + message.ordering = data.ordering; + } + return message; + } + toObject() { + const data: { + owner?: string; + connection_id?: string; + version?: string; + ordering?: dependency_5.ibc.core.channel.v1.Order; + } = {}; + if (this.owner != null) { + data.owner = this.owner; + } + if (this.connection_id != null) { + data.connection_id = this.connection_id; + } + if (this.version != null) { + data.version = this.version; + } + if (this.ordering != null) { + data.ordering = this.ordering; + } + 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.owner.length) + writer.writeString(1, this.owner); + if (this.connection_id.length) + writer.writeString(2, this.connection_id); + if (this.version.length) + writer.writeString(3, this.version); + if (this.ordering != dependency_5.ibc.core.channel.v1.Order.ORDER_NONE_UNSPECIFIED) + writer.writeEnum(4, this.ordering); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRegisterInterchainAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRegisterInterchainAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.owner = reader.readString(); + break; + case 2: + message.connection_id = reader.readString(); + break; + case 3: + message.version = reader.readString(); + break; + case 4: + message.ordering = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRegisterInterchainAccount { + return MsgRegisterInterchainAccount.deserialize(bytes); + } + } + export class MsgRegisterInterchainAccountResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channel_id?: string; + port_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 ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + } + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + channel_id?: string; + port_id?: string; + }): MsgRegisterInterchainAccountResponse { + const message = new MsgRegisterInterchainAccountResponse({}); + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.port_id != null) { + message.port_id = data.port_id; + } + return message; + } + toObject() { + const data: { + channel_id?: string; + port_id?: string; + } = {}; + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.port_id != null) { + data.port_id = this.port_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.channel_id.length) + writer.writeString(1, this.channel_id); + if (this.port_id.length) + writer.writeString(2, this.port_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRegisterInterchainAccountResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRegisterInterchainAccountResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.channel_id = reader.readString(); + break; + case 2: + message.port_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRegisterInterchainAccountResponse { + return MsgRegisterInterchainAccountResponse.deserialize(bytes); + } + } + export class MsgSendTx extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + owner?: string; + connection_id?: string; + packet_data?: dependency_2.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData; + relative_timeout?: 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 ("owner" in data && data.owner != undefined) { + this.owner = data.owner; + } + if ("connection_id" in data && data.connection_id != undefined) { + this.connection_id = data.connection_id; + } + if ("packet_data" in data && data.packet_data != undefined) { + this.packet_data = data.packet_data; + } + if ("relative_timeout" in data && data.relative_timeout != undefined) { + this.relative_timeout = data.relative_timeout; + } + } + } + get owner() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set owner(value: string) { + pb_1.Message.setField(this, 1, value); + } + get connection_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set connection_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get packet_data() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData, 3) as dependency_2.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData; + } + set packet_data(value: dependency_2.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_packet_data() { + return pb_1.Message.getField(this, 3) != null; + } + get relative_timeout() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set relative_timeout(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + owner?: string; + connection_id?: string; + packet_data?: ReturnType; + relative_timeout?: number; + }): MsgSendTx { + const message = new MsgSendTx({}); + if (data.owner != null) { + message.owner = data.owner; + } + if (data.connection_id != null) { + message.connection_id = data.connection_id; + } + if (data.packet_data != null) { + message.packet_data = dependency_2.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.fromObject(data.packet_data); + } + if (data.relative_timeout != null) { + message.relative_timeout = data.relative_timeout; + } + return message; + } + toObject() { + const data: { + owner?: string; + connection_id?: string; + packet_data?: ReturnType; + relative_timeout?: number; + } = {}; + if (this.owner != null) { + data.owner = this.owner; + } + if (this.connection_id != null) { + data.connection_id = this.connection_id; + } + if (this.packet_data != null) { + data.packet_data = this.packet_data.toObject(); + } + if (this.relative_timeout != null) { + data.relative_timeout = this.relative_timeout; + } + 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.owner.length) + writer.writeString(1, this.owner); + if (this.connection_id.length) + writer.writeString(2, this.connection_id); + if (this.has_packet_data) + writer.writeMessage(3, this.packet_data, () => this.packet_data.serialize(writer)); + if (this.relative_timeout != 0) + writer.writeUint64(4, this.relative_timeout); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSendTx { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSendTx(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.owner = reader.readString(); + break; + case 2: + message.connection_id = reader.readString(); + break; + case 3: + reader.readMessage(message.packet_data, () => message.packet_data = dependency_2.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.deserialize(reader)); + break; + case 4: + message.relative_timeout = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSendTx { + return MsgSendTx.deserialize(bytes); + } + } + export class MsgSendTxResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: 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 ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + sequence?: number; + }): MsgSendTxResponse { + const message = new MsgSendTxResponse({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + sequence?: number; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSendTxResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSendTxResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSendTxResponse { + return MsgSendTxResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer?: string; + params?: dependency_3.ibc.applications.interchain_accounts.controller.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 ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.applications.interchain_accounts.controller.v1.Params, 2) as dependency_3.ibc.applications.interchain_accounts.controller.v1.Params; + } + set params(value: dependency_3.ibc.applications.interchain_accounts.controller.v1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + signer?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.signer != null) { + message.signer = data.signer; + } + if (data.params != null) { + message.params = dependency_3.ibc.applications.interchain_accounts.controller.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + signer?: string; + params?: ReturnType; + } = {}; + if (this.signer != null) { + data.signer = this.signer; + } + 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.signer.length) + writer.writeString(1, this.signer); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signer = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_3.ibc.applications.interchain_accounts.controller.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + RegisterInterchainAccount: { + path: "/ibc.applications.interchain_accounts.controller.v1.Msg/RegisterInterchainAccount", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRegisterInterchainAccount) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRegisterInterchainAccount.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRegisterInterchainAccountResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRegisterInterchainAccountResponse.deserialize(new Uint8Array(bytes)) + }, + SendTx: { + path: "/ibc.applications.interchain_accounts.controller.v1.Msg/SendTx", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSendTx) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSendTx.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSendTxResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSendTxResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract RegisterInterchainAccount(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SendTx(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + RegisterInterchainAccount: GrpcUnaryServiceInterface = (message: MsgRegisterInterchainAccount, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RegisterInterchainAccount(message, metadata, options, callback); + }; + SendTx: GrpcUnaryServiceInterface = (message: MsgSendTx, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SendTx(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb.d.ts b/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb.d.ts new file mode 100644 index 0000000..410ad5f --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb.d.ts @@ -0,0 +1,162 @@ +// package: ibc.applications.interchain_accounts.controller.v1 +// file: ibc/applications/interchain_accounts/controller/v1/tx.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../../gogoproto/gogo_pb"; +import * as ibc_applications_interchain_accounts_v1_packet_pb from "../../../../../ibc/applications/interchain_accounts/v1/packet_pb"; +import * as ibc_applications_interchain_accounts_controller_v1_controller_pb from "../../../../../ibc/applications/interchain_accounts/controller/v1/controller_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../../../cosmos/msg/v1/msg_pb"; +import * as ibc_core_channel_v1_channel_pb from "../../../../../ibc/core/channel/v1/channel_pb"; + +export class MsgRegisterInterchainAccount extends jspb.Message { + getOwner(): string; + setOwner(value: string): void; + + getConnectionId(): string; + setConnectionId(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + getOrdering(): ibc_core_channel_v1_channel_pb.OrderMap[keyof ibc_core_channel_v1_channel_pb.OrderMap]; + setOrdering(value: ibc_core_channel_v1_channel_pb.OrderMap[keyof ibc_core_channel_v1_channel_pb.OrderMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRegisterInterchainAccount.AsObject; + static toObject(includeInstance: boolean, msg: MsgRegisterInterchainAccount): MsgRegisterInterchainAccount.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRegisterInterchainAccount, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRegisterInterchainAccount; + static deserializeBinaryFromReader(message: MsgRegisterInterchainAccount, reader: jspb.BinaryReader): MsgRegisterInterchainAccount; +} + +export namespace MsgRegisterInterchainAccount { + export type AsObject = { + owner: string, + connectionId: string, + version: string, + ordering: ibc_core_channel_v1_channel_pb.OrderMap[keyof ibc_core_channel_v1_channel_pb.OrderMap], + } +} + +export class MsgRegisterInterchainAccountResponse extends jspb.Message { + getChannelId(): string; + setChannelId(value: string): void; + + getPortId(): string; + setPortId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRegisterInterchainAccountResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgRegisterInterchainAccountResponse): MsgRegisterInterchainAccountResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRegisterInterchainAccountResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRegisterInterchainAccountResponse; + static deserializeBinaryFromReader(message: MsgRegisterInterchainAccountResponse, reader: jspb.BinaryReader): MsgRegisterInterchainAccountResponse; +} + +export namespace MsgRegisterInterchainAccountResponse { + export type AsObject = { + channelId: string, + portId: string, + } +} + +export class MsgSendTx extends jspb.Message { + getOwner(): string; + setOwner(value: string): void; + + getConnectionId(): string; + setConnectionId(value: string): void; + + hasPacketData(): boolean; + clearPacketData(): void; + getPacketData(): ibc_applications_interchain_accounts_v1_packet_pb.InterchainAccountPacketData | undefined; + setPacketData(value?: ibc_applications_interchain_accounts_v1_packet_pb.InterchainAccountPacketData): void; + + getRelativeTimeout(): number; + setRelativeTimeout(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSendTx.AsObject; + static toObject(includeInstance: boolean, msg: MsgSendTx): MsgSendTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSendTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSendTx; + static deserializeBinaryFromReader(message: MsgSendTx, reader: jspb.BinaryReader): MsgSendTx; +} + +export namespace MsgSendTx { + export type AsObject = { + owner: string, + connectionId: string, + packetData?: ibc_applications_interchain_accounts_v1_packet_pb.InterchainAccountPacketData.AsObject, + relativeTimeout: number, + } +} + +export class MsgSendTxResponse extends jspb.Message { + getSequence(): number; + setSequence(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgSendTxResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgSendTxResponse): MsgSendTxResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgSendTxResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgSendTxResponse; + static deserializeBinaryFromReader(message: MsgSendTxResponse, reader: jspb.BinaryReader): MsgSendTxResponse; +} + +export namespace MsgSendTxResponse { + export type AsObject = { + sequence: number, + } +} + +export class MsgUpdateParams extends jspb.Message { + getSigner(): string; + setSigner(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_applications_interchain_accounts_controller_v1_controller_pb.Params | undefined; + setParams(value?: ibc_applications_interchain_accounts_controller_v1_controller_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + signer: string, + params?: ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb.js b/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb.js new file mode 100644 index 0000000..5d9111d --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb.js @@ -0,0 +1,1193 @@ +// source: ibc/applications/interchain_accounts/controller/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var ibc_applications_interchain_accounts_v1_packet_pb = require('../../../../../ibc/applications/interchain_accounts/v1/packet_pb.js'); +goog.object.extend(proto, ibc_applications_interchain_accounts_v1_packet_pb); +var ibc_applications_interchain_accounts_controller_v1_controller_pb = require('../../../../../ibc/applications/interchain_accounts/controller/v1/controller_pb.js'); +goog.object.extend(proto, ibc_applications_interchain_accounts_controller_v1_controller_pb); +var cosmos_msg_v1_msg_pb = require('../../../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var ibc_core_channel_v1_channel_pb = require('../../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.displayName = 'proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + connectionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: jspb.Message.getFieldWithDefault(msg, 3, ""), + ordering: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount; + return proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConnectionId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 4: + var value = /** @type {!proto.ibc.core.channel.v1.Order} */ (reader.readEnum()); + msg.setOrdering(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOrdering(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string connection_id = 2; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional ibc.core.channel.v1.Order ordering = 4; + * @return {!proto.ibc.core.channel.v1.Order} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.getOrdering = function() { + return /** @type {!proto.ibc.core.channel.v1.Order} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.Order} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.prototype.setOrdering = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelId: jspb.Message.getFieldWithDefault(msg, 1, ""), + portId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse; + return proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string channel_id = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string port_id = 2; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + connectionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + packetData: (f = msg.getPacketData()) && ibc_applications_interchain_accounts_v1_packet_pb.InterchainAccountPacketData.toObject(includeInstance, f), + relativeTimeout: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx; + return proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConnectionId(value); + break; + case 3: + var value = new ibc_applications_interchain_accounts_v1_packet_pb.InterchainAccountPacketData; + reader.readMessage(value,ibc_applications_interchain_accounts_v1_packet_pb.InterchainAccountPacketData.deserializeBinaryFromReader); + msg.setPacketData(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRelativeTimeout(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPacketData(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_applications_interchain_accounts_v1_packet_pb.InterchainAccountPacketData.serializeBinaryToWriter + ); + } + f = message.getRelativeTimeout(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string connection_id = 2; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ibc.applications.interchain_accounts.v1.InterchainAccountPacketData packet_data = 3; + * @return {?proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.getPacketData = function() { + return /** @type{?proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} */ ( + jspb.Message.getWrapperField(this, ibc_applications_interchain_accounts_v1_packet_pb.InterchainAccountPacketData, 3)); +}; + + +/** + * @param {?proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} returns this +*/ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.setPacketData = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.clearPacketData = function() { + return this.setPacketData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.hasPacketData = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 relative_timeout = 4; + * @return {number} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.getRelativeTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTx.prototype.setRelativeTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse; + return proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + signer: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams; + return proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 2: + var value = new ibc_applications_interchain_accounts_controller_v1_controller_pb.Params; + reader.readMessage(value,ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string signer = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Params params = 2; + * @return {?proto.ibc.applications.interchain_accounts.controller.v1.Params} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.interchain_accounts.controller.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_interchain_accounts_controller_v1_controller_pb.Params, 2)); +}; + + +/** + * @param {?proto.ibc.applications.interchain_accounts.controller.v1.Params|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams} returns this +*/ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams} returns this + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse; + return proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.controller.v1); diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb_service.d.ts new file mode 100644 index 0000000..16432d8 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb_service.d.ts @@ -0,0 +1,101 @@ +// package: ibc.applications.interchain_accounts.controller.v1 +// file: ibc/applications/interchain_accounts/controller/v1/tx.proto + +import * as ibc_applications_interchain_accounts_controller_v1_tx_pb from "../../../../../ibc/applications/interchain_accounts/controller/v1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgRegisterInterchainAccount = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgRegisterInterchainAccount; + readonly responseType: typeof ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgRegisterInterchainAccountResponse; +}; + +type MsgSendTx = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgSendTx; + readonly responseType: typeof ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgSendTxResponse; +}; + +type MsgUpdateParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgUpdateParams; + readonly responseType: typeof ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgUpdateParamsResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly RegisterInterchainAccount: MsgRegisterInterchainAccount; + static readonly SendTx: MsgSendTx; + static readonly UpdateParams: MsgUpdateParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + registerInterchainAccount( + requestMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgRegisterInterchainAccount, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgRegisterInterchainAccountResponse|null) => void + ): UnaryResponse; + registerInterchainAccount( + requestMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgRegisterInterchainAccount, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgRegisterInterchainAccountResponse|null) => void + ): UnaryResponse; + sendTx( + requestMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgSendTx, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgSendTxResponse|null) => void + ): UnaryResponse; + sendTx( + requestMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgSendTx, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgSendTxResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb_service.js b/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb_service.js new file mode 100644 index 0000000..34471be --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/controller/v1/tx_pb_service.js @@ -0,0 +1,141 @@ +// package: ibc.applications.interchain_accounts.controller.v1 +// file: ibc/applications/interchain_accounts/controller/v1/tx.proto + +var ibc_applications_interchain_accounts_controller_v1_tx_pb = require("../../../../../ibc/applications/interchain_accounts/controller/v1/tx_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Msg = (function () { + function Msg() {} + Msg.serviceName = "ibc.applications.interchain_accounts.controller.v1.Msg"; + return Msg; +}()); + +Msg.RegisterInterchainAccount = { + methodName: "RegisterInterchainAccount", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgRegisterInterchainAccount, + responseType: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgRegisterInterchainAccountResponse +}; + +Msg.SendTx = { + methodName: "SendTx", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgSendTx, + responseType: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgSendTxResponse +}; + +Msg.UpdateParams = { + methodName: "UpdateParams", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgUpdateParams, + responseType: ibc_applications_interchain_accounts_controller_v1_tx_pb.MsgUpdateParamsResponse +}; + +exports.Msg = Msg; + +function MsgClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MsgClient.prototype.registerInterchainAccount = function registerInterchainAccount(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.RegisterInterchainAccount, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.sendTx = function sendTx(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.SendTx, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.updateParams = function updateParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MsgClient = MsgClient; + diff --git a/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.ts b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.ts new file mode 100644 index 0000000..956e035 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.ts @@ -0,0 +1,634 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/genesis/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../controller/v1/controller"; +import * as dependency_3 from "./../../host/v1/host"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.interchain_accounts.genesis.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + controller_genesis_state?: ControllerGenesisState; + host_genesis_state?: HostGenesisState; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("controller_genesis_state" in data && data.controller_genesis_state != undefined) { + this.controller_genesis_state = data.controller_genesis_state; + } + if ("host_genesis_state" in data && data.host_genesis_state != undefined) { + this.host_genesis_state = data.host_genesis_state; + } + } + } + get controller_genesis_state() { + return pb_1.Message.getWrapperField(this, ControllerGenesisState, 1) as ControllerGenesisState; + } + set controller_genesis_state(value: ControllerGenesisState) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_controller_genesis_state() { + return pb_1.Message.getField(this, 1) != null; + } + get host_genesis_state() { + return pb_1.Message.getWrapperField(this, HostGenesisState, 2) as HostGenesisState; + } + set host_genesis_state(value: HostGenesisState) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_host_genesis_state() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + controller_genesis_state?: ReturnType; + host_genesis_state?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.controller_genesis_state != null) { + message.controller_genesis_state = ControllerGenesisState.fromObject(data.controller_genesis_state); + } + if (data.host_genesis_state != null) { + message.host_genesis_state = HostGenesisState.fromObject(data.host_genesis_state); + } + return message; + } + toObject() { + const data: { + controller_genesis_state?: ReturnType; + host_genesis_state?: ReturnType; + } = {}; + if (this.controller_genesis_state != null) { + data.controller_genesis_state = this.controller_genesis_state.toObject(); + } + if (this.host_genesis_state != null) { + data.host_genesis_state = this.host_genesis_state.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_controller_genesis_state) + writer.writeMessage(1, this.controller_genesis_state, () => this.controller_genesis_state.serialize(writer)); + if (this.has_host_genesis_state) + writer.writeMessage(2, this.host_genesis_state, () => this.host_genesis_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.controller_genesis_state, () => message.controller_genesis_state = ControllerGenesisState.deserialize(reader)); + break; + case 2: + reader.readMessage(message.host_genesis_state, () => message.host_genesis_state = HostGenesisState.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class ControllerGenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + active_channels?: ActiveChannel[]; + interchain_accounts?: RegisteredInterchainAccount[]; + ports?: string[]; + params?: dependency_2.ibc.applications.interchain_accounts.controller.v1.Params; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("active_channels" in data && data.active_channels != undefined) { + this.active_channels = data.active_channels; + } + if ("interchain_accounts" in data && data.interchain_accounts != undefined) { + this.interchain_accounts = data.interchain_accounts; + } + if ("ports" in data && data.ports != undefined) { + this.ports = data.ports; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get active_channels() { + return pb_1.Message.getRepeatedWrapperField(this, ActiveChannel, 1) as ActiveChannel[]; + } + set active_channels(value: ActiveChannel[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get interchain_accounts() { + return pb_1.Message.getRepeatedWrapperField(this, RegisteredInterchainAccount, 2) as RegisteredInterchainAccount[]; + } + set interchain_accounts(value: RegisteredInterchainAccount[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get ports() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set ports(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.applications.interchain_accounts.controller.v1.Params, 4) as dependency_2.ibc.applications.interchain_accounts.controller.v1.Params; + } + set params(value: dependency_2.ibc.applications.interchain_accounts.controller.v1.Params) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_params() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + active_channels?: ReturnType[]; + interchain_accounts?: ReturnType[]; + ports?: string[]; + params?: ReturnType; + }): ControllerGenesisState { + const message = new ControllerGenesisState({}); + if (data.active_channels != null) { + message.active_channels = data.active_channels.map(item => ActiveChannel.fromObject(item)); + } + if (data.interchain_accounts != null) { + message.interchain_accounts = data.interchain_accounts.map(item => RegisteredInterchainAccount.fromObject(item)); + } + if (data.ports != null) { + message.ports = data.ports; + } + if (data.params != null) { + message.params = dependency_2.ibc.applications.interchain_accounts.controller.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + active_channels?: ReturnType[]; + interchain_accounts?: ReturnType[]; + ports?: string[]; + params?: ReturnType; + } = {}; + if (this.active_channels != null) { + data.active_channels = this.active_channels.map((item: ActiveChannel) => item.toObject()); + } + if (this.interchain_accounts != null) { + data.interchain_accounts = this.interchain_accounts.map((item: RegisteredInterchainAccount) => item.toObject()); + } + if (this.ports != null) { + data.ports = this.ports; + } + 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.active_channels.length) + writer.writeRepeatedMessage(1, this.active_channels, (item: ActiveChannel) => item.serialize(writer)); + if (this.interchain_accounts.length) + writer.writeRepeatedMessage(2, this.interchain_accounts, (item: RegisteredInterchainAccount) => item.serialize(writer)); + if (this.ports.length) + writer.writeRepeatedString(3, this.ports); + if (this.has_params) + writer.writeMessage(4, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ControllerGenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ControllerGenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.active_channels, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ActiveChannel.deserialize(reader), ActiveChannel)); + break; + case 2: + reader.readMessage(message.interchain_accounts, () => pb_1.Message.addToRepeatedWrapperField(message, 2, RegisteredInterchainAccount.deserialize(reader), RegisteredInterchainAccount)); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + case 4: + reader.readMessage(message.params, () => message.params = dependency_2.ibc.applications.interchain_accounts.controller.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ControllerGenesisState { + return ControllerGenesisState.deserialize(bytes); + } + } + export class HostGenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + active_channels?: ActiveChannel[]; + interchain_accounts?: RegisteredInterchainAccount[]; + port?: string; + params?: dependency_3.ibc.applications.interchain_accounts.host.v1.Params; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("active_channels" in data && data.active_channels != undefined) { + this.active_channels = data.active_channels; + } + if ("interchain_accounts" in data && data.interchain_accounts != undefined) { + this.interchain_accounts = data.interchain_accounts; + } + if ("port" in data && data.port != undefined) { + this.port = data.port; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get active_channels() { + return pb_1.Message.getRepeatedWrapperField(this, ActiveChannel, 1) as ActiveChannel[]; + } + set active_channels(value: ActiveChannel[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get interchain_accounts() { + return pb_1.Message.getRepeatedWrapperField(this, RegisteredInterchainAccount, 2) as RegisteredInterchainAccount[]; + } + set interchain_accounts(value: RegisteredInterchainAccount[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get port() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set port(value: string) { + pb_1.Message.setField(this, 3, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.applications.interchain_accounts.host.v1.Params, 4) as dependency_3.ibc.applications.interchain_accounts.host.v1.Params; + } + set params(value: dependency_3.ibc.applications.interchain_accounts.host.v1.Params) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_params() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + active_channels?: ReturnType[]; + interchain_accounts?: ReturnType[]; + port?: string; + params?: ReturnType; + }): HostGenesisState { + const message = new HostGenesisState({}); + if (data.active_channels != null) { + message.active_channels = data.active_channels.map(item => ActiveChannel.fromObject(item)); + } + if (data.interchain_accounts != null) { + message.interchain_accounts = data.interchain_accounts.map(item => RegisteredInterchainAccount.fromObject(item)); + } + if (data.port != null) { + message.port = data.port; + } + if (data.params != null) { + message.params = dependency_3.ibc.applications.interchain_accounts.host.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + active_channels?: ReturnType[]; + interchain_accounts?: ReturnType[]; + port?: string; + params?: ReturnType; + } = {}; + if (this.active_channels != null) { + data.active_channels = this.active_channels.map((item: ActiveChannel) => item.toObject()); + } + if (this.interchain_accounts != null) { + data.interchain_accounts = this.interchain_accounts.map((item: RegisteredInterchainAccount) => item.toObject()); + } + if (this.port != null) { + data.port = this.port; + } + 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.active_channels.length) + writer.writeRepeatedMessage(1, this.active_channels, (item: ActiveChannel) => item.serialize(writer)); + if (this.interchain_accounts.length) + writer.writeRepeatedMessage(2, this.interchain_accounts, (item: RegisteredInterchainAccount) => item.serialize(writer)); + if (this.port.length) + writer.writeString(3, this.port); + if (this.has_params) + writer.writeMessage(4, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HostGenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HostGenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.active_channels, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ActiveChannel.deserialize(reader), ActiveChannel)); + break; + case 2: + reader.readMessage(message.interchain_accounts, () => pb_1.Message.addToRepeatedWrapperField(message, 2, RegisteredInterchainAccount.deserialize(reader), RegisteredInterchainAccount)); + break; + case 3: + message.port = reader.readString(); + break; + case 4: + reader.readMessage(message.params, () => message.params = dependency_3.ibc.applications.interchain_accounts.host.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): HostGenesisState { + return HostGenesisState.deserialize(bytes); + } + } + export class ActiveChannel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + connection_id?: string; + port_id?: string; + channel_id?: string; + is_middleware_enabled?: boolean; + }) { + 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("is_middleware_enabled" in data && data.is_middleware_enabled != undefined) { + this.is_middleware_enabled = data.is_middleware_enabled; + } + } + } + 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 port_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get is_middleware_enabled() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set is_middleware_enabled(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + connection_id?: string; + port_id?: string; + channel_id?: string; + is_middleware_enabled?: boolean; + }): ActiveChannel { + const message = new ActiveChannel({}); + if (data.connection_id != null) { + message.connection_id = data.connection_id; + } + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.is_middleware_enabled != null) { + message.is_middleware_enabled = data.is_middleware_enabled; + } + return message; + } + toObject() { + const data: { + connection_id?: string; + port_id?: string; + channel_id?: string; + is_middleware_enabled?: boolean; + } = {}; + if (this.connection_id != null) { + data.connection_id = this.connection_id; + } + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.is_middleware_enabled != null) { + data.is_middleware_enabled = this.is_middleware_enabled; + } + 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.port_id.length) + writer.writeString(2, this.port_id); + if (this.channel_id.length) + writer.writeString(3, this.channel_id); + if (this.is_middleware_enabled != false) + writer.writeBool(4, this.is_middleware_enabled); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ActiveChannel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ActiveChannel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.connection_id = reader.readString(); + break; + case 2: + message.port_id = reader.readString(); + break; + case 3: + message.channel_id = reader.readString(); + break; + case 4: + message.is_middleware_enabled = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ActiveChannel { + return ActiveChannel.deserialize(bytes); + } + } + export class RegisteredInterchainAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + connection_id?: string; + port_id?: string; + account_address?: 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; + } + if ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("account_address" in data && data.account_address != undefined) { + this.account_address = data.account_address; + } + } + } + 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 port_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get account_address() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set account_address(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + connection_id?: string; + port_id?: string; + account_address?: string; + }): RegisteredInterchainAccount { + const message = new RegisteredInterchainAccount({}); + if (data.connection_id != null) { + message.connection_id = data.connection_id; + } + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.account_address != null) { + message.account_address = data.account_address; + } + return message; + } + toObject() { + const data: { + connection_id?: string; + port_id?: string; + account_address?: string; + } = {}; + if (this.connection_id != null) { + data.connection_id = this.connection_id; + } + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.account_address != null) { + data.account_address = this.account_address; + } + 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.port_id.length) + writer.writeString(2, this.port_id); + if (this.account_address.length) + writer.writeString(3, this.account_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RegisteredInterchainAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RegisteredInterchainAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.connection_id = reader.readString(); + break; + case 2: + message.port_id = reader.readString(); + break; + case 3: + message.account_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RegisteredInterchainAccount { + return RegisteredInterchainAccount.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb.d.ts b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb.d.ts new file mode 100644 index 0000000..7a78ac1 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb.d.ts @@ -0,0 +1,174 @@ +// package: ibc.applications.interchain_accounts.genesis.v1 +// file: ibc/applications/interchain_accounts/genesis/v1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../../gogoproto/gogo_pb"; +import * as ibc_applications_interchain_accounts_controller_v1_controller_pb from "../../../../../ibc/applications/interchain_accounts/controller/v1/controller_pb"; +import * as ibc_applications_interchain_accounts_host_v1_host_pb from "../../../../../ibc/applications/interchain_accounts/host/v1/host_pb"; + +export class GenesisState extends jspb.Message { + hasControllerGenesisState(): boolean; + clearControllerGenesisState(): void; + getControllerGenesisState(): ControllerGenesisState | undefined; + setControllerGenesisState(value?: ControllerGenesisState): void; + + hasHostGenesisState(): boolean; + clearHostGenesisState(): void; + getHostGenesisState(): HostGenesisState | undefined; + setHostGenesisState(value?: HostGenesisState): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + controllerGenesisState?: ControllerGenesisState.AsObject, + hostGenesisState?: HostGenesisState.AsObject, + } +} + +export class ControllerGenesisState extends jspb.Message { + clearActiveChannelsList(): void; + getActiveChannelsList(): Array; + setActiveChannelsList(value: Array): void; + addActiveChannels(value?: ActiveChannel, index?: number): ActiveChannel; + + clearInterchainAccountsList(): void; + getInterchainAccountsList(): Array; + setInterchainAccountsList(value: Array): void; + addInterchainAccounts(value?: RegisteredInterchainAccount, index?: number): RegisteredInterchainAccount; + + clearPortsList(): void; + getPortsList(): Array; + setPortsList(value: Array): void; + addPorts(value: string, index?: number): string; + + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_applications_interchain_accounts_controller_v1_controller_pb.Params | undefined; + setParams(value?: ibc_applications_interchain_accounts_controller_v1_controller_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ControllerGenesisState.AsObject; + static toObject(includeInstance: boolean, msg: ControllerGenesisState): ControllerGenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ControllerGenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ControllerGenesisState; + static deserializeBinaryFromReader(message: ControllerGenesisState, reader: jspb.BinaryReader): ControllerGenesisState; +} + +export namespace ControllerGenesisState { + export type AsObject = { + activeChannelsList: Array, + interchainAccountsList: Array, + portsList: Array, + params?: ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.AsObject, + } +} + +export class HostGenesisState extends jspb.Message { + clearActiveChannelsList(): void; + getActiveChannelsList(): Array; + setActiveChannelsList(value: Array): void; + addActiveChannels(value?: ActiveChannel, index?: number): ActiveChannel; + + clearInterchainAccountsList(): void; + getInterchainAccountsList(): Array; + setInterchainAccountsList(value: Array): void; + addInterchainAccounts(value?: RegisteredInterchainAccount, index?: number): RegisteredInterchainAccount; + + getPort(): string; + setPort(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_applications_interchain_accounts_host_v1_host_pb.Params | undefined; + setParams(value?: ibc_applications_interchain_accounts_host_v1_host_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HostGenesisState.AsObject; + static toObject(includeInstance: boolean, msg: HostGenesisState): HostGenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HostGenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HostGenesisState; + static deserializeBinaryFromReader(message: HostGenesisState, reader: jspb.BinaryReader): HostGenesisState; +} + +export namespace HostGenesisState { + export type AsObject = { + activeChannelsList: Array, + interchainAccountsList: Array, + port: string, + params?: ibc_applications_interchain_accounts_host_v1_host_pb.Params.AsObject, + } +} + +export class ActiveChannel extends jspb.Message { + getConnectionId(): string; + setConnectionId(value: string): void; + + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getIsMiddlewareEnabled(): boolean; + setIsMiddlewareEnabled(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ActiveChannel.AsObject; + static toObject(includeInstance: boolean, msg: ActiveChannel): ActiveChannel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ActiveChannel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ActiveChannel; + static deserializeBinaryFromReader(message: ActiveChannel, reader: jspb.BinaryReader): ActiveChannel; +} + +export namespace ActiveChannel { + export type AsObject = { + connectionId: string, + portId: string, + channelId: string, + isMiddlewareEnabled: boolean, + } +} + +export class RegisteredInterchainAccount extends jspb.Message { + getConnectionId(): string; + setConnectionId(value: string): void; + + getPortId(): string; + setPortId(value: string): void; + + getAccountAddress(): string; + setAccountAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegisteredInterchainAccount.AsObject; + static toObject(includeInstance: boolean, msg: RegisteredInterchainAccount): RegisteredInterchainAccount.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RegisteredInterchainAccount, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegisteredInterchainAccount; + static deserializeBinaryFromReader(message: RegisteredInterchainAccount, reader: jspb.BinaryReader): RegisteredInterchainAccount; +} + +export namespace RegisteredInterchainAccount { + export type AsObject = { + connectionId: string, + portId: string, + accountAddress: string, + } +} + diff --git a/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb.js b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb.js new file mode 100644 index 0000000..5ec7d04 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb.js @@ -0,0 +1,1353 @@ +// source: ibc/applications/interchain_accounts/genesis/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var ibc_applications_interchain_accounts_controller_v1_controller_pb = require('../../../../../ibc/applications/interchain_accounts/controller/v1/controller_pb.js'); +goog.object.extend(proto, ibc_applications_interchain_accounts_controller_v1_controller_pb); +var ibc_applications_interchain_accounts_host_v1_host_pb = require('../../../../../ibc/applications/interchain_accounts/host/v1/host_pb.js'); +goog.object.extend(proto, ibc_applications_interchain_accounts_host_v1_host_pb); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.displayName = 'proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.displayName = 'proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.displayName = 'proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.displayName = 'proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.displayName = 'proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + controllerGenesisState: (f = msg.getControllerGenesisState()) && proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.toObject(includeInstance, f), + hostGenesisState: (f = msg.getHostGenesisState()) && proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState; + return proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState; + reader.readMessage(value,proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.deserializeBinaryFromReader); + msg.setControllerGenesisState(value); + break; + case 2: + var value = new proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState; + reader.readMessage(value,proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.deserializeBinaryFromReader); + msg.setHostGenesisState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getControllerGenesisState(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.serializeBinaryToWriter + ); + } + f = message.getHostGenesisState(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ControllerGenesisState controller_genesis_state = 1; + * @return {?proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.getControllerGenesisState = function() { + return /** @type{?proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} */ ( + jspb.Message.getWrapperField(this, proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState, 1)); +}; + + +/** + * @param {?proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState} returns this +*/ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.setControllerGenesisState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.clearControllerGenesisState = function() { + return this.setControllerGenesisState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.hasControllerGenesisState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional HostGenesisState host_genesis_state = 2; + * @return {?proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.getHostGenesisState = function() { + return /** @type{?proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} */ ( + jspb.Message.getWrapperField(this, proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState, 2)); +}; + + +/** + * @param {?proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState} returns this +*/ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.setHostGenesisState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.clearHostGenesisState = function() { + return this.setHostGenesisState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.GenesisState.prototype.hasHostGenesisState = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.repeatedFields_ = [1,2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + activeChannelsList: jspb.Message.toObjectList(msg.getActiveChannelsList(), + proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.toObject, includeInstance), + interchainAccountsList: jspb.Message.toObjectList(msg.getInterchainAccountsList(), + proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.toObject, includeInstance), + portsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + params: (f = msg.getParams()) && ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState; + return proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel; + reader.readMessage(value,proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.deserializeBinaryFromReader); + msg.addActiveChannels(value); + break; + case 2: + var value = new proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount; + reader.readMessage(value,proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.deserializeBinaryFromReader); + msg.addInterchainAccounts(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addPorts(value); + break; + case 4: + var value = new ibc_applications_interchain_accounts_controller_v1_controller_pb.Params; + reader.readMessage(value,ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getActiveChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.serializeBinaryToWriter + ); + } + f = message.getInterchainAccountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.serializeBinaryToWriter + ); + } + f = message.getPortsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_applications_interchain_accounts_controller_v1_controller_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ActiveChannel active_channels = 1; + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.getActiveChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} returns this +*/ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.setActiveChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.addActiveChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.clearActiveChannelsList = function() { + return this.setActiveChannelsList([]); +}; + + +/** + * repeated RegisteredInterchainAccount interchain_accounts = 2; + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.getInterchainAccountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} returns this +*/ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.setInterchainAccountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.addInterchainAccounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.clearInterchainAccountsList = function() { + return this.setInterchainAccountsList([]); +}; + + +/** + * repeated string ports = 3; + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.getPortsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.setPortsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.addPorts = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.clearPortsList = function() { + return this.setPortsList([]); +}; + + +/** + * optional ibc.applications.interchain_accounts.controller.v1.Params params = 4; + * @return {?proto.ibc.applications.interchain_accounts.controller.v1.Params} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.interchain_accounts.controller.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_interchain_accounts_controller_v1_controller_pb.Params, 4)); +}; + + +/** + * @param {?proto.ibc.applications.interchain_accounts.controller.v1.Params|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} returns this +*/ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + activeChannelsList: jspb.Message.toObjectList(msg.getActiveChannelsList(), + proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.toObject, includeInstance), + interchainAccountsList: jspb.Message.toObjectList(msg.getInterchainAccountsList(), + proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.toObject, includeInstance), + port: jspb.Message.getFieldWithDefault(msg, 3, ""), + params: (f = msg.getParams()) && ibc_applications_interchain_accounts_host_v1_host_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState; + return proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel; + reader.readMessage(value,proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.deserializeBinaryFromReader); + msg.addActiveChannels(value); + break; + case 2: + var value = new proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount; + reader.readMessage(value,proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.deserializeBinaryFromReader); + msg.addInterchainAccounts(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPort(value); + break; + case 4: + var value = new ibc_applications_interchain_accounts_host_v1_host_pb.Params; + reader.readMessage(value,ibc_applications_interchain_accounts_host_v1_host_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getActiveChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.serializeBinaryToWriter + ); + } + f = message.getInterchainAccountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.serializeBinaryToWriter + ); + } + f = message.getPort(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_applications_interchain_accounts_host_v1_host_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ActiveChannel active_channels = 1; + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.getActiveChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} returns this +*/ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.setActiveChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.addActiveChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.clearActiveChannelsList = function() { + return this.setActiveChannelsList([]); +}; + + +/** + * repeated RegisteredInterchainAccount interchain_accounts = 2; + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.getInterchainAccountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} returns this +*/ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.setInterchainAccountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.addInterchainAccounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.clearInterchainAccountsList = function() { + return this.setInterchainAccountsList([]); +}; + + +/** + * optional string port = 3; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.getPort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.setPort = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional ibc.applications.interchain_accounts.host.v1.Params params = 4; + * @return {?proto.ibc.applications.interchain_accounts.host.v1.Params} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.interchain_accounts.host.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_interchain_accounts_host_v1_host_pb.Params, 4)); +}; + + +/** + * @param {?proto.ibc.applications.interchain_accounts.host.v1.Params|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} returns this +*/ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + portId: jspb.Message.getFieldWithDefault(msg, 2, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 3, ""), + isMiddlewareEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel; + return proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setConnectionId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsMiddlewareEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIsMiddlewareEnabled(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string port_id = 2; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string channel_id = 3; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool is_middleware_enabled = 4; + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.getIsMiddlewareEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.prototype.setIsMiddlewareEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + portId: jspb.Message.getFieldWithDefault(msg, 2, ""), + accountAddress: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount; + return proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setConnectionId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAccountAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAccountAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string port_id = 2; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string account_address = 3; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.prototype.getAccountAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} returns this + */ +proto.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.prototype.setAccountAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.genesis.v1); diff --git a/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb_service.d.ts new file mode 100644 index 0000000..193ec23 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.genesis.v1 +// file: ibc/applications/interchain_accounts/genesis/v1/genesis.proto + diff --git a/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb_service.js b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb_service.js new file mode 100644 index 0000000..193ec23 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.genesis.v1 +// file: ibc/applications/interchain_accounts/genesis/v1/genesis.proto + diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/host.ts b/codegen/ibc/applications/interchain_accounts/host/v1/host.ts new file mode 100644 index 0000000..2f00b20 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/host.ts @@ -0,0 +1,188 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/host/v1/host.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.interchain_accounts.host.v1 { + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + host_enabled?: boolean; + allow_messages?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("host_enabled" in data && data.host_enabled != undefined) { + this.host_enabled = data.host_enabled; + } + if ("allow_messages" in data && data.allow_messages != undefined) { + this.allow_messages = data.allow_messages; + } + } + } + get host_enabled() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set host_enabled(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + get allow_messages() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set allow_messages(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + host_enabled?: boolean; + allow_messages?: string[]; + }): Params { + const message = new Params({}); + if (data.host_enabled != null) { + message.host_enabled = data.host_enabled; + } + if (data.allow_messages != null) { + message.allow_messages = data.allow_messages; + } + return message; + } + toObject() { + const data: { + host_enabled?: boolean; + allow_messages?: string[]; + } = {}; + if (this.host_enabled != null) { + data.host_enabled = this.host_enabled; + } + if (this.allow_messages != null) { + data.allow_messages = this.allow_messages; + } + 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.host_enabled != false) + writer.writeBool(1, this.host_enabled); + if (this.allow_messages.length) + writer.writeRepeatedString(2, this.allow_messages); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.host_enabled = reader.readBool(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } + export class QueryRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: string; + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set path(value: string) { + pb_1.Message.setField(this, 1, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + path?: string; + data?: Uint8Array; + }): QueryRequest { + const message = new QueryRequest({}); + if (data.path != null) { + message.path = data.path; + } + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + path?: string; + data?: Uint8Array; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.data != null) { + data.data = this.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 (this.path.length) + writer.writeString(1, this.path); + if (this.data.length) + writer.writeBytes(2, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readString(); + break; + case 2: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryRequest { + return QueryRequest.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/host_pb.d.ts b/codegen/ibc/applications/interchain_accounts/host/v1/host_pb.d.ts new file mode 100644 index 0000000..a413d36 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/host_pb.d.ts @@ -0,0 +1,57 @@ +// package: ibc.applications.interchain_accounts.host.v1 +// file: ibc/applications/interchain_accounts/host/v1/host.proto + +import * as jspb from "google-protobuf"; + +export class Params extends jspb.Message { + getHostEnabled(): boolean; + setHostEnabled(value: boolean): void; + + clearAllowMessagesList(): void; + getAllowMessagesList(): Array; + setAllowMessagesList(value: Array): void; + addAllowMessages(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + hostEnabled: boolean, + allowMessagesList: Array, + } +} + +export class QueryRequest extends jspb.Message { + getPath(): string; + setPath(value: string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequest): QueryRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequest; + static deserializeBinaryFromReader(message: QueryRequest, reader: jspb.BinaryReader): QueryRequest; +} + +export namespace QueryRequest { + export type AsObject = { + path: string, + data: Uint8Array | string, + } +} + diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/host_pb.js b/codegen/ibc/applications/interchain_accounts/host/v1/host_pb.js new file mode 100644 index 0000000..87e286c --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/host_pb.js @@ -0,0 +1,432 @@ +// source: ibc/applications/interchain_accounts/host/v1/host.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.ibc.applications.interchain_accounts.host.v1.Params', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.host.v1.QueryRequest', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.host.v1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.interchain_accounts.host.v1.Params.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.host.v1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.host.v1.Params.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.Params'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.host.v1.QueryRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.QueryRequest'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.host.v1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.host.v1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + hostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + allowMessagesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.Params} + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.host.v1.Params; + return proto.ibc.applications.interchain_accounts.host.v1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.Params} + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHostEnabled(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addAllowMessages(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.host.v1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHostEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getAllowMessagesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional bool host_enabled = 1; + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.prototype.getHostEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.Params} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.prototype.setHostEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * repeated string allow_messages = 2; + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.prototype.getAllowMessagesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.Params} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.prototype.setAllowMessagesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.applications.interchain_accounts.host.v1.Params} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.prototype.addAllowMessages = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.Params} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.Params.prototype.clearAllowMessagesList = function() { + return this.setAllowMessagesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.toObject = function(includeInstance, msg) { + var f, obj = { + path: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.host.v1.QueryRequest; + return proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string path = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.host.v1); diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/host_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/host/v1/host_pb_service.d.ts new file mode 100644 index 0000000..181fdca --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/host_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.host.v1 +// file: ibc/applications/interchain_accounts/host/v1/host.proto + diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/host_pb_service.js b/codegen/ibc/applications/interchain_accounts/host/v1/host_pb_service.js new file mode 100644 index 0000000..181fdca --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/host_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.host.v1 +// file: ibc/applications/interchain_accounts/host/v1/host.proto + diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/query.ts b/codegen/ibc/applications/interchain_accounts/host/v1/query.ts new file mode 100644 index 0000000..59b570f --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/query.ts @@ -0,0 +1,168 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/host/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../../google/api/annotations"; +import * as dependency_2 from "./host"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.applications.interchain_accounts.host.v1 { + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_2.ibc.applications.interchain_accounts.host.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_2.ibc.applications.interchain_accounts.host.v1.Params, 1) as dependency_2.ibc.applications.interchain_accounts.host.v1.Params; + } + set params(value: dependency_2.ibc.applications.interchain_accounts.host.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; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_2.ibc.applications.interchain_accounts.host.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_2.ibc.applications.interchain_accounts.host.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Params: { + path: "/ibc.applications.interchain_accounts.host.v1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + } +} diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/query_pb.d.ts b/codegen/ibc/applications/interchain_accounts/host/v1/query_pb.d.ts new file mode 100644 index 0000000..2f305af --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/query_pb.d.ts @@ -0,0 +1,45 @@ +// package: ibc.applications.interchain_accounts.host.v1 +// file: ibc/applications/interchain_accounts/host/v1/query.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../../../google/api/annotations_pb"; +import * as ibc_applications_interchain_accounts_host_v1_host_pb from "../../../../../ibc/applications/interchain_accounts/host/v1/host_pb"; + +export class QueryParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; + static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; +} + +export namespace QueryParamsRequest { + export type AsObject = { + } +} + +export class QueryParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_applications_interchain_accounts_host_v1_host_pb.Params | undefined; + setParams(value?: ibc_applications_interchain_accounts_host_v1_host_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; + static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; +} + +export namespace QueryParamsResponse { + export type AsObject = { + params?: ibc_applications_interchain_accounts_host_v1_host_pb.Params.AsObject, + } +} + diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/query_pb.js b/codegen/ibc/applications/interchain_accounts/host/v1/query_pb.js new file mode 100644 index 0000000..3c4e4e2 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/query_pb.js @@ -0,0 +1,318 @@ +// source: ibc/applications/interchain_accounts/host/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var ibc_applications_interchain_accounts_host_v1_host_pb = require('../../../../../ibc/applications/interchain_accounts/host/v1/host_pb.js'); +goog.object.extend(proto, ibc_applications_interchain_accounts_host_v1_host_pb); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest; + return proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && ibc_applications_interchain_accounts_host_v1_host_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse; + return proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_interchain_accounts_host_v1_host_pb.Params; + reader.readMessage(value,ibc_applications_interchain_accounts_host_v1_host_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_applications_interchain_accounts_host_v1_host_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.ibc.applications.interchain_accounts.host.v1.Params} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.interchain_accounts.host.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_interchain_accounts_host_v1_host_pb.Params, 1)); +}; + + +/** + * @param {?proto.ibc.applications.interchain_accounts.host.v1.Params|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} returns this +*/ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.host.v1); diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/query_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/host/v1/query_pb_service.d.ts new file mode 100644 index 0000000..8f7d57f --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/query_pb_service.d.ts @@ -0,0 +1,63 @@ +// package: ibc.applications.interchain_accounts.host.v1 +// file: ibc/applications/interchain_accounts/host/v1/query.proto + +import * as ibc_applications_interchain_accounts_host_v1_query_pb from "../../../../../ibc/applications/interchain_accounts/host/v1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_interchain_accounts_host_v1_query_pb.QueryParamsRequest; + readonly responseType: typeof ibc_applications_interchain_accounts_host_v1_query_pb.QueryParamsResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly Params: QueryParams; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + params( + requestMessage: ibc_applications_interchain_accounts_host_v1_query_pb.QueryParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_host_v1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; + params( + requestMessage: ibc_applications_interchain_accounts_host_v1_query_pb.QueryParamsRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_host_v1_query_pb.QueryParamsResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/query_pb_service.js b/codegen/ibc/applications/interchain_accounts/host/v1/query_pb_service.js new file mode 100644 index 0000000..55bc537 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/query_pb_service.js @@ -0,0 +1,61 @@ +// package: ibc.applications.interchain_accounts.host.v1 +// file: ibc/applications/interchain_accounts/host/v1/query.proto + +var ibc_applications_interchain_accounts_host_v1_query_pb = require("../../../../../ibc/applications/interchain_accounts/host/v1/query_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Query = (function () { + function Query() {} + Query.serviceName = "ibc.applications.interchain_accounts.host.v1.Query"; + return Query; +}()); + +Query.Params = { + methodName: "Params", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_applications_interchain_accounts_host_v1_query_pb.QueryParamsRequest, + responseType: ibc_applications_interchain_accounts_host_v1_query_pb.QueryParamsResponse +}; + +exports.Query = Query; + +function QueryClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Params, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.QueryClient = QueryClient; + diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/tx.ts b/codegen/ibc/applications/interchain_accounts/host/v1/tx.ts new file mode 100644 index 0000000..dc3eca6 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/tx.ts @@ -0,0 +1,385 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/host/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../../cosmos/msg/v1/msg"; +import * as dependency_3 from "./host"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.applications.interchain_accounts.host.v1 { + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer?: string; + params?: dependency_3.ibc.applications.interchain_accounts.host.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 ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.applications.interchain_accounts.host.v1.Params, 2) as dependency_3.ibc.applications.interchain_accounts.host.v1.Params; + } + set params(value: dependency_3.ibc.applications.interchain_accounts.host.v1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + signer?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.signer != null) { + message.signer = data.signer; + } + if (data.params != null) { + message.params = dependency_3.ibc.applications.interchain_accounts.host.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + signer?: string; + params?: ReturnType; + } = {}; + if (this.signer != null) { + data.signer = this.signer; + } + 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.signer.length) + writer.writeString(1, this.signer); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signer = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_3.ibc.applications.interchain_accounts.host.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + export class MsgModuleQuerySafe extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer?: string; + requests?: dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("requests" in data && data.requests != undefined) { + this.requests = data.requests; + } + } + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 1, value); + } + get requests() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest, 2) as dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest[]; + } + set requests(value: dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + signer?: string; + requests?: ReturnType[]; + }): MsgModuleQuerySafe { + const message = new MsgModuleQuerySafe({}); + if (data.signer != null) { + message.signer = data.signer; + } + if (data.requests != null) { + message.requests = data.requests.map(item => dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest.fromObject(item)); + } + return message; + } + toObject() { + const data: { + signer?: string; + requests?: ReturnType[]; + } = {}; + if (this.signer != null) { + data.signer = this.signer; + } + if (this.requests != null) { + data.requests = this.requests.map((item: dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest) => item.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.signer.length) + writer.writeString(1, this.signer); + if (this.requests.length) + writer.writeRepeatedMessage(2, this.requests, (item: dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgModuleQuerySafe { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgModuleQuerySafe(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signer = reader.readString(); + break; + case 2: + reader.readMessage(message.requests, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest.deserialize(reader), dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgModuleQuerySafe { + return MsgModuleQuerySafe.deserialize(bytes); + } + } + export class MsgModuleQuerySafeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + responses?: Uint8Array[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("responses" in data && data.responses != undefined) { + this.responses = data.responses; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get responses() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as Uint8Array[]; + } + set responses(value: Uint8Array[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + height?: number; + responses?: Uint8Array[]; + }): MsgModuleQuerySafeResponse { + const message = new MsgModuleQuerySafeResponse({}); + if (data.height != null) { + message.height = data.height; + } + if (data.responses != null) { + message.responses = data.responses; + } + return message; + } + toObject() { + const data: { + height?: number; + responses?: Uint8Array[]; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.responses != null) { + data.responses = this.responses; + } + 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.height != 0) + writer.writeUint64(1, this.height); + if (this.responses.length) + writer.writeRepeatedBytes(2, this.responses); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgModuleQuerySafeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgModuleQuerySafeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readUint64(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgModuleQuerySafeResponse { + return MsgModuleQuerySafeResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + UpdateParams: { + path: "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + }, + ModuleQuerySafe: { + path: "/ibc.applications.interchain_accounts.host.v1.Msg/ModuleQuerySafe", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgModuleQuerySafe) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgModuleQuerySafe.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgModuleQuerySafeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgModuleQuerySafeResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ModuleQuerySafe(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + ModuleQuerySafe: GrpcUnaryServiceInterface = (message: MsgModuleQuerySafe, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ModuleQuerySafe(message, metadata, options, callback); + }; + } +} diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb.d.ts b/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb.d.ts new file mode 100644 index 0000000..c8a9884 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb.d.ts @@ -0,0 +1,104 @@ +// package: ibc.applications.interchain_accounts.host.v1 +// file: ibc/applications/interchain_accounts/host/v1/tx.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../../gogoproto/gogo_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../../../cosmos/msg/v1/msg_pb"; +import * as ibc_applications_interchain_accounts_host_v1_host_pb from "../../../../../ibc/applications/interchain_accounts/host/v1/host_pb"; + +export class MsgUpdateParams extends jspb.Message { + getSigner(): string; + setSigner(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_applications_interchain_accounts_host_v1_host_pb.Params | undefined; + setParams(value?: ibc_applications_interchain_accounts_host_v1_host_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + signer: string, + params?: ibc_applications_interchain_accounts_host_v1_host_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + +export class MsgModuleQuerySafe extends jspb.Message { + getSigner(): string; + setSigner(value: string): void; + + clearRequestsList(): void; + getRequestsList(): Array; + setRequestsList(value: Array): void; + addRequests(value?: ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest, index?: number): ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgModuleQuerySafe.AsObject; + static toObject(includeInstance: boolean, msg: MsgModuleQuerySafe): MsgModuleQuerySafe.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgModuleQuerySafe, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgModuleQuerySafe; + static deserializeBinaryFromReader(message: MsgModuleQuerySafe, reader: jspb.BinaryReader): MsgModuleQuerySafe; +} + +export namespace MsgModuleQuerySafe { + export type AsObject = { + signer: string, + requestsList: Array, + } +} + +export class MsgModuleQuerySafeResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + clearResponsesList(): void; + getResponsesList(): Array; + getResponsesList_asU8(): Array; + getResponsesList_asB64(): Array; + setResponsesList(value: Array): void; + addResponses(value: Uint8Array | string, index?: number): Uint8Array | string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgModuleQuerySafeResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgModuleQuerySafeResponse): MsgModuleQuerySafeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgModuleQuerySafeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgModuleQuerySafeResponse; + static deserializeBinaryFromReader(message: MsgModuleQuerySafeResponse, reader: jspb.BinaryReader): MsgModuleQuerySafeResponse; +} + +export namespace MsgModuleQuerySafeResponse { + export type AsObject = { + height: number, + responsesList: Array, + } +} + diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb.js b/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb.js new file mode 100644 index 0000000..92c451f --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb.js @@ -0,0 +1,794 @@ +// source: ibc/applications/interchain_accounts/host/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_msg_v1_msg_pb = require('../../../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var ibc_applications_interchain_accounts_host_v1_host_pb = require('../../../../../ibc/applications/interchain_accounts/host/v1/host_pb.js'); +goog.object.extend(proto, ibc_applications_interchain_accounts_host_v1_host_pb); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.displayName = 'proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + signer: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && ibc_applications_interchain_accounts_host_v1_host_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams; + return proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 2: + var value = new ibc_applications_interchain_accounts_host_v1_host_pb.Params; + reader.readMessage(value,ibc_applications_interchain_accounts_host_v1_host_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_applications_interchain_accounts_host_v1_host_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string signer = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Params params = 2; + * @return {?proto.ibc.applications.interchain_accounts.host.v1.Params} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.interchain_accounts.host.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_interchain_accounts_host_v1_host_pb.Params, 2)); +}; + + +/** + * @param {?proto.ibc.applications.interchain_accounts.host.v1.Params|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} returns this +*/ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse; + return proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.toObject = function(includeInstance, msg) { + var f, obj = { + signer: jspb.Message.getFieldWithDefault(msg, 1, ""), + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe; + return proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 2: + var value = new ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest; + reader.readMessage(value,ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest.deserializeBinaryFromReader); + msg.addRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string signer = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated QueryRequest requests = 2; + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_applications_interchain_accounts_host_v1_host_pb.QueryRequest, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} returns this +*/ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.interchain_accounts.host.v1.QueryRequest} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.applications.interchain_accounts.host.v1.QueryRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + responsesList: msg.getResponsesList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse; + return proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addResponses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getResponsesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated bytes responses = 2; + * @return {!(Array|Array)} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.getResponsesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes responses = 2; + * This is a type-conversion wrapper around `getResponsesList()` + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.getResponsesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getResponsesList())); +}; + + +/** + * repeated bytes responses = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResponsesList()` + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.getResponsesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getResponsesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.setResponsesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.addResponses = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse} returns this + */ +proto.ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse.prototype.clearResponsesList = function() { + return this.setResponsesList([]); +}; + + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.host.v1); diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb_service.d.ts new file mode 100644 index 0000000..d8ff878 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb_service.d.ts @@ -0,0 +1,82 @@ +// package: ibc.applications.interchain_accounts.host.v1 +// file: ibc/applications/interchain_accounts/host/v1/tx.proto + +import * as ibc_applications_interchain_accounts_host_v1_tx_pb from "../../../../../ibc/applications/interchain_accounts/host/v1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgUpdateParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_interchain_accounts_host_v1_tx_pb.MsgUpdateParams; + readonly responseType: typeof ibc_applications_interchain_accounts_host_v1_tx_pb.MsgUpdateParamsResponse; +}; + +type MsgModuleQuerySafe = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_interchain_accounts_host_v1_tx_pb.MsgModuleQuerySafe; + readonly responseType: typeof ibc_applications_interchain_accounts_host_v1_tx_pb.MsgModuleQuerySafeResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly UpdateParams: MsgUpdateParams; + static readonly ModuleQuerySafe: MsgModuleQuerySafe; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + updateParams( + requestMessage: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + moduleQuerySafe( + requestMessage: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgModuleQuerySafe, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgModuleQuerySafeResponse|null) => void + ): UnaryResponse; + moduleQuerySafe( + requestMessage: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgModuleQuerySafe, + callback: (error: ServiceError|null, responseMessage: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgModuleQuerySafeResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb_service.js b/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb_service.js new file mode 100644 index 0000000..239fb62 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/host/v1/tx_pb_service.js @@ -0,0 +1,101 @@ +// package: ibc.applications.interchain_accounts.host.v1 +// file: ibc/applications/interchain_accounts/host/v1/tx.proto + +var ibc_applications_interchain_accounts_host_v1_tx_pb = require("../../../../../ibc/applications/interchain_accounts/host/v1/tx_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Msg = (function () { + function Msg() {} + Msg.serviceName = "ibc.applications.interchain_accounts.host.v1.Msg"; + return Msg; +}()); + +Msg.UpdateParams = { + methodName: "UpdateParams", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgUpdateParams, + responseType: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgUpdateParamsResponse +}; + +Msg.ModuleQuerySafe = { + methodName: "ModuleQuerySafe", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgModuleQuerySafe, + responseType: ibc_applications_interchain_accounts_host_v1_tx_pb.MsgModuleQuerySafeResponse +}; + +exports.Msg = Msg; + +function MsgClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MsgClient.prototype.updateParams = function updateParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.moduleQuerySafe = function moduleQuerySafe(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ModuleQuerySafe, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MsgClient = MsgClient; + diff --git a/codegen/ibc/applications/interchain_accounts/v1/account.ts b/codegen/ibc/applications/interchain_accounts/v1/account.ts new file mode 100644 index 0000000..81b587f --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/account.ts @@ -0,0 +1,104 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/v1/account.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../cosmos_proto/cosmos"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../../cosmos/auth/v1beta1/auth"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.interchain_accounts.v1 { + export class InterchainAccount extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + base_account?: dependency_3.cosmos.auth.v1beta1.BaseAccount; + account_owner?: 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 ("base_account" in data && data.base_account != undefined) { + this.base_account = data.base_account; + } + if ("account_owner" in data && data.account_owner != undefined) { + this.account_owner = data.account_owner; + } + } + } + get base_account() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.auth.v1beta1.BaseAccount, 1) as dependency_3.cosmos.auth.v1beta1.BaseAccount; + } + set base_account(value: dependency_3.cosmos.auth.v1beta1.BaseAccount) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_base_account() { + return pb_1.Message.getField(this, 1) != null; + } + get account_owner() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set account_owner(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + base_account?: ReturnType; + account_owner?: string; + }): InterchainAccount { + const message = new InterchainAccount({}); + if (data.base_account != null) { + message.base_account = dependency_3.cosmos.auth.v1beta1.BaseAccount.fromObject(data.base_account); + } + if (data.account_owner != null) { + message.account_owner = data.account_owner; + } + return message; + } + toObject() { + const data: { + base_account?: ReturnType; + account_owner?: string; + } = {}; + if (this.base_account != null) { + data.base_account = this.base_account.toObject(); + } + if (this.account_owner != null) { + data.account_owner = this.account_owner; + } + 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_base_account) + writer.writeMessage(1, this.base_account, () => this.base_account.serialize(writer)); + if (this.account_owner.length) + writer.writeString(2, this.account_owner); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InterchainAccount { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InterchainAccount(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.base_account, () => message.base_account = dependency_3.cosmos.auth.v1beta1.BaseAccount.deserialize(reader)); + break; + case 2: + message.account_owner = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InterchainAccount { + return InterchainAccount.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/interchain_accounts/v1/account_pb.d.ts b/codegen/ibc/applications/interchain_accounts/v1/account_pb.d.ts new file mode 100644 index 0000000..3c95a88 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/account_pb.d.ts @@ -0,0 +1,34 @@ +// package: ibc.applications.interchain_accounts.v1 +// file: ibc/applications/interchain_accounts/v1/account.proto + +import * as jspb from "google-protobuf"; +import * as cosmos_proto_cosmos_pb from "../../../../cosmos_proto/cosmos_pb"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as cosmos_auth_v1beta1_auth_pb from "../../../../cosmos/auth/v1beta1/auth_pb"; + +export class InterchainAccount extends jspb.Message { + hasBaseAccount(): boolean; + clearBaseAccount(): void; + getBaseAccount(): cosmos_auth_v1beta1_auth_pb.BaseAccount | undefined; + setBaseAccount(value?: cosmos_auth_v1beta1_auth_pb.BaseAccount): void; + + getAccountOwner(): string; + setAccountOwner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InterchainAccount.AsObject; + static toObject(includeInstance: boolean, msg: InterchainAccount): InterchainAccount.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InterchainAccount, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InterchainAccount; + static deserializeBinaryFromReader(message: InterchainAccount, reader: jspb.BinaryReader): InterchainAccount; +} + +export namespace InterchainAccount { + export type AsObject = { + baseAccount?: cosmos_auth_v1beta1_auth_pb.BaseAccount.AsObject, + accountOwner: string, + } +} + diff --git a/codegen/ibc/applications/interchain_accounts/v1/account_pb.js b/codegen/ibc/applications/interchain_accounts/v1/account_pb.js new file mode 100644 index 0000000..38eaf68 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/account_pb.js @@ -0,0 +1,227 @@ +// source: ibc/applications/interchain_accounts/v1/account.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var cosmos_proto_cosmos_pb = require('../../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_auth_v1beta1_auth_pb = require('../../../../cosmos/auth/v1beta1/auth_pb.js'); +goog.object.extend(proto, cosmos_auth_v1beta1_auth_pb); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.v1.InterchainAccount', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.v1.InterchainAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.v1.InterchainAccount.displayName = 'proto.ibc.applications.interchain_accounts.v1.InterchainAccount'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.v1.InterchainAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.v1.InterchainAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseAccount: (f = msg.getBaseAccount()) && cosmos_auth_v1beta1_auth_pb.BaseAccount.toObject(includeInstance, f), + accountOwner: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccount} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.v1.InterchainAccount; + return proto.ibc.applications.interchain_accounts.v1.InterchainAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.v1.InterchainAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccount} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_auth_v1beta1_auth_pb.BaseAccount; + reader.readMessage(value,cosmos_auth_v1beta1_auth_pb.BaseAccount.deserializeBinaryFromReader); + msg.setBaseAccount(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAccountOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.v1.InterchainAccount.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.v1.InterchainAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_auth_v1beta1_auth_pb.BaseAccount.serializeBinaryToWriter + ); + } + f = message.getAccountOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional cosmos.auth.v1beta1.BaseAccount base_account = 1; + * @return {?proto.cosmos.auth.v1beta1.BaseAccount} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.prototype.getBaseAccount = function() { + return /** @type{?proto.cosmos.auth.v1beta1.BaseAccount} */ ( + jspb.Message.getWrapperField(this, cosmos_auth_v1beta1_auth_pb.BaseAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.auth.v1beta1.BaseAccount|undefined} value + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccount} returns this +*/ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.prototype.setBaseAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccount} returns this + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.prototype.clearBaseAccount = function() { + return this.setBaseAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.prototype.hasBaseAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string account_owner = 2; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.prototype.getAccountOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccount} returns this + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccount.prototype.setAccountOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.v1); diff --git a/codegen/ibc/applications/interchain_accounts/v1/account_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/v1/account_pb_service.d.ts new file mode 100644 index 0000000..bcc4332 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/account_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.v1 +// file: ibc/applications/interchain_accounts/v1/account.proto + diff --git a/codegen/ibc/applications/interchain_accounts/v1/account_pb_service.js b/codegen/ibc/applications/interchain_accounts/v1/account_pb_service.js new file mode 100644 index 0000000..bcc4332 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/account_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.v1 +// file: ibc/applications/interchain_accounts/v1/account.proto + diff --git a/codegen/ibc/applications/interchain_accounts/v1/metadata.ts b/codegen/ibc/applications/interchain_accounts/v1/metadata.ts new file mode 100644 index 0000000..168bc36 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/metadata.ts @@ -0,0 +1,190 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/v1/metadata.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.interchain_accounts.v1 { + export class Metadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + version?: string; + controller_connection_id?: string; + host_connection_id?: string; + address?: string; + encoding?: string; + tx_type?: 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 ("controller_connection_id" in data && data.controller_connection_id != undefined) { + this.controller_connection_id = data.controller_connection_id; + } + if ("host_connection_id" in data && data.host_connection_id != undefined) { + this.host_connection_id = data.host_connection_id; + } + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("encoding" in data && data.encoding != undefined) { + this.encoding = data.encoding; + } + if ("tx_type" in data && data.tx_type != undefined) { + this.tx_type = data.tx_type; + } + } + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 1, value); + } + get controller_connection_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set controller_connection_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get host_connection_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set host_connection_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 4, value); + } + get encoding() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set encoding(value: string) { + pb_1.Message.setField(this, 5, value); + } + get tx_type() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set tx_type(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + version?: string; + controller_connection_id?: string; + host_connection_id?: string; + address?: string; + encoding?: string; + tx_type?: string; + }): Metadata { + const message = new Metadata({}); + if (data.version != null) { + message.version = data.version; + } + if (data.controller_connection_id != null) { + message.controller_connection_id = data.controller_connection_id; + } + if (data.host_connection_id != null) { + message.host_connection_id = data.host_connection_id; + } + if (data.address != null) { + message.address = data.address; + } + if (data.encoding != null) { + message.encoding = data.encoding; + } + if (data.tx_type != null) { + message.tx_type = data.tx_type; + } + return message; + } + toObject() { + const data: { + version?: string; + controller_connection_id?: string; + host_connection_id?: string; + address?: string; + encoding?: string; + tx_type?: string; + } = {}; + if (this.version != null) { + data.version = this.version; + } + if (this.controller_connection_id != null) { + data.controller_connection_id = this.controller_connection_id; + } + if (this.host_connection_id != null) { + data.host_connection_id = this.host_connection_id; + } + if (this.address != null) { + data.address = this.address; + } + if (this.encoding != null) { + data.encoding = this.encoding; + } + if (this.tx_type != null) { + data.tx_type = this.tx_type; + } + 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.controller_connection_id.length) + writer.writeString(2, this.controller_connection_id); + if (this.host_connection_id.length) + writer.writeString(3, this.host_connection_id); + if (this.address.length) + writer.writeString(4, this.address); + if (this.encoding.length) + writer.writeString(5, this.encoding); + if (this.tx_type.length) + writer.writeString(6, this.tx_type); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Metadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Metadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.version = reader.readString(); + break; + case 2: + message.controller_connection_id = reader.readString(); + break; + case 3: + message.host_connection_id = reader.readString(); + break; + case 4: + message.address = reader.readString(); + break; + case 5: + message.encoding = reader.readString(); + break; + case 6: + message.tx_type = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Metadata { + return Metadata.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/interchain_accounts/v1/metadata_pb.d.ts b/codegen/ibc/applications/interchain_accounts/v1/metadata_pb.d.ts new file mode 100644 index 0000000..548b928 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/metadata_pb.d.ts @@ -0,0 +1,45 @@ +// package: ibc.applications.interchain_accounts.v1 +// file: ibc/applications/interchain_accounts/v1/metadata.proto + +import * as jspb from "google-protobuf"; + +export class Metadata extends jspb.Message { + getVersion(): string; + setVersion(value: string): void; + + getControllerConnectionId(): string; + setControllerConnectionId(value: string): void; + + getHostConnectionId(): string; + setHostConnectionId(value: string): void; + + getAddress(): string; + setAddress(value: string): void; + + getEncoding(): string; + setEncoding(value: string): void; + + getTxType(): string; + setTxType(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Metadata.AsObject; + static toObject(includeInstance: boolean, msg: Metadata): Metadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Metadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Metadata; + static deserializeBinaryFromReader(message: Metadata, reader: jspb.BinaryReader): Metadata; +} + +export namespace Metadata { + export type AsObject = { + version: string, + controllerConnectionId: string, + hostConnectionId: string, + address: string, + encoding: string, + txType: string, + } +} + diff --git a/codegen/ibc/applications/interchain_accounts/v1/metadata_pb.js b/codegen/ibc/applications/interchain_accounts/v1/metadata_pb.js new file mode 100644 index 0000000..c6a78fb --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/metadata_pb.js @@ -0,0 +1,320 @@ +// source: ibc/applications/interchain_accounts/v1/metadata.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.ibc.applications.interchain_accounts.v1.Metadata', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.v1.Metadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.v1.Metadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.v1.Metadata.displayName = 'proto.ibc.applications.interchain_accounts.v1.Metadata'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.v1.Metadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.v1.Metadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, ""), + controllerConnectionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + hostConnectionId: jspb.Message.getFieldWithDefault(msg, 3, ""), + address: jspb.Message.getFieldWithDefault(msg, 4, ""), + encoding: jspb.Message.getFieldWithDefault(msg, 5, ""), + txType: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.v1.Metadata} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.v1.Metadata; + return proto.ibc.applications.interchain_accounts.v1.Metadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.v1.Metadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.v1.Metadata} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setControllerConnectionId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setHostConnectionId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setEncoding(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setTxType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.v1.Metadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.v1.Metadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getControllerConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHostConnectionId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getEncoding(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getTxType(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string version = 1; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.v1.Metadata} returns this + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string controller_connection_id = 2; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.getControllerConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.v1.Metadata} returns this + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.setControllerConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string host_connection_id = 3; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.getHostConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.v1.Metadata} returns this + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.setHostConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string address = 4; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.v1.Metadata} returns this + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string encoding = 5; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.getEncoding = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.v1.Metadata} returns this + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.setEncoding = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string tx_type = 6; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.getTxType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.v1.Metadata} returns this + */ +proto.ibc.applications.interchain_accounts.v1.Metadata.prototype.setTxType = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.v1); diff --git a/codegen/ibc/applications/interchain_accounts/v1/metadata_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/v1/metadata_pb_service.d.ts new file mode 100644 index 0000000..2a36a4a --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/metadata_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.v1 +// file: ibc/applications/interchain_accounts/v1/metadata.proto + diff --git a/codegen/ibc/applications/interchain_accounts/v1/metadata_pb_service.js b/codegen/ibc/applications/interchain_accounts/v1/metadata_pb_service.js new file mode 100644 index 0000000..2a36a4a --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/metadata_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.v1 +// file: ibc/applications/interchain_accounts/v1/metadata.proto + diff --git a/codegen/ibc/applications/interchain_accounts/v1/packet.ts b/codegen/ibc/applications/interchain_accounts/v1/packet.ts new file mode 100644 index 0000000..62b61a4 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/packet.ts @@ -0,0 +1,194 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/interchain_accounts/v1/packet.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../google/protobuf/any"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.interchain_accounts.v1 { + export enum Type { + TYPE_UNSPECIFIED = 0, + TYPE_EXECUTE_TX = 1 + } + export class InterchainAccountPacketData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type?: Type; + data?: Uint8Array; + memo?: 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 ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("memo" in data && data.memo != undefined) { + this.memo = data.memo; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, Type.TYPE_UNSPECIFIED) as Type; + } + set type(value: Type) { + pb_1.Message.setField(this, 1, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get memo() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set memo(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + type?: Type; + data?: Uint8Array; + memo?: string; + }): InterchainAccountPacketData { + const message = new InterchainAccountPacketData({}); + if (data.type != null) { + message.type = data.type; + } + if (data.data != null) { + message.data = data.data; + } + if (data.memo != null) { + message.memo = data.memo; + } + return message; + } + toObject() { + const data: { + type?: Type; + data?: Uint8Array; + memo?: string; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.data != null) { + data.data = this.data; + } + if (this.memo != null) { + data.memo = this.memo; + } + 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.type != Type.TYPE_UNSPECIFIED) + writer.writeEnum(1, this.type); + if (this.data.length) + writer.writeBytes(2, this.data); + if (this.memo.length) + writer.writeString(3, this.memo); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InterchainAccountPacketData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InterchainAccountPacketData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readEnum(); + break; + case 2: + message.data = reader.readBytes(); + break; + case 3: + message.memo = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InterchainAccountPacketData { + return InterchainAccountPacketData.deserialize(bytes); + } + } + export class CosmosTx extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + messages?: dependency_1.google.protobuf.Any[]; + }) { + 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 ("messages" in data && data.messages != undefined) { + this.messages = data.messages; + } + } + } + get messages() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 1) as dependency_1.google.protobuf.Any[]; + } + set messages(value: dependency_1.google.protobuf.Any[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + messages?: ReturnType[]; + }): CosmosTx { + const message = new CosmosTx({}); + if (data.messages != null) { + message.messages = data.messages.map(item => dependency_1.google.protobuf.Any.fromObject(item)); + } + return message; + } + toObject() { + const data: { + messages?: ReturnType[]; + } = {}; + if (this.messages != null) { + data.messages = this.messages.map((item: dependency_1.google.protobuf.Any) => item.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.messages.length) + writer.writeRepeatedMessage(1, this.messages, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CosmosTx { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CosmosTx(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.messages, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CosmosTx { + return CosmosTx.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/interchain_accounts/v1/packet_pb.d.ts b/codegen/ibc/applications/interchain_accounts/v1/packet_pb.d.ts new file mode 100644 index 0000000..6739390 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/packet_pb.d.ts @@ -0,0 +1,66 @@ +// package: ibc.applications.interchain_accounts.v1 +// file: ibc/applications/interchain_accounts/v1/packet.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; + +export class InterchainAccountPacketData extends jspb.Message { + getType(): TypeMap[keyof TypeMap]; + setType(value: TypeMap[keyof TypeMap]): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getMemo(): string; + setMemo(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InterchainAccountPacketData.AsObject; + static toObject(includeInstance: boolean, msg: InterchainAccountPacketData): InterchainAccountPacketData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InterchainAccountPacketData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InterchainAccountPacketData; + static deserializeBinaryFromReader(message: InterchainAccountPacketData, reader: jspb.BinaryReader): InterchainAccountPacketData; +} + +export namespace InterchainAccountPacketData { + export type AsObject = { + type: TypeMap[keyof TypeMap], + data: Uint8Array | string, + memo: string, + } +} + +export class CosmosTx extends jspb.Message { + clearMessagesList(): void; + getMessagesList(): Array; + setMessagesList(value: Array): void; + addMessages(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CosmosTx.AsObject; + static toObject(includeInstance: boolean, msg: CosmosTx): CosmosTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CosmosTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CosmosTx; + static deserializeBinaryFromReader(message: CosmosTx, reader: jspb.BinaryReader): CosmosTx; +} + +export namespace CosmosTx { + export type AsObject = { + messagesList: Array, + } +} + +export interface TypeMap { + TYPE_UNSPECIFIED: 0; + TYPE_EXECUTE_TX: 1; +} + +export const Type: TypeMap; + diff --git a/codegen/ibc/applications/interchain_accounts/v1/packet_pb.js b/codegen/ibc/applications/interchain_accounts/v1/packet_pb.js new file mode 100644 index 0000000..79f17f3 --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/packet_pb.js @@ -0,0 +1,449 @@ +// source: ibc/applications/interchain_accounts/v1/packet.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.v1.CosmosTx', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData', null, global); +goog.exportSymbol('proto.ibc.applications.interchain_accounts.v1.Type', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.displayName = 'proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.interchain_accounts.v1.CosmosTx.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.interchain_accounts.v1.CosmosTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.interchain_accounts.v1.CosmosTx.displayName = 'proto.ibc.applications.interchain_accounts.v1.CosmosTx'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + data: msg.getData_asB64(), + memo: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData; + return proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ibc.applications.interchain_accounts.v1.Type} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Type type = 1; + * @return {!proto.ibc.applications.interchain_accounts.v1.Type} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.getType = function() { + return /** @type {!proto.ibc.applications.interchain_accounts.v1.Type} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.applications.interchain_accounts.v1.Type} value + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} returns this + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} returns this + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string memo = 3; + * @return {string} + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} returns this + */ +proto.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.interchain_accounts.v1.CosmosTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.interchain_accounts.v1.CosmosTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.toObject = function(includeInstance, msg) { + var f, obj = { + messagesList: jspb.Message.toObjectList(msg.getMessagesList(), + google_protobuf_any_pb.Any.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.interchain_accounts.v1.CosmosTx} + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.interchain_accounts.v1.CosmosTx; + return proto.ibc.applications.interchain_accounts.v1.CosmosTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.interchain_accounts.v1.CosmosTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.interchain_accounts.v1.CosmosTx} + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addMessages(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.interchain_accounts.v1.CosmosTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.interchain_accounts.v1.CosmosTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessagesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any messages = 1; + * @return {!Array} + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.prototype.getMessagesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.interchain_accounts.v1.CosmosTx} returns this +*/ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.prototype.setMessagesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.prototype.addMessages = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.interchain_accounts.v1.CosmosTx} returns this + */ +proto.ibc.applications.interchain_accounts.v1.CosmosTx.prototype.clearMessagesList = function() { + return this.setMessagesList([]); +}; + + +/** + * @enum {number} + */ +proto.ibc.applications.interchain_accounts.v1.Type = { + TYPE_UNSPECIFIED: 0, + TYPE_EXECUTE_TX: 1 +}; + +goog.object.extend(exports, proto.ibc.applications.interchain_accounts.v1); diff --git a/codegen/ibc/applications/interchain_accounts/v1/packet_pb_service.d.ts b/codegen/ibc/applications/interchain_accounts/v1/packet_pb_service.d.ts new file mode 100644 index 0000000..880e8ac --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/packet_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.v1 +// file: ibc/applications/interchain_accounts/v1/packet.proto + diff --git a/codegen/ibc/applications/interchain_accounts/v1/packet_pb_service.js b/codegen/ibc/applications/interchain_accounts/v1/packet_pb_service.js new file mode 100644 index 0000000..880e8ac --- /dev/null +++ b/codegen/ibc/applications/interchain_accounts/v1/packet_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.interchain_accounts.v1 +// file: ibc/applications/interchain_accounts/v1/packet.proto + diff --git a/codegen/ibc/applications/transfer/v1/authz.ts b/codegen/ibc/applications/transfer/v1/authz.ts new file mode 100644 index 0000000..0214a25 --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/authz.ts @@ -0,0 +1,237 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/transfer/v1/authz.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../cosmos_proto/cosmos"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../../cosmos/base/v1beta1/coin"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.transfer.v1 { + export class Allocation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + source_port?: string; + source_channel?: string; + spend_limit?: dependency_3.cosmos.base.v1beta1.Coin[]; + allow_list?: string[]; + allowed_packet_data?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4, 5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("source_port" in data && data.source_port != undefined) { + this.source_port = data.source_port; + } + if ("source_channel" in data && data.source_channel != undefined) { + this.source_channel = data.source_channel; + } + if ("spend_limit" in data && data.spend_limit != undefined) { + this.spend_limit = data.spend_limit; + } + if ("allow_list" in data && data.allow_list != undefined) { + this.allow_list = data.allow_list; + } + if ("allowed_packet_data" in data && data.allowed_packet_data != undefined) { + this.allowed_packet_data = data.allowed_packet_data; + } + } + } + get source_port() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set source_port(value: string) { + pb_1.Message.setField(this, 1, value); + } + get source_channel() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set source_channel(value: string) { + pb_1.Message.setField(this, 2, value); + } + get spend_limit() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 3) as dependency_3.cosmos.base.v1beta1.Coin[]; + } + set spend_limit(value: dependency_3.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get allow_list() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as string[]; + } + set allow_list(value: string[]) { + pb_1.Message.setField(this, 4, value); + } + get allowed_packet_data() { + return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; + } + set allowed_packet_data(value: string[]) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + source_port?: string; + source_channel?: string; + spend_limit?: ReturnType[]; + allow_list?: string[]; + allowed_packet_data?: string[]; + }): Allocation { + const message = new Allocation({}); + if (data.source_port != null) { + message.source_port = data.source_port; + } + if (data.source_channel != null) { + message.source_channel = data.source_channel; + } + if (data.spend_limit != null) { + message.spend_limit = data.spend_limit.map(item => dependency_3.cosmos.base.v1beta1.Coin.fromObject(item)); + } + if (data.allow_list != null) { + message.allow_list = data.allow_list; + } + if (data.allowed_packet_data != null) { + message.allowed_packet_data = data.allowed_packet_data; + } + return message; + } + toObject() { + const data: { + source_port?: string; + source_channel?: string; + spend_limit?: ReturnType[]; + allow_list?: string[]; + allowed_packet_data?: string[]; + } = {}; + if (this.source_port != null) { + data.source_port = this.source_port; + } + if (this.source_channel != null) { + data.source_channel = this.source_channel; + } + if (this.spend_limit != null) { + data.spend_limit = this.spend_limit.map((item: dependency_3.cosmos.base.v1beta1.Coin) => item.toObject()); + } + if (this.allow_list != null) { + data.allow_list = this.allow_list; + } + if (this.allowed_packet_data != null) { + data.allowed_packet_data = this.allowed_packet_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 (this.source_port.length) + writer.writeString(1, this.source_port); + if (this.source_channel.length) + writer.writeString(2, this.source_channel); + if (this.spend_limit.length) + writer.writeRepeatedMessage(3, this.spend_limit, (item: dependency_3.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (this.allow_list.length) + writer.writeRepeatedString(4, this.allow_list); + if (this.allowed_packet_data.length) + writer.writeRepeatedString(5, this.allowed_packet_data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Allocation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Allocation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.source_port = reader.readString(); + break; + case 2: + message.source_channel = reader.readString(); + break; + case 3: + reader.readMessage(message.spend_limit, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_3.cosmos.base.v1beta1.Coin)); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readString()); + break; + case 5: + pb_1.Message.addToRepeatedField(message, 5, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Allocation { + return Allocation.deserialize(bytes); + } + } + export class TransferAuthorization extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + allocations?: Allocation[]; + }) { + 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 ("allocations" in data && data.allocations != undefined) { + this.allocations = data.allocations; + } + } + } + get allocations() { + return pb_1.Message.getRepeatedWrapperField(this, Allocation, 1) as Allocation[]; + } + set allocations(value: Allocation[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + allocations?: ReturnType[]; + }): TransferAuthorization { + const message = new TransferAuthorization({}); + if (data.allocations != null) { + message.allocations = data.allocations.map(item => Allocation.fromObject(item)); + } + return message; + } + toObject() { + const data: { + allocations?: ReturnType[]; + } = {}; + if (this.allocations != null) { + data.allocations = this.allocations.map((item: Allocation) => item.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.allocations.length) + writer.writeRepeatedMessage(1, this.allocations, (item: Allocation) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TransferAuthorization { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransferAuthorization(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.allocations, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Allocation.deserialize(reader), Allocation)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TransferAuthorization { + return TransferAuthorization.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/transfer/v1/authz_pb.d.ts b/codegen/ibc/applications/transfer/v1/authz_pb.d.ts new file mode 100644 index 0000000..b903545 --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/authz_pb.d.ts @@ -0,0 +1,72 @@ +// package: ibc.applications.transfer.v1 +// file: ibc/applications/transfer/v1/authz.proto + +import * as jspb from "google-protobuf"; +import * as cosmos_proto_cosmos_pb from "../../../../cosmos_proto/cosmos_pb"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../../cosmos/base/v1beta1/coin_pb"; + +export class Allocation extends jspb.Message { + getSourcePort(): string; + setSourcePort(value: string): void; + + getSourceChannel(): string; + setSourceChannel(value: string): void; + + clearSpendLimitList(): void; + getSpendLimitList(): Array; + setSpendLimitList(value: Array): void; + addSpendLimit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + + clearAllowListList(): void; + getAllowListList(): Array; + setAllowListList(value: Array): void; + addAllowList(value: string, index?: number): string; + + clearAllowedPacketDataList(): void; + getAllowedPacketDataList(): Array; + setAllowedPacketDataList(value: Array): void; + addAllowedPacketData(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Allocation.AsObject; + static toObject(includeInstance: boolean, msg: Allocation): Allocation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Allocation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Allocation; + static deserializeBinaryFromReader(message: Allocation, reader: jspb.BinaryReader): Allocation; +} + +export namespace Allocation { + export type AsObject = { + sourcePort: string, + sourceChannel: string, + spendLimitList: Array, + allowListList: Array, + allowedPacketDataList: Array, + } +} + +export class TransferAuthorization extends jspb.Message { + clearAllocationsList(): void; + getAllocationsList(): Array; + setAllocationsList(value: Array): void; + addAllocations(value?: Allocation, index?: number): Allocation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransferAuthorization.AsObject; + static toObject(includeInstance: boolean, msg: TransferAuthorization): TransferAuthorization.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransferAuthorization, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransferAuthorization; + static deserializeBinaryFromReader(message: TransferAuthorization, reader: jspb.BinaryReader): TransferAuthorization; +} + +export namespace TransferAuthorization { + export type AsObject = { + allocationsList: Array, + } +} + diff --git a/codegen/ibc/applications/transfer/v1/authz_pb.js b/codegen/ibc/applications/transfer/v1/authz_pb.js new file mode 100644 index 0000000..e69dba0 --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/authz_pb.js @@ -0,0 +1,546 @@ +// source: ibc/applications/transfer/v1/authz.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var cosmos_proto_cosmos_pb = require('../../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.ibc.applications.transfer.v1.Allocation', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.TransferAuthorization', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.Allocation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.transfer.v1.Allocation.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.Allocation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.Allocation.displayName = 'proto.ibc.applications.transfer.v1.Allocation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.TransferAuthorization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.transfer.v1.TransferAuthorization.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.TransferAuthorization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.TransferAuthorization.displayName = 'proto.ibc.applications.transfer.v1.TransferAuthorization'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.transfer.v1.Allocation.repeatedFields_ = [3,4,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.Allocation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.Allocation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.Allocation.toObject = function(includeInstance, msg) { + var f, obj = { + sourcePort: jspb.Message.getFieldWithDefault(msg, 1, ""), + sourceChannel: jspb.Message.getFieldWithDefault(msg, 2, ""), + spendLimitList: jspb.Message.toObjectList(msg.getSpendLimitList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + allowListList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + allowedPacketDataList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.Allocation} + */ +proto.ibc.applications.transfer.v1.Allocation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.Allocation; + return proto.ibc.applications.transfer.v1.Allocation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.Allocation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.Allocation} + */ +proto.ibc.applications.transfer.v1.Allocation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSourcePort(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceChannel(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addSpendLimit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addAllowList(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addAllowedPacketData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.Allocation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.Allocation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.Allocation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSourcePort(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSourceChannel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSpendLimitList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getAllowListList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getAllowedPacketDataList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } +}; + + +/** + * optional string source_port = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.getSourcePort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.setSourcePort = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string source_channel = 2; + * @return {string} + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.getSourceChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.setSourceChannel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin spend_limit = 3; + * @return {!Array} + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.getSpendLimitList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this +*/ +proto.ibc.applications.transfer.v1.Allocation.prototype.setSpendLimitList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.addSpendLimit = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.clearSpendLimitList = function() { + return this.setSpendLimitList([]); +}; + + +/** + * repeated string allow_list = 4; + * @return {!Array} + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.getAllowListList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.setAllowListList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.addAllowList = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.clearAllowListList = function() { + return this.setAllowListList([]); +}; + + +/** + * repeated string allowed_packet_data = 5; + * @return {!Array} + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.getAllowedPacketDataList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.setAllowedPacketDataList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.addAllowedPacketData = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.transfer.v1.Allocation} returns this + */ +proto.ibc.applications.transfer.v1.Allocation.prototype.clearAllowedPacketDataList = function() { + return this.setAllowedPacketDataList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.TransferAuthorization.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.TransferAuthorization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.toObject = function(includeInstance, msg) { + var f, obj = { + allocationsList: jspb.Message.toObjectList(msg.getAllocationsList(), + proto.ibc.applications.transfer.v1.Allocation.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.TransferAuthorization} + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.TransferAuthorization; + return proto.ibc.applications.transfer.v1.TransferAuthorization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.TransferAuthorization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.TransferAuthorization} + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ibc.applications.transfer.v1.Allocation; + reader.readMessage(value,proto.ibc.applications.transfer.v1.Allocation.deserializeBinaryFromReader); + msg.addAllocations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.TransferAuthorization.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.TransferAuthorization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllocationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.ibc.applications.transfer.v1.Allocation.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Allocation allocations = 1; + * @return {!Array} + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.prototype.getAllocationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.applications.transfer.v1.Allocation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.transfer.v1.TransferAuthorization} returns this +*/ +proto.ibc.applications.transfer.v1.TransferAuthorization.prototype.setAllocationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.Allocation=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.transfer.v1.Allocation} + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.prototype.addAllocations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.transfer.v1.Allocation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.transfer.v1.TransferAuthorization} returns this + */ +proto.ibc.applications.transfer.v1.TransferAuthorization.prototype.clearAllocationsList = function() { + return this.setAllocationsList([]); +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/codegen/ibc/applications/transfer/v1/authz_pb_service.d.ts b/codegen/ibc/applications/transfer/v1/authz_pb_service.d.ts new file mode 100644 index 0000000..1652699 --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/authz_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.transfer.v1 +// file: ibc/applications/transfer/v1/authz.proto + diff --git a/codegen/ibc/applications/transfer/v1/authz_pb_service.js b/codegen/ibc/applications/transfer/v1/authz_pb_service.js new file mode 100644 index 0000000..1652699 --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/authz_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.transfer.v1 +// file: ibc/applications/transfer/v1/authz.proto + diff --git a/codegen/ibc/applications/transfer/v1/genesis.ts b/codegen/ibc/applications/transfer/v1/genesis.ts new file mode 100644 index 0000000..20c8e11 --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/genesis.ts @@ -0,0 +1,150 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/transfer/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./transfer"; +import * as dependency_2 from "./../../../../cosmos/base/v1beta1/coin"; +import * as dependency_3 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.transfer.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + denom_traces?: dependency_1.ibc.applications.transfer.v1.DenomTrace[]; + params?: dependency_1.ibc.applications.transfer.v1.Params; + total_escrowed?: dependency_2.cosmos.base.v1beta1.Coin[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("denom_traces" in data && data.denom_traces != undefined) { + this.denom_traces = data.denom_traces; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("total_escrowed" in data && data.total_escrowed != undefined) { + this.total_escrowed = data.total_escrowed; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get denom_traces() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.ibc.applications.transfer.v1.DenomTrace, 2) as dependency_1.ibc.applications.transfer.v1.DenomTrace[]; + } + set denom_traces(value: dependency_1.ibc.applications.transfer.v1.DenomTrace[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_1.ibc.applications.transfer.v1.Params, 3) as dependency_1.ibc.applications.transfer.v1.Params; + } + set params(value: dependency_1.ibc.applications.transfer.v1.Params) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_params() { + return pb_1.Message.getField(this, 3) != null; + } + get total_escrowed() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 4) as dependency_2.cosmos.base.v1beta1.Coin[]; + } + set total_escrowed(value: dependency_2.cosmos.base.v1beta1.Coin[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + port_id?: string; + denom_traces?: ReturnType[]; + params?: ReturnType; + total_escrowed?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.denom_traces != null) { + message.denom_traces = data.denom_traces.map(item => dependency_1.ibc.applications.transfer.v1.DenomTrace.fromObject(item)); + } + if (data.params != null) { + message.params = dependency_1.ibc.applications.transfer.v1.Params.fromObject(data.params); + } + if (data.total_escrowed != null) { + message.total_escrowed = data.total_escrowed.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); + } + return message; + } + toObject() { + const data: { + port_id?: string; + denom_traces?: ReturnType[]; + params?: ReturnType; + total_escrowed?: ReturnType[]; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.denom_traces != null) { + data.denom_traces = this.denom_traces.map((item: dependency_1.ibc.applications.transfer.v1.DenomTrace) => item.toObject()); + } + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.total_escrowed != null) { + data.total_escrowed = this.total_escrowed.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.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.port_id.length) + writer.writeString(1, this.port_id); + if (this.denom_traces.length) + writer.writeRepeatedMessage(2, this.denom_traces, (item: dependency_1.ibc.applications.transfer.v1.DenomTrace) => item.serialize(writer)); + if (this.has_params) + writer.writeMessage(3, this.params, () => this.params.serialize(writer)); + if (this.total_escrowed.length) + writer.writeRepeatedMessage(4, this.total_escrowed, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + reader.readMessage(message.denom_traces, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.ibc.applications.transfer.v1.DenomTrace.deserialize(reader), dependency_1.ibc.applications.transfer.v1.DenomTrace)); + break; + case 3: + reader.readMessage(message.params, () => message.params = dependency_1.ibc.applications.transfer.v1.Params.deserialize(reader)); + break; + case 4: + reader.readMessage(message.total_escrowed, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/ibc/applications/transfer/v1/genesis_pb.d.ts b/codegen/ibc/applications/transfer/v1/genesis_pb.d.ts similarity index 80% rename from proto/ibc/applications/transfer/v1/genesis_pb.d.ts rename to codegen/ibc/applications/transfer/v1/genesis_pb.d.ts index 35dc3e6..029cc68 100644 --- a/proto/ibc/applications/transfer/v1/genesis_pb.d.ts +++ b/codegen/ibc/applications/transfer/v1/genesis_pb.d.ts @@ -3,6 +3,7 @@ import * as jspb from "google-protobuf"; import * as ibc_applications_transfer_v1_transfer_pb from "../../../../ibc/applications/transfer/v1/transfer_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../../cosmos/base/v1beta1/coin_pb"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; export class GenesisState extends jspb.Message { @@ -19,6 +20,11 @@ export class GenesisState extends jspb.Message { getParams(): ibc_applications_transfer_v1_transfer_pb.Params | undefined; setParams(value?: ibc_applications_transfer_v1_transfer_pb.Params): void; + clearTotalEscrowedList(): void; + getTotalEscrowedList(): Array; + setTotalEscrowedList(value: Array): void; + addTotalEscrowed(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GenesisState.AsObject; static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; @@ -34,6 +40,7 @@ export namespace GenesisState { portId: string, denomTracesList: Array, params?: ibc_applications_transfer_v1_transfer_pb.Params.AsObject, + totalEscrowedList: Array, } } diff --git a/proto/ibc/applications/transfer/v1/genesis_pb.js b/codegen/ibc/applications/transfer/v1/genesis_pb.js similarity index 81% rename from proto/ibc/applications/transfer/v1/genesis_pb.js rename to codegen/ibc/applications/transfer/v1/genesis_pb.js index 825e953..c54561f 100644 --- a/proto/ibc/applications/transfer/v1/genesis_pb.js +++ b/codegen/ibc/applications/transfer/v1/genesis_pb.js @@ -13,10 +13,12 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var ibc_applications_transfer_v1_transfer_pb = require('../../../../ibc/applications/transfer/v1/transfer_pb.js'); goog.object.extend(proto, ibc_applications_transfer_v1_transfer_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.ibc.applications.transfer.v1.GenesisState', null, global); @@ -47,7 +49,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.ibc.applications.transfer.v1.GenesisState.repeatedFields_ = [2]; +proto.ibc.applications.transfer.v1.GenesisState.repeatedFields_ = [2,4]; @@ -83,7 +85,9 @@ proto.ibc.applications.transfer.v1.GenesisState.toObject = function(includeInsta portId: jspb.Message.getFieldWithDefault(msg, 1, ""), denomTracesList: jspb.Message.toObjectList(msg.getDenomTracesList(), ibc_applications_transfer_v1_transfer_pb.DenomTrace.toObject, includeInstance), - params: (f = msg.getParams()) && ibc_applications_transfer_v1_transfer_pb.Params.toObject(includeInstance, f) + params: (f = msg.getParams()) && ibc_applications_transfer_v1_transfer_pb.Params.toObject(includeInstance, f), + totalEscrowedList: jspb.Message.toObjectList(msg.getTotalEscrowedList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance) }; if (includeInstance) { @@ -134,6 +138,11 @@ proto.ibc.applications.transfer.v1.GenesisState.deserializeBinaryFromReader = fu reader.readMessage(value,ibc_applications_transfer_v1_transfer_pb.Params.deserializeBinaryFromReader); msg.setParams(value); break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addTotalEscrowed(value); + break; default: reader.skipField(); break; @@ -186,6 +195,14 @@ proto.ibc.applications.transfer.v1.GenesisState.serializeBinaryToWriter = functi ibc_applications_transfer_v1_transfer_pb.Params.serializeBinaryToWriter ); } + f = message.getTotalEscrowedList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } }; @@ -282,4 +299,42 @@ proto.ibc.applications.transfer.v1.GenesisState.prototype.hasParams = function() }; +/** + * repeated cosmos.base.v1beta1.Coin total_escrowed = 4; + * @return {!Array} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.getTotalEscrowedList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this +*/ +proto.ibc.applications.transfer.v1.GenesisState.prototype.setTotalEscrowedList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.addTotalEscrowed = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.clearTotalEscrowedList = function() { + return this.setTotalEscrowedList([]); +}; + + goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/proto/ibc/applications/transfer/v1/genesis_pb_service.d.ts b/codegen/ibc/applications/transfer/v1/genesis_pb_service.d.ts similarity index 100% rename from proto/ibc/applications/transfer/v1/genesis_pb_service.d.ts rename to codegen/ibc/applications/transfer/v1/genesis_pb_service.d.ts diff --git a/proto/ibc/applications/transfer/v1/genesis_pb_service.js b/codegen/ibc/applications/transfer/v1/genesis_pb_service.js similarity index 100% rename from proto/ibc/applications/transfer/v1/genesis_pb_service.js rename to codegen/ibc/applications/transfer/v1/genesis_pb_service.js diff --git a/codegen/ibc/applications/transfer/v1/query.ts b/codegen/ibc/applications/transfer/v1/query.ts new file mode 100644 index 0000000..751bcc6 --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/query.ts @@ -0,0 +1,964 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/transfer/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/v1beta1/coin"; +import * as dependency_3 from "./../../../../cosmos/base/query/v1beta1/pagination"; +import * as dependency_4 from "./transfer"; +import * as dependency_5 from "./../../../../google/api/annotations"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.applications.transfer.v1 { + export class QueryDenomTraceRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: 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 ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set hash(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + hash?: string; + }): QueryDenomTraceRequest { + const message = new QueryDenomTraceRequest({}); + if (data.hash != null) { + message.hash = data.hash; + } + return message; + } + toObject() { + const data: { + hash?: string; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + 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.hash.length) + writer.writeString(1, this.hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomTraceRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomTraceRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hash = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomTraceRequest { + return QueryDenomTraceRequest.deserialize(bytes); + } + } + export class QueryDenomTraceResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom_trace?: dependency_4.ibc.applications.transfer.v1.DenomTrace; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("denom_trace" in data && data.denom_trace != undefined) { + this.denom_trace = data.denom_trace; + } + } + } + get denom_trace() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.applications.transfer.v1.DenomTrace, 1) as dependency_4.ibc.applications.transfer.v1.DenomTrace; + } + set denom_trace(value: dependency_4.ibc.applications.transfer.v1.DenomTrace) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_denom_trace() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + denom_trace?: ReturnType; + }): QueryDenomTraceResponse { + const message = new QueryDenomTraceResponse({}); + if (data.denom_trace != null) { + message.denom_trace = dependency_4.ibc.applications.transfer.v1.DenomTrace.fromObject(data.denom_trace); + } + return message; + } + toObject() { + const data: { + denom_trace?: ReturnType; + } = {}; + if (this.denom_trace != null) { + data.denom_trace = this.denom_trace.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_denom_trace) + writer.writeMessage(1, this.denom_trace, () => this.denom_trace.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomTraceResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomTraceResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.denom_trace, () => message.denom_trace = dependency_4.ibc.applications.transfer.v1.DenomTrace.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomTraceResponse { + return QueryDenomTraceResponse.deserialize(bytes); + } + } + export class QueryDenomTracesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_3.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_3.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_3.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_3.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; + }): QueryDenomTracesRequest { + const message = new QueryDenomTracesRequest({}); + if (data.pagination != null) { + message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryDenomTracesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomTracesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomTracesRequest { + return QueryDenomTracesRequest.deserialize(bytes); + } + } + export class QueryDenomTracesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom_traces?: dependency_4.ibc.applications.transfer.v1.DenomTrace[]; + pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("denom_traces" in data && data.denom_traces != undefined) { + this.denom_traces = data.denom_traces; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get denom_traces() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.ibc.applications.transfer.v1.DenomTrace, 1) as dependency_4.ibc.applications.transfer.v1.DenomTrace[]; + } + set denom_traces(value: dependency_4.ibc.applications.transfer.v1.DenomTrace[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_3.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + denom_traces?: ReturnType[]; + pagination?: ReturnType; + }): QueryDenomTracesResponse { + const message = new QueryDenomTracesResponse({}); + if (data.denom_traces != null) { + message.denom_traces = data.denom_traces.map(item => dependency_4.ibc.applications.transfer.v1.DenomTrace.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + denom_traces?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.denom_traces != null) { + data.denom_traces = this.denom_traces.map((item: dependency_4.ibc.applications.transfer.v1.DenomTrace) => item.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.denom_traces.length) + writer.writeRepeatedMessage(1, this.denom_traces, (item: dependency_4.ibc.applications.transfer.v1.DenomTrace) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomTracesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomTracesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.denom_traces, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.ibc.applications.transfer.v1.DenomTrace.deserialize(reader), dependency_4.ibc.applications.transfer.v1.DenomTrace)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomTracesResponse { + return QueryDenomTracesResponse.deserialize(bytes); + } + } + export class QueryParamsRequest 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: {}): QueryParamsRequest { + const message = new QueryParamsRequest({}); + 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): QueryParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { + return QueryParamsRequest.deserialize(bytes); + } + } + export class QueryParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_4.ibc.applications.transfer.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.applications.transfer.v1.Params, 1) as dependency_4.ibc.applications.transfer.v1.Params; + } + set params(value: dependency_4.ibc.applications.transfer.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; + }): QueryParamsResponse { + const message = new QueryParamsResponse({}); + if (data.params != null) { + message.params = dependency_4.ibc.applications.transfer.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_4.ibc.applications.transfer.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { + return QueryParamsResponse.deserialize(bytes); + } + } + export class QueryDenomHashRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + trace?: 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 ("trace" in data && data.trace != undefined) { + this.trace = data.trace; + } + } + } + get trace() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set trace(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + trace?: string; + }): QueryDenomHashRequest { + const message = new QueryDenomHashRequest({}); + if (data.trace != null) { + message.trace = data.trace; + } + return message; + } + toObject() { + const data: { + trace?: string; + } = {}; + if (this.trace != null) { + data.trace = this.trace; + } + 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.trace.length) + writer.writeString(1, this.trace); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomHashRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomHashRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.trace = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomHashRequest { + return QueryDenomHashRequest.deserialize(bytes); + } + } + export class QueryDenomHashResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: 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 ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set hash(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + hash?: string; + }): QueryDenomHashResponse { + const message = new QueryDenomHashResponse({}); + if (data.hash != null) { + message.hash = data.hash; + } + return message; + } + toObject() { + const data: { + hash?: string; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + 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.hash.length) + writer.writeString(1, this.hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryDenomHashResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryDenomHashResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hash = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryDenomHashResponse { + return QueryDenomHashResponse.deserialize(bytes); + } + } + export class QueryEscrowAddressRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): QueryEscrowAddressRequest { + const message = new QueryEscrowAddressRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryEscrowAddressRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryEscrowAddressRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryEscrowAddressRequest { + return QueryEscrowAddressRequest.deserialize(bytes); + } + } + export class QueryEscrowAddressResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + escrow_address?: 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 ("escrow_address" in data && data.escrow_address != undefined) { + this.escrow_address = data.escrow_address; + } + } + } + get escrow_address() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set escrow_address(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + escrow_address?: string; + }): QueryEscrowAddressResponse { + const message = new QueryEscrowAddressResponse({}); + if (data.escrow_address != null) { + message.escrow_address = data.escrow_address; + } + return message; + } + toObject() { + const data: { + escrow_address?: string; + } = {}; + if (this.escrow_address != null) { + data.escrow_address = this.escrow_address; + } + 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.escrow_address.length) + writer.writeString(1, this.escrow_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryEscrowAddressResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryEscrowAddressResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.escrow_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryEscrowAddressResponse { + return QueryEscrowAddressResponse.deserialize(bytes); + } + } + export class QueryTotalEscrowForDenomRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: 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 ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + denom?: string; + }): QueryTotalEscrowForDenomRequest { + const message = new QueryTotalEscrowForDenomRequest({}); + if (data.denom != null) { + message.denom = data.denom; + } + return message; + } + toObject() { + const data: { + denom?: string; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalEscrowForDenomRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalEscrowForDenomRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalEscrowForDenomRequest { + return QueryTotalEscrowForDenomRequest.deserialize(bytes); + } + } + export class QueryTotalEscrowForDenomResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: dependency_2.cosmos.base.v1beta1.Coin; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + } + } + get amount() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 1) as dependency_2.cosmos.base.v1beta1.Coin; + } + set amount(value: dependency_2.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_amount() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + amount?: ReturnType; + }): QueryTotalEscrowForDenomResponse { + const message = new QueryTotalEscrowForDenomResponse({}); + if (data.amount != null) { + message.amount = dependency_2.cosmos.base.v1beta1.Coin.fromObject(data.amount); + } + return message; + } + toObject() { + const data: { + amount?: ReturnType; + } = {}; + if (this.amount != null) { + data.amount = this.amount.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_amount) + writer.writeMessage(1, this.amount, () => this.amount.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryTotalEscrowForDenomResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTotalEscrowForDenomResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.amount, () => message.amount = dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryTotalEscrowForDenomResponse { + return QueryTotalEscrowForDenomResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + DenomTraces: { + path: "/ibc.applications.transfer.v1.Query/DenomTraces", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDenomTracesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDenomTracesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDenomTracesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDenomTracesResponse.deserialize(new Uint8Array(bytes)) + }, + DenomTrace: { + path: "/ibc.applications.transfer.v1.Query/DenomTrace", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDenomTraceRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDenomTraceRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDenomTraceResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDenomTraceResponse.deserialize(new Uint8Array(bytes)) + }, + Params: { + path: "/ibc.applications.transfer.v1.Query/Params", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryParamsResponse.deserialize(new Uint8Array(bytes)) + }, + DenomHash: { + path: "/ibc.applications.transfer.v1.Query/DenomHash", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryDenomHashRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryDenomHashRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryDenomHashResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryDenomHashResponse.deserialize(new Uint8Array(bytes)) + }, + EscrowAddress: { + path: "/ibc.applications.transfer.v1.Query/EscrowAddress", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryEscrowAddressRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryEscrowAddressRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryEscrowAddressResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryEscrowAddressResponse.deserialize(new Uint8Array(bytes)) + }, + TotalEscrowForDenom: { + path: "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryTotalEscrowForDenomRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryTotalEscrowForDenomRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryTotalEscrowForDenomResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryTotalEscrowForDenomResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract DenomTraces(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DenomTrace(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Params(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DenomHash(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract EscrowAddress(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TotalEscrowForDenom(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + DenomTraces: GrpcUnaryServiceInterface = (message: QueryDenomTracesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DenomTraces(message, metadata, options, callback); + }; + DenomTrace: GrpcUnaryServiceInterface = (message: QueryDenomTraceRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DenomTrace(message, metadata, options, callback); + }; + Params: GrpcUnaryServiceInterface = (message: QueryParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Params(message, metadata, options, callback); + }; + DenomHash: GrpcUnaryServiceInterface = (message: QueryDenomHashRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DenomHash(message, metadata, options, callback); + }; + EscrowAddress: GrpcUnaryServiceInterface = (message: QueryEscrowAddressRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.EscrowAddress(message, metadata, options, callback); + }; + TotalEscrowForDenom: GrpcUnaryServiceInterface = (message: QueryTotalEscrowForDenomRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TotalEscrowForDenom(message, metadata, options, callback); + }; + } +} diff --git a/proto/ibc/applications/transfer/v1/query_pb.d.ts b/codegen/ibc/applications/transfer/v1/query_pb.d.ts similarity index 54% rename from proto/ibc/applications/transfer/v1/query_pb.d.ts rename to codegen/ibc/applications/transfer/v1/query_pb.d.ts index d4763c1..645bb97 100644 --- a/proto/ibc/applications/transfer/v1/query_pb.d.ts +++ b/codegen/ibc/applications/transfer/v1/query_pb.d.ts @@ -3,6 +3,7 @@ import * as jspb from "google-protobuf"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as cosmos_base_v1beta1_coin_pb from "../../../../cosmos/base/v1beta1/coin_pb"; import * as cosmos_base_query_v1beta1_pagination_pb from "../../../../cosmos/base/query/v1beta1/pagination_pb"; import * as ibc_applications_transfer_v1_transfer_pb from "../../../../ibc/applications/transfer/v1/transfer_pb"; import * as google_api_annotations_pb from "../../../../google/api/annotations_pb"; @@ -137,3 +138,129 @@ export namespace QueryParamsResponse { } } +export class QueryDenomHashRequest extends jspb.Message { + getTrace(): string; + setTrace(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDenomHashRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryDenomHashRequest): QueryDenomHashRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDenomHashRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDenomHashRequest; + static deserializeBinaryFromReader(message: QueryDenomHashRequest, reader: jspb.BinaryReader): QueryDenomHashRequest; +} + +export namespace QueryDenomHashRequest { + export type AsObject = { + trace: string, + } +} + +export class QueryDenomHashResponse extends jspb.Message { + getHash(): string; + setHash(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryDenomHashResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryDenomHashResponse): QueryDenomHashResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryDenomHashResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryDenomHashResponse; + static deserializeBinaryFromReader(message: QueryDenomHashResponse, reader: jspb.BinaryReader): QueryDenomHashResponse; +} + +export namespace QueryDenomHashResponse { + export type AsObject = { + hash: string, + } +} + +export class QueryEscrowAddressRequest extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryEscrowAddressRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryEscrowAddressRequest): QueryEscrowAddressRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryEscrowAddressRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryEscrowAddressRequest; + static deserializeBinaryFromReader(message: QueryEscrowAddressRequest, reader: jspb.BinaryReader): QueryEscrowAddressRequest; +} + +export namespace QueryEscrowAddressRequest { + export type AsObject = { + portId: string, + channelId: string, + } +} + +export class QueryEscrowAddressResponse extends jspb.Message { + getEscrowAddress(): string; + setEscrowAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryEscrowAddressResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryEscrowAddressResponse): QueryEscrowAddressResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryEscrowAddressResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryEscrowAddressResponse; + static deserializeBinaryFromReader(message: QueryEscrowAddressResponse, reader: jspb.BinaryReader): QueryEscrowAddressResponse; +} + +export namespace QueryEscrowAddressResponse { + export type AsObject = { + escrowAddress: string, + } +} + +export class QueryTotalEscrowForDenomRequest extends jspb.Message { + getDenom(): string; + setDenom(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalEscrowForDenomRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalEscrowForDenomRequest): QueryTotalEscrowForDenomRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalEscrowForDenomRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalEscrowForDenomRequest; + static deserializeBinaryFromReader(message: QueryTotalEscrowForDenomRequest, reader: jspb.BinaryReader): QueryTotalEscrowForDenomRequest; +} + +export namespace QueryTotalEscrowForDenomRequest { + export type AsObject = { + denom: string, + } +} + +export class QueryTotalEscrowForDenomResponse extends jspb.Message { + hasAmount(): boolean; + clearAmount(): void; + getAmount(): cosmos_base_v1beta1_coin_pb.Coin | undefined; + setAmount(value?: cosmos_base_v1beta1_coin_pb.Coin): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryTotalEscrowForDenomResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryTotalEscrowForDenomResponse): QueryTotalEscrowForDenomResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryTotalEscrowForDenomResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryTotalEscrowForDenomResponse; + static deserializeBinaryFromReader(message: QueryTotalEscrowForDenomResponse, reader: jspb.BinaryReader): QueryTotalEscrowForDenomResponse; +} + +export namespace QueryTotalEscrowForDenomResponse { + export type AsObject = { + amount?: cosmos_base_v1beta1_coin_pb.Coin.AsObject, + } +} + diff --git a/proto/ibc/applications/transfer/v1/query_pb.js b/codegen/ibc/applications/transfer/v1/query_pb.js similarity index 52% rename from proto/ibc/applications/transfer/v1/query_pb.js rename to codegen/ibc/applications/transfer/v1/query_pb.js index 44bcbd2..ab76a97 100644 --- a/proto/ibc/applications/transfer/v1/query_pb.js +++ b/codegen/ibc/applications/transfer/v1/query_pb.js @@ -13,22 +13,30 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_base_v1beta1_coin_pb = require('../../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js'); goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); var ibc_applications_transfer_v1_transfer_pb = require('../../../../ibc/applications/transfer/v1/transfer_pb.js'); goog.object.extend(proto, ibc_applications_transfer_v1_transfer_pb); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryDenomHashRequest', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryDenomHashResponse', null, global); goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryDenomTraceRequest', null, global); goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryDenomTraceResponse', null, global); goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryDenomTracesRequest', null, global); goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryDenomTracesResponse', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse', null, global); goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryParamsRequest', null, global); goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -155,6 +163,132 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.applications.transfer.v1.QueryParamsResponse.displayName = 'proto.ibc.applications.transfer.v1.QueryParamsResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.QueryDenomHashRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomHashRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomHashRequest.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomHashRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.QueryDenomHashResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomHashResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomHashResponse.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomHashResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.displayName = 'proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.displayName = 'proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.displayName = 'proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.displayName = 'proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse'; +} @@ -1050,4 +1184,835 @@ proto.ibc.applications.transfer.v1.QueryParamsResponse.prototype.hasParams = fun }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomHashRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.QueryDenomHashRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomHashRequest.toObject = function(includeInstance, msg) { + var f, obj = { + trace: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomHashRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomHashRequest; + return proto.ibc.applications.transfer.v1.QueryDenomHashRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.QueryDenomHashRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomHashRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTrace(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomHashRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.QueryDenomHashRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomHashRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTrace(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string trace = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashRequest.prototype.getTrace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.QueryDenomHashRequest} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomHashRequest.prototype.setTrace = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomHashResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.QueryDenomHashResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomHashResponse.toObject = function(includeInstance, msg) { + var f, obj = { + hash: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomHashResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomHashResponse; + return proto.ibc.applications.transfer.v1.QueryDenomHashResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.QueryDenomHashResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomHashResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomHashResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.QueryDenomHashResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomHashResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string hash = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.QueryDenomHashResponse.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.QueryDenomHashResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomHashResponse.prototype.setHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest; + return proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest} returns this + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest} returns this + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.toObject = function(includeInstance, msg) { + var f, obj = { + escrowAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse; + return proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setEscrowAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEscrowAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string escrow_address = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.prototype.getEscrowAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryEscrowAddressResponse.prototype.setEscrowAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest; + return proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} returns this + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.toObject = function(includeInstance, msg) { + var f, obj = { + amount: (f = msg.getAmount()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse; + return proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} returns this +*/ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.prototype.hasAmount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/proto/ibc/applications/transfer/v1/query_pb_service.d.ts b/codegen/ibc/applications/transfer/v1/query_pb_service.d.ts similarity index 59% rename from proto/ibc/applications/transfer/v1/query_pb_service.d.ts rename to codegen/ibc/applications/transfer/v1/query_pb_service.d.ts index 096db1c..166fe5c 100644 --- a/proto/ibc/applications/transfer/v1/query_pb_service.d.ts +++ b/codegen/ibc/applications/transfer/v1/query_pb_service.d.ts @@ -4,22 +4,22 @@ import * as ibc_applications_transfer_v1_query_pb from "../../../../ibc/applications/transfer/v1/query_pb"; import {grpc} from "@improbable-eng/grpc-web"; -type QueryDenomTrace = { +type QueryDenomTraces = { readonly methodName: string; readonly service: typeof Query; readonly requestStream: false; readonly responseStream: false; - readonly requestType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomTraceRequest; - readonly responseType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomTraceResponse; + readonly requestType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomTracesRequest; + readonly responseType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomTracesResponse; }; -type QueryDenomTraces = { +type QueryDenomTrace = { readonly methodName: string; readonly service: typeof Query; readonly requestStream: false; readonly responseStream: false; - readonly requestType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomTracesRequest; - readonly responseType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomTracesResponse; + readonly requestType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomTraceRequest; + readonly responseType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomTraceResponse; }; type QueryParams = { @@ -31,11 +31,41 @@ type QueryParams = { readonly responseType: typeof ibc_applications_transfer_v1_query_pb.QueryParamsResponse; }; +type QueryDenomHash = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomHashRequest; + readonly responseType: typeof ibc_applications_transfer_v1_query_pb.QueryDenomHashResponse; +}; + +type QueryEscrowAddress = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_transfer_v1_query_pb.QueryEscrowAddressRequest; + readonly responseType: typeof ibc_applications_transfer_v1_query_pb.QueryEscrowAddressResponse; +}; + +type QueryTotalEscrowForDenom = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_transfer_v1_query_pb.QueryTotalEscrowForDenomRequest; + readonly responseType: typeof ibc_applications_transfer_v1_query_pb.QueryTotalEscrowForDenomResponse; +}; + export class Query { static readonly serviceName: string; - static readonly DenomTrace: QueryDenomTrace; static readonly DenomTraces: QueryDenomTraces; + static readonly DenomTrace: QueryDenomTrace; static readonly Params: QueryParams; + static readonly DenomHash: QueryDenomHash; + static readonly EscrowAddress: QueryEscrowAddress; + static readonly TotalEscrowForDenom: QueryTotalEscrowForDenom; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -70,15 +100,6 @@ export class QueryClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); - denomTrace( - requestMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTraceRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTraceResponse|null) => void - ): UnaryResponse; - denomTrace( - requestMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTraceRequest, - callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTraceResponse|null) => void - ): UnaryResponse; denomTraces( requestMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTracesRequest, metadata: grpc.Metadata, @@ -88,6 +109,15 @@ export class QueryClient { requestMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTracesRequest, callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTracesResponse|null) => void ): UnaryResponse; + denomTrace( + requestMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTraceRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTraceResponse|null) => void + ): UnaryResponse; + denomTrace( + requestMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTraceRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryDenomTraceResponse|null) => void + ): UnaryResponse; params( requestMessage: ibc_applications_transfer_v1_query_pb.QueryParamsRequest, metadata: grpc.Metadata, @@ -97,5 +127,32 @@ export class QueryClient { requestMessage: ibc_applications_transfer_v1_query_pb.QueryParamsRequest, callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryParamsResponse|null) => void ): UnaryResponse; + denomHash( + requestMessage: ibc_applications_transfer_v1_query_pb.QueryDenomHashRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryDenomHashResponse|null) => void + ): UnaryResponse; + denomHash( + requestMessage: ibc_applications_transfer_v1_query_pb.QueryDenomHashRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryDenomHashResponse|null) => void + ): UnaryResponse; + escrowAddress( + requestMessage: ibc_applications_transfer_v1_query_pb.QueryEscrowAddressRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryEscrowAddressResponse|null) => void + ): UnaryResponse; + escrowAddress( + requestMessage: ibc_applications_transfer_v1_query_pb.QueryEscrowAddressRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryEscrowAddressResponse|null) => void + ): UnaryResponse; + totalEscrowForDenom( + requestMessage: ibc_applications_transfer_v1_query_pb.QueryTotalEscrowForDenomRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryTotalEscrowForDenomResponse|null) => void + ): UnaryResponse; + totalEscrowForDenom( + requestMessage: ibc_applications_transfer_v1_query_pb.QueryTotalEscrowForDenomRequest, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_query_pb.QueryTotalEscrowForDenomResponse|null) => void + ): UnaryResponse; } diff --git a/codegen/ibc/applications/transfer/v1/query_pb_service.js b/codegen/ibc/applications/transfer/v1/query_pb_service.js new file mode 100644 index 0000000..3a05ce5 --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/query_pb_service.js @@ -0,0 +1,261 @@ +// package: ibc.applications.transfer.v1 +// file: ibc/applications/transfer/v1/query.proto + +var ibc_applications_transfer_v1_query_pb = require("../../../../ibc/applications/transfer/v1/query_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Query = (function () { + function Query() {} + Query.serviceName = "ibc.applications.transfer.v1.Query"; + return Query; +}()); + +Query.DenomTraces = { + methodName: "DenomTraces", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_applications_transfer_v1_query_pb.QueryDenomTracesRequest, + responseType: ibc_applications_transfer_v1_query_pb.QueryDenomTracesResponse +}; + +Query.DenomTrace = { + methodName: "DenomTrace", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_applications_transfer_v1_query_pb.QueryDenomTraceRequest, + responseType: ibc_applications_transfer_v1_query_pb.QueryDenomTraceResponse +}; + +Query.Params = { + methodName: "Params", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_applications_transfer_v1_query_pb.QueryParamsRequest, + responseType: ibc_applications_transfer_v1_query_pb.QueryParamsResponse +}; + +Query.DenomHash = { + methodName: "DenomHash", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_applications_transfer_v1_query_pb.QueryDenomHashRequest, + responseType: ibc_applications_transfer_v1_query_pb.QueryDenomHashResponse +}; + +Query.EscrowAddress = { + methodName: "EscrowAddress", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_applications_transfer_v1_query_pb.QueryEscrowAddressRequest, + responseType: ibc_applications_transfer_v1_query_pb.QueryEscrowAddressResponse +}; + +Query.TotalEscrowForDenom = { + methodName: "TotalEscrowForDenom", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_applications_transfer_v1_query_pb.QueryTotalEscrowForDenomRequest, + responseType: ibc_applications_transfer_v1_query_pb.QueryTotalEscrowForDenomResponse +}; + +exports.Query = Query; + +function QueryClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +QueryClient.prototype.denomTraces = function denomTraces(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.DenomTraces, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.denomTrace = function denomTrace(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.DenomTrace, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.params = function params(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Params, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.denomHash = function denomHash(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.DenomHash, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.escrowAddress = function escrowAddress(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.EscrowAddress, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.totalEscrowForDenom = function totalEscrowForDenom(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.TotalEscrowForDenom, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.QueryClient = QueryClient; + diff --git a/codegen/ibc/applications/transfer/v1/transfer.ts b/codegen/ibc/applications/transfer/v1/transfer.ts new file mode 100644 index 0000000..54fb739 --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/transfer.ts @@ -0,0 +1,188 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/transfer/v1/transfer.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.transfer.v1 { + export class DenomTrace extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: string; + base_denom?: 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 ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("base_denom" in data && data.base_denom != undefined) { + this.base_denom = data.base_denom; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set path(value: string) { + pb_1.Message.setField(this, 1, value); + } + get base_denom() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set base_denom(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + path?: string; + base_denom?: string; + }): DenomTrace { + const message = new DenomTrace({}); + if (data.path != null) { + message.path = data.path; + } + if (data.base_denom != null) { + message.base_denom = data.base_denom; + } + return message; + } + toObject() { + const data: { + path?: string; + base_denom?: string; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.base_denom != null) { + data.base_denom = this.base_denom; + } + 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.path.length) + writer.writeString(1, this.path); + if (this.base_denom.length) + writer.writeString(2, this.base_denom); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DenomTrace { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DenomTrace(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readString(); + break; + case 2: + message.base_denom = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DenomTrace { + return DenomTrace.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + send_enabled?: boolean; + receive_enabled?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("send_enabled" in data && data.send_enabled != undefined) { + this.send_enabled = data.send_enabled; + } + if ("receive_enabled" in data && data.receive_enabled != undefined) { + this.receive_enabled = data.receive_enabled; + } + } + } + get send_enabled() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set send_enabled(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + get receive_enabled() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set receive_enabled(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + send_enabled?: boolean; + receive_enabled?: boolean; + }): Params { + const message = new Params({}); + if (data.send_enabled != null) { + message.send_enabled = data.send_enabled; + } + if (data.receive_enabled != null) { + message.receive_enabled = data.receive_enabled; + } + return message; + } + toObject() { + const data: { + send_enabled?: boolean; + receive_enabled?: boolean; + } = {}; + if (this.send_enabled != null) { + data.send_enabled = this.send_enabled; + } + if (this.receive_enabled != null) { + data.receive_enabled = this.receive_enabled; + } + 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.send_enabled != false) + writer.writeBool(1, this.send_enabled); + if (this.receive_enabled != false) + writer.writeBool(2, this.receive_enabled); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.send_enabled = reader.readBool(); + break; + case 2: + message.receive_enabled = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/proto/ibc/applications/transfer/v1/transfer_pb.d.ts b/codegen/ibc/applications/transfer/v1/transfer_pb.d.ts similarity index 60% rename from proto/ibc/applications/transfer/v1/transfer_pb.d.ts rename to codegen/ibc/applications/transfer/v1/transfer_pb.d.ts index a14463b..3a4210d 100644 --- a/proto/ibc/applications/transfer/v1/transfer_pb.d.ts +++ b/codegen/ibc/applications/transfer/v1/transfer_pb.d.ts @@ -2,39 +2,6 @@ // file: ibc/applications/transfer/v1/transfer.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; - -export class FungibleTokenPacketData extends jspb.Message { - getDenom(): string; - setDenom(value: string): void; - - getAmount(): number; - setAmount(value: number): void; - - getSender(): string; - setSender(value: string): void; - - getReceiver(): string; - setReceiver(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FungibleTokenPacketData.AsObject; - static toObject(includeInstance: boolean, msg: FungibleTokenPacketData): FungibleTokenPacketData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FungibleTokenPacketData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FungibleTokenPacketData; - static deserializeBinaryFromReader(message: FungibleTokenPacketData, reader: jspb.BinaryReader): FungibleTokenPacketData; -} - -export namespace FungibleTokenPacketData { - export type AsObject = { - denom: string, - amount: number, - sender: string, - receiver: string, - } -} export class DenomTrace extends jspb.Message { getPath(): string; diff --git a/proto/ibc/applications/transfer/v1/transfer_pb.js b/codegen/ibc/applications/transfer/v1/transfer_pb.js similarity index 60% rename from proto/ibc/applications/transfer/v1/transfer_pb.js rename to codegen/ibc/applications/transfer/v1/transfer_pb.js index a03d8a4..5a8f33e 100644 --- a/proto/ibc/applications/transfer/v1/transfer_pb.js +++ b/codegen/ibc/applications/transfer/v1/transfer_pb.js @@ -13,34 +13,10 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.ibc.applications.transfer.v1.DenomTrace', null, global); -goog.exportSymbol('proto.ibc.applications.transfer.v1.FungibleTokenPacketData', null, global); goog.exportSymbol('proto.ibc.applications.transfer.v1.Params', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.applications.transfer.v1.FungibleTokenPacketData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.applications.transfer.v1.FungibleTokenPacketData.displayName = 'proto.ibc.applications.transfer.v1.FungibleTokenPacketData'; -} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -86,226 +62,6 @@ if (goog.DEBUG && !COMPILED) { -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.applications.transfer.v1.FungibleTokenPacketData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.applications.transfer.v1.FungibleTokenPacketData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.toObject = function(includeInstance, msg) { - var f, obj = { - denom: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - sender: jspb.Message.getFieldWithDefault(msg, 3, ""), - receiver: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.applications.transfer.v1.FungibleTokenPacketData} - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.applications.transfer.v1.FungibleTokenPacketData; - return proto.ibc.applications.transfer.v1.FungibleTokenPacketData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.applications.transfer.v1.FungibleTokenPacketData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.applications.transfer.v1.FungibleTokenPacketData} - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDenom(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmount(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setReceiver(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.applications.transfer.v1.FungibleTokenPacketData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.applications.transfer.v1.FungibleTokenPacketData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDenom(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getSender(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getReceiver(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional string denom = 1; - * @return {string} - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.getDenom = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.applications.transfer.v1.FungibleTokenPacketData} returns this - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.setDenom = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 amount = 2; - * @return {number} - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.applications.transfer.v1.FungibleTokenPacketData} returns this - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string sender = 3; - * @return {string} - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.applications.transfer.v1.FungibleTokenPacketData} returns this - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string receiver = 4; - * @return {string} - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.getReceiver = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.applications.transfer.v1.FungibleTokenPacketData} returns this - */ -proto.ibc.applications.transfer.v1.FungibleTokenPacketData.prototype.setReceiver = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. diff --git a/proto/ibc/applications/transfer/v1/transfer_pb_service.d.ts b/codegen/ibc/applications/transfer/v1/transfer_pb_service.d.ts similarity index 100% rename from proto/ibc/applications/transfer/v1/transfer_pb_service.d.ts rename to codegen/ibc/applications/transfer/v1/transfer_pb_service.d.ts diff --git a/proto/ibc/applications/transfer/v1/transfer_pb_service.js b/codegen/ibc/applications/transfer/v1/transfer_pb_service.js similarity index 100% rename from proto/ibc/applications/transfer/v1/transfer_pb_service.js rename to codegen/ibc/applications/transfer/v1/transfer_pb_service.js diff --git a/codegen/ibc/applications/transfer/v1/tx.ts b/codegen/ibc/applications/transfer/v1/tx.ts new file mode 100644 index 0000000..67007ba --- /dev/null +++ b/codegen/ibc/applications/transfer/v1/tx.ts @@ -0,0 +1,509 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/transfer/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../amino/amino"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as dependency_3 from "./../../../../cosmos/msg/v1/msg"; +import * as dependency_4 from "./../../../../cosmos/base/v1beta1/coin"; +import * as dependency_5 from "./../../../core/client/v1/client"; +import * as dependency_6 from "./transfer"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.applications.transfer.v1 { + export class MsgTransfer extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + source_port?: string; + source_channel?: string; + token?: dependency_4.cosmos.base.v1beta1.Coin; + sender?: string; + receiver?: string; + timeout_height?: dependency_5.ibc.core.client.v1.Height; + timeout_timestamp?: number; + memo?: 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 ("source_port" in data && data.source_port != undefined) { + this.source_port = data.source_port; + } + if ("source_channel" in data && data.source_channel != undefined) { + this.source_channel = data.source_channel; + } + if ("token" in data && data.token != undefined) { + this.token = data.token; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + if ("receiver" in data && data.receiver != undefined) { + this.receiver = data.receiver; + } + if ("timeout_height" in data && data.timeout_height != undefined) { + this.timeout_height = data.timeout_height; + } + if ("timeout_timestamp" in data && data.timeout_timestamp != undefined) { + this.timeout_timestamp = data.timeout_timestamp; + } + if ("memo" in data && data.memo != undefined) { + this.memo = data.memo; + } + } + } + get source_port() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set source_port(value: string) { + pb_1.Message.setField(this, 1, value); + } + get source_channel() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set source_channel(value: string) { + pb_1.Message.setField(this, 2, value); + } + get token() { + return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 3) as dependency_4.cosmos.base.v1beta1.Coin; + } + set token(value: dependency_4.cosmos.base.v1beta1.Coin) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_token() { + return pb_1.Message.getField(this, 3) != null; + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 4, value); + } + get receiver() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set receiver(value: string) { + pb_1.Message.setField(this, 5, value); + } + get timeout_height() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.client.v1.Height, 6) as dependency_5.ibc.core.client.v1.Height; + } + set timeout_height(value: dependency_5.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_timeout_height() { + return pb_1.Message.getField(this, 6) != null; + } + get timeout_timestamp() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set timeout_timestamp(value: number) { + pb_1.Message.setField(this, 7, value); + } + get memo() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set memo(value: string) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + source_port?: string; + source_channel?: string; + token?: ReturnType; + sender?: string; + receiver?: string; + timeout_height?: ReturnType; + timeout_timestamp?: number; + memo?: string; + }): MsgTransfer { + const message = new MsgTransfer({}); + if (data.source_port != null) { + message.source_port = data.source_port; + } + if (data.source_channel != null) { + message.source_channel = data.source_channel; + } + if (data.token != null) { + message.token = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.token); + } + if (data.sender != null) { + message.sender = data.sender; + } + if (data.receiver != null) { + message.receiver = data.receiver; + } + if (data.timeout_height != null) { + message.timeout_height = dependency_5.ibc.core.client.v1.Height.fromObject(data.timeout_height); + } + if (data.timeout_timestamp != null) { + message.timeout_timestamp = data.timeout_timestamp; + } + if (data.memo != null) { + message.memo = data.memo; + } + return message; + } + toObject() { + const data: { + source_port?: string; + source_channel?: string; + token?: ReturnType; + sender?: string; + receiver?: string; + timeout_height?: ReturnType; + timeout_timestamp?: number; + memo?: string; + } = {}; + if (this.source_port != null) { + data.source_port = this.source_port; + } + if (this.source_channel != null) { + data.source_channel = this.source_channel; + } + if (this.token != null) { + data.token = this.token.toObject(); + } + if (this.sender != null) { + data.sender = this.sender; + } + if (this.receiver != null) { + data.receiver = this.receiver; + } + if (this.timeout_height != null) { + data.timeout_height = this.timeout_height.toObject(); + } + if (this.timeout_timestamp != null) { + data.timeout_timestamp = this.timeout_timestamp; + } + if (this.memo != null) { + data.memo = this.memo; + } + 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.source_port.length) + writer.writeString(1, this.source_port); + if (this.source_channel.length) + writer.writeString(2, this.source_channel); + if (this.has_token) + writer.writeMessage(3, this.token, () => this.token.serialize(writer)); + if (this.sender.length) + writer.writeString(4, this.sender); + if (this.receiver.length) + writer.writeString(5, this.receiver); + if (this.has_timeout_height) + writer.writeMessage(6, this.timeout_height, () => this.timeout_height.serialize(writer)); + if (this.timeout_timestamp != 0) + writer.writeUint64(7, this.timeout_timestamp); + if (this.memo.length) + writer.writeString(8, this.memo); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTransfer { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTransfer(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.source_port = reader.readString(); + break; + case 2: + message.source_channel = reader.readString(); + break; + case 3: + reader.readMessage(message.token, () => message.token = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); + break; + case 4: + message.sender = reader.readString(); + break; + case 5: + message.receiver = reader.readString(); + break; + case 6: + reader.readMessage(message.timeout_height, () => message.timeout_height = dependency_5.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 7: + message.timeout_timestamp = reader.readUint64(); + break; + case 8: + message.memo = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTransfer { + return MsgTransfer.deserialize(bytes); + } + } + export class MsgTransferResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: 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 ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + sequence?: number; + }): MsgTransferResponse { + const message = new MsgTransferResponse({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + sequence?: number; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTransferResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTransferResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTransferResponse { + return MsgTransferResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer?: string; + params?: dependency_6.ibc.applications.transfer.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 ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_6.ibc.applications.transfer.v1.Params, 2) as dependency_6.ibc.applications.transfer.v1.Params; + } + set params(value: dependency_6.ibc.applications.transfer.v1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + signer?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.signer != null) { + message.signer = data.signer; + } + if (data.params != null) { + message.params = dependency_6.ibc.applications.transfer.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + signer?: string; + params?: ReturnType; + } = {}; + if (this.signer != null) { + data.signer = this.signer; + } + 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.signer.length) + writer.writeString(1, this.signer); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signer = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_6.ibc.applications.transfer.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + Transfer: { + path: "/ibc.applications.transfer.v1.Msg/Transfer", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgTransfer) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgTransfer.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgTransferResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgTransferResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateParams: { + path: "/ibc.applications.transfer.v1.Msg/UpdateParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Transfer(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Transfer: GrpcUnaryServiceInterface = (message: MsgTransfer, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Transfer(message, metadata, options, callback); + }; + UpdateParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/ibc/applications/transfer/v1/tx_pb.d.ts b/codegen/ibc/applications/transfer/v1/tx_pb.d.ts similarity index 54% rename from proto/ibc/applications/transfer/v1/tx_pb.d.ts rename to codegen/ibc/applications/transfer/v1/tx_pb.d.ts index 931f166..72b7cc3 100644 --- a/proto/ibc/applications/transfer/v1/tx_pb.d.ts +++ b/codegen/ibc/applications/transfer/v1/tx_pb.d.ts @@ -2,9 +2,12 @@ // file: ibc/applications/transfer/v1/tx.proto import * as jspb from "google-protobuf"; +import * as amino_amino_pb from "../../../../amino/amino_pb"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../../cosmos/msg/v1/msg_pb"; import * as cosmos_base_v1beta1_coin_pb from "../../../../cosmos/base/v1beta1/coin_pb"; import * as ibc_core_client_v1_client_pb from "../../../../ibc/core/client/v1/client_pb"; +import * as ibc_applications_transfer_v1_transfer_pb from "../../../../ibc/applications/transfer/v1/transfer_pb"; export class MsgTransfer extends jspb.Message { getSourcePort(): string; @@ -32,6 +35,9 @@ export class MsgTransfer extends jspb.Message { getTimeoutTimestamp(): number; setTimeoutTimestamp(value: number): void; + getMemo(): string; + setMemo(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgTransfer.AsObject; static toObject(includeInstance: boolean, msg: MsgTransfer): MsgTransfer.AsObject; @@ -51,10 +57,14 @@ export namespace MsgTransfer { receiver: string, timeoutHeight?: ibc_core_client_v1_client_pb.Height.AsObject, timeoutTimestamp: number, + memo: string, } } export class MsgTransferResponse extends jspb.Message { + getSequence(): number; + setSequence(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgTransferResponse.AsObject; static toObject(includeInstance: boolean, msg: MsgTransferResponse): MsgTransferResponse.AsObject; @@ -66,6 +76,49 @@ export class MsgTransferResponse extends jspb.Message { } export namespace MsgTransferResponse { + export type AsObject = { + sequence: number, + } +} + +export class MsgUpdateParams extends jspb.Message { + getSigner(): string; + setSigner(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_applications_transfer_v1_transfer_pb.Params | undefined; + setParams(value?: ibc_applications_transfer_v1_transfer_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + signer: string, + params?: ibc_applications_transfer_v1_transfer_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { export type AsObject = { } } diff --git a/proto/ibc/applications/transfer/v1/tx_pb.js b/codegen/ibc/applications/transfer/v1/tx_pb.js similarity index 55% rename from proto/ibc/applications/transfer/v1/tx_pb.js rename to codegen/ibc/applications/transfer/v1/tx_pb.js index e8b386b..2d2bafd 100644 --- a/proto/ibc/applications/transfer/v1/tx_pb.js +++ b/codegen/ibc/applications/transfer/v1/tx_pb.js @@ -13,16 +13,24 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var amino_amino_pb = require('../../../../amino/amino_pb.js'); +goog.object.extend(proto, amino_amino_pb); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_msg_v1_msg_pb = require('../../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); var cosmos_base_v1beta1_coin_pb = require('../../../../cosmos/base/v1beta1/coin_pb.js'); goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); goog.object.extend(proto, ibc_core_client_v1_client_pb); +var ibc_applications_transfer_v1_transfer_pb = require('../../../../ibc/applications/transfer/v1/transfer_pb.js'); +goog.object.extend(proto, ibc_applications_transfer_v1_transfer_pb); goog.exportSymbol('proto.ibc.applications.transfer.v1.MsgTransfer', null, global); goog.exportSymbol('proto.ibc.applications.transfer.v1.MsgTransferResponse', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -65,6 +73,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.applications.transfer.v1.MsgTransferResponse.displayName = 'proto.ibc.applications.transfer.v1.MsgTransferResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.MsgUpdateParams.displayName = 'proto.ibc.applications.transfer.v1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.displayName = 'proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse'; +} @@ -103,7 +153,8 @@ proto.ibc.applications.transfer.v1.MsgTransfer.toObject = function(includeInstan sender: jspb.Message.getFieldWithDefault(msg, 4, ""), receiver: jspb.Message.getFieldWithDefault(msg, 5, ""), timeoutHeight: (f = msg.getTimeoutHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - timeoutTimestamp: jspb.Message.getFieldWithDefault(msg, 7, 0) + timeoutTimestamp: jspb.Message.getFieldWithDefault(msg, 7, 0), + memo: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -170,6 +221,10 @@ proto.ibc.applications.transfer.v1.MsgTransfer.deserializeBinaryFromReader = fun var value = /** @type {number} */ (reader.readUint64()); msg.setTimeoutTimestamp(value); break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; default: reader.skipField(); break; @@ -250,6 +305,13 @@ proto.ibc.applications.transfer.v1.MsgTransfer.serializeBinaryToWriter = functio f ); } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -417,6 +479,24 @@ proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setTimeoutTimestamp = f }; +/** + * optional string memo = 8; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + @@ -449,7 +529,7 @@ proto.ibc.applications.transfer.v1.MsgTransferResponse.prototype.toObject = func */ proto.ibc.applications.transfer.v1.MsgTransferResponse.toObject = function(includeInstance, msg) { var f, obj = { - + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -486,6 +566,10 @@ proto.ibc.applications.transfer.v1.MsgTransferResponse.deserializeBinaryFromRead } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; default: reader.skipField(); break; @@ -515,6 +599,313 @@ proto.ibc.applications.transfer.v1.MsgTransferResponse.prototype.serializeBinary */ proto.ibc.applications.transfer.v1.MsgTransferResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransferResponse} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + signer: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && ibc_applications_transfer_v1_transfer_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.MsgUpdateParams} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.MsgUpdateParams; + return proto.ibc.applications.transfer.v1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.MsgUpdateParams} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 2: + var value = new ibc_applications_transfer_v1_transfer_pb.Params; + reader.readMessage(value,ibc_applications_transfer_v1_transfer_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_applications_transfer_v1_transfer_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string signer = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgUpdateParams} returns this + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Params params = 2; + * @return {?proto.ibc.applications.transfer.v1.Params} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.transfer.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_transfer_v1_transfer_pb.Params, 2)); +}; + + +/** + * @param {?proto.ibc.applications.transfer.v1.Params|undefined} value + * @return {!proto.ibc.applications.transfer.v1.MsgUpdateParams} returns this +*/ +proto.ibc.applications.transfer.v1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.MsgUpdateParams} returns this + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse; + return proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; diff --git a/proto/ibc/applications/transfer/v1/tx_pb_service.d.ts b/codegen/ibc/applications/transfer/v1/tx_pb_service.d.ts similarity index 72% rename from proto/ibc/applications/transfer/v1/tx_pb_service.d.ts rename to codegen/ibc/applications/transfer/v1/tx_pb_service.d.ts index eca520a..31331aa 100644 --- a/proto/ibc/applications/transfer/v1/tx_pb_service.d.ts +++ b/codegen/ibc/applications/transfer/v1/tx_pb_service.d.ts @@ -13,9 +13,19 @@ type MsgTransfer = { readonly responseType: typeof ibc_applications_transfer_v1_tx_pb.MsgTransferResponse; }; +type MsgUpdateParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_applications_transfer_v1_tx_pb.MsgUpdateParams; + readonly responseType: typeof ibc_applications_transfer_v1_tx_pb.MsgUpdateParamsResponse; +}; + export class Msg { static readonly serviceName: string; static readonly Transfer: MsgTransfer; + static readonly UpdateParams: MsgUpdateParams; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -59,5 +69,14 @@ export class MsgClient { requestMessage: ibc_applications_transfer_v1_tx_pb.MsgTransfer, callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_tx_pb.MsgTransferResponse|null) => void ): UnaryResponse; + updateParams( + requestMessage: ibc_applications_transfer_v1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateParams( + requestMessage: ibc_applications_transfer_v1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: ibc_applications_transfer_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; } diff --git a/proto/ibc/applications/transfer/v1/tx_pb_service.js b/codegen/ibc/applications/transfer/v1/tx_pb_service.js similarity index 59% rename from proto/ibc/applications/transfer/v1/tx_pb_service.js rename to codegen/ibc/applications/transfer/v1/tx_pb_service.js index 6e19f10..d97a335 100644 --- a/proto/ibc/applications/transfer/v1/tx_pb_service.js +++ b/codegen/ibc/applications/transfer/v1/tx_pb_service.js @@ -19,6 +19,15 @@ Msg.Transfer = { responseType: ibc_applications_transfer_v1_tx_pb.MsgTransferResponse }; +Msg.UpdateParams = { + methodName: "UpdateParams", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_applications_transfer_v1_tx_pb.MsgUpdateParams, + responseType: ibc_applications_transfer_v1_tx_pb.MsgUpdateParamsResponse +}; + exports.Msg = Msg; function MsgClient(serviceHost, options) { @@ -57,5 +66,36 @@ MsgClient.prototype.transfer = function transfer(requestMessage, metadata, callb }; }; +MsgClient.prototype.updateParams = function updateParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.MsgClient = MsgClient; diff --git a/codegen/ibc/applications/transfer/v2/packet.ts b/codegen/ibc/applications/transfer/v2/packet.ts new file mode 100644 index 0000000..be72bb6 --- /dev/null +++ b/codegen/ibc/applications/transfer/v2/packet.ts @@ -0,0 +1,167 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/applications/transfer/v2/packet.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace ibc.applications.transfer.v2 { + export class FungibleTokenPacketData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + denom?: string; + amount?: string; + sender?: string; + receiver?: string; + memo?: 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 ("denom" in data && data.denom != undefined) { + this.denom = data.denom; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + if ("receiver" in data && data.receiver != undefined) { + this.receiver = data.receiver; + } + if ("memo" in data && data.memo != undefined) { + this.memo = data.memo; + } + } + } + get denom() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set denom(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set amount(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 3, value); + } + get receiver() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set receiver(value: string) { + pb_1.Message.setField(this, 4, value); + } + get memo() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set memo(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + denom?: string; + amount?: string; + sender?: string; + receiver?: string; + memo?: string; + }): FungibleTokenPacketData { + const message = new FungibleTokenPacketData({}); + if (data.denom != null) { + message.denom = data.denom; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.sender != null) { + message.sender = data.sender; + } + if (data.receiver != null) { + message.receiver = data.receiver; + } + if (data.memo != null) { + message.memo = data.memo; + } + return message; + } + toObject() { + const data: { + denom?: string; + amount?: string; + sender?: string; + receiver?: string; + memo?: string; + } = {}; + if (this.denom != null) { + data.denom = this.denom; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.sender != null) { + data.sender = this.sender; + } + if (this.receiver != null) { + data.receiver = this.receiver; + } + if (this.memo != null) { + data.memo = this.memo; + } + 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.denom.length) + writer.writeString(1, this.denom); + if (this.amount.length) + writer.writeString(2, this.amount); + if (this.sender.length) + writer.writeString(3, this.sender); + if (this.receiver.length) + writer.writeString(4, this.receiver); + if (this.memo.length) + writer.writeString(5, this.memo); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FungibleTokenPacketData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FungibleTokenPacketData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.denom = reader.readString(); + break; + case 2: + message.amount = reader.readString(); + break; + case 3: + message.sender = reader.readString(); + break; + case 4: + message.receiver = reader.readString(); + break; + case 5: + message.memo = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FungibleTokenPacketData { + return FungibleTokenPacketData.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/applications/transfer/v2/packet_pb.d.ts b/codegen/ibc/applications/transfer/v2/packet_pb.d.ts new file mode 100644 index 0000000..0272d56 --- /dev/null +++ b/codegen/ibc/applications/transfer/v2/packet_pb.d.ts @@ -0,0 +1,41 @@ +// package: ibc.applications.transfer.v2 +// file: ibc/applications/transfer/v2/packet.proto + +import * as jspb from "google-protobuf"; + +export class FungibleTokenPacketData extends jspb.Message { + getDenom(): string; + setDenom(value: string): void; + + getAmount(): string; + setAmount(value: string): void; + + getSender(): string; + setSender(value: string): void; + + getReceiver(): string; + setReceiver(value: string): void; + + getMemo(): string; + setMemo(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FungibleTokenPacketData.AsObject; + static toObject(includeInstance: boolean, msg: FungibleTokenPacketData): FungibleTokenPacketData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FungibleTokenPacketData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FungibleTokenPacketData; + static deserializeBinaryFromReader(message: FungibleTokenPacketData, reader: jspb.BinaryReader): FungibleTokenPacketData; +} + +export namespace FungibleTokenPacketData { + export type AsObject = { + denom: string, + amount: string, + sender: string, + receiver: string, + memo: string, + } +} + diff --git a/codegen/ibc/applications/transfer/v2/packet_pb.js b/codegen/ibc/applications/transfer/v2/packet_pb.js new file mode 100644 index 0000000..cbae03e --- /dev/null +++ b/codegen/ibc/applications/transfer/v2/packet_pb.js @@ -0,0 +1,290 @@ +// source: ibc/applications/transfer/v2/packet.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.ibc.applications.transfer.v2.FungibleTokenPacketData', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v2.FungibleTokenPacketData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v2.FungibleTokenPacketData.displayName = 'proto.ibc.applications.transfer.v2.FungibleTokenPacketData'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v2.FungibleTokenPacketData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, ""), + sender: jspb.Message.getFieldWithDefault(msg, 3, ""), + receiver: jspb.Message.getFieldWithDefault(msg, 4, ""), + memo: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v2.FungibleTokenPacketData; + return proto.ibc.applications.transfer.v2.FungibleTokenPacketData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDenom(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiver(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v2.FungibleTokenPacketData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getReceiver(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} returns this + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string amount = 2; + * @return {string} + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.getAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} returns this + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.setAmount = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} returns this + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string receiver = 4; + * @return {string} + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.getReceiver = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} returns this + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.setReceiver = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string memo = 5; + * @return {string} + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v2.FungibleTokenPacketData} returns this + */ +proto.ibc.applications.transfer.v2.FungibleTokenPacketData.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v2); diff --git a/codegen/ibc/applications/transfer/v2/packet_pb_service.d.ts b/codegen/ibc/applications/transfer/v2/packet_pb_service.d.ts new file mode 100644 index 0000000..e040dfb --- /dev/null +++ b/codegen/ibc/applications/transfer/v2/packet_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.applications.transfer.v2 +// file: ibc/applications/transfer/v2/packet.proto + diff --git a/codegen/ibc/applications/transfer/v2/packet_pb_service.js b/codegen/ibc/applications/transfer/v2/packet_pb_service.js new file mode 100644 index 0000000..e040dfb --- /dev/null +++ b/codegen/ibc/applications/transfer/v2/packet_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.applications.transfer.v2 +// file: ibc/applications/transfer/v2/packet.proto + diff --git a/codegen/ibc/core/channel/v1/channel.ts b/codegen/ibc/core/channel/v1/channel.ts new file mode 100644 index 0000000..1bc07f6 --- /dev/null +++ b/codegen/ibc/core/channel/v1/channel.ts @@ -0,0 +1,1282 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/channel/v1/channel.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../client/v1/client"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.core.channel.v1 { + export enum State { + STATE_UNINITIALIZED_UNSPECIFIED = 0, + STATE_INIT = 1, + STATE_TRYOPEN = 2, + STATE_OPEN = 3, + STATE_CLOSED = 4, + STATE_FLUSHING = 5, + STATE_FLUSHCOMPLETE = 6 + } + export enum Order { + ORDER_NONE_UNSPECIFIED = 0, + ORDER_UNORDERED = 1, + ORDER_ORDERED = 2 + } + export class Channel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + state?: State; + ordering?: Order; + counterparty?: Counterparty; + connection_hops?: string[]; + version?: string; + upgrade_sequence?: 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 ("state" in data && data.state != undefined) { + this.state = data.state; + } + if ("ordering" in data && data.ordering != undefined) { + this.ordering = data.ordering; + } + if ("counterparty" in data && data.counterparty != undefined) { + this.counterparty = data.counterparty; + } + if ("connection_hops" in data && data.connection_hops != undefined) { + this.connection_hops = data.connection_hops; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("upgrade_sequence" in data && data.upgrade_sequence != undefined) { + this.upgrade_sequence = data.upgrade_sequence; + } + } + } + get state() { + return pb_1.Message.getFieldWithDefault(this, 1, State.STATE_UNINITIALIZED_UNSPECIFIED) as State; + } + set state(value: State) { + pb_1.Message.setField(this, 1, value); + } + get ordering() { + return pb_1.Message.getFieldWithDefault(this, 2, Order.ORDER_NONE_UNSPECIFIED) as Order; + } + set ordering(value: Order) { + pb_1.Message.setField(this, 2, value); + } + get counterparty() { + return pb_1.Message.getWrapperField(this, Counterparty, 3) as Counterparty; + } + set counterparty(value: Counterparty) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_counterparty() { + return pb_1.Message.getField(this, 3) != null; + } + get connection_hops() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as string[]; + } + set connection_hops(value: string[]) { + pb_1.Message.setField(this, 4, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 5, value); + } + get upgrade_sequence() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set upgrade_sequence(value: number) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + state?: State; + ordering?: Order; + counterparty?: ReturnType; + connection_hops?: string[]; + version?: string; + upgrade_sequence?: number; + }): Channel { + const message = new Channel({}); + if (data.state != null) { + message.state = data.state; + } + if (data.ordering != null) { + message.ordering = data.ordering; + } + if (data.counterparty != null) { + message.counterparty = Counterparty.fromObject(data.counterparty); + } + if (data.connection_hops != null) { + message.connection_hops = data.connection_hops; + } + if (data.version != null) { + message.version = data.version; + } + if (data.upgrade_sequence != null) { + message.upgrade_sequence = data.upgrade_sequence; + } + return message; + } + toObject() { + const data: { + state?: State; + ordering?: Order; + counterparty?: ReturnType; + connection_hops?: string[]; + version?: string; + upgrade_sequence?: number; + } = {}; + if (this.state != null) { + data.state = this.state; + } + if (this.ordering != null) { + data.ordering = this.ordering; + } + if (this.counterparty != null) { + data.counterparty = this.counterparty.toObject(); + } + if (this.connection_hops != null) { + data.connection_hops = this.connection_hops; + } + if (this.version != null) { + data.version = this.version; + } + if (this.upgrade_sequence != null) { + data.upgrade_sequence = this.upgrade_sequence; + } + 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.state != State.STATE_UNINITIALIZED_UNSPECIFIED) + writer.writeEnum(1, this.state); + if (this.ordering != Order.ORDER_NONE_UNSPECIFIED) + writer.writeEnum(2, this.ordering); + if (this.has_counterparty) + writer.writeMessage(3, this.counterparty, () => this.counterparty.serialize(writer)); + if (this.connection_hops.length) + writer.writeRepeatedString(4, this.connection_hops); + if (this.version.length) + writer.writeString(5, this.version); + if (this.upgrade_sequence != 0) + writer.writeUint64(6, this.upgrade_sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Channel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Channel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.state = reader.readEnum(); + break; + case 2: + message.ordering = reader.readEnum(); + break; + case 3: + reader.readMessage(message.counterparty, () => message.counterparty = Counterparty.deserialize(reader)); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readString()); + break; + case 5: + message.version = reader.readString(); + break; + case 6: + message.upgrade_sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Channel { + return Channel.deserialize(bytes); + } + } + export class IdentifiedChannel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + state?: State; + ordering?: Order; + counterparty?: Counterparty; + connection_hops?: string[]; + version?: string; + port_id?: string; + channel_id?: string; + upgrade_sequence?: 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 ("state" in data && data.state != undefined) { + this.state = data.state; + } + if ("ordering" in data && data.ordering != undefined) { + this.ordering = data.ordering; + } + if ("counterparty" in data && data.counterparty != undefined) { + this.counterparty = data.counterparty; + } + if ("connection_hops" in data && data.connection_hops != undefined) { + this.connection_hops = data.connection_hops; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("upgrade_sequence" in data && data.upgrade_sequence != undefined) { + this.upgrade_sequence = data.upgrade_sequence; + } + } + } + get state() { + return pb_1.Message.getFieldWithDefault(this, 1, State.STATE_UNINITIALIZED_UNSPECIFIED) as State; + } + set state(value: State) { + pb_1.Message.setField(this, 1, value); + } + get ordering() { + return pb_1.Message.getFieldWithDefault(this, 2, Order.ORDER_NONE_UNSPECIFIED) as Order; + } + set ordering(value: Order) { + pb_1.Message.setField(this, 2, value); + } + get counterparty() { + return pb_1.Message.getWrapperField(this, Counterparty, 3) as Counterparty; + } + set counterparty(value: Counterparty) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_counterparty() { + return pb_1.Message.getField(this, 3) != null; + } + get connection_hops() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as string[]; + } + set connection_hops(value: string[]) { + pb_1.Message.setField(this, 4, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 5, value); + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 6, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 7, value); + } + get upgrade_sequence() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set upgrade_sequence(value: number) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + state?: State; + ordering?: Order; + counterparty?: ReturnType; + connection_hops?: string[]; + version?: string; + port_id?: string; + channel_id?: string; + upgrade_sequence?: number; + }): IdentifiedChannel { + const message = new IdentifiedChannel({}); + if (data.state != null) { + message.state = data.state; + } + if (data.ordering != null) { + message.ordering = data.ordering; + } + if (data.counterparty != null) { + message.counterparty = Counterparty.fromObject(data.counterparty); + } + if (data.connection_hops != null) { + message.connection_hops = data.connection_hops; + } + if (data.version != null) { + message.version = data.version; + } + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.upgrade_sequence != null) { + message.upgrade_sequence = data.upgrade_sequence; + } + return message; + } + toObject() { + const data: { + state?: State; + ordering?: Order; + counterparty?: ReturnType; + connection_hops?: string[]; + version?: string; + port_id?: string; + channel_id?: string; + upgrade_sequence?: number; + } = {}; + if (this.state != null) { + data.state = this.state; + } + if (this.ordering != null) { + data.ordering = this.ordering; + } + if (this.counterparty != null) { + data.counterparty = this.counterparty.toObject(); + } + if (this.connection_hops != null) { + data.connection_hops = this.connection_hops; + } + if (this.version != null) { + data.version = this.version; + } + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.upgrade_sequence != null) { + data.upgrade_sequence = this.upgrade_sequence; + } + 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.state != State.STATE_UNINITIALIZED_UNSPECIFIED) + writer.writeEnum(1, this.state); + if (this.ordering != Order.ORDER_NONE_UNSPECIFIED) + writer.writeEnum(2, this.ordering); + if (this.has_counterparty) + writer.writeMessage(3, this.counterparty, () => this.counterparty.serialize(writer)); + if (this.connection_hops.length) + writer.writeRepeatedString(4, this.connection_hops); + if (this.version.length) + writer.writeString(5, this.version); + if (this.port_id.length) + writer.writeString(6, this.port_id); + if (this.channel_id.length) + writer.writeString(7, this.channel_id); + if (this.upgrade_sequence != 0) + writer.writeUint64(8, this.upgrade_sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IdentifiedChannel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IdentifiedChannel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.state = reader.readEnum(); + break; + case 2: + message.ordering = reader.readEnum(); + break; + case 3: + reader.readMessage(message.counterparty, () => message.counterparty = Counterparty.deserialize(reader)); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readString()); + break; + case 5: + message.version = reader.readString(); + break; + case 6: + message.port_id = reader.readString(); + break; + case 7: + message.channel_id = reader.readString(); + break; + case 8: + message.upgrade_sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IdentifiedChannel { + return IdentifiedChannel.deserialize(bytes); + } + } + export class Counterparty extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): Counterparty { + const message = new Counterparty({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Counterparty { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Counterparty(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Counterparty { + return Counterparty.deserialize(bytes); + } + } + export class Packet extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: number; + source_port?: string; + source_channel?: string; + destination_port?: string; + destination_channel?: string; + data?: Uint8Array; + timeout_height?: dependency_2.ibc.core.client.v1.Height; + timeout_timestamp?: 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 ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("source_port" in data && data.source_port != undefined) { + this.source_port = data.source_port; + } + if ("source_channel" in data && data.source_channel != undefined) { + this.source_channel = data.source_channel; + } + if ("destination_port" in data && data.destination_port != undefined) { + this.destination_port = data.destination_port; + } + if ("destination_channel" in data && data.destination_channel != undefined) { + this.destination_channel = data.destination_channel; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("timeout_height" in data && data.timeout_height != undefined) { + this.timeout_height = data.timeout_height; + } + if ("timeout_timestamp" in data && data.timeout_timestamp != undefined) { + this.timeout_timestamp = data.timeout_timestamp; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + get source_port() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set source_port(value: string) { + pb_1.Message.setField(this, 2, value); + } + get source_channel() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set source_channel(value: string) { + pb_1.Message.setField(this, 3, value); + } + get destination_port() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set destination_port(value: string) { + pb_1.Message.setField(this, 4, value); + } + get destination_channel() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set destination_channel(value: string) { + pb_1.Message.setField(this, 5, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get timeout_height() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.core.client.v1.Height, 7) as dependency_2.ibc.core.client.v1.Height; + } + set timeout_height(value: dependency_2.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_timeout_height() { + return pb_1.Message.getField(this, 7) != null; + } + get timeout_timestamp() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set timeout_timestamp(value: number) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + sequence?: number; + source_port?: string; + source_channel?: string; + destination_port?: string; + destination_channel?: string; + data?: Uint8Array; + timeout_height?: ReturnType; + timeout_timestamp?: number; + }): Packet { + const message = new Packet({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.source_port != null) { + message.source_port = data.source_port; + } + if (data.source_channel != null) { + message.source_channel = data.source_channel; + } + if (data.destination_port != null) { + message.destination_port = data.destination_port; + } + if (data.destination_channel != null) { + message.destination_channel = data.destination_channel; + } + if (data.data != null) { + message.data = data.data; + } + if (data.timeout_height != null) { + message.timeout_height = dependency_2.ibc.core.client.v1.Height.fromObject(data.timeout_height); + } + if (data.timeout_timestamp != null) { + message.timeout_timestamp = data.timeout_timestamp; + } + return message; + } + toObject() { + const data: { + sequence?: number; + source_port?: string; + source_channel?: string; + destination_port?: string; + destination_channel?: string; + data?: Uint8Array; + timeout_height?: ReturnType; + timeout_timestamp?: number; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.source_port != null) { + data.source_port = this.source_port; + } + if (this.source_channel != null) { + data.source_channel = this.source_channel; + } + if (this.destination_port != null) { + data.destination_port = this.destination_port; + } + if (this.destination_channel != null) { + data.destination_channel = this.destination_channel; + } + if (this.data != null) { + data.data = this.data; + } + if (this.timeout_height != null) { + data.timeout_height = this.timeout_height.toObject(); + } + if (this.timeout_timestamp != null) { + data.timeout_timestamp = this.timeout_timestamp; + } + 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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (this.source_port.length) + writer.writeString(2, this.source_port); + if (this.source_channel.length) + writer.writeString(3, this.source_channel); + if (this.destination_port.length) + writer.writeString(4, this.destination_port); + if (this.destination_channel.length) + writer.writeString(5, this.destination_channel); + if (this.data.length) + writer.writeBytes(6, this.data); + if (this.has_timeout_height) + writer.writeMessage(7, this.timeout_height, () => this.timeout_height.serialize(writer)); + if (this.timeout_timestamp != 0) + writer.writeUint64(8, this.timeout_timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Packet { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Packet(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + case 2: + message.source_port = reader.readString(); + break; + case 3: + message.source_channel = reader.readString(); + break; + case 4: + message.destination_port = reader.readString(); + break; + case 5: + message.destination_channel = reader.readString(); + break; + case 6: + message.data = reader.readBytes(); + break; + case 7: + reader.readMessage(message.timeout_height, () => message.timeout_height = dependency_2.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 8: + message.timeout_timestamp = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Packet { + return Packet.deserialize(bytes); + } + } + export class PacketState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + sequence?: number; + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 3, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + sequence?: number; + data?: Uint8Array; + }): PacketState { + const message = new PacketState({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + sequence?: number; + data?: Uint8Array; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.data != null) { + data.data = this.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 (this.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.sequence != 0) + writer.writeUint64(3, this.sequence); + if (this.data.length) + writer.writeBytes(4, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PacketState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PacketState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.sequence = reader.readUint64(); + break; + case 4: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PacketState { + return PacketState.deserialize(bytes); + } + } + export class PacketId extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + sequence?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + sequence?: number; + }): PacketId { + const message = new PacketId({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + sequence?: number; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.sequence != 0) + writer.writeUint64(3, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PacketId { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PacketId(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PacketId { + return PacketId.deserialize(bytes); + } + } + export class Acknowledgement extends pb_1.Message { + #one_of_decls: number[][] = [[21, 22]]; + constructor(data?: any[] | ({} & (({ + result?: Uint8Array; + error?: never; + } | { + result?: never; + error?: 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 ("result" in data && data.result != undefined) { + this.result = data.result; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 21, new Uint8Array(0)) as Uint8Array; + } + set result(value: Uint8Array) { + pb_1.Message.setOneofField(this, 21, this.#one_of_decls[0], value); + } + get has_result() { + return pb_1.Message.getField(this, 21) != null; + } + get error() { + return pb_1.Message.getFieldWithDefault(this, 22, "") as string; + } + set error(value: string) { + pb_1.Message.setOneofField(this, 22, this.#one_of_decls[0], value); + } + get has_error() { + return pb_1.Message.getField(this, 22) != null; + } + get response() { + const cases: { + [index: number]: "none" | "result" | "error"; + } = { + 0: "none", + 21: "result", + 22: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [21, 22])]; + } + static fromObject(data: { + result?: Uint8Array; + error?: string; + }): Acknowledgement { + const message = new Acknowledgement({}); + if (data.result != null) { + message.result = data.result; + } + if (data.error != null) { + message.error = data.error; + } + return message; + } + toObject() { + const data: { + result?: Uint8Array; + error?: string; + } = {}; + if (this.result != null) { + data.result = this.result; + } + if (this.error != null) { + data.error = this.error; + } + 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_result) + writer.writeBytes(21, this.result); + if (this.has_error) + writer.writeString(22, this.error); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Acknowledgement { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Acknowledgement(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 21: + message.result = reader.readBytes(); + break; + case 22: + message.error = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Acknowledgement { + return Acknowledgement.deserialize(bytes); + } + } + export class Timeout extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: dependency_2.ibc.core.client.v1.Height; + timestamp?: 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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get height() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.core.client.v1.Height, 1) as dependency_2.ibc.core.client.v1.Height; + } + set height(value: dependency_2.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_height() { + return pb_1.Message.getField(this, 1) != null; + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + height?: ReturnType; + timestamp?: number; + }): Timeout { + const message = new Timeout({}); + if (data.height != null) { + message.height = dependency_2.ibc.core.client.v1.Height.fromObject(data.height); + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + return message; + } + toObject() { + const data: { + height?: ReturnType; + timestamp?: number; + } = {}; + if (this.height != null) { + data.height = this.height.toObject(); + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + 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_height) + writer.writeMessage(1, this.height, () => this.height.serialize(writer)); + if (this.timestamp != 0) + writer.writeUint64(2, this.timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Timeout { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Timeout(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.height, () => message.height = dependency_2.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 2: + message.timestamp = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Timeout { + return Timeout.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + upgrade_timeout?: Timeout; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("upgrade_timeout" in data && data.upgrade_timeout != undefined) { + this.upgrade_timeout = data.upgrade_timeout; + } + } + } + get upgrade_timeout() { + return pb_1.Message.getWrapperField(this, Timeout, 1) as Timeout; + } + set upgrade_timeout(value: Timeout) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_upgrade_timeout() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + upgrade_timeout?: ReturnType; + }): Params { + const message = new Params({}); + if (data.upgrade_timeout != null) { + message.upgrade_timeout = Timeout.fromObject(data.upgrade_timeout); + } + return message; + } + toObject() { + const data: { + upgrade_timeout?: ReturnType; + } = {}; + if (this.upgrade_timeout != null) { + data.upgrade_timeout = this.upgrade_timeout.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_upgrade_timeout) + writer.writeMessage(1, this.upgrade_timeout, () => this.upgrade_timeout.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.upgrade_timeout, () => message.upgrade_timeout = Timeout.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/proto/ibc/core/channel/v1/channel_pb.d.ts b/codegen/ibc/core/channel/v1/channel_pb.d.ts similarity index 74% rename from proto/ibc/core/channel/v1/channel_pb.d.ts rename to codegen/ibc/core/channel/v1/channel_pb.d.ts index f85dd3d..0a5b5b9 100644 --- a/proto/ibc/core/channel/v1/channel_pb.d.ts +++ b/codegen/ibc/core/channel/v1/channel_pb.d.ts @@ -25,6 +25,9 @@ export class Channel extends jspb.Message { getVersion(): string; setVersion(value: string): void; + getUpgradeSequence(): number; + setUpgradeSequence(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Channel.AsObject; static toObject(includeInstance: boolean, msg: Channel): Channel.AsObject; @@ -42,6 +45,7 @@ export namespace Channel { counterparty?: Counterparty.AsObject, connectionHopsList: Array, version: string, + upgradeSequence: number, } } @@ -71,6 +75,9 @@ export class IdentifiedChannel extends jspb.Message { getChannelId(): string; setChannelId(value: string): void; + getUpgradeSequence(): number; + setUpgradeSequence(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): IdentifiedChannel.AsObject; static toObject(includeInstance: boolean, msg: IdentifiedChannel): IdentifiedChannel.AsObject; @@ -90,6 +97,7 @@ export namespace IdentifiedChannel { version: string, portId: string, channelId: string, + upgradeSequence: number, } } @@ -203,6 +211,34 @@ export namespace PacketState { } } +export class PacketId extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getSequence(): number; + setSequence(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PacketId.AsObject; + static toObject(includeInstance: boolean, msg: PacketId): PacketId.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PacketId, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PacketId; + static deserializeBinaryFromReader(message: PacketId, reader: jspb.BinaryReader): PacketId; +} + +export namespace PacketId { + export type AsObject = { + portId: string, + channelId: string, + sequence: number, + } +} + export class Acknowledgement extends jspb.Message { hasResult(): boolean; clearResult(): void; @@ -240,12 +276,62 @@ export namespace Acknowledgement { } } +export class Timeout extends jspb.Message { + hasHeight(): boolean; + clearHeight(): void; + getHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getTimestamp(): number; + setTimestamp(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Timeout.AsObject; + static toObject(includeInstance: boolean, msg: Timeout): Timeout.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Timeout, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Timeout; + static deserializeBinaryFromReader(message: Timeout, reader: jspb.BinaryReader): Timeout; +} + +export namespace Timeout { + export type AsObject = { + height?: ibc_core_client_v1_client_pb.Height.AsObject, + timestamp: number, + } +} + +export class Params extends jspb.Message { + hasUpgradeTimeout(): boolean; + clearUpgradeTimeout(): void; + getUpgradeTimeout(): Timeout | undefined; + setUpgradeTimeout(value?: Timeout): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + upgradeTimeout?: Timeout.AsObject, + } +} + export interface StateMap { STATE_UNINITIALIZED_UNSPECIFIED: 0; STATE_INIT: 1; STATE_TRYOPEN: 2; STATE_OPEN: 3; STATE_CLOSED: 4; + STATE_FLUSHING: 5; + STATE_FLUSHCOMPLETE: 6; } export const State: StateMap; diff --git a/proto/ibc/core/channel/v1/channel_pb.js b/codegen/ibc/core/channel/v1/channel_pb.js similarity index 73% rename from proto/ibc/core/channel/v1/channel_pb.js rename to codegen/ibc/core/channel/v1/channel_pb.js index 616ebca..e3cab8b 100644 --- a/proto/ibc/core/channel/v1/channel_pb.js +++ b/codegen/ibc/core/channel/v1/channel_pb.js @@ -13,7 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); @@ -26,8 +26,11 @@ goog.exportSymbol('proto.ibc.core.channel.v1.Counterparty', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.IdentifiedChannel', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.Order', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.Packet', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.PacketId', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.PacketState', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.Params', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.State', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.Timeout', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -133,6 +136,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.channel.v1.PacketState.displayName = 'proto.ibc.core.channel.v1.PacketState'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.PacketId = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.PacketId, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.PacketId.displayName = 'proto.ibc.core.channel.v1.PacketId'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -154,6 +178,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.channel.v1.Acknowledgement.displayName = 'proto.ibc.core.channel.v1.Acknowledgement'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.Timeout = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.Timeout, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Timeout.displayName = 'proto.ibc.core.channel.v1.Timeout'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Params.displayName = 'proto.ibc.core.channel.v1.Params'; +} /** * List of repeated fields within this message type. @@ -197,7 +263,8 @@ proto.ibc.core.channel.v1.Channel.toObject = function(includeInstance, msg) { ordering: jspb.Message.getFieldWithDefault(msg, 2, 0), counterparty: (f = msg.getCounterparty()) && proto.ibc.core.channel.v1.Counterparty.toObject(includeInstance, f), connectionHopsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, - version: jspb.Message.getFieldWithDefault(msg, 5, "") + version: jspb.Message.getFieldWithDefault(msg, 5, ""), + upgradeSequence: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -255,6 +322,10 @@ proto.ibc.core.channel.v1.Channel.deserializeBinaryFromReader = function(msg, re var value = /** @type {string} */ (reader.readString()); msg.setVersion(value); break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpgradeSequence(value); + break; default: reader.skipField(); break; @@ -320,6 +391,13 @@ proto.ibc.core.channel.v1.Channel.serializeBinaryToWriter = function(message, wr f ); } + f = message.getUpgradeSequence(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } }; @@ -451,6 +529,24 @@ proto.ibc.core.channel.v1.Channel.prototype.setVersion = function(value) { }; +/** + * optional uint64 upgrade_sequence = 6; + * @return {number} + */ +proto.ibc.core.channel.v1.Channel.prototype.getUpgradeSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.setUpgradeSequence = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + /** * List of repeated fields within this message type. @@ -496,7 +592,8 @@ proto.ibc.core.channel.v1.IdentifiedChannel.toObject = function(includeInstance, connectionHopsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, version: jspb.Message.getFieldWithDefault(msg, 5, ""), portId: jspb.Message.getFieldWithDefault(msg, 6, ""), - channelId: jspb.Message.getFieldWithDefault(msg, 7, "") + channelId: jspb.Message.getFieldWithDefault(msg, 7, ""), + upgradeSequence: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -562,6 +659,10 @@ proto.ibc.core.channel.v1.IdentifiedChannel.deserializeBinaryFromReader = functi var value = /** @type {string} */ (reader.readString()); msg.setChannelId(value); break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpgradeSequence(value); + break; default: reader.skipField(); break; @@ -641,6 +742,13 @@ proto.ibc.core.channel.v1.IdentifiedChannel.serializeBinaryToWriter = function(m f ); } + f = message.getUpgradeSequence(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } }; @@ -808,6 +916,24 @@ proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setChannelId = function(va }; +/** + * optional uint64 upgrade_sequence = 8; + * @return {number} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getUpgradeSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setUpgradeSequence = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + @@ -1598,32 +1724,6 @@ proto.ibc.core.channel.v1.PacketState.prototype.setData = function(value) { -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_ = [[21,22]]; - -/** - * @enum {number} - */ -proto.ibc.core.channel.v1.Acknowledgement.ResponseCase = { - RESPONSE_NOT_SET: 0, - RESULT: 21, - ERROR: 22 -}; - -/** - * @return {proto.ibc.core.channel.v1.Acknowledgement.ResponseCase} - */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.getResponseCase = function() { - return /** @type {proto.ibc.core.channel.v1.Acknowledgement.ResponseCase} */(jspb.Message.computeOneofCase(this, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1639,8 +1739,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.Acknowledgement.toObject(opt_includeInstance, this); +proto.ibc.core.channel.v1.PacketId.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.PacketId.toObject(opt_includeInstance, this); }; @@ -1649,14 +1749,15 @@ proto.ibc.core.channel.v1.Acknowledgement.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.Acknowledgement} msg The msg instance to transform. + * @param {!proto.ibc.core.channel.v1.PacketId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.channel.v1.Acknowledgement.toObject = function(includeInstance, msg) { +proto.ibc.core.channel.v1.PacketId.toObject = function(includeInstance, msg) { var f, obj = { - result: msg.getResult_asB64(), - error: jspb.Message.getFieldWithDefault(msg, 22, "") + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -1670,36 +1771,40 @@ proto.ibc.core.channel.v1.Acknowledgement.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.Acknowledgement} + * @return {!proto.ibc.core.channel.v1.PacketId} */ -proto.ibc.core.channel.v1.Acknowledgement.deserializeBinary = function(bytes) { +proto.ibc.core.channel.v1.PacketId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.Acknowledgement; - return proto.ibc.core.channel.v1.Acknowledgement.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.channel.v1.PacketId; + return proto.ibc.core.channel.v1.PacketId.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.Acknowledgement} msg The message object to deserialize into. + * @param {!proto.ibc.core.channel.v1.PacketId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.Acknowledgement} + * @return {!proto.ibc.core.channel.v1.PacketId} */ -proto.ibc.core.channel.v1.Acknowledgement.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.channel.v1.PacketId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 21: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setResult(value); + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); break; - case 22: + case 2: var value = /** @type {string} */ (reader.readString()); - msg.setError(value); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); break; default: reader.skipField(); @@ -1714,9 +1819,9 @@ proto.ibc.core.channel.v1.Acknowledgement.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.serializeBinary = function() { +proto.ibc.core.channel.v1.PacketId.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.Acknowledgement.serializeBinaryToWriter(this, writer); + proto.ibc.core.channel.v1.PacketId.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1724,23 +1829,30 @@ proto.ibc.core.channel.v1.Acknowledgement.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.Acknowledgement} message + * @param {!proto.ibc.core.channel.v1.PacketId} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.channel.v1.Acknowledgement.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.channel.v1.PacketId.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 21)); - if (f != null) { - writer.writeBytes( - 21, + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, f ); } - f = /** @type {string} */ (jspb.Message.getField(message, 22)); - if (f != null) { + f = message.getChannelId(); + if (f.length > 0) { writer.writeString( - 22, + 2, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, f ); } @@ -1748,80 +1860,284 @@ proto.ibc.core.channel.v1.Acknowledgement.serializeBinaryToWriter = function(mes /** - * optional bytes result = 21; - * @return {!(string|Uint8Array)} + * optional string port_id = 1; + * @return {string} */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.getResult = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 21, "")); +proto.ibc.core.channel.v1.PacketId.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes result = 21; - * This is a type-conversion wrapper around `getResult()` - * @return {string} + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketId} returns this */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.getResult_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getResult())); +proto.ibc.core.channel.v1.PacketId.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes result = 21; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getResult()` - * @return {!Uint8Array} + * optional string channel_id = 2; + * @return {string} */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.getResult_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getResult())); +proto.ibc.core.channel.v1.PacketId.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.Acknowledgement} returns this + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketId} returns this */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.setResult = function(value) { - return jspb.Message.setOneofField(this, 21, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0], value); +proto.ibc.core.channel.v1.PacketId.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * Clears the field making it undefined. - * @return {!proto.ibc.core.channel.v1.Acknowledgement} returns this + * optional uint64 sequence = 3; + * @return {number} */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.clearResult = function() { - return jspb.Message.setOneofField(this, 21, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0], undefined); +proto.ibc.core.channel.v1.PacketId.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.ibc.core.channel.v1.PacketId} returns this */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.hasResult = function() { - return jspb.Message.getField(this, 21) != null; +proto.ibc.core.channel.v1.PacketId.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; + /** - * optional string error = 22; - * @return {string} + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 22, "")); -}; +proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_ = [[21,22]]; +/** + * @enum {number} + */ +proto.ibc.core.channel.v1.Acknowledgement.ResponseCase = { + RESPONSE_NOT_SET: 0, + RESULT: 21, + ERROR: 22 +}; /** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.Acknowledgement} returns this + * @return {proto.ibc.core.channel.v1.Acknowledgement.ResponseCase} */ -proto.ibc.core.channel.v1.Acknowledgement.prototype.setError = function(value) { - return jspb.Message.setOneofField(this, 22, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0], value); +proto.ibc.core.channel.v1.Acknowledgement.prototype.getResponseCase = function() { + return /** @type {proto.ibc.core.channel.v1.Acknowledgement.ResponseCase} */(jspb.Message.computeOneofCase(this, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.Acknowledgement.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.Acknowledgement} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Acknowledgement.toObject = function(includeInstance, msg) { + var f, obj = { + result: msg.getResult_asB64(), + error: jspb.Message.getFieldWithDefault(msg, 22, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.Acknowledgement} + */ +proto.ibc.core.channel.v1.Acknowledgement.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Acknowledgement; + return proto.ibc.core.channel.v1.Acknowledgement.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.Acknowledgement} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Acknowledgement} + */ +proto.ibc.core.channel.v1.Acknowledgement.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 21: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setResult(value); + break; + case 22: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.Acknowledgement.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.Acknowledgement} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Acknowledgement.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 21)); + if (f != null) { + writer.writeBytes( + 21, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 22)); + if (f != null) { + writer.writeString( + 22, + f + ); + } +}; + + +/** + * optional bytes result = 21; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.getResult = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 21, "")); +}; + + +/** + * optional bytes result = 21; + * This is a type-conversion wrapper around `getResult()` + * @return {string} + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.getResult_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getResult())); +}; + + +/** + * optional bytes result = 21; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResult()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.getResult_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getResult())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.Acknowledgement} returns this + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.setResult = function(value) { + return jspb.Message.setOneofField(this, 21, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.ibc.core.channel.v1.Acknowledgement} returns this + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.clearResult = function() { + return jspb.Message.setOneofField(this, 21, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.hasResult = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional string error = 22; + * @return {string} + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 22, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Acknowledgement} returns this + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.setError = function(value) { + return jspb.Message.setOneofField(this, 22, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0], value); }; @@ -1843,6 +2159,338 @@ proto.ibc.core.channel.v1.Acknowledgement.prototype.hasError = function() { }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.Timeout.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.Timeout.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.Timeout} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Timeout.toObject = function(includeInstance, msg) { + var f, obj = { + height: (f = msg.getHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.Timeout} + */ +proto.ibc.core.channel.v1.Timeout.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Timeout; + return proto.ibc.core.channel.v1.Timeout.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.Timeout} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Timeout} + */ +proto.ibc.core.channel.v1.Timeout.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.Timeout.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.Timeout.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.Timeout} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Timeout.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional ibc.core.client.v1.Height height = 1; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.Timeout.prototype.getHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.Timeout} returns this +*/ +proto.ibc.core.channel.v1.Timeout.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.Timeout} returns this + */ +proto.ibc.core.channel.v1.Timeout.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Timeout.prototype.hasHeight = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 timestamp = 2; + * @return {number} + */ +proto.ibc.core.channel.v1.Timeout.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.Timeout} returns this + */ +proto.ibc.core.channel.v1.Timeout.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.Params.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + upgradeTimeout: (f = msg.getUpgradeTimeout()) && proto.ibc.core.channel.v1.Timeout.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.Params} + */ +proto.ibc.core.channel.v1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Params; + return proto.ibc.core.channel.v1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Params} + */ +proto.ibc.core.channel.v1.Params.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ibc.core.channel.v1.Timeout; + reader.readMessage(value,proto.ibc.core.channel.v1.Timeout.deserializeBinaryFromReader); + msg.setUpgradeTimeout(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.Params.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgradeTimeout(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ibc.core.channel.v1.Timeout.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Timeout upgrade_timeout = 1; + * @return {?proto.ibc.core.channel.v1.Timeout} + */ +proto.ibc.core.channel.v1.Params.prototype.getUpgradeTimeout = function() { + return /** @type{?proto.ibc.core.channel.v1.Timeout} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.channel.v1.Timeout, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Timeout|undefined} value + * @return {!proto.ibc.core.channel.v1.Params} returns this +*/ +proto.ibc.core.channel.v1.Params.prototype.setUpgradeTimeout = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.Params} returns this + */ +proto.ibc.core.channel.v1.Params.prototype.clearUpgradeTimeout = function() { + return this.setUpgradeTimeout(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Params.prototype.hasUpgradeTimeout = function() { + return jspb.Message.getField(this, 1) != null; +}; + + /** * @enum {number} */ @@ -1851,7 +2499,9 @@ proto.ibc.core.channel.v1.State = { STATE_INIT: 1, STATE_TRYOPEN: 2, STATE_OPEN: 3, - STATE_CLOSED: 4 + STATE_CLOSED: 4, + STATE_FLUSHING: 5, + STATE_FLUSHCOMPLETE: 6 }; /** diff --git a/proto/ibc/core/channel/v1/channel_pb_service.d.ts b/codegen/ibc/core/channel/v1/channel_pb_service.d.ts similarity index 100% rename from proto/ibc/core/channel/v1/channel_pb_service.d.ts rename to codegen/ibc/core/channel/v1/channel_pb_service.d.ts diff --git a/proto/ibc/core/channel/v1/channel_pb_service.js b/codegen/ibc/core/channel/v1/channel_pb_service.js similarity index 100% rename from proto/ibc/core/channel/v1/channel_pb_service.js rename to codegen/ibc/core/channel/v1/channel_pb_service.js diff --git a/codegen/ibc/core/channel/v1/genesis.ts b/codegen/ibc/core/channel/v1/genesis.ts new file mode 100644 index 0000000..9aa86db --- /dev/null +++ b/codegen/ibc/core/channel/v1/genesis.ts @@ -0,0 +1,377 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/channel/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./channel"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.core.channel.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channels?: dependency_2.ibc.core.channel.v1.IdentifiedChannel[]; + acknowledgements?: dependency_2.ibc.core.channel.v1.PacketState[]; + commitments?: dependency_2.ibc.core.channel.v1.PacketState[]; + receipts?: dependency_2.ibc.core.channel.v1.PacketState[]; + send_sequences?: PacketSequence[]; + recv_sequences?: PacketSequence[]; + ack_sequences?: PacketSequence[]; + next_channel_sequence?: number; + params?: dependency_2.ibc.core.channel.v1.Params; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3, 4, 5, 6, 7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("channels" in data && data.channels != undefined) { + this.channels = data.channels; + } + if ("acknowledgements" in data && data.acknowledgements != undefined) { + this.acknowledgements = data.acknowledgements; + } + if ("commitments" in data && data.commitments != undefined) { + this.commitments = data.commitments; + } + if ("receipts" in data && data.receipts != undefined) { + this.receipts = data.receipts; + } + if ("send_sequences" in data && data.send_sequences != undefined) { + this.send_sequences = data.send_sequences; + } + if ("recv_sequences" in data && data.recv_sequences != undefined) { + this.recv_sequences = data.recv_sequences; + } + if ("ack_sequences" in data && data.ack_sequences != undefined) { + this.ack_sequences = data.ack_sequences; + } + if ("next_channel_sequence" in data && data.next_channel_sequence != undefined) { + this.next_channel_sequence = data.next_channel_sequence; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get channels() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.ibc.core.channel.v1.IdentifiedChannel, 1) as dependency_2.ibc.core.channel.v1.IdentifiedChannel[]; + } + set channels(value: dependency_2.ibc.core.channel.v1.IdentifiedChannel[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get acknowledgements() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.ibc.core.channel.v1.PacketState, 2) as dependency_2.ibc.core.channel.v1.PacketState[]; + } + set acknowledgements(value: dependency_2.ibc.core.channel.v1.PacketState[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get commitments() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.ibc.core.channel.v1.PacketState, 3) as dependency_2.ibc.core.channel.v1.PacketState[]; + } + set commitments(value: dependency_2.ibc.core.channel.v1.PacketState[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get receipts() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.ibc.core.channel.v1.PacketState, 4) as dependency_2.ibc.core.channel.v1.PacketState[]; + } + set receipts(value: dependency_2.ibc.core.channel.v1.PacketState[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get send_sequences() { + return pb_1.Message.getRepeatedWrapperField(this, PacketSequence, 5) as PacketSequence[]; + } + set send_sequences(value: PacketSequence[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get recv_sequences() { + return pb_1.Message.getRepeatedWrapperField(this, PacketSequence, 6) as PacketSequence[]; + } + set recv_sequences(value: PacketSequence[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get ack_sequences() { + return pb_1.Message.getRepeatedWrapperField(this, PacketSequence, 7) as PacketSequence[]; + } + set ack_sequences(value: PacketSequence[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get next_channel_sequence() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set next_channel_sequence(value: number) { + pb_1.Message.setField(this, 8, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.core.channel.v1.Params, 9) as dependency_2.ibc.core.channel.v1.Params; + } + set params(value: dependency_2.ibc.core.channel.v1.Params) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_params() { + return pb_1.Message.getField(this, 9) != null; + } + static fromObject(data: { + channels?: ReturnType[]; + acknowledgements?: ReturnType[]; + commitments?: ReturnType[]; + receipts?: ReturnType[]; + send_sequences?: ReturnType[]; + recv_sequences?: ReturnType[]; + ack_sequences?: ReturnType[]; + next_channel_sequence?: number; + params?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.channels != null) { + message.channels = data.channels.map(item => dependency_2.ibc.core.channel.v1.IdentifiedChannel.fromObject(item)); + } + if (data.acknowledgements != null) { + message.acknowledgements = data.acknowledgements.map(item => dependency_2.ibc.core.channel.v1.PacketState.fromObject(item)); + } + if (data.commitments != null) { + message.commitments = data.commitments.map(item => dependency_2.ibc.core.channel.v1.PacketState.fromObject(item)); + } + if (data.receipts != null) { + message.receipts = data.receipts.map(item => dependency_2.ibc.core.channel.v1.PacketState.fromObject(item)); + } + if (data.send_sequences != null) { + message.send_sequences = data.send_sequences.map(item => PacketSequence.fromObject(item)); + } + if (data.recv_sequences != null) { + message.recv_sequences = data.recv_sequences.map(item => PacketSequence.fromObject(item)); + } + if (data.ack_sequences != null) { + message.ack_sequences = data.ack_sequences.map(item => PacketSequence.fromObject(item)); + } + if (data.next_channel_sequence != null) { + message.next_channel_sequence = data.next_channel_sequence; + } + if (data.params != null) { + message.params = dependency_2.ibc.core.channel.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + channels?: ReturnType[]; + acknowledgements?: ReturnType[]; + commitments?: ReturnType[]; + receipts?: ReturnType[]; + send_sequences?: ReturnType[]; + recv_sequences?: ReturnType[]; + ack_sequences?: ReturnType[]; + next_channel_sequence?: number; + params?: ReturnType; + } = {}; + if (this.channels != null) { + data.channels = this.channels.map((item: dependency_2.ibc.core.channel.v1.IdentifiedChannel) => item.toObject()); + } + if (this.acknowledgements != null) { + data.acknowledgements = this.acknowledgements.map((item: dependency_2.ibc.core.channel.v1.PacketState) => item.toObject()); + } + if (this.commitments != null) { + data.commitments = this.commitments.map((item: dependency_2.ibc.core.channel.v1.PacketState) => item.toObject()); + } + if (this.receipts != null) { + data.receipts = this.receipts.map((item: dependency_2.ibc.core.channel.v1.PacketState) => item.toObject()); + } + if (this.send_sequences != null) { + data.send_sequences = this.send_sequences.map((item: PacketSequence) => item.toObject()); + } + if (this.recv_sequences != null) { + data.recv_sequences = this.recv_sequences.map((item: PacketSequence) => item.toObject()); + } + if (this.ack_sequences != null) { + data.ack_sequences = this.ack_sequences.map((item: PacketSequence) => item.toObject()); + } + if (this.next_channel_sequence != null) { + data.next_channel_sequence = this.next_channel_sequence; + } + 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.channels.length) + writer.writeRepeatedMessage(1, this.channels, (item: dependency_2.ibc.core.channel.v1.IdentifiedChannel) => item.serialize(writer)); + if (this.acknowledgements.length) + writer.writeRepeatedMessage(2, this.acknowledgements, (item: dependency_2.ibc.core.channel.v1.PacketState) => item.serialize(writer)); + if (this.commitments.length) + writer.writeRepeatedMessage(3, this.commitments, (item: dependency_2.ibc.core.channel.v1.PacketState) => item.serialize(writer)); + if (this.receipts.length) + writer.writeRepeatedMessage(4, this.receipts, (item: dependency_2.ibc.core.channel.v1.PacketState) => item.serialize(writer)); + if (this.send_sequences.length) + writer.writeRepeatedMessage(5, this.send_sequences, (item: PacketSequence) => item.serialize(writer)); + if (this.recv_sequences.length) + writer.writeRepeatedMessage(6, this.recv_sequences, (item: PacketSequence) => item.serialize(writer)); + if (this.ack_sequences.length) + writer.writeRepeatedMessage(7, this.ack_sequences, (item: PacketSequence) => item.serialize(writer)); + if (this.next_channel_sequence != 0) + writer.writeUint64(8, this.next_channel_sequence); + if (this.has_params) + writer.writeMessage(9, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.channels, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.ibc.core.channel.v1.IdentifiedChannel.deserialize(reader), dependency_2.ibc.core.channel.v1.IdentifiedChannel)); + break; + case 2: + reader.readMessage(message.acknowledgements, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.ibc.core.channel.v1.PacketState.deserialize(reader), dependency_2.ibc.core.channel.v1.PacketState)); + break; + case 3: + reader.readMessage(message.commitments, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.ibc.core.channel.v1.PacketState.deserialize(reader), dependency_2.ibc.core.channel.v1.PacketState)); + break; + case 4: + reader.readMessage(message.receipts, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.ibc.core.channel.v1.PacketState.deserialize(reader), dependency_2.ibc.core.channel.v1.PacketState)); + break; + case 5: + reader.readMessage(message.send_sequences, () => pb_1.Message.addToRepeatedWrapperField(message, 5, PacketSequence.deserialize(reader), PacketSequence)); + break; + case 6: + reader.readMessage(message.recv_sequences, () => pb_1.Message.addToRepeatedWrapperField(message, 6, PacketSequence.deserialize(reader), PacketSequence)); + break; + case 7: + reader.readMessage(message.ack_sequences, () => pb_1.Message.addToRepeatedWrapperField(message, 7, PacketSequence.deserialize(reader), PacketSequence)); + break; + case 8: + message.next_channel_sequence = reader.readUint64(); + break; + case 9: + reader.readMessage(message.params, () => message.params = dependency_2.ibc.core.channel.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class PacketSequence extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + sequence?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + sequence?: number; + }): PacketSequence { + const message = new PacketSequence({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + sequence?: number; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.sequence != 0) + writer.writeUint64(3, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PacketSequence { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PacketSequence(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PacketSequence { + return PacketSequence.deserialize(bytes); + } + } +} diff --git a/proto/ibc/core/channel/v1/genesis_pb.d.ts b/codegen/ibc/core/channel/v1/genesis_pb.d.ts similarity index 94% rename from proto/ibc/core/channel/v1/genesis_pb.d.ts rename to codegen/ibc/core/channel/v1/genesis_pb.d.ts index 149b86c..fd70b43 100644 --- a/proto/ibc/core/channel/v1/genesis_pb.d.ts +++ b/codegen/ibc/core/channel/v1/genesis_pb.d.ts @@ -44,6 +44,11 @@ export class GenesisState extends jspb.Message { getNextChannelSequence(): number; setNextChannelSequence(value: number): void; + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_core_channel_v1_channel_pb.Params | undefined; + setParams(value?: ibc_core_channel_v1_channel_pb.Params): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GenesisState.AsObject; static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; @@ -64,6 +69,7 @@ export namespace GenesisState { recvSequencesList: Array, ackSequencesList: Array, nextChannelSequence: number, + params?: ibc_core_channel_v1_channel_pb.Params.AsObject, } } diff --git a/proto/ibc/core/channel/v1/genesis_pb.js b/codegen/ibc/core/channel/v1/genesis_pb.js similarity index 94% rename from proto/ibc/core/channel/v1/genesis_pb.js rename to codegen/ibc/core/channel/v1/genesis_pb.js index 7d78dc5..a6054f7 100644 --- a/proto/ibc/core/channel/v1/genesis_pb.js +++ b/codegen/ibc/core/channel/v1/genesis_pb.js @@ -13,7 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); @@ -116,7 +116,8 @@ proto.ibc.core.channel.v1.GenesisState.toObject = function(includeInstance, msg) proto.ibc.core.channel.v1.PacketSequence.toObject, includeInstance), ackSequencesList: jspb.Message.toObjectList(msg.getAckSequencesList(), proto.ibc.core.channel.v1.PacketSequence.toObject, includeInstance), - nextChannelSequence: jspb.Message.getFieldWithDefault(msg, 8, 0) + nextChannelSequence: jspb.Message.getFieldWithDefault(msg, 8, 0), + params: (f = msg.getParams()) && ibc_core_channel_v1_channel_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -192,6 +193,11 @@ proto.ibc.core.channel.v1.GenesisState.deserializeBinaryFromReader = function(ms var value = /** @type {number} */ (reader.readUint64()); msg.setNextChannelSequence(value); break; + case 9: + var value = new ibc_core_channel_v1_channel_pb.Params; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; default: reader.skipField(); break; @@ -284,6 +290,14 @@ proto.ibc.core.channel.v1.GenesisState.serializeBinaryToWriter = function(messag f ); } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 9, + f, + ibc_core_channel_v1_channel_pb.Params.serializeBinaryToWriter + ); + } }; @@ -571,6 +585,43 @@ proto.ibc.core.channel.v1.GenesisState.prototype.setNextChannelSequence = functi }; +/** + * optional Params params = 9; + * @return {?proto.ibc.core.channel.v1.Params} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.ibc.core.channel.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Params, 9)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Params|undefined} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 9) != null; +}; + + diff --git a/proto/ibc/core/channel/v1/genesis_pb_service.d.ts b/codegen/ibc/core/channel/v1/genesis_pb_service.d.ts similarity index 100% rename from proto/ibc/core/channel/v1/genesis_pb_service.d.ts rename to codegen/ibc/core/channel/v1/genesis_pb_service.d.ts diff --git a/proto/ibc/core/channel/v1/genesis_pb_service.js b/codegen/ibc/core/channel/v1/genesis_pb_service.js similarity index 100% rename from proto/ibc/core/channel/v1/genesis_pb_service.js rename to codegen/ibc/core/channel/v1/genesis_pb_service.js diff --git a/codegen/ibc/core/channel/v1/query.ts b/codegen/ibc/core/channel/v1/query.ts new file mode 100644 index 0000000..1e5a1d5 --- /dev/null +++ b/codegen/ibc/core/channel/v1/query.ts @@ -0,0 +1,3900 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/channel/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../client/v1/client"; +import * as dependency_2 from "./../../../../cosmos/base/query/v1beta1/pagination"; +import * as dependency_3 from "./channel"; +import * as dependency_4 from "./../../../../google/api/annotations"; +import * as dependency_5 from "./../../../../google/protobuf/any"; +import * as dependency_6 from "./../../../../gogoproto/gogo"; +import * as dependency_7 from "./upgrade"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.core.channel.v1 { + export class QueryChannelRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): QueryChannelRequest { + const message = new QueryChannelRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryChannelRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChannelRequest { + return QueryChannelRequest.deserialize(bytes); + } + } + export class QueryChannelResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channel?: dependency_3.ibc.core.channel.v1.Channel; + proof?: Uint8Array; + proof_height?: dependency_1.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 ("channel" in data && data.channel != undefined) { + this.channel = data.channel; + } + 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 channel() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.channel.v1.Channel, 1) as dependency_3.ibc.core.channel.v1.Channel; + } + set channel(value: dependency_3.ibc.core.channel.v1.Channel) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_channel() { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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: { + channel?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryChannelResponse { + const message = new QueryChannelResponse({}); + if (data.channel != null) { + message.channel = dependency_3.ibc.core.channel.v1.Channel.fromObject(data.channel); + } + if (data.proof != null) { + message.proof = data.proof; + } + if (data.proof_height != null) { + message.proof_height = dependency_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + channel?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.channel != null) { + data.channel = this.channel.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_channel) + writer.writeMessage(1, this.channel, () => this.channel.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): QueryChannelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.channel, () => message.channel = dependency_3.ibc.core.channel.v1.Channel.deserialize(reader)); + break; + case 2: + message.proof = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChannelResponse { + return QueryChannelResponse.deserialize(bytes); + } + } + export class QueryChannelsRequest 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; + }): QueryChannelsRequest { + const message = new QueryChannelsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryChannelsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelsRequest(); + 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): QueryChannelsRequest { + return QueryChannelsRequest.deserialize(bytes); + } + } + export class QueryChannelsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channels?: dependency_3.ibc.core.channel.v1.IdentifiedChannel[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + height?: dependency_1.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 ("channels" in data && data.channels != undefined) { + this.channels = data.channels; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get channels() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.ibc.core.channel.v1.IdentifiedChannel, 1) as dependency_3.ibc.core.channel.v1.IdentifiedChannel[]; + } + set channels(value: dependency_3.ibc.core.channel.v1.IdentifiedChannel[]) { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set height(value: dependency_1.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: { + channels?: ReturnType[]; + pagination?: ReturnType; + height?: ReturnType; + }): QueryChannelsResponse { + const message = new QueryChannelsResponse({}); + if (data.channels != null) { + message.channels = data.channels.map(item => dependency_3.ibc.core.channel.v1.IdentifiedChannel.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_1.ibc.core.client.v1.Height.fromObject(data.height); + } + return message; + } + toObject() { + const data: { + channels?: ReturnType[]; + pagination?: ReturnType; + height?: ReturnType; + } = {}; + if (this.channels != null) { + data.channels = this.channels.map((item: dependency_3.ibc.core.channel.v1.IdentifiedChannel) => 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.channels.length) + writer.writeRepeatedMessage(1, this.channels, (item: dependency_3.ibc.core.channel.v1.IdentifiedChannel) => 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): QueryChannelsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.channels, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.ibc.core.channel.v1.IdentifiedChannel.deserialize(reader), dependency_3.ibc.core.channel.v1.IdentifiedChannel)); + 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_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChannelsResponse { + return QueryChannelsResponse.deserialize(bytes); + } + } + export class QueryConnectionChannelsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + connection?: string; + 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 ("connection" in data && data.connection != undefined) { + this.connection = data.connection; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get connection() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set connection(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + connection?: string; + pagination?: ReturnType; + }): QueryConnectionChannelsRequest { + const message = new QueryConnectionChannelsRequest({}); + if (data.connection != null) { + message.connection = data.connection; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + connection?: string; + pagination?: ReturnType; + } = {}; + if (this.connection != null) { + data.connection = this.connection; + } + 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.connection.length) + writer.writeString(1, this.connection); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionChannelsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionChannelsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.connection = reader.readString(); + break; + case 2: + 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): QueryConnectionChannelsRequest { + return QueryConnectionChannelsRequest.deserialize(bytes); + } + } + export class QueryConnectionChannelsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channels?: dependency_3.ibc.core.channel.v1.IdentifiedChannel[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + height?: dependency_1.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 ("channels" in data && data.channels != undefined) { + this.channels = data.channels; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get channels() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.ibc.core.channel.v1.IdentifiedChannel, 1) as dependency_3.ibc.core.channel.v1.IdentifiedChannel[]; + } + set channels(value: dependency_3.ibc.core.channel.v1.IdentifiedChannel[]) { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set height(value: dependency_1.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: { + channels?: ReturnType[]; + pagination?: ReturnType; + height?: ReturnType; + }): QueryConnectionChannelsResponse { + const message = new QueryConnectionChannelsResponse({}); + if (data.channels != null) { + message.channels = data.channels.map(item => dependency_3.ibc.core.channel.v1.IdentifiedChannel.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_1.ibc.core.client.v1.Height.fromObject(data.height); + } + return message; + } + toObject() { + const data: { + channels?: ReturnType[]; + pagination?: ReturnType; + height?: ReturnType; + } = {}; + if (this.channels != null) { + data.channels = this.channels.map((item: dependency_3.ibc.core.channel.v1.IdentifiedChannel) => 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.channels.length) + writer.writeRepeatedMessage(1, this.channels, (item: dependency_3.ibc.core.channel.v1.IdentifiedChannel) => 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): QueryConnectionChannelsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionChannelsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.channels, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.ibc.core.channel.v1.IdentifiedChannel.deserialize(reader), dependency_3.ibc.core.channel.v1.IdentifiedChannel)); + 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_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConnectionChannelsResponse { + return QueryConnectionChannelsResponse.deserialize(bytes); + } + } + export class QueryChannelClientStateRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): QueryChannelClientStateRequest { + const message = new QueryChannelClientStateRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryChannelClientStateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelClientStateRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChannelClientStateRequest { + return QueryChannelClientStateRequest.deserialize(bytes); + } + } + export class QueryChannelClientStateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + identified_client_state?: dependency_1.ibc.core.client.v1.IdentifiedClientState; + proof?: Uint8Array; + proof_height?: dependency_1.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_1.ibc.core.client.v1.IdentifiedClientState, 1) as dependency_1.ibc.core.client.v1.IdentifiedClientState; + } + set identified_client_state(value: dependency_1.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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryChannelClientStateResponse { + const message = new QueryChannelClientStateResponse({}); + if (data.identified_client_state != null) { + message.identified_client_state = dependency_1.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_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + identified_client_state?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + 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): QueryChannelClientStateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelClientStateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.identified_client_state, () => message.identified_client_state = dependency_1.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_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChannelClientStateResponse { + return QueryChannelClientStateResponse.deserialize(bytes); + } + } + export class QueryChannelConsensusStateRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_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 port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get revision_number() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set revision_number(value: number) { + pb_1.Message.setField(this, 3, value); + } + get revision_height() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set revision_height(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + revision_number?: number; + revision_height?: number; + }): QueryChannelConsensusStateRequest { + const message = new QueryChannelConsensusStateRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_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: { + port_id?: string; + channel_id?: string; + revision_number?: number; + revision_height?: number; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.revision_number != 0) + writer.writeUint64(3, this.revision_number); + if (this.revision_height != 0) + writer.writeUint64(4, this.revision_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryChannelConsensusStateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelConsensusStateRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.revision_number = reader.readUint64(); + break; + case 4: + message.revision_height = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChannelConsensusStateRequest { + return QueryChannelConsensusStateRequest.deserialize(bytes); + } + } + export class QueryChannelConsensusStateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + consensus_state?: dependency_5.google.protobuf.Any; + client_id?: string; + proof?: Uint8Array; + proof_height?: dependency_1.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_5.google.protobuf.Any, 1) as dependency_5.google.protobuf.Any; + } + set consensus_state(value: dependency_5.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_1.ibc.core.client.v1.Height, 4) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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; + client_id?: string; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryChannelConsensusStateResponse { + const message = new QueryChannelConsensusStateResponse({}); + if (data.consensus_state != null) { + message.consensus_state = dependency_5.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_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + consensus_state?: ReturnType; + client_id?: string; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + 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): QueryChannelConsensusStateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelConsensusStateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.consensus_state, () => message.consensus_state = dependency_5.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_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChannelConsensusStateResponse { + return QueryChannelConsensusStateResponse.deserialize(bytes); + } + } + export class QueryPacketCommitmentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + sequence?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + sequence?: number; + }): QueryPacketCommitmentRequest { + const message = new QueryPacketCommitmentRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + sequence?: number; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.sequence != 0) + writer.writeUint64(3, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPacketCommitmentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketCommitmentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketCommitmentRequest { + return QueryPacketCommitmentRequest.deserialize(bytes); + } + } + export class QueryPacketCommitmentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + commitment?: Uint8Array; + proof?: Uint8Array; + proof_height?: dependency_1.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 ("commitment" in data && data.commitment != undefined) { + this.commitment = data.commitment; + } + 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 commitment() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set commitment(value: Uint8Array) { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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: { + commitment?: Uint8Array; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryPacketCommitmentResponse { + const message = new QueryPacketCommitmentResponse({}); + if (data.commitment != null) { + message.commitment = data.commitment; + } + if (data.proof != null) { + message.proof = data.proof; + } + if (data.proof_height != null) { + message.proof_height = dependency_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + commitment?: Uint8Array; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.commitment != null) { + data.commitment = this.commitment; + } + 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.commitment.length) + writer.writeBytes(1, this.commitment); + 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): QueryPacketCommitmentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketCommitmentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.commitment = reader.readBytes(); + break; + case 2: + message.proof = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketCommitmentResponse { + return QueryPacketCommitmentResponse.deserialize(bytes); + } + } + export class QueryPacketCommitmentsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 3) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + pagination?: ReturnType; + }): QueryPacketCommitmentsRequest { + const message = new QueryPacketCommitmentsRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + pagination?: ReturnType; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.has_pagination) + writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPacketCommitmentsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketCommitmentsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + 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): QueryPacketCommitmentsRequest { + return QueryPacketCommitmentsRequest.deserialize(bytes); + } + } + export class QueryPacketCommitmentsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + commitments?: dependency_3.ibc.core.channel.v1.PacketState[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + height?: dependency_1.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 ("commitments" in data && data.commitments != undefined) { + this.commitments = data.commitments; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get commitments() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.ibc.core.channel.v1.PacketState, 1) as dependency_3.ibc.core.channel.v1.PacketState[]; + } + set commitments(value: dependency_3.ibc.core.channel.v1.PacketState[]) { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set height(value: dependency_1.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: { + commitments?: ReturnType[]; + pagination?: ReturnType; + height?: ReturnType; + }): QueryPacketCommitmentsResponse { + const message = new QueryPacketCommitmentsResponse({}); + if (data.commitments != null) { + message.commitments = data.commitments.map(item => dependency_3.ibc.core.channel.v1.PacketState.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_1.ibc.core.client.v1.Height.fromObject(data.height); + } + return message; + } + toObject() { + const data: { + commitments?: ReturnType[]; + pagination?: ReturnType; + height?: ReturnType; + } = {}; + if (this.commitments != null) { + data.commitments = this.commitments.map((item: dependency_3.ibc.core.channel.v1.PacketState) => 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.commitments.length) + writer.writeRepeatedMessage(1, this.commitments, (item: dependency_3.ibc.core.channel.v1.PacketState) => 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): QueryPacketCommitmentsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketCommitmentsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.commitments, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.ibc.core.channel.v1.PacketState.deserialize(reader), dependency_3.ibc.core.channel.v1.PacketState)); + 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_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketCommitmentsResponse { + return QueryPacketCommitmentsResponse.deserialize(bytes); + } + } + export class QueryPacketReceiptRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + sequence?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + sequence?: number; + }): QueryPacketReceiptRequest { + const message = new QueryPacketReceiptRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + sequence?: number; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.sequence != 0) + writer.writeUint64(3, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPacketReceiptRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketReceiptRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketReceiptRequest { + return QueryPacketReceiptRequest.deserialize(bytes); + } + } + export class QueryPacketReceiptResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + received?: boolean; + proof?: Uint8Array; + proof_height?: dependency_1.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 ("received" in data && data.received != undefined) { + this.received = data.received; + } + 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 received() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set received(value: boolean) { + 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_1.ibc.core.client.v1.Height, 4) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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: { + received?: boolean; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryPacketReceiptResponse { + const message = new QueryPacketReceiptResponse({}); + if (data.received != null) { + message.received = data.received; + } + if (data.proof != null) { + message.proof = data.proof; + } + if (data.proof_height != null) { + message.proof_height = dependency_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + received?: boolean; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.received != null) { + data.received = this.received; + } + 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.received != false) + writer.writeBool(2, this.received); + 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): QueryPacketReceiptResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketReceiptResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.received = reader.readBool(); + break; + case 3: + message.proof = reader.readBytes(); + break; + case 4: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketReceiptResponse { + return QueryPacketReceiptResponse.deserialize(bytes); + } + } + export class QueryPacketAcknowledgementRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + sequence?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + sequence?: number; + }): QueryPacketAcknowledgementRequest { + const message = new QueryPacketAcknowledgementRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + sequence?: number; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.sequence != 0) + writer.writeUint64(3, this.sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPacketAcknowledgementRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketAcknowledgementRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketAcknowledgementRequest { + return QueryPacketAcknowledgementRequest.deserialize(bytes); + } + } + export class QueryPacketAcknowledgementResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + acknowledgement?: Uint8Array; + proof?: Uint8Array; + proof_height?: dependency_1.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 ("acknowledgement" in data && data.acknowledgement != undefined) { + this.acknowledgement = data.acknowledgement; + } + 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 acknowledgement() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set acknowledgement(value: Uint8Array) { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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: { + acknowledgement?: Uint8Array; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryPacketAcknowledgementResponse { + const message = new QueryPacketAcknowledgementResponse({}); + if (data.acknowledgement != null) { + message.acknowledgement = data.acknowledgement; + } + if (data.proof != null) { + message.proof = data.proof; + } + if (data.proof_height != null) { + message.proof_height = dependency_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + acknowledgement?: Uint8Array; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.acknowledgement != null) { + data.acknowledgement = this.acknowledgement; + } + 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.acknowledgement.length) + writer.writeBytes(1, this.acknowledgement); + 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): QueryPacketAcknowledgementResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketAcknowledgementResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.acknowledgement = reader.readBytes(); + break; + case 2: + message.proof = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketAcknowledgementResponse { + return QueryPacketAcknowledgementResponse.deserialize(bytes); + } + } + export class QueryPacketAcknowledgementsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageRequest; + packet_commitment_sequences?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("packet_commitment_sequences" in data && data.packet_commitment_sequences != undefined) { + this.packet_commitment_sequences = data.packet_commitment_sequences; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 3) as dependency_2.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 3) != null; + } + get packet_commitment_sequences() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as number[]; + } + set packet_commitment_sequences(value: number[]) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + pagination?: ReturnType; + packet_commitment_sequences?: number[]; + }): QueryPacketAcknowledgementsRequest { + const message = new QueryPacketAcknowledgementsRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + if (data.packet_commitment_sequences != null) { + message.packet_commitment_sequences = data.packet_commitment_sequences; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + pagination?: ReturnType; + packet_commitment_sequences?: number[]; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.pagination != null) { + data.pagination = this.pagination.toObject(); + } + if (this.packet_commitment_sequences != null) { + data.packet_commitment_sequences = this.packet_commitment_sequences; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.has_pagination) + writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer)); + if (this.packet_commitment_sequences.length) + writer.writePackedUint64(4, this.packet_commitment_sequences); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryPacketAcknowledgementsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketAcknowledgementsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + case 4: + message.packet_commitment_sequences = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketAcknowledgementsRequest { + return QueryPacketAcknowledgementsRequest.deserialize(bytes); + } + } + export class QueryPacketAcknowledgementsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + acknowledgements?: dependency_3.ibc.core.channel.v1.PacketState[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + height?: dependency_1.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 ("acknowledgements" in data && data.acknowledgements != undefined) { + this.acknowledgements = data.acknowledgements; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get acknowledgements() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.ibc.core.channel.v1.PacketState, 1) as dependency_3.ibc.core.channel.v1.PacketState[]; + } + set acknowledgements(value: dependency_3.ibc.core.channel.v1.PacketState[]) { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set height(value: dependency_1.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: { + acknowledgements?: ReturnType[]; + pagination?: ReturnType; + height?: ReturnType; + }): QueryPacketAcknowledgementsResponse { + const message = new QueryPacketAcknowledgementsResponse({}); + if (data.acknowledgements != null) { + message.acknowledgements = data.acknowledgements.map(item => dependency_3.ibc.core.channel.v1.PacketState.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_1.ibc.core.client.v1.Height.fromObject(data.height); + } + return message; + } + toObject() { + const data: { + acknowledgements?: ReturnType[]; + pagination?: ReturnType; + height?: ReturnType; + } = {}; + if (this.acknowledgements != null) { + data.acknowledgements = this.acknowledgements.map((item: dependency_3.ibc.core.channel.v1.PacketState) => 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.acknowledgements.length) + writer.writeRepeatedMessage(1, this.acknowledgements, (item: dependency_3.ibc.core.channel.v1.PacketState) => 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): QueryPacketAcknowledgementsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryPacketAcknowledgementsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.acknowledgements, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.ibc.core.channel.v1.PacketState.deserialize(reader), dependency_3.ibc.core.channel.v1.PacketState)); + 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_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryPacketAcknowledgementsResponse { + return QueryPacketAcknowledgementsResponse.deserialize(bytes); + } + } + export class QueryUnreceivedPacketsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + packet_commitment_sequences?: number[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("packet_commitment_sequences" in data && data.packet_commitment_sequences != undefined) { + this.packet_commitment_sequences = data.packet_commitment_sequences; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get packet_commitment_sequences() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as number[]; + } + set packet_commitment_sequences(value: number[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + packet_commitment_sequences?: number[]; + }): QueryUnreceivedPacketsRequest { + const message = new QueryUnreceivedPacketsRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.packet_commitment_sequences != null) { + message.packet_commitment_sequences = data.packet_commitment_sequences; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + packet_commitment_sequences?: number[]; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.packet_commitment_sequences != null) { + data.packet_commitment_sequences = this.packet_commitment_sequences; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.packet_commitment_sequences.length) + writer.writePackedUint64(3, this.packet_commitment_sequences); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUnreceivedPacketsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUnreceivedPacketsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.packet_commitment_sequences = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUnreceivedPacketsRequest { + return QueryUnreceivedPacketsRequest.deserialize(bytes); + } + } + export class QueryUnreceivedPacketsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequences?: number[]; + height?: dependency_1.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 ("sequences" in data && data.sequences != undefined) { + this.sequences = data.sequences; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get sequences() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set sequences(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + get height() { + return pb_1.Message.getWrapperField(this, dependency_1.ibc.core.client.v1.Height, 2) as dependency_1.ibc.core.client.v1.Height; + } + set height(value: dependency_1.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_height() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + sequences?: number[]; + height?: ReturnType; + }): QueryUnreceivedPacketsResponse { + const message = new QueryUnreceivedPacketsResponse({}); + if (data.sequences != null) { + message.sequences = data.sequences; + } + if (data.height != null) { + message.height = dependency_1.ibc.core.client.v1.Height.fromObject(data.height); + } + return message; + } + toObject() { + const data: { + sequences?: number[]; + height?: ReturnType; + } = {}; + if (this.sequences != null) { + data.sequences = this.sequences; + } + 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.sequences.length) + writer.writePackedUint64(1, this.sequences); + if (this.has_height) + writer.writeMessage(2, this.height, () => this.height.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUnreceivedPacketsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUnreceivedPacketsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequences = reader.readPackedUint64(); + break; + case 2: + reader.readMessage(message.height, () => message.height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUnreceivedPacketsResponse { + return QueryUnreceivedPacketsResponse.deserialize(bytes); + } + } + export class QueryUnreceivedAcksRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + packet_ack_sequences?: number[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("packet_ack_sequences" in data && data.packet_ack_sequences != undefined) { + this.packet_ack_sequences = data.packet_ack_sequences; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get packet_ack_sequences() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as number[]; + } + set packet_ack_sequences(value: number[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + packet_ack_sequences?: number[]; + }): QueryUnreceivedAcksRequest { + const message = new QueryUnreceivedAcksRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.packet_ack_sequences != null) { + message.packet_ack_sequences = data.packet_ack_sequences; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + packet_ack_sequences?: number[]; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.packet_ack_sequences != null) { + data.packet_ack_sequences = this.packet_ack_sequences; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.packet_ack_sequences.length) + writer.writePackedUint64(3, this.packet_ack_sequences); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUnreceivedAcksRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUnreceivedAcksRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.packet_ack_sequences = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUnreceivedAcksRequest { + return QueryUnreceivedAcksRequest.deserialize(bytes); + } + } + export class QueryUnreceivedAcksResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequences?: number[]; + height?: dependency_1.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 ("sequences" in data && data.sequences != undefined) { + this.sequences = data.sequences; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + } + } + get sequences() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; + } + set sequences(value: number[]) { + pb_1.Message.setField(this, 1, value); + } + get height() { + return pb_1.Message.getWrapperField(this, dependency_1.ibc.core.client.v1.Height, 2) as dependency_1.ibc.core.client.v1.Height; + } + set height(value: dependency_1.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_height() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + sequences?: number[]; + height?: ReturnType; + }): QueryUnreceivedAcksResponse { + const message = new QueryUnreceivedAcksResponse({}); + if (data.sequences != null) { + message.sequences = data.sequences; + } + if (data.height != null) { + message.height = dependency_1.ibc.core.client.v1.Height.fromObject(data.height); + } + return message; + } + toObject() { + const data: { + sequences?: number[]; + height?: ReturnType; + } = {}; + if (this.sequences != null) { + data.sequences = this.sequences; + } + 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.sequences.length) + writer.writePackedUint64(1, this.sequences); + if (this.has_height) + writer.writeMessage(2, this.height, () => this.height.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUnreceivedAcksResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUnreceivedAcksResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequences = reader.readPackedUint64(); + break; + case 2: + reader.readMessage(message.height, () => message.height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUnreceivedAcksResponse { + return QueryUnreceivedAcksResponse.deserialize(bytes); + } + } + export class QueryNextSequenceReceiveRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): QueryNextSequenceReceiveRequest { + const message = new QueryNextSequenceReceiveRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryNextSequenceReceiveRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryNextSequenceReceiveRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryNextSequenceReceiveRequest { + return QueryNextSequenceReceiveRequest.deserialize(bytes); + } + } + export class QueryNextSequenceReceiveResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + next_sequence_receive?: number; + proof?: Uint8Array; + proof_height?: dependency_1.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 ("next_sequence_receive" in data && data.next_sequence_receive != undefined) { + this.next_sequence_receive = data.next_sequence_receive; + } + 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 next_sequence_receive() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set next_sequence_receive(value: number) { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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: { + next_sequence_receive?: number; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryNextSequenceReceiveResponse { + const message = new QueryNextSequenceReceiveResponse({}); + if (data.next_sequence_receive != null) { + message.next_sequence_receive = data.next_sequence_receive; + } + if (data.proof != null) { + message.proof = data.proof; + } + if (data.proof_height != null) { + message.proof_height = dependency_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + next_sequence_receive?: number; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.next_sequence_receive != null) { + data.next_sequence_receive = this.next_sequence_receive; + } + 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.next_sequence_receive != 0) + writer.writeUint64(1, this.next_sequence_receive); + 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): QueryNextSequenceReceiveResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryNextSequenceReceiveResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.next_sequence_receive = reader.readUint64(); + break; + case 2: + message.proof = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryNextSequenceReceiveResponse { + return QueryNextSequenceReceiveResponse.deserialize(bytes); + } + } + export class QueryNextSequenceSendRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): QueryNextSequenceSendRequest { + const message = new QueryNextSequenceSendRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryNextSequenceSendRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryNextSequenceSendRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryNextSequenceSendRequest { + return QueryNextSequenceSendRequest.deserialize(bytes); + } + } + export class QueryNextSequenceSendResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + next_sequence_send?: number; + proof?: Uint8Array; + proof_height?: dependency_1.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 ("next_sequence_send" in data && data.next_sequence_send != undefined) { + this.next_sequence_send = data.next_sequence_send; + } + 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 next_sequence_send() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set next_sequence_send(value: number) { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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: { + next_sequence_send?: number; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryNextSequenceSendResponse { + const message = new QueryNextSequenceSendResponse({}); + if (data.next_sequence_send != null) { + message.next_sequence_send = data.next_sequence_send; + } + if (data.proof != null) { + message.proof = data.proof; + } + if (data.proof_height != null) { + message.proof_height = dependency_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + next_sequence_send?: number; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.next_sequence_send != null) { + data.next_sequence_send = this.next_sequence_send; + } + 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.next_sequence_send != 0) + writer.writeUint64(1, this.next_sequence_send); + 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): QueryNextSequenceSendResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryNextSequenceSendResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.next_sequence_send = reader.readUint64(); + break; + case 2: + message.proof = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryNextSequenceSendResponse { + return QueryNextSequenceSendResponse.deserialize(bytes); + } + } + export class QueryUpgradeErrorRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): QueryUpgradeErrorRequest { + const message = new QueryUpgradeErrorRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUpgradeErrorRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradeErrorRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradeErrorRequest { + return QueryUpgradeErrorRequest.deserialize(bytes); + } + } + export class QueryUpgradeErrorResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + error_receipt?: dependency_7.ibc.core.channel.v1.ErrorReceipt; + proof?: Uint8Array; + proof_height?: dependency_1.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 ("error_receipt" in data && data.error_receipt != undefined) { + this.error_receipt = data.error_receipt; + } + 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 error_receipt() { + return pb_1.Message.getWrapperField(this, dependency_7.ibc.core.channel.v1.ErrorReceipt, 1) as dependency_7.ibc.core.channel.v1.ErrorReceipt; + } + set error_receipt(value: dependency_7.ibc.core.channel.v1.ErrorReceipt) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_error_receipt() { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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: { + error_receipt?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryUpgradeErrorResponse { + const message = new QueryUpgradeErrorResponse({}); + if (data.error_receipt != null) { + message.error_receipt = dependency_7.ibc.core.channel.v1.ErrorReceipt.fromObject(data.error_receipt); + } + if (data.proof != null) { + message.proof = data.proof; + } + if (data.proof_height != null) { + message.proof_height = dependency_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + error_receipt?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.error_receipt != null) { + data.error_receipt = this.error_receipt.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_error_receipt) + writer.writeMessage(1, this.error_receipt, () => this.error_receipt.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): QueryUpgradeErrorResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradeErrorResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.error_receipt, () => message.error_receipt = dependency_7.ibc.core.channel.v1.ErrorReceipt.deserialize(reader)); + break; + case 2: + message.proof = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradeErrorResponse { + return QueryUpgradeErrorResponse.deserialize(bytes); + } + } + export class QueryUpgradeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + }): QueryUpgradeRequest { + const message = new QueryUpgradeRequest({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUpgradeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradeRequest { + return QueryUpgradeRequest.deserialize(bytes); + } + } + export class QueryUpgradeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + upgrade?: dependency_7.ibc.core.channel.v1.Upgrade; + proof?: Uint8Array; + proof_height?: dependency_1.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 ("upgrade" in data && data.upgrade != undefined) { + this.upgrade = data.upgrade; + } + 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 upgrade() { + return pb_1.Message.getWrapperField(this, dependency_7.ibc.core.channel.v1.Upgrade, 1) as dependency_7.ibc.core.channel.v1.Upgrade; + } + set upgrade(value: dependency_7.ibc.core.channel.v1.Upgrade) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_upgrade() { + 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_1.ibc.core.client.v1.Height, 3) as dependency_1.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_1.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: { + upgrade?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryUpgradeResponse { + const message = new QueryUpgradeResponse({}); + if (data.upgrade != null) { + message.upgrade = dependency_7.ibc.core.channel.v1.Upgrade.fromObject(data.upgrade); + } + if (data.proof != null) { + message.proof = data.proof; + } + if (data.proof_height != null) { + message.proof_height = dependency_1.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + return message; + } + toObject() { + const data: { + upgrade?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.upgrade != null) { + data.upgrade = this.upgrade.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_upgrade) + writer.writeMessage(1, this.upgrade, () => this.upgrade.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): QueryUpgradeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.upgrade, () => message.upgrade = dependency_7.ibc.core.channel.v1.Upgrade.deserialize(reader)); + break; + case 2: + message.proof = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradeResponse { + return QueryUpgradeResponse.deserialize(bytes); + } + } + export class QueryChannelParamsRequest 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: {}): QueryChannelParamsRequest { + const message = new QueryChannelParamsRequest({}); + 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): QueryChannelParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChannelParamsRequest { + return QueryChannelParamsRequest.deserialize(bytes); + } + } + export class QueryChannelParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_3.ibc.core.channel.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_3.ibc.core.channel.v1.Params, 1) as dependency_3.ibc.core.channel.v1.Params; + } + set params(value: dependency_3.ibc.core.channel.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; + }): QueryChannelParamsResponse { + const message = new QueryChannelParamsResponse({}); + if (data.params != null) { + message.params = dependency_3.ibc.core.channel.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryChannelParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChannelParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_3.ibc.core.channel.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChannelParamsResponse { + return QueryChannelParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Channel: { + path: "/ibc.core.channel.v1.Query/Channel", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryChannelRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryChannelRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryChannelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryChannelResponse.deserialize(new Uint8Array(bytes)) + }, + Channels: { + path: "/ibc.core.channel.v1.Query/Channels", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryChannelsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryChannelsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryChannelsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryChannelsResponse.deserialize(new Uint8Array(bytes)) + }, + ConnectionChannels: { + path: "/ibc.core.channel.v1.Query/ConnectionChannels", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConnectionChannelsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConnectionChannelsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConnectionChannelsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConnectionChannelsResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelClientState: { + path: "/ibc.core.channel.v1.Query/ChannelClientState", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryChannelClientStateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryChannelClientStateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryChannelClientStateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryChannelClientStateResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelConsensusState: { + path: "/ibc.core.channel.v1.Query/ChannelConsensusState", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryChannelConsensusStateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryChannelConsensusStateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryChannelConsensusStateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryChannelConsensusStateResponse.deserialize(new Uint8Array(bytes)) + }, + PacketCommitment: { + path: "/ibc.core.channel.v1.Query/PacketCommitment", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPacketCommitmentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPacketCommitmentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPacketCommitmentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPacketCommitmentResponse.deserialize(new Uint8Array(bytes)) + }, + PacketCommitments: { + path: "/ibc.core.channel.v1.Query/PacketCommitments", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPacketCommitmentsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPacketCommitmentsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPacketCommitmentsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPacketCommitmentsResponse.deserialize(new Uint8Array(bytes)) + }, + PacketReceipt: { + path: "/ibc.core.channel.v1.Query/PacketReceipt", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPacketReceiptRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPacketReceiptRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPacketReceiptResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPacketReceiptResponse.deserialize(new Uint8Array(bytes)) + }, + PacketAcknowledgement: { + path: "/ibc.core.channel.v1.Query/PacketAcknowledgement", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPacketAcknowledgementRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPacketAcknowledgementRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPacketAcknowledgementResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPacketAcknowledgementResponse.deserialize(new Uint8Array(bytes)) + }, + PacketAcknowledgements: { + path: "/ibc.core.channel.v1.Query/PacketAcknowledgements", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryPacketAcknowledgementsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryPacketAcknowledgementsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryPacketAcknowledgementsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryPacketAcknowledgementsResponse.deserialize(new Uint8Array(bytes)) + }, + UnreceivedPackets: { + path: "/ibc.core.channel.v1.Query/UnreceivedPackets", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryUnreceivedPacketsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryUnreceivedPacketsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryUnreceivedPacketsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryUnreceivedPacketsResponse.deserialize(new Uint8Array(bytes)) + }, + UnreceivedAcks: { + path: "/ibc.core.channel.v1.Query/UnreceivedAcks", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryUnreceivedAcksRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryUnreceivedAcksRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryUnreceivedAcksResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryUnreceivedAcksResponse.deserialize(new Uint8Array(bytes)) + }, + NextSequenceReceive: { + path: "/ibc.core.channel.v1.Query/NextSequenceReceive", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryNextSequenceReceiveRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryNextSequenceReceiveRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryNextSequenceReceiveResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryNextSequenceReceiveResponse.deserialize(new Uint8Array(bytes)) + }, + NextSequenceSend: { + path: "/ibc.core.channel.v1.Query/NextSequenceSend", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryNextSequenceSendRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryNextSequenceSendRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryNextSequenceSendResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryNextSequenceSendResponse.deserialize(new Uint8Array(bytes)) + }, + UpgradeError: { + path: "/ibc.core.channel.v1.Query/UpgradeError", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryUpgradeErrorRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryUpgradeErrorRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryUpgradeErrorResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryUpgradeErrorResponse.deserialize(new Uint8Array(bytes)) + }, + Upgrade: { + path: "/ibc.core.channel.v1.Query/Upgrade", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryUpgradeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryUpgradeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryUpgradeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryUpgradeResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelParams: { + path: "/ibc.core.channel.v1.Query/ChannelParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryChannelParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryChannelParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryChannelParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryChannelParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Channel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Channels(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConnectionChannels(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelClientState(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelConsensusState(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PacketCommitment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PacketCommitments(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PacketReceipt(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PacketAcknowledgement(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PacketAcknowledgements(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UnreceivedPackets(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UnreceivedAcks(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract NextSequenceReceive(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract NextSequenceSend(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpgradeError(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Upgrade(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Channel: GrpcUnaryServiceInterface = (message: QueryChannelRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Channel(message, metadata, options, callback); + }; + Channels: GrpcUnaryServiceInterface = (message: QueryChannelsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Channels(message, metadata, options, callback); + }; + ConnectionChannels: GrpcUnaryServiceInterface = (message: QueryConnectionChannelsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConnectionChannels(message, metadata, options, callback); + }; + ChannelClientState: GrpcUnaryServiceInterface = (message: QueryChannelClientStateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelClientState(message, metadata, options, callback); + }; + ChannelConsensusState: GrpcUnaryServiceInterface = (message: QueryChannelConsensusStateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelConsensusState(message, metadata, options, callback); + }; + PacketCommitment: GrpcUnaryServiceInterface = (message: QueryPacketCommitmentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PacketCommitment(message, metadata, options, callback); + }; + PacketCommitments: GrpcUnaryServiceInterface = (message: QueryPacketCommitmentsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PacketCommitments(message, metadata, options, callback); + }; + PacketReceipt: GrpcUnaryServiceInterface = (message: QueryPacketReceiptRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PacketReceipt(message, metadata, options, callback); + }; + PacketAcknowledgement: GrpcUnaryServiceInterface = (message: QueryPacketAcknowledgementRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PacketAcknowledgement(message, metadata, options, callback); + }; + PacketAcknowledgements: GrpcUnaryServiceInterface = (message: QueryPacketAcknowledgementsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PacketAcknowledgements(message, metadata, options, callback); + }; + UnreceivedPackets: GrpcUnaryServiceInterface = (message: QueryUnreceivedPacketsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UnreceivedPackets(message, metadata, options, callback); + }; + UnreceivedAcks: GrpcUnaryServiceInterface = (message: QueryUnreceivedAcksRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UnreceivedAcks(message, metadata, options, callback); + }; + NextSequenceReceive: GrpcUnaryServiceInterface = (message: QueryNextSequenceReceiveRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.NextSequenceReceive(message, metadata, options, callback); + }; + NextSequenceSend: GrpcUnaryServiceInterface = (message: QueryNextSequenceSendRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.NextSequenceSend(message, metadata, options, callback); + }; + UpgradeError: GrpcUnaryServiceInterface = (message: QueryUpgradeErrorRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpgradeError(message, metadata, options, callback); + }; + Upgrade: GrpcUnaryServiceInterface = (message: QueryUpgradeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Upgrade(message, metadata, options, callback); + }; + ChannelParams: GrpcUnaryServiceInterface = (message: QueryChannelParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/ibc/core/channel/v1/query_pb.d.ts b/codegen/ibc/core/channel/v1/query_pb.d.ts similarity index 79% rename from proto/ibc/core/channel/v1/query_pb.d.ts rename to codegen/ibc/core/channel/v1/query_pb.d.ts index c1e38fd..5786815 100644 --- a/proto/ibc/core/channel/v1/query_pb.d.ts +++ b/codegen/ibc/core/channel/v1/query_pb.d.ts @@ -8,6 +8,7 @@ import * as ibc_core_channel_v1_channel_pb from "../../../../ibc/core/channel/v1 import * as google_api_annotations_pb from "../../../../google/api/annotations_pb"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as ibc_core_channel_v1_upgrade_pb from "../../../../ibc/core/channel/v1/upgrade_pb"; export class QueryChannelRequest extends jspb.Message { getPortId(): string; @@ -571,6 +572,11 @@ export class QueryPacketAcknowledgementsRequest extends jspb.Message { getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + clearPacketCommitmentSequencesList(): void; + getPacketCommitmentSequencesList(): Array; + setPacketCommitmentSequencesList(value: Array): void; + addPacketCommitmentSequences(value: number, index?: number): number; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QueryPacketAcknowledgementsRequest.AsObject; static toObject(includeInstance: boolean, msg: QueryPacketAcknowledgementsRequest): QueryPacketAcknowledgementsRequest.AsObject; @@ -586,6 +592,7 @@ export namespace QueryPacketAcknowledgementsRequest { portId: string, channelId: string, pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + packetCommitmentSequencesList: Array, } } @@ -795,3 +802,213 @@ export namespace QueryNextSequenceReceiveResponse { } } +export class QueryNextSequenceSendRequest extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryNextSequenceSendRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryNextSequenceSendRequest): QueryNextSequenceSendRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryNextSequenceSendRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryNextSequenceSendRequest; + static deserializeBinaryFromReader(message: QueryNextSequenceSendRequest, reader: jspb.BinaryReader): QueryNextSequenceSendRequest; +} + +export namespace QueryNextSequenceSendRequest { + export type AsObject = { + portId: string, + channelId: string, + } +} + +export class QueryNextSequenceSendResponse extends jspb.Message { + getNextSequenceSend(): number; + setNextSequenceSend(value: number): void; + + getProof(): Uint8Array | string; + getProof_asU8(): Uint8Array; + getProof_asB64(): string; + setProof(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryNextSequenceSendResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryNextSequenceSendResponse): QueryNextSequenceSendResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryNextSequenceSendResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryNextSequenceSendResponse; + static deserializeBinaryFromReader(message: QueryNextSequenceSendResponse, reader: jspb.BinaryReader): QueryNextSequenceSendResponse; +} + +export namespace QueryNextSequenceSendResponse { + export type AsObject = { + nextSequenceSend: number, + proof: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + } +} + +export class QueryUpgradeErrorRequest extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryUpgradeErrorRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryUpgradeErrorRequest): QueryUpgradeErrorRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryUpgradeErrorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryUpgradeErrorRequest; + static deserializeBinaryFromReader(message: QueryUpgradeErrorRequest, reader: jspb.BinaryReader): QueryUpgradeErrorRequest; +} + +export namespace QueryUpgradeErrorRequest { + export type AsObject = { + portId: string, + channelId: string, + } +} + +export class QueryUpgradeErrorResponse extends jspb.Message { + hasErrorReceipt(): boolean; + clearErrorReceipt(): void; + getErrorReceipt(): ibc_core_channel_v1_upgrade_pb.ErrorReceipt | undefined; + setErrorReceipt(value?: ibc_core_channel_v1_upgrade_pb.ErrorReceipt): void; + + getProof(): Uint8Array | string; + getProof_asU8(): Uint8Array; + getProof_asB64(): string; + setProof(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryUpgradeErrorResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryUpgradeErrorResponse): QueryUpgradeErrorResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryUpgradeErrorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryUpgradeErrorResponse; + static deserializeBinaryFromReader(message: QueryUpgradeErrorResponse, reader: jspb.BinaryReader): QueryUpgradeErrorResponse; +} + +export namespace QueryUpgradeErrorResponse { + export type AsObject = { + errorReceipt?: ibc_core_channel_v1_upgrade_pb.ErrorReceipt.AsObject, + proof: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + } +} + +export class QueryUpgradeRequest extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryUpgradeRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryUpgradeRequest): QueryUpgradeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryUpgradeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryUpgradeRequest; + static deserializeBinaryFromReader(message: QueryUpgradeRequest, reader: jspb.BinaryReader): QueryUpgradeRequest; +} + +export namespace QueryUpgradeRequest { + export type AsObject = { + portId: string, + channelId: string, + } +} + +export class QueryUpgradeResponse extends jspb.Message { + hasUpgrade(): boolean; + clearUpgrade(): void; + getUpgrade(): ibc_core_channel_v1_upgrade_pb.Upgrade | undefined; + setUpgrade(value?: ibc_core_channel_v1_upgrade_pb.Upgrade): void; + + getProof(): Uint8Array | string; + getProof_asU8(): Uint8Array; + getProof_asB64(): string; + setProof(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryUpgradeResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryUpgradeResponse): QueryUpgradeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryUpgradeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryUpgradeResponse; + static deserializeBinaryFromReader(message: QueryUpgradeResponse, reader: jspb.BinaryReader): QueryUpgradeResponse; +} + +export namespace QueryUpgradeResponse { + export type AsObject = { + upgrade?: ibc_core_channel_v1_upgrade_pb.Upgrade.AsObject, + proof: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + } +} + +export class QueryChannelParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryChannelParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryChannelParamsRequest): QueryChannelParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryChannelParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryChannelParamsRequest; + static deserializeBinaryFromReader(message: QueryChannelParamsRequest, reader: jspb.BinaryReader): QueryChannelParamsRequest; +} + +export namespace QueryChannelParamsRequest { + export type AsObject = { + } +} + +export class QueryChannelParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_core_channel_v1_channel_pb.Params | undefined; + setParams(value?: ibc_core_channel_v1_channel_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryChannelParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryChannelParamsResponse): QueryChannelParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryChannelParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryChannelParamsResponse; + static deserializeBinaryFromReader(message: QueryChannelParamsResponse, reader: jspb.BinaryReader): QueryChannelParamsResponse; +} + +export namespace QueryChannelParamsResponse { + export type AsObject = { + params?: ibc_core_channel_v1_channel_pb.Params.AsObject, + } +} + diff --git a/proto/ibc/core/channel/v1/query_pb.js b/codegen/ibc/core/channel/v1/query_pb.js similarity index 78% rename from proto/ibc/core/channel/v1/query_pb.js rename to codegen/ibc/core/channel/v1/query_pb.js index 3d28d0c..1fb7563 100644 --- a/proto/ibc/core/channel/v1/query_pb.js +++ b/codegen/ibc/core/channel/v1/query_pb.js @@ -13,7 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); goog.object.extend(proto, ibc_core_client_v1_client_pb); @@ -27,10 +27,14 @@ var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js' goog.object.extend(proto, google_protobuf_any_pb); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); +var ibc_core_channel_v1_upgrade_pb = require('../../../../ibc/core/channel/v1/upgrade_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_upgrade_pb); goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelClientStateRequest', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelClientStateResponse', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelParamsRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelParamsResponse', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelRequest', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelResponse', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelsRequest', null, global); @@ -39,6 +43,8 @@ goog.exportSymbol('proto.ibc.core.channel.v1.QueryConnectionChannelsRequest', nu goog.exportSymbol('proto.ibc.core.channel.v1.QueryConnectionChannelsResponse', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryNextSequenceSendRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryNextSequenceSendResponse', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest', null, global); @@ -53,6 +59,10 @@ goog.exportSymbol('proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest', null, goog.exportSymbol('proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest', null, global); goog.exportSymbol('proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryUpgradeErrorRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryUpgradeErrorResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryUpgradeRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryUpgradeResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -442,7 +452,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.repeatedFields_, null); }; goog.inherits(proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -599,6 +609,174 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.displayName = 'proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryNextSequenceSendRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.displayName = 'proto.ibc.core.channel.v1.QueryNextSequenceSendRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryNextSequenceSendResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.displayName = 'proto.ibc.core.channel.v1.QueryNextSequenceSendResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUpgradeErrorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.displayName = 'proto.ibc.core.channel.v1.QueryUpgradeErrorRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUpgradeErrorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.displayName = 'proto.ibc.core.channel.v1.QueryUpgradeErrorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUpgradeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUpgradeRequest.displayName = 'proto.ibc.core.channel.v1.QueryUpgradeRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUpgradeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUpgradeResponse.displayName = 'proto.ibc.core.channel.v1.QueryUpgradeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.QueryChannelParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelParamsRequest.displayName = 'proto.ibc.core.channel.v1.QueryChannelParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelParamsResponse.displayName = 'proto.ibc.core.channel.v1.QueryChannelParamsResponse'; +} @@ -4590,6 +4768,13 @@ proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.hasProofH +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.repeatedFields_ = [4]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4623,7 +4808,8 @@ proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.toObject = function var f, obj = { portId: jspb.Message.getFieldWithDefault(msg, 1, ""), channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), - pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f), + packetCommitmentSequencesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f }; if (includeInstance) { @@ -4673,6 +4859,12 @@ proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.deserializeBinaryFr reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); msg.setPagination(value); break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addPacketCommitmentSequences(values[i]); + } + break; default: reader.skipField(); break; @@ -4724,6 +4916,13 @@ proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.serializeBinaryToWr cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter ); } + f = message.getPacketCommitmentSequencesList(); + if (f.length > 0) { + writer.writePackedUint64( + 4, + f + ); + } }; @@ -4800,6 +4999,43 @@ proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.hasPagina }; +/** + * repeated uint64 packet_commitment_sequences = 4; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.getPacketCommitmentSequencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.setPacketCommitmentSequencesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.addPacketCommitmentSequences = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.clearPacketCommitmentSequencesList = function() { + return this.setPacketCommitmentSequencesList([]); +}; + + /** * List of repeated fields within this message type. @@ -6311,4 +6547,1483 @@ proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.hasProofHei }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceSendRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendRequest} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryNextSequenceSendRequest; + return proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceSendRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendRequest} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceSendRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendRequest} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendRequest} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceSendResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.toObject = function(includeInstance, msg) { + var f, obj = { + nextSequenceSend: jspb.Message.getFieldWithDefault(msg, 1, 0), + proof: msg.getProof_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendResponse} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryNextSequenceSendResponse; + return proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceSendResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendResponse} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextSequenceSend(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(value); + break; + case 3: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceSendResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNextSequenceSend(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getProof_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 next_sequence_send = 1; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.getNextSequenceSend = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendResponse} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.setNextSequenceSend = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proof = 2; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProof()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendResponse} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.setProof = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceSendResponse} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryNextSequenceSendResponse.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.QueryUpgradeErrorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorRequest} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUpgradeErrorRequest; + return proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.QueryUpgradeErrorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorRequest} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.QueryUpgradeErrorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + errorReceipt: (f = msg.getErrorReceipt()) && ibc_core_channel_v1_upgrade_pb.ErrorReceipt.toObject(includeInstance, f), + proof: msg.getProof_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUpgradeErrorResponse; + return proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_upgrade_pb.ErrorReceipt; + reader.readMessage(value,ibc_core_channel_v1_upgrade_pb.ErrorReceipt.deserializeBinaryFromReader); + msg.setErrorReceipt(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(value); + break; + case 3: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getErrorReceipt(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_upgrade_pb.ErrorReceipt.serializeBinaryToWriter + ); + } + f = message.getProof_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ErrorReceipt error_receipt = 1; + * @return {?proto.ibc.core.channel.v1.ErrorReceipt} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.getErrorReceipt = function() { + return /** @type{?proto.ibc.core.channel.v1.ErrorReceipt} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_upgrade_pb.ErrorReceipt, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.ErrorReceipt|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.setErrorReceipt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.clearErrorReceipt = function() { + return this.setErrorReceipt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.hasErrorReceipt = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proof = 2; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProof()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.setProof = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeErrorResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryUpgradeErrorResponse.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUpgradeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.QueryUpgradeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeRequest} + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUpgradeRequest; + return proto.ibc.core.channel.v1.QueryUpgradeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.QueryUpgradeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeRequest} + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUpgradeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.QueryUpgradeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUpgradeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.QueryUpgradeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgrade: (f = msg.getUpgrade()) && ibc_core_channel_v1_upgrade_pb.Upgrade.toObject(includeInstance, f), + proof: msg.getProof_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeResponse} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUpgradeResponse; + return proto.ibc.core.channel.v1.QueryUpgradeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.QueryUpgradeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeResponse} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_upgrade_pb.Upgrade; + reader.readMessage(value,ibc_core_channel_v1_upgrade_pb.Upgrade.deserializeBinaryFromReader); + msg.setUpgrade(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(value); + break; + case 3: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUpgradeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.QueryUpgradeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgrade(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_upgrade_pb.Upgrade.serializeBinaryToWriter + ); + } + f = message.getProof_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Upgrade upgrade = 1; + * @return {?proto.ibc.core.channel.v1.Upgrade} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.getUpgrade = function() { + return /** @type{?proto.ibc.core.channel.v1.Upgrade} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_upgrade_pb.Upgrade, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Upgrade|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.setUpgrade = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.clearUpgrade = function() { + return this.setUpgrade(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.hasUpgrade = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proof = 2; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProof()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.setProof = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryUpgradeResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryUpgradeResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryUpgradeResponse.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.QueryChannelParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.QueryChannelParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.QueryChannelParamsRequest} + */ +proto.ibc.core.channel.v1.QueryChannelParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelParamsRequest; + return proto.ibc.core.channel.v1.QueryChannelParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.QueryChannelParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelParamsRequest} + */ +proto.ibc.core.channel.v1.QueryChannelParamsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryChannelParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.QueryChannelParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.QueryChannelParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && ibc_core_channel_v1_channel_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.QueryChannelParamsResponse} + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelParamsResponse; + return proto.ibc.core.channel.v1.QueryChannelParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.QueryChannelParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelParamsResponse} + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.Params; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.QueryChannelParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.ibc.core.channel.v1.Params} + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.prototype.getParams = function() { + return /** @type{?proto.ibc.core.channel.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Params, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Params|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryChannelParamsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelParamsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/proto/ibc/core/channel/v1/query_pb_service.d.ts b/codegen/ibc/core/channel/v1/query_pb_service.d.ts similarity index 79% rename from proto/ibc/core/channel/v1/query_pb_service.d.ts rename to codegen/ibc/core/channel/v1/query_pb_service.d.ts index 4f37883..c9eeb13 100644 --- a/proto/ibc/core/channel/v1/query_pb_service.d.ts +++ b/codegen/ibc/core/channel/v1/query_pb_service.d.ts @@ -121,6 +121,42 @@ type QueryNextSequenceReceive = { readonly responseType: typeof ibc_core_channel_v1_query_pb.QueryNextSequenceReceiveResponse; }; +type QueryNextSequenceSend = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_query_pb.QueryNextSequenceSendRequest; + readonly responseType: typeof ibc_core_channel_v1_query_pb.QueryNextSequenceSendResponse; +}; + +type QueryUpgradeError = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_query_pb.QueryUpgradeErrorRequest; + readonly responseType: typeof ibc_core_channel_v1_query_pb.QueryUpgradeErrorResponse; +}; + +type QueryUpgrade = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_query_pb.QueryUpgradeRequest; + readonly responseType: typeof ibc_core_channel_v1_query_pb.QueryUpgradeResponse; +}; + +type QueryChannelParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_query_pb.QueryChannelParamsRequest; + readonly responseType: typeof ibc_core_channel_v1_query_pb.QueryChannelParamsResponse; +}; + export class Query { static readonly serviceName: string; static readonly Channel: QueryChannel; @@ -136,6 +172,10 @@ export class Query { static readonly UnreceivedPackets: QueryUnreceivedPackets; static readonly UnreceivedAcks: QueryUnreceivedAcks; static readonly NextSequenceReceive: QueryNextSequenceReceive; + static readonly NextSequenceSend: QueryNextSequenceSend; + static readonly UpgradeError: QueryUpgradeError; + static readonly Upgrade: QueryUpgrade; + static readonly ChannelParams: QueryChannelParams; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -287,5 +327,41 @@ export class QueryClient { requestMessage: ibc_core_channel_v1_query_pb.QueryNextSequenceReceiveRequest, callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_query_pb.QueryNextSequenceReceiveResponse|null) => void ): UnaryResponse; + nextSequenceSend( + requestMessage: ibc_core_channel_v1_query_pb.QueryNextSequenceSendRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_query_pb.QueryNextSequenceSendResponse|null) => void + ): UnaryResponse; + nextSequenceSend( + requestMessage: ibc_core_channel_v1_query_pb.QueryNextSequenceSendRequest, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_query_pb.QueryNextSequenceSendResponse|null) => void + ): UnaryResponse; + upgradeError( + requestMessage: ibc_core_channel_v1_query_pb.QueryUpgradeErrorRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_query_pb.QueryUpgradeErrorResponse|null) => void + ): UnaryResponse; + upgradeError( + requestMessage: ibc_core_channel_v1_query_pb.QueryUpgradeErrorRequest, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_query_pb.QueryUpgradeErrorResponse|null) => void + ): UnaryResponse; + upgrade( + requestMessage: ibc_core_channel_v1_query_pb.QueryUpgradeRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_query_pb.QueryUpgradeResponse|null) => void + ): UnaryResponse; + upgrade( + requestMessage: ibc_core_channel_v1_query_pb.QueryUpgradeRequest, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_query_pb.QueryUpgradeResponse|null) => void + ): UnaryResponse; + channelParams( + requestMessage: ibc_core_channel_v1_query_pb.QueryChannelParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_query_pb.QueryChannelParamsResponse|null) => void + ): UnaryResponse; + channelParams( + requestMessage: ibc_core_channel_v1_query_pb.QueryChannelParamsRequest, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_query_pb.QueryChannelParamsResponse|null) => void + ): UnaryResponse; } diff --git a/proto/ibc/core/channel/v1/query_pb_service.js b/codegen/ibc/core/channel/v1/query_pb_service.js similarity index 77% rename from proto/ibc/core/channel/v1/query_pb_service.js rename to codegen/ibc/core/channel/v1/query_pb_service.js index 7ed628d..06d0bda 100644 --- a/proto/ibc/core/channel/v1/query_pb_service.js +++ b/codegen/ibc/core/channel/v1/query_pb_service.js @@ -127,6 +127,42 @@ Query.NextSequenceReceive = { responseType: ibc_core_channel_v1_query_pb.QueryNextSequenceReceiveResponse }; +Query.NextSequenceSend = { + methodName: "NextSequenceSend", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_query_pb.QueryNextSequenceSendRequest, + responseType: ibc_core_channel_v1_query_pb.QueryNextSequenceSendResponse +}; + +Query.UpgradeError = { + methodName: "UpgradeError", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_query_pb.QueryUpgradeErrorRequest, + responseType: ibc_core_channel_v1_query_pb.QueryUpgradeErrorResponse +}; + +Query.Upgrade = { + methodName: "Upgrade", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_query_pb.QueryUpgradeRequest, + responseType: ibc_core_channel_v1_query_pb.QueryUpgradeResponse +}; + +Query.ChannelParams = { + methodName: "ChannelParams", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_query_pb.QueryChannelParamsRequest, + responseType: ibc_core_channel_v1_query_pb.QueryChannelParamsResponse +}; + exports.Query = Query; function QueryClient(serviceHost, options) { @@ -537,5 +573,129 @@ QueryClient.prototype.nextSequenceReceive = function nextSequenceReceive(request }; }; +QueryClient.prototype.nextSequenceSend = function nextSequenceSend(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.NextSequenceSend, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.upgradeError = function upgradeError(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.UpgradeError, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.upgrade = function upgrade(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Upgrade, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.channelParams = function channelParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.ChannelParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.QueryClient = QueryClient; diff --git a/codegen/ibc/core/channel/v1/tx.ts b/codegen/ibc/core/channel/v1/tx.ts new file mode 100644 index 0000000..628f744 --- /dev/null +++ b/codegen/ibc/core/channel/v1/tx.ts @@ -0,0 +1,4837 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/channel/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../cosmos/msg/v1/msg"; +import * as dependency_3 from "./../../client/v1/client"; +import * as dependency_4 from "./channel"; +import * as dependency_5 from "./upgrade"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.core.channel.v1 { + export enum ResponseResultType { + RESPONSE_RESULT_TYPE_UNSPECIFIED = 0, + RESPONSE_RESULT_TYPE_NOOP = 1, + RESPONSE_RESULT_TYPE_SUCCESS = 2, + RESPONSE_RESULT_TYPE_FAILURE = 3 + } + export class MsgChannelOpenInit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel?: dependency_4.ibc.core.channel.v1.Channel; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel" in data && data.channel != undefined) { + this.channel = data.channel; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.Channel, 2) as dependency_4.ibc.core.channel.v1.Channel; + } + set channel(value: dependency_4.ibc.core.channel.v1.Channel) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_channel() { + return pb_1.Message.getField(this, 2) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + port_id?: string; + channel?: ReturnType; + signer?: string; + }): MsgChannelOpenInit { + const message = new MsgChannelOpenInit({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel != null) { + message.channel = dependency_4.ibc.core.channel.v1.Channel.fromObject(data.channel); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel != null) { + data.channel = this.channel.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.has_channel) + writer.writeMessage(2, this.channel, () => this.channel.serialize(writer)); + if (this.signer.length) + writer.writeString(3, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelOpenInit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelOpenInit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + reader.readMessage(message.channel, () => message.channel = dependency_4.ibc.core.channel.v1.Channel.deserialize(reader)); + break; + case 3: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenInit { + return MsgChannelOpenInit.deserialize(bytes); + } + } + export class MsgChannelOpenInitResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channel_id?: string; + 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 ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + } + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + channel_id?: string; + version?: string; + }): MsgChannelOpenInitResponse { + const message = new MsgChannelOpenInitResponse({}); + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.version != null) { + message.version = data.version; + } + return message; + } + toObject() { + const data: { + channel_id?: string; + version?: string; + } = {}; + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.version != null) { + data.version = this.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.channel_id.length) + writer.writeString(1, this.channel_id); + if (this.version.length) + writer.writeString(2, this.version); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelOpenInitResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelOpenInitResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.channel_id = reader.readString(); + break; + case 2: + message.version = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenInitResponse { + return MsgChannelOpenInitResponse.deserialize(bytes); + } + } + export class MsgChannelOpenTry extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + /** @deprecated*/ + previous_channel_id?: string; + channel?: dependency_4.ibc.core.channel.v1.Channel; + counterparty_version?: string; + proof_init?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("previous_channel_id" in data && data.previous_channel_id != undefined) { + this.previous_channel_id = data.previous_channel_id; + } + if ("channel" in data && data.channel != undefined) { + this.channel = data.channel; + } + if ("counterparty_version" in data && data.counterparty_version != undefined) { + this.counterparty_version = data.counterparty_version; + } + if ("proof_init" in data && data.proof_init != undefined) { + this.proof_init = data.proof_init; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + /** @deprecated*/ + get previous_channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + /** @deprecated*/ + set previous_channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get channel() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.Channel, 3) as dependency_4.ibc.core.channel.v1.Channel; + } + set channel(value: dependency_4.ibc.core.channel.v1.Channel) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_channel() { + return pb_1.Message.getField(this, 3) != null; + } + get counterparty_version() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set counterparty_version(value: string) { + pb_1.Message.setField(this, 4, value); + } + get proof_init() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set proof_init(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 6) as dependency_3.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_3.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 6) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + port_id?: string; + previous_channel_id?: string; + channel?: ReturnType; + counterparty_version?: string; + proof_init?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgChannelOpenTry { + const message = new MsgChannelOpenTry({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.previous_channel_id != null) { + message.previous_channel_id = data.previous_channel_id; + } + if (data.channel != null) { + message.channel = dependency_4.ibc.core.channel.v1.Channel.fromObject(data.channel); + } + if (data.counterparty_version != null) { + message.counterparty_version = data.counterparty_version; + } + if (data.proof_init != null) { + message.proof_init = data.proof_init; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + previous_channel_id?: string; + channel?: ReturnType; + counterparty_version?: string; + proof_init?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.previous_channel_id != null) { + data.previous_channel_id = this.previous_channel_id; + } + if (this.channel != null) { + data.channel = this.channel.toObject(); + } + if (this.counterparty_version != null) { + data.counterparty_version = this.counterparty_version; + } + if (this.proof_init != null) { + data.proof_init = this.proof_init; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.previous_channel_id.length) + writer.writeString(2, this.previous_channel_id); + if (this.has_channel) + writer.writeMessage(3, this.channel, () => this.channel.serialize(writer)); + if (this.counterparty_version.length) + writer.writeString(4, this.counterparty_version); + if (this.proof_init.length) + writer.writeBytes(5, this.proof_init); + if (this.has_proof_height) + writer.writeMessage(6, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(7, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelOpenTry { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelOpenTry(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.previous_channel_id = reader.readString(); + break; + case 3: + reader.readMessage(message.channel, () => message.channel = dependency_4.ibc.core.channel.v1.Channel.deserialize(reader)); + break; + case 4: + message.counterparty_version = reader.readString(); + break; + case 5: + message.proof_init = reader.readBytes(); + break; + case 6: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 7: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenTry { + return MsgChannelOpenTry.deserialize(bytes); + } + } + export class MsgChannelOpenTryResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + version?: string; + channel_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 ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + } + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + version?: string; + channel_id?: string; + }): MsgChannelOpenTryResponse { + const message = new MsgChannelOpenTryResponse({}); + if (data.version != null) { + message.version = data.version; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + return message; + } + toObject() { + const data: { + version?: string; + channel_id?: string; + } = {}; + if (this.version != null) { + data.version = this.version; + } + if (this.channel_id != null) { + data.channel_id = this.channel_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.version.length) + writer.writeString(1, this.version); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelOpenTryResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelOpenTryResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.version = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenTryResponse { + return MsgChannelOpenTryResponse.deserialize(bytes); + } + } + export class MsgChannelOpenAck extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + counterparty_channel_id?: string; + counterparty_version?: string; + proof_try?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("counterparty_channel_id" in data && data.counterparty_channel_id != undefined) { + this.counterparty_channel_id = data.counterparty_channel_id; + } + if ("counterparty_version" in data && data.counterparty_version != undefined) { + this.counterparty_version = data.counterparty_version; + } + if ("proof_try" in data && data.proof_try != undefined) { + this.proof_try = data.proof_try; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get counterparty_channel_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set counterparty_channel_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get counterparty_version() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set counterparty_version(value: string) { + pb_1.Message.setField(this, 4, value); + } + get proof_try() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set proof_try(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 6) as dependency_3.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_3.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 6) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + counterparty_channel_id?: string; + counterparty_version?: string; + proof_try?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgChannelOpenAck { + const message = new MsgChannelOpenAck({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.counterparty_channel_id != null) { + message.counterparty_channel_id = data.counterparty_channel_id; + } + if (data.counterparty_version != null) { + message.counterparty_version = data.counterparty_version; + } + if (data.proof_try != null) { + message.proof_try = data.proof_try; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + counterparty_channel_id?: string; + counterparty_version?: string; + proof_try?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.counterparty_channel_id != null) { + data.counterparty_channel_id = this.counterparty_channel_id; + } + if (this.counterparty_version != null) { + data.counterparty_version = this.counterparty_version; + } + if (this.proof_try != null) { + data.proof_try = this.proof_try; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.counterparty_channel_id.length) + writer.writeString(3, this.counterparty_channel_id); + if (this.counterparty_version.length) + writer.writeString(4, this.counterparty_version); + if (this.proof_try.length) + writer.writeBytes(5, this.proof_try); + if (this.has_proof_height) + writer.writeMessage(6, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(7, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelOpenAck { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelOpenAck(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.counterparty_channel_id = reader.readString(); + break; + case 4: + message.counterparty_version = reader.readString(); + break; + case 5: + message.proof_try = reader.readBytes(); + break; + case 6: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 7: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenAck { + return MsgChannelOpenAck.deserialize(bytes); + } + } + export class MsgChannelOpenAckResponse 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: {}): MsgChannelOpenAckResponse { + const message = new MsgChannelOpenAckResponse({}); + 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): MsgChannelOpenAckResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelOpenAckResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenAckResponse { + return MsgChannelOpenAckResponse.deserialize(bytes); + } + } + export class MsgChannelOpenConfirm extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + proof_ack?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("proof_ack" in data && data.proof_ack != undefined) { + this.proof_ack = data.proof_ack; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get proof_ack() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set proof_ack(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; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + proof_ack?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgChannelOpenConfirm { + const message = new MsgChannelOpenConfirm({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.proof_ack != null) { + message.proof_ack = data.proof_ack; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + proof_ack?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.proof_ack != null) { + data.proof_ack = this.proof_ack; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.proof_ack.length) + writer.writeBytes(3, this.proof_ack); + if (this.has_proof_height) + writer.writeMessage(4, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(5, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelOpenConfirm { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelOpenConfirm(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.proof_ack = reader.readBytes(); + break; + case 4: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 5: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenConfirm { + return MsgChannelOpenConfirm.deserialize(bytes); + } + } + export class MsgChannelOpenConfirmResponse 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: {}): MsgChannelOpenConfirmResponse { + const message = new MsgChannelOpenConfirmResponse({}); + 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): MsgChannelOpenConfirmResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelOpenConfirmResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenConfirmResponse { + return MsgChannelOpenConfirmResponse.deserialize(bytes); + } + } + export class MsgChannelCloseInit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + signer?: string; + }): MsgChannelCloseInit { + const message = new MsgChannelCloseInit({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.signer.length) + writer.writeString(3, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelCloseInit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelCloseInit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelCloseInit { + return MsgChannelCloseInit.deserialize(bytes); + } + } + export class MsgChannelCloseInitResponse 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: {}): MsgChannelCloseInitResponse { + const message = new MsgChannelCloseInitResponse({}); + 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): MsgChannelCloseInitResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelCloseInitResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelCloseInitResponse { + return MsgChannelCloseInitResponse.deserialize(bytes); + } + } + export class MsgChannelCloseConfirm extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + proof_init?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: string; + counterparty_upgrade_sequence?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("proof_init" in data && data.proof_init != undefined) { + this.proof_init = data.proof_init; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("counterparty_upgrade_sequence" in data && data.counterparty_upgrade_sequence != undefined) { + this.counterparty_upgrade_sequence = data.counterparty_upgrade_sequence; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get proof_init() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set proof_init(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; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 5, value); + } + get counterparty_upgrade_sequence() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set counterparty_upgrade_sequence(value: number) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + proof_init?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + counterparty_upgrade_sequence?: number; + }): MsgChannelCloseConfirm { + const message = new MsgChannelCloseConfirm({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.proof_init != null) { + message.proof_init = data.proof_init; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + if (data.counterparty_upgrade_sequence != null) { + message.counterparty_upgrade_sequence = data.counterparty_upgrade_sequence; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + proof_init?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + counterparty_upgrade_sequence?: number; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.proof_init != null) { + data.proof_init = this.proof_init; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + if (this.counterparty_upgrade_sequence != null) { + data.counterparty_upgrade_sequence = this.counterparty_upgrade_sequence; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.proof_init.length) + writer.writeBytes(3, this.proof_init); + if (this.has_proof_height) + writer.writeMessage(4, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(5, this.signer); + if (this.counterparty_upgrade_sequence != 0) + writer.writeUint64(6, this.counterparty_upgrade_sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelCloseConfirm { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelCloseConfirm(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.proof_init = reader.readBytes(); + break; + case 4: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 5: + message.signer = reader.readString(); + break; + case 6: + message.counterparty_upgrade_sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelCloseConfirm { + return MsgChannelCloseConfirm.deserialize(bytes); + } + } + export class MsgChannelCloseConfirmResponse 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: {}): MsgChannelCloseConfirmResponse { + const message = new MsgChannelCloseConfirmResponse({}); + 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): MsgChannelCloseConfirmResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelCloseConfirmResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelCloseConfirmResponse { + return MsgChannelCloseConfirmResponse.deserialize(bytes); + } + } + export class MsgRecvPacket extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet?: dependency_4.ibc.core.channel.v1.Packet; + proof_commitment?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("packet" in data && data.packet != undefined) { + this.packet = data.packet; + } + if ("proof_commitment" in data && data.proof_commitment != undefined) { + this.proof_commitment = data.proof_commitment; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get packet() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.Packet, 1) as dependency_4.ibc.core.channel.v1.Packet; + } + set packet(value: dependency_4.ibc.core.channel.v1.Packet) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet() { + return pb_1.Message.getField(this, 1) != null; + } + get proof_commitment() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set proof_commitment(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; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + packet?: ReturnType; + proof_commitment?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgRecvPacket { + const message = new MsgRecvPacket({}); + if (data.packet != null) { + message.packet = dependency_4.ibc.core.channel.v1.Packet.fromObject(data.packet); + } + if (data.proof_commitment != null) { + message.proof_commitment = data.proof_commitment; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + packet?: ReturnType; + proof_commitment?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.packet != null) { + data.packet = this.packet.toObject(); + } + if (this.proof_commitment != null) { + data.proof_commitment = this.proof_commitment; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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_packet) + writer.writeMessage(1, this.packet, () => this.packet.serialize(writer)); + if (this.proof_commitment.length) + writer.writeBytes(2, this.proof_commitment); + if (this.has_proof_height) + writer.writeMessage(3, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(4, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRecvPacket { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRecvPacket(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet, () => message.packet = dependency_4.ibc.core.channel.v1.Packet.deserialize(reader)); + break; + case 2: + message.proof_commitment = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 4: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRecvPacket { + return MsgRecvPacket.deserialize(bytes); + } + } + export class MsgRecvPacketResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: ResponseResultType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) as ResponseResultType; + } + set result(value: ResponseResultType) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + result?: ResponseResultType; + }): MsgRecvPacketResponse { + const message = new MsgRecvPacketResponse({}); + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + result?: ResponseResultType; + } = {}; + if (this.result != null) { + data.result = this.result; + } + 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.result != ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) + writer.writeEnum(1, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRecvPacketResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRecvPacketResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.result = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRecvPacketResponse { + return MsgRecvPacketResponse.deserialize(bytes); + } + } + export class MsgTimeout extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet?: dependency_4.ibc.core.channel.v1.Packet; + proof_unreceived?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + next_sequence_recv?: number; + signer?: 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 ("packet" in data && data.packet != undefined) { + this.packet = data.packet; + } + if ("proof_unreceived" in data && data.proof_unreceived != undefined) { + this.proof_unreceived = data.proof_unreceived; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("next_sequence_recv" in data && data.next_sequence_recv != undefined) { + this.next_sequence_recv = data.next_sequence_recv; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get packet() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.Packet, 1) as dependency_4.ibc.core.channel.v1.Packet; + } + set packet(value: dependency_4.ibc.core.channel.v1.Packet) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet() { + return pb_1.Message.getField(this, 1) != null; + } + get proof_unreceived() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set proof_unreceived(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; + } + get next_sequence_recv() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set next_sequence_recv(value: number) { + pb_1.Message.setField(this, 4, value); + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + packet?: ReturnType; + proof_unreceived?: Uint8Array; + proof_height?: ReturnType; + next_sequence_recv?: number; + signer?: string; + }): MsgTimeout { + const message = new MsgTimeout({}); + if (data.packet != null) { + message.packet = dependency_4.ibc.core.channel.v1.Packet.fromObject(data.packet); + } + if (data.proof_unreceived != null) { + message.proof_unreceived = data.proof_unreceived; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.next_sequence_recv != null) { + message.next_sequence_recv = data.next_sequence_recv; + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + packet?: ReturnType; + proof_unreceived?: Uint8Array; + proof_height?: ReturnType; + next_sequence_recv?: number; + signer?: string; + } = {}; + if (this.packet != null) { + data.packet = this.packet.toObject(); + } + if (this.proof_unreceived != null) { + data.proof_unreceived = this.proof_unreceived; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.next_sequence_recv != null) { + data.next_sequence_recv = this.next_sequence_recv; + } + if (this.signer != null) { + data.signer = this.signer; + } + 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_packet) + writer.writeMessage(1, this.packet, () => this.packet.serialize(writer)); + if (this.proof_unreceived.length) + writer.writeBytes(2, this.proof_unreceived); + if (this.has_proof_height) + writer.writeMessage(3, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.next_sequence_recv != 0) + writer.writeUint64(4, this.next_sequence_recv); + if (this.signer.length) + writer.writeString(5, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTimeout { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTimeout(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet, () => message.packet = dependency_4.ibc.core.channel.v1.Packet.deserialize(reader)); + break; + case 2: + message.proof_unreceived = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 4: + message.next_sequence_recv = reader.readUint64(); + break; + case 5: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTimeout { + return MsgTimeout.deserialize(bytes); + } + } + export class MsgTimeoutResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: ResponseResultType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) as ResponseResultType; + } + set result(value: ResponseResultType) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + result?: ResponseResultType; + }): MsgTimeoutResponse { + const message = new MsgTimeoutResponse({}); + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + result?: ResponseResultType; + } = {}; + if (this.result != null) { + data.result = this.result; + } + 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.result != ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) + writer.writeEnum(1, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTimeoutResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTimeoutResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.result = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTimeoutResponse { + return MsgTimeoutResponse.deserialize(bytes); + } + } + export class MsgTimeoutOnClose extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet?: dependency_4.ibc.core.channel.v1.Packet; + proof_unreceived?: Uint8Array; + proof_close?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + next_sequence_recv?: number; + signer?: string; + counterparty_upgrade_sequence?: 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 ("packet" in data && data.packet != undefined) { + this.packet = data.packet; + } + if ("proof_unreceived" in data && data.proof_unreceived != undefined) { + this.proof_unreceived = data.proof_unreceived; + } + if ("proof_close" in data && data.proof_close != undefined) { + this.proof_close = data.proof_close; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("next_sequence_recv" in data && data.next_sequence_recv != undefined) { + this.next_sequence_recv = data.next_sequence_recv; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("counterparty_upgrade_sequence" in data && data.counterparty_upgrade_sequence != undefined) { + this.counterparty_upgrade_sequence = data.counterparty_upgrade_sequence; + } + } + } + get packet() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.Packet, 1) as dependency_4.ibc.core.channel.v1.Packet; + } + set packet(value: dependency_4.ibc.core.channel.v1.Packet) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet() { + return pb_1.Message.getField(this, 1) != null; + } + get proof_unreceived() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set proof_unreceived(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get proof_close() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set proof_close(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; + } + get next_sequence_recv() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set next_sequence_recv(value: number) { + pb_1.Message.setField(this, 5, value); + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 6, value); + } + get counterparty_upgrade_sequence() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set counterparty_upgrade_sequence(value: number) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + packet?: ReturnType; + proof_unreceived?: Uint8Array; + proof_close?: Uint8Array; + proof_height?: ReturnType; + next_sequence_recv?: number; + signer?: string; + counterparty_upgrade_sequence?: number; + }): MsgTimeoutOnClose { + const message = new MsgTimeoutOnClose({}); + if (data.packet != null) { + message.packet = dependency_4.ibc.core.channel.v1.Packet.fromObject(data.packet); + } + if (data.proof_unreceived != null) { + message.proof_unreceived = data.proof_unreceived; + } + if (data.proof_close != null) { + message.proof_close = data.proof_close; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.next_sequence_recv != null) { + message.next_sequence_recv = data.next_sequence_recv; + } + if (data.signer != null) { + message.signer = data.signer; + } + if (data.counterparty_upgrade_sequence != null) { + message.counterparty_upgrade_sequence = data.counterparty_upgrade_sequence; + } + return message; + } + toObject() { + const data: { + packet?: ReturnType; + proof_unreceived?: Uint8Array; + proof_close?: Uint8Array; + proof_height?: ReturnType; + next_sequence_recv?: number; + signer?: string; + counterparty_upgrade_sequence?: number; + } = {}; + if (this.packet != null) { + data.packet = this.packet.toObject(); + } + if (this.proof_unreceived != null) { + data.proof_unreceived = this.proof_unreceived; + } + if (this.proof_close != null) { + data.proof_close = this.proof_close; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.next_sequence_recv != null) { + data.next_sequence_recv = this.next_sequence_recv; + } + if (this.signer != null) { + data.signer = this.signer; + } + if (this.counterparty_upgrade_sequence != null) { + data.counterparty_upgrade_sequence = this.counterparty_upgrade_sequence; + } + 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_packet) + writer.writeMessage(1, this.packet, () => this.packet.serialize(writer)); + if (this.proof_unreceived.length) + writer.writeBytes(2, this.proof_unreceived); + if (this.proof_close.length) + writer.writeBytes(3, this.proof_close); + if (this.has_proof_height) + writer.writeMessage(4, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.next_sequence_recv != 0) + writer.writeUint64(5, this.next_sequence_recv); + if (this.signer.length) + writer.writeString(6, this.signer); + if (this.counterparty_upgrade_sequence != 0) + writer.writeUint64(7, this.counterparty_upgrade_sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTimeoutOnClose { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTimeoutOnClose(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet, () => message.packet = dependency_4.ibc.core.channel.v1.Packet.deserialize(reader)); + break; + case 2: + message.proof_unreceived = reader.readBytes(); + break; + case 3: + message.proof_close = reader.readBytes(); + break; + case 4: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 5: + message.next_sequence_recv = reader.readUint64(); + break; + case 6: + message.signer = reader.readString(); + break; + case 7: + message.counterparty_upgrade_sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTimeoutOnClose { + return MsgTimeoutOnClose.deserialize(bytes); + } + } + export class MsgTimeoutOnCloseResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: ResponseResultType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) as ResponseResultType; + } + set result(value: ResponseResultType) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + result?: ResponseResultType; + }): MsgTimeoutOnCloseResponse { + const message = new MsgTimeoutOnCloseResponse({}); + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + result?: ResponseResultType; + } = {}; + if (this.result != null) { + data.result = this.result; + } + 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.result != ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) + writer.writeEnum(1, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgTimeoutOnCloseResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgTimeoutOnCloseResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.result = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgTimeoutOnCloseResponse { + return MsgTimeoutOnCloseResponse.deserialize(bytes); + } + } + export class MsgAcknowledgement extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + packet?: dependency_4.ibc.core.channel.v1.Packet; + acknowledgement?: Uint8Array; + proof_acked?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("packet" in data && data.packet != undefined) { + this.packet = data.packet; + } + if ("acknowledgement" in data && data.acknowledgement != undefined) { + this.acknowledgement = data.acknowledgement; + } + if ("proof_acked" in data && data.proof_acked != undefined) { + this.proof_acked = data.proof_acked; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get packet() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.Packet, 1) as dependency_4.ibc.core.channel.v1.Packet; + } + set packet(value: dependency_4.ibc.core.channel.v1.Packet) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_packet() { + return pb_1.Message.getField(this, 1) != null; + } + get acknowledgement() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set acknowledgement(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get proof_acked() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set proof_acked(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; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + packet?: ReturnType; + acknowledgement?: Uint8Array; + proof_acked?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgAcknowledgement { + const message = new MsgAcknowledgement({}); + if (data.packet != null) { + message.packet = dependency_4.ibc.core.channel.v1.Packet.fromObject(data.packet); + } + if (data.acknowledgement != null) { + message.acknowledgement = data.acknowledgement; + } + if (data.proof_acked != null) { + message.proof_acked = data.proof_acked; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + packet?: ReturnType; + acknowledgement?: Uint8Array; + proof_acked?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.packet != null) { + data.packet = this.packet.toObject(); + } + if (this.acknowledgement != null) { + data.acknowledgement = this.acknowledgement; + } + if (this.proof_acked != null) { + data.proof_acked = this.proof_acked; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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_packet) + writer.writeMessage(1, this.packet, () => this.packet.serialize(writer)); + if (this.acknowledgement.length) + writer.writeBytes(2, this.acknowledgement); + if (this.proof_acked.length) + writer.writeBytes(3, this.proof_acked); + if (this.has_proof_height) + writer.writeMessage(4, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(5, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgAcknowledgement { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgAcknowledgement(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.packet, () => message.packet = dependency_4.ibc.core.channel.v1.Packet.deserialize(reader)); + break; + case 2: + message.acknowledgement = reader.readBytes(); + break; + case 3: + message.proof_acked = reader.readBytes(); + break; + case 4: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 5: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgAcknowledgement { + return MsgAcknowledgement.deserialize(bytes); + } + } + export class MsgAcknowledgementResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: ResponseResultType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) as ResponseResultType; + } + set result(value: ResponseResultType) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + result?: ResponseResultType; + }): MsgAcknowledgementResponse { + const message = new MsgAcknowledgementResponse({}); + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + result?: ResponseResultType; + } = {}; + if (this.result != null) { + data.result = this.result; + } + 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.result != ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) + writer.writeEnum(1, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgAcknowledgementResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgAcknowledgementResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.result = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgAcknowledgementResponse { + return MsgAcknowledgementResponse.deserialize(bytes); + } + } + export class MsgChannelUpgradeInit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + fields?: dependency_5.ibc.core.channel.v1.UpgradeFields; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("fields" in data && data.fields != undefined) { + this.fields = data.fields; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get fields() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.channel.v1.UpgradeFields, 3) as dependency_5.ibc.core.channel.v1.UpgradeFields; + } + set fields(value: dependency_5.ibc.core.channel.v1.UpgradeFields) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_fields() { + return pb_1.Message.getField(this, 3) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + fields?: ReturnType; + signer?: string; + }): MsgChannelUpgradeInit { + const message = new MsgChannelUpgradeInit({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.fields != null) { + message.fields = dependency_5.ibc.core.channel.v1.UpgradeFields.fromObject(data.fields); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + fields?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.fields != null) { + data.fields = this.fields.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.has_fields) + writer.writeMessage(3, this.fields, () => this.fields.serialize(writer)); + if (this.signer.length) + writer.writeString(4, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeInit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeInit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + reader.readMessage(message.fields, () => message.fields = dependency_5.ibc.core.channel.v1.UpgradeFields.deserialize(reader)); + break; + case 4: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeInit { + return MsgChannelUpgradeInit.deserialize(bytes); + } + } + export class MsgChannelUpgradeInitResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + upgrade?: dependency_5.ibc.core.channel.v1.Upgrade; + upgrade_sequence?: 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 ("upgrade" in data && data.upgrade != undefined) { + this.upgrade = data.upgrade; + } + if ("upgrade_sequence" in data && data.upgrade_sequence != undefined) { + this.upgrade_sequence = data.upgrade_sequence; + } + } + } + get upgrade() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.channel.v1.Upgrade, 1) as dependency_5.ibc.core.channel.v1.Upgrade; + } + set upgrade(value: dependency_5.ibc.core.channel.v1.Upgrade) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_upgrade() { + return pb_1.Message.getField(this, 1) != null; + } + get upgrade_sequence() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set upgrade_sequence(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + upgrade?: ReturnType; + upgrade_sequence?: number; + }): MsgChannelUpgradeInitResponse { + const message = new MsgChannelUpgradeInitResponse({}); + if (data.upgrade != null) { + message.upgrade = dependency_5.ibc.core.channel.v1.Upgrade.fromObject(data.upgrade); + } + if (data.upgrade_sequence != null) { + message.upgrade_sequence = data.upgrade_sequence; + } + return message; + } + toObject() { + const data: { + upgrade?: ReturnType; + upgrade_sequence?: number; + } = {}; + if (this.upgrade != null) { + data.upgrade = this.upgrade.toObject(); + } + if (this.upgrade_sequence != null) { + data.upgrade_sequence = this.upgrade_sequence; + } + 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_upgrade) + writer.writeMessage(1, this.upgrade, () => this.upgrade.serialize(writer)); + if (this.upgrade_sequence != 0) + writer.writeUint64(2, this.upgrade_sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeInitResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeInitResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.upgrade, () => message.upgrade = dependency_5.ibc.core.channel.v1.Upgrade.deserialize(reader)); + break; + case 2: + message.upgrade_sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeInitResponse { + return MsgChannelUpgradeInitResponse.deserialize(bytes); + } + } + export class MsgChannelUpgradeTry extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + proposed_upgrade_connection_hops?: string[]; + counterparty_upgrade_fields?: dependency_5.ibc.core.channel.v1.UpgradeFields; + counterparty_upgrade_sequence?: number; + proof_channel?: Uint8Array; + proof_upgrade?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("proposed_upgrade_connection_hops" in data && data.proposed_upgrade_connection_hops != undefined) { + this.proposed_upgrade_connection_hops = data.proposed_upgrade_connection_hops; + } + if ("counterparty_upgrade_fields" in data && data.counterparty_upgrade_fields != undefined) { + this.counterparty_upgrade_fields = data.counterparty_upgrade_fields; + } + if ("counterparty_upgrade_sequence" in data && data.counterparty_upgrade_sequence != undefined) { + this.counterparty_upgrade_sequence = data.counterparty_upgrade_sequence; + } + if ("proof_channel" in data && data.proof_channel != undefined) { + this.proof_channel = data.proof_channel; + } + if ("proof_upgrade" in data && data.proof_upgrade != undefined) { + this.proof_upgrade = data.proof_upgrade; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get proposed_upgrade_connection_hops() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set proposed_upgrade_connection_hops(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + get counterparty_upgrade_fields() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.channel.v1.UpgradeFields, 4) as dependency_5.ibc.core.channel.v1.UpgradeFields; + } + set counterparty_upgrade_fields(value: dependency_5.ibc.core.channel.v1.UpgradeFields) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_counterparty_upgrade_fields() { + return pb_1.Message.getField(this, 4) != null; + } + get counterparty_upgrade_sequence() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set counterparty_upgrade_sequence(value: number) { + pb_1.Message.setField(this, 5, value); + } + get proof_channel() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set proof_channel(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get proof_upgrade() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set proof_upgrade(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 8) as dependency_3.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_3.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 8) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 9, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + proposed_upgrade_connection_hops?: string[]; + counterparty_upgrade_fields?: ReturnType; + counterparty_upgrade_sequence?: number; + proof_channel?: Uint8Array; + proof_upgrade?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgChannelUpgradeTry { + const message = new MsgChannelUpgradeTry({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.proposed_upgrade_connection_hops != null) { + message.proposed_upgrade_connection_hops = data.proposed_upgrade_connection_hops; + } + if (data.counterparty_upgrade_fields != null) { + message.counterparty_upgrade_fields = dependency_5.ibc.core.channel.v1.UpgradeFields.fromObject(data.counterparty_upgrade_fields); + } + if (data.counterparty_upgrade_sequence != null) { + message.counterparty_upgrade_sequence = data.counterparty_upgrade_sequence; + } + if (data.proof_channel != null) { + message.proof_channel = data.proof_channel; + } + if (data.proof_upgrade != null) { + message.proof_upgrade = data.proof_upgrade; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + proposed_upgrade_connection_hops?: string[]; + counterparty_upgrade_fields?: ReturnType; + counterparty_upgrade_sequence?: number; + proof_channel?: Uint8Array; + proof_upgrade?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.proposed_upgrade_connection_hops != null) { + data.proposed_upgrade_connection_hops = this.proposed_upgrade_connection_hops; + } + if (this.counterparty_upgrade_fields != null) { + data.counterparty_upgrade_fields = this.counterparty_upgrade_fields.toObject(); + } + if (this.counterparty_upgrade_sequence != null) { + data.counterparty_upgrade_sequence = this.counterparty_upgrade_sequence; + } + if (this.proof_channel != null) { + data.proof_channel = this.proof_channel; + } + if (this.proof_upgrade != null) { + data.proof_upgrade = this.proof_upgrade; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.proposed_upgrade_connection_hops.length) + writer.writeRepeatedString(3, this.proposed_upgrade_connection_hops); + if (this.has_counterparty_upgrade_fields) + writer.writeMessage(4, this.counterparty_upgrade_fields, () => this.counterparty_upgrade_fields.serialize(writer)); + if (this.counterparty_upgrade_sequence != 0) + writer.writeUint64(5, this.counterparty_upgrade_sequence); + if (this.proof_channel.length) + writer.writeBytes(6, this.proof_channel); + if (this.proof_upgrade.length) + writer.writeBytes(7, this.proof_upgrade); + if (this.has_proof_height) + writer.writeMessage(8, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(9, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeTry { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeTry(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + case 4: + reader.readMessage(message.counterparty_upgrade_fields, () => message.counterparty_upgrade_fields = dependency_5.ibc.core.channel.v1.UpgradeFields.deserialize(reader)); + break; + case 5: + message.counterparty_upgrade_sequence = reader.readUint64(); + break; + case 6: + message.proof_channel = reader.readBytes(); + break; + case 7: + message.proof_upgrade = reader.readBytes(); + break; + case 8: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 9: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeTry { + return MsgChannelUpgradeTry.deserialize(bytes); + } + } + export class MsgChannelUpgradeTryResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + upgrade?: dependency_5.ibc.core.channel.v1.Upgrade; + upgrade_sequence?: number; + result?: ResponseResultType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("upgrade" in data && data.upgrade != undefined) { + this.upgrade = data.upgrade; + } + if ("upgrade_sequence" in data && data.upgrade_sequence != undefined) { + this.upgrade_sequence = data.upgrade_sequence; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get upgrade() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.channel.v1.Upgrade, 1) as dependency_5.ibc.core.channel.v1.Upgrade; + } + set upgrade(value: dependency_5.ibc.core.channel.v1.Upgrade) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_upgrade() { + return pb_1.Message.getField(this, 1) != null; + } + get upgrade_sequence() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set upgrade_sequence(value: number) { + pb_1.Message.setField(this, 2, value); + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 3, ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) as ResponseResultType; + } + set result(value: ResponseResultType) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + upgrade?: ReturnType; + upgrade_sequence?: number; + result?: ResponseResultType; + }): MsgChannelUpgradeTryResponse { + const message = new MsgChannelUpgradeTryResponse({}); + if (data.upgrade != null) { + message.upgrade = dependency_5.ibc.core.channel.v1.Upgrade.fromObject(data.upgrade); + } + if (data.upgrade_sequence != null) { + message.upgrade_sequence = data.upgrade_sequence; + } + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + upgrade?: ReturnType; + upgrade_sequence?: number; + result?: ResponseResultType; + } = {}; + if (this.upgrade != null) { + data.upgrade = this.upgrade.toObject(); + } + if (this.upgrade_sequence != null) { + data.upgrade_sequence = this.upgrade_sequence; + } + if (this.result != null) { + data.result = this.result; + } + 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_upgrade) + writer.writeMessage(1, this.upgrade, () => this.upgrade.serialize(writer)); + if (this.upgrade_sequence != 0) + writer.writeUint64(2, this.upgrade_sequence); + if (this.result != ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) + writer.writeEnum(3, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeTryResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeTryResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.upgrade, () => message.upgrade = dependency_5.ibc.core.channel.v1.Upgrade.deserialize(reader)); + break; + case 2: + message.upgrade_sequence = reader.readUint64(); + break; + case 3: + message.result = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeTryResponse { + return MsgChannelUpgradeTryResponse.deserialize(bytes); + } + } + export class MsgChannelUpgradeAck extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + counterparty_upgrade?: dependency_5.ibc.core.channel.v1.Upgrade; + proof_channel?: Uint8Array; + proof_upgrade?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("counterparty_upgrade" in data && data.counterparty_upgrade != undefined) { + this.counterparty_upgrade = data.counterparty_upgrade; + } + if ("proof_channel" in data && data.proof_channel != undefined) { + this.proof_channel = data.proof_channel; + } + if ("proof_upgrade" in data && data.proof_upgrade != undefined) { + this.proof_upgrade = data.proof_upgrade; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get counterparty_upgrade() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.channel.v1.Upgrade, 3) as dependency_5.ibc.core.channel.v1.Upgrade; + } + set counterparty_upgrade(value: dependency_5.ibc.core.channel.v1.Upgrade) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_counterparty_upgrade() { + return pb_1.Message.getField(this, 3) != null; + } + get proof_channel() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set proof_channel(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get proof_upgrade() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set proof_upgrade(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 6) as dependency_3.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_3.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 6) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + counterparty_upgrade?: ReturnType; + proof_channel?: Uint8Array; + proof_upgrade?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgChannelUpgradeAck { + const message = new MsgChannelUpgradeAck({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.counterparty_upgrade != null) { + message.counterparty_upgrade = dependency_5.ibc.core.channel.v1.Upgrade.fromObject(data.counterparty_upgrade); + } + if (data.proof_channel != null) { + message.proof_channel = data.proof_channel; + } + if (data.proof_upgrade != null) { + message.proof_upgrade = data.proof_upgrade; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + counterparty_upgrade?: ReturnType; + proof_channel?: Uint8Array; + proof_upgrade?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.counterparty_upgrade != null) { + data.counterparty_upgrade = this.counterparty_upgrade.toObject(); + } + if (this.proof_channel != null) { + data.proof_channel = this.proof_channel; + } + if (this.proof_upgrade != null) { + data.proof_upgrade = this.proof_upgrade; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.has_counterparty_upgrade) + writer.writeMessage(3, this.counterparty_upgrade, () => this.counterparty_upgrade.serialize(writer)); + if (this.proof_channel.length) + writer.writeBytes(4, this.proof_channel); + if (this.proof_upgrade.length) + writer.writeBytes(5, this.proof_upgrade); + if (this.has_proof_height) + writer.writeMessage(6, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(7, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeAck { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeAck(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + reader.readMessage(message.counterparty_upgrade, () => message.counterparty_upgrade = dependency_5.ibc.core.channel.v1.Upgrade.deserialize(reader)); + break; + case 4: + message.proof_channel = reader.readBytes(); + break; + case 5: + message.proof_upgrade = reader.readBytes(); + break; + case 6: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 7: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeAck { + return MsgChannelUpgradeAck.deserialize(bytes); + } + } + export class MsgChannelUpgradeAckResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: ResponseResultType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) as ResponseResultType; + } + set result(value: ResponseResultType) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + result?: ResponseResultType; + }): MsgChannelUpgradeAckResponse { + const message = new MsgChannelUpgradeAckResponse({}); + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + result?: ResponseResultType; + } = {}; + if (this.result != null) { + data.result = this.result; + } + 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.result != ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) + writer.writeEnum(1, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeAckResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeAckResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.result = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeAckResponse { + return MsgChannelUpgradeAckResponse.deserialize(bytes); + } + } + export class MsgChannelUpgradeConfirm extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + counterparty_channel_state?: dependency_4.ibc.core.channel.v1.State; + counterparty_upgrade?: dependency_5.ibc.core.channel.v1.Upgrade; + proof_channel?: Uint8Array; + proof_upgrade?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("counterparty_channel_state" in data && data.counterparty_channel_state != undefined) { + this.counterparty_channel_state = data.counterparty_channel_state; + } + if ("counterparty_upgrade" in data && data.counterparty_upgrade != undefined) { + this.counterparty_upgrade = data.counterparty_upgrade; + } + if ("proof_channel" in data && data.proof_channel != undefined) { + this.proof_channel = data.proof_channel; + } + if ("proof_upgrade" in data && data.proof_upgrade != undefined) { + this.proof_upgrade = data.proof_upgrade; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get counterparty_channel_state() { + return pb_1.Message.getFieldWithDefault(this, 3, dependency_4.ibc.core.channel.v1.State.STATE_UNINITIALIZED_UNSPECIFIED) as dependency_4.ibc.core.channel.v1.State; + } + set counterparty_channel_state(value: dependency_4.ibc.core.channel.v1.State) { + pb_1.Message.setField(this, 3, value); + } + get counterparty_upgrade() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.channel.v1.Upgrade, 4) as dependency_5.ibc.core.channel.v1.Upgrade; + } + set counterparty_upgrade(value: dependency_5.ibc.core.channel.v1.Upgrade) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_counterparty_upgrade() { + return pb_1.Message.getField(this, 4) != null; + } + get proof_channel() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set proof_channel(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get proof_upgrade() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set proof_upgrade(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 7) as dependency_3.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_3.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 7) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + counterparty_channel_state?: dependency_4.ibc.core.channel.v1.State; + counterparty_upgrade?: ReturnType; + proof_channel?: Uint8Array; + proof_upgrade?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgChannelUpgradeConfirm { + const message = new MsgChannelUpgradeConfirm({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.counterparty_channel_state != null) { + message.counterparty_channel_state = data.counterparty_channel_state; + } + if (data.counterparty_upgrade != null) { + message.counterparty_upgrade = dependency_5.ibc.core.channel.v1.Upgrade.fromObject(data.counterparty_upgrade); + } + if (data.proof_channel != null) { + message.proof_channel = data.proof_channel; + } + if (data.proof_upgrade != null) { + message.proof_upgrade = data.proof_upgrade; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + counterparty_channel_state?: dependency_4.ibc.core.channel.v1.State; + counterparty_upgrade?: ReturnType; + proof_channel?: Uint8Array; + proof_upgrade?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.counterparty_channel_state != null) { + data.counterparty_channel_state = this.counterparty_channel_state; + } + if (this.counterparty_upgrade != null) { + data.counterparty_upgrade = this.counterparty_upgrade.toObject(); + } + if (this.proof_channel != null) { + data.proof_channel = this.proof_channel; + } + if (this.proof_upgrade != null) { + data.proof_upgrade = this.proof_upgrade; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.counterparty_channel_state != dependency_4.ibc.core.channel.v1.State.STATE_UNINITIALIZED_UNSPECIFIED) + writer.writeEnum(3, this.counterparty_channel_state); + if (this.has_counterparty_upgrade) + writer.writeMessage(4, this.counterparty_upgrade, () => this.counterparty_upgrade.serialize(writer)); + if (this.proof_channel.length) + writer.writeBytes(5, this.proof_channel); + if (this.proof_upgrade.length) + writer.writeBytes(6, this.proof_upgrade); + if (this.has_proof_height) + writer.writeMessage(7, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(8, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeConfirm { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeConfirm(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.counterparty_channel_state = reader.readEnum(); + break; + case 4: + reader.readMessage(message.counterparty_upgrade, () => message.counterparty_upgrade = dependency_5.ibc.core.channel.v1.Upgrade.deserialize(reader)); + break; + case 5: + message.proof_channel = reader.readBytes(); + break; + case 6: + message.proof_upgrade = reader.readBytes(); + break; + case 7: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 8: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeConfirm { + return MsgChannelUpgradeConfirm.deserialize(bytes); + } + } + export class MsgChannelUpgradeConfirmResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: ResponseResultType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) as ResponseResultType; + } + set result(value: ResponseResultType) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + result?: ResponseResultType; + }): MsgChannelUpgradeConfirmResponse { + const message = new MsgChannelUpgradeConfirmResponse({}); + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + result?: ResponseResultType; + } = {}; + if (this.result != null) { + data.result = this.result; + } + 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.result != ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED) + writer.writeEnum(1, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeConfirmResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeConfirmResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.result = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeConfirmResponse { + return MsgChannelUpgradeConfirmResponse.deserialize(bytes); + } + } + export class MsgChannelUpgradeOpen extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + counterparty_channel_state?: dependency_4.ibc.core.channel.v1.State; + counterparty_upgrade_sequence?: number; + proof_channel?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("counterparty_channel_state" in data && data.counterparty_channel_state != undefined) { + this.counterparty_channel_state = data.counterparty_channel_state; + } + if ("counterparty_upgrade_sequence" in data && data.counterparty_upgrade_sequence != undefined) { + this.counterparty_upgrade_sequence = data.counterparty_upgrade_sequence; + } + if ("proof_channel" in data && data.proof_channel != undefined) { + this.proof_channel = data.proof_channel; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get counterparty_channel_state() { + return pb_1.Message.getFieldWithDefault(this, 3, dependency_4.ibc.core.channel.v1.State.STATE_UNINITIALIZED_UNSPECIFIED) as dependency_4.ibc.core.channel.v1.State; + } + set counterparty_channel_state(value: dependency_4.ibc.core.channel.v1.State) { + pb_1.Message.setField(this, 3, value); + } + get counterparty_upgrade_sequence() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set counterparty_upgrade_sequence(value: number) { + pb_1.Message.setField(this, 4, value); + } + get proof_channel() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set proof_channel(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 6) as dependency_3.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_3.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 6) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + counterparty_channel_state?: dependency_4.ibc.core.channel.v1.State; + counterparty_upgrade_sequence?: number; + proof_channel?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgChannelUpgradeOpen { + const message = new MsgChannelUpgradeOpen({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.counterparty_channel_state != null) { + message.counterparty_channel_state = data.counterparty_channel_state; + } + if (data.counterparty_upgrade_sequence != null) { + message.counterparty_upgrade_sequence = data.counterparty_upgrade_sequence; + } + if (data.proof_channel != null) { + message.proof_channel = data.proof_channel; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + counterparty_channel_state?: dependency_4.ibc.core.channel.v1.State; + counterparty_upgrade_sequence?: number; + proof_channel?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.counterparty_channel_state != null) { + data.counterparty_channel_state = this.counterparty_channel_state; + } + if (this.counterparty_upgrade_sequence != null) { + data.counterparty_upgrade_sequence = this.counterparty_upgrade_sequence; + } + if (this.proof_channel != null) { + data.proof_channel = this.proof_channel; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.counterparty_channel_state != dependency_4.ibc.core.channel.v1.State.STATE_UNINITIALIZED_UNSPECIFIED) + writer.writeEnum(3, this.counterparty_channel_state); + if (this.counterparty_upgrade_sequence != 0) + writer.writeUint64(4, this.counterparty_upgrade_sequence); + if (this.proof_channel.length) + writer.writeBytes(5, this.proof_channel); + if (this.has_proof_height) + writer.writeMessage(6, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(7, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeOpen { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeOpen(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.counterparty_channel_state = reader.readEnum(); + break; + case 4: + message.counterparty_upgrade_sequence = reader.readUint64(); + break; + case 5: + message.proof_channel = reader.readBytes(); + break; + case 6: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 7: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeOpen { + return MsgChannelUpgradeOpen.deserialize(bytes); + } + } + export class MsgChannelUpgradeOpenResponse 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: {}): MsgChannelUpgradeOpenResponse { + const message = new MsgChannelUpgradeOpenResponse({}); + 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): MsgChannelUpgradeOpenResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeOpenResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeOpenResponse { + return MsgChannelUpgradeOpenResponse.deserialize(bytes); + } + } + export class MsgChannelUpgradeTimeout extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + counterparty_channel?: dependency_4.ibc.core.channel.v1.Channel; + proof_channel?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("counterparty_channel" in data && data.counterparty_channel != undefined) { + this.counterparty_channel = data.counterparty_channel; + } + if ("proof_channel" in data && data.proof_channel != undefined) { + this.proof_channel = data.proof_channel; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get counterparty_channel() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.Channel, 3) as dependency_4.ibc.core.channel.v1.Channel; + } + set counterparty_channel(value: dependency_4.ibc.core.channel.v1.Channel) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_counterparty_channel() { + return pb_1.Message.getField(this, 3) != null; + } + get proof_channel() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set proof_channel(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 5) as dependency_3.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_3.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 5) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + counterparty_channel?: ReturnType; + proof_channel?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgChannelUpgradeTimeout { + const message = new MsgChannelUpgradeTimeout({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.counterparty_channel != null) { + message.counterparty_channel = dependency_4.ibc.core.channel.v1.Channel.fromObject(data.counterparty_channel); + } + if (data.proof_channel != null) { + message.proof_channel = data.proof_channel; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + counterparty_channel?: ReturnType; + proof_channel?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.counterparty_channel != null) { + data.counterparty_channel = this.counterparty_channel.toObject(); + } + if (this.proof_channel != null) { + data.proof_channel = this.proof_channel; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.has_counterparty_channel) + writer.writeMessage(3, this.counterparty_channel, () => this.counterparty_channel.serialize(writer)); + if (this.proof_channel.length) + writer.writeBytes(4, this.proof_channel); + if (this.has_proof_height) + writer.writeMessage(5, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(6, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeTimeout { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeTimeout(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + reader.readMessage(message.counterparty_channel, () => message.counterparty_channel = dependency_4.ibc.core.channel.v1.Channel.deserialize(reader)); + break; + case 4: + message.proof_channel = reader.readBytes(); + break; + case 5: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 6: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeTimeout { + return MsgChannelUpgradeTimeout.deserialize(bytes); + } + } + export class MsgChannelUpgradeTimeoutResponse 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: {}): MsgChannelUpgradeTimeoutResponse { + const message = new MsgChannelUpgradeTimeoutResponse({}); + 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): MsgChannelUpgradeTimeoutResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeTimeoutResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeTimeoutResponse { + return MsgChannelUpgradeTimeoutResponse.deserialize(bytes); + } + } + export class MsgChannelUpgradeCancel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + error_receipt?: dependency_5.ibc.core.channel.v1.ErrorReceipt; + proof_error_receipt?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("error_receipt" in data && data.error_receipt != undefined) { + this.error_receipt = data.error_receipt; + } + if ("proof_error_receipt" in data && data.proof_error_receipt != undefined) { + this.proof_error_receipt = data.proof_error_receipt; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get error_receipt() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.channel.v1.ErrorReceipt, 3) as dependency_5.ibc.core.channel.v1.ErrorReceipt; + } + set error_receipt(value: dependency_5.ibc.core.channel.v1.ErrorReceipt) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_error_receipt() { + return pb_1.Message.getField(this, 3) != null; + } + get proof_error_receipt() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set proof_error_receipt(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 5) as dependency_3.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_3.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 5) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + error_receipt?: ReturnType; + proof_error_receipt?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgChannelUpgradeCancel { + const message = new MsgChannelUpgradeCancel({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.error_receipt != null) { + message.error_receipt = dependency_5.ibc.core.channel.v1.ErrorReceipt.fromObject(data.error_receipt); + } + if (data.proof_error_receipt != null) { + message.proof_error_receipt = data.proof_error_receipt; + } + if (data.proof_height != null) { + message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + error_receipt?: ReturnType; + proof_error_receipt?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.error_receipt != null) { + data.error_receipt = this.error_receipt.toObject(); + } + if (this.proof_error_receipt != null) { + data.proof_error_receipt = this.proof_error_receipt; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.has_error_receipt) + writer.writeMessage(3, this.error_receipt, () => this.error_receipt.serialize(writer)); + if (this.proof_error_receipt.length) + writer.writeBytes(4, this.proof_error_receipt); + if (this.has_proof_height) + writer.writeMessage(5, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(6, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgChannelUpgradeCancel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeCancel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + reader.readMessage(message.error_receipt, () => message.error_receipt = dependency_5.ibc.core.channel.v1.ErrorReceipt.deserialize(reader)); + break; + case 4: + message.proof_error_receipt = reader.readBytes(); + break; + case 5: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 6: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeCancel { + return MsgChannelUpgradeCancel.deserialize(bytes); + } + } + export class MsgChannelUpgradeCancelResponse 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: {}): MsgChannelUpgradeCancelResponse { + const message = new MsgChannelUpgradeCancelResponse({}); + 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): MsgChannelUpgradeCancelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgChannelUpgradeCancelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeCancelResponse { + return MsgChannelUpgradeCancelResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + authority?: string; + params?: dependency_4.ibc.core.channel.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 ("authority" in data && data.authority != undefined) { + this.authority = data.authority; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get authority() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set authority(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.Params, 2) as dependency_4.ibc.core.channel.v1.Params; + } + set params(value: dependency_4.ibc.core.channel.v1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + authority?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.authority != null) { + message.authority = data.authority; + } + if (data.params != null) { + message.params = dependency_4.ibc.core.channel.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + authority?: string; + params?: ReturnType; + } = {}; + if (this.authority != null) { + data.authority = this.authority; + } + 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.authority.length) + writer.writeString(1, this.authority); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.authority = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_4.ibc.core.channel.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + export class MsgPruneAcknowledgements extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + port_id?: string; + channel_id?: string; + limit?: number; + signer?: 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 ("port_id" in data && data.port_id != undefined) { + this.port_id = data.port_id; + } + if ("channel_id" in data && data.channel_id != undefined) { + this.channel_id = data.channel_id; + } + if ("limit" in data && data.limit != undefined) { + this.limit = data.limit; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get port_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set port_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get channel_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set channel_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get limit() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set limit(value: number) { + pb_1.Message.setField(this, 3, value); + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + port_id?: string; + channel_id?: string; + limit?: number; + signer?: string; + }): MsgPruneAcknowledgements { + const message = new MsgPruneAcknowledgements({}); + if (data.port_id != null) { + message.port_id = data.port_id; + } + if (data.channel_id != null) { + message.channel_id = data.channel_id; + } + if (data.limit != null) { + message.limit = data.limit; + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + port_id?: string; + channel_id?: string; + limit?: number; + signer?: string; + } = {}; + if (this.port_id != null) { + data.port_id = this.port_id; + } + if (this.channel_id != null) { + data.channel_id = this.channel_id; + } + if (this.limit != null) { + data.limit = this.limit; + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.port_id.length) + writer.writeString(1, this.port_id); + if (this.channel_id.length) + writer.writeString(2, this.channel_id); + if (this.limit != 0) + writer.writeUint64(3, this.limit); + if (this.signer.length) + writer.writeString(4, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgPruneAcknowledgements { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgPruneAcknowledgements(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.port_id = reader.readString(); + break; + case 2: + message.channel_id = reader.readString(); + break; + case 3: + message.limit = reader.readUint64(); + break; + case 4: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgPruneAcknowledgements { + return MsgPruneAcknowledgements.deserialize(bytes); + } + } + export class MsgPruneAcknowledgementsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + total_pruned_sequences?: number; + total_remaining_sequences?: 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 ("total_pruned_sequences" in data && data.total_pruned_sequences != undefined) { + this.total_pruned_sequences = data.total_pruned_sequences; + } + if ("total_remaining_sequences" in data && data.total_remaining_sequences != undefined) { + this.total_remaining_sequences = data.total_remaining_sequences; + } + } + } + get total_pruned_sequences() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set total_pruned_sequences(value: number) { + pb_1.Message.setField(this, 1, value); + } + get total_remaining_sequences() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set total_remaining_sequences(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + total_pruned_sequences?: number; + total_remaining_sequences?: number; + }): MsgPruneAcknowledgementsResponse { + const message = new MsgPruneAcknowledgementsResponse({}); + if (data.total_pruned_sequences != null) { + message.total_pruned_sequences = data.total_pruned_sequences; + } + if (data.total_remaining_sequences != null) { + message.total_remaining_sequences = data.total_remaining_sequences; + } + return message; + } + toObject() { + const data: { + total_pruned_sequences?: number; + total_remaining_sequences?: number; + } = {}; + if (this.total_pruned_sequences != null) { + data.total_pruned_sequences = this.total_pruned_sequences; + } + if (this.total_remaining_sequences != null) { + data.total_remaining_sequences = this.total_remaining_sequences; + } + 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.total_pruned_sequences != 0) + writer.writeUint64(1, this.total_pruned_sequences); + if (this.total_remaining_sequences != 0) + writer.writeUint64(2, this.total_remaining_sequences); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgPruneAcknowledgementsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgPruneAcknowledgementsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.total_pruned_sequences = reader.readUint64(); + break; + case 2: + message.total_remaining_sequences = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgPruneAcknowledgementsResponse { + return MsgPruneAcknowledgementsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + ChannelOpenInit: { + path: "/ibc.core.channel.v1.Msg/ChannelOpenInit", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelOpenInit) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelOpenInit.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelOpenInitResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelOpenInitResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelOpenTry: { + path: "/ibc.core.channel.v1.Msg/ChannelOpenTry", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelOpenTry) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelOpenTry.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelOpenTryResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelOpenTryResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelOpenAck: { + path: "/ibc.core.channel.v1.Msg/ChannelOpenAck", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelOpenAck) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelOpenAck.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelOpenAckResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelOpenAckResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelOpenConfirm: { + path: "/ibc.core.channel.v1.Msg/ChannelOpenConfirm", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelOpenConfirm) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelOpenConfirm.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelOpenConfirmResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelOpenConfirmResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelCloseInit: { + path: "/ibc.core.channel.v1.Msg/ChannelCloseInit", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelCloseInit) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelCloseInit.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelCloseInitResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelCloseInitResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelCloseConfirm: { + path: "/ibc.core.channel.v1.Msg/ChannelCloseConfirm", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelCloseConfirm) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelCloseConfirm.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelCloseConfirmResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelCloseConfirmResponse.deserialize(new Uint8Array(bytes)) + }, + RecvPacket: { + path: "/ibc.core.channel.v1.Msg/RecvPacket", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRecvPacket) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRecvPacket.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRecvPacketResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRecvPacketResponse.deserialize(new Uint8Array(bytes)) + }, + Timeout: { + path: "/ibc.core.channel.v1.Msg/Timeout", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgTimeout) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgTimeout.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgTimeoutResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgTimeoutResponse.deserialize(new Uint8Array(bytes)) + }, + TimeoutOnClose: { + path: "/ibc.core.channel.v1.Msg/TimeoutOnClose", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgTimeoutOnClose) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgTimeoutOnClose.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgTimeoutOnCloseResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgTimeoutOnCloseResponse.deserialize(new Uint8Array(bytes)) + }, + Acknowledgement: { + path: "/ibc.core.channel.v1.Msg/Acknowledgement", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgAcknowledgement) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgAcknowledgement.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgAcknowledgementResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgAcknowledgementResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelUpgradeInit: { + path: "/ibc.core.channel.v1.Msg/ChannelUpgradeInit", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelUpgradeInit) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelUpgradeInit.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelUpgradeInitResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelUpgradeInitResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelUpgradeTry: { + path: "/ibc.core.channel.v1.Msg/ChannelUpgradeTry", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelUpgradeTry) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelUpgradeTry.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelUpgradeTryResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelUpgradeTryResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelUpgradeAck: { + path: "/ibc.core.channel.v1.Msg/ChannelUpgradeAck", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelUpgradeAck) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelUpgradeAck.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelUpgradeAckResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelUpgradeAckResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelUpgradeConfirm: { + path: "/ibc.core.channel.v1.Msg/ChannelUpgradeConfirm", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelUpgradeConfirm) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelUpgradeConfirm.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelUpgradeConfirmResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelUpgradeConfirmResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelUpgradeOpen: { + path: "/ibc.core.channel.v1.Msg/ChannelUpgradeOpen", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelUpgradeOpen) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelUpgradeOpen.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelUpgradeOpenResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelUpgradeOpenResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelUpgradeTimeout: { + path: "/ibc.core.channel.v1.Msg/ChannelUpgradeTimeout", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelUpgradeTimeout) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelUpgradeTimeout.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelUpgradeTimeoutResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelUpgradeTimeoutResponse.deserialize(new Uint8Array(bytes)) + }, + ChannelUpgradeCancel: { + path: "/ibc.core.channel.v1.Msg/ChannelUpgradeCancel", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgChannelUpgradeCancel) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgChannelUpgradeCancel.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgChannelUpgradeCancelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgChannelUpgradeCancelResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateChannelParams: { + path: "/ibc.core.channel.v1.Msg/UpdateChannelParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + }, + PruneAcknowledgements: { + path: "/ibc.core.channel.v1.Msg/PruneAcknowledgements", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgPruneAcknowledgements) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgPruneAcknowledgements.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgPruneAcknowledgementsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgPruneAcknowledgementsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract ChannelOpenInit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelOpenTry(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelOpenAck(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelOpenConfirm(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelCloseInit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelCloseConfirm(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RecvPacket(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Timeout(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract TimeoutOnClose(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Acknowledgement(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelUpgradeInit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelUpgradeTry(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelUpgradeAck(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelUpgradeConfirm(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelUpgradeOpen(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelUpgradeTimeout(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ChannelUpgradeCancel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateChannelParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PruneAcknowledgements(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + ChannelOpenInit: GrpcUnaryServiceInterface = (message: MsgChannelOpenInit, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelOpenInit(message, metadata, options, callback); + }; + ChannelOpenTry: GrpcUnaryServiceInterface = (message: MsgChannelOpenTry, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelOpenTry(message, metadata, options, callback); + }; + ChannelOpenAck: GrpcUnaryServiceInterface = (message: MsgChannelOpenAck, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelOpenAck(message, metadata, options, callback); + }; + ChannelOpenConfirm: GrpcUnaryServiceInterface = (message: MsgChannelOpenConfirm, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelOpenConfirm(message, metadata, options, callback); + }; + ChannelCloseInit: GrpcUnaryServiceInterface = (message: MsgChannelCloseInit, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelCloseInit(message, metadata, options, callback); + }; + ChannelCloseConfirm: GrpcUnaryServiceInterface = (message: MsgChannelCloseConfirm, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelCloseConfirm(message, metadata, options, callback); + }; + RecvPacket: GrpcUnaryServiceInterface = (message: MsgRecvPacket, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RecvPacket(message, metadata, options, callback); + }; + Timeout: GrpcUnaryServiceInterface = (message: MsgTimeout, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Timeout(message, metadata, options, callback); + }; + TimeoutOnClose: GrpcUnaryServiceInterface = (message: MsgTimeoutOnClose, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.TimeoutOnClose(message, metadata, options, callback); + }; + Acknowledgement: GrpcUnaryServiceInterface = (message: MsgAcknowledgement, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Acknowledgement(message, metadata, options, callback); + }; + ChannelUpgradeInit: GrpcUnaryServiceInterface = (message: MsgChannelUpgradeInit, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelUpgradeInit(message, metadata, options, callback); + }; + ChannelUpgradeTry: GrpcUnaryServiceInterface = (message: MsgChannelUpgradeTry, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelUpgradeTry(message, metadata, options, callback); + }; + ChannelUpgradeAck: GrpcUnaryServiceInterface = (message: MsgChannelUpgradeAck, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelUpgradeAck(message, metadata, options, callback); + }; + ChannelUpgradeConfirm: GrpcUnaryServiceInterface = (message: MsgChannelUpgradeConfirm, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelUpgradeConfirm(message, metadata, options, callback); + }; + ChannelUpgradeOpen: GrpcUnaryServiceInterface = (message: MsgChannelUpgradeOpen, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelUpgradeOpen(message, metadata, options, callback); + }; + ChannelUpgradeTimeout: GrpcUnaryServiceInterface = (message: MsgChannelUpgradeTimeout, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelUpgradeTimeout(message, metadata, options, callback); + }; + ChannelUpgradeCancel: GrpcUnaryServiceInterface = (message: MsgChannelUpgradeCancel, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ChannelUpgradeCancel(message, metadata, options, callback); + }; + UpdateChannelParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateChannelParams(message, metadata, options, callback); + }; + PruneAcknowledgements: GrpcUnaryServiceInterface = (message: MsgPruneAcknowledgements, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PruneAcknowledgements(message, metadata, options, callback); + }; + } +} diff --git a/codegen/ibc/core/channel/v1/tx_pb.d.ts b/codegen/ibc/core/channel/v1/tx_pb.d.ts new file mode 100644 index 0000000..205cd8f --- /dev/null +++ b/codegen/ibc/core/channel/v1/tx_pb.d.ts @@ -0,0 +1,1213 @@ +// package: ibc.core.channel.v1 +// file: ibc/core/channel/v1/tx.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../../cosmos/msg/v1/msg_pb"; +import * as ibc_core_client_v1_client_pb from "../../../../ibc/core/client/v1/client_pb"; +import * as ibc_core_channel_v1_channel_pb from "../../../../ibc/core/channel/v1/channel_pb"; +import * as ibc_core_channel_v1_upgrade_pb from "../../../../ibc/core/channel/v1/upgrade_pb"; + +export class MsgChannelOpenInit extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + hasChannel(): boolean; + clearChannel(): void; + getChannel(): ibc_core_channel_v1_channel_pb.Channel | undefined; + setChannel(value?: ibc_core_channel_v1_channel_pb.Channel): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelOpenInit.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelOpenInit): MsgChannelOpenInit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelOpenInit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenInit; + static deserializeBinaryFromReader(message: MsgChannelOpenInit, reader: jspb.BinaryReader): MsgChannelOpenInit; +} + +export namespace MsgChannelOpenInit { + export type AsObject = { + portId: string, + channel?: ibc_core_channel_v1_channel_pb.Channel.AsObject, + signer: string, + } +} + +export class MsgChannelOpenInitResponse extends jspb.Message { + getChannelId(): string; + setChannelId(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelOpenInitResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelOpenInitResponse): MsgChannelOpenInitResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelOpenInitResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenInitResponse; + static deserializeBinaryFromReader(message: MsgChannelOpenInitResponse, reader: jspb.BinaryReader): MsgChannelOpenInitResponse; +} + +export namespace MsgChannelOpenInitResponse { + export type AsObject = { + channelId: string, + version: string, + } +} + +export class MsgChannelOpenTry extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getPreviousChannelId(): string; + setPreviousChannelId(value: string): void; + + hasChannel(): boolean; + clearChannel(): void; + getChannel(): ibc_core_channel_v1_channel_pb.Channel | undefined; + setChannel(value?: ibc_core_channel_v1_channel_pb.Channel): void; + + getCounterpartyVersion(): string; + setCounterpartyVersion(value: string): void; + + getProofInit(): Uint8Array | string; + getProofInit_asU8(): Uint8Array; + getProofInit_asB64(): string; + setProofInit(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelOpenTry.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelOpenTry): MsgChannelOpenTry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelOpenTry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenTry; + static deserializeBinaryFromReader(message: MsgChannelOpenTry, reader: jspb.BinaryReader): MsgChannelOpenTry; +} + +export namespace MsgChannelOpenTry { + export type AsObject = { + portId: string, + previousChannelId: string, + channel?: ibc_core_channel_v1_channel_pb.Channel.AsObject, + counterpartyVersion: string, + proofInit: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgChannelOpenTryResponse extends jspb.Message { + getVersion(): string; + setVersion(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelOpenTryResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelOpenTryResponse): MsgChannelOpenTryResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelOpenTryResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenTryResponse; + static deserializeBinaryFromReader(message: MsgChannelOpenTryResponse, reader: jspb.BinaryReader): MsgChannelOpenTryResponse; +} + +export namespace MsgChannelOpenTryResponse { + export type AsObject = { + version: string, + channelId: string, + } +} + +export class MsgChannelOpenAck extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getCounterpartyChannelId(): string; + setCounterpartyChannelId(value: string): void; + + getCounterpartyVersion(): string; + setCounterpartyVersion(value: string): void; + + getProofTry(): Uint8Array | string; + getProofTry_asU8(): Uint8Array; + getProofTry_asB64(): string; + setProofTry(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelOpenAck.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelOpenAck): MsgChannelOpenAck.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelOpenAck, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenAck; + static deserializeBinaryFromReader(message: MsgChannelOpenAck, reader: jspb.BinaryReader): MsgChannelOpenAck; +} + +export namespace MsgChannelOpenAck { + export type AsObject = { + portId: string, + channelId: string, + counterpartyChannelId: string, + counterpartyVersion: string, + proofTry: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgChannelOpenAckResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelOpenAckResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelOpenAckResponse): MsgChannelOpenAckResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelOpenAckResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenAckResponse; + static deserializeBinaryFromReader(message: MsgChannelOpenAckResponse, reader: jspb.BinaryReader): MsgChannelOpenAckResponse; +} + +export namespace MsgChannelOpenAckResponse { + export type AsObject = { + } +} + +export class MsgChannelOpenConfirm extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getProofAck(): Uint8Array | string; + getProofAck_asU8(): Uint8Array; + getProofAck_asB64(): string; + setProofAck(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelOpenConfirm.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelOpenConfirm): MsgChannelOpenConfirm.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelOpenConfirm, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenConfirm; + static deserializeBinaryFromReader(message: MsgChannelOpenConfirm, reader: jspb.BinaryReader): MsgChannelOpenConfirm; +} + +export namespace MsgChannelOpenConfirm { + export type AsObject = { + portId: string, + channelId: string, + proofAck: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgChannelOpenConfirmResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelOpenConfirmResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelOpenConfirmResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelOpenConfirmResponse; + static deserializeBinaryFromReader(message: MsgChannelOpenConfirmResponse, reader: jspb.BinaryReader): MsgChannelOpenConfirmResponse; +} + +export namespace MsgChannelOpenConfirmResponse { + export type AsObject = { + } +} + +export class MsgChannelCloseInit extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelCloseInit.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelCloseInit): MsgChannelCloseInit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelCloseInit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelCloseInit; + static deserializeBinaryFromReader(message: MsgChannelCloseInit, reader: jspb.BinaryReader): MsgChannelCloseInit; +} + +export namespace MsgChannelCloseInit { + export type AsObject = { + portId: string, + channelId: string, + signer: string, + } +} + +export class MsgChannelCloseInitResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelCloseInitResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelCloseInitResponse): MsgChannelCloseInitResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelCloseInitResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelCloseInitResponse; + static deserializeBinaryFromReader(message: MsgChannelCloseInitResponse, reader: jspb.BinaryReader): MsgChannelCloseInitResponse; +} + +export namespace MsgChannelCloseInitResponse { + export type AsObject = { + } +} + +export class MsgChannelCloseConfirm extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getProofInit(): Uint8Array | string; + getProofInit_asU8(): Uint8Array; + getProofInit_asB64(): string; + setProofInit(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + getCounterpartyUpgradeSequence(): number; + setCounterpartyUpgradeSequence(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelCloseConfirm.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelCloseConfirm): MsgChannelCloseConfirm.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelCloseConfirm, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelCloseConfirm; + static deserializeBinaryFromReader(message: MsgChannelCloseConfirm, reader: jspb.BinaryReader): MsgChannelCloseConfirm; +} + +export namespace MsgChannelCloseConfirm { + export type AsObject = { + portId: string, + channelId: string, + proofInit: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + counterpartyUpgradeSequence: number, + } +} + +export class MsgChannelCloseConfirmResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelCloseConfirmResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelCloseConfirmResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelCloseConfirmResponse; + static deserializeBinaryFromReader(message: MsgChannelCloseConfirmResponse, reader: jspb.BinaryReader): MsgChannelCloseConfirmResponse; +} + +export namespace MsgChannelCloseConfirmResponse { + export type AsObject = { + } +} + +export class MsgRecvPacket extends jspb.Message { + hasPacket(): boolean; + clearPacket(): void; + getPacket(): ibc_core_channel_v1_channel_pb.Packet | undefined; + setPacket(value?: ibc_core_channel_v1_channel_pb.Packet): void; + + getProofCommitment(): Uint8Array | string; + getProofCommitment_asU8(): Uint8Array; + getProofCommitment_asB64(): string; + setProofCommitment(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRecvPacket.AsObject; + static toObject(includeInstance: boolean, msg: MsgRecvPacket): MsgRecvPacket.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRecvPacket, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRecvPacket; + static deserializeBinaryFromReader(message: MsgRecvPacket, reader: jspb.BinaryReader): MsgRecvPacket; +} + +export namespace MsgRecvPacket { + export type AsObject = { + packet?: ibc_core_channel_v1_channel_pb.Packet.AsObject, + proofCommitment: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgRecvPacketResponse extends jspb.Message { + getResult(): ResponseResultTypeMap[keyof ResponseResultTypeMap]; + setResult(value: ResponseResultTypeMap[keyof ResponseResultTypeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRecvPacketResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgRecvPacketResponse): MsgRecvPacketResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRecvPacketResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRecvPacketResponse; + static deserializeBinaryFromReader(message: MsgRecvPacketResponse, reader: jspb.BinaryReader): MsgRecvPacketResponse; +} + +export namespace MsgRecvPacketResponse { + export type AsObject = { + result: ResponseResultTypeMap[keyof ResponseResultTypeMap], + } +} + +export class MsgTimeout extends jspb.Message { + hasPacket(): boolean; + clearPacket(): void; + getPacket(): ibc_core_channel_v1_channel_pb.Packet | undefined; + setPacket(value?: ibc_core_channel_v1_channel_pb.Packet): void; + + getProofUnreceived(): Uint8Array | string; + getProofUnreceived_asU8(): Uint8Array; + getProofUnreceived_asB64(): string; + setProofUnreceived(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getNextSequenceRecv(): number; + setNextSequenceRecv(value: number): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTimeout.AsObject; + static toObject(includeInstance: boolean, msg: MsgTimeout): MsgTimeout.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTimeout, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTimeout; + static deserializeBinaryFromReader(message: MsgTimeout, reader: jspb.BinaryReader): MsgTimeout; +} + +export namespace MsgTimeout { + export type AsObject = { + packet?: ibc_core_channel_v1_channel_pb.Packet.AsObject, + proofUnreceived: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + nextSequenceRecv: number, + signer: string, + } +} + +export class MsgTimeoutResponse extends jspb.Message { + getResult(): ResponseResultTypeMap[keyof ResponseResultTypeMap]; + setResult(value: ResponseResultTypeMap[keyof ResponseResultTypeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTimeoutResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgTimeoutResponse): MsgTimeoutResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTimeoutResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTimeoutResponse; + static deserializeBinaryFromReader(message: MsgTimeoutResponse, reader: jspb.BinaryReader): MsgTimeoutResponse; +} + +export namespace MsgTimeoutResponse { + export type AsObject = { + result: ResponseResultTypeMap[keyof ResponseResultTypeMap], + } +} + +export class MsgTimeoutOnClose extends jspb.Message { + hasPacket(): boolean; + clearPacket(): void; + getPacket(): ibc_core_channel_v1_channel_pb.Packet | undefined; + setPacket(value?: ibc_core_channel_v1_channel_pb.Packet): void; + + getProofUnreceived(): Uint8Array | string; + getProofUnreceived_asU8(): Uint8Array; + getProofUnreceived_asB64(): string; + setProofUnreceived(value: Uint8Array | string): void; + + getProofClose(): Uint8Array | string; + getProofClose_asU8(): Uint8Array; + getProofClose_asB64(): string; + setProofClose(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getNextSequenceRecv(): number; + setNextSequenceRecv(value: number): void; + + getSigner(): string; + setSigner(value: string): void; + + getCounterpartyUpgradeSequence(): number; + setCounterpartyUpgradeSequence(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTimeoutOnClose.AsObject; + static toObject(includeInstance: boolean, msg: MsgTimeoutOnClose): MsgTimeoutOnClose.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTimeoutOnClose, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTimeoutOnClose; + static deserializeBinaryFromReader(message: MsgTimeoutOnClose, reader: jspb.BinaryReader): MsgTimeoutOnClose; +} + +export namespace MsgTimeoutOnClose { + export type AsObject = { + packet?: ibc_core_channel_v1_channel_pb.Packet.AsObject, + proofUnreceived: Uint8Array | string, + proofClose: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + nextSequenceRecv: number, + signer: string, + counterpartyUpgradeSequence: number, + } +} + +export class MsgTimeoutOnCloseResponse extends jspb.Message { + getResult(): ResponseResultTypeMap[keyof ResponseResultTypeMap]; + setResult(value: ResponseResultTypeMap[keyof ResponseResultTypeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgTimeoutOnCloseResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgTimeoutOnCloseResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgTimeoutOnCloseResponse; + static deserializeBinaryFromReader(message: MsgTimeoutOnCloseResponse, reader: jspb.BinaryReader): MsgTimeoutOnCloseResponse; +} + +export namespace MsgTimeoutOnCloseResponse { + export type AsObject = { + result: ResponseResultTypeMap[keyof ResponseResultTypeMap], + } +} + +export class MsgAcknowledgement extends jspb.Message { + hasPacket(): boolean; + clearPacket(): void; + getPacket(): ibc_core_channel_v1_channel_pb.Packet | undefined; + setPacket(value?: ibc_core_channel_v1_channel_pb.Packet): void; + + getAcknowledgement(): Uint8Array | string; + getAcknowledgement_asU8(): Uint8Array; + getAcknowledgement_asB64(): string; + setAcknowledgement(value: Uint8Array | string): void; + + getProofAcked(): Uint8Array | string; + getProofAcked_asU8(): Uint8Array; + getProofAcked_asB64(): string; + setProofAcked(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgAcknowledgement.AsObject; + static toObject(includeInstance: boolean, msg: MsgAcknowledgement): MsgAcknowledgement.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgAcknowledgement, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgAcknowledgement; + static deserializeBinaryFromReader(message: MsgAcknowledgement, reader: jspb.BinaryReader): MsgAcknowledgement; +} + +export namespace MsgAcknowledgement { + export type AsObject = { + packet?: ibc_core_channel_v1_channel_pb.Packet.AsObject, + acknowledgement: Uint8Array | string, + proofAcked: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgAcknowledgementResponse extends jspb.Message { + getResult(): ResponseResultTypeMap[keyof ResponseResultTypeMap]; + setResult(value: ResponseResultTypeMap[keyof ResponseResultTypeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgAcknowledgementResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgAcknowledgementResponse): MsgAcknowledgementResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgAcknowledgementResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgAcknowledgementResponse; + static deserializeBinaryFromReader(message: MsgAcknowledgementResponse, reader: jspb.BinaryReader): MsgAcknowledgementResponse; +} + +export namespace MsgAcknowledgementResponse { + export type AsObject = { + result: ResponseResultTypeMap[keyof ResponseResultTypeMap], + } +} + +export class MsgChannelUpgradeInit extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + hasFields(): boolean; + clearFields(): void; + getFields(): ibc_core_channel_v1_upgrade_pb.UpgradeFields | undefined; + setFields(value?: ibc_core_channel_v1_upgrade_pb.UpgradeFields): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeInit.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeInit): MsgChannelUpgradeInit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeInit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeInit; + static deserializeBinaryFromReader(message: MsgChannelUpgradeInit, reader: jspb.BinaryReader): MsgChannelUpgradeInit; +} + +export namespace MsgChannelUpgradeInit { + export type AsObject = { + portId: string, + channelId: string, + fields?: ibc_core_channel_v1_upgrade_pb.UpgradeFields.AsObject, + signer: string, + } +} + +export class MsgChannelUpgradeInitResponse extends jspb.Message { + hasUpgrade(): boolean; + clearUpgrade(): void; + getUpgrade(): ibc_core_channel_v1_upgrade_pb.Upgrade | undefined; + setUpgrade(value?: ibc_core_channel_v1_upgrade_pb.Upgrade): void; + + getUpgradeSequence(): number; + setUpgradeSequence(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeInitResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeInitResponse): MsgChannelUpgradeInitResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeInitResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeInitResponse; + static deserializeBinaryFromReader(message: MsgChannelUpgradeInitResponse, reader: jspb.BinaryReader): MsgChannelUpgradeInitResponse; +} + +export namespace MsgChannelUpgradeInitResponse { + export type AsObject = { + upgrade?: ibc_core_channel_v1_upgrade_pb.Upgrade.AsObject, + upgradeSequence: number, + } +} + +export class MsgChannelUpgradeTry extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + clearProposedUpgradeConnectionHopsList(): void; + getProposedUpgradeConnectionHopsList(): Array; + setProposedUpgradeConnectionHopsList(value: Array): void; + addProposedUpgradeConnectionHops(value: string, index?: number): string; + + hasCounterpartyUpgradeFields(): boolean; + clearCounterpartyUpgradeFields(): void; + getCounterpartyUpgradeFields(): ibc_core_channel_v1_upgrade_pb.UpgradeFields | undefined; + setCounterpartyUpgradeFields(value?: ibc_core_channel_v1_upgrade_pb.UpgradeFields): void; + + getCounterpartyUpgradeSequence(): number; + setCounterpartyUpgradeSequence(value: number): void; + + getProofChannel(): Uint8Array | string; + getProofChannel_asU8(): Uint8Array; + getProofChannel_asB64(): string; + setProofChannel(value: Uint8Array | string): void; + + getProofUpgrade(): Uint8Array | string; + getProofUpgrade_asU8(): Uint8Array; + getProofUpgrade_asB64(): string; + setProofUpgrade(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeTry.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeTry): MsgChannelUpgradeTry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeTry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeTry; + static deserializeBinaryFromReader(message: MsgChannelUpgradeTry, reader: jspb.BinaryReader): MsgChannelUpgradeTry; +} + +export namespace MsgChannelUpgradeTry { + export type AsObject = { + portId: string, + channelId: string, + proposedUpgradeConnectionHopsList: Array, + counterpartyUpgradeFields?: ibc_core_channel_v1_upgrade_pb.UpgradeFields.AsObject, + counterpartyUpgradeSequence: number, + proofChannel: Uint8Array | string, + proofUpgrade: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgChannelUpgradeTryResponse extends jspb.Message { + hasUpgrade(): boolean; + clearUpgrade(): void; + getUpgrade(): ibc_core_channel_v1_upgrade_pb.Upgrade | undefined; + setUpgrade(value?: ibc_core_channel_v1_upgrade_pb.Upgrade): void; + + getUpgradeSequence(): number; + setUpgradeSequence(value: number): void; + + getResult(): ResponseResultTypeMap[keyof ResponseResultTypeMap]; + setResult(value: ResponseResultTypeMap[keyof ResponseResultTypeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeTryResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeTryResponse): MsgChannelUpgradeTryResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeTryResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeTryResponse; + static deserializeBinaryFromReader(message: MsgChannelUpgradeTryResponse, reader: jspb.BinaryReader): MsgChannelUpgradeTryResponse; +} + +export namespace MsgChannelUpgradeTryResponse { + export type AsObject = { + upgrade?: ibc_core_channel_v1_upgrade_pb.Upgrade.AsObject, + upgradeSequence: number, + result: ResponseResultTypeMap[keyof ResponseResultTypeMap], + } +} + +export class MsgChannelUpgradeAck extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + hasCounterpartyUpgrade(): boolean; + clearCounterpartyUpgrade(): void; + getCounterpartyUpgrade(): ibc_core_channel_v1_upgrade_pb.Upgrade | undefined; + setCounterpartyUpgrade(value?: ibc_core_channel_v1_upgrade_pb.Upgrade): void; + + getProofChannel(): Uint8Array | string; + getProofChannel_asU8(): Uint8Array; + getProofChannel_asB64(): string; + setProofChannel(value: Uint8Array | string): void; + + getProofUpgrade(): Uint8Array | string; + getProofUpgrade_asU8(): Uint8Array; + getProofUpgrade_asB64(): string; + setProofUpgrade(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeAck.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeAck): MsgChannelUpgradeAck.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeAck, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeAck; + static deserializeBinaryFromReader(message: MsgChannelUpgradeAck, reader: jspb.BinaryReader): MsgChannelUpgradeAck; +} + +export namespace MsgChannelUpgradeAck { + export type AsObject = { + portId: string, + channelId: string, + counterpartyUpgrade?: ibc_core_channel_v1_upgrade_pb.Upgrade.AsObject, + proofChannel: Uint8Array | string, + proofUpgrade: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgChannelUpgradeAckResponse extends jspb.Message { + getResult(): ResponseResultTypeMap[keyof ResponseResultTypeMap]; + setResult(value: ResponseResultTypeMap[keyof ResponseResultTypeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeAckResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeAckResponse): MsgChannelUpgradeAckResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeAckResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeAckResponse; + static deserializeBinaryFromReader(message: MsgChannelUpgradeAckResponse, reader: jspb.BinaryReader): MsgChannelUpgradeAckResponse; +} + +export namespace MsgChannelUpgradeAckResponse { + export type AsObject = { + result: ResponseResultTypeMap[keyof ResponseResultTypeMap], + } +} + +export class MsgChannelUpgradeConfirm extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getCounterpartyChannelState(): ibc_core_channel_v1_channel_pb.StateMap[keyof ibc_core_channel_v1_channel_pb.StateMap]; + setCounterpartyChannelState(value: ibc_core_channel_v1_channel_pb.StateMap[keyof ibc_core_channel_v1_channel_pb.StateMap]): void; + + hasCounterpartyUpgrade(): boolean; + clearCounterpartyUpgrade(): void; + getCounterpartyUpgrade(): ibc_core_channel_v1_upgrade_pb.Upgrade | undefined; + setCounterpartyUpgrade(value?: ibc_core_channel_v1_upgrade_pb.Upgrade): void; + + getProofChannel(): Uint8Array | string; + getProofChannel_asU8(): Uint8Array; + getProofChannel_asB64(): string; + setProofChannel(value: Uint8Array | string): void; + + getProofUpgrade(): Uint8Array | string; + getProofUpgrade_asU8(): Uint8Array; + getProofUpgrade_asB64(): string; + setProofUpgrade(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeConfirm.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeConfirm): MsgChannelUpgradeConfirm.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeConfirm, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeConfirm; + static deserializeBinaryFromReader(message: MsgChannelUpgradeConfirm, reader: jspb.BinaryReader): MsgChannelUpgradeConfirm; +} + +export namespace MsgChannelUpgradeConfirm { + export type AsObject = { + portId: string, + channelId: string, + counterpartyChannelState: ibc_core_channel_v1_channel_pb.StateMap[keyof ibc_core_channel_v1_channel_pb.StateMap], + counterpartyUpgrade?: ibc_core_channel_v1_upgrade_pb.Upgrade.AsObject, + proofChannel: Uint8Array | string, + proofUpgrade: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgChannelUpgradeConfirmResponse extends jspb.Message { + getResult(): ResponseResultTypeMap[keyof ResponseResultTypeMap]; + setResult(value: ResponseResultTypeMap[keyof ResponseResultTypeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeConfirmResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeConfirmResponse): MsgChannelUpgradeConfirmResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeConfirmResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeConfirmResponse; + static deserializeBinaryFromReader(message: MsgChannelUpgradeConfirmResponse, reader: jspb.BinaryReader): MsgChannelUpgradeConfirmResponse; +} + +export namespace MsgChannelUpgradeConfirmResponse { + export type AsObject = { + result: ResponseResultTypeMap[keyof ResponseResultTypeMap], + } +} + +export class MsgChannelUpgradeOpen extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getCounterpartyChannelState(): ibc_core_channel_v1_channel_pb.StateMap[keyof ibc_core_channel_v1_channel_pb.StateMap]; + setCounterpartyChannelState(value: ibc_core_channel_v1_channel_pb.StateMap[keyof ibc_core_channel_v1_channel_pb.StateMap]): void; + + getCounterpartyUpgradeSequence(): number; + setCounterpartyUpgradeSequence(value: number): void; + + getProofChannel(): Uint8Array | string; + getProofChannel_asU8(): Uint8Array; + getProofChannel_asB64(): string; + setProofChannel(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeOpen.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeOpen): MsgChannelUpgradeOpen.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeOpen, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeOpen; + static deserializeBinaryFromReader(message: MsgChannelUpgradeOpen, reader: jspb.BinaryReader): MsgChannelUpgradeOpen; +} + +export namespace MsgChannelUpgradeOpen { + export type AsObject = { + portId: string, + channelId: string, + counterpartyChannelState: ibc_core_channel_v1_channel_pb.StateMap[keyof ibc_core_channel_v1_channel_pb.StateMap], + counterpartyUpgradeSequence: number, + proofChannel: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgChannelUpgradeOpenResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeOpenResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeOpenResponse): MsgChannelUpgradeOpenResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeOpenResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeOpenResponse; + static deserializeBinaryFromReader(message: MsgChannelUpgradeOpenResponse, reader: jspb.BinaryReader): MsgChannelUpgradeOpenResponse; +} + +export namespace MsgChannelUpgradeOpenResponse { + export type AsObject = { + } +} + +export class MsgChannelUpgradeTimeout extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + hasCounterpartyChannel(): boolean; + clearCounterpartyChannel(): void; + getCounterpartyChannel(): ibc_core_channel_v1_channel_pb.Channel | undefined; + setCounterpartyChannel(value?: ibc_core_channel_v1_channel_pb.Channel): void; + + getProofChannel(): Uint8Array | string; + getProofChannel_asU8(): Uint8Array; + getProofChannel_asB64(): string; + setProofChannel(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeTimeout.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeTimeout): MsgChannelUpgradeTimeout.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeTimeout, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeTimeout; + static deserializeBinaryFromReader(message: MsgChannelUpgradeTimeout, reader: jspb.BinaryReader): MsgChannelUpgradeTimeout; +} + +export namespace MsgChannelUpgradeTimeout { + export type AsObject = { + portId: string, + channelId: string, + counterpartyChannel?: ibc_core_channel_v1_channel_pb.Channel.AsObject, + proofChannel: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgChannelUpgradeTimeoutResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeTimeoutResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeTimeoutResponse): MsgChannelUpgradeTimeoutResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeTimeoutResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeTimeoutResponse; + static deserializeBinaryFromReader(message: MsgChannelUpgradeTimeoutResponse, reader: jspb.BinaryReader): MsgChannelUpgradeTimeoutResponse; +} + +export namespace MsgChannelUpgradeTimeoutResponse { + export type AsObject = { + } +} + +export class MsgChannelUpgradeCancel extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + hasErrorReceipt(): boolean; + clearErrorReceipt(): void; + getErrorReceipt(): ibc_core_channel_v1_upgrade_pb.ErrorReceipt | undefined; + setErrorReceipt(value?: ibc_core_channel_v1_upgrade_pb.ErrorReceipt): void; + + getProofErrorReceipt(): Uint8Array | string; + getProofErrorReceipt_asU8(): Uint8Array; + getProofErrorReceipt_asB64(): string; + setProofErrorReceipt(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeCancel.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeCancel): MsgChannelUpgradeCancel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeCancel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeCancel; + static deserializeBinaryFromReader(message: MsgChannelUpgradeCancel, reader: jspb.BinaryReader): MsgChannelUpgradeCancel; +} + +export namespace MsgChannelUpgradeCancel { + export type AsObject = { + portId: string, + channelId: string, + errorReceipt?: ibc_core_channel_v1_upgrade_pb.ErrorReceipt.AsObject, + proofErrorReceipt: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + signer: string, + } +} + +export class MsgChannelUpgradeCancelResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgChannelUpgradeCancelResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgChannelUpgradeCancelResponse): MsgChannelUpgradeCancelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgChannelUpgradeCancelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgChannelUpgradeCancelResponse; + static deserializeBinaryFromReader(message: MsgChannelUpgradeCancelResponse, reader: jspb.BinaryReader): MsgChannelUpgradeCancelResponse; +} + +export namespace MsgChannelUpgradeCancelResponse { + export type AsObject = { + } +} + +export class MsgUpdateParams extends jspb.Message { + getAuthority(): string; + setAuthority(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_core_channel_v1_channel_pb.Params | undefined; + setParams(value?: ibc_core_channel_v1_channel_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + authority: string, + params?: ibc_core_channel_v1_channel_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + +export class MsgPruneAcknowledgements extends jspb.Message { + getPortId(): string; + setPortId(value: string): void; + + getChannelId(): string; + setChannelId(value: string): void; + + getLimit(): number; + setLimit(value: number): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgPruneAcknowledgements.AsObject; + static toObject(includeInstance: boolean, msg: MsgPruneAcknowledgements): MsgPruneAcknowledgements.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgPruneAcknowledgements, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgPruneAcknowledgements; + static deserializeBinaryFromReader(message: MsgPruneAcknowledgements, reader: jspb.BinaryReader): MsgPruneAcknowledgements; +} + +export namespace MsgPruneAcknowledgements { + export type AsObject = { + portId: string, + channelId: string, + limit: number, + signer: string, + } +} + +export class MsgPruneAcknowledgementsResponse extends jspb.Message { + getTotalPrunedSequences(): number; + setTotalPrunedSequences(value: number): void; + + getTotalRemainingSequences(): number; + setTotalRemainingSequences(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgPruneAcknowledgementsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgPruneAcknowledgementsResponse): MsgPruneAcknowledgementsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgPruneAcknowledgementsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgPruneAcknowledgementsResponse; + static deserializeBinaryFromReader(message: MsgPruneAcknowledgementsResponse, reader: jspb.BinaryReader): MsgPruneAcknowledgementsResponse; +} + +export namespace MsgPruneAcknowledgementsResponse { + export type AsObject = { + totalPrunedSequences: number, + totalRemainingSequences: number, + } +} + +export interface ResponseResultTypeMap { + RESPONSE_RESULT_TYPE_UNSPECIFIED: 0; + RESPONSE_RESULT_TYPE_NOOP: 1; + RESPONSE_RESULT_TYPE_SUCCESS: 2; + RESPONSE_RESULT_TYPE_FAILURE: 3; +} + +export const ResponseResultType: ResponseResultTypeMap; + diff --git a/codegen/ibc/core/channel/v1/tx_pb.js b/codegen/ibc/core/channel/v1/tx_pb.js new file mode 100644 index 0000000..3cabb5b --- /dev/null +++ b/codegen/ibc/core/channel/v1/tx_pb.js @@ -0,0 +1,9434 @@ +// source: ibc/core/channel/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_msg_v1_msg_pb = require('../../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); +goog.object.extend(proto, ibc_core_client_v1_client_pb); +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +var ibc_core_channel_v1_upgrade_pb = require('../../../../ibc/core/channel/v1/upgrade_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_upgrade_pb); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgAcknowledgement', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgAcknowledgementResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelCloseConfirm', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelCloseInit', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelCloseInitResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenAck', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenAckResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenConfirm', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenInit', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenInitResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenTry', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenTryResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeAck', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeCancel', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeInit', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeOpen', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeTry', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgPruneAcknowledgements', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgRecvPacket', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgRecvPacketResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgTimeout', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgTimeoutOnClose', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgTimeoutResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.MsgUpdateParamsResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.ResponseResultType', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenInit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelOpenInit.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenInit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenInitResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenInitResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenTry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelOpenTry.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenTry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenTryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenTryResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenAck, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelOpenAck.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenAck'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelOpenAckResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenAckResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenAckResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenConfirm, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelOpenConfirm.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenConfirm'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelCloseInit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelCloseInit.displayName = 'proto.ibc.core.channel.v1.MsgChannelCloseInit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelCloseInitResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelCloseInitResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelCloseInitResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelCloseConfirm, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelCloseConfirm.displayName = 'proto.ibc.core.channel.v1.MsgChannelCloseConfirm'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgRecvPacket = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgRecvPacket, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgRecvPacket.displayName = 'proto.ibc.core.channel.v1.MsgRecvPacket'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgRecvPacketResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgRecvPacketResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgRecvPacketResponse.displayName = 'proto.ibc.core.channel.v1.MsgRecvPacketResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgTimeout = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgTimeout, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgTimeout.displayName = 'proto.ibc.core.channel.v1.MsgTimeout'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgTimeoutResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgTimeoutResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgTimeoutResponse.displayName = 'proto.ibc.core.channel.v1.MsgTimeoutResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgTimeoutOnClose, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgTimeoutOnClose.displayName = 'proto.ibc.core.channel.v1.MsgTimeoutOnClose'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.displayName = 'proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgAcknowledgement = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgAcknowledgement, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgAcknowledgement.displayName = 'proto.ibc.core.channel.v1.MsgAcknowledgement'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgAcknowledgementResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgAcknowledgementResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgAcknowledgementResponse.displayName = 'proto.ibc.core.channel.v1.MsgAcknowledgementResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeInit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeInit.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeInit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.MsgChannelUpgradeTry.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeTry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeTry.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeTry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeAck, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeAck.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeAck'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeOpen, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeOpen'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeCancel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeCancel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgUpdateParams.displayName = 'proto.ibc.core.channel.v1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgUpdateParamsResponse.displayName = 'proto.ibc.core.channel.v1.MsgUpdateParamsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgPruneAcknowledgements, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgPruneAcknowledgements.displayName = 'proto.ibc.core.channel.v1.MsgPruneAcknowledgements'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.displayName = 'proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelOpenInit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channel: (f = msg.getChannel()) && ibc_core_channel_v1_channel_pb.Channel.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelOpenInit; + return proto.ibc.core.channel.v1.MsgChannelOpenInit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = new ibc_core_channel_v1_channel_pb.Channel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); + msg.setChannel(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelOpenInit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannel(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_channel_v1_channel_pb.Channel.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Channel channel = 2; + * @return {?proto.ibc.core.channel.v1.Channel} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.getChannel = function() { + return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 2)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Channel|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.clearChannel = function() { + return this.setChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.hasChannel = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelId: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelOpenInitResponse; + return proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string channel_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelOpenTry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + previousChannelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + channel: (f = msg.getChannel()) && ibc_core_channel_v1_channel_pb.Channel.toObject(includeInstance, f), + counterpartyVersion: jspb.Message.getFieldWithDefault(msg, 4, ""), + proofInit: msg.getProofInit_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelOpenTry; + return proto.ibc.core.channel.v1.MsgChannelOpenTry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPreviousChannelId(value); + break; + case 3: + var value = new ibc_core_channel_v1_channel_pb.Channel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); + msg.setChannel(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCounterpartyVersion(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofInit(value); + break; + case 6: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelOpenTry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPreviousChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getChannel(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_channel_v1_channel_pb.Channel.serializeBinaryToWriter + ); + } + f = message.getCounterpartyVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getProofInit_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 6, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string previous_channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getPreviousChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setPreviousChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Channel channel = 3; + * @return {?proto.ibc.core.channel.v1.Channel} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getChannel = function() { + return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Channel|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.clearChannel = function() { + return this.setChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.hasChannel = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string counterparty_version = 4; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getCounterpartyVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setCounterpartyVersion = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bytes proof_init = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getProofInit = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes proof_init = 5; + * This is a type-conversion wrapper around `getProofInit()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getProofInit_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofInit())); +}; + + +/** + * optional bytes proof_init = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofInit()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getProofInit_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofInit())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setProofInit = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 6; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 6)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string signer = 7; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelOpenTryResponse; + return proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string version = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelOpenAck.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + counterpartyChannelId: jspb.Message.getFieldWithDefault(msg, 3, ""), + counterpartyVersion: jspb.Message.getFieldWithDefault(msg, 4, ""), + proofTry: msg.getProofTry_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelOpenAck; + return proto.ibc.core.channel.v1.MsgChannelOpenAck.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCounterpartyChannelId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCounterpartyVersion(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofTry(value); + break; + case 6: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelOpenAck.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCounterpartyChannelId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCounterpartyVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getProofTry_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 6, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string counterparty_channel_id = 3; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getCounterpartyChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setCounterpartyChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string counterparty_version = 4; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getCounterpartyVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setCounterpartyVersion = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bytes proof_try = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getProofTry = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes proof_try = 5; + * This is a type-conversion wrapper around `getProofTry()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getProofTry_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofTry())); +}; + + +/** + * optional bytes proof_try = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofTry()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getProofTry_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofTry())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setProofTry = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 6; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 6)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string signer = 7; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelOpenAckResponse; + return proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelOpenConfirm.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + proofAck: msg.getProofAck_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelOpenConfirm; + return proto.ibc.core.channel.v1.MsgChannelOpenConfirm.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofAck(value); + break; + case 4: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelOpenConfirm.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProofAck_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes proof_ack = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getProofAck = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof_ack = 3; + * This is a type-conversion wrapper around `getProofAck()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getProofAck_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofAck())); +}; + + +/** + * optional bytes proof_ack = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofAck()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getProofAck_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofAck())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setProofAck = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 4; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 4)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string signer = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse; + return proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelCloseInit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + signer: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelCloseInit; + return proto.ibc.core.channel.v1.MsgChannelCloseInit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelCloseInit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelCloseInitResponse; + return proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelCloseConfirm.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + proofInit: msg.getProofInit_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 5, ""), + counterpartyUpgradeSequence: jspb.Message.getFieldWithDefault(msg, 6, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelCloseConfirm; + return proto.ibc.core.channel.v1.MsgChannelCloseConfirm.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofInit(value); + break; + case 4: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCounterpartyUpgradeSequence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelCloseConfirm.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProofInit_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCounterpartyUpgradeSequence(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes proof_init = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getProofInit = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof_init = 3; + * This is a type-conversion wrapper around `getProofInit()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getProofInit_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofInit())); +}; + + +/** + * optional bytes proof_init = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofInit()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getProofInit_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofInit())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setProofInit = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 4; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 4)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string signer = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint64 counterparty_upgrade_sequence = 6; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getCounterpartyUpgradeSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setCounterpartyUpgradeSequence = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse; + return proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgRecvPacket.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgRecvPacket.toObject = function(includeInstance, msg) { + var f, obj = { + packet: (f = msg.getPacket()) && ibc_core_channel_v1_channel_pb.Packet.toObject(includeInstance, f), + proofCommitment: msg.getProofCommitment_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgRecvPacket; + return proto.ibc.core.channel.v1.MsgRecvPacket.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.Packet; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Packet.deserializeBinaryFromReader); + msg.setPacket(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofCommitment(value); + break; + case 3: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgRecvPacket.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgRecvPacket.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacket(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.Packet.serializeBinaryToWriter + ); + } + f = message.getProofCommitment_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Packet packet = 1; + * @return {?proto.ibc.core.channel.v1.Packet} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getPacket = function() { + return /** @type{?proto.ibc.core.channel.v1.Packet} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Packet, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Packet|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this +*/ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.setPacket = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.clearPacket = function() { + return this.setPacket(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.hasPacket = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof_commitment = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getProofCommitment = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proof_commitment = 2; + * This is a type-conversion wrapper around `getProofCommitment()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getProofCommitment_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofCommitment())); +}; + + +/** + * optional bytes proof_commitment = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofCommitment()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getProofCommitment_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofCommitment())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.setProofCommitment = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this +*/ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string signer = 4; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this + */ +proto.ibc.core.channel.v1.MsgRecvPacket.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgRecvPacketResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgRecvPacketResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgRecvPacketResponse.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} + */ +proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgRecvPacketResponse; + return proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} + */ +proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgRecvPacketResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgRecvPacketResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgRecvPacketResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional ResponseResultType result = 1; + * @return {!proto.ibc.core.channel.v1.ResponseResultType} + */ +proto.ibc.core.channel.v1.MsgRecvPacketResponse.prototype.getResult = function() { + return /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.ResponseResultType} value + * @return {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} returns this + */ +proto.ibc.core.channel.v1.MsgRecvPacketResponse.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgTimeout.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgTimeout} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgTimeout.toObject = function(includeInstance, msg) { + var f, obj = { + packet: (f = msg.getPacket()) && ibc_core_channel_v1_channel_pb.Packet.toObject(includeInstance, f), + proofUnreceived: msg.getProofUnreceived_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + nextSequenceRecv: jspb.Message.getFieldWithDefault(msg, 4, 0), + signer: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgTimeout} + */ +proto.ibc.core.channel.v1.MsgTimeout.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgTimeout; + return proto.ibc.core.channel.v1.MsgTimeout.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgTimeout} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgTimeout} + */ +proto.ibc.core.channel.v1.MsgTimeout.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.Packet; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Packet.deserializeBinaryFromReader); + msg.setPacket(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofUnreceived(value); + break; + case 3: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextSequenceRecv(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgTimeout.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgTimeout} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgTimeout.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacket(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.Packet.serializeBinaryToWriter + ); + } + f = message.getProofUnreceived_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getNextSequenceRecv(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional Packet packet = 1; + * @return {?proto.ibc.core.channel.v1.Packet} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.getPacket = function() { + return /** @type{?proto.ibc.core.channel.v1.Packet} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Packet, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Packet|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this +*/ +proto.ibc.core.channel.v1.MsgTimeout.prototype.setPacket = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.clearPacket = function() { + return this.setPacket(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.hasPacket = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof_unreceived = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.getProofUnreceived = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proof_unreceived = 2; + * This is a type-conversion wrapper around `getProofUnreceived()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.getProofUnreceived_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofUnreceived())); +}; + + +/** + * optional bytes proof_unreceived = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofUnreceived()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.getProofUnreceived_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofUnreceived())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.setProofUnreceived = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this +*/ +proto.ibc.core.channel.v1.MsgTimeout.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 next_sequence_recv = 4; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.getNextSequenceRecv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.setNextSequenceRecv = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string signer = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgTimeout.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgTimeoutResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgTimeoutResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgTimeoutResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgTimeoutResponse.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgTimeoutResponse} + */ +proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgTimeoutResponse; + return proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgTimeoutResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgTimeoutResponse} + */ +proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgTimeoutResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgTimeoutResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgTimeoutResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgTimeoutResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional ResponseResultType result = 1; + * @return {!proto.ibc.core.channel.v1.ResponseResultType} + */ +proto.ibc.core.channel.v1.MsgTimeoutResponse.prototype.getResult = function() { + return /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.ResponseResultType} value + * @return {!proto.ibc.core.channel.v1.MsgTimeoutResponse} returns this + */ +proto.ibc.core.channel.v1.MsgTimeoutResponse.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgTimeoutOnClose.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.toObject = function(includeInstance, msg) { + var f, obj = { + packet: (f = msg.getPacket()) && ibc_core_channel_v1_channel_pb.Packet.toObject(includeInstance, f), + proofUnreceived: msg.getProofUnreceived_asB64(), + proofClose: msg.getProofClose_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + nextSequenceRecv: jspb.Message.getFieldWithDefault(msg, 5, 0), + signer: jspb.Message.getFieldWithDefault(msg, 6, ""), + counterpartyUpgradeSequence: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgTimeoutOnClose; + return proto.ibc.core.channel.v1.MsgTimeoutOnClose.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.Packet; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Packet.deserializeBinaryFromReader); + msg.setPacket(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofUnreceived(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofClose(value); + break; + case 4: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextSequenceRecv(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCounterpartyUpgradeSequence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgTimeoutOnClose.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacket(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.Packet.serializeBinaryToWriter + ); + } + f = message.getProofUnreceived_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProofClose_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getNextSequenceRecv(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getCounterpartyUpgradeSequence(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } +}; + + +/** + * optional Packet packet = 1; + * @return {?proto.ibc.core.channel.v1.Packet} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getPacket = function() { + return /** @type{?proto.ibc.core.channel.v1.Packet} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Packet, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Packet|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this +*/ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setPacket = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.clearPacket = function() { + return this.setPacket(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.hasPacket = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof_unreceived = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofUnreceived = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proof_unreceived = 2; + * This is a type-conversion wrapper around `getProofUnreceived()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofUnreceived_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofUnreceived())); +}; + + +/** + * optional bytes proof_unreceived = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofUnreceived()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofUnreceived_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofUnreceived())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setProofUnreceived = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes proof_close = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofClose = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof_close = 3; + * This is a type-conversion wrapper around `getProofClose()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofClose_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofClose())); +}; + + +/** + * optional bytes proof_close = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofClose()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofClose_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofClose())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setProofClose = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 4; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 4)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this +*/ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 next_sequence_recv = 5; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getNextSequenceRecv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setNextSequenceRecv = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string signer = 6; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional uint64 counterparty_upgrade_sequence = 7; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getCounterpartyUpgradeSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this + */ +proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setCounterpartyUpgradeSequence = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse; + return proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional ResponseResultType result = 1; + * @return {!proto.ibc.core.channel.v1.ResponseResultType} + */ +proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.prototype.getResult = function() { + return /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.ResponseResultType} value + * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} returns this + */ +proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgAcknowledgement.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.toObject = function(includeInstance, msg) { + var f, obj = { + packet: (f = msg.getPacket()) && ibc_core_channel_v1_channel_pb.Packet.toObject(includeInstance, f), + acknowledgement: msg.getAcknowledgement_asB64(), + proofAcked: msg.getProofAcked_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgAcknowledgement; + return proto.ibc.core.channel.v1.MsgAcknowledgement.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_channel_pb.Packet; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Packet.deserializeBinaryFromReader); + msg.setPacket(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAcknowledgement(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofAcked(value); + break; + case 4: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgAcknowledgement.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacket(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.Packet.serializeBinaryToWriter + ); + } + f = message.getAcknowledgement_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProofAcked_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional Packet packet = 1; + * @return {?proto.ibc.core.channel.v1.Packet} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getPacket = function() { + return /** @type{?proto.ibc.core.channel.v1.Packet} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Packet, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Packet|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this +*/ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setPacket = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.clearPacket = function() { + return this.setPacket(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.hasPacket = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes acknowledgement = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getAcknowledgement = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes acknowledgement = 2; + * This is a type-conversion wrapper around `getAcknowledgement()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getAcknowledgement_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAcknowledgement())); +}; + + +/** + * optional bytes acknowledgement = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAcknowledgement()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getAcknowledgement_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAcknowledgement())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setAcknowledgement = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes proof_acked = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getProofAcked = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof_acked = 3; + * This is a type-conversion wrapper around `getProofAcked()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getProofAcked_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofAcked())); +}; + + +/** + * optional bytes proof_acked = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofAcked()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getProofAcked_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofAcked())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setProofAcked = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 4; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 4)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this +*/ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string signer = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this + */ +proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgAcknowledgementResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgAcknowledgementResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgAcknowledgementResponse.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} + */ +proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgAcknowledgementResponse; + return proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} + */ +proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgAcknowledgementResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgAcknowledgementResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgAcknowledgementResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional ResponseResultType result = 1; + * @return {!proto.ibc.core.channel.v1.ResponseResultType} + */ +proto.ibc.core.channel.v1.MsgAcknowledgementResponse.prototype.getResult = function() { + return /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.ResponseResultType} value + * @return {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} returns this + */ +proto.ibc.core.channel.v1.MsgAcknowledgementResponse.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeInit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + fields: (f = msg.getFields()) && ibc_core_channel_v1_upgrade_pb.UpgradeFields.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeInit; + return proto.ibc.core.channel.v1.MsgChannelUpgradeInit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = new ibc_core_channel_v1_upgrade_pb.UpgradeFields; + reader.readMessage(value,ibc_core_channel_v1_upgrade_pb.UpgradeFields.deserializeBinaryFromReader); + msg.setFields(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeInit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFields(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_channel_v1_upgrade_pb.UpgradeFields.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional UpgradeFields fields = 3; + * @return {?proto.ibc.core.channel.v1.UpgradeFields} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.getFields = function() { + return /** @type{?proto.ibc.core.channel.v1.UpgradeFields} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_upgrade_pb.UpgradeFields, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.UpgradeFields|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.setFields = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.clearFields = function() { + return this.setFields(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.hasFields = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string signer = 4; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInit} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInit.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgrade: (f = msg.getUpgrade()) && ibc_core_channel_v1_upgrade_pb.Upgrade.toObject(includeInstance, f), + upgradeSequence: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse; + return proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_upgrade_pb.Upgrade; + reader.readMessage(value,ibc_core_channel_v1_upgrade_pb.Upgrade.deserializeBinaryFromReader); + msg.setUpgrade(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpgradeSequence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgrade(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_upgrade_pb.Upgrade.serializeBinaryToWriter + ); + } + f = message.getUpgradeSequence(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional Upgrade upgrade = 1; + * @return {?proto.ibc.core.channel.v1.Upgrade} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.prototype.getUpgrade = function() { + return /** @type{?proto.ibc.core.channel.v1.Upgrade} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_upgrade_pb.Upgrade, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Upgrade|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.prototype.setUpgrade = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.prototype.clearUpgrade = function() { + return this.setUpgrade(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.prototype.hasUpgrade = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 upgrade_sequence = 2; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.prototype.getUpgradeSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeInitResponse.prototype.setUpgradeSequence = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeTry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + proposedUpgradeConnectionHopsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + counterpartyUpgradeFields: (f = msg.getCounterpartyUpgradeFields()) && ibc_core_channel_v1_upgrade_pb.UpgradeFields.toObject(includeInstance, f), + counterpartyUpgradeSequence: jspb.Message.getFieldWithDefault(msg, 5, 0), + proofChannel: msg.getProofChannel_asB64(), + proofUpgrade: msg.getProofUpgrade_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 9, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeTry; + return proto.ibc.core.channel.v1.MsgChannelUpgradeTry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addProposedUpgradeConnectionHops(value); + break; + case 4: + var value = new ibc_core_channel_v1_upgrade_pb.UpgradeFields; + reader.readMessage(value,ibc_core_channel_v1_upgrade_pb.UpgradeFields.deserializeBinaryFromReader); + msg.setCounterpartyUpgradeFields(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCounterpartyUpgradeSequence(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofChannel(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofUpgrade(value); + break; + case 8: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeTry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProposedUpgradeConnectionHopsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getCounterpartyUpgradeFields(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_channel_v1_upgrade_pb.UpgradeFields.serializeBinaryToWriter + ); + } + f = message.getCounterpartyUpgradeSequence(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getProofChannel_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getProofUpgrade_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 8, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string proposed_upgrade_connection_hops = 3; + * @return {!Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getProposedUpgradeConnectionHopsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.setProposedUpgradeConnectionHopsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.addProposedUpgradeConnectionHops = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.clearProposedUpgradeConnectionHopsList = function() { + return this.setProposedUpgradeConnectionHopsList([]); +}; + + +/** + * optional UpgradeFields counterparty_upgrade_fields = 4; + * @return {?proto.ibc.core.channel.v1.UpgradeFields} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getCounterpartyUpgradeFields = function() { + return /** @type{?proto.ibc.core.channel.v1.UpgradeFields} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_upgrade_pb.UpgradeFields, 4)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.UpgradeFields|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.setCounterpartyUpgradeFields = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.clearCounterpartyUpgradeFields = function() { + return this.setCounterpartyUpgradeFields(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.hasCounterpartyUpgradeFields = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 counterparty_upgrade_sequence = 5; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getCounterpartyUpgradeSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.setCounterpartyUpgradeSequence = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bytes proof_channel = 6; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getProofChannel = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes proof_channel = 6; + * This is a type-conversion wrapper around `getProofChannel()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getProofChannel_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofChannel())); +}; + + +/** + * optional bytes proof_channel = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofChannel()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getProofChannel_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofChannel())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.setProofChannel = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes proof_upgrade = 7; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getProofUpgrade = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes proof_upgrade = 7; + * This is a type-conversion wrapper around `getProofUpgrade()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getProofUpgrade_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofUpgrade())); +}; + + +/** + * optional bytes proof_upgrade = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofUpgrade()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getProofUpgrade_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofUpgrade())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.setProofUpgrade = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 8; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 8)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string signer = 9; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTry} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTry.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgrade: (f = msg.getUpgrade()) && ibc_core_channel_v1_upgrade_pb.Upgrade.toObject(includeInstance, f), + upgradeSequence: jspb.Message.getFieldWithDefault(msg, 2, 0), + result: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse; + return proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_channel_v1_upgrade_pb.Upgrade; + reader.readMessage(value,ibc_core_channel_v1_upgrade_pb.Upgrade.deserializeBinaryFromReader); + msg.setUpgrade(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpgradeSequence(value); + break; + case 3: + var value = /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgrade(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_upgrade_pb.Upgrade.serializeBinaryToWriter + ); + } + f = message.getUpgradeSequence(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } +}; + + +/** + * optional Upgrade upgrade = 1; + * @return {?proto.ibc.core.channel.v1.Upgrade} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.getUpgrade = function() { + return /** @type{?proto.ibc.core.channel.v1.Upgrade} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_upgrade_pb.Upgrade, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Upgrade|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.setUpgrade = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.clearUpgrade = function() { + return this.setUpgrade(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.hasUpgrade = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 upgrade_sequence = 2; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.getUpgradeSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.setUpgradeSequence = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional ResponseResultType result = 3; + * @return {!proto.ibc.core.channel.v1.ResponseResultType} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.getResult = function() { + return /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.ResponseResultType} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTryResponse.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeAck.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + counterpartyUpgrade: (f = msg.getCounterpartyUpgrade()) && ibc_core_channel_v1_upgrade_pb.Upgrade.toObject(includeInstance, f), + proofChannel: msg.getProofChannel_asB64(), + proofUpgrade: msg.getProofUpgrade_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeAck; + return proto.ibc.core.channel.v1.MsgChannelUpgradeAck.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = new ibc_core_channel_v1_upgrade_pb.Upgrade; + reader.readMessage(value,ibc_core_channel_v1_upgrade_pb.Upgrade.deserializeBinaryFromReader); + msg.setCounterpartyUpgrade(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofChannel(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofUpgrade(value); + break; + case 6: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeAck.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCounterpartyUpgrade(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_channel_v1_upgrade_pb.Upgrade.serializeBinaryToWriter + ); + } + f = message.getProofChannel_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getProofUpgrade_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 6, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Upgrade counterparty_upgrade = 3; + * @return {?proto.ibc.core.channel.v1.Upgrade} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getCounterpartyUpgrade = function() { + return /** @type{?proto.ibc.core.channel.v1.Upgrade} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_upgrade_pb.Upgrade, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Upgrade|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.setCounterpartyUpgrade = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.clearCounterpartyUpgrade = function() { + return this.setCounterpartyUpgrade(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.hasCounterpartyUpgrade = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes proof_channel = 4; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getProofChannel = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes proof_channel = 4; + * This is a type-conversion wrapper around `getProofChannel()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getProofChannel_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofChannel())); +}; + + +/** + * optional bytes proof_channel = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofChannel()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getProofChannel_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofChannel())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.setProofChannel = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes proof_upgrade = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getProofUpgrade = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes proof_upgrade = 5; + * This is a type-conversion wrapper around `getProofUpgrade()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getProofUpgrade_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofUpgrade())); +}; + + +/** + * optional bytes proof_upgrade = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofUpgrade()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getProofUpgrade_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofUpgrade())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.setProofUpgrade = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 6; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 6)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string signer = 7; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAck} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAck.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse; + return proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional ResponseResultType result = 1; + * @return {!proto.ibc.core.channel.v1.ResponseResultType} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.prototype.getResult = function() { + return /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.ResponseResultType} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeAckResponse.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + counterpartyChannelState: jspb.Message.getFieldWithDefault(msg, 3, 0), + counterpartyUpgrade: (f = msg.getCounterpartyUpgrade()) && ibc_core_channel_v1_upgrade_pb.Upgrade.toObject(includeInstance, f), + proofChannel: msg.getProofChannel_asB64(), + proofUpgrade: msg.getProofUpgrade_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm; + return proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {!proto.ibc.core.channel.v1.State} */ (reader.readEnum()); + msg.setCounterpartyChannelState(value); + break; + case 4: + var value = new ibc_core_channel_v1_upgrade_pb.Upgrade; + reader.readMessage(value,ibc_core_channel_v1_upgrade_pb.Upgrade.deserializeBinaryFromReader); + msg.setCounterpartyUpgrade(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofChannel(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofUpgrade(value); + break; + case 7: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCounterpartyChannelState(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getCounterpartyUpgrade(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_channel_v1_upgrade_pb.Upgrade.serializeBinaryToWriter + ); + } + f = message.getProofChannel_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getProofUpgrade_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 7, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional State counterparty_channel_state = 3; + * @return {!proto.ibc.core.channel.v1.State} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getCounterpartyChannelState = function() { + return /** @type {!proto.ibc.core.channel.v1.State} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.State} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.setCounterpartyChannelState = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional Upgrade counterparty_upgrade = 4; + * @return {?proto.ibc.core.channel.v1.Upgrade} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getCounterpartyUpgrade = function() { + return /** @type{?proto.ibc.core.channel.v1.Upgrade} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_upgrade_pb.Upgrade, 4)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Upgrade|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.setCounterpartyUpgrade = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.clearCounterpartyUpgrade = function() { + return this.setCounterpartyUpgrade(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.hasCounterpartyUpgrade = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bytes proof_channel = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getProofChannel = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes proof_channel = 5; + * This is a type-conversion wrapper around `getProofChannel()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getProofChannel_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofChannel())); +}; + + +/** + * optional bytes proof_channel = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofChannel()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getProofChannel_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofChannel())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.setProofChannel = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional bytes proof_upgrade = 6; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getProofUpgrade = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes proof_upgrade = 6; + * This is a type-conversion wrapper around `getProofUpgrade()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getProofUpgrade_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofUpgrade())); +}; + + +/** + * optional bytes proof_upgrade = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofUpgrade()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getProofUpgrade_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofUpgrade())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.setProofUpgrade = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 7; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 7)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string signer = 8; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirm.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse; + return proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional ResponseResultType result = 1; + * @return {!proto.ibc.core.channel.v1.ResponseResultType} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.prototype.getResult = function() { + return /** @type {!proto.ibc.core.channel.v1.ResponseResultType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.ResponseResultType} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + counterpartyChannelState: jspb.Message.getFieldWithDefault(msg, 3, 0), + counterpartyUpgradeSequence: jspb.Message.getFieldWithDefault(msg, 4, 0), + proofChannel: msg.getProofChannel_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeOpen; + return proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {!proto.ibc.core.channel.v1.State} */ (reader.readEnum()); + msg.setCounterpartyChannelState(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCounterpartyUpgradeSequence(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofChannel(value); + break; + case 6: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCounterpartyChannelState(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getCounterpartyUpgradeSequence(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getProofChannel_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 6, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional State counterparty_channel_state = 3; + * @return {!proto.ibc.core.channel.v1.State} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.getCounterpartyChannelState = function() { + return /** @type {!proto.ibc.core.channel.v1.State} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.State} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.setCounterpartyChannelState = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional uint64 counterparty_upgrade_sequence = 4; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.getCounterpartyUpgradeSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.setCounterpartyUpgradeSequence = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes proof_channel = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.getProofChannel = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes proof_channel = 5; + * This is a type-conversion wrapper around `getProofChannel()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.getProofChannel_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofChannel())); +}; + + +/** + * optional bytes proof_channel = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofChannel()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.getProofChannel_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofChannel())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.setProofChannel = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 6; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 6)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string signer = 7; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpen} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpen.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse; + return proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeOpenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + counterpartyChannel: (f = msg.getCounterpartyChannel()) && ibc_core_channel_v1_channel_pb.Channel.toObject(includeInstance, f), + proofChannel: msg.getProofChannel_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout; + return proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = new ibc_core_channel_v1_channel_pb.Channel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); + msg.setCounterpartyChannel(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofChannel(value); + break; + case 5: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCounterpartyChannel(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_channel_v1_channel_pb.Channel.serializeBinaryToWriter + ); + } + f = message.getProofChannel_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 5, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Channel counterparty_channel = 3; + * @return {?proto.ibc.core.channel.v1.Channel} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.getCounterpartyChannel = function() { + return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Channel|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.setCounterpartyChannel = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.clearCounterpartyChannel = function() { + return this.setCounterpartyChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.hasCounterpartyChannel = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes proof_channel = 4; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.getProofChannel = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes proof_channel = 4; + * This is a type-conversion wrapper around `getProofChannel()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.getProofChannel_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofChannel())); +}; + + +/** + * optional bytes proof_channel = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofChannel()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.getProofChannel_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofChannel())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.setProofChannel = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 5; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 5)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string signer = 6; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeout.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse; + return proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + errorReceipt: (f = msg.getErrorReceipt()) && ibc_core_channel_v1_upgrade_pb.ErrorReceipt.toObject(includeInstance, f), + proofErrorReceipt: msg.getProofErrorReceipt_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeCancel; + return proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = new ibc_core_channel_v1_upgrade_pb.ErrorReceipt; + reader.readMessage(value,ibc_core_channel_v1_upgrade_pb.ErrorReceipt.deserializeBinaryFromReader); + msg.setErrorReceipt(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofErrorReceipt(value); + break; + case 5: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getErrorReceipt(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_channel_v1_upgrade_pb.ErrorReceipt.serializeBinaryToWriter + ); + } + f = message.getProofErrorReceipt_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 5, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ErrorReceipt error_receipt = 3; + * @return {?proto.ibc.core.channel.v1.ErrorReceipt} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.getErrorReceipt = function() { + return /** @type{?proto.ibc.core.channel.v1.ErrorReceipt} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_upgrade_pb.ErrorReceipt, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.ErrorReceipt|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.setErrorReceipt = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.clearErrorReceipt = function() { + return this.setErrorReceipt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.hasErrorReceipt = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes proof_error_receipt = 4; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.getProofErrorReceipt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes proof_error_receipt = 4; + * This is a type-conversion wrapper around `getProofErrorReceipt()` + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.getProofErrorReceipt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofErrorReceipt())); +}; + + +/** + * optional bytes proof_error_receipt = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofErrorReceipt()` + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.getProofErrorReceipt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofErrorReceipt())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.setProofErrorReceipt = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 5; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 5)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} returns this +*/ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string signer = 6; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancel} returns this + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancel.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse; + return proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgChannelUpgradeCancelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + authority: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && ibc_core_channel_v1_channel_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgUpdateParams} + */ +proto.ibc.core.channel.v1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgUpdateParams; + return proto.ibc.core.channel.v1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgUpdateParams} + */ +proto.ibc.core.channel.v1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthority(value); + break; + case 2: + var value = new ibc_core_channel_v1_channel_pb.Params; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthority(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_channel_v1_channel_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string authority = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgUpdateParams.prototype.getAuthority = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgUpdateParams} returns this + */ +proto.ibc.core.channel.v1.MsgUpdateParams.prototype.setAuthority = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Params params = 2; + * @return {?proto.ibc.core.channel.v1.Params} + */ +proto.ibc.core.channel.v1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.ibc.core.channel.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Params, 2)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Params|undefined} value + * @return {!proto.ibc.core.channel.v1.MsgUpdateParams} returns this +*/ +proto.ibc.core.channel.v1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.MsgUpdateParams} returns this + */ +proto.ibc.core.channel.v1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgUpdateParamsResponse} + */ +proto.ibc.core.channel.v1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgUpdateParamsResponse; + return proto.ibc.core.channel.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgUpdateParamsResponse} + */ +proto.ibc.core.channel.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgPruneAcknowledgements.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgPruneAcknowledgements} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0), + signer: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgements} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgPruneAcknowledgements; + return proto.ibc.core.channel.v1.MsgPruneAcknowledgements.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgPruneAcknowledgements} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgements} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLimit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgPruneAcknowledgements.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgPruneAcknowledgements} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgements} returns this + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgements} returns this + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 limit = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgements} returns this + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string signer = 4; + * @return {string} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgements} returns this + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgements.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + totalPrunedSequences: jspb.Message.getFieldWithDefault(msg, 1, 0), + totalRemainingSequences: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse; + return proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalPrunedSequences(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalRemainingSequences(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalPrunedSequences(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getTotalRemainingSequences(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 total_pruned_sequences = 1; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.prototype.getTotalPrunedSequences = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse} returns this + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.prototype.setTotalPrunedSequences = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 total_remaining_sequences = 2; + * @return {number} + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.prototype.getTotalRemainingSequences = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse} returns this + */ +proto.ibc.core.channel.v1.MsgPruneAcknowledgementsResponse.prototype.setTotalRemainingSequences = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * @enum {number} + */ +proto.ibc.core.channel.v1.ResponseResultType = { + RESPONSE_RESULT_TYPE_UNSPECIFIED: 0, + RESPONSE_RESULT_TYPE_NOOP: 1, + RESPONSE_RESULT_TYPE_SUCCESS: 2, + RESPONSE_RESULT_TYPE_FAILURE: 3 +}; + +goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/proto/ibc/core/channel/v1/tx_pb_service.d.ts b/codegen/ibc/core/channel/v1/tx_pb_service.d.ts similarity index 55% rename from proto/ibc/core/channel/v1/tx_pb_service.d.ts rename to codegen/ibc/core/channel/v1/tx_pb_service.d.ts index 1af16ac..5bfe452 100644 --- a/proto/ibc/core/channel/v1/tx_pb_service.d.ts +++ b/codegen/ibc/core/channel/v1/tx_pb_service.d.ts @@ -94,6 +94,87 @@ type MsgAcknowledgement = { readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgAcknowledgementResponse; }; +type MsgChannelUpgradeInit = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeInit; + readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeInitResponse; +}; + +type MsgChannelUpgradeTry = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTry; + readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTryResponse; +}; + +type MsgChannelUpgradeAck = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeAck; + readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeAckResponse; +}; + +type MsgChannelUpgradeConfirm = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeConfirm; + readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeConfirmResponse; +}; + +type MsgChannelUpgradeOpen = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeOpen; + readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeOpenResponse; +}; + +type MsgChannelUpgradeTimeout = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTimeout; + readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTimeoutResponse; +}; + +type MsgChannelUpgradeCancel = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeCancel; + readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgChannelUpgradeCancelResponse; +}; + +type MsgUpdateChannelParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_tx_pb.MsgUpdateParams; + readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgUpdateParamsResponse; +}; + +type MsgPruneAcknowledgements = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_channel_v1_tx_pb.MsgPruneAcknowledgements; + readonly responseType: typeof ibc_core_channel_v1_tx_pb.MsgPruneAcknowledgementsResponse; +}; + export class Msg { static readonly serviceName: string; static readonly ChannelOpenInit: MsgChannelOpenInit; @@ -106,6 +187,15 @@ export class Msg { static readonly Timeout: MsgTimeout; static readonly TimeoutOnClose: MsgTimeoutOnClose; static readonly Acknowledgement: MsgAcknowledgement; + static readonly ChannelUpgradeInit: MsgChannelUpgradeInit; + static readonly ChannelUpgradeTry: MsgChannelUpgradeTry; + static readonly ChannelUpgradeAck: MsgChannelUpgradeAck; + static readonly ChannelUpgradeConfirm: MsgChannelUpgradeConfirm; + static readonly ChannelUpgradeOpen: MsgChannelUpgradeOpen; + static readonly ChannelUpgradeTimeout: MsgChannelUpgradeTimeout; + static readonly ChannelUpgradeCancel: MsgChannelUpgradeCancel; + static readonly UpdateChannelParams: MsgUpdateChannelParams; + static readonly PruneAcknowledgements: MsgPruneAcknowledgements; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -230,5 +320,86 @@ export class MsgClient { requestMessage: ibc_core_channel_v1_tx_pb.MsgAcknowledgement, callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgAcknowledgementResponse|null) => void ): UnaryResponse; + channelUpgradeInit( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeInit, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeInitResponse|null) => void + ): UnaryResponse; + channelUpgradeInit( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeInit, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeInitResponse|null) => void + ): UnaryResponse; + channelUpgradeTry( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTry, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTryResponse|null) => void + ): UnaryResponse; + channelUpgradeTry( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTry, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTryResponse|null) => void + ): UnaryResponse; + channelUpgradeAck( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeAck, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeAckResponse|null) => void + ): UnaryResponse; + channelUpgradeAck( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeAck, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeAckResponse|null) => void + ): UnaryResponse; + channelUpgradeConfirm( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeConfirm, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeConfirmResponse|null) => void + ): UnaryResponse; + channelUpgradeConfirm( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeConfirm, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeConfirmResponse|null) => void + ): UnaryResponse; + channelUpgradeOpen( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeOpen, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeOpenResponse|null) => void + ): UnaryResponse; + channelUpgradeOpen( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeOpen, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeOpenResponse|null) => void + ): UnaryResponse; + channelUpgradeTimeout( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTimeout, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTimeoutResponse|null) => void + ): UnaryResponse; + channelUpgradeTimeout( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTimeout, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTimeoutResponse|null) => void + ): UnaryResponse; + channelUpgradeCancel( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeCancel, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeCancelResponse|null) => void + ): UnaryResponse; + channelUpgradeCancel( + requestMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeCancel, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeCancelResponse|null) => void + ): UnaryResponse; + updateChannelParams( + requestMessage: ibc_core_channel_v1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateChannelParams( + requestMessage: ibc_core_channel_v1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + pruneAcknowledgements( + requestMessage: ibc_core_channel_v1_tx_pb.MsgPruneAcknowledgements, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgPruneAcknowledgementsResponse|null) => void + ): UnaryResponse; + pruneAcknowledgements( + requestMessage: ibc_core_channel_v1_tx_pb.MsgPruneAcknowledgements, + callback: (error: ServiceError|null, responseMessage: ibc_core_channel_v1_tx_pb.MsgPruneAcknowledgementsResponse|null) => void + ): UnaryResponse; } diff --git a/codegen/ibc/core/channel/v1/tx_pb_service.js b/codegen/ibc/core/channel/v1/tx_pb_service.js new file mode 100644 index 0000000..dcc2093 --- /dev/null +++ b/codegen/ibc/core/channel/v1/tx_pb_service.js @@ -0,0 +1,781 @@ +// package: ibc.core.channel.v1 +// file: ibc/core/channel/v1/tx.proto + +var ibc_core_channel_v1_tx_pb = require("../../../../ibc/core/channel/v1/tx_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Msg = (function () { + function Msg() {} + Msg.serviceName = "ibc.core.channel.v1.Msg"; + return Msg; +}()); + +Msg.ChannelOpenInit = { + methodName: "ChannelOpenInit", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelOpenInit, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelOpenInitResponse +}; + +Msg.ChannelOpenTry = { + methodName: "ChannelOpenTry", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelOpenTry, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelOpenTryResponse +}; + +Msg.ChannelOpenAck = { + methodName: "ChannelOpenAck", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelOpenAck, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelOpenAckResponse +}; + +Msg.ChannelOpenConfirm = { + methodName: "ChannelOpenConfirm", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelOpenConfirm, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelOpenConfirmResponse +}; + +Msg.ChannelCloseInit = { + methodName: "ChannelCloseInit", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelCloseInit, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelCloseInitResponse +}; + +Msg.ChannelCloseConfirm = { + methodName: "ChannelCloseConfirm", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelCloseConfirm, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelCloseConfirmResponse +}; + +Msg.RecvPacket = { + methodName: "RecvPacket", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgRecvPacket, + responseType: ibc_core_channel_v1_tx_pb.MsgRecvPacketResponse +}; + +Msg.Timeout = { + methodName: "Timeout", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgTimeout, + responseType: ibc_core_channel_v1_tx_pb.MsgTimeoutResponse +}; + +Msg.TimeoutOnClose = { + methodName: "TimeoutOnClose", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgTimeoutOnClose, + responseType: ibc_core_channel_v1_tx_pb.MsgTimeoutOnCloseResponse +}; + +Msg.Acknowledgement = { + methodName: "Acknowledgement", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgAcknowledgement, + responseType: ibc_core_channel_v1_tx_pb.MsgAcknowledgementResponse +}; + +Msg.ChannelUpgradeInit = { + methodName: "ChannelUpgradeInit", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeInit, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeInitResponse +}; + +Msg.ChannelUpgradeTry = { + methodName: "ChannelUpgradeTry", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTry, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTryResponse +}; + +Msg.ChannelUpgradeAck = { + methodName: "ChannelUpgradeAck", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeAck, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeAckResponse +}; + +Msg.ChannelUpgradeConfirm = { + methodName: "ChannelUpgradeConfirm", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeConfirm, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeConfirmResponse +}; + +Msg.ChannelUpgradeOpen = { + methodName: "ChannelUpgradeOpen", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeOpen, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeOpenResponse +}; + +Msg.ChannelUpgradeTimeout = { + methodName: "ChannelUpgradeTimeout", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTimeout, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeTimeoutResponse +}; + +Msg.ChannelUpgradeCancel = { + methodName: "ChannelUpgradeCancel", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeCancel, + responseType: ibc_core_channel_v1_tx_pb.MsgChannelUpgradeCancelResponse +}; + +Msg.UpdateChannelParams = { + methodName: "UpdateChannelParams", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgUpdateParams, + responseType: ibc_core_channel_v1_tx_pb.MsgUpdateParamsResponse +}; + +Msg.PruneAcknowledgements = { + methodName: "PruneAcknowledgements", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_channel_v1_tx_pb.MsgPruneAcknowledgements, + responseType: ibc_core_channel_v1_tx_pb.MsgPruneAcknowledgementsResponse +}; + +exports.Msg = Msg; + +function MsgClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MsgClient.prototype.channelOpenInit = function channelOpenInit(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelOpenInit, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelOpenTry = function channelOpenTry(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelOpenTry, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelOpenAck = function channelOpenAck(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelOpenAck, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelOpenConfirm = function channelOpenConfirm(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelOpenConfirm, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelCloseInit = function channelCloseInit(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelCloseInit, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelCloseConfirm = function channelCloseConfirm(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelCloseConfirm, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.recvPacket = function recvPacket(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.RecvPacket, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.timeout = function timeout(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.Timeout, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.timeoutOnClose = function timeoutOnClose(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.TimeoutOnClose, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.acknowledgement = function acknowledgement(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.Acknowledgement, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelUpgradeInit = function channelUpgradeInit(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelUpgradeInit, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelUpgradeTry = function channelUpgradeTry(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelUpgradeTry, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelUpgradeAck = function channelUpgradeAck(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelUpgradeAck, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelUpgradeConfirm = function channelUpgradeConfirm(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelUpgradeConfirm, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelUpgradeOpen = function channelUpgradeOpen(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelUpgradeOpen, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelUpgradeTimeout = function channelUpgradeTimeout(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelUpgradeTimeout, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.channelUpgradeCancel = function channelUpgradeCancel(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.ChannelUpgradeCancel, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.updateChannelParams = function updateChannelParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateChannelParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.pruneAcknowledgements = function pruneAcknowledgements(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.PruneAcknowledgements, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MsgClient = MsgClient; + diff --git a/codegen/ibc/core/channel/v1/upgrade.ts b/codegen/ibc/core/channel/v1/upgrade.ts new file mode 100644 index 0000000..a52eb5a --- /dev/null +++ b/codegen/ibc/core/channel/v1/upgrade.ts @@ -0,0 +1,332 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/channel/v1/upgrade.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./channel"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.core.channel.v1 { + export class Upgrade extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fields?: UpgradeFields; + timeout?: dependency_2.ibc.core.channel.v1.Timeout; + next_sequence_send?: 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 ("fields" in data && data.fields != undefined) { + this.fields = data.fields; + } + if ("timeout" in data && data.timeout != undefined) { + this.timeout = data.timeout; + } + if ("next_sequence_send" in data && data.next_sequence_send != undefined) { + this.next_sequence_send = data.next_sequence_send; + } + } + } + get fields() { + return pb_1.Message.getWrapperField(this, UpgradeFields, 1) as UpgradeFields; + } + set fields(value: UpgradeFields) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_fields() { + return pb_1.Message.getField(this, 1) != null; + } + get timeout() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.core.channel.v1.Timeout, 2) as dependency_2.ibc.core.channel.v1.Timeout; + } + set timeout(value: dependency_2.ibc.core.channel.v1.Timeout) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_timeout() { + return pb_1.Message.getField(this, 2) != null; + } + get next_sequence_send() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set next_sequence_send(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + fields?: ReturnType; + timeout?: ReturnType; + next_sequence_send?: number; + }): Upgrade { + const message = new Upgrade({}); + if (data.fields != null) { + message.fields = UpgradeFields.fromObject(data.fields); + } + if (data.timeout != null) { + message.timeout = dependency_2.ibc.core.channel.v1.Timeout.fromObject(data.timeout); + } + if (data.next_sequence_send != null) { + message.next_sequence_send = data.next_sequence_send; + } + return message; + } + toObject() { + const data: { + fields?: ReturnType; + timeout?: ReturnType; + next_sequence_send?: number; + } = {}; + if (this.fields != null) { + data.fields = this.fields.toObject(); + } + if (this.timeout != null) { + data.timeout = this.timeout.toObject(); + } + if (this.next_sequence_send != null) { + data.next_sequence_send = this.next_sequence_send; + } + 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_fields) + writer.writeMessage(1, this.fields, () => this.fields.serialize(writer)); + if (this.has_timeout) + writer.writeMessage(2, this.timeout, () => this.timeout.serialize(writer)); + if (this.next_sequence_send != 0) + writer.writeUint64(3, this.next_sequence_send); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Upgrade { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Upgrade(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.fields, () => message.fields = UpgradeFields.deserialize(reader)); + break; + case 2: + reader.readMessage(message.timeout, () => message.timeout = dependency_2.ibc.core.channel.v1.Timeout.deserialize(reader)); + break; + case 3: + message.next_sequence_send = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Upgrade { + return Upgrade.deserialize(bytes); + } + } + export class UpgradeFields extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + ordering?: dependency_2.ibc.core.channel.v1.Order; + connection_hops?: string[]; + version?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("ordering" in data && data.ordering != undefined) { + this.ordering = data.ordering; + } + if ("connection_hops" in data && data.connection_hops != undefined) { + this.connection_hops = data.connection_hops; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + } + } + get ordering() { + return pb_1.Message.getFieldWithDefault(this, 1, dependency_2.ibc.core.channel.v1.Order.ORDER_NONE_UNSPECIFIED) as dependency_2.ibc.core.channel.v1.Order; + } + set ordering(value: dependency_2.ibc.core.channel.v1.Order) { + pb_1.Message.setField(this, 1, value); + } + get connection_hops() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set connection_hops(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + ordering?: dependency_2.ibc.core.channel.v1.Order; + connection_hops?: string[]; + version?: string; + }): UpgradeFields { + const message = new UpgradeFields({}); + if (data.ordering != null) { + message.ordering = data.ordering; + } + if (data.connection_hops != null) { + message.connection_hops = data.connection_hops; + } + if (data.version != null) { + message.version = data.version; + } + return message; + } + toObject() { + const data: { + ordering?: dependency_2.ibc.core.channel.v1.Order; + connection_hops?: string[]; + version?: string; + } = {}; + if (this.ordering != null) { + data.ordering = this.ordering; + } + if (this.connection_hops != null) { + data.connection_hops = this.connection_hops; + } + if (this.version != null) { + data.version = this.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.ordering != dependency_2.ibc.core.channel.v1.Order.ORDER_NONE_UNSPECIFIED) + writer.writeEnum(1, this.ordering); + if (this.connection_hops.length) + writer.writeRepeatedString(2, this.connection_hops); + if (this.version.length) + writer.writeString(3, this.version); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpgradeFields { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpgradeFields(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.ordering = reader.readEnum(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + case 3: + message.version = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpgradeFields { + return UpgradeFields.deserialize(bytes); + } + } + export class ErrorReceipt extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: number; + 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 ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("message" in data && data.message != undefined) { + this.message = data.message; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + get message() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set message(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + sequence?: number; + message?: string; + }): ErrorReceipt { + const message = new ErrorReceipt({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.message != null) { + message.message = data.message; + } + return message; + } + toObject() { + const data: { + sequence?: number; + message?: string; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + 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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (this.message.length) + writer.writeString(2, this.message); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ErrorReceipt { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ErrorReceipt(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + case 2: + message.message = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ErrorReceipt { + return ErrorReceipt.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/core/channel/v1/upgrade_pb.d.ts b/codegen/ibc/core/channel/v1/upgrade_pb.d.ts new file mode 100644 index 0000000..9f153ac --- /dev/null +++ b/codegen/ibc/core/channel/v1/upgrade_pb.d.ts @@ -0,0 +1,93 @@ +// package: ibc.core.channel.v1 +// file: ibc/core/channel/v1/upgrade.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as ibc_core_channel_v1_channel_pb from "../../../../ibc/core/channel/v1/channel_pb"; + +export class Upgrade extends jspb.Message { + hasFields(): boolean; + clearFields(): void; + getFields(): UpgradeFields | undefined; + setFields(value?: UpgradeFields): void; + + hasTimeout(): boolean; + clearTimeout(): void; + getTimeout(): ibc_core_channel_v1_channel_pb.Timeout | undefined; + setTimeout(value?: ibc_core_channel_v1_channel_pb.Timeout): void; + + getNextSequenceSend(): number; + setNextSequenceSend(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Upgrade.AsObject; + static toObject(includeInstance: boolean, msg: Upgrade): Upgrade.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Upgrade, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Upgrade; + static deserializeBinaryFromReader(message: Upgrade, reader: jspb.BinaryReader): Upgrade; +} + +export namespace Upgrade { + export type AsObject = { + fields?: UpgradeFields.AsObject, + timeout?: ibc_core_channel_v1_channel_pb.Timeout.AsObject, + nextSequenceSend: number, + } +} + +export class UpgradeFields extends jspb.Message { + getOrdering(): ibc_core_channel_v1_channel_pb.OrderMap[keyof ibc_core_channel_v1_channel_pb.OrderMap]; + setOrdering(value: ibc_core_channel_v1_channel_pb.OrderMap[keyof ibc_core_channel_v1_channel_pb.OrderMap]): void; + + clearConnectionHopsList(): void; + getConnectionHopsList(): Array; + setConnectionHopsList(value: Array): void; + addConnectionHops(value: string, index?: number): string; + + getVersion(): string; + setVersion(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpgradeFields.AsObject; + static toObject(includeInstance: boolean, msg: UpgradeFields): UpgradeFields.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpgradeFields, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpgradeFields; + static deserializeBinaryFromReader(message: UpgradeFields, reader: jspb.BinaryReader): UpgradeFields; +} + +export namespace UpgradeFields { + export type AsObject = { + ordering: ibc_core_channel_v1_channel_pb.OrderMap[keyof ibc_core_channel_v1_channel_pb.OrderMap], + connectionHopsList: Array, + version: string, + } +} + +export class ErrorReceipt extends jspb.Message { + getSequence(): number; + setSequence(value: number): void; + + getMessage(): string; + setMessage(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ErrorReceipt.AsObject; + static toObject(includeInstance: boolean, msg: ErrorReceipt): ErrorReceipt.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ErrorReceipt, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ErrorReceipt; + static deserializeBinaryFromReader(message: ErrorReceipt, reader: jspb.BinaryReader): ErrorReceipt; +} + +export namespace ErrorReceipt { + export type AsObject = { + sequence: number, + message: string, + } +} + diff --git a/codegen/ibc/core/channel/v1/upgrade_pb.js b/codegen/ibc/core/channel/v1/upgrade_pb.js new file mode 100644 index 0000000..8af3bb1 --- /dev/null +++ b/codegen/ibc/core/channel/v1/upgrade_pb.js @@ -0,0 +1,696 @@ +// source: ibc/core/channel/v1/upgrade.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +goog.exportSymbol('proto.ibc.core.channel.v1.ErrorReceipt', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.Upgrade', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.UpgradeFields', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.Upgrade = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.Upgrade, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Upgrade.displayName = 'proto.ibc.core.channel.v1.Upgrade'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.UpgradeFields = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.UpgradeFields.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.UpgradeFields, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.UpgradeFields.displayName = 'proto.ibc.core.channel.v1.UpgradeFields'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.channel.v1.ErrorReceipt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.ErrorReceipt, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.ErrorReceipt.displayName = 'proto.ibc.core.channel.v1.ErrorReceipt'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.Upgrade.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.Upgrade.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.Upgrade} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Upgrade.toObject = function(includeInstance, msg) { + var f, obj = { + fields: (f = msg.getFields()) && proto.ibc.core.channel.v1.UpgradeFields.toObject(includeInstance, f), + timeout: (f = msg.getTimeout()) && ibc_core_channel_v1_channel_pb.Timeout.toObject(includeInstance, f), + nextSequenceSend: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.Upgrade} + */ +proto.ibc.core.channel.v1.Upgrade.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Upgrade; + return proto.ibc.core.channel.v1.Upgrade.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.Upgrade} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Upgrade} + */ +proto.ibc.core.channel.v1.Upgrade.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ibc.core.channel.v1.UpgradeFields; + reader.readMessage(value,proto.ibc.core.channel.v1.UpgradeFields.deserializeBinaryFromReader); + msg.setFields(value); + break; + case 2: + var value = new ibc_core_channel_v1_channel_pb.Timeout; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Timeout.deserializeBinaryFromReader); + msg.setTimeout(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextSequenceSend(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.Upgrade.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.Upgrade.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.Upgrade} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Upgrade.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFields(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ibc.core.channel.v1.UpgradeFields.serializeBinaryToWriter + ); + } + f = message.getTimeout(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_channel_v1_channel_pb.Timeout.serializeBinaryToWriter + ); + } + f = message.getNextSequenceSend(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional UpgradeFields fields = 1; + * @return {?proto.ibc.core.channel.v1.UpgradeFields} + */ +proto.ibc.core.channel.v1.Upgrade.prototype.getFields = function() { + return /** @type{?proto.ibc.core.channel.v1.UpgradeFields} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.channel.v1.UpgradeFields, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.UpgradeFields|undefined} value + * @return {!proto.ibc.core.channel.v1.Upgrade} returns this +*/ +proto.ibc.core.channel.v1.Upgrade.prototype.setFields = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.Upgrade} returns this + */ +proto.ibc.core.channel.v1.Upgrade.prototype.clearFields = function() { + return this.setFields(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Upgrade.prototype.hasFields = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Timeout timeout = 2; + * @return {?proto.ibc.core.channel.v1.Timeout} + */ +proto.ibc.core.channel.v1.Upgrade.prototype.getTimeout = function() { + return /** @type{?proto.ibc.core.channel.v1.Timeout} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Timeout, 2)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Timeout|undefined} value + * @return {!proto.ibc.core.channel.v1.Upgrade} returns this +*/ +proto.ibc.core.channel.v1.Upgrade.prototype.setTimeout = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.Upgrade} returns this + */ +proto.ibc.core.channel.v1.Upgrade.prototype.clearTimeout = function() { + return this.setTimeout(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Upgrade.prototype.hasTimeout = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 next_sequence_send = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.Upgrade.prototype.getNextSequenceSend = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.Upgrade} returns this + */ +proto.ibc.core.channel.v1.Upgrade.prototype.setNextSequenceSend = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.UpgradeFields.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.UpgradeFields.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.UpgradeFields} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.UpgradeFields.toObject = function(includeInstance, msg) { + var f, obj = { + ordering: jspb.Message.getFieldWithDefault(msg, 1, 0), + connectionHopsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + version: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.UpgradeFields} + */ +proto.ibc.core.channel.v1.UpgradeFields.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.UpgradeFields; + return proto.ibc.core.channel.v1.UpgradeFields.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.UpgradeFields} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.UpgradeFields} + */ +proto.ibc.core.channel.v1.UpgradeFields.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ibc.core.channel.v1.Order} */ (reader.readEnum()); + msg.setOrdering(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addConnectionHops(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.UpgradeFields.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.UpgradeFields} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.UpgradeFields.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOrdering(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getConnectionHopsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Order ordering = 1; + * @return {!proto.ibc.core.channel.v1.Order} + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.getOrdering = function() { + return /** @type {!proto.ibc.core.channel.v1.Order} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.Order} value + * @return {!proto.ibc.core.channel.v1.UpgradeFields} returns this + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.setOrdering = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * repeated string connection_hops = 2; + * @return {!Array} + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.getConnectionHopsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.UpgradeFields} returns this + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.setConnectionHopsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.UpgradeFields} returns this + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.addConnectionHops = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.UpgradeFields} returns this + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.clearConnectionHopsList = function() { + return this.setConnectionHopsList([]); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.UpgradeFields} returns this + */ +proto.ibc.core.channel.v1.UpgradeFields.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.channel.v1.ErrorReceipt.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.ErrorReceipt.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.channel.v1.ErrorReceipt} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.ErrorReceipt.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.channel.v1.ErrorReceipt} + */ +proto.ibc.core.channel.v1.ErrorReceipt.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.ErrorReceipt; + return proto.ibc.core.channel.v1.ErrorReceipt.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.channel.v1.ErrorReceipt} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.ErrorReceipt} + */ +proto.ibc.core.channel.v1.ErrorReceipt.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.ErrorReceipt.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.ErrorReceipt.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.channel.v1.ErrorReceipt} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.ErrorReceipt.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.core.channel.v1.ErrorReceipt.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.ErrorReceipt} returns this + */ +proto.ibc.core.channel.v1.ErrorReceipt.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.ErrorReceipt.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.ErrorReceipt} returns this + */ +proto.ibc.core.channel.v1.ErrorReceipt.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/codegen/ibc/core/channel/v1/upgrade_pb_service.d.ts b/codegen/ibc/core/channel/v1/upgrade_pb_service.d.ts new file mode 100644 index 0000000..068ce35 --- /dev/null +++ b/codegen/ibc/core/channel/v1/upgrade_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.core.channel.v1 +// file: ibc/core/channel/v1/upgrade.proto + diff --git a/codegen/ibc/core/channel/v1/upgrade_pb_service.js b/codegen/ibc/core/channel/v1/upgrade_pb_service.js new file mode 100644 index 0000000..068ce35 --- /dev/null +++ b/codegen/ibc/core/channel/v1/upgrade_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.core.channel.v1 +// file: ibc/core/channel/v1/upgrade.proto + diff --git a/codegen/ibc/core/client/v1/client.ts b/codegen/ibc/core/client/v1/client.ts new file mode 100644 index 0000000..269a62b --- /dev/null +++ b/codegen/ibc/core/client/v1/client.ts @@ -0,0 +1,728 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/client/v1/client.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../cosmos/upgrade/v1beta1/upgrade"; +import * as dependency_2 from "./../../../../cosmos_proto/cosmos"; +import * as dependency_3 from "./../../../../gogoproto/gogo"; +import * as dependency_4 from "./../../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.core.client.v1 { + export class IdentifiedClientState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + client_state?: dependency_4.google.protobuf.Any; + }) { + 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; + } + if ("client_state" in data && data.client_state != undefined) { + this.client_state = data.client_state; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get client_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set client_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_client_state() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + client_id?: string; + client_state?: ReturnType; + }): IdentifiedClientState { + const message = new IdentifiedClientState({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.client_state != null) { + message.client_state = dependency_4.google.protobuf.Any.fromObject(data.client_state); + } + return message; + } + toObject() { + const data: { + client_id?: string; + client_state?: ReturnType; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.client_state != null) { + data.client_state = this.client_state.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.client_id.length) + writer.writeString(1, this.client_id); + if (this.has_client_state) + writer.writeMessage(2, this.client_state, () => this.client_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IdentifiedClientState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IdentifiedClientState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.client_state, () => message.client_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IdentifiedClientState { + return IdentifiedClientState.deserialize(bytes); + } + } + export class ConsensusStateWithHeight extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: Height; + consensus_state?: dependency_4.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("consensus_state" in data && data.consensus_state != undefined) { + this.consensus_state = data.consensus_state; + } + } + } + get height() { + return pb_1.Message.getWrapperField(this, Height, 1) as Height; + } + set height(value: Height) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_height() { + return pb_1.Message.getField(this, 1) != null; + } + get consensus_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set consensus_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_consensus_state() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + height?: ReturnType; + consensus_state?: ReturnType; + }): ConsensusStateWithHeight { + const message = new ConsensusStateWithHeight({}); + if (data.height != null) { + message.height = Height.fromObject(data.height); + } + if (data.consensus_state != null) { + message.consensus_state = dependency_4.google.protobuf.Any.fromObject(data.consensus_state); + } + return message; + } + toObject() { + const data: { + height?: ReturnType; + consensus_state?: ReturnType; + } = {}; + if (this.height != null) { + data.height = this.height.toObject(); + } + if (this.consensus_state != null) { + data.consensus_state = this.consensus_state.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_height) + writer.writeMessage(1, this.height, () => this.height.serialize(writer)); + if (this.has_consensus_state) + writer.writeMessage(2, this.consensus_state, () => this.consensus_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConsensusStateWithHeight { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConsensusStateWithHeight(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.height, () => message.height = Height.deserialize(reader)); + break; + case 2: + reader.readMessage(message.consensus_state, () => message.consensus_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConsensusStateWithHeight { + return ConsensusStateWithHeight.deserialize(bytes); + } + } + export class ClientConsensusStates extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + consensus_states?: ConsensusStateWithHeight[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], 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; + } + if ("consensus_states" in data && data.consensus_states != undefined) { + this.consensus_states = data.consensus_states; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get consensus_states() { + return pb_1.Message.getRepeatedWrapperField(this, ConsensusStateWithHeight, 2) as ConsensusStateWithHeight[]; + } + set consensus_states(value: ConsensusStateWithHeight[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + client_id?: string; + consensus_states?: ReturnType[]; + }): ClientConsensusStates { + const message = new ClientConsensusStates({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.consensus_states != null) { + message.consensus_states = data.consensus_states.map(item => ConsensusStateWithHeight.fromObject(item)); + } + return message; + } + toObject() { + const data: { + client_id?: string; + consensus_states?: ReturnType[]; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.consensus_states != null) { + data.consensus_states = this.consensus_states.map((item: ConsensusStateWithHeight) => item.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.client_id.length) + writer.writeString(1, this.client_id); + if (this.consensus_states.length) + writer.writeRepeatedMessage(2, this.consensus_states, (item: ConsensusStateWithHeight) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientConsensusStates { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientConsensusStates(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.consensus_states, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ConsensusStateWithHeight.deserialize(reader), ConsensusStateWithHeight)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientConsensusStates { + return ClientConsensusStates.deserialize(bytes); + } + } + export class Height extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + 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 ("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 revision_number() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set revision_number(value: number) { + pb_1.Message.setField(this, 1, value); + } + get revision_height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set revision_height(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + revision_number?: number; + revision_height?: number; + }): Height { + const message = new Height({}); + 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: { + revision_number?: number; + revision_height?: number; + } = {}; + 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.revision_number != 0) + writer.writeUint64(1, this.revision_number); + if (this.revision_height != 0) + writer.writeUint64(2, this.revision_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Height { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Height(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.revision_number = reader.readUint64(); + break; + case 2: + message.revision_height = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Height { + return Height.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + allowed_clients?: string[]; + }) { + 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 ("allowed_clients" in data && data.allowed_clients != undefined) { + this.allowed_clients = data.allowed_clients; + } + } + } + get allowed_clients() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set allowed_clients(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + allowed_clients?: string[]; + }): Params { + const message = new Params({}); + if (data.allowed_clients != null) { + message.allowed_clients = data.allowed_clients; + } + return message; + } + toObject() { + const data: { + allowed_clients?: string[]; + } = {}; + if (this.allowed_clients != null) { + data.allowed_clients = this.allowed_clients; + } + 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.allowed_clients.length) + writer.writeRepeatedString(1, this.allowed_clients); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } + /** @deprecated*/ + export class ClientUpdateProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + title?: string; + description?: string; + subject_client_id?: string; + substitute_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 ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("subject_client_id" in data && data.subject_client_id != undefined) { + this.subject_client_id = data.subject_client_id; + } + if ("substitute_client_id" in data && data.substitute_client_id != undefined) { + this.substitute_client_id = data.substitute_client_id; + } + } + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get subject_client_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set subject_client_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get substitute_client_id() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set substitute_client_id(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + title?: string; + description?: string; + subject_client_id?: string; + substitute_client_id?: string; + }): ClientUpdateProposal { + const message = new ClientUpdateProposal({}); + if (data.title != null) { + message.title = data.title; + } + if (data.description != null) { + message.description = data.description; + } + if (data.subject_client_id != null) { + message.subject_client_id = data.subject_client_id; + } + if (data.substitute_client_id != null) { + message.substitute_client_id = data.substitute_client_id; + } + return message; + } + toObject() { + const data: { + title?: string; + description?: string; + subject_client_id?: string; + substitute_client_id?: string; + } = {}; + if (this.title != null) { + data.title = this.title; + } + if (this.description != null) { + data.description = this.description; + } + if (this.subject_client_id != null) { + data.subject_client_id = this.subject_client_id; + } + if (this.substitute_client_id != null) { + data.substitute_client_id = this.substitute_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.title.length) + writer.writeString(1, this.title); + if (this.description.length) + writer.writeString(2, this.description); + if (this.subject_client_id.length) + writer.writeString(3, this.subject_client_id); + if (this.substitute_client_id.length) + writer.writeString(4, this.substitute_client_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientUpdateProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientUpdateProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.title = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + message.subject_client_id = reader.readString(); + break; + case 4: + message.substitute_client_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientUpdateProposal { + return ClientUpdateProposal.deserialize(bytes); + } + } + /** @deprecated*/ + export class UpgradeProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + title?: string; + description?: string; + plan?: dependency_1.cosmos.upgrade.v1beta1.Plan; + upgraded_client_state?: dependency_4.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("plan" in data && data.plan != undefined) { + this.plan = data.plan; + } + if ("upgraded_client_state" in data && data.upgraded_client_state != undefined) { + this.upgraded_client_state = data.upgraded_client_state; + } + } + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get plan() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.upgrade.v1beta1.Plan, 3) as dependency_1.cosmos.upgrade.v1beta1.Plan; + } + set plan(value: dependency_1.cosmos.upgrade.v1beta1.Plan) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_plan() { + return pb_1.Message.getField(this, 3) != null; + } + get upgraded_client_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 4) as dependency_4.google.protobuf.Any; + } + set upgraded_client_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_upgraded_client_state() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + title?: string; + description?: string; + plan?: ReturnType; + upgraded_client_state?: ReturnType; + }): UpgradeProposal { + const message = new UpgradeProposal({}); + if (data.title != null) { + message.title = data.title; + } + if (data.description != null) { + message.description = data.description; + } + if (data.plan != null) { + message.plan = dependency_1.cosmos.upgrade.v1beta1.Plan.fromObject(data.plan); + } + if (data.upgraded_client_state != null) { + message.upgraded_client_state = dependency_4.google.protobuf.Any.fromObject(data.upgraded_client_state); + } + return message; + } + toObject() { + const data: { + title?: string; + description?: string; + plan?: ReturnType; + upgraded_client_state?: ReturnType; + } = {}; + if (this.title != null) { + data.title = this.title; + } + if (this.description != null) { + data.description = this.description; + } + if (this.plan != null) { + data.plan = this.plan.toObject(); + } + if (this.upgraded_client_state != null) { + data.upgraded_client_state = this.upgraded_client_state.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.title.length) + writer.writeString(1, this.title); + if (this.description.length) + writer.writeString(2, this.description); + if (this.has_plan) + writer.writeMessage(3, this.plan, () => this.plan.serialize(writer)); + if (this.has_upgraded_client_state) + writer.writeMessage(4, this.upgraded_client_state, () => this.upgraded_client_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpgradeProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpgradeProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.title = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + reader.readMessage(message.plan, () => message.plan = dependency_1.cosmos.upgrade.v1beta1.Plan.deserialize(reader)); + break; + case 4: + reader.readMessage(message.upgraded_client_state, () => message.upgraded_client_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpgradeProposal { + return UpgradeProposal.deserialize(bytes); + } + } +} diff --git a/proto/ibc/core/client/v1/client_pb.d.ts b/codegen/ibc/core/client/v1/client_pb.d.ts similarity index 99% rename from proto/ibc/core/client/v1/client_pb.d.ts rename to codegen/ibc/core/client/v1/client_pb.d.ts index 3be3967..6398136 100644 --- a/proto/ibc/core/client/v1/client_pb.d.ts +++ b/codegen/ibc/core/client/v1/client_pb.d.ts @@ -2,9 +2,10 @@ // file: ibc/core/client/v1/client.proto import * as jspb from "google-protobuf"; +import * as cosmos_upgrade_v1beta1_upgrade_pb from "../../../../cosmos/upgrade/v1beta1/upgrade_pb"; +import * as cosmos_proto_cosmos_pb from "../../../../cosmos_proto/cosmos_pb"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; -import * as cosmos_upgrade_v1beta1_upgrade_pb from "../../../../cosmos/upgrade/v1beta1/upgrade_pb"; export class IdentifiedClientState extends jspb.Message { getClientId(): string; @@ -86,6 +87,52 @@ export namespace ClientConsensusStates { } } +export class Height extends jspb.Message { + getRevisionNumber(): number; + setRevisionNumber(value: number): void; + + getRevisionHeight(): number; + setRevisionHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Height.AsObject; + static toObject(includeInstance: boolean, msg: Height): Height.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Height, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Height; + static deserializeBinaryFromReader(message: Height, reader: jspb.BinaryReader): Height; +} + +export namespace Height { + export type AsObject = { + revisionNumber: number, + revisionHeight: number, + } +} + +export class Params extends jspb.Message { + clearAllowedClientsList(): void; + getAllowedClientsList(): Array; + setAllowedClientsList(value: Array): void; + addAllowedClients(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Params.AsObject; + static toObject(includeInstance: boolean, msg: Params): Params.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Params; + static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; +} + +export namespace Params { + export type AsObject = { + allowedClientsList: Array, + } +} + export class ClientUpdateProposal extends jspb.Message { getTitle(): string; setTitle(value: string): void; @@ -154,49 +201,3 @@ export namespace UpgradeProposal { } } -export class Height extends jspb.Message { - getRevisionNumber(): number; - setRevisionNumber(value: number): void; - - getRevisionHeight(): number; - setRevisionHeight(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Height.AsObject; - static toObject(includeInstance: boolean, msg: Height): Height.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Height, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Height; - static deserializeBinaryFromReader(message: Height, reader: jspb.BinaryReader): Height; -} - -export namespace Height { - export type AsObject = { - revisionNumber: number, - revisionHeight: number, - } -} - -export class Params extends jspb.Message { - clearAllowedClientsList(): void; - getAllowedClientsList(): Array; - setAllowedClientsList(value: Array): void; - addAllowedClients(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Params.AsObject; - static toObject(includeInstance: boolean, msg: Params): Params.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Params; - static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; -} - -export namespace Params { - export type AsObject = { - allowedClientsList: Array, - } -} - diff --git a/proto/ibc/core/client/v1/client_pb.js b/codegen/ibc/core/client/v1/client_pb.js similarity index 99% rename from proto/ibc/core/client/v1/client_pb.js rename to codegen/ibc/core/client/v1/client_pb.js index 1f3296c..72b90fc 100644 --- a/proto/ibc/core/client/v1/client_pb.js +++ b/codegen/ibc/core/client/v1/client_pb.js @@ -13,14 +13,16 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var cosmos_upgrade_v1beta1_upgrade_pb = require('../../../../cosmos/upgrade/v1beta1/upgrade_pb.js'); +goog.object.extend(proto, cosmos_upgrade_v1beta1_upgrade_pb); +var cosmos_proto_cosmos_pb = require('../../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); -var cosmos_upgrade_v1beta1_upgrade_pb = require('../../../../cosmos/upgrade/v1beta1/upgrade_pb.js'); -goog.object.extend(proto, cosmos_upgrade_v1beta1_upgrade_pb); goog.exportSymbol('proto.ibc.core.client.v1.ClientConsensusStates', null, global); goog.exportSymbol('proto.ibc.core.client.v1.ClientUpdateProposal', null, global); goog.exportSymbol('proto.ibc.core.client.v1.ConsensusStateWithHeight', null, global); @@ -101,16 +103,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ibc.core.client.v1.ClientUpdateProposal = function(opt_data) { +proto.ibc.core.client.v1.Height = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ibc.core.client.v1.ClientUpdateProposal, jspb.Message); +goog.inherits(proto.ibc.core.client.v1.Height, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ibc.core.client.v1.ClientUpdateProposal.displayName = 'proto.ibc.core.client.v1.ClientUpdateProposal'; + proto.ibc.core.client.v1.Height.displayName = 'proto.ibc.core.client.v1.Height'; } /** * Generated by JsPbCodeGenerator. @@ -122,16 +124,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ibc.core.client.v1.UpgradeProposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.ibc.core.client.v1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.Params.repeatedFields_, null); }; -goog.inherits(proto.ibc.core.client.v1.UpgradeProposal, jspb.Message); +goog.inherits(proto.ibc.core.client.v1.Params, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ibc.core.client.v1.UpgradeProposal.displayName = 'proto.ibc.core.client.v1.UpgradeProposal'; + proto.ibc.core.client.v1.Params.displayName = 'proto.ibc.core.client.v1.Params'; } /** * Generated by JsPbCodeGenerator. @@ -143,16 +145,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ibc.core.client.v1.Height = function(opt_data) { +proto.ibc.core.client.v1.ClientUpdateProposal = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ibc.core.client.v1.Height, jspb.Message); +goog.inherits(proto.ibc.core.client.v1.ClientUpdateProposal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ibc.core.client.v1.Height.displayName = 'proto.ibc.core.client.v1.Height'; + proto.ibc.core.client.v1.ClientUpdateProposal.displayName = 'proto.ibc.core.client.v1.ClientUpdateProposal'; } /** * Generated by JsPbCodeGenerator. @@ -164,16 +166,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ibc.core.client.v1.Params = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.Params.repeatedFields_, null); +proto.ibc.core.client.v1.UpgradeProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ibc.core.client.v1.Params, jspb.Message); +goog.inherits(proto.ibc.core.client.v1.UpgradeProposal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ibc.core.client.v1.Params.displayName = 'proto.ibc.core.client.v1.Params'; + proto.ibc.core.client.v1.UpgradeProposal.displayName = 'proto.ibc.core.client.v1.UpgradeProposal'; } @@ -764,8 +766,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.ClientUpdateProposal.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.Height.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.Height.toObject(opt_includeInstance, this); }; @@ -774,16 +776,14 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.ClientUpdateProposal} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.Height} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.ClientUpdateProposal.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.Height.toObject = function(includeInstance, msg) { var f, obj = { - title: jspb.Message.getFieldWithDefault(msg, 1, ""), - description: jspb.Message.getFieldWithDefault(msg, 2, ""), - subjectClientId: jspb.Message.getFieldWithDefault(msg, 3, ""), - substituteClientId: jspb.Message.getFieldWithDefault(msg, 4, "") + revisionNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), + revisionHeight: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -797,23 +797,23 @@ proto.ibc.core.client.v1.ClientUpdateProposal.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} + * @return {!proto.ibc.core.client.v1.Height} */ -proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.Height.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.ClientUpdateProposal; - return proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.Height; + return proto.ibc.core.client.v1.Height.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.ClientUpdateProposal} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.Height} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} + * @return {!proto.ibc.core.client.v1.Height} */ -proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.Height.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -821,20 +821,12 @@ proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTitle(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionNumber(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDescription(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSubjectClientId(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSubstituteClientId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionHeight(value); break; default: reader.skipField(); @@ -849,9 +841,9 @@ proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.Height.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.ClientUpdateProposal.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.Height.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -859,115 +851,72 @@ proto.ibc.core.client.v1.ClientUpdateProposal.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.ClientUpdateProposal} message + * @param {!proto.ibc.core.client.v1.Height} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.ClientUpdateProposal.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.Height.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTitle(); - if (f.length > 0) { - writer.writeString( + f = message.getRevisionNumber(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getDescription(); - if (f.length > 0) { - writer.writeString( + f = message.getRevisionHeight(); + if (f !== 0) { + writer.writeUint64( 2, f ); } - f = message.getSubjectClientId(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSubstituteClientId(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional string title = 1; - * @return {string} - */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getTitle = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this - */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setTitle = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string description = 2; - * @return {string} + * optional uint64 revision_number = 1; + * @return {number} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.ibc.core.client.v1.Height.prototype.getRevisionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + * @param {number} value + * @return {!proto.ibc.core.client.v1.Height} returns this */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.ibc.core.client.v1.Height.prototype.setRevisionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional string subject_client_id = 3; - * @return {string} + * optional uint64 revision_height = 2; + * @return {number} */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubjectClientId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.ibc.core.client.v1.Height.prototype.getRevisionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {string} value - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + * @param {number} value + * @return {!proto.ibc.core.client.v1.Height} returns this */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubjectClientId = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.ibc.core.client.v1.Height.prototype.setRevisionHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * optional string substitute_client_id = 4; - * @return {string} - */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubstituteClientId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - /** - * @param {string} value - * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubstituteClientId = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - +proto.ibc.core.client.v1.Params.repeatedFields_ = [1]; @@ -984,8 +933,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.UpgradeProposal.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.Params.toObject(opt_includeInstance, this); }; @@ -994,16 +943,13 @@ proto.ibc.core.client.v1.UpgradeProposal.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.UpgradeProposal} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.Params} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.UpgradeProposal.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.Params.toObject = function(includeInstance, msg) { var f, obj = { - title: jspb.Message.getFieldWithDefault(msg, 1, ""), - description: jspb.Message.getFieldWithDefault(msg, 2, ""), - plan: (f = msg.getPlan()) && cosmos_upgrade_v1beta1_upgrade_pb.Plan.toObject(includeInstance, f), - upgradedClientState: (f = msg.getUpgradedClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) + allowedClientsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -1017,23 +963,23 @@ proto.ibc.core.client.v1.UpgradeProposal.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.UpgradeProposal} + * @return {!proto.ibc.core.client.v1.Params} */ -proto.ibc.core.client.v1.UpgradeProposal.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.Params.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.UpgradeProposal; - return proto.ibc.core.client.v1.UpgradeProposal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.Params; + return proto.ibc.core.client.v1.Params.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.UpgradeProposal} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.Params} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.UpgradeProposal} + * @return {!proto.ibc.core.client.v1.Params} */ -proto.ibc.core.client.v1.UpgradeProposal.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.Params.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1042,21 +988,7 @@ proto.ibc.core.client.v1.UpgradeProposal.deserializeBinaryFromReader = function( switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setTitle(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDescription(value); - break; - case 3: - var value = new cosmos_upgrade_v1beta1_upgrade_pb.Plan; - reader.readMessage(value,cosmos_upgrade_v1beta1_upgrade_pb.Plan.deserializeBinaryFromReader); - msg.setPlan(value); - break; - case 4: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setUpgradedClientState(value); + msg.addAllowedClients(value); break; default: reader.skipField(); @@ -1071,9 +1003,9 @@ proto.ibc.core.client.v1.UpgradeProposal.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.Params.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.UpgradeProposal.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.Params.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1081,152 +1013,56 @@ proto.ibc.core.client.v1.UpgradeProposal.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.UpgradeProposal} message + * @param {!proto.ibc.core.client.v1.Params} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.UpgradeProposal.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.Params.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTitle(); + f = message.getAllowedClientsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedString( 1, f ); } - f = message.getDescription(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPlan(); - if (f != null) { - writer.writeMessage( - 3, - f, - cosmos_upgrade_v1beta1_upgrade_pb.Plan.serializeBinaryToWriter - ); - } - f = message.getUpgradedClientState(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string title = 1; - * @return {string} - */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.getTitle = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {string} value - * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + * repeated string allowed_clients = 1; + * @return {!Array} */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.setTitle = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.ibc.core.client.v1.Params.prototype.getAllowedClientsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * optional string description = 2; - * @return {string} + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.Params} returns this */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.ibc.core.client.v1.Params.prototype.setAllowedClientsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value - * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this - */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional cosmos.upgrade.v1beta1.Plan plan = 3; - * @return {?proto.cosmos.upgrade.v1beta1.Plan} - */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.getPlan = function() { - return /** @type{?proto.cosmos.upgrade.v1beta1.Plan} */ ( - jspb.Message.getWrapperField(this, cosmos_upgrade_v1beta1_upgrade_pb.Plan, 3)); -}; - - -/** - * @param {?proto.cosmos.upgrade.v1beta1.Plan|undefined} value - * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this -*/ -proto.ibc.core.client.v1.UpgradeProposal.prototype.setPlan = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this - */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.clearPlan = function() { - return this.setPlan(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.hasPlan = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional google.protobuf.Any upgraded_client_state = 4; - * @return {?proto.google.protobuf.Any} - */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.getUpgradedClientState = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this -*/ -proto.ibc.core.client.v1.UpgradeProposal.prototype.setUpgradedClientState = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.Params} returns this */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.clearUpgradedClientState = function() { - return this.setUpgradedClientState(undefined); +proto.ibc.core.client.v1.Params.prototype.addAllowedClients = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.Params} returns this */ -proto.ibc.core.client.v1.UpgradeProposal.prototype.hasUpgradedClientState = function() { - return jspb.Message.getField(this, 4) != null; +proto.ibc.core.client.v1.Params.prototype.clearAllowedClientsList = function() { + return this.setAllowedClientsList([]); }; @@ -1246,8 +1082,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.Height.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.Height.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.ClientUpdateProposal.toObject(opt_includeInstance, this); }; @@ -1256,14 +1092,16 @@ proto.ibc.core.client.v1.Height.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.Height} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.ClientUpdateProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.Height.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.ClientUpdateProposal.toObject = function(includeInstance, msg) { var f, obj = { - revisionNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), - revisionHeight: jspb.Message.getFieldWithDefault(msg, 2, 0) + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + subjectClientId: jspb.Message.getFieldWithDefault(msg, 3, ""), + substituteClientId: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -1277,23 +1115,23 @@ proto.ibc.core.client.v1.Height.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.Height} + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} */ -proto.ibc.core.client.v1.Height.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.Height; - return proto.ibc.core.client.v1.Height.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.ClientUpdateProposal; + return proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.Height} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.ClientUpdateProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.Height} + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} */ -proto.ibc.core.client.v1.Height.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.ClientUpdateProposal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1301,12 +1139,20 @@ proto.ibc.core.client.v1.Height.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRevisionNumber(value); + var value = /** @type {string} */ (reader.readString()); + msg.setTitle(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRevisionHeight(value); + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSubjectClientId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSubstituteClientId(value); break; default: reader.skipField(); @@ -1321,9 +1167,9 @@ proto.ibc.core.client.v1.Height.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.Height.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.Height.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.ClientUpdateProposal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1331,72 +1177,115 @@ proto.ibc.core.client.v1.Height.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.Height} message + * @param {!proto.ibc.core.client.v1.ClientUpdateProposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.Height.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.ClientUpdateProposal.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRevisionNumber(); - if (f !== 0) { - writer.writeUint64( + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getRevisionHeight(); - if (f !== 0) { - writer.writeUint64( + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( 2, f ); } + f = message.getSubjectClientId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSubstituteClientId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } }; /** - * optional uint64 revision_number = 1; - * @return {number} + * optional string title = 1; + * @return {string} */ -proto.ibc.core.client.v1.Height.prototype.getRevisionNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.ibc.core.client.v1.Height} returns this + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this */ -proto.ibc.core.client.v1.Height.prototype.setRevisionNumber = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional uint64 revision_height = 2; - * @return {number} + * optional string description = 2; + * @return {string} */ -proto.ibc.core.client.v1.Height.prototype.getRevisionHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.ibc.core.client.v1.Height} returns this + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this */ -proto.ibc.core.client.v1.Height.prototype.setRevisionHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string subject_client_id = 3; + * @return {string} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubjectClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubjectClientId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional string substitute_client_id = 4; + * @return {string} */ -proto.ibc.core.client.v1.Params.repeatedFields_ = [1]; +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getSubstituteClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setSubstituteClientId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + @@ -1413,8 +1302,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.Params.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.Params.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.UpgradeProposal.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.UpgradeProposal.toObject(opt_includeInstance, this); }; @@ -1423,13 +1312,16 @@ proto.ibc.core.client.v1.Params.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.Params} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.UpgradeProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.Params.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.UpgradeProposal.toObject = function(includeInstance, msg) { var f, obj = { - allowedClientsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + plan: (f = msg.getPlan()) && cosmos_upgrade_v1beta1_upgrade_pb.Plan.toObject(includeInstance, f), + upgradedClientState: (f = msg.getUpgradedClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) }; if (includeInstance) { @@ -1443,23 +1335,23 @@ proto.ibc.core.client.v1.Params.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.Params} + * @return {!proto.ibc.core.client.v1.UpgradeProposal} */ -proto.ibc.core.client.v1.Params.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.UpgradeProposal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.Params; - return proto.ibc.core.client.v1.Params.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.UpgradeProposal; + return proto.ibc.core.client.v1.UpgradeProposal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.Params} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.UpgradeProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.Params} + * @return {!proto.ibc.core.client.v1.UpgradeProposal} */ -proto.ibc.core.client.v1.Params.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.UpgradeProposal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1468,7 +1360,21 @@ proto.ibc.core.client.v1.Params.deserializeBinaryFromReader = function(msg, read switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.addAllowedClients(value); + msg.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new cosmos_upgrade_v1beta1_upgrade_pb.Plan; + reader.readMessage(value,cosmos_upgrade_v1beta1_upgrade_pb.Plan.deserializeBinaryFromReader); + msg.setPlan(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setUpgradedClientState(value); break; default: reader.skipField(); @@ -1483,9 +1389,9 @@ proto.ibc.core.client.v1.Params.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.Params.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.UpgradeProposal.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.Params.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.UpgradeProposal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1493,56 +1399,152 @@ proto.ibc.core.client.v1.Params.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.Params} message + * @param {!proto.ibc.core.client.v1.UpgradeProposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.Params.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.UpgradeProposal.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAllowedClientsList(); + f = message.getTitle(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeString( 1, f ); } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPlan(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_upgrade_v1beta1_upgrade_pb.Plan.serializeBinaryToWriter + ); + } + f = message.getUpgradedClientState(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } }; /** - * repeated string allowed_clients = 1; - * @return {!Array} + * optional string title = 1; + * @return {string} */ -proto.ibc.core.client.v1.Params.prototype.getAllowedClientsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.ibc.core.client.v1.UpgradeProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.ibc.core.client.v1.Params} returns this + * @param {string} value + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ -proto.ibc.core.client.v1.Params.prototype.setAllowedClientsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.ibc.core.client.v1.UpgradeProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @param {number=} opt_index - * @return {!proto.ibc.core.client.v1.Params} returns this + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this */ -proto.ibc.core.client.v1.Params.prototype.addAllowedClients = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.ibc.core.client.v1.UpgradeProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.ibc.core.client.v1.Params} returns this + * optional cosmos.upgrade.v1beta1.Plan plan = 3; + * @return {?proto.cosmos.upgrade.v1beta1.Plan} */ -proto.ibc.core.client.v1.Params.prototype.clearAllowedClientsList = function() { - return this.setAllowedClientsList([]); +proto.ibc.core.client.v1.UpgradeProposal.prototype.getPlan = function() { + return /** @type{?proto.cosmos.upgrade.v1beta1.Plan} */ ( + jspb.Message.getWrapperField(this, cosmos_upgrade_v1beta1_upgrade_pb.Plan, 3)); +}; + + +/** + * @param {?proto.cosmos.upgrade.v1beta1.Plan|undefined} value + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this +*/ +proto.ibc.core.client.v1.UpgradeProposal.prototype.setPlan = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.clearPlan = function() { + return this.setPlan(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.hasPlan = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Any upgraded_client_state = 4; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.getUpgradedClientState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this +*/ +proto.ibc.core.client.v1.UpgradeProposal.prototype.setUpgradedClientState = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.UpgradeProposal} returns this + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.clearUpgradedClientState = function() { + return this.setUpgradedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.UpgradeProposal.prototype.hasUpgradedClientState = function() { + return jspb.Message.getField(this, 4) != null; }; diff --git a/proto/ibc/core/client/v1/client_pb_service.d.ts b/codegen/ibc/core/client/v1/client_pb_service.d.ts similarity index 100% rename from proto/ibc/core/client/v1/client_pb_service.d.ts rename to codegen/ibc/core/client/v1/client_pb_service.d.ts diff --git a/proto/ibc/core/client/v1/client_pb_service.js b/codegen/ibc/core/client/v1/client_pb_service.js similarity index 100% rename from proto/ibc/core/client/v1/client_pb_service.js rename to codegen/ibc/core/client/v1/client_pb_service.js diff --git a/codegen/ibc/core/client/v1/genesis.ts b/codegen/ibc/core/client/v1/genesis.ts new file mode 100644 index 0000000..dcf2cef --- /dev/null +++ b/codegen/ibc/core/client/v1/genesis.ts @@ -0,0 +1,378 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/client/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./client"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.core.client.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + clients?: dependency_1.ibc.core.client.v1.IdentifiedClientState[]; + clients_consensus?: dependency_1.ibc.core.client.v1.ClientConsensusStates[]; + clients_metadata?: IdentifiedGenesisMetadata[]; + params?: dependency_1.ibc.core.client.v1.Params; + /** @deprecated*/ + create_localhost?: boolean; + next_client_sequence?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("clients" in data && data.clients != undefined) { + this.clients = data.clients; + } + if ("clients_consensus" in data && data.clients_consensus != undefined) { + this.clients_consensus = data.clients_consensus; + } + if ("clients_metadata" in data && data.clients_metadata != undefined) { + this.clients_metadata = data.clients_metadata; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + if ("create_localhost" in data && data.create_localhost != undefined) { + this.create_localhost = data.create_localhost; + } + if ("next_client_sequence" in data && data.next_client_sequence != undefined) { + this.next_client_sequence = data.next_client_sequence; + } + } + } + get clients() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.ibc.core.client.v1.IdentifiedClientState, 1) as dependency_1.ibc.core.client.v1.IdentifiedClientState[]; + } + set clients(value: dependency_1.ibc.core.client.v1.IdentifiedClientState[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get clients_consensus() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.ibc.core.client.v1.ClientConsensusStates, 2) as dependency_1.ibc.core.client.v1.ClientConsensusStates[]; + } + set clients_consensus(value: dependency_1.ibc.core.client.v1.ClientConsensusStates[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get clients_metadata() { + return pb_1.Message.getRepeatedWrapperField(this, IdentifiedGenesisMetadata, 3) as IdentifiedGenesisMetadata[]; + } + set clients_metadata(value: IdentifiedGenesisMetadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_1.ibc.core.client.v1.Params, 4) as dependency_1.ibc.core.client.v1.Params; + } + set params(value: dependency_1.ibc.core.client.v1.Params) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_params() { + return pb_1.Message.getField(this, 4) != null; + } + /** @deprecated*/ + get create_localhost() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + /** @deprecated*/ + set create_localhost(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + get next_client_sequence() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set next_client_sequence(value: number) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + clients?: ReturnType[]; + clients_consensus?: ReturnType[]; + clients_metadata?: ReturnType[]; + params?: ReturnType; + create_localhost?: boolean; + next_client_sequence?: number; + }): GenesisState { + const message = new GenesisState({}); + if (data.clients != null) { + message.clients = data.clients.map(item => dependency_1.ibc.core.client.v1.IdentifiedClientState.fromObject(item)); + } + if (data.clients_consensus != null) { + message.clients_consensus = data.clients_consensus.map(item => dependency_1.ibc.core.client.v1.ClientConsensusStates.fromObject(item)); + } + if (data.clients_metadata != null) { + message.clients_metadata = data.clients_metadata.map(item => IdentifiedGenesisMetadata.fromObject(item)); + } + if (data.params != null) { + message.params = dependency_1.ibc.core.client.v1.Params.fromObject(data.params); + } + if (data.create_localhost != null) { + message.create_localhost = data.create_localhost; + } + if (data.next_client_sequence != null) { + message.next_client_sequence = data.next_client_sequence; + } + return message; + } + toObject() { + const data: { + clients?: ReturnType[]; + clients_consensus?: ReturnType[]; + clients_metadata?: ReturnType[]; + params?: ReturnType; + create_localhost?: boolean; + next_client_sequence?: number; + } = {}; + if (this.clients != null) { + data.clients = this.clients.map((item: dependency_1.ibc.core.client.v1.IdentifiedClientState) => item.toObject()); + } + if (this.clients_consensus != null) { + data.clients_consensus = this.clients_consensus.map((item: dependency_1.ibc.core.client.v1.ClientConsensusStates) => item.toObject()); + } + if (this.clients_metadata != null) { + data.clients_metadata = this.clients_metadata.map((item: IdentifiedGenesisMetadata) => item.toObject()); + } + if (this.params != null) { + data.params = this.params.toObject(); + } + if (this.create_localhost != null) { + data.create_localhost = this.create_localhost; + } + if (this.next_client_sequence != null) { + data.next_client_sequence = this.next_client_sequence; + } + 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.clients.length) + writer.writeRepeatedMessage(1, this.clients, (item: dependency_1.ibc.core.client.v1.IdentifiedClientState) => item.serialize(writer)); + if (this.clients_consensus.length) + writer.writeRepeatedMessage(2, this.clients_consensus, (item: dependency_1.ibc.core.client.v1.ClientConsensusStates) => item.serialize(writer)); + if (this.clients_metadata.length) + writer.writeRepeatedMessage(3, this.clients_metadata, (item: IdentifiedGenesisMetadata) => item.serialize(writer)); + if (this.has_params) + writer.writeMessage(4, this.params, () => this.params.serialize(writer)); + if (this.create_localhost != false) + writer.writeBool(5, this.create_localhost); + if (this.next_client_sequence != 0) + writer.writeUint64(6, this.next_client_sequence); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.clients, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.ibc.core.client.v1.IdentifiedClientState.deserialize(reader), dependency_1.ibc.core.client.v1.IdentifiedClientState)); + break; + case 2: + reader.readMessage(message.clients_consensus, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.ibc.core.client.v1.ClientConsensusStates.deserialize(reader), dependency_1.ibc.core.client.v1.ClientConsensusStates)); + break; + case 3: + reader.readMessage(message.clients_metadata, () => pb_1.Message.addToRepeatedWrapperField(message, 3, IdentifiedGenesisMetadata.deserialize(reader), IdentifiedGenesisMetadata)); + break; + case 4: + reader.readMessage(message.params, () => message.params = dependency_1.ibc.core.client.v1.Params.deserialize(reader)); + break; + case 5: + message.create_localhost = reader.readBool(); + break; + case 6: + message.next_client_sequence = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class GenesisMetadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + value?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + key?: Uint8Array; + value?: Uint8Array; + }): GenesisMetadata { + const message = new GenesisMetadata({}); + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + value?: Uint8Array; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + 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.key.length) + writer.writeBytes(1, this.key); + if (this.value.length) + writer.writeBytes(2, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisMetadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisMetadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + case 2: + message.value = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisMetadata { + return GenesisMetadata.deserialize(bytes); + } + } + export class IdentifiedGenesisMetadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + client_metadata?: GenesisMetadata[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], 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; + } + if ("client_metadata" in data && data.client_metadata != undefined) { + this.client_metadata = data.client_metadata; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get client_metadata() { + return pb_1.Message.getRepeatedWrapperField(this, GenesisMetadata, 2) as GenesisMetadata[]; + } + set client_metadata(value: GenesisMetadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + client_id?: string; + client_metadata?: ReturnType[]; + }): IdentifiedGenesisMetadata { + const message = new IdentifiedGenesisMetadata({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.client_metadata != null) { + message.client_metadata = data.client_metadata.map(item => GenesisMetadata.fromObject(item)); + } + return message; + } + toObject() { + const data: { + client_id?: string; + client_metadata?: ReturnType[]; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.client_metadata != null) { + data.client_metadata = this.client_metadata.map((item: GenesisMetadata) => item.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.client_id.length) + writer.writeString(1, this.client_id); + if (this.client_metadata.length) + writer.writeRepeatedMessage(2, this.client_metadata, (item: GenesisMetadata) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IdentifiedGenesisMetadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IdentifiedGenesisMetadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.client_metadata, () => pb_1.Message.addToRepeatedWrapperField(message, 2, GenesisMetadata.deserialize(reader), GenesisMetadata)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IdentifiedGenesisMetadata { + return IdentifiedGenesisMetadata.deserialize(bytes); + } + } +} diff --git a/proto/ibc/core/client/v1/genesis_pb.d.ts b/codegen/ibc/core/client/v1/genesis_pb.d.ts similarity index 100% rename from proto/ibc/core/client/v1/genesis_pb.d.ts rename to codegen/ibc/core/client/v1/genesis_pb.d.ts diff --git a/proto/ibc/core/client/v1/genesis_pb.js b/codegen/ibc/core/client/v1/genesis_pb.js similarity index 99% rename from proto/ibc/core/client/v1/genesis_pb.js rename to codegen/ibc/core/client/v1/genesis_pb.js index 4a15c1a..7ea89ad 100644 --- a/proto/ibc/core/client/v1/genesis_pb.js +++ b/codegen/ibc/core/client/v1/genesis_pb.js @@ -13,7 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); goog.object.extend(proto, ibc_core_client_v1_client_pb); diff --git a/proto/ibc/core/client/v1/genesis_pb_service.d.ts b/codegen/ibc/core/client/v1/genesis_pb_service.d.ts similarity index 100% rename from proto/ibc/core/client/v1/genesis_pb_service.d.ts rename to codegen/ibc/core/client/v1/genesis_pb_service.d.ts diff --git a/proto/ibc/core/client/v1/genesis_pb_service.js b/codegen/ibc/core/client/v1/genesis_pb_service.js similarity index 100% rename from proto/ibc/core/client/v1/genesis_pb_service.js rename to codegen/ibc/core/client/v1/genesis_pb_service.js diff --git a/codegen/ibc/core/client/v1/query.ts b/codegen/ibc/core/client/v1/query.ts new file mode 100644 index 0000000..4221dda --- /dev/null +++ b/codegen/ibc/core/client/v1/query.ts @@ -0,0 +1,1898 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/client/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../cosmos/base/query/v1beta1/pagination"; +import * as dependency_2 from "./../../../../cosmos/query/v1/query"; +import * as dependency_3 from "./client"; +import * as dependency_4 from "./../../commitment/v1/commitment"; +import * as dependency_5 from "./../../../../google/protobuf/any"; +import * as dependency_6 from "./../../../../google/api/annotations"; +import * as dependency_7 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.core.client.v1 { + export class QueryClientStateRequest 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; + }): QueryClientStateRequest { + const message = new QueryClientStateRequest({}); + 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): QueryClientStateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientStateRequest(); + 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): QueryClientStateRequest { + return QueryClientStateRequest.deserialize(bytes); + } + } + export class QueryClientStateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_state?: dependency_5.google.protobuf.Any; + 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 ("client_state" in data && data.client_state != undefined) { + this.client_state = data.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 client_state() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 1) as dependency_5.google.protobuf.Any; + } + set client_state(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_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: { + client_state?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryClientStateResponse { + const message = new QueryClientStateResponse({}); + if (data.client_state != null) { + message.client_state = dependency_5.google.protobuf.Any.fromObject(data.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: { + client_state?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.client_state != null) { + data.client_state = this.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_client_state) + writer.writeMessage(1, this.client_state, () => this.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): QueryClientStateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientStateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.client_state, () => message.client_state = dependency_5.google.protobuf.Any.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): QueryClientStateResponse { + return QueryClientStateResponse.deserialize(bytes); + } + } + export class QueryClientStatesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pagination?: dependency_1.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_1.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.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; + }): QueryClientStatesRequest { + const message = new QueryClientStatesRequest({}); + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryClientStatesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientStatesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryClientStatesRequest { + return QueryClientStatesRequest.deserialize(bytes); + } + } + export class QueryClientStatesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_states?: dependency_3.ibc.core.client.v1.IdentifiedClientState[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("client_states" in data && data.client_states != undefined) { + this.client_states = data.client_states; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get client_states() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.ibc.core.client.v1.IdentifiedClientState, 1) as dependency_3.ibc.core.client.v1.IdentifiedClientState[]; + } + set client_states(value: dependency_3.ibc.core.client.v1.IdentifiedClientState[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + client_states?: ReturnType[]; + pagination?: ReturnType; + }): QueryClientStatesResponse { + const message = new QueryClientStatesResponse({}); + if (data.client_states != null) { + message.client_states = data.client_states.map(item => dependency_3.ibc.core.client.v1.IdentifiedClientState.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + client_states?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.client_states != null) { + data.client_states = this.client_states.map((item: dependency_3.ibc.core.client.v1.IdentifiedClientState) => item.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.client_states.length) + writer.writeRepeatedMessage(1, this.client_states, (item: dependency_3.ibc.core.client.v1.IdentifiedClientState) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryClientStatesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientStatesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.client_states, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.ibc.core.client.v1.IdentifiedClientState.deserialize(reader), dependency_3.ibc.core.client.v1.IdentifiedClientState)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryClientStatesResponse { + return QueryClientStatesResponse.deserialize(bytes); + } + } + export class QueryConsensusStateRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + revision_number?: number; + revision_height?: number; + latest_height?: boolean; + }) { + 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; + } + 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; + } + if ("latest_height" in data && data.latest_height != undefined) { + this.latest_height = data.latest_height; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_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); + } + get latest_height() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set latest_height(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + client_id?: string; + revision_number?: number; + revision_height?: number; + latest_height?: boolean; + }): QueryConsensusStateRequest { + const message = new QueryConsensusStateRequest({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.revision_number != null) { + message.revision_number = data.revision_number; + } + if (data.revision_height != null) { + message.revision_height = data.revision_height; + } + if (data.latest_height != null) { + message.latest_height = data.latest_height; + } + return message; + } + toObject() { + const data: { + client_id?: string; + revision_number?: number; + revision_height?: number; + latest_height?: boolean; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.revision_number != null) { + data.revision_number = this.revision_number; + } + if (this.revision_height != null) { + data.revision_height = this.revision_height; + } + if (this.latest_height != null) { + data.latest_height = this.latest_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.client_id.length) + writer.writeString(1, this.client_id); + if (this.revision_number != 0) + writer.writeUint64(2, this.revision_number); + if (this.revision_height != 0) + writer.writeUint64(3, this.revision_height); + if (this.latest_height != false) + writer.writeBool(4, this.latest_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConsensusStateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConsensusStateRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + message.revision_number = reader.readUint64(); + break; + case 3: + message.revision_height = reader.readUint64(); + break; + case 4: + message.latest_height = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConsensusStateRequest { + return QueryConsensusStateRequest.deserialize(bytes); + } + } + export class QueryConsensusStateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + consensus_state?: dependency_5.google.protobuf.Any; + 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 ("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_5.google.protobuf.Any, 1) as dependency_5.google.protobuf.Any; + } + set consensus_state(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_consensus_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: { + consensus_state?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + }): QueryConsensusStateResponse { + const message = new QueryConsensusStateResponse({}); + if (data.consensus_state != null) { + message.consensus_state = dependency_5.google.protobuf.Any.fromObject(data.consensus_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: { + consensus_state?: ReturnType; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + if (this.consensus_state != null) { + data.consensus_state = this.consensus_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_consensus_state) + writer.writeMessage(1, this.consensus_state, () => this.consensus_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): QueryConsensusStateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConsensusStateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.consensus_state, () => message.consensus_state = dependency_5.google.protobuf.Any.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): QueryConsensusStateResponse { + return QueryConsensusStateResponse.deserialize(bytes); + } + } + export class QueryConsensusStatesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + pagination?: dependency_1.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 ("client_id" in data && data.client_id != undefined) { + this.client_id = data.client_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + client_id?: string; + pagination?: ReturnType; + }): QueryConsensusStatesRequest { + const message = new QueryConsensusStatesRequest({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + client_id?: string; + pagination?: ReturnType; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + 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.client_id.length) + writer.writeString(1, this.client_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConsensusStatesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConsensusStatesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConsensusStatesRequest { + return QueryConsensusStatesRequest.deserialize(bytes); + } + } + export class QueryConsensusStatesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + consensus_states?: dependency_3.ibc.core.client.v1.ConsensusStateWithHeight[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("consensus_states" in data && data.consensus_states != undefined) { + this.consensus_states = data.consensus_states; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get consensus_states() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.ibc.core.client.v1.ConsensusStateWithHeight, 1) as dependency_3.ibc.core.client.v1.ConsensusStateWithHeight[]; + } + set consensus_states(value: dependency_3.ibc.core.client.v1.ConsensusStateWithHeight[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + consensus_states?: ReturnType[]; + pagination?: ReturnType; + }): QueryConsensusStatesResponse { + const message = new QueryConsensusStatesResponse({}); + if (data.consensus_states != null) { + message.consensus_states = data.consensus_states.map(item => dependency_3.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + consensus_states?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.consensus_states != null) { + data.consensus_states = this.consensus_states.map((item: dependency_3.ibc.core.client.v1.ConsensusStateWithHeight) => item.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.consensus_states.length) + writer.writeRepeatedMessage(1, this.consensus_states, (item: dependency_3.ibc.core.client.v1.ConsensusStateWithHeight) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConsensusStatesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConsensusStatesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.consensus_states, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.ibc.core.client.v1.ConsensusStateWithHeight.deserialize(reader), dependency_3.ibc.core.client.v1.ConsensusStateWithHeight)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConsensusStatesResponse { + return QueryConsensusStatesResponse.deserialize(bytes); + } + } + export class QueryConsensusStateHeightsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + pagination?: dependency_1.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 ("client_id" in data && data.client_id != undefined) { + this.client_id = data.client_id; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_1.cosmos.base.query.v1beta1.PageRequest; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageRequest) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + client_id?: string; + pagination?: ReturnType; + }): QueryConsensusStateHeightsRequest { + const message = new QueryConsensusStateHeightsRequest({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + client_id?: string; + pagination?: ReturnType; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + 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.client_id.length) + writer.writeString(1, this.client_id); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConsensusStateHeightsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConsensusStateHeightsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConsensusStateHeightsRequest { + return QueryConsensusStateHeightsRequest.deserialize(bytes); + } + } + export class QueryConsensusStateHeightsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + consensus_state_heights?: dependency_3.ibc.core.client.v1.Height[]; + pagination?: dependency_1.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("consensus_state_heights" in data && data.consensus_state_heights != undefined) { + this.consensus_state_heights = data.consensus_state_heights; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get consensus_state_heights() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.ibc.core.client.v1.Height, 1) as dependency_3.ibc.core.client.v1.Height[]; + } + set consensus_state_heights(value: dependency_3.ibc.core.client.v1.Height[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get pagination() { + return pb_1.Message.getWrapperField(this, dependency_1.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_1.cosmos.base.query.v1beta1.PageResponse; + } + set pagination(value: dependency_1.cosmos.base.query.v1beta1.PageResponse) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pagination() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + consensus_state_heights?: ReturnType[]; + pagination?: ReturnType; + }): QueryConsensusStateHeightsResponse { + const message = new QueryConsensusStateHeightsResponse({}); + if (data.consensus_state_heights != null) { + message.consensus_state_heights = data.consensus_state_heights.map(item => dependency_3.ibc.core.client.v1.Height.fromObject(item)); + } + if (data.pagination != null) { + message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + consensus_state_heights?: ReturnType[]; + pagination?: ReturnType; + } = {}; + if (this.consensus_state_heights != null) { + data.consensus_state_heights = this.consensus_state_heights.map((item: dependency_3.ibc.core.client.v1.Height) => item.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.consensus_state_heights.length) + writer.writeRepeatedMessage(1, this.consensus_state_heights, (item: dependency_3.ibc.core.client.v1.Height) => item.serialize(writer)); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConsensusStateHeightsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConsensusStateHeightsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.consensus_state_heights, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_3.ibc.core.client.v1.Height.deserialize(reader), dependency_3.ibc.core.client.v1.Height)); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_1.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConsensusStateHeightsResponse { + return QueryConsensusStateHeightsResponse.deserialize(bytes); + } + } + export class QueryClientStatusRequest 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; + }): QueryClientStatusRequest { + const message = new QueryClientStatusRequest({}); + 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): QueryClientStatusRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientStatusRequest(); + 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): QueryClientStatusRequest { + return QueryClientStatusRequest.deserialize(bytes); + } + } + export class QueryClientStatusResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + status?: 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 ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + status?: string; + }): QueryClientStatusResponse { + const message = new QueryClientStatusResponse({}); + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + status?: string; + } = {}; + if (this.status != null) { + data.status = this.status; + } + 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.status.length) + writer.writeString(1, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryClientStatusResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientStatusResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.status = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryClientStatusResponse { + return QueryClientStatusResponse.deserialize(bytes); + } + } + export class QueryClientParamsRequest 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: {}): QueryClientParamsRequest { + const message = new QueryClientParamsRequest({}); + 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): QueryClientParamsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientParamsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryClientParamsRequest { + return QueryClientParamsRequest.deserialize(bytes); + } + } + export class QueryClientParamsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + params?: dependency_3.ibc.core.client.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_3.ibc.core.client.v1.Params, 1) as dependency_3.ibc.core.client.v1.Params; + } + set params(value: dependency_3.ibc.core.client.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; + }): QueryClientParamsResponse { + const message = new QueryClientParamsResponse({}); + if (data.params != null) { + message.params = dependency_3.ibc.core.client.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + params?: ReturnType; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryClientParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_3.ibc.core.client.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryClientParamsResponse { + return QueryClientParamsResponse.deserialize(bytes); + } + } + export class QueryUpgradedClientStateRequest 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: {}): QueryUpgradedClientStateRequest { + const message = new QueryUpgradedClientStateRequest({}); + 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): QueryUpgradedClientStateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradedClientStateRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradedClientStateRequest { + return QueryUpgradedClientStateRequest.deserialize(bytes); + } + } + export class QueryUpgradedClientStateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + upgraded_client_state?: dependency_5.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("upgraded_client_state" in data && data.upgraded_client_state != undefined) { + this.upgraded_client_state = data.upgraded_client_state; + } + } + } + get upgraded_client_state() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 1) as dependency_5.google.protobuf.Any; + } + set upgraded_client_state(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_upgraded_client_state() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + upgraded_client_state?: ReturnType; + }): QueryUpgradedClientStateResponse { + const message = new QueryUpgradedClientStateResponse({}); + if (data.upgraded_client_state != null) { + message.upgraded_client_state = dependency_5.google.protobuf.Any.fromObject(data.upgraded_client_state); + } + return message; + } + toObject() { + const data: { + upgraded_client_state?: ReturnType; + } = {}; + if (this.upgraded_client_state != null) { + data.upgraded_client_state = this.upgraded_client_state.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_upgraded_client_state) + writer.writeMessage(1, this.upgraded_client_state, () => this.upgraded_client_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUpgradedClientStateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradedClientStateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.upgraded_client_state, () => message.upgraded_client_state = dependency_5.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradedClientStateResponse { + return QueryUpgradedClientStateResponse.deserialize(bytes); + } + } + export class QueryUpgradedConsensusStateRequest 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: {}): QueryUpgradedConsensusStateRequest { + const message = new QueryUpgradedConsensusStateRequest({}); + 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): QueryUpgradedConsensusStateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradedConsensusStateRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradedConsensusStateRequest { + return QueryUpgradedConsensusStateRequest.deserialize(bytes); + } + } + export class QueryUpgradedConsensusStateResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + upgraded_consensus_state?: dependency_5.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("upgraded_consensus_state" in data && data.upgraded_consensus_state != undefined) { + this.upgraded_consensus_state = data.upgraded_consensus_state; + } + } + } + get upgraded_consensus_state() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Any, 1) as dependency_5.google.protobuf.Any; + } + set upgraded_consensus_state(value: dependency_5.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_upgraded_consensus_state() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + upgraded_consensus_state?: ReturnType; + }): QueryUpgradedConsensusStateResponse { + const message = new QueryUpgradedConsensusStateResponse({}); + if (data.upgraded_consensus_state != null) { + message.upgraded_consensus_state = dependency_5.google.protobuf.Any.fromObject(data.upgraded_consensus_state); + } + return message; + } + toObject() { + const data: { + upgraded_consensus_state?: ReturnType; + } = {}; + if (this.upgraded_consensus_state != null) { + data.upgraded_consensus_state = this.upgraded_consensus_state.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_upgraded_consensus_state) + writer.writeMessage(1, this.upgraded_consensus_state, () => this.upgraded_consensus_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryUpgradedConsensusStateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryUpgradedConsensusStateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.upgraded_consensus_state, () => message.upgraded_consensus_state = dependency_5.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryUpgradedConsensusStateResponse { + return QueryUpgradedConsensusStateResponse.deserialize(bytes); + } + } + export class QueryVerifyMembershipRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + proof?: Uint8Array; + proof_height?: dependency_3.ibc.core.client.v1.Height; + merkle_path?: dependency_4.ibc.core.commitment.v1.MerklePath; + value?: Uint8Array; + time_delay?: number; + block_delay?: 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 ("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; + } + if ("merkle_path" in data && data.merkle_path != undefined) { + this.merkle_path = data.merkle_path; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("time_delay" in data && data.time_delay != undefined) { + this.time_delay = data.time_delay; + } + if ("block_delay" in data && data.block_delay != undefined) { + this.block_delay = data.block_delay; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(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; + } + get merkle_path() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.commitment.v1.MerklePath, 4) as dependency_4.ibc.core.commitment.v1.MerklePath; + } + set merkle_path(value: dependency_4.ibc.core.commitment.v1.MerklePath) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_merkle_path() { + return pb_1.Message.getField(this, 4) != null; + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get time_delay() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set time_delay(value: number) { + pb_1.Message.setField(this, 6, value); + } + get block_delay() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set block_delay(value: number) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + client_id?: string; + proof?: Uint8Array; + proof_height?: ReturnType; + merkle_path?: ReturnType; + value?: Uint8Array; + time_delay?: number; + block_delay?: number; + }): QueryVerifyMembershipRequest { + const message = new QueryVerifyMembershipRequest({}); + 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); + } + if (data.merkle_path != null) { + message.merkle_path = dependency_4.ibc.core.commitment.v1.MerklePath.fromObject(data.merkle_path); + } + if (data.value != null) { + message.value = data.value; + } + if (data.time_delay != null) { + message.time_delay = data.time_delay; + } + if (data.block_delay != null) { + message.block_delay = data.block_delay; + } + return message; + } + toObject() { + const data: { + client_id?: string; + proof?: Uint8Array; + proof_height?: ReturnType; + merkle_path?: ReturnType; + value?: Uint8Array; + time_delay?: number; + block_delay?: number; + } = {}; + 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(); + } + if (this.merkle_path != null) { + data.merkle_path = this.merkle_path.toObject(); + } + if (this.value != null) { + data.value = this.value; + } + if (this.time_delay != null) { + data.time_delay = this.time_delay; + } + if (this.block_delay != null) { + data.block_delay = this.block_delay; + } + 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 (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 (this.has_merkle_path) + writer.writeMessage(4, this.merkle_path, () => this.merkle_path.serialize(writer)); + if (this.value.length) + writer.writeBytes(5, this.value); + if (this.time_delay != 0) + writer.writeUint64(6, this.time_delay); + if (this.block_delay != 0) + writer.writeUint64(7, this.block_delay); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVerifyMembershipRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVerifyMembershipRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = 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; + case 4: + reader.readMessage(message.merkle_path, () => message.merkle_path = dependency_4.ibc.core.commitment.v1.MerklePath.deserialize(reader)); + break; + case 5: + message.value = reader.readBytes(); + break; + case 6: + message.time_delay = reader.readUint64(); + break; + case 7: + message.block_delay = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVerifyMembershipRequest { + return QueryVerifyMembershipRequest.deserialize(bytes); + } + } + export class QueryVerifyMembershipResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + success?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + } + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + success?: boolean; + }): QueryVerifyMembershipResponse { + const message = new QueryVerifyMembershipResponse({}); + if (data.success != null) { + message.success = data.success; + } + return message; + } + toObject() { + const data: { + success?: boolean; + } = {}; + if (this.success != null) { + data.success = this.success; + } + 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.success != false) + writer.writeBool(1, this.success); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryVerifyMembershipResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryVerifyMembershipResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.success = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryVerifyMembershipResponse { + return QueryVerifyMembershipResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + ClientState: { + path: "/ibc.core.client.v1.Query/ClientState", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryClientStateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryClientStateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryClientStateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryClientStateResponse.deserialize(new Uint8Array(bytes)) + }, + ClientStates: { + path: "/ibc.core.client.v1.Query/ClientStates", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryClientStatesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryClientStatesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryClientStatesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryClientStatesResponse.deserialize(new Uint8Array(bytes)) + }, + ConsensusState: { + path: "/ibc.core.client.v1.Query/ConsensusState", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConsensusStateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConsensusStateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConsensusStateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConsensusStateResponse.deserialize(new Uint8Array(bytes)) + }, + ConsensusStates: { + path: "/ibc.core.client.v1.Query/ConsensusStates", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConsensusStatesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConsensusStatesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConsensusStatesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConsensusStatesResponse.deserialize(new Uint8Array(bytes)) + }, + ConsensusStateHeights: { + path: "/ibc.core.client.v1.Query/ConsensusStateHeights", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConsensusStateHeightsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConsensusStateHeightsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConsensusStateHeightsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConsensusStateHeightsResponse.deserialize(new Uint8Array(bytes)) + }, + ClientStatus: { + path: "/ibc.core.client.v1.Query/ClientStatus", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryClientStatusRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryClientStatusRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryClientStatusResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryClientStatusResponse.deserialize(new Uint8Array(bytes)) + }, + ClientParams: { + path: "/ibc.core.client.v1.Query/ClientParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryClientParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryClientParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryClientParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryClientParamsResponse.deserialize(new Uint8Array(bytes)) + }, + UpgradedClientState: { + path: "/ibc.core.client.v1.Query/UpgradedClientState", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryUpgradedClientStateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryUpgradedClientStateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryUpgradedClientStateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryUpgradedClientStateResponse.deserialize(new Uint8Array(bytes)) + }, + UpgradedConsensusState: { + path: "/ibc.core.client.v1.Query/UpgradedConsensusState", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryUpgradedConsensusStateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryUpgradedConsensusStateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryUpgradedConsensusStateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryUpgradedConsensusStateResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyMembership: { + path: "/ibc.core.client.v1.Query/VerifyMembership", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryVerifyMembershipRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryVerifyMembershipRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryVerifyMembershipResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryVerifyMembershipResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract ClientState(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ClientStates(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConsensusState(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConsensusStates(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConsensusStateHeights(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ClientStatus(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ClientParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpgradedClientState(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpgradedConsensusState(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VerifyMembership(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + ClientState: GrpcUnaryServiceInterface = (message: QueryClientStateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ClientState(message, metadata, options, callback); + }; + ClientStates: GrpcUnaryServiceInterface = (message: QueryClientStatesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ClientStates(message, metadata, options, callback); + }; + ConsensusState: GrpcUnaryServiceInterface = (message: QueryConsensusStateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConsensusState(message, metadata, options, callback); + }; + ConsensusStates: GrpcUnaryServiceInterface = (message: QueryConsensusStatesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConsensusStates(message, metadata, options, callback); + }; + ConsensusStateHeights: GrpcUnaryServiceInterface = (message: QueryConsensusStateHeightsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConsensusStateHeights(message, metadata, options, callback); + }; + ClientStatus: GrpcUnaryServiceInterface = (message: QueryClientStatusRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ClientStatus(message, metadata, options, callback); + }; + ClientParams: GrpcUnaryServiceInterface = (message: QueryClientParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ClientParams(message, metadata, options, callback); + }; + UpgradedClientState: GrpcUnaryServiceInterface = (message: QueryUpgradedClientStateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpgradedClientState(message, metadata, options, callback); + }; + UpgradedConsensusState: GrpcUnaryServiceInterface = (message: QueryUpgradedConsensusStateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpgradedConsensusState(message, metadata, options, callback); + }; + VerifyMembership: GrpcUnaryServiceInterface = (message: QueryVerifyMembershipRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyMembership(message, metadata, options, callback); + }; + } +} diff --git a/proto/ibc/core/client/v1/query_pb.d.ts b/codegen/ibc/core/client/v1/query_pb.d.ts similarity index 75% rename from proto/ibc/core/client/v1/query_pb.d.ts rename to codegen/ibc/core/client/v1/query_pb.d.ts index cecbddd..f54edc1 100644 --- a/proto/ibc/core/client/v1/query_pb.d.ts +++ b/codegen/ibc/core/client/v1/query_pb.d.ts @@ -3,7 +3,9 @@ import * as jspb from "google-protobuf"; import * as cosmos_base_query_v1beta1_pagination_pb from "../../../../cosmos/base/query/v1beta1/pagination_pb"; +import * as cosmos_query_v1_query_pb from "../../../../cosmos/query/v1/query_pb"; import * as ibc_core_client_v1_client_pb from "../../../../ibc/core/client/v1/client_pb"; +import * as ibc_core_commitment_v1_commitment_pb from "../../../../ibc/core/commitment/v1/commitment_pb"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import * as google_api_annotations_pb from "../../../../google/api/annotations_pb"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; @@ -232,6 +234,60 @@ export namespace QueryConsensusStatesResponse { } } +export class QueryConsensusStateHeightsRequest extends jspb.Message { + getClientId(): string; + setClientId(value: string): void; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryConsensusStateHeightsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryConsensusStateHeightsRequest): QueryConsensusStateHeightsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryConsensusStateHeightsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryConsensusStateHeightsRequest; + static deserializeBinaryFromReader(message: QueryConsensusStateHeightsRequest, reader: jspb.BinaryReader): QueryConsensusStateHeightsRequest; +} + +export namespace QueryConsensusStateHeightsRequest { + export type AsObject = { + clientId: string, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryConsensusStateHeightsResponse extends jspb.Message { + clearConsensusStateHeightsList(): void; + getConsensusStateHeightsList(): Array; + setConsensusStateHeightsList(value: Array): void; + addConsensusStateHeights(value?: ibc_core_client_v1_client_pb.Height, index?: number): ibc_core_client_v1_client_pb.Height; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryConsensusStateHeightsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryConsensusStateHeightsResponse): QueryConsensusStateHeightsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryConsensusStateHeightsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryConsensusStateHeightsResponse; + static deserializeBinaryFromReader(message: QueryConsensusStateHeightsResponse, reader: jspb.BinaryReader): QueryConsensusStateHeightsResponse; +} + +export namespace QueryConsensusStateHeightsResponse { + export type AsObject = { + consensusStateHeightsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + export class QueryClientStatusRequest extends jspb.Message { getClientId(): string; setClientId(value: string): void; @@ -386,3 +442,75 @@ export namespace QueryUpgradedConsensusStateResponse { } } +export class QueryVerifyMembershipRequest extends jspb.Message { + getClientId(): string; + setClientId(value: string): void; + + getProof(): Uint8Array | string; + getProof_asU8(): Uint8Array; + getProof_asB64(): string; + setProof(value: Uint8Array | string): void; + + hasProofHeight(): boolean; + clearProofHeight(): void; + getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + hasMerklePath(): boolean; + clearMerklePath(): void; + getMerklePath(): ibc_core_commitment_v1_commitment_pb.MerklePath | undefined; + setMerklePath(value?: ibc_core_commitment_v1_commitment_pb.MerklePath): void; + + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + getTimeDelay(): number; + setTimeDelay(value: number): void; + + getBlockDelay(): number; + setBlockDelay(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryVerifyMembershipRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryVerifyMembershipRequest): QueryVerifyMembershipRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryVerifyMembershipRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryVerifyMembershipRequest; + static deserializeBinaryFromReader(message: QueryVerifyMembershipRequest, reader: jspb.BinaryReader): QueryVerifyMembershipRequest; +} + +export namespace QueryVerifyMembershipRequest { + export type AsObject = { + clientId: string, + proof: Uint8Array | string, + proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + merklePath?: ibc_core_commitment_v1_commitment_pb.MerklePath.AsObject, + value: Uint8Array | string, + timeDelay: number, + blockDelay: number, + } +} + +export class QueryVerifyMembershipResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryVerifyMembershipResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryVerifyMembershipResponse): QueryVerifyMembershipResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryVerifyMembershipResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryVerifyMembershipResponse; + static deserializeBinaryFromReader(message: QueryVerifyMembershipResponse, reader: jspb.BinaryReader): QueryVerifyMembershipResponse; +} + +export namespace QueryVerifyMembershipResponse { + export type AsObject = { + success: boolean, + } +} + diff --git a/proto/ibc/core/client/v1/query_pb.js b/codegen/ibc/core/client/v1/query_pb.js similarity index 75% rename from proto/ibc/core/client/v1/query_pb.js rename to codegen/ibc/core/client/v1/query_pb.js index ab46507..5d8fbc1 100644 --- a/proto/ibc/core/client/v1/query_pb.js +++ b/codegen/ibc/core/client/v1/query_pb.js @@ -13,12 +13,16 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js'); goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); +var cosmos_query_v1_query_pb = require('../../../../cosmos/query/v1/query_pb.js'); +goog.object.extend(proto, cosmos_query_v1_query_pb); var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); goog.object.extend(proto, ibc_core_client_v1_client_pb); +var ibc_core_commitment_v1_commitment_pb = require('../../../../ibc/core/commitment/v1/commitment_pb.js'); +goog.object.extend(proto, ibc_core_commitment_v1_commitment_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); @@ -33,6 +37,8 @@ goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesRequest', null, glo goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatusRequest', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatusResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStateRequest', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStateResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStatesRequest', null, global); @@ -41,6 +47,8 @@ goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedClientStateRequest', nu goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedClientStateResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest', null, global); goog.exportSymbol('proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryVerifyMembershipRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryVerifyMembershipResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -209,6 +217,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.client.v1.QueryConsensusStatesResponse.displayName = 'proto.ibc.core.client.v1.QueryConsensusStatesResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.displayName = 'proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.displayName = 'proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -377,6 +427,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.displayName = 'proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryVerifyMembershipRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryVerifyMembershipRequest.displayName = 'proto.ibc.core.client.v1.QueryVerifyMembershipRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.QueryVerifyMembershipResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryVerifyMembershipResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryVerifyMembershipResponse.displayName = 'proto.ibc.core.client.v1.QueryVerifyMembershipResponse'; +} @@ -2009,8 +2101,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryClientStatusRequest.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.toObject(opt_includeInstance, this); }; @@ -2019,13 +2111,14 @@ proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientStatusRequest.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.toObject = function(includeInstance, msg) { var f, obj = { - clientId: jspb.Message.getFieldWithDefault(msg, 1, "") + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { @@ -2039,23 +2132,23 @@ proto.ibc.core.client.v1.QueryClientStatusRequest.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest} */ -proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryClientStatusRequest; - return proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest; + return proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest} */ -proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2066,6 +2159,11 @@ proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinaryFromReader = var value = /** @type {string} */ (reader.readString()); msg.setClientId(value); break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; default: reader.skipField(); break; @@ -2079,9 +2177,9 @@ proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2089,11 +2187,11 @@ proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} message + * @param {!proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getClientId(); if (f.length > 0) { @@ -2102,6 +2200,14 @@ proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter = func f ); } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } }; @@ -2109,20 +2215,64 @@ proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter = func * optional string client_id = 1; * @return {string} */ -proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.getClientId = function() { +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.prototype.getClientId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} returns this + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest} returns this */ -proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.setClientId = function(value) { +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.prototype.setClientId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.repeatedFields_ = [1]; @@ -2139,8 +2289,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryClientStatusResponse.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.toObject(opt_includeInstance, this); }; @@ -2149,13 +2299,15 @@ proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientStatusResponse.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.toObject = function(includeInstance, msg) { var f, obj = { - status: jspb.Message.getFieldWithDefault(msg, 1, "") + consensusStateHeightsList: jspb.Message.toObjectList(msg.getConsensusStateHeightsList(), + ibc_core_client_v1_client_pb.Height.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { @@ -2169,23 +2321,23 @@ proto.ibc.core.client.v1.QueryClientStatusResponse.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse} */ -proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryClientStatusResponse; - return proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse; + return proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse} */ -proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2193,8 +2345,14 @@ proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setStatus(value); + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.addConsensusStateHeights(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); break; default: reader.skipField(); @@ -2209,9 +2367,9 @@ proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryClientStatusResponse.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2219,37 +2377,103 @@ proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} message + * @param {!proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientStatusResponse.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStatus(); + f = message.getConsensusStateHeightsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter ); } }; /** - * optional string status = 1; - * @return {string} + * repeated Height consensus_state_heights = 1; + * @return {!Array} */ -proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.getStatus = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.getConsensusStateHeightsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_client_v1_client_pb.Height, 1)); }; /** - * @param {string} value - * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} returns this + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.setConsensusStateHeightsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.Height=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.Height} */ -proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.setStatus = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.addConsensusStateHeights = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.client.v1.Height, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.clearConsensusStateHeightsList = function() { + return this.setConsensusStateHeightsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStateHeightsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -2269,8 +2493,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryClientParamsRequest.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatusRequest.toObject(opt_includeInstance, this); }; @@ -2279,13 +2503,13 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsRequest.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryClientStatusRequest.toObject = function(includeInstance, msg) { var f, obj = { - + clientId: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -2299,29 +2523,33 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryClientParamsRequest; - return proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryClientStatusRequest; + return proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryClientStatusRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; default: reader.skipField(); break; @@ -2335,9 +2563,9 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2345,12 +2573,37 @@ proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} message + * @param {!proto.ibc.core.client.v1.QueryClientStatusRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryClientStatusRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryClientStatusRequest} returns this + */ +proto.ibc.core.client.v1.QueryClientStatusRequest.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2370,8 +2623,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryClientParamsResponse.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatusResponse.toObject(opt_includeInstance, this); }; @@ -2380,13 +2633,13 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsResponse.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryClientStatusResponse.toObject = function(includeInstance, msg) { var f, obj = { - params: (f = msg.getParams()) && ibc_core_client_v1_client_pb.Params.toObject(includeInstance, f) + status: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -2400,23 +2653,23 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryClientParamsResponse; - return proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryClientStatusResponse; + return proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryClientStatusResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2424,9 +2677,8 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new ibc_core_client_v1_client_pb.Params; - reader.readMessage(value,ibc_core_client_v1_client_pb.Params.deserializeBinaryFromReader); - msg.setParams(value); + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(value); break; default: reader.skipField(); @@ -2441,9 +2693,9 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryClientStatusResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2451,57 +2703,37 @@ proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} message + * @param {!proto.ibc.core.client.v1.QueryClientStatusResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryClientStatusResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getParams(); - if (f != null) { - writer.writeMessage( + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( 1, - f, - ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + f ); } }; /** - * optional Params params = 1; - * @return {?proto.ibc.core.client.v1.Params} - */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.getParams = function() { - return /** @type{?proto.ibc.core.client.v1.Params} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Params, 1)); -}; - - -/** - * @param {?proto.ibc.core.client.v1.Params|undefined} value - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this -*/ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.setParams = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this + * optional string status = 1; + * @return {string} */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.clearParams = function() { - return this.setParams(undefined); +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryClientStatusResponse} returns this */ -proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.hasParams = function() { - return jspb.Message.getField(this, 1) != null; +proto.ibc.core.client.v1.QueryClientStatusResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2521,8 +2753,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsRequest.toObject(opt_includeInstance, this); }; @@ -2531,11 +2763,11 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.toObject = fu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryClientParamsRequest.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -2551,23 +2783,23 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.toObject = function(inc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} + * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryUpgradedClientStateRequest; - return proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryClientParamsRequest; + return proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} + * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryClientParamsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2587,9 +2819,9 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinaryFromRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryClientParamsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2597,11 +2829,11 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.serializeBina /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} message + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryClientParamsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -2622,8 +2854,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsResponse.toObject(opt_includeInstance, this); }; @@ -2632,13 +2864,13 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.toObject = f * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryClientParamsResponse.toObject = function(includeInstance, msg) { var f, obj = { - upgradedClientState: (f = msg.getUpgradedClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) + params: (f = msg.getParams()) && ibc_core_client_v1_client_pb.Params.toObject(includeInstance, f) }; if (includeInstance) { @@ -2652,23 +2884,23 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.toObject = function(in /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryUpgradedClientStateResponse; - return proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryClientParamsResponse; + return proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2676,9 +2908,9 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromR var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setUpgradedClientState(value); + var value = new ibc_core_client_v1_client_pb.Params; + reader.readMessage(value,ibc_core_client_v1_client_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); break; default: reader.skipField(); @@ -2693,9 +2925,9 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromR * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2703,48 +2935,48 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.serializeBin /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} message + * @param {!proto.ibc.core.client.v1.QueryClientParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUpgradedClientState(); + f = message.getParams(); if (f != null) { writer.writeMessage( 1, f, - google_protobuf_any_pb.Any.serializeBinaryToWriter + ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter ); } }; /** - * optional google.protobuf.Any upgraded_client_state = 1; - * @return {?proto.google.protobuf.Any} + * optional Params params = 1; + * @return {?proto.ibc.core.client.v1.Params} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.getUpgradedClientState = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.getParams = function() { + return /** @type{?proto.ibc.core.client.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Params, 1)); }; /** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} returns this + * @param {?proto.ibc.core.client.v1.Params|undefined} value + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.setUpgradedClientState = function(value) { +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.setParams = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} returns this + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} returns this */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.clearUpgradedClientState = function() { - return this.setUpgradedClientState(undefined); +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); }; @@ -2752,7 +2984,7 @@ proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.clearUpgrade * Returns whether this field is set. * @return {boolean} */ -proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.hasUpgradedClientState = function() { +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.hasParams = function() { return jspb.Message.getField(this, 1) != null; }; @@ -2773,8 +3005,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.toObject(opt_includeInstance, this); }; @@ -2783,11 +3015,11 @@ proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.toObject = * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -2803,23 +3035,23 @@ proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.toObject = function( /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} */ -proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinary = function(bytes) { +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest; - return proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.core.client.v1.QueryUpgradedClientStateRequest; + return proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} msg The message object to deserialize into. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} */ -proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2839,9 +3071,9 @@ proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinaryFro * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.serializeBinary = function() { +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.serializeBinaryToWriter(this, writer); + proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2849,11 +3081,11 @@ proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.serializeB /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} message + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.serializeBinaryToWriter = function(message, writer) { +proto.ibc.core.client.v1.QueryUpgradedClientStateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -2874,8 +3106,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.toObject(opt_includeInstance, this); +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.toObject(opt_includeInstance, this); }; @@ -2884,13 +3116,265 @@ proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.toObject * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} msg The msg instance to transform. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.toObject = function(includeInstance, msg) { +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.toObject = function(includeInstance, msg) { var f, obj = { - upgradedConsensusState: (f = msg.getUpgradedConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) + upgradedClientState: (f = msg.getUpgradedClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedClientStateResponse; + return proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setUpgradedClientState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgradedClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any upgraded_client_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.getUpgradedClientState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.setUpgradedClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryUpgradedClientStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.clearUpgradedClientState = function() { + return this.setUpgradedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryUpgradedClientStateResponse.prototype.hasUpgradedClientState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest; + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgradedConsensusState: (f = msg.getUpgradedConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) }; if (includeInstance) { @@ -3009,4 +3493,534 @@ proto.ibc.core.client.v1.QueryUpgradedConsensusStateResponse.prototype.hasUpgrad }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryVerifyMembershipRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + proof: msg.getProof_asB64(), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + merklePath: (f = msg.getMerklePath()) && ibc_core_commitment_v1_commitment_pb.MerklePath.toObject(includeInstance, f), + value: msg.getValue_asB64(), + timeDelay: jspb.Message.getFieldWithDefault(msg, 6, 0), + blockDelay: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryVerifyMembershipRequest; + return proto.ibc.core.client.v1.QueryVerifyMembershipRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(value); + break; + case 3: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setProofHeight(value); + break; + case 4: + var value = new ibc_core_commitment_v1_commitment_pb.MerklePath; + reader.readMessage(value,ibc_core_commitment_v1_commitment_pb.MerklePath.deserializeBinaryFromReader); + msg.setMerklePath(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeDelay(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlockDelay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryVerifyMembershipRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProof_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getMerklePath(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_commitment_v1_commitment_pb.MerklePath.serializeBinaryToWriter + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getTimeDelay(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getBlockDelay(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} returns this + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proof = 2; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProof()` + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} returns this + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.setProof = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional Height proof_height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getProofHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} returns this +*/ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} returns this + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ibc.core.commitment.v1.MerklePath merkle_path = 4; + * @return {?proto.ibc.core.commitment.v1.MerklePath} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getMerklePath = function() { + return /** @type{?proto.ibc.core.commitment.v1.MerklePath} */ ( + jspb.Message.getWrapperField(this, ibc_core_commitment_v1_commitment_pb.MerklePath, 4)); +}; + + +/** + * @param {?proto.ibc.core.commitment.v1.MerklePath|undefined} value + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} returns this +*/ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.setMerklePath = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} returns this + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.clearMerklePath = function() { + return this.setMerklePath(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.hasMerklePath = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bytes value = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes value = 5; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} returns this + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional uint64 time_delay = 6; + * @return {number} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getTimeDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} returns this + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.setTimeDelay = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 block_delay = 7; + * @return {number} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.getBlockDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipRequest} returns this + */ +proto.ibc.core.client.v1.QueryVerifyMembershipRequest.prototype.setBlockDelay = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryVerifyMembershipResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.QueryVerifyMembershipResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryVerifyMembershipResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipResponse} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryVerifyMembershipResponse; + return proto.ibc.core.client.v1.QueryVerifyMembershipResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.QueryVerifyMembershipResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipResponse} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryVerifyMembershipResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.QueryVerifyMembershipResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryVerifyMembershipResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryVerifyMembershipResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.core.client.v1.QueryVerifyMembershipResponse} returns this + */ +proto.ibc.core.client.v1.QueryVerifyMembershipResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/proto/ibc/core/client/v1/query_pb_service.d.ts b/codegen/ibc/core/client/v1/query_pb_service.d.ts similarity index 82% rename from proto/ibc/core/client/v1/query_pb_service.d.ts rename to codegen/ibc/core/client/v1/query_pb_service.d.ts index 2d541ea..3d885b6 100644 --- a/proto/ibc/core/client/v1/query_pb_service.d.ts +++ b/codegen/ibc/core/client/v1/query_pb_service.d.ts @@ -40,6 +40,15 @@ type QueryConsensusStates = { readonly responseType: typeof ibc_core_client_v1_query_pb.QueryConsensusStatesResponse; }; +type QueryConsensusStateHeights = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_client_v1_query_pb.QueryConsensusStateHeightsRequest; + readonly responseType: typeof ibc_core_client_v1_query_pb.QueryConsensusStateHeightsResponse; +}; + type QueryClientStatus = { readonly methodName: string; readonly service: typeof Query; @@ -76,16 +85,27 @@ type QueryUpgradedConsensusState = { readonly responseType: typeof ibc_core_client_v1_query_pb.QueryUpgradedConsensusStateResponse; }; +type QueryVerifyMembership = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_client_v1_query_pb.QueryVerifyMembershipRequest; + readonly responseType: typeof ibc_core_client_v1_query_pb.QueryVerifyMembershipResponse; +}; + export class Query { static readonly serviceName: string; static readonly ClientState: QueryClientState; static readonly ClientStates: QueryClientStates; static readonly ConsensusState: QueryConsensusState; static readonly ConsensusStates: QueryConsensusStates; + static readonly ConsensusStateHeights: QueryConsensusStateHeights; static readonly ClientStatus: QueryClientStatus; static readonly ClientParams: QueryClientParams; static readonly UpgradedClientState: QueryUpgradedClientState; static readonly UpgradedConsensusState: QueryUpgradedConsensusState; + static readonly VerifyMembership: QueryVerifyMembership; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -156,6 +176,15 @@ export class QueryClient { requestMessage: ibc_core_client_v1_query_pb.QueryConsensusStatesRequest, callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_query_pb.QueryConsensusStatesResponse|null) => void ): UnaryResponse; + consensusStateHeights( + requestMessage: ibc_core_client_v1_query_pb.QueryConsensusStateHeightsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_query_pb.QueryConsensusStateHeightsResponse|null) => void + ): UnaryResponse; + consensusStateHeights( + requestMessage: ibc_core_client_v1_query_pb.QueryConsensusStateHeightsRequest, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_query_pb.QueryConsensusStateHeightsResponse|null) => void + ): UnaryResponse; clientStatus( requestMessage: ibc_core_client_v1_query_pb.QueryClientStatusRequest, metadata: grpc.Metadata, @@ -192,5 +221,14 @@ export class QueryClient { requestMessage: ibc_core_client_v1_query_pb.QueryUpgradedConsensusStateRequest, callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_query_pb.QueryUpgradedConsensusStateResponse|null) => void ): UnaryResponse; + verifyMembership( + requestMessage: ibc_core_client_v1_query_pb.QueryVerifyMembershipRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_query_pb.QueryVerifyMembershipResponse|null) => void + ): UnaryResponse; + verifyMembership( + requestMessage: ibc_core_client_v1_query_pb.QueryVerifyMembershipRequest, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_query_pb.QueryVerifyMembershipResponse|null) => void + ): UnaryResponse; } diff --git a/proto/ibc/core/client/v1/query_pb_service.js b/codegen/ibc/core/client/v1/query_pb_service.js similarity index 80% rename from proto/ibc/core/client/v1/query_pb_service.js rename to codegen/ibc/core/client/v1/query_pb_service.js index 9cc38df..30f16fe 100644 --- a/proto/ibc/core/client/v1/query_pb_service.js +++ b/codegen/ibc/core/client/v1/query_pb_service.js @@ -46,6 +46,15 @@ Query.ConsensusStates = { responseType: ibc_core_client_v1_query_pb.QueryConsensusStatesResponse }; +Query.ConsensusStateHeights = { + methodName: "ConsensusStateHeights", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_core_client_v1_query_pb.QueryConsensusStateHeightsRequest, + responseType: ibc_core_client_v1_query_pb.QueryConsensusStateHeightsResponse +}; + Query.ClientStatus = { methodName: "ClientStatus", service: Query, @@ -82,6 +91,15 @@ Query.UpgradedConsensusState = { responseType: ibc_core_client_v1_query_pb.QueryUpgradedConsensusStateResponse }; +Query.VerifyMembership = { + methodName: "VerifyMembership", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_core_client_v1_query_pb.QueryVerifyMembershipRequest, + responseType: ibc_core_client_v1_query_pb.QueryVerifyMembershipResponse +}; + exports.Query = Query; function QueryClient(serviceHost, options) { @@ -213,6 +231,37 @@ QueryClient.prototype.consensusStates = function consensusStates(requestMessage, }; }; +QueryClient.prototype.consensusStateHeights = function consensusStateHeights(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.ConsensusStateHeights, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + QueryClient.prototype.clientStatus = function clientStatus(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; @@ -337,5 +386,36 @@ QueryClient.prototype.upgradedConsensusState = function upgradedConsensusState(r }; }; +QueryClient.prototype.verifyMembership = function verifyMembership(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.VerifyMembership, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.QueryClient = QueryClient; diff --git a/codegen/ibc/core/client/v1/tx.ts b/codegen/ibc/core/client/v1/tx.ts new file mode 100644 index 0000000..8695cb0 --- /dev/null +++ b/codegen/ibc/core/client/v1/tx.ts @@ -0,0 +1,1284 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/client/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../cosmos/msg/v1/msg"; +import * as dependency_2 from "./../../../../cosmos/upgrade/v1beta1/upgrade"; +import * as dependency_3 from "./../../../../gogoproto/gogo"; +import * as dependency_4 from "./../../../../google/protobuf/any"; +import * as dependency_5 from "./client"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.core.client.v1 { + export class MsgCreateClient extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_state?: dependency_4.google.protobuf.Any; + consensus_state?: dependency_4.google.protobuf.Any; + signer?: 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_state" in data && data.client_state != undefined) { + this.client_state = data.client_state; + } + if ("consensus_state" in data && data.consensus_state != undefined) { + this.consensus_state = data.consensus_state; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get client_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 1) as dependency_4.google.protobuf.Any; + } + set client_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_client_state() { + return pb_1.Message.getField(this, 1) != null; + } + get consensus_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set consensus_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_consensus_state() { + return pb_1.Message.getField(this, 2) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + client_state?: ReturnType; + consensus_state?: ReturnType; + signer?: string; + }): MsgCreateClient { + const message = new MsgCreateClient({}); + if (data.client_state != null) { + message.client_state = dependency_4.google.protobuf.Any.fromObject(data.client_state); + } + if (data.consensus_state != null) { + message.consensus_state = dependency_4.google.protobuf.Any.fromObject(data.consensus_state); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + client_state?: ReturnType; + consensus_state?: ReturnType; + signer?: string; + } = {}; + if (this.client_state != null) { + data.client_state = this.client_state.toObject(); + } + if (this.consensus_state != null) { + data.consensus_state = this.consensus_state.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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_client_state) + writer.writeMessage(1, this.client_state, () => this.client_state.serialize(writer)); + if (this.has_consensus_state) + writer.writeMessage(2, this.consensus_state, () => this.consensus_state.serialize(writer)); + if (this.signer.length) + writer.writeString(3, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateClient { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateClient(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.client_state, () => message.client_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 2: + reader.readMessage(message.consensus_state, () => message.consensus_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 3: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateClient { + return MsgCreateClient.deserialize(bytes); + } + } + export class MsgCreateClientResponse 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: {}): MsgCreateClientResponse { + const message = new MsgCreateClientResponse({}); + 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): MsgCreateClientResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateClientResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgCreateClientResponse { + return MsgCreateClientResponse.deserialize(bytes); + } + } + export class MsgUpdateClient extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + client_message?: dependency_4.google.protobuf.Any; + signer?: 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; + } + if ("client_message" in data && data.client_message != undefined) { + this.client_message = data.client_message; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get client_message() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set client_message(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_client_message() { + return pb_1.Message.getField(this, 2) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + client_id?: string; + client_message?: ReturnType; + signer?: string; + }): MsgUpdateClient { + const message = new MsgUpdateClient({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.client_message != null) { + message.client_message = dependency_4.google.protobuf.Any.fromObject(data.client_message); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + client_id?: string; + client_message?: ReturnType; + signer?: string; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.client_message != null) { + data.client_message = this.client_message.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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 (this.has_client_message) + writer.writeMessage(2, this.client_message, () => this.client_message.serialize(writer)); + if (this.signer.length) + writer.writeString(3, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateClient { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateClient(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.client_message, () => message.client_message = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 3: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateClient { + return MsgUpdateClient.deserialize(bytes); + } + } + export class MsgUpdateClientResponse 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: {}): MsgUpdateClientResponse { + const message = new MsgUpdateClientResponse({}); + 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): MsgUpdateClientResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateClientResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateClientResponse { + return MsgUpdateClientResponse.deserialize(bytes); + } + } + export class MsgUpgradeClient extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + client_state?: dependency_4.google.protobuf.Any; + consensus_state?: dependency_4.google.protobuf.Any; + proof_upgrade_client?: Uint8Array; + proof_upgrade_consensus_state?: Uint8Array; + signer?: 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; + } + if ("client_state" in data && data.client_state != undefined) { + this.client_state = data.client_state; + } + if ("consensus_state" in data && data.consensus_state != undefined) { + this.consensus_state = data.consensus_state; + } + if ("proof_upgrade_client" in data && data.proof_upgrade_client != undefined) { + this.proof_upgrade_client = data.proof_upgrade_client; + } + if ("proof_upgrade_consensus_state" in data && data.proof_upgrade_consensus_state != undefined) { + this.proof_upgrade_consensus_state = data.proof_upgrade_consensus_state; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get client_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set client_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_client_state() { + return pb_1.Message.getField(this, 2) != null; + } + get consensus_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 3) as dependency_4.google.protobuf.Any; + } + set consensus_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_consensus_state() { + return pb_1.Message.getField(this, 3) != null; + } + get proof_upgrade_client() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set proof_upgrade_client(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get proof_upgrade_consensus_state() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set proof_upgrade_consensus_state(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + client_id?: string; + client_state?: ReturnType; + consensus_state?: ReturnType; + proof_upgrade_client?: Uint8Array; + proof_upgrade_consensus_state?: Uint8Array; + signer?: string; + }): MsgUpgradeClient { + const message = new MsgUpgradeClient({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.client_state != null) { + message.client_state = dependency_4.google.protobuf.Any.fromObject(data.client_state); + } + if (data.consensus_state != null) { + message.consensus_state = dependency_4.google.protobuf.Any.fromObject(data.consensus_state); + } + if (data.proof_upgrade_client != null) { + message.proof_upgrade_client = data.proof_upgrade_client; + } + if (data.proof_upgrade_consensus_state != null) { + message.proof_upgrade_consensus_state = data.proof_upgrade_consensus_state; + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + client_id?: string; + client_state?: ReturnType; + consensus_state?: ReturnType; + proof_upgrade_client?: Uint8Array; + proof_upgrade_consensus_state?: Uint8Array; + signer?: string; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.client_state != null) { + data.client_state = this.client_state.toObject(); + } + if (this.consensus_state != null) { + data.consensus_state = this.consensus_state.toObject(); + } + if (this.proof_upgrade_client != null) { + data.proof_upgrade_client = this.proof_upgrade_client; + } + if (this.proof_upgrade_consensus_state != null) { + data.proof_upgrade_consensus_state = this.proof_upgrade_consensus_state; + } + if (this.signer != null) { + data.signer = this.signer; + } + 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 (this.has_client_state) + writer.writeMessage(2, this.client_state, () => this.client_state.serialize(writer)); + if (this.has_consensus_state) + writer.writeMessage(3, this.consensus_state, () => this.consensus_state.serialize(writer)); + if (this.proof_upgrade_client.length) + writer.writeBytes(4, this.proof_upgrade_client); + if (this.proof_upgrade_consensus_state.length) + writer.writeBytes(5, this.proof_upgrade_consensus_state); + if (this.signer.length) + writer.writeString(6, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpgradeClient { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpgradeClient(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.client_state, () => message.client_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 3: + reader.readMessage(message.consensus_state, () => message.consensus_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 4: + message.proof_upgrade_client = reader.readBytes(); + break; + case 5: + message.proof_upgrade_consensus_state = reader.readBytes(); + break; + case 6: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpgradeClient { + return MsgUpgradeClient.deserialize(bytes); + } + } + export class MsgUpgradeClientResponse 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: {}): MsgUpgradeClientResponse { + const message = new MsgUpgradeClientResponse({}); + 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): MsgUpgradeClientResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpgradeClientResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpgradeClientResponse { + return MsgUpgradeClientResponse.deserialize(bytes); + } + } + /** @deprecated*/ + export class MsgSubmitMisbehaviour extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + misbehaviour?: dependency_4.google.protobuf.Any; + signer?: 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; + } + if ("misbehaviour" in data && data.misbehaviour != undefined) { + this.misbehaviour = data.misbehaviour; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get misbehaviour() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set misbehaviour(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_misbehaviour() { + return pb_1.Message.getField(this, 2) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + client_id?: string; + misbehaviour?: ReturnType; + signer?: string; + }): MsgSubmitMisbehaviour { + const message = new MsgSubmitMisbehaviour({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.misbehaviour != null) { + message.misbehaviour = dependency_4.google.protobuf.Any.fromObject(data.misbehaviour); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + client_id?: string; + misbehaviour?: ReturnType; + signer?: string; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.misbehaviour != null) { + data.misbehaviour = this.misbehaviour.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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 (this.has_misbehaviour) + writer.writeMessage(2, this.misbehaviour, () => this.misbehaviour.serialize(writer)); + if (this.signer.length) + writer.writeString(3, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSubmitMisbehaviour { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitMisbehaviour(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.misbehaviour, () => message.misbehaviour = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 3: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitMisbehaviour { + return MsgSubmitMisbehaviour.deserialize(bytes); + } + } + export class MsgSubmitMisbehaviourResponse 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: {}): MsgSubmitMisbehaviourResponse { + const message = new MsgSubmitMisbehaviourResponse({}); + 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): MsgSubmitMisbehaviourResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSubmitMisbehaviourResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgSubmitMisbehaviourResponse { + return MsgSubmitMisbehaviourResponse.deserialize(bytes); + } + } + export class MsgRecoverClient extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + subject_client_id?: string; + substitute_client_id?: string; + signer?: 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 ("subject_client_id" in data && data.subject_client_id != undefined) { + this.subject_client_id = data.subject_client_id; + } + if ("substitute_client_id" in data && data.substitute_client_id != undefined) { + this.substitute_client_id = data.substitute_client_id; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get subject_client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set subject_client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get substitute_client_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set substitute_client_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + subject_client_id?: string; + substitute_client_id?: string; + signer?: string; + }): MsgRecoverClient { + const message = new MsgRecoverClient({}); + if (data.subject_client_id != null) { + message.subject_client_id = data.subject_client_id; + } + if (data.substitute_client_id != null) { + message.substitute_client_id = data.substitute_client_id; + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + subject_client_id?: string; + substitute_client_id?: string; + signer?: string; + } = {}; + if (this.subject_client_id != null) { + data.subject_client_id = this.subject_client_id; + } + if (this.substitute_client_id != null) { + data.substitute_client_id = this.substitute_client_id; + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.subject_client_id.length) + writer.writeString(1, this.subject_client_id); + if (this.substitute_client_id.length) + writer.writeString(2, this.substitute_client_id); + if (this.signer.length) + writer.writeString(3, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRecoverClient { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRecoverClient(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.subject_client_id = reader.readString(); + break; + case 2: + message.substitute_client_id = reader.readString(); + break; + case 3: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRecoverClient { + return MsgRecoverClient.deserialize(bytes); + } + } + export class MsgRecoverClientResponse 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: {}): MsgRecoverClientResponse { + const message = new MsgRecoverClientResponse({}); + 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): MsgRecoverClientResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRecoverClientResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRecoverClientResponse { + return MsgRecoverClientResponse.deserialize(bytes); + } + } + export class MsgIBCSoftwareUpgrade extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + plan?: dependency_2.cosmos.upgrade.v1beta1.Plan; + upgraded_client_state?: dependency_4.google.protobuf.Any; + signer?: 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 ("plan" in data && data.plan != undefined) { + this.plan = data.plan; + } + if ("upgraded_client_state" in data && data.upgraded_client_state != undefined) { + this.upgraded_client_state = data.upgraded_client_state; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get plan() { + return pb_1.Message.getWrapperField(this, dependency_2.cosmos.upgrade.v1beta1.Plan, 1) as dependency_2.cosmos.upgrade.v1beta1.Plan; + } + set plan(value: dependency_2.cosmos.upgrade.v1beta1.Plan) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_plan() { + return pb_1.Message.getField(this, 1) != null; + } + get upgraded_client_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set upgraded_client_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_upgraded_client_state() { + return pb_1.Message.getField(this, 2) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + plan?: ReturnType; + upgraded_client_state?: ReturnType; + signer?: string; + }): MsgIBCSoftwareUpgrade { + const message = new MsgIBCSoftwareUpgrade({}); + if (data.plan != null) { + message.plan = dependency_2.cosmos.upgrade.v1beta1.Plan.fromObject(data.plan); + } + if (data.upgraded_client_state != null) { + message.upgraded_client_state = dependency_4.google.protobuf.Any.fromObject(data.upgraded_client_state); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + plan?: ReturnType; + upgraded_client_state?: ReturnType; + signer?: string; + } = {}; + if (this.plan != null) { + data.plan = this.plan.toObject(); + } + if (this.upgraded_client_state != null) { + data.upgraded_client_state = this.upgraded_client_state.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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_plan) + writer.writeMessage(1, this.plan, () => this.plan.serialize(writer)); + if (this.has_upgraded_client_state) + writer.writeMessage(2, this.upgraded_client_state, () => this.upgraded_client_state.serialize(writer)); + if (this.signer.length) + writer.writeString(3, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgIBCSoftwareUpgrade { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgIBCSoftwareUpgrade(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.plan, () => message.plan = dependency_2.cosmos.upgrade.v1beta1.Plan.deserialize(reader)); + break; + case 2: + reader.readMessage(message.upgraded_client_state, () => message.upgraded_client_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 3: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgIBCSoftwareUpgrade { + return MsgIBCSoftwareUpgrade.deserialize(bytes); + } + } + export class MsgIBCSoftwareUpgradeResponse 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: {}): MsgIBCSoftwareUpgradeResponse { + const message = new MsgIBCSoftwareUpgradeResponse({}); + 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): MsgIBCSoftwareUpgradeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgIBCSoftwareUpgradeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgIBCSoftwareUpgradeResponse { + return MsgIBCSoftwareUpgradeResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer?: string; + params?: dependency_5.ibc.core.client.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 ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.client.v1.Params, 2) as dependency_5.ibc.core.client.v1.Params; + } + set params(value: dependency_5.ibc.core.client.v1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + signer?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.signer != null) { + message.signer = data.signer; + } + if (data.params != null) { + message.params = dependency_5.ibc.core.client.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + signer?: string; + params?: ReturnType; + } = {}; + if (this.signer != null) { + data.signer = this.signer; + } + 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.signer.length) + writer.writeString(1, this.signer); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signer = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_5.ibc.core.client.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + CreateClient: { + path: "/ibc.core.client.v1.Msg/CreateClient", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgCreateClient) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgCreateClient.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgCreateClientResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgCreateClientResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateClient: { + path: "/ibc.core.client.v1.Msg/UpdateClient", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateClient) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateClient.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateClientResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateClientResponse.deserialize(new Uint8Array(bytes)) + }, + UpgradeClient: { + path: "/ibc.core.client.v1.Msg/UpgradeClient", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpgradeClient) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpgradeClient.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpgradeClientResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpgradeClientResponse.deserialize(new Uint8Array(bytes)) + }, + SubmitMisbehaviour: { + path: "/ibc.core.client.v1.Msg/SubmitMisbehaviour", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgSubmitMisbehaviour) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgSubmitMisbehaviour.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgSubmitMisbehaviourResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgSubmitMisbehaviourResponse.deserialize(new Uint8Array(bytes)) + }, + RecoverClient: { + path: "/ibc.core.client.v1.Msg/RecoverClient", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRecoverClient) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRecoverClient.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRecoverClientResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRecoverClientResponse.deserialize(new Uint8Array(bytes)) + }, + IBCSoftwareUpgrade: { + path: "/ibc.core.client.v1.Msg/IBCSoftwareUpgrade", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgIBCSoftwareUpgrade) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgIBCSoftwareUpgrade.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgIBCSoftwareUpgradeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgIBCSoftwareUpgradeResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateClientParams: { + path: "/ibc.core.client.v1.Msg/UpdateClientParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CreateClient(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateClient(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpgradeClient(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SubmitMisbehaviour(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RecoverClient(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract IBCSoftwareUpgrade(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateClientParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CreateClient: GrpcUnaryServiceInterface = (message: MsgCreateClient, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateClient(message, metadata, options, callback); + }; + UpdateClient: GrpcUnaryServiceInterface = (message: MsgUpdateClient, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateClient(message, metadata, options, callback); + }; + UpgradeClient: GrpcUnaryServiceInterface = (message: MsgUpgradeClient, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpgradeClient(message, metadata, options, callback); + }; + SubmitMisbehaviour: GrpcUnaryServiceInterface = (message: MsgSubmitMisbehaviour, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SubmitMisbehaviour(message, metadata, options, callback); + }; + RecoverClient: GrpcUnaryServiceInterface = (message: MsgRecoverClient, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RecoverClient(message, metadata, options, callback); + }; + IBCSoftwareUpgrade: GrpcUnaryServiceInterface = (message: MsgIBCSoftwareUpgrade, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.IBCSoftwareUpgrade(message, metadata, options, callback); + }; + UpdateClientParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateClientParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/ibc/core/client/v1/tx_pb.d.ts b/codegen/ibc/core/client/v1/tx_pb.d.ts similarity index 58% rename from proto/ibc/core/client/v1/tx_pb.d.ts rename to codegen/ibc/core/client/v1/tx_pb.d.ts index bc71271..259047e 100644 --- a/proto/ibc/core/client/v1/tx_pb.d.ts +++ b/codegen/ibc/core/client/v1/tx_pb.d.ts @@ -2,6 +2,8 @@ // file: ibc/core/client/v1/tx.proto import * as jspb from "google-protobuf"; +import * as cosmos_msg_v1_msg_pb from "../../../../cosmos/msg/v1/msg_pb"; +import * as cosmos_upgrade_v1beta1_upgrade_pb from "../../../../cosmos/upgrade/v1beta1/upgrade_pb"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import * as ibc_core_client_v1_client_pb from "../../../../ibc/core/client/v1/client_pb"; @@ -58,10 +60,10 @@ export class MsgUpdateClient extends jspb.Message { getClientId(): string; setClientId(value: string): void; - hasHeader(): boolean; - clearHeader(): void; - getHeader(): google_protobuf_any_pb.Any | undefined; - setHeader(value?: google_protobuf_any_pb.Any): void; + hasClientMessage(): boolean; + clearClientMessage(): void; + getClientMessage(): google_protobuf_any_pb.Any | undefined; + setClientMessage(value?: google_protobuf_any_pb.Any): void; getSigner(): string; setSigner(value: string): void; @@ -79,7 +81,7 @@ export class MsgUpdateClient extends jspb.Message { export namespace MsgUpdateClient { export type AsObject = { clientId: string, - header?: google_protobuf_any_pb.Any.AsObject, + clientMessage?: google_protobuf_any_pb.Any.AsObject, signer: string, } } @@ -210,3 +212,137 @@ export namespace MsgSubmitMisbehaviourResponse { } } +export class MsgRecoverClient extends jspb.Message { + getSubjectClientId(): string; + setSubjectClientId(value: string): void; + + getSubstituteClientId(): string; + setSubstituteClientId(value: string): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRecoverClient.AsObject; + static toObject(includeInstance: boolean, msg: MsgRecoverClient): MsgRecoverClient.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRecoverClient, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRecoverClient; + static deserializeBinaryFromReader(message: MsgRecoverClient, reader: jspb.BinaryReader): MsgRecoverClient; +} + +export namespace MsgRecoverClient { + export type AsObject = { + subjectClientId: string, + substituteClientId: string, + signer: string, + } +} + +export class MsgRecoverClientResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRecoverClientResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgRecoverClientResponse): MsgRecoverClientResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRecoverClientResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRecoverClientResponse; + static deserializeBinaryFromReader(message: MsgRecoverClientResponse, reader: jspb.BinaryReader): MsgRecoverClientResponse; +} + +export namespace MsgRecoverClientResponse { + export type AsObject = { + } +} + +export class MsgIBCSoftwareUpgrade extends jspb.Message { + hasPlan(): boolean; + clearPlan(): void; + getPlan(): cosmos_upgrade_v1beta1_upgrade_pb.Plan | undefined; + setPlan(value?: cosmos_upgrade_v1beta1_upgrade_pb.Plan): void; + + hasUpgradedClientState(): boolean; + clearUpgradedClientState(): void; + getUpgradedClientState(): google_protobuf_any_pb.Any | undefined; + setUpgradedClientState(value?: google_protobuf_any_pb.Any): void; + + getSigner(): string; + setSigner(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgIBCSoftwareUpgrade.AsObject; + static toObject(includeInstance: boolean, msg: MsgIBCSoftwareUpgrade): MsgIBCSoftwareUpgrade.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgIBCSoftwareUpgrade, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgIBCSoftwareUpgrade; + static deserializeBinaryFromReader(message: MsgIBCSoftwareUpgrade, reader: jspb.BinaryReader): MsgIBCSoftwareUpgrade; +} + +export namespace MsgIBCSoftwareUpgrade { + export type AsObject = { + plan?: cosmos_upgrade_v1beta1_upgrade_pb.Plan.AsObject, + upgradedClientState?: google_protobuf_any_pb.Any.AsObject, + signer: string, + } +} + +export class MsgIBCSoftwareUpgradeResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgIBCSoftwareUpgradeResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgIBCSoftwareUpgradeResponse): MsgIBCSoftwareUpgradeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgIBCSoftwareUpgradeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgIBCSoftwareUpgradeResponse; + static deserializeBinaryFromReader(message: MsgIBCSoftwareUpgradeResponse, reader: jspb.BinaryReader): MsgIBCSoftwareUpgradeResponse; +} + +export namespace MsgIBCSoftwareUpgradeResponse { + export type AsObject = { + } +} + +export class MsgUpdateParams extends jspb.Message { + getSigner(): string; + setSigner(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_core_client_v1_client_pb.Params | undefined; + setParams(value?: ibc_core_client_v1_client_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + signer: string, + params?: ibc_core_client_v1_client_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + diff --git a/proto/ibc/core/client/v1/tx_pb.js b/codegen/ibc/core/client/v1/tx_pb.js similarity index 59% rename from proto/ibc/core/client/v1/tx_pb.js rename to codegen/ibc/core/client/v1/tx_pb.js index 8dd4c49..0bd64df 100644 --- a/proto/ibc/core/client/v1/tx_pb.js +++ b/codegen/ibc/core/client/v1/tx_pb.js @@ -13,8 +13,12 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var cosmos_msg_v1_msg_pb = require('../../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +var cosmos_upgrade_v1beta1_upgrade_pb = require('../../../../cosmos/upgrade/v1beta1/upgrade_pb.js'); +goog.object.extend(proto, cosmos_upgrade_v1beta1_upgrade_pb); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); @@ -23,10 +27,16 @@ var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/clien goog.object.extend(proto, ibc_core_client_v1_client_pb); goog.exportSymbol('proto.ibc.core.client.v1.MsgCreateClient', null, global); goog.exportSymbol('proto.ibc.core.client.v1.MsgCreateClientResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.MsgRecoverClient', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.MsgRecoverClientResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.MsgSubmitMisbehaviour', null, global); goog.exportSymbol('proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.MsgUpdateClient', null, global); goog.exportSymbol('proto.ibc.core.client.v1.MsgUpdateClientResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.MsgUpdateParamsResponse', null, global); goog.exportSymbol('proto.ibc.core.client.v1.MsgUpgradeClient', null, global); goog.exportSymbol('proto.ibc.core.client.v1.MsgUpgradeClientResponse', null, global); /** @@ -197,6 +207,132 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.displayName = 'proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.MsgRecoverClient = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgRecoverClient, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgRecoverClient.displayName = 'proto.ibc.core.client.v1.MsgRecoverClient'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.MsgRecoverClientResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgRecoverClientResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgRecoverClientResponse.displayName = 'proto.ibc.core.client.v1.MsgRecoverClientResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.displayName = 'proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.displayName = 'proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpdateParams.displayName = 'proto.ibc.core.client.v1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.client.v1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpdateParamsResponse.displayName = 'proto.ibc.core.client.v1.MsgUpdateParamsResponse'; +} @@ -563,7 +699,7 @@ proto.ibc.core.client.v1.MsgUpdateClient.prototype.toObject = function(opt_inclu proto.ibc.core.client.v1.MsgUpdateClient.toObject = function(includeInstance, msg) { var f, obj = { clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), - header: (f = msg.getHeader()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + clientMessage: (f = msg.getClientMessage()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), signer: jspb.Message.getFieldWithDefault(msg, 3, "") }; @@ -608,7 +744,7 @@ proto.ibc.core.client.v1.MsgUpdateClient.deserializeBinaryFromReader = function( case 2: var value = new google_protobuf_any_pb.Any; reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setHeader(value); + msg.setClientMessage(value); break; case 3: var value = /** @type {string} */ (reader.readString()); @@ -650,7 +786,7 @@ proto.ibc.core.client.v1.MsgUpdateClient.serializeBinaryToWriter = function(mess f ); } - f = message.getHeader(); + f = message.getClientMessage(); if (f != null) { writer.writeMessage( 2, @@ -687,10 +823,10 @@ proto.ibc.core.client.v1.MsgUpdateClient.prototype.setClientId = function(value) /** - * optional google.protobuf.Any header = 2; + * optional google.protobuf.Any client_message = 2; * @return {?proto.google.protobuf.Any} */ -proto.ibc.core.client.v1.MsgUpdateClient.prototype.getHeader = function() { +proto.ibc.core.client.v1.MsgUpdateClient.prototype.getClientMessage = function() { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); }; @@ -700,7 +836,7 @@ proto.ibc.core.client.v1.MsgUpdateClient.prototype.getHeader = function() { * @param {?proto.google.protobuf.Any|undefined} value * @return {!proto.ibc.core.client.v1.MsgUpdateClient} returns this */ -proto.ibc.core.client.v1.MsgUpdateClient.prototype.setHeader = function(value) { +proto.ibc.core.client.v1.MsgUpdateClient.prototype.setClientMessage = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; @@ -709,8 +845,8 @@ proto.ibc.core.client.v1.MsgUpdateClient.prototype.setHeader = function(value) { * Clears the message field making it undefined. * @return {!proto.ibc.core.client.v1.MsgUpdateClient} returns this */ -proto.ibc.core.client.v1.MsgUpdateClient.prototype.clearHeader = function() { - return this.setHeader(undefined); +proto.ibc.core.client.v1.MsgUpdateClient.prototype.clearClientMessage = function() { + return this.setClientMessage(undefined); }; @@ -718,7 +854,7 @@ proto.ibc.core.client.v1.MsgUpdateClient.prototype.clearHeader = function() { * Returns whether this field is set. * @return {boolean} */ -proto.ibc.core.client.v1.MsgUpdateClient.prototype.hasHeader = function() { +proto.ibc.core.client.v1.MsgUpdateClient.prototype.hasClientMessage = function() { return jspb.Message.getField(this, 2) != null; }; @@ -1625,4 +1761,910 @@ proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.serializeBinaryToWriter = }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.MsgRecoverClient.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgRecoverClient.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.MsgRecoverClient} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgRecoverClient.toObject = function(includeInstance, msg) { + var f, obj = { + subjectClientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + substituteClientId: jspb.Message.getFieldWithDefault(msg, 2, ""), + signer: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.MsgRecoverClient} + */ +proto.ibc.core.client.v1.MsgRecoverClient.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgRecoverClient; + return proto.ibc.core.client.v1.MsgRecoverClient.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.MsgRecoverClient} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgRecoverClient} + */ +proto.ibc.core.client.v1.MsgRecoverClient.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSubjectClientId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSubstituteClientId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgRecoverClient.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgRecoverClient.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.MsgRecoverClient} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgRecoverClient.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubjectClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSubstituteClientId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string subject_client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.MsgRecoverClient.prototype.getSubjectClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgRecoverClient} returns this + */ +proto.ibc.core.client.v1.MsgRecoverClient.prototype.setSubjectClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string substitute_client_id = 2; + * @return {string} + */ +proto.ibc.core.client.v1.MsgRecoverClient.prototype.getSubstituteClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgRecoverClient} returns this + */ +proto.ibc.core.client.v1.MsgRecoverClient.prototype.setSubstituteClientId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.client.v1.MsgRecoverClient.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgRecoverClient} returns this + */ +proto.ibc.core.client.v1.MsgRecoverClient.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.MsgRecoverClientResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgRecoverClientResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.MsgRecoverClientResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgRecoverClientResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.MsgRecoverClientResponse} + */ +proto.ibc.core.client.v1.MsgRecoverClientResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgRecoverClientResponse; + return proto.ibc.core.client.v1.MsgRecoverClientResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.MsgRecoverClientResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgRecoverClientResponse} + */ +proto.ibc.core.client.v1.MsgRecoverClientResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgRecoverClientResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgRecoverClientResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.MsgRecoverClientResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgRecoverClientResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.toObject = function(includeInstance, msg) { + var f, obj = { + plan: (f = msg.getPlan()) && cosmos_upgrade_v1beta1_upgrade_pb.Plan.toObject(includeInstance, f), + upgradedClientState: (f = msg.getUpgradedClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + signer: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade; + return proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_upgrade_v1beta1_upgrade_pb.Plan; + reader.readMessage(value,cosmos_upgrade_v1beta1_upgrade_pb.Plan.deserializeBinaryFromReader); + msg.setPlan(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setUpgradedClientState(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPlan(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_upgrade_v1beta1_upgrade_pb.Plan.serializeBinaryToWriter + ); + } + f = message.getUpgradedClientState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional cosmos.upgrade.v1beta1.Plan plan = 1; + * @return {?proto.cosmos.upgrade.v1beta1.Plan} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.getPlan = function() { + return /** @type{?proto.cosmos.upgrade.v1beta1.Plan} */ ( + jspb.Message.getWrapperField(this, cosmos_upgrade_v1beta1_upgrade_pb.Plan, 1)); +}; + + +/** + * @param {?proto.cosmos.upgrade.v1beta1.Plan|undefined} value + * @return {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} returns this +*/ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.setPlan = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} returns this + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.clearPlan = function() { + return this.setPlan(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.hasPlan = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Any upgraded_client_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.getUpgradedClientState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} returns this +*/ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.setUpgradedClientState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} returns this + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.clearUpgradedClientState = function() { + return this.setUpgradedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.hasUpgradedClientState = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade} returns this + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgrade.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse; + return proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + signer: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && ibc_core_client_v1_client_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.MsgUpdateParams} + */ +proto.ibc.core.client.v1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpdateParams; + return proto.ibc.core.client.v1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpdateParams} + */ +proto.ibc.core.client.v1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 2: + var value = new ibc_core_client_v1_client_pb.Params; + reader.readMessage(value,ibc_core_client_v1_client_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string signer = 1; + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpdateParams.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgUpdateParams} returns this + */ +proto.ibc.core.client.v1.MsgUpdateParams.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Params params = 2; + * @return {?proto.ibc.core.client.v1.Params} + */ +proto.ibc.core.client.v1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.ibc.core.client.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Params, 2)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Params|undefined} value + * @return {!proto.ibc.core.client.v1.MsgUpdateParams} returns this +*/ +proto.ibc.core.client.v1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgUpdateParams} returns this + */ +proto.ibc.core.client.v1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.client.v1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.client.v1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.client.v1.MsgUpdateParamsResponse} + */ +proto.ibc.core.client.v1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpdateParamsResponse; + return proto.ibc.core.client.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.client.v1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpdateParamsResponse} + */ +proto.ibc.core.client.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.client.v1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/proto/ibc/core/client/v1/tx_pb_service.d.ts b/codegen/ibc/core/client/v1/tx_pb_service.d.ts similarity index 65% rename from proto/ibc/core/client/v1/tx_pb_service.d.ts rename to codegen/ibc/core/client/v1/tx_pb_service.d.ts index d8be7b1..3de77ae 100644 --- a/proto/ibc/core/client/v1/tx_pb_service.d.ts +++ b/codegen/ibc/core/client/v1/tx_pb_service.d.ts @@ -40,12 +40,42 @@ type MsgSubmitMisbehaviour = { readonly responseType: typeof ibc_core_client_v1_tx_pb.MsgSubmitMisbehaviourResponse; }; +type MsgRecoverClient = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_client_v1_tx_pb.MsgRecoverClient; + readonly responseType: typeof ibc_core_client_v1_tx_pb.MsgRecoverClientResponse; +}; + +type MsgIBCSoftwareUpgrade = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_client_v1_tx_pb.MsgIBCSoftwareUpgrade; + readonly responseType: typeof ibc_core_client_v1_tx_pb.MsgIBCSoftwareUpgradeResponse; +}; + +type MsgUpdateClientParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_client_v1_tx_pb.MsgUpdateParams; + readonly responseType: typeof ibc_core_client_v1_tx_pb.MsgUpdateParamsResponse; +}; + export class Msg { static readonly serviceName: string; static readonly CreateClient: MsgCreateClient; static readonly UpdateClient: MsgUpdateClient; static readonly UpgradeClient: MsgUpgradeClient; static readonly SubmitMisbehaviour: MsgSubmitMisbehaviour; + static readonly RecoverClient: MsgRecoverClient; + static readonly IBCSoftwareUpgrade: MsgIBCSoftwareUpgrade; + static readonly UpdateClientParams: MsgUpdateClientParams; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -116,5 +146,32 @@ export class MsgClient { requestMessage: ibc_core_client_v1_tx_pb.MsgSubmitMisbehaviour, callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_tx_pb.MsgSubmitMisbehaviourResponse|null) => void ): UnaryResponse; + recoverClient( + requestMessage: ibc_core_client_v1_tx_pb.MsgRecoverClient, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_tx_pb.MsgRecoverClientResponse|null) => void + ): UnaryResponse; + recoverClient( + requestMessage: ibc_core_client_v1_tx_pb.MsgRecoverClient, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_tx_pb.MsgRecoverClientResponse|null) => void + ): UnaryResponse; + iBCSoftwareUpgrade( + requestMessage: ibc_core_client_v1_tx_pb.MsgIBCSoftwareUpgrade, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_tx_pb.MsgIBCSoftwareUpgradeResponse|null) => void + ): UnaryResponse; + iBCSoftwareUpgrade( + requestMessage: ibc_core_client_v1_tx_pb.MsgIBCSoftwareUpgrade, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_tx_pb.MsgIBCSoftwareUpgradeResponse|null) => void + ): UnaryResponse; + updateClientParams( + requestMessage: ibc_core_client_v1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateClientParams( + requestMessage: ibc_core_client_v1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: ibc_core_client_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; } diff --git a/proto/council/v1beta1/query_pb_service.js b/codegen/ibc/core/client/v1/tx_pb_service.js similarity index 66% rename from proto/council/v1beta1/query_pb_service.js rename to codegen/ibc/core/client/v1/tx_pb_service.js index 5895c93..4d8f418 100644 --- a/proto/council/v1beta1/query_pb_service.js +++ b/codegen/ibc/core/client/v1/tx_pb_service.js @@ -1,90 +1,90 @@ -// package: council.v1beta1 -// file: council/v1beta1/query.proto +// package: ibc.core.client.v1 +// file: ibc/core/client/v1/tx.proto -var council_v1beta1_query_pb = require("../../council/v1beta1/query_pb"); +var ibc_core_client_v1_tx_pb = require("../../../../ibc/core/client/v1/tx_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; -var Query = (function () { - function Query() {} - Query.serviceName = "council.v1beta1.Query"; - return Query; +var Msg = (function () { + function Msg() {} + Msg.serviceName = "ibc.core.client.v1.Msg"; + return Msg; }()); -Query.Params = { - methodName: "Params", - service: Query, +Msg.CreateClient = { + methodName: "CreateClient", + service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_query_pb.QueryParamsRequest, - responseType: council_v1beta1_query_pb.QueryParamsResponse + requestType: ibc_core_client_v1_tx_pb.MsgCreateClient, + responseType: ibc_core_client_v1_tx_pb.MsgCreateClientResponse }; -Query.CouncilInfo = { - methodName: "CouncilInfo", - service: Query, +Msg.UpdateClient = { + methodName: "UpdateClient", + service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_query_pb.QueryCouncilInfoRequest, - responseType: council_v1beta1_query_pb.QueryCouncilInfoResponse + requestType: ibc_core_client_v1_tx_pb.MsgUpdateClient, + responseType: ibc_core_client_v1_tx_pb.MsgUpdateClientResponse }; -Query.CouncilInfos = { - methodName: "CouncilInfos", - service: Query, +Msg.UpgradeClient = { + methodName: "UpgradeClient", + service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_query_pb.QueryCouncilInfosRequest, - responseType: council_v1beta1_query_pb.QueryCouncilInfosResponse + requestType: ibc_core_client_v1_tx_pb.MsgUpgradeClient, + responseType: ibc_core_client_v1_tx_pb.MsgUpgradeClientResponse }; -Query.Proposal = { - methodName: "Proposal", - service: Query, +Msg.SubmitMisbehaviour = { + methodName: "SubmitMisbehaviour", + service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_query_pb.QueryProposalRequest, - responseType: council_v1beta1_query_pb.QueryProposalResponse + requestType: ibc_core_client_v1_tx_pb.MsgSubmitMisbehaviour, + responseType: ibc_core_client_v1_tx_pb.MsgSubmitMisbehaviourResponse }; -Query.Proposals = { - methodName: "Proposals", - service: Query, +Msg.RecoverClient = { + methodName: "RecoverClient", + service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_query_pb.QueryProposalsRequest, - responseType: council_v1beta1_query_pb.QueryProposalsResponse + requestType: ibc_core_client_v1_tx_pb.MsgRecoverClient, + responseType: ibc_core_client_v1_tx_pb.MsgRecoverClientResponse }; -Query.Votes = { - methodName: "Votes", - service: Query, +Msg.IBCSoftwareUpgrade = { + methodName: "IBCSoftwareUpgrade", + service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_query_pb.QueryVotesRequest, - responseType: council_v1beta1_query_pb.QueryVotesResponse + requestType: ibc_core_client_v1_tx_pb.MsgIBCSoftwareUpgrade, + responseType: ibc_core_client_v1_tx_pb.MsgIBCSoftwareUpgradeResponse }; -Query.TallyResult = { - methodName: "TallyResult", - service: Query, +Msg.UpdateClientParams = { + methodName: "UpdateClientParams", + service: Msg, requestStream: false, responseStream: false, - requestType: council_v1beta1_query_pb.QueryTallyResultRequest, - responseType: council_v1beta1_query_pb.QueryTallyResultResponse + requestType: ibc_core_client_v1_tx_pb.MsgUpdateParams, + responseType: ibc_core_client_v1_tx_pb.MsgUpdateParamsResponse }; -exports.Query = Query; +exports.Msg = Msg; -function QueryClient(serviceHost, options) { +function MsgClient(serviceHost, options) { this.serviceHost = serviceHost; this.options = options || {}; } -QueryClient.prototype.params = function params(requestMessage, metadata, callback) { +MsgClient.prototype.createClient = function createClient(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Params, { + var client = grpc.unary(Msg.CreateClient, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -111,11 +111,11 @@ QueryClient.prototype.params = function params(requestMessage, metadata, callbac }; }; -QueryClient.prototype.councilInfo = function councilInfo(requestMessage, metadata, callback) { +MsgClient.prototype.updateClient = function updateClient(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.CouncilInfo, { + var client = grpc.unary(Msg.UpdateClient, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -142,11 +142,11 @@ QueryClient.prototype.councilInfo = function councilInfo(requestMessage, metadat }; }; -QueryClient.prototype.councilInfos = function councilInfos(requestMessage, metadata, callback) { +MsgClient.prototype.upgradeClient = function upgradeClient(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.CouncilInfos, { + var client = grpc.unary(Msg.UpgradeClient, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -173,11 +173,11 @@ QueryClient.prototype.councilInfos = function councilInfos(requestMessage, metad }; }; -QueryClient.prototype.proposal = function proposal(requestMessage, metadata, callback) { +MsgClient.prototype.submitMisbehaviour = function submitMisbehaviour(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Proposal, { + var client = grpc.unary(Msg.SubmitMisbehaviour, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -204,11 +204,11 @@ QueryClient.prototype.proposal = function proposal(requestMessage, metadata, cal }; }; -QueryClient.prototype.proposals = function proposals(requestMessage, metadata, callback) { +MsgClient.prototype.recoverClient = function recoverClient(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Proposals, { + var client = grpc.unary(Msg.RecoverClient, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -235,11 +235,11 @@ QueryClient.prototype.proposals = function proposals(requestMessage, metadata, c }; }; -QueryClient.prototype.votes = function votes(requestMessage, metadata, callback) { +MsgClient.prototype.iBCSoftwareUpgrade = function iBCSoftwareUpgrade(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.Votes, { + var client = grpc.unary(Msg.IBCSoftwareUpgrade, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -266,11 +266,11 @@ QueryClient.prototype.votes = function votes(requestMessage, metadata, callback) }; }; -QueryClient.prototype.tallyResult = function tallyResult(requestMessage, metadata, callback) { +MsgClient.prototype.updateClientParams = function updateClientParams(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(Query.TallyResult, { + var client = grpc.unary(Msg.UpdateClientParams, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -297,5 +297,5 @@ QueryClient.prototype.tallyResult = function tallyResult(requestMessage, metadat }; }; -exports.QueryClient = QueryClient; +exports.MsgClient = MsgClient; diff --git a/codegen/ibc/core/commitment/v1/commitment.ts b/codegen/ibc/core/commitment/v1/commitment.ts new file mode 100644 index 0000000..a91cdc5 --- /dev/null +++ b/codegen/ibc/core/commitment/v1/commitment.ts @@ -0,0 +1,278 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/commitment/v1/commitment.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../cosmos/ics23/v1/proofs"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.core.commitment.v1 { + export class MerkleRoot extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + hash?: Uint8Array; + }): MerkleRoot { + const message = new MerkleRoot({}); + if (data.hash != null) { + message.hash = data.hash; + } + return message; + } + toObject() { + const data: { + hash?: Uint8Array; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + 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.hash.length) + writer.writeBytes(1, this.hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MerkleRoot { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MerkleRoot(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MerkleRoot { + return MerkleRoot.deserialize(bytes); + } + } + export class MerklePrefix extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key_prefix?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key_prefix" in data && data.key_prefix != undefined) { + this.key_prefix = data.key_prefix; + } + } + } + get key_prefix() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key_prefix(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + key_prefix?: Uint8Array; + }): MerklePrefix { + const message = new MerklePrefix({}); + if (data.key_prefix != null) { + message.key_prefix = data.key_prefix; + } + return message; + } + toObject() { + const data: { + key_prefix?: Uint8Array; + } = {}; + if (this.key_prefix != null) { + data.key_prefix = this.key_prefix; + } + 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.key_prefix.length) + writer.writeBytes(1, this.key_prefix); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MerklePrefix { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MerklePrefix(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key_prefix = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MerklePrefix { + return MerklePrefix.deserialize(bytes); + } + } + export class MerklePath extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key_path?: string[]; + }) { + 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 ("key_path" in data && data.key_path != undefined) { + this.key_path = data.key_path; + } + } + } + get key_path() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set key_path(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + key_path?: string[]; + }): MerklePath { + const message = new MerklePath({}); + if (data.key_path != null) { + message.key_path = data.key_path; + } + return message; + } + toObject() { + const data: { + key_path?: string[]; + } = {}; + if (this.key_path != null) { + data.key_path = this.key_path; + } + 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.key_path.length) + writer.writeRepeatedString(1, this.key_path); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MerklePath { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MerklePath(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MerklePath { + return MerklePath.deserialize(bytes); + } + } + export class MerkleProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + proofs?: dependency_2.cosmos.ics23.v1.CommitmentProof[]; + }) { + 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 ("proofs" in data && data.proofs != undefined) { + this.proofs = data.proofs; + } + } + } + get proofs() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.ics23.v1.CommitmentProof, 1) as dependency_2.cosmos.ics23.v1.CommitmentProof[]; + } + set proofs(value: dependency_2.cosmos.ics23.v1.CommitmentProof[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + proofs?: ReturnType[]; + }): MerkleProof { + const message = new MerkleProof({}); + if (data.proofs != null) { + message.proofs = data.proofs.map(item => dependency_2.cosmos.ics23.v1.CommitmentProof.fromObject(item)); + } + return message; + } + toObject() { + const data: { + proofs?: ReturnType[]; + } = {}; + if (this.proofs != null) { + data.proofs = this.proofs.map((item: dependency_2.cosmos.ics23.v1.CommitmentProof) => item.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.proofs.length) + writer.writeRepeatedMessage(1, this.proofs, (item: dependency_2.cosmos.ics23.v1.CommitmentProof) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MerkleProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MerkleProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.proofs, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.cosmos.ics23.v1.CommitmentProof.deserialize(reader), dependency_2.cosmos.ics23.v1.CommitmentProof)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MerkleProof { + return MerkleProof.deserialize(bytes); + } + } +} diff --git a/proto/ibc/core/commitment/v1/commitment_pb.d.ts b/codegen/ibc/core/commitment/v1/commitment_pb.d.ts similarity index 89% rename from proto/ibc/core/commitment/v1/commitment_pb.d.ts rename to codegen/ibc/core/commitment/v1/commitment_pb.d.ts index 996358a..430e3d7 100644 --- a/proto/ibc/core/commitment/v1/commitment_pb.d.ts +++ b/codegen/ibc/core/commitment/v1/commitment_pb.d.ts @@ -3,7 +3,7 @@ import * as jspb from "google-protobuf"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; -import * as confio_proofs_pb from "../../../../confio/proofs_pb"; +import * as cosmos_ics23_v1_proofs_pb from "../../../../cosmos/ics23/v1/proofs_pb"; export class MerkleRoot extends jspb.Message { getHash(): Uint8Array | string; @@ -73,9 +73,9 @@ export namespace MerklePath { export class MerkleProof extends jspb.Message { clearProofsList(): void; - getProofsList(): Array; - setProofsList(value: Array): void; - addProofs(value?: confio_proofs_pb.CommitmentProof, index?: number): confio_proofs_pb.CommitmentProof; + getProofsList(): Array; + setProofsList(value: Array): void; + addProofs(value?: cosmos_ics23_v1_proofs_pb.CommitmentProof, index?: number): cosmos_ics23_v1_proofs_pb.CommitmentProof; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MerkleProof.AsObject; @@ -89,7 +89,7 @@ export class MerkleProof extends jspb.Message { export namespace MerkleProof { export type AsObject = { - proofsList: Array, + proofsList: Array, } } diff --git a/proto/ibc/core/commitment/v1/commitment_pb.js b/codegen/ibc/core/commitment/v1/commitment_pb.js similarity index 95% rename from proto/ibc/core/commitment/v1/commitment_pb.js rename to codegen/ibc/core/commitment/v1/commitment_pb.js index 44eea0c..d979f33 100644 --- a/proto/ibc/core/commitment/v1/commitment_pb.js +++ b/codegen/ibc/core/commitment/v1/commitment_pb.js @@ -13,12 +13,12 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); -var confio_proofs_pb = require('../../../../confio/proofs_pb.js'); -goog.object.extend(proto, confio_proofs_pb); +var cosmos_ics23_v1_proofs_pb = require('../../../../cosmos/ics23/v1/proofs_pb.js'); +goog.object.extend(proto, cosmos_ics23_v1_proofs_pb); goog.exportSymbol('proto.ibc.core.commitment.v1.MerklePath', null, global); goog.exportSymbol('proto.ibc.core.commitment.v1.MerklePrefix', null, global); goog.exportSymbol('proto.ibc.core.commitment.v1.MerkleProof', null, global); @@ -611,7 +611,7 @@ proto.ibc.core.commitment.v1.MerkleProof.prototype.toObject = function(opt_inclu proto.ibc.core.commitment.v1.MerkleProof.toObject = function(includeInstance, msg) { var f, obj = { proofsList: jspb.Message.toObjectList(msg.getProofsList(), - confio_proofs_pb.CommitmentProof.toObject, includeInstance) + cosmos_ics23_v1_proofs_pb.CommitmentProof.toObject, includeInstance) }; if (includeInstance) { @@ -649,8 +649,8 @@ proto.ibc.core.commitment.v1.MerkleProof.deserializeBinaryFromReader = function( var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new confio_proofs_pb.CommitmentProof; - reader.readMessage(value,confio_proofs_pb.CommitmentProof.deserializeBinaryFromReader); + var value = new cosmos_ics23_v1_proofs_pb.CommitmentProof; + reader.readMessage(value,cosmos_ics23_v1_proofs_pb.CommitmentProof.deserializeBinaryFromReader); msg.addProofs(value); break; default: @@ -687,24 +687,24 @@ proto.ibc.core.commitment.v1.MerkleProof.serializeBinaryToWriter = function(mess writer.writeRepeatedMessage( 1, f, - confio_proofs_pb.CommitmentProof.serializeBinaryToWriter + cosmos_ics23_v1_proofs_pb.CommitmentProof.serializeBinaryToWriter ); } }; /** - * repeated ics23.CommitmentProof proofs = 1; - * @return {!Array} + * repeated cosmos.ics23.v1.CommitmentProof proofs = 1; + * @return {!Array} */ proto.ibc.core.commitment.v1.MerkleProof.prototype.getProofsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, confio_proofs_pb.CommitmentProof, 1)); + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_ics23_v1_proofs_pb.CommitmentProof, 1)); }; /** - * @param {!Array} value + * @param {!Array} value * @return {!proto.ibc.core.commitment.v1.MerkleProof} returns this */ proto.ibc.core.commitment.v1.MerkleProof.prototype.setProofsList = function(value) { @@ -713,12 +713,12 @@ proto.ibc.core.commitment.v1.MerkleProof.prototype.setProofsList = function(valu /** - * @param {!proto.ics23.CommitmentProof=} opt_value + * @param {!proto.cosmos.ics23.v1.CommitmentProof=} opt_value * @param {number=} opt_index - * @return {!proto.ics23.CommitmentProof} + * @return {!proto.cosmos.ics23.v1.CommitmentProof} */ proto.ibc.core.commitment.v1.MerkleProof.prototype.addProofs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ics23.CommitmentProof, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.ics23.v1.CommitmentProof, opt_index); }; diff --git a/proto/ibc/core/commitment/v1/commitment_pb_service.d.ts b/codegen/ibc/core/commitment/v1/commitment_pb_service.d.ts similarity index 100% rename from proto/ibc/core/commitment/v1/commitment_pb_service.d.ts rename to codegen/ibc/core/commitment/v1/commitment_pb_service.d.ts diff --git a/proto/ibc/core/commitment/v1/commitment_pb_service.js b/codegen/ibc/core/commitment/v1/commitment_pb_service.js similarity index 100% rename from proto/ibc/core/commitment/v1/commitment_pb_service.js rename to codegen/ibc/core/commitment/v1/commitment_pb_service.js diff --git a/codegen/ibc/core/connection/v1/connection.ts b/codegen/ibc/core/connection/v1/connection.ts new file mode 100644 index 0000000..f937951 --- /dev/null +++ b/codegen/ibc/core/connection/v1/connection.ts @@ -0,0 +1,793 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/connection/v1/connection.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../commitment/v1/commitment"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.core.connection.v1 { + export enum State { + STATE_UNINITIALIZED_UNSPECIFIED = 0, + STATE_INIT = 1, + STATE_TRYOPEN = 2, + STATE_OPEN = 3 + } + export class ConnectionEnd extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + versions?: Version[]; + state?: State; + counterparty?: Counterparty; + delay_period?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], 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; + } + if ("versions" in data && data.versions != undefined) { + this.versions = data.versions; + } + if ("state" in data && data.state != undefined) { + this.state = data.state; + } + if ("counterparty" in data && data.counterparty != undefined) { + this.counterparty = data.counterparty; + } + if ("delay_period" in data && data.delay_period != undefined) { + this.delay_period = data.delay_period; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get versions() { + return pb_1.Message.getRepeatedWrapperField(this, Version, 2) as Version[]; + } + set versions(value: Version[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get state() { + return pb_1.Message.getFieldWithDefault(this, 3, State.STATE_UNINITIALIZED_UNSPECIFIED) as State; + } + set state(value: State) { + pb_1.Message.setField(this, 3, value); + } + get counterparty() { + return pb_1.Message.getWrapperField(this, Counterparty, 4) as Counterparty; + } + set counterparty(value: Counterparty) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_counterparty() { + return pb_1.Message.getField(this, 4) != null; + } + get delay_period() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set delay_period(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + client_id?: string; + versions?: ReturnType[]; + state?: State; + counterparty?: ReturnType; + delay_period?: number; + }): ConnectionEnd { + const message = new ConnectionEnd({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.versions != null) { + message.versions = data.versions.map(item => Version.fromObject(item)); + } + if (data.state != null) { + message.state = data.state; + } + if (data.counterparty != null) { + message.counterparty = Counterparty.fromObject(data.counterparty); + } + if (data.delay_period != null) { + message.delay_period = data.delay_period; + } + return message; + } + toObject() { + const data: { + client_id?: string; + versions?: ReturnType[]; + state?: State; + counterparty?: ReturnType; + delay_period?: number; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.versions != null) { + data.versions = this.versions.map((item: Version) => item.toObject()); + } + if (this.state != null) { + data.state = this.state; + } + if (this.counterparty != null) { + data.counterparty = this.counterparty.toObject(); + } + if (this.delay_period != null) { + data.delay_period = this.delay_period; + } + 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 (this.versions.length) + writer.writeRepeatedMessage(2, this.versions, (item: Version) => item.serialize(writer)); + if (this.state != State.STATE_UNINITIALIZED_UNSPECIFIED) + writer.writeEnum(3, this.state); + if (this.has_counterparty) + writer.writeMessage(4, this.counterparty, () => this.counterparty.serialize(writer)); + if (this.delay_period != 0) + writer.writeUint64(5, this.delay_period); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConnectionEnd { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConnectionEnd(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.versions, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Version.deserialize(reader), Version)); + break; + case 3: + message.state = reader.readEnum(); + break; + case 4: + reader.readMessage(message.counterparty, () => message.counterparty = Counterparty.deserialize(reader)); + break; + case 5: + message.delay_period = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConnectionEnd { + return ConnectionEnd.deserialize(bytes); + } + } + export class IdentifiedConnection extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + client_id?: string; + versions?: Version[]; + state?: State; + counterparty?: Counterparty; + delay_period?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("client_id" in data && data.client_id != undefined) { + this.client_id = data.client_id; + } + if ("versions" in data && data.versions != undefined) { + this.versions = data.versions; + } + if ("state" in data && data.state != undefined) { + this.state = data.state; + } + if ("counterparty" in data && data.counterparty != undefined) { + this.counterparty = data.counterparty; + } + if ("delay_period" in data && data.delay_period != undefined) { + this.delay_period = data.delay_period; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + 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 versions() { + return pb_1.Message.getRepeatedWrapperField(this, Version, 3) as Version[]; + } + set versions(value: Version[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get state() { + return pb_1.Message.getFieldWithDefault(this, 4, State.STATE_UNINITIALIZED_UNSPECIFIED) as State; + } + set state(value: State) { + pb_1.Message.setField(this, 4, value); + } + get counterparty() { + return pb_1.Message.getWrapperField(this, Counterparty, 5) as Counterparty; + } + set counterparty(value: Counterparty) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_counterparty() { + return pb_1.Message.getField(this, 5) != null; + } + get delay_period() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set delay_period(value: number) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + id?: string; + client_id?: string; + versions?: ReturnType[]; + state?: State; + counterparty?: ReturnType; + delay_period?: number; + }): IdentifiedConnection { + const message = new IdentifiedConnection({}); + if (data.id != null) { + message.id = data.id; + } + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.versions != null) { + message.versions = data.versions.map(item => Version.fromObject(item)); + } + if (data.state != null) { + message.state = data.state; + } + if (data.counterparty != null) { + message.counterparty = Counterparty.fromObject(data.counterparty); + } + if (data.delay_period != null) { + message.delay_period = data.delay_period; + } + return message; + } + toObject() { + const data: { + id?: string; + client_id?: string; + versions?: ReturnType[]; + state?: State; + counterparty?: ReturnType; + delay_period?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.versions != null) { + data.versions = this.versions.map((item: Version) => item.toObject()); + } + if (this.state != null) { + data.state = this.state; + } + if (this.counterparty != null) { + data.counterparty = this.counterparty.toObject(); + } + if (this.delay_period != null) { + data.delay_period = this.delay_period; + } + 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.id.length) + writer.writeString(1, this.id); + if (this.client_id.length) + writer.writeString(2, this.client_id); + if (this.versions.length) + writer.writeRepeatedMessage(3, this.versions, (item: Version) => item.serialize(writer)); + if (this.state != State.STATE_UNINITIALIZED_UNSPECIFIED) + writer.writeEnum(4, this.state); + if (this.has_counterparty) + writer.writeMessage(5, this.counterparty, () => this.counterparty.serialize(writer)); + if (this.delay_period != 0) + writer.writeUint64(6, this.delay_period); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IdentifiedConnection { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IdentifiedConnection(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readString(); + break; + case 2: + message.client_id = reader.readString(); + break; + case 3: + reader.readMessage(message.versions, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Version.deserialize(reader), Version)); + break; + case 4: + message.state = reader.readEnum(); + break; + case 5: + reader.readMessage(message.counterparty, () => message.counterparty = Counterparty.deserialize(reader)); + break; + case 6: + message.delay_period = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IdentifiedConnection { + return IdentifiedConnection.deserialize(bytes); + } + } + export class Counterparty extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + connection_id?: string; + prefix?: dependency_2.ibc.core.commitment.v1.MerklePrefix; + }) { + 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; + } + if ("connection_id" in data && data.connection_id != undefined) { + this.connection_id = data.connection_id; + } + if ("prefix" in data && data.prefix != undefined) { + this.prefix = data.prefix; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get connection_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set connection_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get prefix() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.core.commitment.v1.MerklePrefix, 3) as dependency_2.ibc.core.commitment.v1.MerklePrefix; + } + set prefix(value: dependency_2.ibc.core.commitment.v1.MerklePrefix) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_prefix() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + client_id?: string; + connection_id?: string; + prefix?: ReturnType; + }): Counterparty { + const message = new Counterparty({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.connection_id != null) { + message.connection_id = data.connection_id; + } + if (data.prefix != null) { + message.prefix = dependency_2.ibc.core.commitment.v1.MerklePrefix.fromObject(data.prefix); + } + return message; + } + toObject() { + const data: { + client_id?: string; + connection_id?: string; + prefix?: ReturnType; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.connection_id != null) { + data.connection_id = this.connection_id; + } + if (this.prefix != null) { + data.prefix = this.prefix.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.client_id.length) + writer.writeString(1, this.client_id); + if (this.connection_id.length) + writer.writeString(2, this.connection_id); + if (this.has_prefix) + writer.writeMessage(3, this.prefix, () => this.prefix.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Counterparty { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Counterparty(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + message.connection_id = reader.readString(); + break; + case 3: + reader.readMessage(message.prefix, () => message.prefix = dependency_2.ibc.core.commitment.v1.MerklePrefix.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Counterparty { + return Counterparty.deserialize(bytes); + } + } + export class ClientPaths extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paths?: string[]; + }) { + 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 ("paths" in data && data.paths != undefined) { + this.paths = data.paths; + } + } + } + get paths() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set paths(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + paths?: string[]; + }): ClientPaths { + const message = new ClientPaths({}); + if (data.paths != null) { + message.paths = data.paths; + } + return message; + } + toObject() { + const data: { + paths?: string[]; + } = {}; + if (this.paths != null) { + data.paths = this.paths; + } + 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.paths.length) + writer.writeRepeatedString(1, this.paths); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientPaths { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientPaths(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientPaths { + return ClientPaths.deserialize(bytes); + } + } + export class ConnectionPaths extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + paths?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], 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; + } + if ("paths" in data && data.paths != undefined) { + this.paths = data.paths; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get paths() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set paths(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + client_id?: string; + paths?: string[]; + }): ConnectionPaths { + const message = new ConnectionPaths({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.paths != null) { + message.paths = data.paths; + } + return message; + } + toObject() { + const data: { + client_id?: string; + paths?: string[]; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.paths != null) { + data.paths = this.paths; + } + 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 (this.paths.length) + writer.writeRepeatedString(2, this.paths); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConnectionPaths { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConnectionPaths(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConnectionPaths { + return ConnectionPaths.deserialize(bytes); + } + } + export class Version extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + identifier?: string; + features?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("identifier" in data && data.identifier != undefined) { + this.identifier = data.identifier; + } + if ("features" in data && data.features != undefined) { + this.features = data.features; + } + } + } + get identifier() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set identifier(value: string) { + pb_1.Message.setField(this, 1, value); + } + get features() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set features(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + identifier?: string; + features?: string[]; + }): Version { + const message = new Version({}); + if (data.identifier != null) { + message.identifier = data.identifier; + } + if (data.features != null) { + message.features = data.features; + } + return message; + } + toObject() { + const data: { + identifier?: string; + features?: string[]; + } = {}; + if (this.identifier != null) { + data.identifier = this.identifier; + } + if (this.features != null) { + data.features = this.features; + } + 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.identifier.length) + writer.writeString(1, this.identifier); + if (this.features.length) + writer.writeRepeatedString(2, this.features); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Version { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Version(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.identifier = reader.readString(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Version { + return Version.deserialize(bytes); + } + } + export class Params extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + max_expected_time_per_block?: 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 ("max_expected_time_per_block" in data && data.max_expected_time_per_block != undefined) { + this.max_expected_time_per_block = data.max_expected_time_per_block; + } + } + } + get max_expected_time_per_block() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set max_expected_time_per_block(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + max_expected_time_per_block?: number; + }): Params { + const message = new Params({}); + if (data.max_expected_time_per_block != null) { + message.max_expected_time_per_block = data.max_expected_time_per_block; + } + return message; + } + toObject() { + const data: { + max_expected_time_per_block?: number; + } = {}; + if (this.max_expected_time_per_block != null) { + data.max_expected_time_per_block = this.max_expected_time_per_block; + } + 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.max_expected_time_per_block != 0) + writer.writeUint64(1, this.max_expected_time_per_block); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.max_expected_time_per_block = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Params { + return Params.deserialize(bytes); + } + } +} diff --git a/proto/ibc/core/connection/v1/connection_pb.d.ts b/codegen/ibc/core/connection/v1/connection_pb.d.ts similarity index 100% rename from proto/ibc/core/connection/v1/connection_pb.d.ts rename to codegen/ibc/core/connection/v1/connection_pb.d.ts diff --git a/proto/ibc/core/connection/v1/connection_pb.js b/codegen/ibc/core/connection/v1/connection_pb.js similarity index 99% rename from proto/ibc/core/connection/v1/connection_pb.js rename to codegen/ibc/core/connection/v1/connection_pb.js index 6b7d113..9cf2e4e 100644 --- a/proto/ibc/core/connection/v1/connection_pb.js +++ b/codegen/ibc/core/connection/v1/connection_pb.js @@ -13,7 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); diff --git a/proto/ibc/core/connection/v1/connection_pb_service.d.ts b/codegen/ibc/core/connection/v1/connection_pb_service.d.ts similarity index 100% rename from proto/ibc/core/connection/v1/connection_pb_service.d.ts rename to codegen/ibc/core/connection/v1/connection_pb_service.d.ts diff --git a/proto/ibc/core/connection/v1/connection_pb_service.js b/codegen/ibc/core/connection/v1/connection_pb_service.js similarity index 100% rename from proto/ibc/core/connection/v1/connection_pb_service.js rename to codegen/ibc/core/connection/v1/connection_pb_service.js diff --git a/codegen/ibc/core/connection/v1/genesis.ts b/codegen/ibc/core/connection/v1/genesis.ts new file mode 100644 index 0000000..05157fe --- /dev/null +++ b/codegen/ibc/core/connection/v1/genesis.ts @@ -0,0 +1,149 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/connection/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./connection"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.core.connection.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + connections?: dependency_2.ibc.core.connection.v1.IdentifiedConnection[]; + client_connection_paths?: dependency_2.ibc.core.connection.v1.ConnectionPaths[]; + next_connection_sequence?: number; + params?: dependency_2.ibc.core.connection.v1.Params; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("connections" in data && data.connections != undefined) { + this.connections = data.connections; + } + if ("client_connection_paths" in data && data.client_connection_paths != undefined) { + this.client_connection_paths = data.client_connection_paths; + } + if ("next_connection_sequence" in data && data.next_connection_sequence != undefined) { + this.next_connection_sequence = data.next_connection_sequence; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get connections() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.ibc.core.connection.v1.IdentifiedConnection, 1) as dependency_2.ibc.core.connection.v1.IdentifiedConnection[]; + } + set connections(value: dependency_2.ibc.core.connection.v1.IdentifiedConnection[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get client_connection_paths() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.ibc.core.connection.v1.ConnectionPaths, 2) as dependency_2.ibc.core.connection.v1.ConnectionPaths[]; + } + set client_connection_paths(value: dependency_2.ibc.core.connection.v1.ConnectionPaths[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get next_connection_sequence() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set next_connection_sequence(value: number) { + pb_1.Message.setField(this, 3, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.core.connection.v1.Params, 4) as dependency_2.ibc.core.connection.v1.Params; + } + set params(value: dependency_2.ibc.core.connection.v1.Params) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_params() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + connections?: ReturnType[]; + client_connection_paths?: ReturnType[]; + next_connection_sequence?: number; + params?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.connections != null) { + message.connections = data.connections.map(item => dependency_2.ibc.core.connection.v1.IdentifiedConnection.fromObject(item)); + } + if (data.client_connection_paths != null) { + message.client_connection_paths = data.client_connection_paths.map(item => dependency_2.ibc.core.connection.v1.ConnectionPaths.fromObject(item)); + } + if (data.next_connection_sequence != null) { + message.next_connection_sequence = data.next_connection_sequence; + } + if (data.params != null) { + message.params = dependency_2.ibc.core.connection.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + connections?: ReturnType[]; + client_connection_paths?: ReturnType[]; + next_connection_sequence?: number; + params?: ReturnType; + } = {}; + if (this.connections != null) { + data.connections = this.connections.map((item: dependency_2.ibc.core.connection.v1.IdentifiedConnection) => item.toObject()); + } + if (this.client_connection_paths != null) { + data.client_connection_paths = this.client_connection_paths.map((item: dependency_2.ibc.core.connection.v1.ConnectionPaths) => item.toObject()); + } + if (this.next_connection_sequence != null) { + data.next_connection_sequence = this.next_connection_sequence; + } + 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.connections.length) + writer.writeRepeatedMessage(1, this.connections, (item: dependency_2.ibc.core.connection.v1.IdentifiedConnection) => item.serialize(writer)); + if (this.client_connection_paths.length) + writer.writeRepeatedMessage(2, this.client_connection_paths, (item: dependency_2.ibc.core.connection.v1.ConnectionPaths) => item.serialize(writer)); + if (this.next_connection_sequence != 0) + writer.writeUint64(3, this.next_connection_sequence); + if (this.has_params) + writer.writeMessage(4, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.connections, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.ibc.core.connection.v1.IdentifiedConnection.deserialize(reader), dependency_2.ibc.core.connection.v1.IdentifiedConnection)); + break; + case 2: + reader.readMessage(message.client_connection_paths, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.ibc.core.connection.v1.ConnectionPaths.deserialize(reader), dependency_2.ibc.core.connection.v1.ConnectionPaths)); + break; + case 3: + message.next_connection_sequence = reader.readUint64(); + break; + case 4: + reader.readMessage(message.params, () => message.params = dependency_2.ibc.core.connection.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/ibc/core/connection/v1/genesis_pb.d.ts b/codegen/ibc/core/connection/v1/genesis_pb.d.ts similarity index 100% rename from proto/ibc/core/connection/v1/genesis_pb.d.ts rename to codegen/ibc/core/connection/v1/genesis_pb.d.ts diff --git a/proto/ibc/core/connection/v1/genesis_pb.js b/codegen/ibc/core/connection/v1/genesis_pb.js similarity index 99% rename from proto/ibc/core/connection/v1/genesis_pb.js rename to codegen/ibc/core/connection/v1/genesis_pb.js index 338a9ef..3b979a7 100644 --- a/proto/ibc/core/connection/v1/genesis_pb.js +++ b/codegen/ibc/core/connection/v1/genesis_pb.js @@ -13,7 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); diff --git a/proto/ibc/core/connection/v1/genesis_pb_service.d.ts b/codegen/ibc/core/connection/v1/genesis_pb_service.d.ts similarity index 100% rename from proto/ibc/core/connection/v1/genesis_pb_service.d.ts rename to codegen/ibc/core/connection/v1/genesis_pb_service.d.ts diff --git a/proto/ibc/core/connection/v1/genesis_pb_service.js b/codegen/ibc/core/connection/v1/genesis_pb_service.js similarity index 100% rename from proto/ibc/core/connection/v1/genesis_pb_service.js rename to codegen/ibc/core/connection/v1/genesis_pb_service.js diff --git a/codegen/ibc/core/connection/v1/query.ts b/codegen/ibc/core/connection/v1/query.ts new file mode 100644 index 0000000..46fc585 --- /dev/null +++ b/codegen/ibc/core/connection/v1/query.ts @@ -0,0 +1,1236 @@ +/** + * 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; + proof?: Uint8Array; + proof_height?: ReturnType; + }): 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; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + 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; + }): 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; + } = {}; + 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[]; + pagination?: ReturnType; + height?: ReturnType; + }): 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[]; + pagination?: ReturnType; + height?: ReturnType; + } = {}; + 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; + }): 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; + } = {}; + 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; + proof?: Uint8Array; + proof_height?: ReturnType; + }): 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; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + 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; + client_id?: string; + proof?: Uint8Array; + proof_height?: ReturnType; + }): 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; + client_id?: string; + proof?: Uint8Array; + proof_height?: ReturnType; + } = {}; + 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; + }): 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; + } = {}; + 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) + writer.writeMessage(1, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.params, () => message.params = dependency_4.ibc.core.connection.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryConnectionParamsResponse { + return QueryConnectionParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Connection: { + path: "/ibc.core.connection.v1.Query/Connection", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConnectionRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConnectionRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConnectionResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConnectionResponse.deserialize(new Uint8Array(bytes)) + }, + Connections: { + path: "/ibc.core.connection.v1.Query/Connections", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConnectionsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConnectionsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConnectionsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConnectionsResponse.deserialize(new Uint8Array(bytes)) + }, + ClientConnections: { + path: "/ibc.core.connection.v1.Query/ClientConnections", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryClientConnectionsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryClientConnectionsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryClientConnectionsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryClientConnectionsResponse.deserialize(new Uint8Array(bytes)) + }, + ConnectionClientState: { + path: "/ibc.core.connection.v1.Query/ConnectionClientState", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConnectionClientStateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConnectionClientStateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConnectionClientStateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConnectionClientStateResponse.deserialize(new Uint8Array(bytes)) + }, + ConnectionConsensusState: { + path: "/ibc.core.connection.v1.Query/ConnectionConsensusState", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConnectionConsensusStateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConnectionConsensusStateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConnectionConsensusStateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConnectionConsensusStateResponse.deserialize(new Uint8Array(bytes)) + }, + ConnectionParams: { + path: "/ibc.core.connection.v1.Query/ConnectionParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryConnectionParamsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryConnectionParamsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryConnectionParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryConnectionParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Connection(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Connections(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ClientConnections(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConnectionClientState(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConnectionConsensusState(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConnectionParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Connection: GrpcUnaryServiceInterface = (message: QueryConnectionRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Connection(message, metadata, options, callback); + }; + Connections: GrpcUnaryServiceInterface = (message: QueryConnectionsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Connections(message, metadata, options, callback); + }; + ClientConnections: GrpcUnaryServiceInterface = (message: QueryClientConnectionsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ClientConnections(message, metadata, options, callback); + }; + ConnectionClientState: GrpcUnaryServiceInterface = (message: QueryConnectionClientStateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConnectionClientState(message, metadata, options, callback); + }; + ConnectionConsensusState: GrpcUnaryServiceInterface = (message: QueryConnectionConsensusStateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConnectionConsensusState(message, metadata, options, callback); + }; + ConnectionParams: GrpcUnaryServiceInterface = (message: QueryConnectionParamsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConnectionParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/ibc/core/connection/v1/query_pb.d.ts b/codegen/ibc/core/connection/v1/query_pb.d.ts similarity index 87% rename from proto/ibc/core/connection/v1/query_pb.d.ts rename to codegen/ibc/core/connection/v1/query_pb.d.ts index f99f3b9..b6038e0 100644 --- a/proto/ibc/core/connection/v1/query_pb.d.ts +++ b/codegen/ibc/core/connection/v1/query_pb.d.ts @@ -293,3 +293,41 @@ export namespace QueryConnectionConsensusStateResponse { } } +export class QueryConnectionParamsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryConnectionParamsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryConnectionParamsRequest): QueryConnectionParamsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryConnectionParamsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryConnectionParamsRequest; + static deserializeBinaryFromReader(message: QueryConnectionParamsRequest, reader: jspb.BinaryReader): QueryConnectionParamsRequest; +} + +export namespace QueryConnectionParamsRequest { + export type AsObject = { + } +} + +export class QueryConnectionParamsResponse extends jspb.Message { + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_core_connection_v1_connection_pb.Params | undefined; + setParams(value?: ibc_core_connection_v1_connection_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryConnectionParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryConnectionParamsResponse): QueryConnectionParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryConnectionParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryConnectionParamsResponse; + static deserializeBinaryFromReader(message: QueryConnectionParamsResponse, reader: jspb.BinaryReader): QueryConnectionParamsResponse; +} + +export namespace QueryConnectionParamsResponse { + export type AsObject = { + params?: ibc_core_connection_v1_connection_pb.Params.AsObject, + } +} + diff --git a/proto/ibc/core/connection/v1/query_pb.js b/codegen/ibc/core/connection/v1/query_pb.js similarity index 88% rename from proto/ibc/core/connection/v1/query_pb.js rename to codegen/ibc/core/connection/v1/query_pb.js index f531f9e..48808a8 100644 --- a/proto/ibc/core/connection/v1/query_pb.js +++ b/codegen/ibc/core/connection/v1/query_pb.js @@ -13,7 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); @@ -33,6 +33,8 @@ goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionClientStateReques goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionClientStateResponse', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionParamsRequest', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionParamsResponse', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionRequest', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionResponse', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionsRequest', null, global); @@ -247,6 +249,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.connection.v1.QueryConnectionParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionParamsRequest.displayName = 'proto.ibc.core.connection.v1.QueryConnectionParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionParamsResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionParamsResponse'; +} @@ -2299,4 +2343,256 @@ proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.has }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.connection.v1.QueryConnectionParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.connection.v1.QueryConnectionParamsRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionParamsRequest; + return proto.ibc.core.connection.v1.QueryConnectionParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.connection.v1.QueryConnectionParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionParamsRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionParamsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.connection.v1.QueryConnectionParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.connection.v1.QueryConnectionParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && ibc_core_connection_v1_connection_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.connection.v1.QueryConnectionParamsResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionParamsResponse; + return proto.ibc.core.connection.v1.QueryConnectionParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.connection.v1.QueryConnectionParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionParamsResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_core_connection_v1_connection_pb.Params; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.connection.v1.QueryConnectionParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_connection_v1_connection_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.ibc.core.connection.v1.Params} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.prototype.getParams = function() { + return /** @type{?proto.ibc.core.connection.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Params, 1)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Params|undefined} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionParamsResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionParamsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/proto/ibc/core/connection/v1/query_pb_service.d.ts b/codegen/ibc/core/connection/v1/query_pb_service.d.ts similarity index 86% rename from proto/ibc/core/connection/v1/query_pb_service.d.ts rename to codegen/ibc/core/connection/v1/query_pb_service.d.ts index d1ff8d3..aed5e6b 100644 --- a/proto/ibc/core/connection/v1/query_pb_service.d.ts +++ b/codegen/ibc/core/connection/v1/query_pb_service.d.ts @@ -49,6 +49,15 @@ type QueryConnectionConsensusState = { readonly responseType: typeof ibc_core_connection_v1_query_pb.QueryConnectionConsensusStateResponse; }; +type QueryConnectionParams = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_connection_v1_query_pb.QueryConnectionParamsRequest; + readonly responseType: typeof ibc_core_connection_v1_query_pb.QueryConnectionParamsResponse; +}; + export class Query { static readonly serviceName: string; static readonly Connection: QueryConnection; @@ -56,6 +65,7 @@ export class Query { static readonly ClientConnections: QueryClientConnections; static readonly ConnectionClientState: QueryConnectionClientState; static readonly ConnectionConsensusState: QueryConnectionConsensusState; + static readonly ConnectionParams: QueryConnectionParams; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -135,5 +145,14 @@ export class QueryClient { requestMessage: ibc_core_connection_v1_query_pb.QueryConnectionConsensusStateRequest, callback: (error: ServiceError|null, responseMessage: ibc_core_connection_v1_query_pb.QueryConnectionConsensusStateResponse|null) => void ): UnaryResponse; + connectionParams( + requestMessage: ibc_core_connection_v1_query_pb.QueryConnectionParamsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_connection_v1_query_pb.QueryConnectionParamsResponse|null) => void + ): UnaryResponse; + connectionParams( + requestMessage: ibc_core_connection_v1_query_pb.QueryConnectionParamsRequest, + callback: (error: ServiceError|null, responseMessage: ibc_core_connection_v1_query_pb.QueryConnectionParamsResponse|null) => void + ): UnaryResponse; } diff --git a/proto/ibc/core/connection/v1/query_pb_service.js b/codegen/ibc/core/connection/v1/query_pb_service.js similarity index 84% rename from proto/ibc/core/connection/v1/query_pb_service.js rename to codegen/ibc/core/connection/v1/query_pb_service.js index 167ef34..1612e18 100644 --- a/proto/ibc/core/connection/v1/query_pb_service.js +++ b/codegen/ibc/core/connection/v1/query_pb_service.js @@ -55,6 +55,15 @@ Query.ConnectionConsensusState = { responseType: ibc_core_connection_v1_query_pb.QueryConnectionConsensusStateResponse }; +Query.ConnectionParams = { + methodName: "ConnectionParams", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_core_connection_v1_query_pb.QueryConnectionParamsRequest, + responseType: ibc_core_connection_v1_query_pb.QueryConnectionParamsResponse +}; + exports.Query = Query; function QueryClient(serviceHost, options) { @@ -217,5 +226,36 @@ QueryClient.prototype.connectionConsensusState = function connectionConsensusSta }; }; +QueryClient.prototype.connectionParams = function connectionParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.ConnectionParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.QueryClient = QueryClient; diff --git a/codegen/ibc/core/connection/v1/tx.ts b/codegen/ibc/core/connection/v1/tx.ts new file mode 100644 index 0000000..76eb868 --- /dev/null +++ b/codegen/ibc/core/connection/v1/tx.ts @@ -0,0 +1,1411 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/connection/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../cosmos/msg/v1/msg"; +import * as dependency_3 from "./../../../../google/protobuf/any"; +import * as dependency_4 from "./../../client/v1/client"; +import * as dependency_5 from "./connection"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.core.connection.v1 { + export class MsgConnectionOpenInit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + counterparty?: dependency_5.ibc.core.connection.v1.Counterparty; + version?: dependency_5.ibc.core.connection.v1.Version; + delay_period?: number; + signer?: 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; + } + if ("counterparty" in data && data.counterparty != undefined) { + this.counterparty = data.counterparty; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("delay_period" in data && data.delay_period != undefined) { + this.delay_period = data.delay_period; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get counterparty() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.connection.v1.Counterparty, 2) as dependency_5.ibc.core.connection.v1.Counterparty; + } + set counterparty(value: dependency_5.ibc.core.connection.v1.Counterparty) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_counterparty() { + return pb_1.Message.getField(this, 2) != null; + } + get version() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.connection.v1.Version, 3) as dependency_5.ibc.core.connection.v1.Version; + } + set version(value: dependency_5.ibc.core.connection.v1.Version) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_version() { + return pb_1.Message.getField(this, 3) != null; + } + get delay_period() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set delay_period(value: number) { + pb_1.Message.setField(this, 4, value); + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + client_id?: string; + counterparty?: ReturnType; + version?: ReturnType; + delay_period?: number; + signer?: string; + }): MsgConnectionOpenInit { + const message = new MsgConnectionOpenInit({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.counterparty != null) { + message.counterparty = dependency_5.ibc.core.connection.v1.Counterparty.fromObject(data.counterparty); + } + if (data.version != null) { + message.version = dependency_5.ibc.core.connection.v1.Version.fromObject(data.version); + } + if (data.delay_period != null) { + message.delay_period = data.delay_period; + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + client_id?: string; + counterparty?: ReturnType; + version?: ReturnType; + delay_period?: number; + signer?: string; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.counterparty != null) { + data.counterparty = this.counterparty.toObject(); + } + if (this.version != null) { + data.version = this.version.toObject(); + } + if (this.delay_period != null) { + data.delay_period = this.delay_period; + } + if (this.signer != null) { + data.signer = this.signer; + } + 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 (this.has_counterparty) + writer.writeMessage(2, this.counterparty, () => this.counterparty.serialize(writer)); + if (this.has_version) + writer.writeMessage(3, this.version, () => this.version.serialize(writer)); + if (this.delay_period != 0) + writer.writeUint64(4, this.delay_period); + if (this.signer.length) + writer.writeString(5, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgConnectionOpenInit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConnectionOpenInit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.counterparty, () => message.counterparty = dependency_5.ibc.core.connection.v1.Counterparty.deserialize(reader)); + break; + case 3: + reader.readMessage(message.version, () => message.version = dependency_5.ibc.core.connection.v1.Version.deserialize(reader)); + break; + case 4: + message.delay_period = reader.readUint64(); + break; + case 5: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConnectionOpenInit { + return MsgConnectionOpenInit.deserialize(bytes); + } + } + export class MsgConnectionOpenInitResponse 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: {}): MsgConnectionOpenInitResponse { + const message = new MsgConnectionOpenInitResponse({}); + 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): MsgConnectionOpenInitResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConnectionOpenInitResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConnectionOpenInitResponse { + return MsgConnectionOpenInitResponse.deserialize(bytes); + } + } + export class MsgConnectionOpenTry extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + /** @deprecated*/ + previous_connection_id?: string; + /** @deprecated*/ + client_state?: dependency_3.google.protobuf.Any; + counterparty?: dependency_5.ibc.core.connection.v1.Counterparty; + delay_period?: number; + counterparty_versions?: dependency_5.ibc.core.connection.v1.Version[]; + proof_height?: dependency_4.ibc.core.client.v1.Height; + proof_init?: Uint8Array; + /** @deprecated*/ + proof_client?: Uint8Array; + /** @deprecated*/ + proof_consensus?: Uint8Array; + /** @deprecated*/ + consensus_height?: dependency_4.ibc.core.client.v1.Height; + signer?: string; + /** @deprecated*/ + host_consensus_state_proof?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], 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; + } + if ("previous_connection_id" in data && data.previous_connection_id != undefined) { + this.previous_connection_id = data.previous_connection_id; + } + if ("client_state" in data && data.client_state != undefined) { + this.client_state = data.client_state; + } + if ("counterparty" in data && data.counterparty != undefined) { + this.counterparty = data.counterparty; + } + if ("delay_period" in data && data.delay_period != undefined) { + this.delay_period = data.delay_period; + } + if ("counterparty_versions" in data && data.counterparty_versions != undefined) { + this.counterparty_versions = data.counterparty_versions; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("proof_init" in data && data.proof_init != undefined) { + this.proof_init = data.proof_init; + } + if ("proof_client" in data && data.proof_client != undefined) { + this.proof_client = data.proof_client; + } + if ("proof_consensus" in data && data.proof_consensus != undefined) { + this.proof_consensus = data.proof_consensus; + } + if ("consensus_height" in data && data.consensus_height != undefined) { + this.consensus_height = data.consensus_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("host_consensus_state_proof" in data && data.host_consensus_state_proof != undefined) { + this.host_consensus_state_proof = data.host_consensus_state_proof; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + /** @deprecated*/ + get previous_connection_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + /** @deprecated*/ + set previous_connection_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + /** @deprecated*/ + get client_state() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Any, 3) as dependency_3.google.protobuf.Any; + } + /** @deprecated*/ + set client_state(value: dependency_3.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 3, value); + } + /** @deprecated*/ + get has_client_state() { + return pb_1.Message.getField(this, 3) != null; + } + get counterparty() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.connection.v1.Counterparty, 4) as dependency_5.ibc.core.connection.v1.Counterparty; + } + set counterparty(value: dependency_5.ibc.core.connection.v1.Counterparty) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_counterparty() { + return pb_1.Message.getField(this, 4) != null; + } + get delay_period() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set delay_period(value: number) { + pb_1.Message.setField(this, 5, value); + } + get counterparty_versions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_5.ibc.core.connection.v1.Version, 6) as dependency_5.ibc.core.connection.v1.Version[]; + } + set counterparty_versions(value: dependency_5.ibc.core.connection.v1.Version[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.client.v1.Height, 7) as dependency_4.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_4.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 7) != null; + } + get proof_init() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + set proof_init(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + /** @deprecated*/ + get proof_client() { + return pb_1.Message.getFieldWithDefault(this, 9, new Uint8Array(0)) as Uint8Array; + } + /** @deprecated*/ + set proof_client(value: Uint8Array) { + pb_1.Message.setField(this, 9, value); + } + /** @deprecated*/ + get proof_consensus() { + return pb_1.Message.getFieldWithDefault(this, 10, new Uint8Array(0)) as Uint8Array; + } + /** @deprecated*/ + set proof_consensus(value: Uint8Array) { + pb_1.Message.setField(this, 10, value); + } + /** @deprecated*/ + get consensus_height() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.client.v1.Height, 11) as dependency_4.ibc.core.client.v1.Height; + } + /** @deprecated*/ + set consensus_height(value: dependency_4.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 11, value); + } + /** @deprecated*/ + get has_consensus_height() { + return pb_1.Message.getField(this, 11) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 12, value); + } + /** @deprecated*/ + get host_consensus_state_proof() { + return pb_1.Message.getFieldWithDefault(this, 13, new Uint8Array(0)) as Uint8Array; + } + /** @deprecated*/ + set host_consensus_state_proof(value: Uint8Array) { + pb_1.Message.setField(this, 13, value); + } + static fromObject(data: { + client_id?: string; + previous_connection_id?: string; + client_state?: ReturnType; + counterparty?: ReturnType; + delay_period?: number; + counterparty_versions?: ReturnType[]; + proof_height?: ReturnType; + proof_init?: Uint8Array; + proof_client?: Uint8Array; + proof_consensus?: Uint8Array; + consensus_height?: ReturnType; + signer?: string; + host_consensus_state_proof?: Uint8Array; + }): MsgConnectionOpenTry { + const message = new MsgConnectionOpenTry({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.previous_connection_id != null) { + message.previous_connection_id = data.previous_connection_id; + } + if (data.client_state != null) { + message.client_state = dependency_3.google.protobuf.Any.fromObject(data.client_state); + } + if (data.counterparty != null) { + message.counterparty = dependency_5.ibc.core.connection.v1.Counterparty.fromObject(data.counterparty); + } + if (data.delay_period != null) { + message.delay_period = data.delay_period; + } + if (data.counterparty_versions != null) { + message.counterparty_versions = data.counterparty_versions.map(item => dependency_5.ibc.core.connection.v1.Version.fromObject(item)); + } + if (data.proof_height != null) { + message.proof_height = dependency_4.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.proof_init != null) { + message.proof_init = data.proof_init; + } + if (data.proof_client != null) { + message.proof_client = data.proof_client; + } + if (data.proof_consensus != null) { + message.proof_consensus = data.proof_consensus; + } + if (data.consensus_height != null) { + message.consensus_height = dependency_4.ibc.core.client.v1.Height.fromObject(data.consensus_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + if (data.host_consensus_state_proof != null) { + message.host_consensus_state_proof = data.host_consensus_state_proof; + } + return message; + } + toObject() { + const data: { + client_id?: string; + previous_connection_id?: string; + client_state?: ReturnType; + counterparty?: ReturnType; + delay_period?: number; + counterparty_versions?: ReturnType[]; + proof_height?: ReturnType; + proof_init?: Uint8Array; + proof_client?: Uint8Array; + proof_consensus?: Uint8Array; + consensus_height?: ReturnType; + signer?: string; + host_consensus_state_proof?: Uint8Array; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.previous_connection_id != null) { + data.previous_connection_id = this.previous_connection_id; + } + if (this.client_state != null) { + data.client_state = this.client_state.toObject(); + } + if (this.counterparty != null) { + data.counterparty = this.counterparty.toObject(); + } + if (this.delay_period != null) { + data.delay_period = this.delay_period; + } + if (this.counterparty_versions != null) { + data.counterparty_versions = this.counterparty_versions.map((item: dependency_5.ibc.core.connection.v1.Version) => item.toObject()); + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.proof_init != null) { + data.proof_init = this.proof_init; + } + if (this.proof_client != null) { + data.proof_client = this.proof_client; + } + if (this.proof_consensus != null) { + data.proof_consensus = this.proof_consensus; + } + if (this.consensus_height != null) { + data.consensus_height = this.consensus_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + if (this.host_consensus_state_proof != null) { + data.host_consensus_state_proof = this.host_consensus_state_proof; + } + 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 (this.previous_connection_id.length) + writer.writeString(2, this.previous_connection_id); + if (this.has_client_state) + writer.writeMessage(3, this.client_state, () => this.client_state.serialize(writer)); + if (this.has_counterparty) + writer.writeMessage(4, this.counterparty, () => this.counterparty.serialize(writer)); + if (this.delay_period != 0) + writer.writeUint64(5, this.delay_period); + if (this.counterparty_versions.length) + writer.writeRepeatedMessage(6, this.counterparty_versions, (item: dependency_5.ibc.core.connection.v1.Version) => item.serialize(writer)); + if (this.has_proof_height) + writer.writeMessage(7, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.proof_init.length) + writer.writeBytes(8, this.proof_init); + if (this.proof_client.length) + writer.writeBytes(9, this.proof_client); + if (this.proof_consensus.length) + writer.writeBytes(10, this.proof_consensus); + if (this.has_consensus_height) + writer.writeMessage(11, this.consensus_height, () => this.consensus_height.serialize(writer)); + if (this.signer.length) + writer.writeString(12, this.signer); + if (this.host_consensus_state_proof.length) + writer.writeBytes(13, this.host_consensus_state_proof); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgConnectionOpenTry { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConnectionOpenTry(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + message.previous_connection_id = reader.readString(); + break; + case 3: + reader.readMessage(message.client_state, () => message.client_state = dependency_3.google.protobuf.Any.deserialize(reader)); + break; + case 4: + reader.readMessage(message.counterparty, () => message.counterparty = dependency_5.ibc.core.connection.v1.Counterparty.deserialize(reader)); + break; + case 5: + message.delay_period = reader.readUint64(); + break; + case 6: + reader.readMessage(message.counterparty_versions, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_5.ibc.core.connection.v1.Version.deserialize(reader), dependency_5.ibc.core.connection.v1.Version)); + break; + case 7: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_4.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 8: + message.proof_init = reader.readBytes(); + break; + case 9: + message.proof_client = reader.readBytes(); + break; + case 10: + message.proof_consensus = reader.readBytes(); + break; + case 11: + reader.readMessage(message.consensus_height, () => message.consensus_height = dependency_4.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 12: + message.signer = reader.readString(); + break; + case 13: + message.host_consensus_state_proof = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConnectionOpenTry { + return MsgConnectionOpenTry.deserialize(bytes); + } + } + export class MsgConnectionOpenTryResponse 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: {}): MsgConnectionOpenTryResponse { + const message = new MsgConnectionOpenTryResponse({}); + 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): MsgConnectionOpenTryResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConnectionOpenTryResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConnectionOpenTryResponse { + return MsgConnectionOpenTryResponse.deserialize(bytes); + } + } + export class MsgConnectionOpenAck extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + connection_id?: string; + counterparty_connection_id?: string; + version?: dependency_5.ibc.core.connection.v1.Version; + /** @deprecated*/ + client_state?: dependency_3.google.protobuf.Any; + proof_height?: dependency_4.ibc.core.client.v1.Height; + proof_try?: Uint8Array; + /** @deprecated*/ + proof_client?: Uint8Array; + /** @deprecated*/ + proof_consensus?: Uint8Array; + /** @deprecated*/ + consensus_height?: dependency_4.ibc.core.client.v1.Height; + signer?: string; + /** @deprecated*/ + host_consensus_state_proof?: Uint8Array; + }) { + 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 ("counterparty_connection_id" in data && data.counterparty_connection_id != undefined) { + this.counterparty_connection_id = data.counterparty_connection_id; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("client_state" in data && data.client_state != undefined) { + this.client_state = data.client_state; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("proof_try" in data && data.proof_try != undefined) { + this.proof_try = data.proof_try; + } + if ("proof_client" in data && data.proof_client != undefined) { + this.proof_client = data.proof_client; + } + if ("proof_consensus" in data && data.proof_consensus != undefined) { + this.proof_consensus = data.proof_consensus; + } + if ("consensus_height" in data && data.consensus_height != undefined) { + this.consensus_height = data.consensus_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("host_consensus_state_proof" in data && data.host_consensus_state_proof != undefined) { + this.host_consensus_state_proof = data.host_consensus_state_proof; + } + } + } + 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 counterparty_connection_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set counterparty_connection_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get version() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.connection.v1.Version, 3) as dependency_5.ibc.core.connection.v1.Version; + } + set version(value: dependency_5.ibc.core.connection.v1.Version) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_version() { + return pb_1.Message.getField(this, 3) != null; + } + /** @deprecated*/ + get client_state() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Any, 4) as dependency_3.google.protobuf.Any; + } + /** @deprecated*/ + set client_state(value: dependency_3.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 4, value); + } + /** @deprecated*/ + get has_client_state() { + return pb_1.Message.getField(this, 4) != null; + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.client.v1.Height, 5) as dependency_4.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_4.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 5) != null; + } + get proof_try() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set proof_try(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + /** @deprecated*/ + get proof_client() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + /** @deprecated*/ + set proof_client(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + /** @deprecated*/ + get proof_consensus() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + /** @deprecated*/ + set proof_consensus(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + /** @deprecated*/ + get consensus_height() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.client.v1.Height, 9) as dependency_4.ibc.core.client.v1.Height; + } + /** @deprecated*/ + set consensus_height(value: dependency_4.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 9, value); + } + /** @deprecated*/ + get has_consensus_height() { + return pb_1.Message.getField(this, 9) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 10, value); + } + /** @deprecated*/ + get host_consensus_state_proof() { + return pb_1.Message.getFieldWithDefault(this, 11, new Uint8Array(0)) as Uint8Array; + } + /** @deprecated*/ + set host_consensus_state_proof(value: Uint8Array) { + pb_1.Message.setField(this, 11, value); + } + static fromObject(data: { + connection_id?: string; + counterparty_connection_id?: string; + version?: ReturnType; + client_state?: ReturnType; + proof_height?: ReturnType; + proof_try?: Uint8Array; + proof_client?: Uint8Array; + proof_consensus?: Uint8Array; + consensus_height?: ReturnType; + signer?: string; + host_consensus_state_proof?: Uint8Array; + }): MsgConnectionOpenAck { + const message = new MsgConnectionOpenAck({}); + if (data.connection_id != null) { + message.connection_id = data.connection_id; + } + if (data.counterparty_connection_id != null) { + message.counterparty_connection_id = data.counterparty_connection_id; + } + if (data.version != null) { + message.version = dependency_5.ibc.core.connection.v1.Version.fromObject(data.version); + } + if (data.client_state != null) { + message.client_state = dependency_3.google.protobuf.Any.fromObject(data.client_state); + } + if (data.proof_height != null) { + message.proof_height = dependency_4.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.proof_try != null) { + message.proof_try = data.proof_try; + } + if (data.proof_client != null) { + message.proof_client = data.proof_client; + } + if (data.proof_consensus != null) { + message.proof_consensus = data.proof_consensus; + } + if (data.consensus_height != null) { + message.consensus_height = dependency_4.ibc.core.client.v1.Height.fromObject(data.consensus_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + if (data.host_consensus_state_proof != null) { + message.host_consensus_state_proof = data.host_consensus_state_proof; + } + return message; + } + toObject() { + const data: { + connection_id?: string; + counterparty_connection_id?: string; + version?: ReturnType; + client_state?: ReturnType; + proof_height?: ReturnType; + proof_try?: Uint8Array; + proof_client?: Uint8Array; + proof_consensus?: Uint8Array; + consensus_height?: ReturnType; + signer?: string; + host_consensus_state_proof?: Uint8Array; + } = {}; + if (this.connection_id != null) { + data.connection_id = this.connection_id; + } + if (this.counterparty_connection_id != null) { + data.counterparty_connection_id = this.counterparty_connection_id; + } + if (this.version != null) { + data.version = this.version.toObject(); + } + if (this.client_state != null) { + data.client_state = this.client_state.toObject(); + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.proof_try != null) { + data.proof_try = this.proof_try; + } + if (this.proof_client != null) { + data.proof_client = this.proof_client; + } + if (this.proof_consensus != null) { + data.proof_consensus = this.proof_consensus; + } + if (this.consensus_height != null) { + data.consensus_height = this.consensus_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + if (this.host_consensus_state_proof != null) { + data.host_consensus_state_proof = this.host_consensus_state_proof; + } + 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.counterparty_connection_id.length) + writer.writeString(2, this.counterparty_connection_id); + if (this.has_version) + writer.writeMessage(3, this.version, () => this.version.serialize(writer)); + if (this.has_client_state) + writer.writeMessage(4, this.client_state, () => this.client_state.serialize(writer)); + if (this.has_proof_height) + writer.writeMessage(5, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.proof_try.length) + writer.writeBytes(6, this.proof_try); + if (this.proof_client.length) + writer.writeBytes(7, this.proof_client); + if (this.proof_consensus.length) + writer.writeBytes(8, this.proof_consensus); + if (this.has_consensus_height) + writer.writeMessage(9, this.consensus_height, () => this.consensus_height.serialize(writer)); + if (this.signer.length) + writer.writeString(10, this.signer); + if (this.host_consensus_state_proof.length) + writer.writeBytes(11, this.host_consensus_state_proof); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgConnectionOpenAck { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConnectionOpenAck(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.connection_id = reader.readString(); + break; + case 2: + message.counterparty_connection_id = reader.readString(); + break; + case 3: + reader.readMessage(message.version, () => message.version = dependency_5.ibc.core.connection.v1.Version.deserialize(reader)); + break; + case 4: + reader.readMessage(message.client_state, () => message.client_state = dependency_3.google.protobuf.Any.deserialize(reader)); + break; + case 5: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_4.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 6: + message.proof_try = reader.readBytes(); + break; + case 7: + message.proof_client = reader.readBytes(); + break; + case 8: + message.proof_consensus = reader.readBytes(); + break; + case 9: + reader.readMessage(message.consensus_height, () => message.consensus_height = dependency_4.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 10: + message.signer = reader.readString(); + break; + case 11: + message.host_consensus_state_proof = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConnectionOpenAck { + return MsgConnectionOpenAck.deserialize(bytes); + } + } + export class MsgConnectionOpenAckResponse 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: {}): MsgConnectionOpenAckResponse { + const message = new MsgConnectionOpenAckResponse({}); + 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): MsgConnectionOpenAckResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConnectionOpenAckResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConnectionOpenAckResponse { + return MsgConnectionOpenAckResponse.deserialize(bytes); + } + } + export class MsgConnectionOpenConfirm extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + connection_id?: string; + proof_ack?: Uint8Array; + proof_height?: dependency_4.ibc.core.client.v1.Height; + signer?: 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; + } + if ("proof_ack" in data && data.proof_ack != undefined) { + this.proof_ack = data.proof_ack; + } + if ("proof_height" in data && data.proof_height != undefined) { + this.proof_height = data.proof_height; + } + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + } + } + 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 proof_ack() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set proof_ack(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get proof_height() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.client.v1.Height, 3) as dependency_4.ibc.core.client.v1.Height; + } + set proof_height(value: dependency_4.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_proof_height() { + return pb_1.Message.getField(this, 3) != null; + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + connection_id?: string; + proof_ack?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + }): MsgConnectionOpenConfirm { + const message = new MsgConnectionOpenConfirm({}); + if (data.connection_id != null) { + message.connection_id = data.connection_id; + } + if (data.proof_ack != null) { + message.proof_ack = data.proof_ack; + } + if (data.proof_height != null) { + message.proof_height = dependency_4.ibc.core.client.v1.Height.fromObject(data.proof_height); + } + if (data.signer != null) { + message.signer = data.signer; + } + return message; + } + toObject() { + const data: { + connection_id?: string; + proof_ack?: Uint8Array; + proof_height?: ReturnType; + signer?: string; + } = {}; + if (this.connection_id != null) { + data.connection_id = this.connection_id; + } + if (this.proof_ack != null) { + data.proof_ack = this.proof_ack; + } + if (this.proof_height != null) { + data.proof_height = this.proof_height.toObject(); + } + if (this.signer != null) { + data.signer = this.signer; + } + 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.proof_ack.length) + writer.writeBytes(2, this.proof_ack); + if (this.has_proof_height) + writer.writeMessage(3, this.proof_height, () => this.proof_height.serialize(writer)); + if (this.signer.length) + writer.writeString(4, this.signer); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgConnectionOpenConfirm { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConnectionOpenConfirm(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.connection_id = reader.readString(); + break; + case 2: + message.proof_ack = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof_height, () => message.proof_height = dependency_4.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 4: + message.signer = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConnectionOpenConfirm { + return MsgConnectionOpenConfirm.deserialize(bytes); + } + } + export class MsgConnectionOpenConfirmResponse 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: {}): MsgConnectionOpenConfirmResponse { + const message = new MsgConnectionOpenConfirmResponse({}); + 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): MsgConnectionOpenConfirmResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgConnectionOpenConfirmResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgConnectionOpenConfirmResponse { + return MsgConnectionOpenConfirmResponse.deserialize(bytes); + } + } + export class MsgUpdateParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer?: string; + params?: dependency_5.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 ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 1, value); + } + get params() { + return pb_1.Message.getWrapperField(this, dependency_5.ibc.core.connection.v1.Params, 2) as dependency_5.ibc.core.connection.v1.Params; + } + set params(value: dependency_5.ibc.core.connection.v1.Params) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_params() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + signer?: string; + params?: ReturnType; + }): MsgUpdateParams { + const message = new MsgUpdateParams({}); + if (data.signer != null) { + message.signer = data.signer; + } + if (data.params != null) { + message.params = dependency_5.ibc.core.connection.v1.Params.fromObject(data.params); + } + return message; + } + toObject() { + const data: { + signer?: string; + params?: ReturnType; + } = {}; + if (this.signer != null) { + data.signer = this.signer; + } + 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.signer.length) + writer.writeString(1, this.signer); + if (this.has_params) + writer.writeMessage(2, this.params, () => this.params.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signer = reader.readString(); + break; + case 2: + reader.readMessage(message.params, () => message.params = dependency_5.ibc.core.connection.v1.Params.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams { + return MsgUpdateParams.deserialize(bytes); + } + } + export class MsgUpdateParamsResponse 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: {}): MsgUpdateParamsResponse { + const message = new MsgUpdateParamsResponse({}); + 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): MsgUpdateParamsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse { + return MsgUpdateParamsResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + ConnectionOpenInit: { + path: "/ibc.core.connection.v1.Msg/ConnectionOpenInit", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgConnectionOpenInit) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgConnectionOpenInit.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgConnectionOpenInitResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgConnectionOpenInitResponse.deserialize(new Uint8Array(bytes)) + }, + ConnectionOpenTry: { + path: "/ibc.core.connection.v1.Msg/ConnectionOpenTry", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgConnectionOpenTry) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgConnectionOpenTry.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgConnectionOpenTryResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgConnectionOpenTryResponse.deserialize(new Uint8Array(bytes)) + }, + ConnectionOpenAck: { + path: "/ibc.core.connection.v1.Msg/ConnectionOpenAck", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgConnectionOpenAck) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgConnectionOpenAck.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgConnectionOpenAckResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgConnectionOpenAckResponse.deserialize(new Uint8Array(bytes)) + }, + ConnectionOpenConfirm: { + path: "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgConnectionOpenConfirm) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgConnectionOpenConfirm.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgConnectionOpenConfirmResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgConnectionOpenConfirmResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateConnectionParams: { + path: "/ibc.core.connection.v1.Msg/UpdateConnectionParams", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract ConnectionOpenInit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConnectionOpenTry(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConnectionOpenAck(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ConnectionOpenConfirm(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateConnectionParams(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + ConnectionOpenInit: GrpcUnaryServiceInterface = (message: MsgConnectionOpenInit, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConnectionOpenInit(message, metadata, options, callback); + }; + ConnectionOpenTry: GrpcUnaryServiceInterface = (message: MsgConnectionOpenTry, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConnectionOpenTry(message, metadata, options, callback); + }; + ConnectionOpenAck: GrpcUnaryServiceInterface = (message: MsgConnectionOpenAck, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConnectionOpenAck(message, metadata, options, callback); + }; + ConnectionOpenConfirm: GrpcUnaryServiceInterface = (message: MsgConnectionOpenConfirm, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ConnectionOpenConfirm(message, metadata, options, callback); + }; + UpdateConnectionParams: GrpcUnaryServiceInterface = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateConnectionParams(message, metadata, options, callback); + }; + } +} diff --git a/proto/ibc/core/connection/v1/tx_pb.d.ts b/codegen/ibc/core/connection/v1/tx_pb.d.ts similarity index 83% rename from proto/ibc/core/connection/v1/tx_pb.d.ts rename to codegen/ibc/core/connection/v1/tx_pb.d.ts index 88ea5d3..4da51fc 100644 --- a/proto/ibc/core/connection/v1/tx_pb.d.ts +++ b/codegen/ibc/core/connection/v1/tx_pb.d.ts @@ -3,6 +3,7 @@ import * as jspb from "google-protobuf"; import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as cosmos_msg_v1_msg_pb from "../../../../cosmos/msg/v1/msg_pb"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import * as ibc_core_client_v1_client_pb from "../../../../ibc/core/client/v1/client_pb"; import * as ibc_core_connection_v1_connection_pb from "../../../../ibc/core/connection/v1/connection_pb"; @@ -116,6 +117,11 @@ export class MsgConnectionOpenTry extends jspb.Message { getSigner(): string; setSigner(value: string): void; + getHostConsensusStateProof(): Uint8Array | string; + getHostConsensusStateProof_asU8(): Uint8Array; + getHostConsensusStateProof_asB64(): string; + setHostConsensusStateProof(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgConnectionOpenTry.AsObject; static toObject(includeInstance: boolean, msg: MsgConnectionOpenTry): MsgConnectionOpenTry.AsObject; @@ -140,6 +146,7 @@ export namespace MsgConnectionOpenTry { proofConsensus: Uint8Array | string, consensusHeight?: ibc_core_client_v1_client_pb.Height.AsObject, signer: string, + hostConsensusStateProof: Uint8Array | string, } } @@ -204,6 +211,11 @@ export class MsgConnectionOpenAck extends jspb.Message { getSigner(): string; setSigner(value: string): void; + getHostConsensusStateProof(): Uint8Array | string; + getHostConsensusStateProof_asU8(): Uint8Array; + getHostConsensusStateProof_asB64(): string; + setHostConsensusStateProof(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MsgConnectionOpenAck.AsObject; static toObject(includeInstance: boolean, msg: MsgConnectionOpenAck): MsgConnectionOpenAck.AsObject; @@ -226,6 +238,7 @@ export namespace MsgConnectionOpenAck { proofConsensus: Uint8Array | string, consensusHeight?: ibc_core_client_v1_client_pb.Height.AsObject, signer: string, + hostConsensusStateProof: Uint8Array | string, } } @@ -297,3 +310,45 @@ export namespace MsgConnectionOpenConfirmResponse { } } +export class MsgUpdateParams extends jspb.Message { + getSigner(): string; + setSigner(value: string): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): ibc_core_connection_v1_connection_pb.Params | undefined; + setParams(value?: ibc_core_connection_v1_connection_pb.Params): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; + static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; +} + +export namespace MsgUpdateParams { + export type AsObject = { + signer: string, + params?: ibc_core_connection_v1_connection_pb.Params.AsObject, + } +} + +export class MsgUpdateParamsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; + static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; +} + +export namespace MsgUpdateParamsResponse { + export type AsObject = { + } +} + diff --git a/proto/ibc/core/connection/v1/tx_pb.js b/codegen/ibc/core/connection/v1/tx_pb.js similarity index 83% rename from proto/ibc/core/connection/v1/tx_pb.js rename to codegen/ibc/core/connection/v1/tx_pb.js index e768909..d2d08e0 100644 --- a/proto/ibc/core/connection/v1/tx_pb.js +++ b/codegen/ibc/core/connection/v1/tx_pb.js @@ -13,10 +13,12 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); +var cosmos_msg_v1_msg_pb = require('../../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); @@ -31,6 +33,8 @@ goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenInit', null, gl goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenTry', null, global); goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgUpdateParams', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgUpdateParamsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -199,6 +203,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.connection.v1.MsgUpdateParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgUpdateParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgUpdateParams.displayName = 'proto.ibc.core.connection.v1.MsgUpdateParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.core.connection.v1.MsgUpdateParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgUpdateParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgUpdateParamsResponse.displayName = 'proto.ibc.core.connection.v1.MsgUpdateParamsResponse'; +} @@ -643,7 +689,8 @@ proto.ibc.core.connection.v1.MsgConnectionOpenTry.toObject = function(includeIns proofClient: msg.getProofClient_asB64(), proofConsensus: msg.getProofConsensus_asB64(), consensusHeight: (f = msg.getConsensusHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - signer: jspb.Message.getFieldWithDefault(msg, 12, "") + signer: jspb.Message.getFieldWithDefault(msg, 12, ""), + hostConsensusStateProof: msg.getHostConsensusStateProof_asB64() }; if (includeInstance) { @@ -733,6 +780,10 @@ proto.ibc.core.connection.v1.MsgConnectionOpenTry.deserializeBinaryFromReader = var value = /** @type {string} */ (reader.readString()); msg.setSigner(value); break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHostConsensusStateProof(value); + break; default: reader.skipField(); break; @@ -851,6 +902,13 @@ proto.ibc.core.connection.v1.MsgConnectionOpenTry.serializeBinaryToWriter = func f ); } + f = message.getHostConsensusStateProof_asU8(); + if (f.length > 0) { + writer.writeBytes( + 13, + f + ); + } }; @@ -1238,6 +1296,48 @@ proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setSigner = function }; +/** + * optional bytes host_consensus_state_proof = 13; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getHostConsensusStateProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes host_consensus_state_proof = 13; + * This is a type-conversion wrapper around `getHostConsensusStateProof()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getHostConsensusStateProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHostConsensusStateProof())); +}; + + +/** + * optional bytes host_consensus_state_proof = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHostConsensusStateProof()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getHostConsensusStateProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHostConsensusStateProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setHostConsensusStateProof = function(value) { + return jspb.Message.setProto3BytesField(this, 13, value); +}; + + @@ -1380,7 +1480,8 @@ proto.ibc.core.connection.v1.MsgConnectionOpenAck.toObject = function(includeIns proofClient: msg.getProofClient_asB64(), proofConsensus: msg.getProofConsensus_asB64(), consensusHeight: (f = msg.getConsensusHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - signer: jspb.Message.getFieldWithDefault(msg, 10, "") + signer: jspb.Message.getFieldWithDefault(msg, 10, ""), + hostConsensusStateProof: msg.getHostConsensusStateProof_asB64() }; if (includeInstance) { @@ -1461,6 +1562,10 @@ proto.ibc.core.connection.v1.MsgConnectionOpenAck.deserializeBinaryFromReader = var value = /** @type {string} */ (reader.readString()); msg.setSigner(value); break; + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHostConsensusStateProof(value); + break; default: reader.skipField(); break; @@ -1564,6 +1669,13 @@ proto.ibc.core.connection.v1.MsgConnectionOpenAck.serializeBinaryToWriter = func f ); } + f = message.getHostConsensusStateProof_asU8(); + if (f.length > 0) { + writer.writeBytes( + 11, + f + ); + } }; @@ -1895,6 +2007,48 @@ proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setSigner = function }; +/** + * optional bytes host_consensus_state_proof = 11; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getHostConsensusStateProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes host_consensus_state_proof = 11; + * This is a type-conversion wrapper around `getHostConsensusStateProof()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getHostConsensusStateProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHostConsensusStateProof())); +}; + + +/** + * optional bytes host_consensus_state_proof = 11; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHostConsensusStateProof()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getHostConsensusStateProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHostConsensusStateProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setHostConsensusStateProof = function(value) { + return jspb.Message.setProto3BytesField(this, 11, value); +}; + + @@ -2362,4 +2516,286 @@ proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.serializeBinaryToW }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.connection.v1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgUpdateParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.connection.v1.MsgUpdateParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgUpdateParams.toObject = function(includeInstance, msg) { + var f, obj = { + signer: jspb.Message.getFieldWithDefault(msg, 1, ""), + params: (f = msg.getParams()) && ibc_core_connection_v1_connection_pb.Params.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.connection.v1.MsgUpdateParams} + */ +proto.ibc.core.connection.v1.MsgUpdateParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgUpdateParams; + return proto.ibc.core.connection.v1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.connection.v1.MsgUpdateParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgUpdateParams} + */ +proto.ibc.core.connection.v1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 2: + var value = new ibc_core_connection_v1_connection_pb.Params; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgUpdateParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgUpdateParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.connection.v1.MsgUpdateParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_connection_v1_connection_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string signer = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgUpdateParams.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgUpdateParams} returns this + */ +proto.ibc.core.connection.v1.MsgUpdateParams.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Params params = 2; + * @return {?proto.ibc.core.connection.v1.Params} + */ +proto.ibc.core.connection.v1.MsgUpdateParams.prototype.getParams = function() { + return /** @type{?proto.ibc.core.connection.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Params, 2)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Params|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgUpdateParams} returns this +*/ +proto.ibc.core.connection.v1.MsgUpdateParams.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgUpdateParams} returns this + */ +proto.ibc.core.connection.v1.MsgUpdateParams.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgUpdateParams.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.core.connection.v1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.core.connection.v1.MsgUpdateParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.core.connection.v1.MsgUpdateParamsResponse} + */ +proto.ibc.core.connection.v1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgUpdateParamsResponse; + return proto.ibc.core.connection.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.connection.v1.MsgUpdateParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgUpdateParamsResponse} + */ +proto.ibc.core.connection.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.core.connection.v1.MsgUpdateParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/proto/ibc/core/connection/v1/tx_pb_service.d.ts b/codegen/ibc/core/connection/v1/tx_pb_service.d.ts similarity index 85% rename from proto/ibc/core/connection/v1/tx_pb_service.d.ts rename to codegen/ibc/core/connection/v1/tx_pb_service.d.ts index 96ce7fa..1bf330e 100644 --- a/proto/ibc/core/connection/v1/tx_pb_service.d.ts +++ b/codegen/ibc/core/connection/v1/tx_pb_service.d.ts @@ -40,12 +40,22 @@ type MsgConnectionOpenConfirm = { readonly responseType: typeof ibc_core_connection_v1_tx_pb.MsgConnectionOpenConfirmResponse; }; +type MsgUpdateConnectionParams = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_core_connection_v1_tx_pb.MsgUpdateParams; + readonly responseType: typeof ibc_core_connection_v1_tx_pb.MsgUpdateParamsResponse; +}; + export class Msg { static readonly serviceName: string; static readonly ConnectionOpenInit: MsgConnectionOpenInit; static readonly ConnectionOpenTry: MsgConnectionOpenTry; static readonly ConnectionOpenAck: MsgConnectionOpenAck; static readonly ConnectionOpenConfirm: MsgConnectionOpenConfirm; + static readonly UpdateConnectionParams: MsgUpdateConnectionParams; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -116,5 +126,14 @@ export class MsgClient { requestMessage: ibc_core_connection_v1_tx_pb.MsgConnectionOpenConfirm, callback: (error: ServiceError|null, responseMessage: ibc_core_connection_v1_tx_pb.MsgConnectionOpenConfirmResponse|null) => void ): UnaryResponse; + updateConnectionParams( + requestMessage: ibc_core_connection_v1_tx_pb.MsgUpdateParams, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_core_connection_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; + updateConnectionParams( + requestMessage: ibc_core_connection_v1_tx_pb.MsgUpdateParams, + callback: (error: ServiceError|null, responseMessage: ibc_core_connection_v1_tx_pb.MsgUpdateParamsResponse|null) => void + ): UnaryResponse; } diff --git a/proto/ibc/core/connection/v1/tx_pb_service.js b/codegen/ibc/core/connection/v1/tx_pb_service.js similarity index 81% rename from proto/ibc/core/connection/v1/tx_pb_service.js rename to codegen/ibc/core/connection/v1/tx_pb_service.js index d684008..fd4a398 100644 --- a/proto/ibc/core/connection/v1/tx_pb_service.js +++ b/codegen/ibc/core/connection/v1/tx_pb_service.js @@ -46,6 +46,15 @@ Msg.ConnectionOpenConfirm = { responseType: ibc_core_connection_v1_tx_pb.MsgConnectionOpenConfirmResponse }; +Msg.UpdateConnectionParams = { + methodName: "UpdateConnectionParams", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_core_connection_v1_tx_pb.MsgUpdateParams, + responseType: ibc_core_connection_v1_tx_pb.MsgUpdateParamsResponse +}; + exports.Msg = Msg; function MsgClient(serviceHost, options) { @@ -177,5 +186,36 @@ MsgClient.prototype.connectionOpenConfirm = function connectionOpenConfirm(reque }; }; +MsgClient.prototype.updateConnectionParams = function updateConnectionParams(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.UpdateConnectionParams, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.MsgClient = MsgClient; diff --git a/codegen/ibc/core/types/v1/genesis.ts b/codegen/ibc/core/types/v1/genesis.ts new file mode 100644 index 0000000..7c8ae87 --- /dev/null +++ b/codegen/ibc/core/types/v1/genesis.ts @@ -0,0 +1,134 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/core/types/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../client/v1/genesis"; +import * as dependency_3 from "./../../connection/v1/genesis"; +import * as dependency_4 from "./../../channel/v1/genesis"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.core.types.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_genesis?: dependency_2.ibc.core.client.v1.GenesisState; + connection_genesis?: dependency_3.ibc.core.connection.v1.GenesisState; + channel_genesis?: dependency_4.ibc.core.channel.v1.GenesisState; + }) { + 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_genesis" in data && data.client_genesis != undefined) { + this.client_genesis = data.client_genesis; + } + if ("connection_genesis" in data && data.connection_genesis != undefined) { + this.connection_genesis = data.connection_genesis; + } + if ("channel_genesis" in data && data.channel_genesis != undefined) { + this.channel_genesis = data.channel_genesis; + } + } + } + get client_genesis() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.core.client.v1.GenesisState, 1) as dependency_2.ibc.core.client.v1.GenesisState; + } + set client_genesis(value: dependency_2.ibc.core.client.v1.GenesisState) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_client_genesis() { + return pb_1.Message.getField(this, 1) != null; + } + get connection_genesis() { + return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.connection.v1.GenesisState, 2) as dependency_3.ibc.core.connection.v1.GenesisState; + } + set connection_genesis(value: dependency_3.ibc.core.connection.v1.GenesisState) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_connection_genesis() { + return pb_1.Message.getField(this, 2) != null; + } + get channel_genesis() { + return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.channel.v1.GenesisState, 3) as dependency_4.ibc.core.channel.v1.GenesisState; + } + set channel_genesis(value: dependency_4.ibc.core.channel.v1.GenesisState) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_channel_genesis() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + client_genesis?: ReturnType; + connection_genesis?: ReturnType; + channel_genesis?: ReturnType; + }): GenesisState { + const message = new GenesisState({}); + if (data.client_genesis != null) { + message.client_genesis = dependency_2.ibc.core.client.v1.GenesisState.fromObject(data.client_genesis); + } + if (data.connection_genesis != null) { + message.connection_genesis = dependency_3.ibc.core.connection.v1.GenesisState.fromObject(data.connection_genesis); + } + if (data.channel_genesis != null) { + message.channel_genesis = dependency_4.ibc.core.channel.v1.GenesisState.fromObject(data.channel_genesis); + } + return message; + } + toObject() { + const data: { + client_genesis?: ReturnType; + connection_genesis?: ReturnType; + channel_genesis?: ReturnType; + } = {}; + if (this.client_genesis != null) { + data.client_genesis = this.client_genesis.toObject(); + } + if (this.connection_genesis != null) { + data.connection_genesis = this.connection_genesis.toObject(); + } + if (this.channel_genesis != null) { + data.channel_genesis = this.channel_genesis.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_client_genesis) + writer.writeMessage(1, this.client_genesis, () => this.client_genesis.serialize(writer)); + if (this.has_connection_genesis) + writer.writeMessage(2, this.connection_genesis, () => this.connection_genesis.serialize(writer)); + if (this.has_channel_genesis) + writer.writeMessage(3, this.channel_genesis, () => this.channel_genesis.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.client_genesis, () => message.client_genesis = dependency_2.ibc.core.client.v1.GenesisState.deserialize(reader)); + break; + case 2: + reader.readMessage(message.connection_genesis, () => message.connection_genesis = dependency_3.ibc.core.connection.v1.GenesisState.deserialize(reader)); + break; + case 3: + reader.readMessage(message.channel_genesis, () => message.channel_genesis = dependency_4.ibc.core.channel.v1.GenesisState.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } +} diff --git a/proto/ibc/core/types/v1/genesis_pb.d.ts b/codegen/ibc/core/types/v1/genesis_pb.d.ts similarity index 100% rename from proto/ibc/core/types/v1/genesis_pb.d.ts rename to codegen/ibc/core/types/v1/genesis_pb.d.ts diff --git a/proto/ibc/core/types/v1/genesis_pb.js b/codegen/ibc/core/types/v1/genesis_pb.js similarity index 98% rename from proto/ibc/core/types/v1/genesis_pb.js rename to codegen/ibc/core/types/v1/genesis_pb.js index 4a496cb..6a4c551 100644 --- a/proto/ibc/core/types/v1/genesis_pb.js +++ b/codegen/ibc/core/types/v1/genesis_pb.js @@ -13,7 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); diff --git a/proto/ibc/core/types/v1/genesis_pb_service.d.ts b/codegen/ibc/core/types/v1/genesis_pb_service.d.ts similarity index 100% rename from proto/ibc/core/types/v1/genesis_pb_service.d.ts rename to codegen/ibc/core/types/v1/genesis_pb_service.d.ts diff --git a/proto/ibc/core/types/v1/genesis_pb_service.js b/codegen/ibc/core/types/v1/genesis_pb_service.js similarity index 100% rename from proto/ibc/core/types/v1/genesis_pb_service.js rename to codegen/ibc/core/types/v1/genesis_pb_service.js diff --git a/codegen/ibc/lightclients/localhost/v2/localhost.ts b/codegen/ibc/lightclients/localhost/v2/localhost.ts new file mode 100644 index 0000000..fa76b31 --- /dev/null +++ b/codegen/ibc/lightclients/localhost/v2/localhost.ts @@ -0,0 +1,80 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/lightclients/localhost/v2/localhost.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../core/client/v1/client"; +import * as dependency_2 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.lightclients.localhost.v2 { + export class ClientState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + latest_height?: dependency_1.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 ("latest_height" in data && data.latest_height != undefined) { + this.latest_height = data.latest_height; + } + } + } + get latest_height() { + return pb_1.Message.getWrapperField(this, dependency_1.ibc.core.client.v1.Height, 1) as dependency_1.ibc.core.client.v1.Height; + } + set latest_height(value: dependency_1.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_latest_height() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + latest_height?: ReturnType; + }): ClientState { + const message = new ClientState({}); + if (data.latest_height != null) { + message.latest_height = dependency_1.ibc.core.client.v1.Height.fromObject(data.latest_height); + } + return message; + } + toObject() { + const data: { + latest_height?: ReturnType; + } = {}; + if (this.latest_height != null) { + data.latest_height = this.latest_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_latest_height) + writer.writeMessage(1, this.latest_height, () => this.latest_height.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.latest_height, () => message.latest_height = dependency_1.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientState { + return ClientState.deserialize(bytes); + } + } +} diff --git a/proto/ibc/lightclients/localhost/v1/localhost_pb.d.ts b/codegen/ibc/lightclients/localhost/v2/localhost_pb.d.ts similarity index 68% rename from proto/ibc/lightclients/localhost/v1/localhost_pb.d.ts rename to codegen/ibc/lightclients/localhost/v2/localhost_pb.d.ts index 855cfba..83482fb 100644 --- a/proto/ibc/lightclients/localhost/v1/localhost_pb.d.ts +++ b/codegen/ibc/lightclients/localhost/v2/localhost_pb.d.ts @@ -1,18 +1,15 @@ -// package: ibc.lightclients.localhost.v1 -// file: ibc/lightclients/localhost/v1/localhost.proto +// package: ibc.lightclients.localhost.v2 +// file: ibc/lightclients/localhost/v2/localhost.proto import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; import * as ibc_core_client_v1_client_pb from "../../../../ibc/core/client/v1/client_pb"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; export class ClientState extends jspb.Message { - getChainId(): string; - setChainId(value: string): void; - - hasHeight(): boolean; - clearHeight(): void; - getHeight(): ibc_core_client_v1_client_pb.Height | undefined; - setHeight(value?: ibc_core_client_v1_client_pb.Height): void; + hasLatestHeight(): boolean; + clearLatestHeight(): void; + getLatestHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setLatestHeight(value?: ibc_core_client_v1_client_pb.Height): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ClientState.AsObject; @@ -26,8 +23,7 @@ export class ClientState extends jspb.Message { export namespace ClientState { export type AsObject = { - chainId: string, - height?: ibc_core_client_v1_client_pb.Height.AsObject, + latestHeight?: ibc_core_client_v1_client_pb.Height.AsObject, } } diff --git a/proto/ibc/lightclients/localhost/v1/localhost_pb.js b/codegen/ibc/lightclients/localhost/v2/localhost_pb.js similarity index 59% rename from proto/ibc/lightclients/localhost/v1/localhost_pb.js rename to codegen/ibc/lightclients/localhost/v2/localhost_pb.js index 1dbed69..7c1f830 100644 --- a/proto/ibc/lightclients/localhost/v1/localhost_pb.js +++ b/codegen/ibc/lightclients/localhost/v2/localhost_pb.js @@ -1,4 +1,4 @@ -// source: ibc/lightclients/localhost/v1/localhost.proto +// source: ibc/lightclients/localhost/v2/localhost.proto /** * @fileoverview * @enhanceable @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); goog.object.extend(proto, ibc_core_client_v1_client_pb); -goog.exportSymbol('proto.ibc.lightclients.localhost.v1.ClientState', null, global); +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.ibc.lightclients.localhost.v2.ClientState', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,16 +30,16 @@ goog.exportSymbol('proto.ibc.lightclients.localhost.v1.ClientState', null, globa * @extends {jspb.Message} * @constructor */ -proto.ibc.lightclients.localhost.v1.ClientState = function(opt_data) { +proto.ibc.lightclients.localhost.v2.ClientState = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ibc.lightclients.localhost.v1.ClientState, jspb.Message); +goog.inherits(proto.ibc.lightclients.localhost.v2.ClientState, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ibc.lightclients.localhost.v1.ClientState.displayName = 'proto.ibc.lightclients.localhost.v1.ClientState'; + proto.ibc.lightclients.localhost.v2.ClientState.displayName = 'proto.ibc.lightclients.localhost.v2.ClientState'; } @@ -57,8 +57,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ibc.lightclients.localhost.v1.ClientState.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.localhost.v1.ClientState.toObject(opt_includeInstance, this); +proto.ibc.lightclients.localhost.v2.ClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.localhost.v2.ClientState.toObject(opt_includeInstance, this); }; @@ -67,14 +67,13 @@ proto.ibc.lightclients.localhost.v1.ClientState.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.localhost.v1.ClientState} msg The msg instance to transform. + * @param {!proto.ibc.lightclients.localhost.v2.ClientState} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.lightclients.localhost.v1.ClientState.toObject = function(includeInstance, msg) { +proto.ibc.lightclients.localhost.v2.ClientState.toObject = function(includeInstance, msg) { var f, obj = { - chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), - height: (f = msg.getHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f) + latestHeight: (f = msg.getLatestHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f) }; if (includeInstance) { @@ -88,23 +87,23 @@ proto.ibc.lightclients.localhost.v1.ClientState.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.localhost.v1.ClientState} + * @return {!proto.ibc.lightclients.localhost.v2.ClientState} */ -proto.ibc.lightclients.localhost.v1.ClientState.deserializeBinary = function(bytes) { +proto.ibc.lightclients.localhost.v2.ClientState.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.localhost.v1.ClientState; - return proto.ibc.lightclients.localhost.v1.ClientState.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ibc.lightclients.localhost.v2.ClientState; + return proto.ibc.lightclients.localhost.v2.ClientState.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ibc.lightclients.localhost.v1.ClientState} msg The message object to deserialize into. + * @param {!proto.ibc.lightclients.localhost.v2.ClientState} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.localhost.v1.ClientState} + * @return {!proto.ibc.lightclients.localhost.v2.ClientState} */ -proto.ibc.lightclients.localhost.v1.ClientState.deserializeBinaryFromReader = function(msg, reader) { +proto.ibc.lightclients.localhost.v2.ClientState.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -112,13 +111,9 @@ proto.ibc.lightclients.localhost.v1.ClientState.deserializeBinaryFromReader = fu var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChainId(value); - break; - case 2: var value = new ibc_core_client_v1_client_pb.Height; reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); - msg.setHeight(value); + msg.setLatestHeight(value); break; default: reader.skipField(); @@ -133,9 +128,9 @@ proto.ibc.lightclients.localhost.v1.ClientState.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ibc.lightclients.localhost.v1.ClientState.prototype.serializeBinary = function() { +proto.ibc.lightclients.localhost.v2.ClientState.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.localhost.v1.ClientState.serializeBinaryToWriter(this, writer); + proto.ibc.lightclients.localhost.v2.ClientState.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -143,23 +138,16 @@ proto.ibc.lightclients.localhost.v1.ClientState.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.localhost.v1.ClientState} message + * @param {!proto.ibc.lightclients.localhost.v2.ClientState} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ibc.lightclients.localhost.v1.ClientState.serializeBinaryToWriter = function(message, writer) { +proto.ibc.lightclients.localhost.v2.ClientState.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChainId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHeight(); + f = message.getLatestHeight(); if (f != null) { writer.writeMessage( - 2, + 1, f, ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter ); @@ -168,48 +156,30 @@ proto.ibc.lightclients.localhost.v1.ClientState.serializeBinaryToWriter = functi /** - * optional string chain_id = 1; - * @return {string} - */ -proto.ibc.lightclients.localhost.v1.ClientState.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.lightclients.localhost.v1.ClientState} returns this - */ -proto.ibc.lightclients.localhost.v1.ClientState.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional ibc.core.client.v1.Height height = 2; + * optional ibc.core.client.v1.Height latest_height = 1; * @return {?proto.ibc.core.client.v1.Height} */ -proto.ibc.lightclients.localhost.v1.ClientState.prototype.getHeight = function() { +proto.ibc.lightclients.localhost.v2.ClientState.prototype.getLatestHeight = function() { return /** @type{?proto.ibc.core.client.v1.Height} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 2)); + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 1)); }; /** * @param {?proto.ibc.core.client.v1.Height|undefined} value - * @return {!proto.ibc.lightclients.localhost.v1.ClientState} returns this + * @return {!proto.ibc.lightclients.localhost.v2.ClientState} returns this */ -proto.ibc.lightclients.localhost.v1.ClientState.prototype.setHeight = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.ibc.lightclients.localhost.v2.ClientState.prototype.setLatestHeight = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.localhost.v1.ClientState} returns this + * @return {!proto.ibc.lightclients.localhost.v2.ClientState} returns this */ -proto.ibc.lightclients.localhost.v1.ClientState.prototype.clearHeight = function() { - return this.setHeight(undefined); +proto.ibc.lightclients.localhost.v2.ClientState.prototype.clearLatestHeight = function() { + return this.setLatestHeight(undefined); }; @@ -217,9 +187,9 @@ proto.ibc.lightclients.localhost.v1.ClientState.prototype.clearHeight = function * Returns whether this field is set. * @return {boolean} */ -proto.ibc.lightclients.localhost.v1.ClientState.prototype.hasHeight = function() { - return jspb.Message.getField(this, 2) != null; +proto.ibc.lightclients.localhost.v2.ClientState.prototype.hasLatestHeight = function() { + return jspb.Message.getField(this, 1) != null; }; -goog.object.extend(exports, proto.ibc.lightclients.localhost.v1); +goog.object.extend(exports, proto.ibc.lightclients.localhost.v2); diff --git a/codegen/ibc/lightclients/localhost/v2/localhost_pb_service.d.ts b/codegen/ibc/lightclients/localhost/v2/localhost_pb_service.d.ts new file mode 100644 index 0000000..10f5093 --- /dev/null +++ b/codegen/ibc/lightclients/localhost/v2/localhost_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.lightclients.localhost.v2 +// file: ibc/lightclients/localhost/v2/localhost.proto + diff --git a/codegen/ibc/lightclients/localhost/v2/localhost_pb_service.js b/codegen/ibc/lightclients/localhost/v2/localhost_pb_service.js new file mode 100644 index 0000000..10f5093 --- /dev/null +++ b/codegen/ibc/lightclients/localhost/v2/localhost_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.lightclients.localhost.v2 +// file: ibc/lightclients/localhost/v2/localhost.proto + diff --git a/codegen/ibc/lightclients/solomachine/v2/solomachine.ts b/codegen/ibc/lightclients/solomachine/v2/solomachine.ts new file mode 100644 index 0000000..aec1ee4 --- /dev/null +++ b/codegen/ibc/lightclients/solomachine/v2/solomachine.ts @@ -0,0 +1,1770 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/lightclients/solomachine/v2/solomachine.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../core/connection/v1/connection"; +import * as dependency_2 from "./../../../core/channel/v1/channel"; +import * as dependency_3 from "./../../../../gogoproto/gogo"; +import * as dependency_4 from "./../../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.lightclients.solomachine.v2 { + export enum DataType { + DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0, + DATA_TYPE_CLIENT_STATE = 1, + DATA_TYPE_CONSENSUS_STATE = 2, + DATA_TYPE_CONNECTION_STATE = 3, + DATA_TYPE_CHANNEL_STATE = 4, + DATA_TYPE_PACKET_COMMITMENT = 5, + DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6, + DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7, + DATA_TYPE_NEXT_SEQUENCE_RECV = 8, + DATA_TYPE_HEADER = 9 + } + export class ClientState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: number; + is_frozen?: boolean; + consensus_state?: ConsensusState; + allow_update_after_proposal?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("is_frozen" in data && data.is_frozen != undefined) { + this.is_frozen = data.is_frozen; + } + if ("consensus_state" in data && data.consensus_state != undefined) { + this.consensus_state = data.consensus_state; + } + if ("allow_update_after_proposal" in data && data.allow_update_after_proposal != undefined) { + this.allow_update_after_proposal = data.allow_update_after_proposal; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + get is_frozen() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set is_frozen(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get consensus_state() { + return pb_1.Message.getWrapperField(this, ConsensusState, 3) as ConsensusState; + } + set consensus_state(value: ConsensusState) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_consensus_state() { + return pb_1.Message.getField(this, 3) != null; + } + get allow_update_after_proposal() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set allow_update_after_proposal(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + sequence?: number; + is_frozen?: boolean; + consensus_state?: ReturnType; + allow_update_after_proposal?: boolean; + }): ClientState { + const message = new ClientState({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.is_frozen != null) { + message.is_frozen = data.is_frozen; + } + if (data.consensus_state != null) { + message.consensus_state = ConsensusState.fromObject(data.consensus_state); + } + if (data.allow_update_after_proposal != null) { + message.allow_update_after_proposal = data.allow_update_after_proposal; + } + return message; + } + toObject() { + const data: { + sequence?: number; + is_frozen?: boolean; + consensus_state?: ReturnType; + allow_update_after_proposal?: boolean; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.is_frozen != null) { + data.is_frozen = this.is_frozen; + } + if (this.consensus_state != null) { + data.consensus_state = this.consensus_state.toObject(); + } + if (this.allow_update_after_proposal != null) { + data.allow_update_after_proposal = this.allow_update_after_proposal; + } + 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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (this.is_frozen != false) + writer.writeBool(2, this.is_frozen); + if (this.has_consensus_state) + writer.writeMessage(3, this.consensus_state, () => this.consensus_state.serialize(writer)); + if (this.allow_update_after_proposal != false) + writer.writeBool(4, this.allow_update_after_proposal); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + case 2: + message.is_frozen = reader.readBool(); + break; + case 3: + reader.readMessage(message.consensus_state, () => message.consensus_state = ConsensusState.deserialize(reader)); + break; + case 4: + message.allow_update_after_proposal = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientState { + return ClientState.deserialize(bytes); + } + } + export class ConsensusState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + public_key?: dependency_4.google.protobuf.Any; + diversifier?: string; + timestamp?: 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 ("public_key" in data && data.public_key != undefined) { + this.public_key = data.public_key; + } + if ("diversifier" in data && data.diversifier != undefined) { + this.diversifier = data.diversifier; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get public_key() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 1) as dependency_4.google.protobuf.Any; + } + set public_key(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_public_key() { + return pb_1.Message.getField(this, 1) != null; + } + get diversifier() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set diversifier(value: string) { + pb_1.Message.setField(this, 2, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + public_key?: ReturnType; + diversifier?: string; + timestamp?: number; + }): ConsensusState { + const message = new ConsensusState({}); + if (data.public_key != null) { + message.public_key = dependency_4.google.protobuf.Any.fromObject(data.public_key); + } + if (data.diversifier != null) { + message.diversifier = data.diversifier; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + return message; + } + toObject() { + const data: { + public_key?: ReturnType; + diversifier?: string; + timestamp?: number; + } = {}; + if (this.public_key != null) { + data.public_key = this.public_key.toObject(); + } + if (this.diversifier != null) { + data.diversifier = this.diversifier; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + 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_public_key) + writer.writeMessage(1, this.public_key, () => this.public_key.serialize(writer)); + if (this.diversifier.length) + writer.writeString(2, this.diversifier); + if (this.timestamp != 0) + writer.writeUint64(3, this.timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConsensusState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConsensusState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.public_key, () => message.public_key = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 2: + message.diversifier = reader.readString(); + break; + case 3: + message.timestamp = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConsensusState { + return ConsensusState.deserialize(bytes); + } + } + export class Header extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: number; + timestamp?: number; + signature?: Uint8Array; + new_public_key?: dependency_4.google.protobuf.Any; + new_diversifier?: 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 ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + if ("new_public_key" in data && data.new_public_key != undefined) { + this.new_public_key = data.new_public_key; + } + if ("new_diversifier" in data && data.new_diversifier != undefined) { + this.new_diversifier = data.new_diversifier; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 2, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get new_public_key() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 4) as dependency_4.google.protobuf.Any; + } + set new_public_key(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_new_public_key() { + return pb_1.Message.getField(this, 4) != null; + } + get new_diversifier() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set new_diversifier(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + sequence?: number; + timestamp?: number; + signature?: Uint8Array; + new_public_key?: ReturnType; + new_diversifier?: string; + }): Header { + const message = new Header({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + if (data.signature != null) { + message.signature = data.signature; + } + if (data.new_public_key != null) { + message.new_public_key = dependency_4.google.protobuf.Any.fromObject(data.new_public_key); + } + if (data.new_diversifier != null) { + message.new_diversifier = data.new_diversifier; + } + return message; + } + toObject() { + const data: { + sequence?: number; + timestamp?: number; + signature?: Uint8Array; + new_public_key?: ReturnType; + new_diversifier?: string; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + if (this.signature != null) { + data.signature = this.signature; + } + if (this.new_public_key != null) { + data.new_public_key = this.new_public_key.toObject(); + } + if (this.new_diversifier != null) { + data.new_diversifier = this.new_diversifier; + } + 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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (this.timestamp != 0) + writer.writeUint64(2, this.timestamp); + if (this.signature.length) + writer.writeBytes(3, this.signature); + if (this.has_new_public_key) + writer.writeMessage(4, this.new_public_key, () => this.new_public_key.serialize(writer)); + if (this.new_diversifier.length) + writer.writeString(5, this.new_diversifier); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Header { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Header(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + case 2: + message.timestamp = reader.readUint64(); + break; + case 3: + message.signature = reader.readBytes(); + break; + case 4: + reader.readMessage(message.new_public_key, () => message.new_public_key = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 5: + message.new_diversifier = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Header { + return Header.deserialize(bytes); + } + } + export class Misbehaviour extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + client_id?: string; + sequence?: number; + signature_one?: SignatureAndData; + signature_two?: SignatureAndData; + }) { + 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; + } + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("signature_one" in data && data.signature_one != undefined) { + this.signature_one = data.signature_one; + } + if ("signature_two" in data && data.signature_two != undefined) { + this.signature_two = data.signature_two; + } + } + } + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 2, value); + } + get signature_one() { + return pb_1.Message.getWrapperField(this, SignatureAndData, 3) as SignatureAndData; + } + set signature_one(value: SignatureAndData) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_signature_one() { + return pb_1.Message.getField(this, 3) != null; + } + get signature_two() { + return pb_1.Message.getWrapperField(this, SignatureAndData, 4) as SignatureAndData; + } + set signature_two(value: SignatureAndData) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_signature_two() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + client_id?: string; + sequence?: number; + signature_one?: ReturnType; + signature_two?: ReturnType; + }): Misbehaviour { + const message = new Misbehaviour({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.signature_one != null) { + message.signature_one = SignatureAndData.fromObject(data.signature_one); + } + if (data.signature_two != null) { + message.signature_two = SignatureAndData.fromObject(data.signature_two); + } + return message; + } + toObject() { + const data: { + client_id?: string; + sequence?: number; + signature_one?: ReturnType; + signature_two?: ReturnType; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.signature_one != null) { + data.signature_one = this.signature_one.toObject(); + } + if (this.signature_two != null) { + data.signature_two = this.signature_two.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.client_id.length) + writer.writeString(1, this.client_id); + if (this.sequence != 0) + writer.writeUint64(2, this.sequence); + if (this.has_signature_one) + writer.writeMessage(3, this.signature_one, () => this.signature_one.serialize(writer)); + if (this.has_signature_two) + writer.writeMessage(4, this.signature_two, () => this.signature_two.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Misbehaviour { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Misbehaviour(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + message.sequence = reader.readUint64(); + break; + case 3: + reader.readMessage(message.signature_one, () => message.signature_one = SignatureAndData.deserialize(reader)); + break; + case 4: + reader.readMessage(message.signature_two, () => message.signature_two = SignatureAndData.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Misbehaviour { + return Misbehaviour.deserialize(bytes); + } + } + export class SignatureAndData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signature?: Uint8Array; + data_type?: DataType; + data?: Uint8Array; + timestamp?: 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 ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + if ("data_type" in data && data.data_type != undefined) { + this.data_type = data.data_type; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get data_type() { + return pb_1.Message.getFieldWithDefault(this, 2, DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED) as DataType; + } + set data_type(value: DataType) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + signature?: Uint8Array; + data_type?: DataType; + data?: Uint8Array; + timestamp?: number; + }): SignatureAndData { + const message = new SignatureAndData({}); + if (data.signature != null) { + message.signature = data.signature; + } + if (data.data_type != null) { + message.data_type = data.data_type; + } + if (data.data != null) { + message.data = data.data; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + return message; + } + toObject() { + const data: { + signature?: Uint8Array; + data_type?: DataType; + data?: Uint8Array; + timestamp?: number; + } = {}; + if (this.signature != null) { + data.signature = this.signature; + } + if (this.data_type != null) { + data.data_type = this.data_type; + } + if (this.data != null) { + data.data = this.data; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + 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.signature.length) + writer.writeBytes(1, this.signature); + if (this.data_type != DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED) + writer.writeEnum(2, this.data_type); + if (this.data.length) + writer.writeBytes(3, this.data); + if (this.timestamp != 0) + writer.writeUint64(4, this.timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignatureAndData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignatureAndData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signature = reader.readBytes(); + break; + case 2: + message.data_type = reader.readEnum(); + break; + case 3: + message.data = reader.readBytes(); + break; + case 4: + message.timestamp = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignatureAndData { + return SignatureAndData.deserialize(bytes); + } + } + export class TimestampedSignatureData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signature_data?: Uint8Array; + timestamp?: 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 ("signature_data" in data && data.signature_data != undefined) { + this.signature_data = data.signature_data; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get signature_data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set signature_data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + signature_data?: Uint8Array; + timestamp?: number; + }): TimestampedSignatureData { + const message = new TimestampedSignatureData({}); + if (data.signature_data != null) { + message.signature_data = data.signature_data; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + return message; + } + toObject() { + const data: { + signature_data?: Uint8Array; + timestamp?: number; + } = {}; + if (this.signature_data != null) { + data.signature_data = this.signature_data; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + 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.signature_data.length) + writer.writeBytes(1, this.signature_data); + if (this.timestamp != 0) + writer.writeUint64(2, this.timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TimestampedSignatureData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TimestampedSignatureData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signature_data = reader.readBytes(); + break; + case 2: + message.timestamp = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TimestampedSignatureData { + return TimestampedSignatureData.deserialize(bytes); + } + } + export class SignBytes extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: number; + timestamp?: number; + diversifier?: string; + data_type?: DataType; + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("diversifier" in data && data.diversifier != undefined) { + this.diversifier = data.diversifier; + } + if ("data_type" in data && data.data_type != undefined) { + this.data_type = data.data_type; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 2, value); + } + get diversifier() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set diversifier(value: string) { + pb_1.Message.setField(this, 3, value); + } + get data_type() { + return pb_1.Message.getFieldWithDefault(this, 4, DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED) as DataType; + } + set data_type(value: DataType) { + pb_1.Message.setField(this, 4, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + sequence?: number; + timestamp?: number; + diversifier?: string; + data_type?: DataType; + data?: Uint8Array; + }): SignBytes { + const message = new SignBytes({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + if (data.diversifier != null) { + message.diversifier = data.diversifier; + } + if (data.data_type != null) { + message.data_type = data.data_type; + } + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + sequence?: number; + timestamp?: number; + diversifier?: string; + data_type?: DataType; + data?: Uint8Array; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + if (this.diversifier != null) { + data.diversifier = this.diversifier; + } + if (this.data_type != null) { + data.data_type = this.data_type; + } + if (this.data != null) { + data.data = this.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 (this.sequence != 0) + writer.writeUint64(1, this.sequence); + if (this.timestamp != 0) + writer.writeUint64(2, this.timestamp); + if (this.diversifier.length) + writer.writeString(3, this.diversifier); + if (this.data_type != DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED) + writer.writeEnum(4, this.data_type); + if (this.data.length) + writer.writeBytes(5, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignBytes { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignBytes(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + case 2: + message.timestamp = reader.readUint64(); + break; + case 3: + message.diversifier = reader.readString(); + break; + case 4: + message.data_type = reader.readEnum(); + break; + case 5: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignBytes { + return SignBytes.deserialize(bytes); + } + } + export class HeaderData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + new_pub_key?: dependency_4.google.protobuf.Any; + new_diversifier?: 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 ("new_pub_key" in data && data.new_pub_key != undefined) { + this.new_pub_key = data.new_pub_key; + } + if ("new_diversifier" in data && data.new_diversifier != undefined) { + this.new_diversifier = data.new_diversifier; + } + } + } + get new_pub_key() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 1) as dependency_4.google.protobuf.Any; + } + set new_pub_key(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_new_pub_key() { + return pb_1.Message.getField(this, 1) != null; + } + get new_diversifier() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set new_diversifier(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + new_pub_key?: ReturnType; + new_diversifier?: string; + }): HeaderData { + const message = new HeaderData({}); + if (data.new_pub_key != null) { + message.new_pub_key = dependency_4.google.protobuf.Any.fromObject(data.new_pub_key); + } + if (data.new_diversifier != null) { + message.new_diversifier = data.new_diversifier; + } + return message; + } + toObject() { + const data: { + new_pub_key?: ReturnType; + new_diversifier?: string; + } = {}; + if (this.new_pub_key != null) { + data.new_pub_key = this.new_pub_key.toObject(); + } + if (this.new_diversifier != null) { + data.new_diversifier = this.new_diversifier; + } + 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_new_pub_key) + writer.writeMessage(1, this.new_pub_key, () => this.new_pub_key.serialize(writer)); + if (this.new_diversifier.length) + writer.writeString(2, this.new_diversifier); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HeaderData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HeaderData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.new_pub_key, () => message.new_pub_key = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + case 2: + message.new_diversifier = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): HeaderData { + return HeaderData.deserialize(bytes); + } + } + export class ClientStateData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: Uint8Array; + client_state?: dependency_4.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("client_state" in data && data.client_state != undefined) { + this.client_state = data.client_state; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get client_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set client_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_client_state() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + path?: Uint8Array; + client_state?: ReturnType; + }): ClientStateData { + const message = new ClientStateData({}); + if (data.path != null) { + message.path = data.path; + } + if (data.client_state != null) { + message.client_state = dependency_4.google.protobuf.Any.fromObject(data.client_state); + } + return message; + } + toObject() { + const data: { + path?: Uint8Array; + client_state?: ReturnType; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.client_state != null) { + data.client_state = this.client_state.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.path.length) + writer.writeBytes(1, this.path); + if (this.has_client_state) + writer.writeMessage(2, this.client_state, () => this.client_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientStateData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientStateData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readBytes(); + break; + case 2: + reader.readMessage(message.client_state, () => message.client_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientStateData { + return ClientStateData.deserialize(bytes); + } + } + export class ConsensusStateData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: Uint8Array; + consensus_state?: dependency_4.google.protobuf.Any; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("consensus_state" in data && data.consensus_state != undefined) { + this.consensus_state = data.consensus_state; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get consensus_state() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Any, 2) as dependency_4.google.protobuf.Any; + } + set consensus_state(value: dependency_4.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_consensus_state() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + path?: Uint8Array; + consensus_state?: ReturnType; + }): ConsensusStateData { + const message = new ConsensusStateData({}); + if (data.path != null) { + message.path = data.path; + } + if (data.consensus_state != null) { + message.consensus_state = dependency_4.google.protobuf.Any.fromObject(data.consensus_state); + } + return message; + } + toObject() { + const data: { + path?: Uint8Array; + consensus_state?: ReturnType; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.consensus_state != null) { + data.consensus_state = this.consensus_state.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.path.length) + writer.writeBytes(1, this.path); + if (this.has_consensus_state) + writer.writeMessage(2, this.consensus_state, () => this.consensus_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConsensusStateData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConsensusStateData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readBytes(); + break; + case 2: + reader.readMessage(message.consensus_state, () => message.consensus_state = dependency_4.google.protobuf.Any.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConsensusStateData { + return ConsensusStateData.deserialize(bytes); + } + } + export class ConnectionStateData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: Uint8Array; + connection?: dependency_1.ibc.core.connection.v1.ConnectionEnd; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("connection" in data && data.connection != undefined) { + this.connection = data.connection; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get connection() { + return pb_1.Message.getWrapperField(this, dependency_1.ibc.core.connection.v1.ConnectionEnd, 2) as dependency_1.ibc.core.connection.v1.ConnectionEnd; + } + set connection(value: dependency_1.ibc.core.connection.v1.ConnectionEnd) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_connection() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + path?: Uint8Array; + connection?: ReturnType; + }): ConnectionStateData { + const message = new ConnectionStateData({}); + if (data.path != null) { + message.path = data.path; + } + if (data.connection != null) { + message.connection = dependency_1.ibc.core.connection.v1.ConnectionEnd.fromObject(data.connection); + } + return message; + } + toObject() { + const data: { + path?: Uint8Array; + connection?: ReturnType; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.connection != null) { + data.connection = this.connection.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.path.length) + writer.writeBytes(1, this.path); + if (this.has_connection) + writer.writeMessage(2, this.connection, () => this.connection.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConnectionStateData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConnectionStateData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readBytes(); + break; + case 2: + reader.readMessage(message.connection, () => message.connection = dependency_1.ibc.core.connection.v1.ConnectionEnd.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConnectionStateData { + return ConnectionStateData.deserialize(bytes); + } + } + export class ChannelStateData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: Uint8Array; + channel?: dependency_2.ibc.core.channel.v1.Channel; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("channel" in data && data.channel != undefined) { + this.channel = data.channel; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get channel() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.core.channel.v1.Channel, 2) as dependency_2.ibc.core.channel.v1.Channel; + } + set channel(value: dependency_2.ibc.core.channel.v1.Channel) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_channel() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + path?: Uint8Array; + channel?: ReturnType; + }): ChannelStateData { + const message = new ChannelStateData({}); + if (data.path != null) { + message.path = data.path; + } + if (data.channel != null) { + message.channel = dependency_2.ibc.core.channel.v1.Channel.fromObject(data.channel); + } + return message; + } + toObject() { + const data: { + path?: Uint8Array; + channel?: ReturnType; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.channel != null) { + data.channel = this.channel.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.path.length) + writer.writeBytes(1, this.path); + if (this.has_channel) + writer.writeMessage(2, this.channel, () => this.channel.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ChannelStateData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ChannelStateData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readBytes(); + break; + case 2: + reader.readMessage(message.channel, () => message.channel = dependency_2.ibc.core.channel.v1.Channel.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ChannelStateData { + return ChannelStateData.deserialize(bytes); + } + } + export class PacketCommitmentData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: Uint8Array; + commitment?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("commitment" in data && data.commitment != undefined) { + this.commitment = data.commitment; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get commitment() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set commitment(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + path?: Uint8Array; + commitment?: Uint8Array; + }): PacketCommitmentData { + const message = new PacketCommitmentData({}); + if (data.path != null) { + message.path = data.path; + } + if (data.commitment != null) { + message.commitment = data.commitment; + } + return message; + } + toObject() { + const data: { + path?: Uint8Array; + commitment?: Uint8Array; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.commitment != null) { + data.commitment = this.commitment; + } + 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.path.length) + writer.writeBytes(1, this.path); + if (this.commitment.length) + writer.writeBytes(2, this.commitment); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PacketCommitmentData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PacketCommitmentData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readBytes(); + break; + case 2: + message.commitment = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PacketCommitmentData { + return PacketCommitmentData.deserialize(bytes); + } + } + export class PacketAcknowledgementData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: Uint8Array; + acknowledgement?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("acknowledgement" in data && data.acknowledgement != undefined) { + this.acknowledgement = data.acknowledgement; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get acknowledgement() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set acknowledgement(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + path?: Uint8Array; + acknowledgement?: Uint8Array; + }): PacketAcknowledgementData { + const message = new PacketAcknowledgementData({}); + if (data.path != null) { + message.path = data.path; + } + if (data.acknowledgement != null) { + message.acknowledgement = data.acknowledgement; + } + return message; + } + toObject() { + const data: { + path?: Uint8Array; + acknowledgement?: Uint8Array; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.acknowledgement != null) { + data.acknowledgement = this.acknowledgement; + } + 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.path.length) + writer.writeBytes(1, this.path); + if (this.acknowledgement.length) + writer.writeBytes(2, this.acknowledgement); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PacketAcknowledgementData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PacketAcknowledgementData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readBytes(); + break; + case 2: + message.acknowledgement = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PacketAcknowledgementData { + return PacketAcknowledgementData.deserialize(bytes); + } + } + export class PacketReceiptAbsenceData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + path?: Uint8Array; + }): PacketReceiptAbsenceData { + const message = new PacketReceiptAbsenceData({}); + if (data.path != null) { + message.path = data.path; + } + return message; + } + toObject() { + const data: { + path?: Uint8Array; + } = {}; + if (this.path != null) { + data.path = this.path; + } + 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.path.length) + writer.writeBytes(1, this.path); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PacketReceiptAbsenceData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PacketReceiptAbsenceData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PacketReceiptAbsenceData { + return PacketReceiptAbsenceData.deserialize(bytes); + } + } + export class NextSequenceRecvData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + path?: Uint8Array; + next_seq_recv?: 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 ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("next_seq_recv" in data && data.next_seq_recv != undefined) { + this.next_seq_recv = data.next_seq_recv; + } + } + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get next_seq_recv() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set next_seq_recv(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + path?: Uint8Array; + next_seq_recv?: number; + }): NextSequenceRecvData { + const message = new NextSequenceRecvData({}); + if (data.path != null) { + message.path = data.path; + } + if (data.next_seq_recv != null) { + message.next_seq_recv = data.next_seq_recv; + } + return message; + } + toObject() { + const data: { + path?: Uint8Array; + next_seq_recv?: number; + } = {}; + if (this.path != null) { + data.path = this.path; + } + if (this.next_seq_recv != null) { + data.next_seq_recv = this.next_seq_recv; + } + 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.path.length) + writer.writeBytes(1, this.path); + if (this.next_seq_recv != 0) + writer.writeUint64(2, this.next_seq_recv); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NextSequenceRecvData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NextSequenceRecvData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.path = reader.readBytes(); + break; + case 2: + message.next_seq_recv = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): NextSequenceRecvData { + return NextSequenceRecvData.deserialize(bytes); + } + } +} diff --git a/proto/ibc/lightclients/solomachine/v2/solomachine_pb.d.ts b/codegen/ibc/lightclients/solomachine/v2/solomachine_pb.d.ts similarity index 100% rename from proto/ibc/lightclients/solomachine/v2/solomachine_pb.d.ts rename to codegen/ibc/lightclients/solomachine/v2/solomachine_pb.d.ts diff --git a/proto/ibc/lightclients/solomachine/v2/solomachine_pb.js b/codegen/ibc/lightclients/solomachine/v2/solomachine_pb.js similarity index 99% rename from proto/ibc/lightclients/solomachine/v2/solomachine_pb.js rename to codegen/ibc/lightclients/solomachine/v2/solomachine_pb.js index fed6bdf..1111f1e 100644 --- a/proto/ibc/lightclients/solomachine/v2/solomachine_pb.js +++ b/codegen/ibc/lightclients/solomachine/v2/solomachine_pb.js @@ -13,7 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var ibc_core_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js'); goog.object.extend(proto, ibc_core_connection_v1_connection_pb); diff --git a/proto/ibc/lightclients/solomachine/v2/solomachine_pb_service.d.ts b/codegen/ibc/lightclients/solomachine/v2/solomachine_pb_service.d.ts similarity index 100% rename from proto/ibc/lightclients/solomachine/v2/solomachine_pb_service.d.ts rename to codegen/ibc/lightclients/solomachine/v2/solomachine_pb_service.d.ts diff --git a/proto/ibc/lightclients/solomachine/v2/solomachine_pb_service.js b/codegen/ibc/lightclients/solomachine/v2/solomachine_pb_service.js similarity index 100% rename from proto/ibc/lightclients/solomachine/v2/solomachine_pb_service.js rename to codegen/ibc/lightclients/solomachine/v2/solomachine_pb_service.js diff --git a/codegen/ibc/lightclients/solomachine/v3/solomachine.ts b/codegen/ibc/lightclients/solomachine/v3/solomachine.ts new file mode 100644 index 0000000..431a30c --- /dev/null +++ b/codegen/ibc/lightclients/solomachine/v3/solomachine.ts @@ -0,0 +1,978 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/lightclients/solomachine/v3/solomachine.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../../google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.lightclients.solomachine.v3 { + export class ClientState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: number; + is_frozen?: boolean; + consensus_state?: ConsensusState; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("is_frozen" in data && data.is_frozen != undefined) { + this.is_frozen = data.is_frozen; + } + if ("consensus_state" in data && data.consensus_state != undefined) { + this.consensus_state = data.consensus_state; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + get is_frozen() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set is_frozen(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get consensus_state() { + return pb_1.Message.getWrapperField(this, ConsensusState, 3) as ConsensusState; + } + set consensus_state(value: ConsensusState) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_consensus_state() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + sequence?: number; + is_frozen?: boolean; + consensus_state?: ReturnType; + }): ClientState { + const message = new ClientState({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.is_frozen != null) { + message.is_frozen = data.is_frozen; + } + if (data.consensus_state != null) { + message.consensus_state = ConsensusState.fromObject(data.consensus_state); + } + return message; + } + toObject() { + const data: { + sequence?: number; + is_frozen?: boolean; + consensus_state?: ReturnType; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.is_frozen != null) { + data.is_frozen = this.is_frozen; + } + if (this.consensus_state != null) { + data.consensus_state = this.consensus_state.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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (this.is_frozen != false) + writer.writeBool(2, this.is_frozen); + if (this.has_consensus_state) + writer.writeMessage(3, this.consensus_state, () => this.consensus_state.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + case 2: + message.is_frozen = reader.readBool(); + break; + case 3: + reader.readMessage(message.consensus_state, () => message.consensus_state = ConsensusState.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientState { + return ClientState.deserialize(bytes); + } + } + export class ConsensusState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + public_key?: dependency_2.google.protobuf.Any; + diversifier?: string; + timestamp?: 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 ("public_key" in data && data.public_key != undefined) { + this.public_key = data.public_key; + } + if ("diversifier" in data && data.diversifier != undefined) { + this.diversifier = data.diversifier; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get public_key() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 1) as dependency_2.google.protobuf.Any; + } + set public_key(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_public_key() { + return pb_1.Message.getField(this, 1) != null; + } + get diversifier() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set diversifier(value: string) { + pb_1.Message.setField(this, 2, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + public_key?: ReturnType; + diversifier?: string; + timestamp?: number; + }): ConsensusState { + const message = new ConsensusState({}); + if (data.public_key != null) { + message.public_key = dependency_2.google.protobuf.Any.fromObject(data.public_key); + } + if (data.diversifier != null) { + message.diversifier = data.diversifier; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + return message; + } + toObject() { + const data: { + public_key?: ReturnType; + diversifier?: string; + timestamp?: number; + } = {}; + if (this.public_key != null) { + data.public_key = this.public_key.toObject(); + } + if (this.diversifier != null) { + data.diversifier = this.diversifier; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + 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_public_key) + writer.writeMessage(1, this.public_key, () => this.public_key.serialize(writer)); + if (this.diversifier.length) + writer.writeString(2, this.diversifier); + if (this.timestamp != 0) + writer.writeUint64(3, this.timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConsensusState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConsensusState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.public_key, () => message.public_key = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + case 2: + message.diversifier = reader.readString(); + break; + case 3: + message.timestamp = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConsensusState { + return ConsensusState.deserialize(bytes); + } + } + export class Header extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + timestamp?: number; + signature?: Uint8Array; + new_public_key?: dependency_2.google.protobuf.Any; + new_diversifier?: 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 ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + if ("new_public_key" in data && data.new_public_key != undefined) { + this.new_public_key = data.new_public_key; + } + if ("new_diversifier" in data && data.new_diversifier != undefined) { + this.new_diversifier = data.new_diversifier; + } + } + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 1, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get new_public_key() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 3) as dependency_2.google.protobuf.Any; + } + set new_public_key(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_new_public_key() { + return pb_1.Message.getField(this, 3) != null; + } + get new_diversifier() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set new_diversifier(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + timestamp?: number; + signature?: Uint8Array; + new_public_key?: ReturnType; + new_diversifier?: string; + }): Header { + const message = new Header({}); + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + if (data.signature != null) { + message.signature = data.signature; + } + if (data.new_public_key != null) { + message.new_public_key = dependency_2.google.protobuf.Any.fromObject(data.new_public_key); + } + if (data.new_diversifier != null) { + message.new_diversifier = data.new_diversifier; + } + return message; + } + toObject() { + const data: { + timestamp?: number; + signature?: Uint8Array; + new_public_key?: ReturnType; + new_diversifier?: string; + } = {}; + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + if (this.signature != null) { + data.signature = this.signature; + } + if (this.new_public_key != null) { + data.new_public_key = this.new_public_key.toObject(); + } + if (this.new_diversifier != null) { + data.new_diversifier = this.new_diversifier; + } + 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.timestamp != 0) + writer.writeUint64(1, this.timestamp); + if (this.signature.length) + writer.writeBytes(2, this.signature); + if (this.has_new_public_key) + writer.writeMessage(3, this.new_public_key, () => this.new_public_key.serialize(writer)); + if (this.new_diversifier.length) + writer.writeString(4, this.new_diversifier); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Header { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Header(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.timestamp = reader.readUint64(); + break; + case 2: + message.signature = reader.readBytes(); + break; + case 3: + reader.readMessage(message.new_public_key, () => message.new_public_key = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + case 4: + message.new_diversifier = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Header { + return Header.deserialize(bytes); + } + } + export class Misbehaviour extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: number; + signature_one?: SignatureAndData; + signature_two?: SignatureAndData; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("signature_one" in data && data.signature_one != undefined) { + this.signature_one = data.signature_one; + } + if ("signature_two" in data && data.signature_two != undefined) { + this.signature_two = data.signature_two; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + get signature_one() { + return pb_1.Message.getWrapperField(this, SignatureAndData, 2) as SignatureAndData; + } + set signature_one(value: SignatureAndData) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_signature_one() { + return pb_1.Message.getField(this, 2) != null; + } + get signature_two() { + return pb_1.Message.getWrapperField(this, SignatureAndData, 3) as SignatureAndData; + } + set signature_two(value: SignatureAndData) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_signature_two() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + sequence?: number; + signature_one?: ReturnType; + signature_two?: ReturnType; + }): Misbehaviour { + const message = new Misbehaviour({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.signature_one != null) { + message.signature_one = SignatureAndData.fromObject(data.signature_one); + } + if (data.signature_two != null) { + message.signature_two = SignatureAndData.fromObject(data.signature_two); + } + return message; + } + toObject() { + const data: { + sequence?: number; + signature_one?: ReturnType; + signature_two?: ReturnType; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.signature_one != null) { + data.signature_one = this.signature_one.toObject(); + } + if (this.signature_two != null) { + data.signature_two = this.signature_two.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.sequence != 0) + writer.writeUint64(1, this.sequence); + if (this.has_signature_one) + writer.writeMessage(2, this.signature_one, () => this.signature_one.serialize(writer)); + if (this.has_signature_two) + writer.writeMessage(3, this.signature_two, () => this.signature_two.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Misbehaviour { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Misbehaviour(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + case 2: + reader.readMessage(message.signature_one, () => message.signature_one = SignatureAndData.deserialize(reader)); + break; + case 3: + reader.readMessage(message.signature_two, () => message.signature_two = SignatureAndData.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Misbehaviour { + return Misbehaviour.deserialize(bytes); + } + } + export class SignatureAndData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signature?: Uint8Array; + path?: Uint8Array; + data?: Uint8Array; + timestamp?: 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 ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + signature?: Uint8Array; + path?: Uint8Array; + data?: Uint8Array; + timestamp?: number; + }): SignatureAndData { + const message = new SignatureAndData({}); + if (data.signature != null) { + message.signature = data.signature; + } + if (data.path != null) { + message.path = data.path; + } + if (data.data != null) { + message.data = data.data; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + return message; + } + toObject() { + const data: { + signature?: Uint8Array; + path?: Uint8Array; + data?: Uint8Array; + timestamp?: number; + } = {}; + if (this.signature != null) { + data.signature = this.signature; + } + if (this.path != null) { + data.path = this.path; + } + if (this.data != null) { + data.data = this.data; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + 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.signature.length) + writer.writeBytes(1, this.signature); + if (this.path.length) + writer.writeBytes(2, this.path); + if (this.data.length) + writer.writeBytes(3, this.data); + if (this.timestamp != 0) + writer.writeUint64(4, this.timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignatureAndData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignatureAndData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signature = reader.readBytes(); + break; + case 2: + message.path = reader.readBytes(); + break; + case 3: + message.data = reader.readBytes(); + break; + case 4: + message.timestamp = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignatureAndData { + return SignatureAndData.deserialize(bytes); + } + } + export class TimestampedSignatureData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signature_data?: Uint8Array; + timestamp?: 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 ("signature_data" in data && data.signature_data != undefined) { + this.signature_data = data.signature_data; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get signature_data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set signature_data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + signature_data?: Uint8Array; + timestamp?: number; + }): TimestampedSignatureData { + const message = new TimestampedSignatureData({}); + if (data.signature_data != null) { + message.signature_data = data.signature_data; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + return message; + } + toObject() { + const data: { + signature_data?: Uint8Array; + timestamp?: number; + } = {}; + if (this.signature_data != null) { + data.signature_data = this.signature_data; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + 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.signature_data.length) + writer.writeBytes(1, this.signature_data); + if (this.timestamp != 0) + writer.writeUint64(2, this.timestamp); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TimestampedSignatureData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TimestampedSignatureData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signature_data = reader.readBytes(); + break; + case 2: + message.timestamp = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TimestampedSignatureData { + return TimestampedSignatureData.deserialize(bytes); + } + } + export class SignBytes extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sequence?: number; + timestamp?: number; + diversifier?: string; + path?: Uint8Array; + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("sequence" in data && data.sequence != undefined) { + this.sequence = data.sequence; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("diversifier" in data && data.diversifier != undefined) { + this.diversifier = data.diversifier; + } + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get sequence() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sequence(value: number) { + pb_1.Message.setField(this, 1, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set timestamp(value: number) { + pb_1.Message.setField(this, 2, value); + } + get diversifier() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set diversifier(value: string) { + pb_1.Message.setField(this, 3, value); + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set path(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + sequence?: number; + timestamp?: number; + diversifier?: string; + path?: Uint8Array; + data?: Uint8Array; + }): SignBytes { + const message = new SignBytes({}); + if (data.sequence != null) { + message.sequence = data.sequence; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + if (data.diversifier != null) { + message.diversifier = data.diversifier; + } + if (data.path != null) { + message.path = data.path; + } + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + sequence?: number; + timestamp?: number; + diversifier?: string; + path?: Uint8Array; + data?: Uint8Array; + } = {}; + if (this.sequence != null) { + data.sequence = this.sequence; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + if (this.diversifier != null) { + data.diversifier = this.diversifier; + } + if (this.path != null) { + data.path = this.path; + } + if (this.data != null) { + data.data = this.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 (this.sequence != 0) + writer.writeUint64(1, this.sequence); + if (this.timestamp != 0) + writer.writeUint64(2, this.timestamp); + if (this.diversifier.length) + writer.writeString(3, this.diversifier); + if (this.path.length) + writer.writeBytes(4, this.path); + if (this.data.length) + writer.writeBytes(5, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignBytes { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignBytes(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sequence = reader.readUint64(); + break; + case 2: + message.timestamp = reader.readUint64(); + break; + case 3: + message.diversifier = reader.readString(); + break; + case 4: + message.path = reader.readBytes(); + break; + case 5: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignBytes { + return SignBytes.deserialize(bytes); + } + } + export class HeaderData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + new_pub_key?: dependency_2.google.protobuf.Any; + new_diversifier?: 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 ("new_pub_key" in data && data.new_pub_key != undefined) { + this.new_pub_key = data.new_pub_key; + } + if ("new_diversifier" in data && data.new_diversifier != undefined) { + this.new_diversifier = data.new_diversifier; + } + } + } + get new_pub_key() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Any, 1) as dependency_2.google.protobuf.Any; + } + set new_pub_key(value: dependency_2.google.protobuf.Any) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_new_pub_key() { + return pb_1.Message.getField(this, 1) != null; + } + get new_diversifier() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set new_diversifier(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + new_pub_key?: ReturnType; + new_diversifier?: string; + }): HeaderData { + const message = new HeaderData({}); + if (data.new_pub_key != null) { + message.new_pub_key = dependency_2.google.protobuf.Any.fromObject(data.new_pub_key); + } + if (data.new_diversifier != null) { + message.new_diversifier = data.new_diversifier; + } + return message; + } + toObject() { + const data: { + new_pub_key?: ReturnType; + new_diversifier?: string; + } = {}; + if (this.new_pub_key != null) { + data.new_pub_key = this.new_pub_key.toObject(); + } + if (this.new_diversifier != null) { + data.new_diversifier = this.new_diversifier; + } + 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_new_pub_key) + writer.writeMessage(1, this.new_pub_key, () => this.new_pub_key.serialize(writer)); + if (this.new_diversifier.length) + writer.writeString(2, this.new_diversifier); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HeaderData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HeaderData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.new_pub_key, () => message.new_pub_key = dependency_2.google.protobuf.Any.deserialize(reader)); + break; + case 2: + message.new_diversifier = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): HeaderData { + return HeaderData.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/lightclients/solomachine/v3/solomachine_pb.d.ts b/codegen/ibc/lightclients/solomachine/v3/solomachine_pb.d.ts new file mode 100644 index 0000000..b6de2a5 --- /dev/null +++ b/codegen/ibc/lightclients/solomachine/v3/solomachine_pb.d.ts @@ -0,0 +1,265 @@ +// package: ibc.lightclients.solomachine.v3 +// file: ibc/lightclients/solomachine/v3/solomachine.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; + +export class ClientState extends jspb.Message { + getSequence(): number; + setSequence(value: number): void; + + getIsFrozen(): boolean; + setIsFrozen(value: boolean): void; + + hasConsensusState(): boolean; + clearConsensusState(): void; + getConsensusState(): ConsensusState | undefined; + setConsensusState(value?: ConsensusState): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ClientState.AsObject; + static toObject(includeInstance: boolean, msg: ClientState): ClientState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ClientState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ClientState; + static deserializeBinaryFromReader(message: ClientState, reader: jspb.BinaryReader): ClientState; +} + +export namespace ClientState { + export type AsObject = { + sequence: number, + isFrozen: boolean, + consensusState?: ConsensusState.AsObject, + } +} + +export class ConsensusState extends jspb.Message { + hasPublicKey(): boolean; + clearPublicKey(): void; + getPublicKey(): google_protobuf_any_pb.Any | undefined; + setPublicKey(value?: google_protobuf_any_pb.Any): void; + + getDiversifier(): string; + setDiversifier(value: string): void; + + getTimestamp(): number; + setTimestamp(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConsensusState.AsObject; + static toObject(includeInstance: boolean, msg: ConsensusState): ConsensusState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConsensusState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConsensusState; + static deserializeBinaryFromReader(message: ConsensusState, reader: jspb.BinaryReader): ConsensusState; +} + +export namespace ConsensusState { + export type AsObject = { + publicKey?: google_protobuf_any_pb.Any.AsObject, + diversifier: string, + timestamp: number, + } +} + +export class Header extends jspb.Message { + getTimestamp(): number; + setTimestamp(value: number): void; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): void; + + hasNewPublicKey(): boolean; + clearNewPublicKey(): void; + getNewPublicKey(): google_protobuf_any_pb.Any | undefined; + setNewPublicKey(value?: google_protobuf_any_pb.Any): void; + + getNewDiversifier(): string; + setNewDiversifier(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Header.AsObject; + static toObject(includeInstance: boolean, msg: Header): Header.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Header; + static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; +} + +export namespace Header { + export type AsObject = { + timestamp: number, + signature: Uint8Array | string, + newPublicKey?: google_protobuf_any_pb.Any.AsObject, + newDiversifier: string, + } +} + +export class Misbehaviour extends jspb.Message { + getSequence(): number; + setSequence(value: number): void; + + hasSignatureOne(): boolean; + clearSignatureOne(): void; + getSignatureOne(): SignatureAndData | undefined; + setSignatureOne(value?: SignatureAndData): void; + + hasSignatureTwo(): boolean; + clearSignatureTwo(): void; + getSignatureTwo(): SignatureAndData | undefined; + setSignatureTwo(value?: SignatureAndData): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Misbehaviour.AsObject; + static toObject(includeInstance: boolean, msg: Misbehaviour): Misbehaviour.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Misbehaviour, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Misbehaviour; + static deserializeBinaryFromReader(message: Misbehaviour, reader: jspb.BinaryReader): Misbehaviour; +} + +export namespace Misbehaviour { + export type AsObject = { + sequence: number, + signatureOne?: SignatureAndData.AsObject, + signatureTwo?: SignatureAndData.AsObject, + } +} + +export class SignatureAndData extends jspb.Message { + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): void; + + getPath(): Uint8Array | string; + getPath_asU8(): Uint8Array; + getPath_asB64(): string; + setPath(value: Uint8Array | string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getTimestamp(): number; + setTimestamp(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignatureAndData.AsObject; + static toObject(includeInstance: boolean, msg: SignatureAndData): SignatureAndData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignatureAndData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignatureAndData; + static deserializeBinaryFromReader(message: SignatureAndData, reader: jspb.BinaryReader): SignatureAndData; +} + +export namespace SignatureAndData { + export type AsObject = { + signature: Uint8Array | string, + path: Uint8Array | string, + data: Uint8Array | string, + timestamp: number, + } +} + +export class TimestampedSignatureData extends jspb.Message { + getSignatureData(): Uint8Array | string; + getSignatureData_asU8(): Uint8Array; + getSignatureData_asB64(): string; + setSignatureData(value: Uint8Array | string): void; + + getTimestamp(): number; + setTimestamp(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TimestampedSignatureData.AsObject; + static toObject(includeInstance: boolean, msg: TimestampedSignatureData): TimestampedSignatureData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TimestampedSignatureData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TimestampedSignatureData; + static deserializeBinaryFromReader(message: TimestampedSignatureData, reader: jspb.BinaryReader): TimestampedSignatureData; +} + +export namespace TimestampedSignatureData { + export type AsObject = { + signatureData: Uint8Array | string, + timestamp: number, + } +} + +export class SignBytes extends jspb.Message { + getSequence(): number; + setSequence(value: number): void; + + getTimestamp(): number; + setTimestamp(value: number): void; + + getDiversifier(): string; + setDiversifier(value: string): void; + + getPath(): Uint8Array | string; + getPath_asU8(): Uint8Array; + getPath_asB64(): string; + setPath(value: Uint8Array | string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignBytes.AsObject; + static toObject(includeInstance: boolean, msg: SignBytes): SignBytes.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignBytes, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignBytes; + static deserializeBinaryFromReader(message: SignBytes, reader: jspb.BinaryReader): SignBytes; +} + +export namespace SignBytes { + export type AsObject = { + sequence: number, + timestamp: number, + diversifier: string, + path: Uint8Array | string, + data: Uint8Array | string, + } +} + +export class HeaderData extends jspb.Message { + hasNewPubKey(): boolean; + clearNewPubKey(): void; + getNewPubKey(): google_protobuf_any_pb.Any | undefined; + setNewPubKey(value?: google_protobuf_any_pb.Any): void; + + getNewDiversifier(): string; + setNewDiversifier(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HeaderData.AsObject; + static toObject(includeInstance: boolean, msg: HeaderData): HeaderData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HeaderData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HeaderData; + static deserializeBinaryFromReader(message: HeaderData, reader: jspb.BinaryReader): HeaderData; +} + +export namespace HeaderData { + export type AsObject = { + newPubKey?: google_protobuf_any_pb.Any.AsObject, + newDiversifier: string, + } +} + diff --git a/codegen/ibc/lightclients/solomachine/v3/solomachine_pb.js b/codegen/ibc/lightclients/solomachine/v3/solomachine_pb.js new file mode 100644 index 0000000..01337dd --- /dev/null +++ b/codegen/ibc/lightclients/solomachine/v3/solomachine_pb.js @@ -0,0 +1,2072 @@ +// source: ibc/lightclients/solomachine/v3/solomachine.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.ClientState', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.ConsensusState', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.Header', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.HeaderData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.Misbehaviour', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.SignBytes', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.SignatureAndData', null, global); +goog.exportSymbol('proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v3.ClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v3.ClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v3.ClientState.displayName = 'proto.ibc.lightclients.solomachine.v3.ClientState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v3.ConsensusState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v3.ConsensusState.displayName = 'proto.ibc.lightclients.solomachine.v3.ConsensusState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v3.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v3.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v3.Header.displayName = 'proto.ibc.lightclients.solomachine.v3.Header'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v3.Misbehaviour, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v3.Misbehaviour.displayName = 'proto.ibc.lightclients.solomachine.v3.Misbehaviour'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v3.SignatureAndData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v3.SignatureAndData.displayName = 'proto.ibc.lightclients.solomachine.v3.SignatureAndData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.displayName = 'proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v3.SignBytes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v3.SignBytes, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v3.SignBytes.displayName = 'proto.ibc.lightclients.solomachine.v3.SignBytes'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.solomachine.v3.HeaderData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.solomachine.v3.HeaderData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.solomachine.v3.HeaderData.displayName = 'proto.ibc.lightclients.solomachine.v3.HeaderData'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v3.ClientState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v3.ClientState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.ClientState.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + isFrozen: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + consensusState: (f = msg.getConsensusState()) && proto.ibc.lightclients.solomachine.v3.ConsensusState.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v3.ClientState} + */ +proto.ibc.lightclients.solomachine.v3.ClientState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v3.ClientState; + return proto.ibc.lightclients.solomachine.v3.ClientState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v3.ClientState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v3.ClientState} + */ +proto.ibc.lightclients.solomachine.v3.ClientState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsFrozen(value); + break; + case 3: + var value = new proto.ibc.lightclients.solomachine.v3.ConsensusState; + reader.readMessage(value,proto.ibc.lightclients.solomachine.v3.ConsensusState.deserializeBinaryFromReader); + msg.setConsensusState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v3.ClientState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v3.ClientState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.ClientState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getIsFrozen(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.lightclients.solomachine.v3.ConsensusState.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v3.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool is_frozen = 2; + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.getIsFrozen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.lightclients.solomachine.v3.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.setIsFrozen = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional ConsensusState consensus_state = 3; + * @return {?proto.ibc.lightclients.solomachine.v3.ConsensusState} + */ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.getConsensusState = function() { + return /** @type{?proto.ibc.lightclients.solomachine.v3.ConsensusState} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v3.ConsensusState, 3)); +}; + + +/** + * @param {?proto.ibc.lightclients.solomachine.v3.ConsensusState|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v3.ClientState} returns this +*/ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v3.ClientState} returns this + */ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v3.ClientState.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v3.ConsensusState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v3.ConsensusState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + diversifier: jspb.Message.getFieldWithDefault(msg, 2, ""), + timestamp: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v3.ConsensusState; + return proto.ibc.lightclients.solomachine.v3.ConsensusState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v3.ConsensusState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setPublicKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDiversifier(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v3.ConsensusState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v3.ConsensusState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublicKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getDiversifier(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Any public_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.getPublicKey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} returns this +*/ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.setPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} returns this + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.clearPublicKey = function() { + return this.setPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.hasPublicKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string diversifier = 2; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.getDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} returns this + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.setDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 timestamp = 3; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v3.ConsensusState} returns this + */ +proto.ibc.lightclients.solomachine.v3.ConsensusState.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v3.Header.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v3.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.Header.toObject = function(includeInstance, msg) { + var f, obj = { + timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + signature: msg.getSignature_asB64(), + newPublicKey: (f = msg.getNewPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + newDiversifier: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v3.Header} + */ +proto.ibc.lightclients.solomachine.v3.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v3.Header; + return proto.ibc.lightclients.solomachine.v3.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v3.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v3.Header} + */ +proto.ibc.lightclients.solomachine.v3.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setNewPublicKey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setNewDiversifier(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v3.Header.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v3.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getNewPublicKey(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getNewDiversifier(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint64 timestamp = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes signature = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes signature = 2; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional google.protobuf.Any new_public_key = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.getNewPublicKey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this +*/ +proto.ibc.lightclients.solomachine.v3.Header.prototype.setNewPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.clearNewPublicKey = function() { + return this.setNewPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.hasNewPublicKey = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string new_diversifier = 4; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.getNewDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v3.Header} returns this + */ +proto.ibc.lightclients.solomachine.v3.Header.prototype.setNewDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v3.Misbehaviour.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + signatureOne: (f = msg.getSignatureOne()) && proto.ibc.lightclients.solomachine.v3.SignatureAndData.toObject(includeInstance, f), + signatureTwo: (f = msg.getSignatureTwo()) && proto.ibc.lightclients.solomachine.v3.SignatureAndData.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v3.Misbehaviour; + return proto.ibc.lightclients.solomachine.v3.Misbehaviour.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = new proto.ibc.lightclients.solomachine.v3.SignatureAndData; + reader.readMessage(value,proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinaryFromReader); + msg.setSignatureOne(value); + break; + case 3: + var value = new proto.ibc.lightclients.solomachine.v3.SignatureAndData; + reader.readMessage(value,proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinaryFromReader); + msg.setSignatureTwo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v3.Misbehaviour.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSignatureOne(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.ibc.lightclients.solomachine.v3.SignatureAndData.serializeBinaryToWriter + ); + } + f = message.getSignatureTwo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.lightclients.solomachine.v3.SignatureAndData.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional SignatureAndData signature_one = 2; + * @return {?proto.ibc.lightclients.solomachine.v3.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.getSignatureOne = function() { + return /** @type{?proto.ibc.lightclients.solomachine.v3.SignatureAndData} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v3.SignatureAndData, 2)); +}; + + +/** + * @param {?proto.ibc.lightclients.solomachine.v3.SignatureAndData|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this +*/ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.setSignatureOne = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.clearSignatureOne = function() { + return this.setSignatureOne(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.hasSignatureOne = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional SignatureAndData signature_two = 3; + * @return {?proto.ibc.lightclients.solomachine.v3.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.getSignatureTwo = function() { + return /** @type{?proto.ibc.lightclients.solomachine.v3.SignatureAndData} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v3.SignatureAndData, 3)); +}; + + +/** + * @param {?proto.ibc.lightclients.solomachine.v3.SignatureAndData|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this +*/ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.setSignatureTwo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v3.Misbehaviour} returns this + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.clearSignatureTwo = function() { + return this.setSignatureTwo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v3.Misbehaviour.prototype.hasSignatureTwo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v3.SignatureAndData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.toObject = function(includeInstance, msg) { + var f, obj = { + signature: msg.getSignature_asB64(), + path: msg.getPath_asB64(), + data: msg.getData_asB64(), + timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v3.SignatureAndData; + return proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPath(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v3.SignatureAndData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional bytes signature = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes signature = 1; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes path = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes path = 2; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 timestamp = 4; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v3.SignatureAndData} returns this + */ +proto.ibc.lightclients.solomachine.v3.SignatureAndData.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.toObject = function(includeInstance, msg) { + var f, obj = { + signatureData: msg.getSignatureData_asB64(), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData; + return proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignatureData(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignatureData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes signature_data = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.getSignatureData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes signature_data = 1; + * This is a type-conversion wrapper around `getSignatureData()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.getSignatureData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignatureData())); +}; + + +/** + * optional bytes signature_data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignatureData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.getSignatureData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignatureData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} returns this + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.setSignatureData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 timestamp = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData} returns this + */ +proto.ibc.lightclients.solomachine.v3.TimestampedSignatureData.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v3.SignBytes.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v3.SignBytes} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), + diversifier: jspb.Message.getFieldWithDefault(msg, 3, ""), + path: msg.getPath_asB64(), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v3.SignBytes; + return proto.ibc.lightclients.solomachine.v3.SignBytes.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v3.SignBytes} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDiversifier(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPath(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v3.SignBytes.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v3.SignBytes} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getDiversifier(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPath_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 timestamp = 2; + * @return {number} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string diversifier = 3; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bytes path = 4; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getPath = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes path = 4; + * This is a type-conversion wrapper around `getPath()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getPath_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPath())); +}; + + +/** + * optional bytes path = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPath()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getPath_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPath())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setPath = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes data = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes data = 5; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.solomachine.v3.SignBytes} returns this + */ +proto.ibc.lightclients.solomachine.v3.SignBytes.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.solomachine.v3.HeaderData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.solomachine.v3.HeaderData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.toObject = function(includeInstance, msg) { + var f, obj = { + newPubKey: (f = msg.getNewPubKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + newDiversifier: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.solomachine.v3.HeaderData} + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.solomachine.v3.HeaderData; + return proto.ibc.lightclients.solomachine.v3.HeaderData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.solomachine.v3.HeaderData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.solomachine.v3.HeaderData} + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setNewPubKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNewDiversifier(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.solomachine.v3.HeaderData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.solomachine.v3.HeaderData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNewPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getNewDiversifier(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional google.protobuf.Any new_pub_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.getNewPubKey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.ibc.lightclients.solomachine.v3.HeaderData} returns this +*/ +proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.setNewPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.solomachine.v3.HeaderData} returns this + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.clearNewPubKey = function() { + return this.setNewPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.hasNewPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string new_diversifier = 2; + * @return {string} + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.getNewDiversifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.solomachine.v3.HeaderData} returns this + */ +proto.ibc.lightclients.solomachine.v3.HeaderData.prototype.setNewDiversifier = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.ibc.lightclients.solomachine.v3); diff --git a/codegen/ibc/lightclients/solomachine/v3/solomachine_pb_service.d.ts b/codegen/ibc/lightclients/solomachine/v3/solomachine_pb_service.d.ts new file mode 100644 index 0000000..655558d --- /dev/null +++ b/codegen/ibc/lightclients/solomachine/v3/solomachine_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.lightclients.solomachine.v3 +// file: ibc/lightclients/solomachine/v3/solomachine.proto + diff --git a/codegen/ibc/lightclients/solomachine/v3/solomachine_pb_service.js b/codegen/ibc/lightclients/solomachine/v3/solomachine_pb_service.js new file mode 100644 index 0000000..655558d --- /dev/null +++ b/codegen/ibc/lightclients/solomachine/v3/solomachine_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.lightclients.solomachine.v3 +// file: ibc/lightclients/solomachine/v3/solomachine.proto + diff --git a/codegen/ibc/lightclients/tendermint/v1/tendermint.ts b/codegen/ibc/lightclients/tendermint/v1/tendermint.ts new file mode 100644 index 0000000..9506e02 --- /dev/null +++ b/codegen/ibc/lightclients/tendermint/v1/tendermint.ts @@ -0,0 +1,816 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/lightclients/tendermint/v1/tendermint.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../tendermint/types/validator"; +import * as dependency_2 from "./../../../../tendermint/types/types"; +import * as dependency_3 from "./../../../../cosmos/ics23/v1/proofs"; +import * as dependency_4 from "./../../../../google/protobuf/duration"; +import * as dependency_5 from "./../../../../google/protobuf/timestamp"; +import * as dependency_6 from "./../../../core/client/v1/client"; +import * as dependency_7 from "./../../../core/commitment/v1/commitment"; +import * as dependency_8 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.lightclients.tendermint.v1 { + export class ClientState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + chain_id?: string; + trust_level?: Fraction; + trusting_period?: dependency_4.google.protobuf.Duration; + unbonding_period?: dependency_4.google.protobuf.Duration; + max_clock_drift?: dependency_4.google.protobuf.Duration; + frozen_height?: dependency_6.ibc.core.client.v1.Height; + latest_height?: dependency_6.ibc.core.client.v1.Height; + proof_specs?: dependency_3.cosmos.ics23.v1.ProofSpec[]; + upgrade_path?: string[]; + /** @deprecated*/ + allow_update_after_expiry?: boolean; + /** @deprecated*/ + allow_update_after_misbehaviour?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [8, 9], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("chain_id" in data && data.chain_id != undefined) { + this.chain_id = data.chain_id; + } + if ("trust_level" in data && data.trust_level != undefined) { + this.trust_level = data.trust_level; + } + if ("trusting_period" in data && data.trusting_period != undefined) { + this.trusting_period = data.trusting_period; + } + if ("unbonding_period" in data && data.unbonding_period != undefined) { + this.unbonding_period = data.unbonding_period; + } + if ("max_clock_drift" in data && data.max_clock_drift != undefined) { + this.max_clock_drift = data.max_clock_drift; + } + if ("frozen_height" in data && data.frozen_height != undefined) { + this.frozen_height = data.frozen_height; + } + if ("latest_height" in data && data.latest_height != undefined) { + this.latest_height = data.latest_height; + } + if ("proof_specs" in data && data.proof_specs != undefined) { + this.proof_specs = data.proof_specs; + } + if ("upgrade_path" in data && data.upgrade_path != undefined) { + this.upgrade_path = data.upgrade_path; + } + if ("allow_update_after_expiry" in data && data.allow_update_after_expiry != undefined) { + this.allow_update_after_expiry = data.allow_update_after_expiry; + } + if ("allow_update_after_misbehaviour" in data && data.allow_update_after_misbehaviour != undefined) { + this.allow_update_after_misbehaviour = data.allow_update_after_misbehaviour; + } + } + } + get chain_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set chain_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get trust_level() { + return pb_1.Message.getWrapperField(this, Fraction, 2) as Fraction; + } + set trust_level(value: Fraction) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_trust_level() { + return pb_1.Message.getField(this, 2) != null; + } + get trusting_period() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Duration, 3) as dependency_4.google.protobuf.Duration; + } + set trusting_period(value: dependency_4.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_trusting_period() { + return pb_1.Message.getField(this, 3) != null; + } + get unbonding_period() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Duration, 4) as dependency_4.google.protobuf.Duration; + } + set unbonding_period(value: dependency_4.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_unbonding_period() { + return pb_1.Message.getField(this, 4) != null; + } + get max_clock_drift() { + return pb_1.Message.getWrapperField(this, dependency_4.google.protobuf.Duration, 5) as dependency_4.google.protobuf.Duration; + } + set max_clock_drift(value: dependency_4.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_max_clock_drift() { + return pb_1.Message.getField(this, 5) != null; + } + get frozen_height() { + return pb_1.Message.getWrapperField(this, dependency_6.ibc.core.client.v1.Height, 6) as dependency_6.ibc.core.client.v1.Height; + } + set frozen_height(value: dependency_6.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_frozen_height() { + return pb_1.Message.getField(this, 6) != null; + } + get latest_height() { + return pb_1.Message.getWrapperField(this, dependency_6.ibc.core.client.v1.Height, 7) as dependency_6.ibc.core.client.v1.Height; + } + set latest_height(value: dependency_6.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_latest_height() { + return pb_1.Message.getField(this, 7) != null; + } + get proof_specs() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.cosmos.ics23.v1.ProofSpec, 8) as dependency_3.cosmos.ics23.v1.ProofSpec[]; + } + set proof_specs(value: dependency_3.cosmos.ics23.v1.ProofSpec[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + get upgrade_path() { + return pb_1.Message.getFieldWithDefault(this, 9, []) as string[]; + } + set upgrade_path(value: string[]) { + pb_1.Message.setField(this, 9, value); + } + /** @deprecated*/ + get allow_update_after_expiry() { + return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean; + } + /** @deprecated*/ + set allow_update_after_expiry(value: boolean) { + pb_1.Message.setField(this, 10, value); + } + /** @deprecated*/ + get allow_update_after_misbehaviour() { + return pb_1.Message.getFieldWithDefault(this, 11, false) as boolean; + } + /** @deprecated*/ + set allow_update_after_misbehaviour(value: boolean) { + pb_1.Message.setField(this, 11, value); + } + static fromObject(data: { + chain_id?: string; + trust_level?: ReturnType; + trusting_period?: ReturnType; + unbonding_period?: ReturnType; + max_clock_drift?: ReturnType; + frozen_height?: ReturnType; + latest_height?: ReturnType; + proof_specs?: ReturnType[]; + upgrade_path?: string[]; + allow_update_after_expiry?: boolean; + allow_update_after_misbehaviour?: boolean; + }): ClientState { + const message = new ClientState({}); + if (data.chain_id != null) { + message.chain_id = data.chain_id; + } + if (data.trust_level != null) { + message.trust_level = Fraction.fromObject(data.trust_level); + } + if (data.trusting_period != null) { + message.trusting_period = dependency_4.google.protobuf.Duration.fromObject(data.trusting_period); + } + if (data.unbonding_period != null) { + message.unbonding_period = dependency_4.google.protobuf.Duration.fromObject(data.unbonding_period); + } + if (data.max_clock_drift != null) { + message.max_clock_drift = dependency_4.google.protobuf.Duration.fromObject(data.max_clock_drift); + } + if (data.frozen_height != null) { + message.frozen_height = dependency_6.ibc.core.client.v1.Height.fromObject(data.frozen_height); + } + if (data.latest_height != null) { + message.latest_height = dependency_6.ibc.core.client.v1.Height.fromObject(data.latest_height); + } + if (data.proof_specs != null) { + message.proof_specs = data.proof_specs.map(item => dependency_3.cosmos.ics23.v1.ProofSpec.fromObject(item)); + } + if (data.upgrade_path != null) { + message.upgrade_path = data.upgrade_path; + } + if (data.allow_update_after_expiry != null) { + message.allow_update_after_expiry = data.allow_update_after_expiry; + } + if (data.allow_update_after_misbehaviour != null) { + message.allow_update_after_misbehaviour = data.allow_update_after_misbehaviour; + } + return message; + } + toObject() { + const data: { + chain_id?: string; + trust_level?: ReturnType; + trusting_period?: ReturnType; + unbonding_period?: ReturnType; + max_clock_drift?: ReturnType; + frozen_height?: ReturnType; + latest_height?: ReturnType; + proof_specs?: ReturnType[]; + upgrade_path?: string[]; + allow_update_after_expiry?: boolean; + allow_update_after_misbehaviour?: boolean; + } = {}; + if (this.chain_id != null) { + data.chain_id = this.chain_id; + } + if (this.trust_level != null) { + data.trust_level = this.trust_level.toObject(); + } + if (this.trusting_period != null) { + data.trusting_period = this.trusting_period.toObject(); + } + if (this.unbonding_period != null) { + data.unbonding_period = this.unbonding_period.toObject(); + } + if (this.max_clock_drift != null) { + data.max_clock_drift = this.max_clock_drift.toObject(); + } + if (this.frozen_height != null) { + data.frozen_height = this.frozen_height.toObject(); + } + if (this.latest_height != null) { + data.latest_height = this.latest_height.toObject(); + } + if (this.proof_specs != null) { + data.proof_specs = this.proof_specs.map((item: dependency_3.cosmos.ics23.v1.ProofSpec) => item.toObject()); + } + if (this.upgrade_path != null) { + data.upgrade_path = this.upgrade_path; + } + if (this.allow_update_after_expiry != null) { + data.allow_update_after_expiry = this.allow_update_after_expiry; + } + if (this.allow_update_after_misbehaviour != null) { + data.allow_update_after_misbehaviour = this.allow_update_after_misbehaviour; + } + 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.chain_id.length) + writer.writeString(1, this.chain_id); + if (this.has_trust_level) + writer.writeMessage(2, this.trust_level, () => this.trust_level.serialize(writer)); + if (this.has_trusting_period) + writer.writeMessage(3, this.trusting_period, () => this.trusting_period.serialize(writer)); + if (this.has_unbonding_period) + writer.writeMessage(4, this.unbonding_period, () => this.unbonding_period.serialize(writer)); + if (this.has_max_clock_drift) + writer.writeMessage(5, this.max_clock_drift, () => this.max_clock_drift.serialize(writer)); + if (this.has_frozen_height) + writer.writeMessage(6, this.frozen_height, () => this.frozen_height.serialize(writer)); + if (this.has_latest_height) + writer.writeMessage(7, this.latest_height, () => this.latest_height.serialize(writer)); + if (this.proof_specs.length) + writer.writeRepeatedMessage(8, this.proof_specs, (item: dependency_3.cosmos.ics23.v1.ProofSpec) => item.serialize(writer)); + if (this.upgrade_path.length) + writer.writeRepeatedString(9, this.upgrade_path); + if (this.allow_update_after_expiry != false) + writer.writeBool(10, this.allow_update_after_expiry); + if (this.allow_update_after_misbehaviour != false) + writer.writeBool(11, this.allow_update_after_misbehaviour); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.chain_id = reader.readString(); + break; + case 2: + reader.readMessage(message.trust_level, () => message.trust_level = Fraction.deserialize(reader)); + break; + case 3: + reader.readMessage(message.trusting_period, () => message.trusting_period = dependency_4.google.protobuf.Duration.deserialize(reader)); + break; + case 4: + reader.readMessage(message.unbonding_period, () => message.unbonding_period = dependency_4.google.protobuf.Duration.deserialize(reader)); + break; + case 5: + reader.readMessage(message.max_clock_drift, () => message.max_clock_drift = dependency_4.google.protobuf.Duration.deserialize(reader)); + break; + case 6: + reader.readMessage(message.frozen_height, () => message.frozen_height = dependency_6.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 7: + reader.readMessage(message.latest_height, () => message.latest_height = dependency_6.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 8: + reader.readMessage(message.proof_specs, () => pb_1.Message.addToRepeatedWrapperField(message, 8, dependency_3.cosmos.ics23.v1.ProofSpec.deserialize(reader), dependency_3.cosmos.ics23.v1.ProofSpec)); + break; + case 9: + pb_1.Message.addToRepeatedField(message, 9, reader.readString()); + break; + case 10: + message.allow_update_after_expiry = reader.readBool(); + break; + case 11: + message.allow_update_after_misbehaviour = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientState { + return ClientState.deserialize(bytes); + } + } + export class ConsensusState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + timestamp?: dependency_5.google.protobuf.Timestamp; + root?: dependency_7.ibc.core.commitment.v1.MerkleRoot; + next_validators_hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("root" in data && data.root != undefined) { + this.root = data.root; + } + if ("next_validators_hash" in data && data.next_validators_hash != undefined) { + this.next_validators_hash = data.next_validators_hash; + } + } + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Timestamp, 1) as dependency_5.google.protobuf.Timestamp; + } + set timestamp(value: dependency_5.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 1) != null; + } + get root() { + return pb_1.Message.getWrapperField(this, dependency_7.ibc.core.commitment.v1.MerkleRoot, 2) as dependency_7.ibc.core.commitment.v1.MerkleRoot; + } + set root(value: dependency_7.ibc.core.commitment.v1.MerkleRoot) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_root() { + return pb_1.Message.getField(this, 2) != null; + } + get next_validators_hash() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set next_validators_hash(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + timestamp?: ReturnType; + root?: ReturnType; + next_validators_hash?: Uint8Array; + }): ConsensusState { + const message = new ConsensusState({}); + if (data.timestamp != null) { + message.timestamp = dependency_5.google.protobuf.Timestamp.fromObject(data.timestamp); + } + if (data.root != null) { + message.root = dependency_7.ibc.core.commitment.v1.MerkleRoot.fromObject(data.root); + } + if (data.next_validators_hash != null) { + message.next_validators_hash = data.next_validators_hash; + } + return message; + } + toObject() { + const data: { + timestamp?: ReturnType; + root?: ReturnType; + next_validators_hash?: Uint8Array; + } = {}; + if (this.timestamp != null) { + data.timestamp = this.timestamp.toObject(); + } + if (this.root != null) { + data.root = this.root.toObject(); + } + if (this.next_validators_hash != null) { + data.next_validators_hash = this.next_validators_hash; + } + 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_timestamp) + writer.writeMessage(1, this.timestamp, () => this.timestamp.serialize(writer)); + if (this.has_root) + writer.writeMessage(2, this.root, () => this.root.serialize(writer)); + if (this.next_validators_hash.length) + writer.writeBytes(3, this.next_validators_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConsensusState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConsensusState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_5.google.protobuf.Timestamp.deserialize(reader)); + break; + case 2: + reader.readMessage(message.root, () => message.root = dependency_7.ibc.core.commitment.v1.MerkleRoot.deserialize(reader)); + break; + case 3: + message.next_validators_hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConsensusState { + return ConsensusState.deserialize(bytes); + } + } + export class Misbehaviour extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + /** @deprecated*/ + client_id?: string; + header_1?: Header; + header_2?: Header; + }) { + 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; + } + if ("header_1" in data && data.header_1 != undefined) { + this.header_1 = data.header_1; + } + if ("header_2" in data && data.header_2 != undefined) { + this.header_2 = data.header_2; + } + } + } + /** @deprecated*/ + get client_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + /** @deprecated*/ + set client_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get header_1() { + return pb_1.Message.getWrapperField(this, Header, 2) as Header; + } + set header_1(value: Header) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_header_1() { + return pb_1.Message.getField(this, 2) != null; + } + get header_2() { + return pb_1.Message.getWrapperField(this, Header, 3) as Header; + } + set header_2(value: Header) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_header_2() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + client_id?: string; + header_1?: ReturnType; + header_2?: ReturnType; + }): Misbehaviour { + const message = new Misbehaviour({}); + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.header_1 != null) { + message.header_1 = Header.fromObject(data.header_1); + } + if (data.header_2 != null) { + message.header_2 = Header.fromObject(data.header_2); + } + return message; + } + toObject() { + const data: { + client_id?: string; + header_1?: ReturnType; + header_2?: ReturnType; + } = {}; + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.header_1 != null) { + data.header_1 = this.header_1.toObject(); + } + if (this.header_2 != null) { + data.header_2 = this.header_2.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.client_id.length) + writer.writeString(1, this.client_id); + if (this.has_header_1) + writer.writeMessage(2, this.header_1, () => this.header_1.serialize(writer)); + if (this.has_header_2) + writer.writeMessage(3, this.header_2, () => this.header_2.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Misbehaviour { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Misbehaviour(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.client_id = reader.readString(); + break; + case 2: + reader.readMessage(message.header_1, () => message.header_1 = Header.deserialize(reader)); + break; + case 3: + reader.readMessage(message.header_2, () => message.header_2 = Header.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Misbehaviour { + return Misbehaviour.deserialize(bytes); + } + } + export class Header extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signed_header?: dependency_2.tendermint.types.SignedHeader; + validator_set?: dependency_1.tendermint.types.ValidatorSet; + trusted_height?: dependency_6.ibc.core.client.v1.Height; + trusted_validators?: dependency_1.tendermint.types.ValidatorSet; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signed_header" in data && data.signed_header != undefined) { + this.signed_header = data.signed_header; + } + if ("validator_set" in data && data.validator_set != undefined) { + this.validator_set = data.validator_set; + } + if ("trusted_height" in data && data.trusted_height != undefined) { + this.trusted_height = data.trusted_height; + } + if ("trusted_validators" in data && data.trusted_validators != undefined) { + this.trusted_validators = data.trusted_validators; + } + } + } + get signed_header() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.types.SignedHeader, 1) as dependency_2.tendermint.types.SignedHeader; + } + set signed_header(value: dependency_2.tendermint.types.SignedHeader) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_signed_header() { + return pb_1.Message.getField(this, 1) != null; + } + get validator_set() { + return pb_1.Message.getWrapperField(this, dependency_1.tendermint.types.ValidatorSet, 2) as dependency_1.tendermint.types.ValidatorSet; + } + set validator_set(value: dependency_1.tendermint.types.ValidatorSet) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_validator_set() { + return pb_1.Message.getField(this, 2) != null; + } + get trusted_height() { + return pb_1.Message.getWrapperField(this, dependency_6.ibc.core.client.v1.Height, 3) as dependency_6.ibc.core.client.v1.Height; + } + set trusted_height(value: dependency_6.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_trusted_height() { + return pb_1.Message.getField(this, 3) != null; + } + get trusted_validators() { + return pb_1.Message.getWrapperField(this, dependency_1.tendermint.types.ValidatorSet, 4) as dependency_1.tendermint.types.ValidatorSet; + } + set trusted_validators(value: dependency_1.tendermint.types.ValidatorSet) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_trusted_validators() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + signed_header?: ReturnType; + validator_set?: ReturnType; + trusted_height?: ReturnType; + trusted_validators?: ReturnType; + }): Header { + const message = new Header({}); + if (data.signed_header != null) { + message.signed_header = dependency_2.tendermint.types.SignedHeader.fromObject(data.signed_header); + } + if (data.validator_set != null) { + message.validator_set = dependency_1.tendermint.types.ValidatorSet.fromObject(data.validator_set); + } + if (data.trusted_height != null) { + message.trusted_height = dependency_6.ibc.core.client.v1.Height.fromObject(data.trusted_height); + } + if (data.trusted_validators != null) { + message.trusted_validators = dependency_1.tendermint.types.ValidatorSet.fromObject(data.trusted_validators); + } + return message; + } + toObject() { + const data: { + signed_header?: ReturnType; + validator_set?: ReturnType; + trusted_height?: ReturnType; + trusted_validators?: ReturnType; + } = {}; + if (this.signed_header != null) { + data.signed_header = this.signed_header.toObject(); + } + if (this.validator_set != null) { + data.validator_set = this.validator_set.toObject(); + } + if (this.trusted_height != null) { + data.trusted_height = this.trusted_height.toObject(); + } + if (this.trusted_validators != null) { + data.trusted_validators = this.trusted_validators.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_signed_header) + writer.writeMessage(1, this.signed_header, () => this.signed_header.serialize(writer)); + if (this.has_validator_set) + writer.writeMessage(2, this.validator_set, () => this.validator_set.serialize(writer)); + if (this.has_trusted_height) + writer.writeMessage(3, this.trusted_height, () => this.trusted_height.serialize(writer)); + if (this.has_trusted_validators) + writer.writeMessage(4, this.trusted_validators, () => this.trusted_validators.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Header { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Header(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signed_header, () => message.signed_header = dependency_2.tendermint.types.SignedHeader.deserialize(reader)); + break; + case 2: + reader.readMessage(message.validator_set, () => message.validator_set = dependency_1.tendermint.types.ValidatorSet.deserialize(reader)); + break; + case 3: + reader.readMessage(message.trusted_height, () => message.trusted_height = dependency_6.ibc.core.client.v1.Height.deserialize(reader)); + break; + case 4: + reader.readMessage(message.trusted_validators, () => message.trusted_validators = dependency_1.tendermint.types.ValidatorSet.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Header { + return Header.deserialize(bytes); + } + } + export class Fraction extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + numerator?: number; + denominator?: 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 ("numerator" in data && data.numerator != undefined) { + this.numerator = data.numerator; + } + if ("denominator" in data && data.denominator != undefined) { + this.denominator = data.denominator; + } + } + } + get numerator() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set numerator(value: number) { + pb_1.Message.setField(this, 1, value); + } + get denominator() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set denominator(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + numerator?: number; + denominator?: number; + }): Fraction { + const message = new Fraction({}); + if (data.numerator != null) { + message.numerator = data.numerator; + } + if (data.denominator != null) { + message.denominator = data.denominator; + } + return message; + } + toObject() { + const data: { + numerator?: number; + denominator?: number; + } = {}; + if (this.numerator != null) { + data.numerator = this.numerator; + } + if (this.denominator != null) { + data.denominator = this.denominator; + } + 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.numerator != 0) + writer.writeUint64(1, this.numerator); + if (this.denominator != 0) + writer.writeUint64(2, this.denominator); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Fraction { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Fraction(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.numerator = reader.readUint64(); + break; + case 2: + message.denominator = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Fraction { + return Fraction.deserialize(bytes); + } + } +} diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint_pb.d.ts b/codegen/ibc/lightclients/tendermint/v1/tendermint_pb.d.ts similarity index 95% rename from proto/ibc/lightclients/tendermint/v1/tendermint_pb.d.ts rename to codegen/ibc/lightclients/tendermint/v1/tendermint_pb.d.ts index 516106d..6f1d3c7 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint_pb.d.ts +++ b/codegen/ibc/lightclients/tendermint/v1/tendermint_pb.d.ts @@ -4,7 +4,7 @@ import * as jspb from "google-protobuf"; import * as tendermint_types_validator_pb from "../../../../tendermint/types/validator_pb"; import * as tendermint_types_types_pb from "../../../../tendermint/types/types_pb"; -import * as confio_proofs_pb from "../../../../confio/proofs_pb"; +import * as cosmos_ics23_v1_proofs_pb from "../../../../cosmos/ics23/v1/proofs_pb"; import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as ibc_core_client_v1_client_pb from "../../../../ibc/core/client/v1/client_pb"; @@ -46,9 +46,9 @@ export class ClientState extends jspb.Message { setLatestHeight(value?: ibc_core_client_v1_client_pb.Height): void; clearProofSpecsList(): void; - getProofSpecsList(): Array; - setProofSpecsList(value: Array): void; - addProofSpecs(value?: confio_proofs_pb.ProofSpec, index?: number): confio_proofs_pb.ProofSpec; + getProofSpecsList(): Array; + setProofSpecsList(value: Array): void; + addProofSpecs(value?: cosmos_ics23_v1_proofs_pb.ProofSpec, index?: number): cosmos_ics23_v1_proofs_pb.ProofSpec; clearUpgradePathList(): void; getUpgradePathList(): Array; @@ -80,7 +80,7 @@ export namespace ClientState { maxClockDrift?: google_protobuf_duration_pb.Duration.AsObject, frozenHeight?: ibc_core_client_v1_client_pb.Height.AsObject, latestHeight?: ibc_core_client_v1_client_pb.Height.AsObject, - proofSpecsList: Array, + proofSpecsList: Array, upgradePathList: Array, allowUpdateAfterExpiry: boolean, allowUpdateAfterMisbehaviour: boolean, diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint_pb.js b/codegen/ibc/lightclients/tendermint/v1/tendermint_pb.js similarity index 98% rename from proto/ibc/lightclients/tendermint/v1/tendermint_pb.js rename to codegen/ibc/lightclients/tendermint/v1/tendermint_pb.js index f50b92a..debb62d 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint_pb.js +++ b/codegen/ibc/lightclients/tendermint/v1/tendermint_pb.js @@ -13,14 +13,14 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var tendermint_types_validator_pb = require('../../../../tendermint/types/validator_pb.js'); goog.object.extend(proto, tendermint_types_validator_pb); var tendermint_types_types_pb = require('../../../../tendermint/types/types_pb.js'); goog.object.extend(proto, tendermint_types_types_pb); -var confio_proofs_pb = require('../../../../confio/proofs_pb.js'); -goog.object.extend(proto, confio_proofs_pb); +var cosmos_ics23_v1_proofs_pb = require('../../../../cosmos/ics23/v1/proofs_pb.js'); +goog.object.extend(proto, cosmos_ics23_v1_proofs_pb); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); @@ -188,7 +188,7 @@ proto.ibc.lightclients.tendermint.v1.ClientState.toObject = function(includeInst frozenHeight: (f = msg.getFrozenHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), latestHeight: (f = msg.getLatestHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), proofSpecsList: jspb.Message.toObjectList(msg.getProofSpecsList(), - confio_proofs_pb.ProofSpec.toObject, includeInstance), + cosmos_ics23_v1_proofs_pb.ProofSpec.toObject, includeInstance), upgradePathList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, allowUpdateAfterExpiry: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), allowUpdateAfterMisbehaviour: jspb.Message.getBooleanFieldWithDefault(msg, 11, false) @@ -263,8 +263,8 @@ proto.ibc.lightclients.tendermint.v1.ClientState.deserializeBinaryFromReader = f msg.setLatestHeight(value); break; case 8: - var value = new confio_proofs_pb.ProofSpec; - reader.readMessage(value,confio_proofs_pb.ProofSpec.deserializeBinaryFromReader); + var value = new cosmos_ics23_v1_proofs_pb.ProofSpec; + reader.readMessage(value,cosmos_ics23_v1_proofs_pb.ProofSpec.deserializeBinaryFromReader); msg.addProofSpecs(value); break; case 9: @@ -368,7 +368,7 @@ proto.ibc.lightclients.tendermint.v1.ClientState.serializeBinaryToWriter = funct writer.writeRepeatedMessage( 8, f, - confio_proofs_pb.ProofSpec.serializeBinaryToWriter + cosmos_ics23_v1_proofs_pb.ProofSpec.serializeBinaryToWriter ); } f = message.getUpgradePathList(); @@ -636,17 +636,17 @@ proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasLatestHeight = fun /** - * repeated ics23.ProofSpec proof_specs = 8; - * @return {!Array} + * repeated cosmos.ics23.v1.ProofSpec proof_specs = 8; + * @return {!Array} */ proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getProofSpecsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, confio_proofs_pb.ProofSpec, 8)); + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_ics23_v1_proofs_pb.ProofSpec, 8)); }; /** - * @param {!Array} value + * @param {!Array} value * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this */ proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setProofSpecsList = function(value) { @@ -655,12 +655,12 @@ proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setProofSpecsList = f /** - * @param {!proto.ics23.ProofSpec=} opt_value + * @param {!proto.cosmos.ics23.v1.ProofSpec=} opt_value * @param {number=} opt_index - * @return {!proto.ics23.ProofSpec} + * @return {!proto.cosmos.ics23.v1.ProofSpec} */ proto.ibc.lightclients.tendermint.v1.ClientState.prototype.addProofSpecs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.ics23.ProofSpec, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.cosmos.ics23.v1.ProofSpec, opt_index); }; diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint_pb_service.d.ts b/codegen/ibc/lightclients/tendermint/v1/tendermint_pb_service.d.ts similarity index 100% rename from proto/ibc/lightclients/tendermint/v1/tendermint_pb_service.d.ts rename to codegen/ibc/lightclients/tendermint/v1/tendermint_pb_service.d.ts diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint_pb_service.js b/codegen/ibc/lightclients/tendermint/v1/tendermint_pb_service.js similarity index 100% rename from proto/ibc/lightclients/tendermint/v1/tendermint_pb_service.js rename to codegen/ibc/lightclients/tendermint/v1/tendermint_pb_service.js diff --git a/codegen/ibc/lightclients/wasm/v1/genesis.ts b/codegen/ibc/lightclients/wasm/v1/genesis.ts new file mode 100644 index 0000000..7293b78 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/genesis.ts @@ -0,0 +1,143 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/lightclients/wasm/v1/genesis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.lightclients.wasm.v1 { + export class GenesisState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + contracts?: Contract[]; + }) { + 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 ("contracts" in data && data.contracts != undefined) { + this.contracts = data.contracts; + } + } + } + get contracts() { + return pb_1.Message.getRepeatedWrapperField(this, Contract, 1) as Contract[]; + } + set contracts(value: Contract[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + contracts?: ReturnType[]; + }): GenesisState { + const message = new GenesisState({}); + if (data.contracts != null) { + message.contracts = data.contracts.map(item => Contract.fromObject(item)); + } + return message; + } + toObject() { + const data: { + contracts?: ReturnType[]; + } = {}; + if (this.contracts != null) { + data.contracts = this.contracts.map((item: Contract) => item.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.contracts.length) + writer.writeRepeatedMessage(1, this.contracts, (item: Contract) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.contracts, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Contract.deserialize(reader), Contract)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GenesisState { + return GenesisState.deserialize(bytes); + } + } + export class Contract extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code_bytes?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code_bytes" in data && data.code_bytes != undefined) { + this.code_bytes = data.code_bytes; + } + } + } + get code_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set code_bytes(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + code_bytes?: Uint8Array; + }): Contract { + const message = new Contract({}); + if (data.code_bytes != null) { + message.code_bytes = data.code_bytes; + } + return message; + } + toObject() { + const data: { + code_bytes?: Uint8Array; + } = {}; + if (this.code_bytes != null) { + data.code_bytes = this.code_bytes; + } + 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.code_bytes.length) + writer.writeBytes(1, this.code_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Contract { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Contract(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code_bytes = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Contract { + return Contract.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/lightclients/wasm/v1/genesis_pb.d.ts b/codegen/ibc/lightclients/wasm/v1/genesis_pb.d.ts new file mode 100644 index 0000000..e4bf820 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/genesis_pb.d.ts @@ -0,0 +1,50 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/genesis.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; + +export class GenesisState extends jspb.Message { + clearContractsList(): void; + getContractsList(): Array; + setContractsList(value: Array): void; + addContracts(value?: Contract, index?: number): Contract; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisState.AsObject; + static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisState; + static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; +} + +export namespace GenesisState { + export type AsObject = { + contractsList: Array, + } +} + +export class Contract extends jspb.Message { + getCodeBytes(): Uint8Array | string; + getCodeBytes_asU8(): Uint8Array; + getCodeBytes_asB64(): string; + setCodeBytes(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Contract.AsObject; + static toObject(includeInstance: boolean, msg: Contract): Contract.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Contract, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Contract; + static deserializeBinaryFromReader(message: Contract, reader: jspb.BinaryReader): Contract; +} + +export namespace Contract { + export type AsObject = { + codeBytes: Uint8Array | string, + } +} + diff --git a/codegen/ibc/lightclients/wasm/v1/genesis_pb.js b/codegen/ibc/lightclients/wasm/v1/genesis_pb.js new file mode 100644 index 0000000..b75ef58 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/genesis_pb.js @@ -0,0 +1,378 @@ +// source: ibc/lightclients/wasm/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.Contract', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.GenesisState', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.lightclients.wasm.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.GenesisState.displayName = 'proto.ibc.lightclients.wasm.v1.GenesisState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.Contract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.Contract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.Contract.displayName = 'proto.ibc.lightclients.wasm.v1.Contract'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.lightclients.wasm.v1.GenesisState.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.GenesisState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + contractsList: jspb.Message.toObjectList(msg.getContractsList(), + proto.ibc.lightclients.wasm.v1.Contract.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.GenesisState} + */ +proto.ibc.lightclients.wasm.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.GenesisState; + return proto.ibc.lightclients.wasm.v1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.GenesisState} + */ +proto.ibc.lightclients.wasm.v1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ibc.lightclients.wasm.v1.Contract; + reader.readMessage(value,proto.ibc.lightclients.wasm.v1.Contract.deserializeBinaryFromReader); + msg.addContracts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.GenesisState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContractsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.ibc.lightclients.wasm.v1.Contract.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Contract contracts = 1; + * @return {!Array} + */ +proto.ibc.lightclients.wasm.v1.GenesisState.prototype.getContractsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.lightclients.wasm.v1.Contract, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.lightclients.wasm.v1.GenesisState} returns this +*/ +proto.ibc.lightclients.wasm.v1.GenesisState.prototype.setContractsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.lightclients.wasm.v1.Contract=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.lightclients.wasm.v1.Contract} + */ +proto.ibc.lightclients.wasm.v1.GenesisState.prototype.addContracts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.lightclients.wasm.v1.Contract, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.lightclients.wasm.v1.GenesisState} returns this + */ +proto.ibc.lightclients.wasm.v1.GenesisState.prototype.clearContractsList = function() { + return this.setContractsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.Contract.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.Contract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.Contract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.Contract.toObject = function(includeInstance, msg) { + var f, obj = { + codeBytes: msg.getCodeBytes_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.Contract} + */ +proto.ibc.lightclients.wasm.v1.Contract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.Contract; + return proto.ibc.lightclients.wasm.v1.Contract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.Contract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.Contract} + */ +proto.ibc.lightclients.wasm.v1.Contract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCodeBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.Contract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.Contract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.Contract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.Contract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCodeBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes code_bytes = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.Contract.prototype.getCodeBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes code_bytes = 1; + * This is a type-conversion wrapper around `getCodeBytes()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.Contract.prototype.getCodeBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCodeBytes())); +}; + + +/** + * optional bytes code_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCodeBytes()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.Contract.prototype.getCodeBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCodeBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.Contract} returns this + */ +proto.ibc.lightclients.wasm.v1.Contract.prototype.setCodeBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.ibc.lightclients.wasm.v1); diff --git a/codegen/ibc/lightclients/wasm/v1/genesis_pb_service.d.ts b/codegen/ibc/lightclients/wasm/v1/genesis_pb_service.d.ts new file mode 100644 index 0000000..8e0e883 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/genesis_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/genesis.proto + diff --git a/codegen/ibc/lightclients/wasm/v1/genesis_pb_service.js b/codegen/ibc/lightclients/wasm/v1/genesis_pb_service.js new file mode 100644 index 0000000..8e0e883 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/genesis_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/genesis.proto + diff --git a/codegen/ibc/lightclients/wasm/v1/query.ts b/codegen/ibc/lightclients/wasm/v1/query.ts new file mode 100644 index 0000000..11d0586 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/query.ts @@ -0,0 +1,368 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/lightclients/wasm/v1/query.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../google/api/annotations"; +import * as dependency_2 from "./../../../../cosmos/base/query/v1beta1/pagination"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.lightclients.wasm.v1 { + export class QueryChecksumsRequest 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; + }): QueryChecksumsRequest { + const message = new QueryChecksumsRequest({}); + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + pagination?: ReturnType; + } = {}; + 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): QueryChecksumsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChecksumsRequest(); + 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): QueryChecksumsRequest { + return QueryChecksumsRequest.deserialize(bytes); + } + } + export class QueryChecksumsResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + checksums?: string[]; + pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; + }) { + 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 ("checksums" in data && data.checksums != undefined) { + this.checksums = data.checksums; + } + if ("pagination" in data && data.pagination != undefined) { + this.pagination = data.pagination; + } + } + } + get checksums() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set checksums(value: string[]) { + pb_1.Message.setField(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; + } + static fromObject(data: { + checksums?: string[]; + pagination?: ReturnType; + }): QueryChecksumsResponse { + const message = new QueryChecksumsResponse({}); + if (data.checksums != null) { + message.checksums = data.checksums; + } + if (data.pagination != null) { + message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); + } + return message; + } + toObject() { + const data: { + checksums?: string[]; + pagination?: ReturnType; + } = {}; + if (this.checksums != null) { + data.checksums = this.checksums; + } + 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.checksums.length) + writer.writeRepeatedString(1, this.checksums); + if (this.has_pagination) + writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryChecksumsResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryChecksumsResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryChecksumsResponse { + return QueryChecksumsResponse.deserialize(bytes); + } + } + export class QueryCodeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + checksum?: 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 ("checksum" in data && data.checksum != undefined) { + this.checksum = data.checksum; + } + } + } + get checksum() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set checksum(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + checksum?: string; + }): QueryCodeRequest { + const message = new QueryCodeRequest({}); + if (data.checksum != null) { + message.checksum = data.checksum; + } + return message; + } + toObject() { + const data: { + checksum?: string; + } = {}; + if (this.checksum != null) { + data.checksum = this.checksum; + } + 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.checksum.length) + writer.writeString(1, this.checksum); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCodeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCodeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.checksum = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCodeRequest { + return QueryCodeRequest.deserialize(bytes); + } + } + export class QueryCodeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + data?: Uint8Array; + }): QueryCodeResponse { + const message = new QueryCodeResponse({}); + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + data?: Uint8Array; + } = {}; + if (this.data != null) { + data.data = this.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 (this.data.length) + writer.writeBytes(1, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryCodeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryCodeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): QueryCodeResponse { + return QueryCodeResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedQueryService { + static definition = { + Checksums: { + path: "/ibc.lightclients.wasm.v1.Query/Checksums", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryChecksumsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryChecksumsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryChecksumsResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryChecksumsResponse.deserialize(new Uint8Array(bytes)) + }, + Code: { + path: "/ibc.lightclients.wasm.v1.Query/Code", + requestStream: false, + responseStream: false, + requestSerialize: (message: QueryCodeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => QueryCodeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: QueryCodeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => QueryCodeResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Checksums(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Code(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class QueryClient extends grpc_1.makeGenericClientConstructor(UnimplementedQueryService.definition, "Query", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Checksums: GrpcUnaryServiceInterface = (message: QueryChecksumsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Checksums(message, metadata, options, callback); + }; + Code: GrpcUnaryServiceInterface = (message: QueryCodeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Code(message, metadata, options, callback); + }; + } +} diff --git a/codegen/ibc/lightclients/wasm/v1/query_pb.d.ts b/codegen/ibc/lightclients/wasm/v1/query_pb.d.ts new file mode 100644 index 0000000..2bff9ab --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/query_pb.d.ts @@ -0,0 +1,99 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/query.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../../google/api/annotations_pb"; +import * as cosmos_base_query_v1beta1_pagination_pb from "../../../../cosmos/base/query/v1beta1/pagination_pb"; + +export class QueryChecksumsRequest extends jspb.Message { + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryChecksumsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryChecksumsRequest): QueryChecksumsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryChecksumsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryChecksumsRequest; + static deserializeBinaryFromReader(message: QueryChecksumsRequest, reader: jspb.BinaryReader): QueryChecksumsRequest; +} + +export namespace QueryChecksumsRequest { + export type AsObject = { + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, + } +} + +export class QueryChecksumsResponse extends jspb.Message { + clearChecksumsList(): void; + getChecksumsList(): Array; + setChecksumsList(value: Array): void; + addChecksums(value: string, index?: number): string; + + hasPagination(): boolean; + clearPagination(): void; + getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; + setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryChecksumsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryChecksumsResponse): QueryChecksumsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryChecksumsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryChecksumsResponse; + static deserializeBinaryFromReader(message: QueryChecksumsResponse, reader: jspb.BinaryReader): QueryChecksumsResponse; +} + +export namespace QueryChecksumsResponse { + export type AsObject = { + checksumsList: Array, + pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, + } +} + +export class QueryCodeRequest extends jspb.Message { + getChecksum(): string; + setChecksum(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCodeRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryCodeRequest): QueryCodeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCodeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCodeRequest; + static deserializeBinaryFromReader(message: QueryCodeRequest, reader: jspb.BinaryReader): QueryCodeRequest; +} + +export namespace QueryCodeRequest { + export type AsObject = { + checksum: string, + } +} + +export class QueryCodeResponse extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryCodeResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryCodeResponse): QueryCodeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryCodeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryCodeResponse; + static deserializeBinaryFromReader(message: QueryCodeResponse, reader: jspb.BinaryReader): QueryCodeResponse; +} + +export namespace QueryCodeResponse { + export type AsObject = { + data: Uint8Array | string, + } +} + diff --git a/codegen/ibc/lightclients/wasm/v1/query_pb.js b/codegen/ibc/lightclients/wasm/v1/query_pb.js new file mode 100644 index 0000000..bc9c407 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/query_pb.js @@ -0,0 +1,752 @@ +// source: ibc/lightclients/wasm/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js'); +goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.QueryCodeRequest', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.QueryCodeResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.displayName = 'proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.displayName = 'proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.QueryCodeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.QueryCodeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.QueryCodeRequest.displayName = 'proto.ibc.lightclients.wasm.v1.QueryCodeRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.QueryCodeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.QueryCodeResponse.displayName = 'proto.ibc.lightclients.wasm.v1.QueryCodeResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest; + return proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 1; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 1)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest} returns this +*/ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest} returns this + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + checksumsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse; + return proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addChecksums(value); + break; + case 2: + var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse; + reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChecksumsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated string checksums = 1; + * @return {!Array} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.getChecksumsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} returns this + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.setChecksumsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} returns this + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.addChecksums = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} returns this + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.clearChecksumsList = function() { + return this.setChecksumsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} returns this +*/ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse} returns this + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.wasm.v1.QueryChecksumsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.QueryCodeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.QueryCodeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.QueryCodeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + checksum: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.QueryCodeRequest} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.QueryCodeRequest; + return proto.ibc.lightclients.wasm.v1.QueryCodeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.QueryCodeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.QueryCodeRequest} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChecksum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.QueryCodeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.QueryCodeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.QueryCodeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChecksum(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string checksum = 1; + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeRequest.prototype.getChecksum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.wasm.v1.QueryCodeRequest} returns this + */ +proto.ibc.lightclients.wasm.v1.QueryCodeRequest.prototype.setChecksum = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.QueryCodeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.QueryCodeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.QueryCodeResponse} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.QueryCodeResponse; + return proto.ibc.lightclients.wasm.v1.QueryCodeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.QueryCodeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.QueryCodeResponse} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.QueryCodeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.QueryCodeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.QueryCodeResponse} returns this + */ +proto.ibc.lightclients.wasm.v1.QueryCodeResponse.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.ibc.lightclients.wasm.v1); diff --git a/codegen/ibc/lightclients/wasm/v1/query_pb_service.d.ts b/codegen/ibc/lightclients/wasm/v1/query_pb_service.d.ts new file mode 100644 index 0000000..6e9d691 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/query_pb_service.d.ts @@ -0,0 +1,82 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/query.proto + +import * as ibc_lightclients_wasm_v1_query_pb from "../../../../ibc/lightclients/wasm/v1/query_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type QueryChecksums = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_lightclients_wasm_v1_query_pb.QueryChecksumsRequest; + readonly responseType: typeof ibc_lightclients_wasm_v1_query_pb.QueryChecksumsResponse; +}; + +type QueryCode = { + readonly methodName: string; + readonly service: typeof Query; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_lightclients_wasm_v1_query_pb.QueryCodeRequest; + readonly responseType: typeof ibc_lightclients_wasm_v1_query_pb.QueryCodeResponse; +}; + +export class Query { + static readonly serviceName: string; + static readonly Checksums: QueryChecksums; + static readonly Code: QueryCode; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class QueryClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + checksums( + requestMessage: ibc_lightclients_wasm_v1_query_pb.QueryChecksumsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_query_pb.QueryChecksumsResponse|null) => void + ): UnaryResponse; + checksums( + requestMessage: ibc_lightclients_wasm_v1_query_pb.QueryChecksumsRequest, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_query_pb.QueryChecksumsResponse|null) => void + ): UnaryResponse; + code( + requestMessage: ibc_lightclients_wasm_v1_query_pb.QueryCodeRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_query_pb.QueryCodeResponse|null) => void + ): UnaryResponse; + code( + requestMessage: ibc_lightclients_wasm_v1_query_pb.QueryCodeRequest, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_query_pb.QueryCodeResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/ibc/lightclients/wasm/v1/query_pb_service.js b/codegen/ibc/lightclients/wasm/v1/query_pb_service.js new file mode 100644 index 0000000..26514e1 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/query_pb_service.js @@ -0,0 +1,101 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/query.proto + +var ibc_lightclients_wasm_v1_query_pb = require("../../../../ibc/lightclients/wasm/v1/query_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Query = (function () { + function Query() {} + Query.serviceName = "ibc.lightclients.wasm.v1.Query"; + return Query; +}()); + +Query.Checksums = { + methodName: "Checksums", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_lightclients_wasm_v1_query_pb.QueryChecksumsRequest, + responseType: ibc_lightclients_wasm_v1_query_pb.QueryChecksumsResponse +}; + +Query.Code = { + methodName: "Code", + service: Query, + requestStream: false, + responseStream: false, + requestType: ibc_lightclients_wasm_v1_query_pb.QueryCodeRequest, + responseType: ibc_lightclients_wasm_v1_query_pb.QueryCodeResponse +}; + +exports.Query = Query; + +function QueryClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +QueryClient.prototype.checksums = function checksums(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Checksums, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +QueryClient.prototype.code = function code(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Query.Code, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.QueryClient = QueryClient; + diff --git a/codegen/ibc/lightclients/wasm/v1/tx.ts b/codegen/ibc/lightclients/wasm/v1/tx.ts new file mode 100644 index 0000000..815ca16 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/tx.ts @@ -0,0 +1,546 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/lightclients/wasm/v1/tx.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../cosmos/msg/v1/msg"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace ibc.lightclients.wasm.v1 { + export class MsgStoreCode extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer?: string; + wasm_byte_code?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("wasm_byte_code" in data && data.wasm_byte_code != undefined) { + this.wasm_byte_code = data.wasm_byte_code; + } + } + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 1, value); + } + get wasm_byte_code() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set wasm_byte_code(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + signer?: string; + wasm_byte_code?: Uint8Array; + }): MsgStoreCode { + const message = new MsgStoreCode({}); + if (data.signer != null) { + message.signer = data.signer; + } + if (data.wasm_byte_code != null) { + message.wasm_byte_code = data.wasm_byte_code; + } + return message; + } + toObject() { + const data: { + signer?: string; + wasm_byte_code?: Uint8Array; + } = {}; + if (this.signer != null) { + data.signer = this.signer; + } + if (this.wasm_byte_code != null) { + data.wasm_byte_code = this.wasm_byte_code; + } + 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.signer.length) + writer.writeString(1, this.signer); + if (this.wasm_byte_code.length) + writer.writeBytes(2, this.wasm_byte_code); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgStoreCode { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgStoreCode(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signer = reader.readString(); + break; + case 2: + message.wasm_byte_code = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgStoreCode { + return MsgStoreCode.deserialize(bytes); + } + } + export class MsgStoreCodeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + checksum?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("checksum" in data && data.checksum != undefined) { + this.checksum = data.checksum; + } + } + } + get checksum() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set checksum(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + checksum?: Uint8Array; + }): MsgStoreCodeResponse { + const message = new MsgStoreCodeResponse({}); + if (data.checksum != null) { + message.checksum = data.checksum; + } + return message; + } + toObject() { + const data: { + checksum?: Uint8Array; + } = {}; + if (this.checksum != null) { + data.checksum = this.checksum; + } + 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.checksum.length) + writer.writeBytes(1, this.checksum); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgStoreCodeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgStoreCodeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.checksum = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgStoreCodeResponse { + return MsgStoreCodeResponse.deserialize(bytes); + } + } + export class MsgRemoveChecksum extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer?: string; + checksum?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("checksum" in data && data.checksum != undefined) { + this.checksum = data.checksum; + } + } + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 1, value); + } + get checksum() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set checksum(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + signer?: string; + checksum?: Uint8Array; + }): MsgRemoveChecksum { + const message = new MsgRemoveChecksum({}); + if (data.signer != null) { + message.signer = data.signer; + } + if (data.checksum != null) { + message.checksum = data.checksum; + } + return message; + } + toObject() { + const data: { + signer?: string; + checksum?: Uint8Array; + } = {}; + if (this.signer != null) { + data.signer = this.signer; + } + if (this.checksum != null) { + data.checksum = this.checksum; + } + 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.signer.length) + writer.writeString(1, this.signer); + if (this.checksum.length) + writer.writeBytes(2, this.checksum); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRemoveChecksum { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRemoveChecksum(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signer = reader.readString(); + break; + case 2: + message.checksum = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRemoveChecksum { + return MsgRemoveChecksum.deserialize(bytes); + } + } + export class MsgRemoveChecksumResponse 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: {}): MsgRemoveChecksumResponse { + const message = new MsgRemoveChecksumResponse({}); + 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): MsgRemoveChecksumResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRemoveChecksumResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgRemoveChecksumResponse { + return MsgRemoveChecksumResponse.deserialize(bytes); + } + } + export class MsgMigrateContract extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signer?: string; + client_id?: string; + checksum?: Uint8Array; + msg?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signer" in data && data.signer != undefined) { + this.signer = data.signer; + } + if ("client_id" in data && data.client_id != undefined) { + this.client_id = data.client_id; + } + if ("checksum" in data && data.checksum != undefined) { + this.checksum = data.checksum; + } + if ("msg" in data && data.msg != undefined) { + this.msg = data.msg; + } + } + } + get signer() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set signer(value: string) { + pb_1.Message.setField(this, 1, value); + } + 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 checksum() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set checksum(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get msg() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set msg(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + signer?: string; + client_id?: string; + checksum?: Uint8Array; + msg?: Uint8Array; + }): MsgMigrateContract { + const message = new MsgMigrateContract({}); + if (data.signer != null) { + message.signer = data.signer; + } + if (data.client_id != null) { + message.client_id = data.client_id; + } + if (data.checksum != null) { + message.checksum = data.checksum; + } + if (data.msg != null) { + message.msg = data.msg; + } + return message; + } + toObject() { + const data: { + signer?: string; + client_id?: string; + checksum?: Uint8Array; + msg?: Uint8Array; + } = {}; + if (this.signer != null) { + data.signer = this.signer; + } + if (this.client_id != null) { + data.client_id = this.client_id; + } + if (this.checksum != null) { + data.checksum = this.checksum; + } + if (this.msg != null) { + data.msg = this.msg; + } + 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.signer.length) + writer.writeString(1, this.signer); + if (this.client_id.length) + writer.writeString(2, this.client_id); + if (this.checksum.length) + writer.writeBytes(3, this.checksum); + if (this.msg.length) + writer.writeBytes(4, this.msg); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgMigrateContract { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgMigrateContract(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.signer = reader.readString(); + break; + case 2: + message.client_id = reader.readString(); + break; + case 3: + message.checksum = reader.readBytes(); + break; + case 4: + message.msg = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgMigrateContract { + return MsgMigrateContract.deserialize(bytes); + } + } + export class MsgMigrateContractResponse 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: {}): MsgMigrateContractResponse { + const message = new MsgMigrateContractResponse({}); + 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): MsgMigrateContractResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgMigrateContractResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): MsgMigrateContractResponse { + return MsgMigrateContractResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMsgService { + static definition = { + StoreCode: { + path: "/ibc.lightclients.wasm.v1.Msg/StoreCode", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgStoreCode) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgStoreCode.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgStoreCodeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgStoreCodeResponse.deserialize(new Uint8Array(bytes)) + }, + RemoveChecksum: { + path: "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgRemoveChecksum) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgRemoveChecksum.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgRemoveChecksumResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgRemoveChecksumResponse.deserialize(new Uint8Array(bytes)) + }, + MigrateContract: { + path: "/ibc.lightclients.wasm.v1.Msg/MigrateContract", + requestStream: false, + responseStream: false, + requestSerialize: (message: MsgMigrateContract) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => MsgMigrateContract.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: MsgMigrateContractResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => MsgMigrateContractResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract StoreCode(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RemoveChecksum(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract MigrateContract(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + StoreCode: GrpcUnaryServiceInterface = (message: MsgStoreCode, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.StoreCode(message, metadata, options, callback); + }; + RemoveChecksum: GrpcUnaryServiceInterface = (message: MsgRemoveChecksum, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RemoveChecksum(message, metadata, options, callback); + }; + MigrateContract: GrpcUnaryServiceInterface = (message: MsgMigrateContract, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.MigrateContract(message, metadata, options, callback); + }; + } +} diff --git a/codegen/ibc/lightclients/wasm/v1/tx_pb.d.ts b/codegen/ibc/lightclients/wasm/v1/tx_pb.d.ts new file mode 100644 index 0000000..5525bf4 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/tx_pb.d.ts @@ -0,0 +1,148 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/tx.proto + +import * as jspb from "google-protobuf"; +import * as cosmos_msg_v1_msg_pb from "../../../../cosmos/msg/v1/msg_pb"; + +export class MsgStoreCode extends jspb.Message { + getSigner(): string; + setSigner(value: string): void; + + getWasmByteCode(): Uint8Array | string; + getWasmByteCode_asU8(): Uint8Array; + getWasmByteCode_asB64(): string; + setWasmByteCode(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgStoreCode.AsObject; + static toObject(includeInstance: boolean, msg: MsgStoreCode): MsgStoreCode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgStoreCode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgStoreCode; + static deserializeBinaryFromReader(message: MsgStoreCode, reader: jspb.BinaryReader): MsgStoreCode; +} + +export namespace MsgStoreCode { + export type AsObject = { + signer: string, + wasmByteCode: Uint8Array | string, + } +} + +export class MsgStoreCodeResponse extends jspb.Message { + getChecksum(): Uint8Array | string; + getChecksum_asU8(): Uint8Array; + getChecksum_asB64(): string; + setChecksum(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgStoreCodeResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgStoreCodeResponse): MsgStoreCodeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgStoreCodeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgStoreCodeResponse; + static deserializeBinaryFromReader(message: MsgStoreCodeResponse, reader: jspb.BinaryReader): MsgStoreCodeResponse; +} + +export namespace MsgStoreCodeResponse { + export type AsObject = { + checksum: Uint8Array | string, + } +} + +export class MsgRemoveChecksum extends jspb.Message { + getSigner(): string; + setSigner(value: string): void; + + getChecksum(): Uint8Array | string; + getChecksum_asU8(): Uint8Array; + getChecksum_asB64(): string; + setChecksum(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRemoveChecksum.AsObject; + static toObject(includeInstance: boolean, msg: MsgRemoveChecksum): MsgRemoveChecksum.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRemoveChecksum, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRemoveChecksum; + static deserializeBinaryFromReader(message: MsgRemoveChecksum, reader: jspb.BinaryReader): MsgRemoveChecksum; +} + +export namespace MsgRemoveChecksum { + export type AsObject = { + signer: string, + checksum: Uint8Array | string, + } +} + +export class MsgRemoveChecksumResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgRemoveChecksumResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgRemoveChecksumResponse): MsgRemoveChecksumResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgRemoveChecksumResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgRemoveChecksumResponse; + static deserializeBinaryFromReader(message: MsgRemoveChecksumResponse, reader: jspb.BinaryReader): MsgRemoveChecksumResponse; +} + +export namespace MsgRemoveChecksumResponse { + export type AsObject = { + } +} + +export class MsgMigrateContract extends jspb.Message { + getSigner(): string; + setSigner(value: string): void; + + getClientId(): string; + setClientId(value: string): void; + + getChecksum(): Uint8Array | string; + getChecksum_asU8(): Uint8Array; + getChecksum_asB64(): string; + setChecksum(value: Uint8Array | string): void; + + getMsg(): Uint8Array | string; + getMsg_asU8(): Uint8Array; + getMsg_asB64(): string; + setMsg(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgMigrateContract.AsObject; + static toObject(includeInstance: boolean, msg: MsgMigrateContract): MsgMigrateContract.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgMigrateContract, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgMigrateContract; + static deserializeBinaryFromReader(message: MsgMigrateContract, reader: jspb.BinaryReader): MsgMigrateContract; +} + +export namespace MsgMigrateContract { + export type AsObject = { + signer: string, + clientId: string, + checksum: Uint8Array | string, + msg: Uint8Array | string, + } +} + +export class MsgMigrateContractResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgMigrateContractResponse.AsObject; + static toObject(includeInstance: boolean, msg: MsgMigrateContractResponse): MsgMigrateContractResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgMigrateContractResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgMigrateContractResponse; + static deserializeBinaryFromReader(message: MsgMigrateContractResponse, reader: jspb.BinaryReader): MsgMigrateContractResponse; +} + +export namespace MsgMigrateContractResponse { + export type AsObject = { + } +} + diff --git a/codegen/ibc/lightclients/wasm/v1/tx_pb.js b/codegen/ibc/lightclients/wasm/v1/tx_pb.js new file mode 100644 index 0000000..a1f3af0 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/tx_pb.js @@ -0,0 +1,1144 @@ +// source: ibc/lightclients/wasm/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var cosmos_msg_v1_msg_pb = require('../../../../cosmos/msg/v1/msg_pb.js'); +goog.object.extend(proto, cosmos_msg_v1_msg_pb); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.MsgMigrateContract', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.MsgStoreCode', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.MsgStoreCode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.MsgStoreCode.displayName = 'proto.ibc.lightclients.wasm.v1.MsgStoreCode'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.displayName = 'proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.displayName = 'proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.displayName = 'proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.MsgMigrateContract, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.MsgMigrateContract.displayName = 'proto.ibc.lightclients.wasm.v1.MsgMigrateContract'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.displayName = 'proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.MsgStoreCode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.MsgStoreCode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.toObject = function(includeInstance, msg) { + var f, obj = { + signer: jspb.Message.getFieldWithDefault(msg, 1, ""), + wasmByteCode: msg.getWasmByteCode_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.MsgStoreCode} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.MsgStoreCode; + return proto.ibc.lightclients.wasm.v1.MsgStoreCode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.MsgStoreCode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.MsgStoreCode} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWasmByteCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.MsgStoreCode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.MsgStoreCode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getWasmByteCode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string signer = 1; + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.wasm.v1.MsgStoreCode} returns this + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes wasm_byte_code = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.prototype.getWasmByteCode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes wasm_byte_code = 2; + * This is a type-conversion wrapper around `getWasmByteCode()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.prototype.getWasmByteCode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWasmByteCode())); +}; + + +/** + * optional bytes wasm_byte_code = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWasmByteCode()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.prototype.getWasmByteCode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWasmByteCode())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.MsgStoreCode} returns this + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCode.prototype.setWasmByteCode = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + checksum: msg.getChecksum_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse; + return proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChecksum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChecksum_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes checksum = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.prototype.getChecksum = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes checksum = 1; + * This is a type-conversion wrapper around `getChecksum()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.prototype.getChecksum_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChecksum())); +}; + + +/** + * optional bytes checksum = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChecksum()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.prototype.getChecksum_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChecksum())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse} returns this + */ +proto.ibc.lightclients.wasm.v1.MsgStoreCodeResponse.prototype.setChecksum = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.toObject = function(includeInstance, msg) { + var f, obj = { + signer: jspb.Message.getFieldWithDefault(msg, 1, ""), + checksum: msg.getChecksum_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum; + return proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChecksum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChecksum_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string signer = 1; + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum} returns this + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes checksum = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.prototype.getChecksum = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes checksum = 2; + * This is a type-conversion wrapper around `getChecksum()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.prototype.getChecksum_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChecksum())); +}; + + +/** + * optional bytes checksum = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChecksum()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.prototype.getChecksum_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChecksum())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum} returns this + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksum.prototype.setChecksum = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse; + return proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.MsgMigrateContract.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.MsgMigrateContract} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.toObject = function(includeInstance, msg) { + var f, obj = { + signer: jspb.Message.getFieldWithDefault(msg, 1, ""), + clientId: jspb.Message.getFieldWithDefault(msg, 2, ""), + checksum: msg.getChecksum_asB64(), + msg: msg.getMsg_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.MsgMigrateContract} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.MsgMigrateContract; + return proto.ibc.lightclients.wasm.v1.MsgMigrateContract.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.MsgMigrateContract} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.MsgMigrateContract} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSigner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChecksum(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMsg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.MsgMigrateContract.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.MsgMigrateContract} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getChecksum_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getMsg_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string signer = 1; + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.wasm.v1.MsgMigrateContract} returns this + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string client_id = 2; + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.wasm.v1.MsgMigrateContract} returns this + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes checksum = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.getChecksum = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes checksum = 3; + * This is a type-conversion wrapper around `getChecksum()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.getChecksum_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChecksum())); +}; + + +/** + * optional bytes checksum = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChecksum()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.getChecksum_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChecksum())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.MsgMigrateContract} returns this + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.setChecksum = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes msg = 4; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.getMsg = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes msg = 4; + * This is a type-conversion wrapper around `getMsg()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.getMsg_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMsg())); +}; + + +/** + * optional bytes msg = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMsg()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.getMsg_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMsg())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.MsgMigrateContract} returns this + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContract.prototype.setMsg = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse; + return proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.MsgMigrateContractResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.ibc.lightclients.wasm.v1); diff --git a/codegen/ibc/lightclients/wasm/v1/tx_pb_service.d.ts b/codegen/ibc/lightclients/wasm/v1/tx_pb_service.d.ts new file mode 100644 index 0000000..80bd13f --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/tx_pb_service.d.ts @@ -0,0 +1,101 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/tx.proto + +import * as ibc_lightclients_wasm_v1_tx_pb from "../../../../ibc/lightclients/wasm/v1/tx_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MsgStoreCode = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_lightclients_wasm_v1_tx_pb.MsgStoreCode; + readonly responseType: typeof ibc_lightclients_wasm_v1_tx_pb.MsgStoreCodeResponse; +}; + +type MsgRemoveChecksum = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_lightclients_wasm_v1_tx_pb.MsgRemoveChecksum; + readonly responseType: typeof ibc_lightclients_wasm_v1_tx_pb.MsgRemoveChecksumResponse; +}; + +type MsgMigrateContract = { + readonly methodName: string; + readonly service: typeof Msg; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof ibc_lightclients_wasm_v1_tx_pb.MsgMigrateContract; + readonly responseType: typeof ibc_lightclients_wasm_v1_tx_pb.MsgMigrateContractResponse; +}; + +export class Msg { + static readonly serviceName: string; + static readonly StoreCode: MsgStoreCode; + static readonly RemoveChecksum: MsgRemoveChecksum; + static readonly MigrateContract: MsgMigrateContract; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MsgClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + storeCode( + requestMessage: ibc_lightclients_wasm_v1_tx_pb.MsgStoreCode, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_tx_pb.MsgStoreCodeResponse|null) => void + ): UnaryResponse; + storeCode( + requestMessage: ibc_lightclients_wasm_v1_tx_pb.MsgStoreCode, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_tx_pb.MsgStoreCodeResponse|null) => void + ): UnaryResponse; + removeChecksum( + requestMessage: ibc_lightclients_wasm_v1_tx_pb.MsgRemoveChecksum, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_tx_pb.MsgRemoveChecksumResponse|null) => void + ): UnaryResponse; + removeChecksum( + requestMessage: ibc_lightclients_wasm_v1_tx_pb.MsgRemoveChecksum, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_tx_pb.MsgRemoveChecksumResponse|null) => void + ): UnaryResponse; + migrateContract( + requestMessage: ibc_lightclients_wasm_v1_tx_pb.MsgMigrateContract, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_tx_pb.MsgMigrateContractResponse|null) => void + ): UnaryResponse; + migrateContract( + requestMessage: ibc_lightclients_wasm_v1_tx_pb.MsgMigrateContract, + callback: (error: ServiceError|null, responseMessage: ibc_lightclients_wasm_v1_tx_pb.MsgMigrateContractResponse|null) => void + ): UnaryResponse; +} + diff --git a/codegen/ibc/lightclients/wasm/v1/tx_pb_service.js b/codegen/ibc/lightclients/wasm/v1/tx_pb_service.js new file mode 100644 index 0000000..8c20dca --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/tx_pb_service.js @@ -0,0 +1,141 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/tx.proto + +var ibc_lightclients_wasm_v1_tx_pb = require("../../../../ibc/lightclients/wasm/v1/tx_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Msg = (function () { + function Msg() {} + Msg.serviceName = "ibc.lightclients.wasm.v1.Msg"; + return Msg; +}()); + +Msg.StoreCode = { + methodName: "StoreCode", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_lightclients_wasm_v1_tx_pb.MsgStoreCode, + responseType: ibc_lightclients_wasm_v1_tx_pb.MsgStoreCodeResponse +}; + +Msg.RemoveChecksum = { + methodName: "RemoveChecksum", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_lightclients_wasm_v1_tx_pb.MsgRemoveChecksum, + responseType: ibc_lightclients_wasm_v1_tx_pb.MsgRemoveChecksumResponse +}; + +Msg.MigrateContract = { + methodName: "MigrateContract", + service: Msg, + requestStream: false, + responseStream: false, + requestType: ibc_lightclients_wasm_v1_tx_pb.MsgMigrateContract, + responseType: ibc_lightclients_wasm_v1_tx_pb.MsgMigrateContractResponse +}; + +exports.Msg = Msg; + +function MsgClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MsgClient.prototype.storeCode = function storeCode(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.StoreCode, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.removeChecksum = function removeChecksum(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.RemoveChecksum, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MsgClient.prototype.migrateContract = function migrateContract(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Msg.MigrateContract, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MsgClient = MsgClient; + diff --git a/codegen/ibc/lightclients/wasm/v1/wasm.ts b/codegen/ibc/lightclients/wasm/v1/wasm.ts new file mode 100644 index 0000000..2ec58ff --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/wasm.ts @@ -0,0 +1,328 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: ibc/lightclients/wasm/v1/wasm.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../../../gogoproto/gogo"; +import * as dependency_2 from "./../../../core/client/v1/client"; +import * as pb_1 from "google-protobuf"; +export namespace ibc.lightclients.wasm.v1 { + export class ClientState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: Uint8Array; + checksum?: Uint8Array; + latest_height?: dependency_2.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 ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("checksum" in data && data.checksum != undefined) { + this.checksum = data.checksum; + } + if ("latest_height" in data && data.latest_height != undefined) { + this.latest_height = data.latest_height; + } + } + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get checksum() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set checksum(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get latest_height() { + return pb_1.Message.getWrapperField(this, dependency_2.ibc.core.client.v1.Height, 3) as dependency_2.ibc.core.client.v1.Height; + } + set latest_height(value: dependency_2.ibc.core.client.v1.Height) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_latest_height() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + data?: Uint8Array; + checksum?: Uint8Array; + latest_height?: ReturnType; + }): ClientState { + const message = new ClientState({}); + if (data.data != null) { + message.data = data.data; + } + if (data.checksum != null) { + message.checksum = data.checksum; + } + if (data.latest_height != null) { + message.latest_height = dependency_2.ibc.core.client.v1.Height.fromObject(data.latest_height); + } + return message; + } + toObject() { + const data: { + data?: Uint8Array; + checksum?: Uint8Array; + latest_height?: ReturnType; + } = {}; + if (this.data != null) { + data.data = this.data; + } + if (this.checksum != null) { + data.checksum = this.checksum; + } + if (this.latest_height != null) { + data.latest_height = this.latest_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.data.length) + writer.writeBytes(1, this.data); + if (this.checksum.length) + writer.writeBytes(2, this.checksum); + if (this.has_latest_height) + writer.writeMessage(3, this.latest_height, () => this.latest_height.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readBytes(); + break; + case 2: + message.checksum = reader.readBytes(); + break; + case 3: + reader.readMessage(message.latest_height, () => message.latest_height = dependency_2.ibc.core.client.v1.Height.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientState { + return ClientState.deserialize(bytes); + } + } + export class ConsensusState extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + data?: Uint8Array; + }): ConsensusState { + const message = new ConsensusState({}); + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + data?: Uint8Array; + } = {}; + if (this.data != null) { + data.data = this.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 (this.data.length) + writer.writeBytes(1, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConsensusState { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConsensusState(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConsensusState { + return ConsensusState.deserialize(bytes); + } + } + export class ClientMessage extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + data?: Uint8Array; + }): ClientMessage { + const message = new ClientMessage({}); + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + data?: Uint8Array; + } = {}; + if (this.data != null) { + data.data = this.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 (this.data.length) + writer.writeBytes(1, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ClientMessage { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ClientMessage(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ClientMessage { + return ClientMessage.deserialize(bytes); + } + } + /** @deprecated*/ + export class Checksums extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + checksums?: Uint8Array[]; + }) { + 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 ("checksums" in data && data.checksums != undefined) { + this.checksums = data.checksums; + } + } + } + get checksums() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as Uint8Array[]; + } + set checksums(value: Uint8Array[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + checksums?: Uint8Array[]; + }): Checksums { + const message = new Checksums({}); + if (data.checksums != null) { + message.checksums = data.checksums; + } + return message; + } + toObject() { + const data: { + checksums?: Uint8Array[]; + } = {}; + if (this.checksums != null) { + data.checksums = this.checksums; + } + 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.checksums.length) + writer.writeRepeatedBytes(1, this.checksums); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Checksums { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Checksums(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Checksums { + return Checksums.deserialize(bytes); + } + } +} diff --git a/codegen/ibc/lightclients/wasm/v1/wasm_pb.d.ts b/codegen/ibc/lightclients/wasm/v1/wasm_pb.d.ts new file mode 100644 index 0000000..bef90f7 --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/wasm_pb.d.ts @@ -0,0 +1,109 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/wasm.proto + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; +import * as ibc_core_client_v1_client_pb from "../../../../ibc/core/client/v1/client_pb"; + +export class ClientState extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getChecksum(): Uint8Array | string; + getChecksum_asU8(): Uint8Array; + getChecksum_asB64(): string; + setChecksum(value: Uint8Array | string): void; + + hasLatestHeight(): boolean; + clearLatestHeight(): void; + getLatestHeight(): ibc_core_client_v1_client_pb.Height | undefined; + setLatestHeight(value?: ibc_core_client_v1_client_pb.Height): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ClientState.AsObject; + static toObject(includeInstance: boolean, msg: ClientState): ClientState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ClientState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ClientState; + static deserializeBinaryFromReader(message: ClientState, reader: jspb.BinaryReader): ClientState; +} + +export namespace ClientState { + export type AsObject = { + data: Uint8Array | string, + checksum: Uint8Array | string, + latestHeight?: ibc_core_client_v1_client_pb.Height.AsObject, + } +} + +export class ConsensusState extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConsensusState.AsObject; + static toObject(includeInstance: boolean, msg: ConsensusState): ConsensusState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConsensusState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConsensusState; + static deserializeBinaryFromReader(message: ConsensusState, reader: jspb.BinaryReader): ConsensusState; +} + +export namespace ConsensusState { + export type AsObject = { + data: Uint8Array | string, + } +} + +export class ClientMessage extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ClientMessage.AsObject; + static toObject(includeInstance: boolean, msg: ClientMessage): ClientMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ClientMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ClientMessage; + static deserializeBinaryFromReader(message: ClientMessage, reader: jspb.BinaryReader): ClientMessage; +} + +export namespace ClientMessage { + export type AsObject = { + data: Uint8Array | string, + } +} + +export class Checksums extends jspb.Message { + clearChecksumsList(): void; + getChecksumsList(): Array; + getChecksumsList_asU8(): Array; + getChecksumsList_asB64(): Array; + setChecksumsList(value: Array): void; + addChecksums(value: Uint8Array | string, index?: number): Uint8Array | string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Checksums.AsObject; + static toObject(includeInstance: boolean, msg: Checksums): Checksums.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Checksums, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Checksums; + static deserializeBinaryFromReader(message: Checksums, reader: jspb.BinaryReader): Checksums; +} + +export namespace Checksums { + export type AsObject = { + checksumsList: Array, + } +} + diff --git a/codegen/ibc/lightclients/wasm/v1/wasm_pb.js b/codegen/ibc/lightclients/wasm/v1/wasm_pb.js new file mode 100644 index 0000000..905d81b --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/wasm_pb.js @@ -0,0 +1,857 @@ +// source: ibc/lightclients/wasm/v1/wasm.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); +goog.object.extend(proto, ibc_core_client_v1_client_pb); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.Checksums', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.ClientMessage', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.ClientState', null, global); +goog.exportSymbol('proto.ibc.lightclients.wasm.v1.ConsensusState', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.ClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.ClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.ClientState.displayName = 'proto.ibc.lightclients.wasm.v1.ClientState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.ConsensusState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.ConsensusState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.ConsensusState.displayName = 'proto.ibc.lightclients.wasm.v1.ConsensusState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.ClientMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.ClientMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.ClientMessage.displayName = 'proto.ibc.lightclients.wasm.v1.ClientMessage'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ibc.lightclients.wasm.v1.Checksums = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.lightclients.wasm.v1.Checksums.repeatedFields_, null); +}; +goog.inherits(proto.ibc.lightclients.wasm.v1.Checksums, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.wasm.v1.Checksums.displayName = 'proto.ibc.lightclients.wasm.v1.Checksums'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.ClientState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.ClientState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.ClientState.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + checksum: msg.getChecksum_asB64(), + latestHeight: (f = msg.getLatestHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.ClientState} + */ +proto.ibc.lightclients.wasm.v1.ClientState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.ClientState; + return proto.ibc.lightclients.wasm.v1.ClientState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.ClientState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.ClientState} + */ +proto.ibc.lightclients.wasm.v1.ClientState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChecksum(value); + break; + case 3: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setLatestHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.ClientState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.ClientState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.ClientState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getChecksum_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLatestHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.ClientState} returns this + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes checksum = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.getChecksum = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes checksum = 2; + * This is a type-conversion wrapper around `getChecksum()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.getChecksum_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChecksum())); +}; + + +/** + * optional bytes checksum = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChecksum()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.getChecksum_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChecksum())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.ClientState} returns this + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.setChecksum = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional ibc.core.client.v1.Height latest_height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.getLatestHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.lightclients.wasm.v1.ClientState} returns this +*/ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.setLatestHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.wasm.v1.ClientState} returns this + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.clearLatestHeight = function() { + return this.setLatestHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.wasm.v1.ClientState.prototype.hasLatestHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.ConsensusState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.ConsensusState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.ConsensusState} + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.ConsensusState; + return proto.ibc.lightclients.wasm.v1.ConsensusState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.ConsensusState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.ConsensusState} + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.ConsensusState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.ConsensusState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.ConsensusState} returns this + */ +proto.ibc.lightclients.wasm.v1.ConsensusState.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.ClientMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.ClientMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.ClientMessage} + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.ClientMessage; + return proto.ibc.lightclients.wasm.v1.ClientMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.ClientMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.ClientMessage} + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.ClientMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.ClientMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.ClientMessage} returns this + */ +proto.ibc.lightclients.wasm.v1.ClientMessage.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.lightclients.wasm.v1.Checksums.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ibc.lightclients.wasm.v1.Checksums.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.wasm.v1.Checksums.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ibc.lightclients.wasm.v1.Checksums} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.Checksums.toObject = function(includeInstance, msg) { + var f, obj = { + checksumsList: msg.getChecksumsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ibc.lightclients.wasm.v1.Checksums} + */ +proto.ibc.lightclients.wasm.v1.Checksums.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.wasm.v1.Checksums; + return proto.ibc.lightclients.wasm.v1.Checksums.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.wasm.v1.Checksums} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.wasm.v1.Checksums} + */ +proto.ibc.lightclients.wasm.v1.Checksums.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addChecksums(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.wasm.v1.Checksums.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.wasm.v1.Checksums.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ibc.lightclients.wasm.v1.Checksums} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.wasm.v1.Checksums.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChecksumsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes checksums = 1; + * @return {!(Array|Array)} + */ +proto.ibc.lightclients.wasm.v1.Checksums.prototype.getChecksumsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes checksums = 1; + * This is a type-conversion wrapper around `getChecksumsList()` + * @return {!Array} + */ +proto.ibc.lightclients.wasm.v1.Checksums.prototype.getChecksumsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getChecksumsList())); +}; + + +/** + * repeated bytes checksums = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChecksumsList()` + * @return {!Array} + */ +proto.ibc.lightclients.wasm.v1.Checksums.prototype.getChecksumsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getChecksumsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.ibc.lightclients.wasm.v1.Checksums} returns this + */ +proto.ibc.lightclients.wasm.v1.Checksums.prototype.setChecksumsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.ibc.lightclients.wasm.v1.Checksums} returns this + */ +proto.ibc.lightclients.wasm.v1.Checksums.prototype.addChecksums = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.lightclients.wasm.v1.Checksums} returns this + */ +proto.ibc.lightclients.wasm.v1.Checksums.prototype.clearChecksumsList = function() { + return this.setChecksumsList([]); +}; + + +goog.object.extend(exports, proto.ibc.lightclients.wasm.v1); diff --git a/codegen/ibc/lightclients/wasm/v1/wasm_pb_service.d.ts b/codegen/ibc/lightclients/wasm/v1/wasm_pb_service.d.ts new file mode 100644 index 0000000..d67928e --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/wasm_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/wasm.proto + diff --git a/codegen/ibc/lightclients/wasm/v1/wasm_pb_service.js b/codegen/ibc/lightclients/wasm/v1/wasm_pb_service.js new file mode 100644 index 0000000..d67928e --- /dev/null +++ b/codegen/ibc/lightclients/wasm/v1/wasm_pb_service.js @@ -0,0 +1,3 @@ +// package: ibc.lightclients.wasm.v1 +// file: ibc/lightclients/wasm/v1/wasm.proto + diff --git a/codegen/tendermint/abci/types.ts b/codegen/tendermint/abci/types.ts new file mode 100644 index 0000000..5f09c0c --- /dev/null +++ b/codegen/tendermint/abci/types.ts @@ -0,0 +1,7197 @@ +/** + * 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; + flush?: ReturnType; + info?: ReturnType; + init_chain?: ReturnType; + query?: ReturnType; + check_tx?: ReturnType; + commit?: ReturnType; + list_snapshots?: ReturnType; + offer_snapshot?: ReturnType; + load_snapshot_chunk?: ReturnType; + apply_snapshot_chunk?: ReturnType; + prepare_proposal?: ReturnType; + process_proposal?: ReturnType; + extend_vote?: ReturnType; + verify_vote_extension?: ReturnType; + finalize_block?: ReturnType; + }): 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; + flush?: ReturnType; + info?: ReturnType; + init_chain?: ReturnType; + query?: ReturnType; + check_tx?: ReturnType; + commit?: ReturnType; + list_snapshots?: ReturnType; + offer_snapshot?: ReturnType; + load_snapshot_chunk?: ReturnType; + apply_snapshot_chunk?: ReturnType; + prepare_proposal?: ReturnType; + process_proposal?: ReturnType; + extend_vote?: ReturnType; + verify_vote_extension?: ReturnType; + finalize_block?: ReturnType; + } = {}; + 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; + chain_id?: string; + consensus_params?: ReturnType; + validators?: ReturnType[]; + 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; + chain_id?: string; + consensus_params?: ReturnType; + validators?: ReturnType[]; + 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 (this.initial_height != 0) + writer.writeInt64(6, this.initial_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestInitChain { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestInitChain(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.time, () => message.time = dependency_5.google.protobuf.Timestamp.deserialize(reader)); + break; + case 2: + message.chain_id = reader.readString(); + break; + case 3: + reader.readMessage(message.consensus_params, () => message.consensus_params = dependency_3.tendermint.types.ConsensusParams.deserialize(reader)); + break; + case 4: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 4, ValidatorUpdate.deserialize(reader), ValidatorUpdate)); + break; + case 5: + message.app_state_bytes = reader.readBytes(); + break; + case 6: + message.initial_height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestInitChain { + return RequestInitChain.deserialize(bytes); + } + } + export class RequestQuery extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: Uint8Array; + path?: string; + height?: number; + prove?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("path" in data && data.path != undefined) { + this.path = data.path; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("prove" in data && data.prove != undefined) { + this.prove = data.prove; + } + } + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get path() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set path(value: string) { + pb_1.Message.setField(this, 2, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get prove() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set prove(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + data?: Uint8Array; + path?: string; + height?: number; + prove?: boolean; + }): RequestQuery { + const message = new RequestQuery({}); + if (data.data != null) { + message.data = data.data; + } + if (data.path != null) { + message.path = data.path; + } + if (data.height != null) { + message.height = data.height; + } + if (data.prove != null) { + message.prove = data.prove; + } + return message; + } + toObject() { + const data: { + data?: Uint8Array; + path?: string; + height?: number; + prove?: boolean; + } = {}; + if (this.data != null) { + data.data = this.data; + } + if (this.path != null) { + data.path = this.path; + } + if (this.height != null) { + data.height = this.height; + } + if (this.prove != null) { + data.prove = this.prove; + } + 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.data.length) + writer.writeBytes(1, this.data); + if (this.path.length) + writer.writeString(2, this.path); + if (this.height != 0) + writer.writeInt64(3, this.height); + if (this.prove != false) + writer.writeBool(4, this.prove); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestQuery { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestQuery(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readBytes(); + break; + case 2: + message.path = reader.readString(); + break; + case 3: + message.height = reader.readInt64(); + break; + case 4: + message.prove = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestQuery { + return RequestQuery.deserialize(bytes); + } + } + export class RequestCheckTx extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx?: Uint8Array; + type?: CheckTxType; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + } + } + get tx() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set tx(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 2, CheckTxType.NEW) as CheckTxType; + } + set type(value: CheckTxType) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tx?: Uint8Array; + type?: CheckTxType; + }): RequestCheckTx { + const message = new RequestCheckTx({}); + if (data.tx != null) { + message.tx = data.tx; + } + if (data.type != null) { + message.type = data.type; + } + return message; + } + toObject() { + const data: { + tx?: Uint8Array; + type?: CheckTxType; + } = {}; + if (this.tx != null) { + data.tx = this.tx; + } + if (this.type != null) { + data.type = this.type; + } + 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.tx.length) + writer.writeBytes(1, this.tx); + if (this.type != CheckTxType.NEW) + writer.writeEnum(2, this.type); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestCheckTx { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestCheckTx(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tx = reader.readBytes(); + break; + case 2: + message.type = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestCheckTx { + return RequestCheckTx.deserialize(bytes); + } + } + export class RequestCommit 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: {}): RequestCommit { + const message = new RequestCommit({}); + 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): RequestCommit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestCommit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestCommit { + return RequestCommit.deserialize(bytes); + } + } + export class RequestListSnapshots 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: {}): RequestListSnapshots { + const message = new RequestListSnapshots({}); + 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): RequestListSnapshots { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestListSnapshots(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestListSnapshots { + return RequestListSnapshots.deserialize(bytes); + } + } + export class RequestOfferSnapshot extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + snapshot?: Snapshot; + app_hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("snapshot" in data && data.snapshot != undefined) { + this.snapshot = data.snapshot; + } + if ("app_hash" in data && data.app_hash != undefined) { + this.app_hash = data.app_hash; + } + } + } + get snapshot() { + return pb_1.Message.getWrapperField(this, Snapshot, 1) as Snapshot; + } + set snapshot(value: Snapshot) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_snapshot() { + return pb_1.Message.getField(this, 1) != null; + } + get app_hash() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set app_hash(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + snapshot?: ReturnType; + app_hash?: Uint8Array; + }): RequestOfferSnapshot { + const message = new RequestOfferSnapshot({}); + if (data.snapshot != null) { + message.snapshot = Snapshot.fromObject(data.snapshot); + } + if (data.app_hash != null) { + message.app_hash = data.app_hash; + } + return message; + } + toObject() { + const data: { + snapshot?: ReturnType; + app_hash?: Uint8Array; + } = {}; + if (this.snapshot != null) { + data.snapshot = this.snapshot.toObject(); + } + if (this.app_hash != null) { + data.app_hash = this.app_hash; + } + 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_snapshot) + writer.writeMessage(1, this.snapshot, () => this.snapshot.serialize(writer)); + if (this.app_hash.length) + writer.writeBytes(2, this.app_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestOfferSnapshot { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestOfferSnapshot(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.snapshot, () => message.snapshot = Snapshot.deserialize(reader)); + break; + case 2: + message.app_hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestOfferSnapshot { + return RequestOfferSnapshot.deserialize(bytes); + } + } + export class RequestLoadSnapshotChunk extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + format?: number; + chunk?: 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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("format" in data && data.format != undefined) { + this.format = data.format; + } + if ("chunk" in data && data.chunk != undefined) { + this.chunk = data.chunk; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get format() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set format(value: number) { + pb_1.Message.setField(this, 2, value); + } + get chunk() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set chunk(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + height?: number; + format?: number; + chunk?: number; + }): RequestLoadSnapshotChunk { + const message = new RequestLoadSnapshotChunk({}); + if (data.height != null) { + message.height = data.height; + } + if (data.format != null) { + message.format = data.format; + } + if (data.chunk != null) { + message.chunk = data.chunk; + } + return message; + } + toObject() { + const data: { + height?: number; + format?: number; + chunk?: number; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.format != null) { + data.format = this.format; + } + if (this.chunk != null) { + data.chunk = this.chunk; + } + 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.height != 0) + writer.writeUint64(1, this.height); + if (this.format != 0) + writer.writeUint32(2, this.format); + if (this.chunk != 0) + writer.writeUint32(3, this.chunk); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestLoadSnapshotChunk { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestLoadSnapshotChunk(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readUint64(); + break; + case 2: + message.format = reader.readUint32(); + break; + case 3: + message.chunk = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestLoadSnapshotChunk { + return RequestLoadSnapshotChunk.deserialize(bytes); + } + } + export class RequestApplySnapshotChunk extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + index?: number; + chunk?: Uint8Array; + sender?: 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 ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("chunk" in data && data.chunk != undefined) { + this.chunk = data.chunk; + } + if ("sender" in data && data.sender != undefined) { + this.sender = data.sender; + } + } + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 1, value); + } + get chunk() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set chunk(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get sender() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set sender(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + index?: number; + chunk?: Uint8Array; + sender?: string; + }): RequestApplySnapshotChunk { + const message = new RequestApplySnapshotChunk({}); + if (data.index != null) { + message.index = data.index; + } + if (data.chunk != null) { + message.chunk = data.chunk; + } + if (data.sender != null) { + message.sender = data.sender; + } + return message; + } + toObject() { + const data: { + index?: number; + chunk?: Uint8Array; + sender?: string; + } = {}; + if (this.index != null) { + data.index = this.index; + } + if (this.chunk != null) { + data.chunk = this.chunk; + } + if (this.sender != null) { + data.sender = this.sender; + } + 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.index != 0) + writer.writeUint32(1, this.index); + if (this.chunk.length) + writer.writeBytes(2, this.chunk); + if (this.sender.length) + writer.writeString(3, this.sender); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestApplySnapshotChunk { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestApplySnapshotChunk(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.index = reader.readUint32(); + break; + case 2: + message.chunk = reader.readBytes(); + break; + case 3: + message.sender = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestApplySnapshotChunk { + return RequestApplySnapshotChunk.deserialize(bytes); + } + } + export class RequestPrepareProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + max_tx_bytes?: number; + txs?: Uint8Array[]; + local_last_commit?: ExtendedCommitInfo; + misbehavior?: Misbehavior[]; + height?: number; + time?: dependency_5.google.protobuf.Timestamp; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("max_tx_bytes" in data && data.max_tx_bytes != undefined) { + this.max_tx_bytes = data.max_tx_bytes; + } + if ("txs" in data && data.txs != undefined) { + this.txs = data.txs; + } + if ("local_last_commit" in data && data.local_last_commit != undefined) { + this.local_last_commit = data.local_last_commit; + } + if ("misbehavior" in data && data.misbehavior != undefined) { + this.misbehavior = data.misbehavior; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("next_validators_hash" in data && data.next_validators_hash != undefined) { + this.next_validators_hash = data.next_validators_hash; + } + if ("proposer_address" in data && data.proposer_address != undefined) { + this.proposer_address = data.proposer_address; + } + } + } + get max_tx_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set max_tx_bytes(value: number) { + pb_1.Message.setField(this, 1, value); + } + get txs() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as Uint8Array[]; + } + set txs(value: Uint8Array[]) { + pb_1.Message.setField(this, 2, value); + } + get local_last_commit() { + return pb_1.Message.getWrapperField(this, ExtendedCommitInfo, 3) as ExtendedCommitInfo; + } + set local_last_commit(value: ExtendedCommitInfo) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_local_last_commit() { + return pb_1.Message.getField(this, 3) != null; + } + get misbehavior() { + return pb_1.Message.getRepeatedWrapperField(this, Misbehavior, 4) as Misbehavior[]; + } + set misbehavior(value: Misbehavior[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 5, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Timestamp, 6) as dependency_5.google.protobuf.Timestamp; + } + set time(value: dependency_5.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_time() { + return pb_1.Message.getField(this, 6) != null; + } + get next_validators_hash() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set next_validators_hash(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get proposer_address() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + set proposer_address(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + max_tx_bytes?: number; + txs?: Uint8Array[]; + local_last_commit?: ReturnType; + misbehavior?: ReturnType[]; + height?: number; + time?: ReturnType; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + }): RequestPrepareProposal { + const message = new RequestPrepareProposal({}); + if (data.max_tx_bytes != null) { + message.max_tx_bytes = data.max_tx_bytes; + } + if (data.txs != null) { + message.txs = data.txs; + } + if (data.local_last_commit != null) { + message.local_last_commit = ExtendedCommitInfo.fromObject(data.local_last_commit); + } + if (data.misbehavior != null) { + message.misbehavior = data.misbehavior.map(item => Misbehavior.fromObject(item)); + } + if (data.height != null) { + message.height = data.height; + } + if (data.time != null) { + message.time = dependency_5.google.protobuf.Timestamp.fromObject(data.time); + } + if (data.next_validators_hash != null) { + message.next_validators_hash = data.next_validators_hash; + } + if (data.proposer_address != null) { + message.proposer_address = data.proposer_address; + } + return message; + } + toObject() { + const data: { + max_tx_bytes?: number; + txs?: Uint8Array[]; + local_last_commit?: ReturnType; + misbehavior?: ReturnType[]; + height?: number; + time?: ReturnType; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + } = {}; + if (this.max_tx_bytes != null) { + data.max_tx_bytes = this.max_tx_bytes; + } + if (this.txs != null) { + data.txs = this.txs; + } + if (this.local_last_commit != null) { + data.local_last_commit = this.local_last_commit.toObject(); + } + if (this.misbehavior != null) { + data.misbehavior = this.misbehavior.map((item: Misbehavior) => item.toObject()); + } + if (this.height != null) { + data.height = this.height; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.next_validators_hash != null) { + data.next_validators_hash = this.next_validators_hash; + } + if (this.proposer_address != null) { + data.proposer_address = this.proposer_address; + } + 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.max_tx_bytes != 0) + writer.writeInt64(1, this.max_tx_bytes); + if (this.txs.length) + writer.writeRepeatedBytes(2, this.txs); + if (this.has_local_last_commit) + writer.writeMessage(3, this.local_last_commit, () => this.local_last_commit.serialize(writer)); + if (this.misbehavior.length) + writer.writeRepeatedMessage(4, this.misbehavior, (item: Misbehavior) => item.serialize(writer)); + if (this.height != 0) + writer.writeInt64(5, this.height); + if (this.has_time) + writer.writeMessage(6, this.time, () => this.time.serialize(writer)); + if (this.next_validators_hash.length) + writer.writeBytes(7, this.next_validators_hash); + if (this.proposer_address.length) + writer.writeBytes(8, this.proposer_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestPrepareProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestPrepareProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.max_tx_bytes = reader.readInt64(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readBytes()); + break; + case 3: + reader.readMessage(message.local_last_commit, () => message.local_last_commit = ExtendedCommitInfo.deserialize(reader)); + break; + case 4: + reader.readMessage(message.misbehavior, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Misbehavior.deserialize(reader), Misbehavior)); + break; + case 5: + message.height = reader.readInt64(); + break; + case 6: + reader.readMessage(message.time, () => message.time = dependency_5.google.protobuf.Timestamp.deserialize(reader)); + break; + case 7: + message.next_validators_hash = reader.readBytes(); + break; + case 8: + message.proposer_address = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestPrepareProposal { + return RequestPrepareProposal.deserialize(bytes); + } + } + export class RequestProcessProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + txs?: Uint8Array[]; + proposed_last_commit?: CommitInfo; + misbehavior?: Misbehavior[]; + hash?: Uint8Array; + height?: number; + time?: dependency_5.google.protobuf.Timestamp; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("txs" in data && data.txs != undefined) { + this.txs = data.txs; + } + if ("proposed_last_commit" in data && data.proposed_last_commit != undefined) { + this.proposed_last_commit = data.proposed_last_commit; + } + if ("misbehavior" in data && data.misbehavior != undefined) { + this.misbehavior = data.misbehavior; + } + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("next_validators_hash" in data && data.next_validators_hash != undefined) { + this.next_validators_hash = data.next_validators_hash; + } + if ("proposer_address" in data && data.proposer_address != undefined) { + this.proposer_address = data.proposer_address; + } + } + } + get txs() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as Uint8Array[]; + } + set txs(value: Uint8Array[]) { + pb_1.Message.setField(this, 1, value); + } + get proposed_last_commit() { + return pb_1.Message.getWrapperField(this, CommitInfo, 2) as CommitInfo; + } + set proposed_last_commit(value: CommitInfo) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_proposed_last_commit() { + return pb_1.Message.getField(this, 2) != null; + } + get misbehavior() { + return pb_1.Message.getRepeatedWrapperField(this, Misbehavior, 3) as Misbehavior[]; + } + set misbehavior(value: Misbehavior[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 5, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Timestamp, 6) as dependency_5.google.protobuf.Timestamp; + } + set time(value: dependency_5.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_time() { + return pb_1.Message.getField(this, 6) != null; + } + get next_validators_hash() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set next_validators_hash(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get proposer_address() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + set proposer_address(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + txs?: Uint8Array[]; + proposed_last_commit?: ReturnType; + misbehavior?: ReturnType[]; + hash?: Uint8Array; + height?: number; + time?: ReturnType; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + }): RequestProcessProposal { + const message = new RequestProcessProposal({}); + if (data.txs != null) { + message.txs = data.txs; + } + if (data.proposed_last_commit != null) { + message.proposed_last_commit = CommitInfo.fromObject(data.proposed_last_commit); + } + if (data.misbehavior != null) { + message.misbehavior = data.misbehavior.map(item => Misbehavior.fromObject(item)); + } + if (data.hash != null) { + message.hash = data.hash; + } + if (data.height != null) { + message.height = data.height; + } + if (data.time != null) { + message.time = dependency_5.google.protobuf.Timestamp.fromObject(data.time); + } + if (data.next_validators_hash != null) { + message.next_validators_hash = data.next_validators_hash; + } + if (data.proposer_address != null) { + message.proposer_address = data.proposer_address; + } + return message; + } + toObject() { + const data: { + txs?: Uint8Array[]; + proposed_last_commit?: ReturnType; + misbehavior?: ReturnType[]; + hash?: Uint8Array; + height?: number; + time?: ReturnType; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + } = {}; + if (this.txs != null) { + data.txs = this.txs; + } + if (this.proposed_last_commit != null) { + data.proposed_last_commit = this.proposed_last_commit.toObject(); + } + if (this.misbehavior != null) { + data.misbehavior = this.misbehavior.map((item: Misbehavior) => item.toObject()); + } + if (this.hash != null) { + data.hash = this.hash; + } + if (this.height != null) { + data.height = this.height; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.next_validators_hash != null) { + data.next_validators_hash = this.next_validators_hash; + } + if (this.proposer_address != null) { + data.proposer_address = this.proposer_address; + } + 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.txs.length) + writer.writeRepeatedBytes(1, this.txs); + if (this.has_proposed_last_commit) + writer.writeMessage(2, this.proposed_last_commit, () => this.proposed_last_commit.serialize(writer)); + if (this.misbehavior.length) + writer.writeRepeatedMessage(3, this.misbehavior, (item: Misbehavior) => item.serialize(writer)); + if (this.hash.length) + writer.writeBytes(4, this.hash); + if (this.height != 0) + writer.writeInt64(5, this.height); + if (this.has_time) + writer.writeMessage(6, this.time, () => this.time.serialize(writer)); + if (this.next_validators_hash.length) + writer.writeBytes(7, this.next_validators_hash); + if (this.proposer_address.length) + writer.writeBytes(8, this.proposer_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestProcessProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestProcessProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readBytes()); + break; + case 2: + reader.readMessage(message.proposed_last_commit, () => message.proposed_last_commit = CommitInfo.deserialize(reader)); + break; + case 3: + reader.readMessage(message.misbehavior, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Misbehavior.deserialize(reader), Misbehavior)); + break; + case 4: + message.hash = reader.readBytes(); + break; + case 5: + message.height = reader.readInt64(); + break; + case 6: + reader.readMessage(message.time, () => message.time = dependency_5.google.protobuf.Timestamp.deserialize(reader)); + break; + case 7: + message.next_validators_hash = reader.readBytes(); + break; + case 8: + message.proposer_address = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestProcessProposal { + return RequestProcessProposal.deserialize(bytes); + } + } + export class RequestExtendVote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: Uint8Array; + height?: number; + time?: dependency_5.google.protobuf.Timestamp; + txs?: Uint8Array[]; + proposed_last_commit?: CommitInfo; + misbehavior?: Misbehavior[]; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("txs" in data && data.txs != undefined) { + this.txs = data.txs; + } + if ("proposed_last_commit" in data && data.proposed_last_commit != undefined) { + this.proposed_last_commit = data.proposed_last_commit; + } + if ("misbehavior" in data && data.misbehavior != undefined) { + this.misbehavior = data.misbehavior; + } + if ("next_validators_hash" in data && data.next_validators_hash != undefined) { + this.next_validators_hash = data.next_validators_hash; + } + if ("proposer_address" in data && data.proposer_address != undefined) { + this.proposer_address = data.proposer_address; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Timestamp, 3) as dependency_5.google.protobuf.Timestamp; + } + set time(value: dependency_5.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_time() { + return pb_1.Message.getField(this, 3) != null; + } + get txs() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as Uint8Array[]; + } + set txs(value: Uint8Array[]) { + pb_1.Message.setField(this, 4, value); + } + get proposed_last_commit() { + return pb_1.Message.getWrapperField(this, CommitInfo, 5) as CommitInfo; + } + set proposed_last_commit(value: CommitInfo) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_proposed_last_commit() { + return pb_1.Message.getField(this, 5) != null; + } + get misbehavior() { + return pb_1.Message.getRepeatedWrapperField(this, Misbehavior, 6) as Misbehavior[]; + } + set misbehavior(value: Misbehavior[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get next_validators_hash() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set next_validators_hash(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get proposer_address() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + set proposer_address(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + hash?: Uint8Array; + height?: number; + time?: ReturnType; + txs?: Uint8Array[]; + proposed_last_commit?: ReturnType; + misbehavior?: ReturnType[]; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + }): RequestExtendVote { + const message = new RequestExtendVote({}); + if (data.hash != null) { + message.hash = data.hash; + } + if (data.height != null) { + message.height = data.height; + } + if (data.time != null) { + message.time = dependency_5.google.protobuf.Timestamp.fromObject(data.time); + } + if (data.txs != null) { + message.txs = data.txs; + } + if (data.proposed_last_commit != null) { + message.proposed_last_commit = CommitInfo.fromObject(data.proposed_last_commit); + } + if (data.misbehavior != null) { + message.misbehavior = data.misbehavior.map(item => Misbehavior.fromObject(item)); + } + if (data.next_validators_hash != null) { + message.next_validators_hash = data.next_validators_hash; + } + if (data.proposer_address != null) { + message.proposer_address = data.proposer_address; + } + return message; + } + toObject() { + const data: { + hash?: Uint8Array; + height?: number; + time?: ReturnType; + txs?: Uint8Array[]; + proposed_last_commit?: ReturnType; + misbehavior?: ReturnType[]; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + if (this.height != null) { + data.height = this.height; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.txs != null) { + data.txs = this.txs; + } + if (this.proposed_last_commit != null) { + data.proposed_last_commit = this.proposed_last_commit.toObject(); + } + if (this.misbehavior != null) { + data.misbehavior = this.misbehavior.map((item: Misbehavior) => item.toObject()); + } + if (this.next_validators_hash != null) { + data.next_validators_hash = this.next_validators_hash; + } + if (this.proposer_address != null) { + data.proposer_address = this.proposer_address; + } + 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.hash.length) + writer.writeBytes(1, this.hash); + if (this.height != 0) + writer.writeInt64(2, this.height); + if (this.has_time) + writer.writeMessage(3, this.time, () => this.time.serialize(writer)); + if (this.txs.length) + writer.writeRepeatedBytes(4, this.txs); + if (this.has_proposed_last_commit) + writer.writeMessage(5, this.proposed_last_commit, () => this.proposed_last_commit.serialize(writer)); + if (this.misbehavior.length) + writer.writeRepeatedMessage(6, this.misbehavior, (item: Misbehavior) => item.serialize(writer)); + if (this.next_validators_hash.length) + writer.writeBytes(7, this.next_validators_hash); + if (this.proposer_address.length) + writer.writeBytes(8, this.proposer_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestExtendVote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestExtendVote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hash = reader.readBytes(); + break; + case 2: + message.height = reader.readInt64(); + break; + case 3: + reader.readMessage(message.time, () => message.time = dependency_5.google.protobuf.Timestamp.deserialize(reader)); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readBytes()); + break; + case 5: + reader.readMessage(message.proposed_last_commit, () => message.proposed_last_commit = CommitInfo.deserialize(reader)); + break; + case 6: + reader.readMessage(message.misbehavior, () => pb_1.Message.addToRepeatedWrapperField(message, 6, Misbehavior.deserialize(reader), Misbehavior)); + break; + case 7: + message.next_validators_hash = reader.readBytes(); + break; + case 8: + message.proposer_address = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestExtendVote { + return RequestExtendVote.deserialize(bytes); + } + } + export class RequestVerifyVoteExtension extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: Uint8Array; + validator_address?: Uint8Array; + height?: number; + vote_extension?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("vote_extension" in data && data.vote_extension != undefined) { + this.vote_extension = data.vote_extension; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set validator_address(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get vote_extension() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set vote_extension(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + hash?: Uint8Array; + validator_address?: Uint8Array; + height?: number; + vote_extension?: Uint8Array; + }): RequestVerifyVoteExtension { + const message = new RequestVerifyVoteExtension({}); + if (data.hash != null) { + message.hash = data.hash; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.height != null) { + message.height = data.height; + } + if (data.vote_extension != null) { + message.vote_extension = data.vote_extension; + } + return message; + } + toObject() { + const data: { + hash?: Uint8Array; + validator_address?: Uint8Array; + height?: number; + vote_extension?: Uint8Array; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.height != null) { + data.height = this.height; + } + if (this.vote_extension != null) { + data.vote_extension = this.vote_extension; + } + 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.hash.length) + writer.writeBytes(1, this.hash); + if (this.validator_address.length) + writer.writeBytes(2, this.validator_address); + if (this.height != 0) + writer.writeInt64(3, this.height); + if (this.vote_extension.length) + writer.writeBytes(4, this.vote_extension); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestVerifyVoteExtension { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestVerifyVoteExtension(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hash = reader.readBytes(); + break; + case 2: + message.validator_address = reader.readBytes(); + break; + case 3: + message.height = reader.readInt64(); + break; + case 4: + message.vote_extension = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestVerifyVoteExtension { + return RequestVerifyVoteExtension.deserialize(bytes); + } + } + export class RequestFinalizeBlock extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + txs?: Uint8Array[]; + decided_last_commit?: CommitInfo; + misbehavior?: Misbehavior[]; + hash?: Uint8Array; + height?: number; + time?: dependency_5.google.protobuf.Timestamp; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("txs" in data && data.txs != undefined) { + this.txs = data.txs; + } + if ("decided_last_commit" in data && data.decided_last_commit != undefined) { + this.decided_last_commit = data.decided_last_commit; + } + if ("misbehavior" in data && data.misbehavior != undefined) { + this.misbehavior = data.misbehavior; + } + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("next_validators_hash" in data && data.next_validators_hash != undefined) { + this.next_validators_hash = data.next_validators_hash; + } + if ("proposer_address" in data && data.proposer_address != undefined) { + this.proposer_address = data.proposer_address; + } + } + } + get txs() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as Uint8Array[]; + } + set txs(value: Uint8Array[]) { + pb_1.Message.setField(this, 1, value); + } + get decided_last_commit() { + return pb_1.Message.getWrapperField(this, CommitInfo, 2) as CommitInfo; + } + set decided_last_commit(value: CommitInfo) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_decided_last_commit() { + return pb_1.Message.getField(this, 2) != null; + } + get misbehavior() { + return pb_1.Message.getRepeatedWrapperField(this, Misbehavior, 3) as Misbehavior[]; + } + set misbehavior(value: Misbehavior[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 5, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Timestamp, 6) as dependency_5.google.protobuf.Timestamp; + } + set time(value: dependency_5.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_time() { + return pb_1.Message.getField(this, 6) != null; + } + get next_validators_hash() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set next_validators_hash(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get proposer_address() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + set proposer_address(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + txs?: Uint8Array[]; + decided_last_commit?: ReturnType; + misbehavior?: ReturnType[]; + hash?: Uint8Array; + height?: number; + time?: ReturnType; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + }): RequestFinalizeBlock { + const message = new RequestFinalizeBlock({}); + if (data.txs != null) { + message.txs = data.txs; + } + if (data.decided_last_commit != null) { + message.decided_last_commit = CommitInfo.fromObject(data.decided_last_commit); + } + if (data.misbehavior != null) { + message.misbehavior = data.misbehavior.map(item => Misbehavior.fromObject(item)); + } + if (data.hash != null) { + message.hash = data.hash; + } + if (data.height != null) { + message.height = data.height; + } + if (data.time != null) { + message.time = dependency_5.google.protobuf.Timestamp.fromObject(data.time); + } + if (data.next_validators_hash != null) { + message.next_validators_hash = data.next_validators_hash; + } + if (data.proposer_address != null) { + message.proposer_address = data.proposer_address; + } + return message; + } + toObject() { + const data: { + txs?: Uint8Array[]; + decided_last_commit?: ReturnType; + misbehavior?: ReturnType[]; + hash?: Uint8Array; + height?: number; + time?: ReturnType; + next_validators_hash?: Uint8Array; + proposer_address?: Uint8Array; + } = {}; + if (this.txs != null) { + data.txs = this.txs; + } + if (this.decided_last_commit != null) { + data.decided_last_commit = this.decided_last_commit.toObject(); + } + if (this.misbehavior != null) { + data.misbehavior = this.misbehavior.map((item: Misbehavior) => item.toObject()); + } + if (this.hash != null) { + data.hash = this.hash; + } + if (this.height != null) { + data.height = this.height; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.next_validators_hash != null) { + data.next_validators_hash = this.next_validators_hash; + } + if (this.proposer_address != null) { + data.proposer_address = this.proposer_address; + } + 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.txs.length) + writer.writeRepeatedBytes(1, this.txs); + if (this.has_decided_last_commit) + writer.writeMessage(2, this.decided_last_commit, () => this.decided_last_commit.serialize(writer)); + if (this.misbehavior.length) + writer.writeRepeatedMessage(3, this.misbehavior, (item: Misbehavior) => item.serialize(writer)); + if (this.hash.length) + writer.writeBytes(4, this.hash); + if (this.height != 0) + writer.writeInt64(5, this.height); + if (this.has_time) + writer.writeMessage(6, this.time, () => this.time.serialize(writer)); + if (this.next_validators_hash.length) + writer.writeBytes(7, this.next_validators_hash); + if (this.proposer_address.length) + writer.writeBytes(8, this.proposer_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestFinalizeBlock { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestFinalizeBlock(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readBytes()); + break; + case 2: + reader.readMessage(message.decided_last_commit, () => message.decided_last_commit = CommitInfo.deserialize(reader)); + break; + case 3: + reader.readMessage(message.misbehavior, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Misbehavior.deserialize(reader), Misbehavior)); + break; + case 4: + message.hash = reader.readBytes(); + break; + case 5: + message.height = reader.readInt64(); + break; + case 6: + reader.readMessage(message.time, () => message.time = dependency_5.google.protobuf.Timestamp.deserialize(reader)); + break; + case 7: + message.next_validators_hash = reader.readBytes(); + break; + case 8: + message.proposer_address = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RequestFinalizeBlock { + return RequestFinalizeBlock.deserialize(bytes); + } + } + export class Response extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2, 3, 4, 6, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]]; + constructor(data?: any[] | ({} & (({ + exception?: ResponseException; + 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?: never; + } | { + exception?: never; + echo?: ResponseEcho; + 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; + } | { + exception?: never; + echo?: never; + flush?: ResponseFlush; + 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; + } | { + exception?: never; + echo?: never; + flush?: never; + info?: ResponseInfo; + 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; + } | { + exception?: never; + echo?: never; + flush?: never; + info?: never; + init_chain?: ResponseInitChain; + 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; + } | { + exception?: never; + echo?: never; + flush?: never; + info?: never; + init_chain?: never; + query?: ResponseQuery; + 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; + } | { + exception?: never; + echo?: never; + flush?: never; + info?: never; + init_chain?: never; + query?: never; + check_tx?: ResponseCheckTx; + 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; + } | { + exception?: never; + echo?: never; + flush?: never; + info?: never; + init_chain?: never; + query?: never; + check_tx?: never; + commit?: ResponseCommit; + 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; + } | { + exception?: never; + echo?: never; + flush?: never; + info?: never; + init_chain?: never; + query?: never; + check_tx?: never; + commit?: never; + list_snapshots?: ResponseListSnapshots; + 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; + } | { + exception?: never; + echo?: never; + flush?: never; + info?: never; + init_chain?: never; + query?: never; + check_tx?: never; + commit?: never; + list_snapshots?: never; + offer_snapshot?: ResponseOfferSnapshot; + load_snapshot_chunk?: never; + apply_snapshot_chunk?: never; + prepare_proposal?: never; + process_proposal?: never; + extend_vote?: never; + verify_vote_extension?: never; + finalize_block?: never; + } | { + exception?: 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?: ResponseLoadSnapshotChunk; + apply_snapshot_chunk?: never; + prepare_proposal?: never; + process_proposal?: never; + extend_vote?: never; + verify_vote_extension?: never; + finalize_block?: never; + } | { + exception?: 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?: ResponseApplySnapshotChunk; + prepare_proposal?: never; + process_proposal?: never; + extend_vote?: never; + verify_vote_extension?: never; + finalize_block?: never; + } | { + exception?: 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?: ResponsePrepareProposal; + process_proposal?: never; + extend_vote?: never; + verify_vote_extension?: never; + finalize_block?: never; + } | { + exception?: 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?: ResponseProcessProposal; + extend_vote?: never; + verify_vote_extension?: never; + finalize_block?: never; + } | { + exception?: 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?: ResponseExtendVote; + verify_vote_extension?: never; + finalize_block?: never; + } | { + exception?: 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?: ResponseVerifyVoteExtension; + finalize_block?: never; + } | { + exception?: 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?: ResponseFinalizeBlock; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("exception" in data && data.exception != undefined) { + this.exception = data.exception; + } + 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 exception() { + return pb_1.Message.getWrapperField(this, ResponseException, 1) as ResponseException; + } + set exception(value: ResponseException) { + pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); + } + get has_exception() { + return pb_1.Message.getField(this, 1) != null; + } + get echo() { + return pb_1.Message.getWrapperField(this, ResponseEcho, 2) as ResponseEcho; + } + set echo(value: ResponseEcho) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_echo() { + return pb_1.Message.getField(this, 2) != null; + } + get flush() { + return pb_1.Message.getWrapperField(this, ResponseFlush, 3) as ResponseFlush; + } + set flush(value: ResponseFlush) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_flush() { + return pb_1.Message.getField(this, 3) != null; + } + get info() { + return pb_1.Message.getWrapperField(this, ResponseInfo, 4) as ResponseInfo; + } + set info(value: ResponseInfo) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_info() { + return pb_1.Message.getField(this, 4) != null; + } + get init_chain() { + return pb_1.Message.getWrapperField(this, ResponseInitChain, 6) as ResponseInitChain; + } + set init_chain(value: ResponseInitChain) { + pb_1.Message.setOneofWrapperField(this, 6, this.#one_of_decls[0], value); + } + get has_init_chain() { + return pb_1.Message.getField(this, 6) != null; + } + get query() { + return pb_1.Message.getWrapperField(this, ResponseQuery, 7) as ResponseQuery; + } + set query(value: ResponseQuery) { + pb_1.Message.setOneofWrapperField(this, 7, this.#one_of_decls[0], value); + } + get has_query() { + return pb_1.Message.getField(this, 7) != null; + } + get check_tx() { + return pb_1.Message.getWrapperField(this, ResponseCheckTx, 9) as ResponseCheckTx; + } + set check_tx(value: ResponseCheckTx) { + pb_1.Message.setOneofWrapperField(this, 9, this.#one_of_decls[0], value); + } + get has_check_tx() { + return pb_1.Message.getField(this, 9) != null; + } + get commit() { + return pb_1.Message.getWrapperField(this, ResponseCommit, 12) as ResponseCommit; + } + set commit(value: ResponseCommit) { + pb_1.Message.setOneofWrapperField(this, 12, this.#one_of_decls[0], value); + } + get has_commit() { + return pb_1.Message.getField(this, 12) != null; + } + get list_snapshots() { + return pb_1.Message.getWrapperField(this, ResponseListSnapshots, 13) as ResponseListSnapshots; + } + set list_snapshots(value: ResponseListSnapshots) { + pb_1.Message.setOneofWrapperField(this, 13, this.#one_of_decls[0], value); + } + get has_list_snapshots() { + return pb_1.Message.getField(this, 13) != null; + } + get offer_snapshot() { + return pb_1.Message.getWrapperField(this, ResponseOfferSnapshot, 14) as ResponseOfferSnapshot; + } + set offer_snapshot(value: ResponseOfferSnapshot) { + pb_1.Message.setOneofWrapperField(this, 14, this.#one_of_decls[0], value); + } + get has_offer_snapshot() { + return pb_1.Message.getField(this, 14) != null; + } + get load_snapshot_chunk() { + return pb_1.Message.getWrapperField(this, ResponseLoadSnapshotChunk, 15) as ResponseLoadSnapshotChunk; + } + set load_snapshot_chunk(value: ResponseLoadSnapshotChunk) { + pb_1.Message.setOneofWrapperField(this, 15, this.#one_of_decls[0], value); + } + get has_load_snapshot_chunk() { + return pb_1.Message.getField(this, 15) != null; + } + get apply_snapshot_chunk() { + return pb_1.Message.getWrapperField(this, ResponseApplySnapshotChunk, 16) as ResponseApplySnapshotChunk; + } + set apply_snapshot_chunk(value: ResponseApplySnapshotChunk) { + pb_1.Message.setOneofWrapperField(this, 16, this.#one_of_decls[0], value); + } + get has_apply_snapshot_chunk() { + return pb_1.Message.getField(this, 16) != null; + } + get prepare_proposal() { + return pb_1.Message.getWrapperField(this, ResponsePrepareProposal, 17) as ResponsePrepareProposal; + } + set prepare_proposal(value: ResponsePrepareProposal) { + pb_1.Message.setOneofWrapperField(this, 17, this.#one_of_decls[0], value); + } + get has_prepare_proposal() { + return pb_1.Message.getField(this, 17) != null; + } + get process_proposal() { + return pb_1.Message.getWrapperField(this, ResponseProcessProposal, 18) as ResponseProcessProposal; + } + set process_proposal(value: ResponseProcessProposal) { + pb_1.Message.setOneofWrapperField(this, 18, this.#one_of_decls[0], value); + } + get has_process_proposal() { + return pb_1.Message.getField(this, 18) != null; + } + get extend_vote() { + return pb_1.Message.getWrapperField(this, ResponseExtendVote, 19) as ResponseExtendVote; + } + set extend_vote(value: ResponseExtendVote) { + pb_1.Message.setOneofWrapperField(this, 19, this.#one_of_decls[0], value); + } + get has_extend_vote() { + return pb_1.Message.getField(this, 19) != null; + } + get verify_vote_extension() { + return pb_1.Message.getWrapperField(this, ResponseVerifyVoteExtension, 20) as ResponseVerifyVoteExtension; + } + set verify_vote_extension(value: ResponseVerifyVoteExtension) { + pb_1.Message.setOneofWrapperField(this, 20, this.#one_of_decls[0], value); + } + get has_verify_vote_extension() { + return pb_1.Message.getField(this, 20) != null; + } + get finalize_block() { + return pb_1.Message.getWrapperField(this, ResponseFinalizeBlock, 21) as ResponseFinalizeBlock; + } + set finalize_block(value: ResponseFinalizeBlock) { + pb_1.Message.setOneofWrapperField(this, 21, this.#one_of_decls[0], value); + } + get has_finalize_block() { + return pb_1.Message.getField(this, 21) != null; + } + get value() { + const cases: { + [index: number]: "none" | "exception" | "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: "exception", + 2: "echo", + 3: "flush", + 4: "info", + 6: "init_chain", + 7: "query", + 9: "check_tx", + 12: "commit", + 13: "list_snapshots", + 14: "offer_snapshot", + 15: "load_snapshot_chunk", + 16: "apply_snapshot_chunk", + 17: "prepare_proposal", + 18: "process_proposal", + 19: "extend_vote", + 20: "verify_vote_extension", + 21: "finalize_block" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4, 6, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21])]; + } + static fromObject(data: { + exception?: ReturnType; + echo?: ReturnType; + flush?: ReturnType; + info?: ReturnType; + init_chain?: ReturnType; + query?: ReturnType; + check_tx?: ReturnType; + commit?: ReturnType; + list_snapshots?: ReturnType; + offer_snapshot?: ReturnType; + load_snapshot_chunk?: ReturnType; + apply_snapshot_chunk?: ReturnType; + prepare_proposal?: ReturnType; + process_proposal?: ReturnType; + extend_vote?: ReturnType; + verify_vote_extension?: ReturnType; + finalize_block?: ReturnType; + }): Response { + const message = new Response({}); + if (data.exception != null) { + message.exception = ResponseException.fromObject(data.exception); + } + if (data.echo != null) { + message.echo = ResponseEcho.fromObject(data.echo); + } + if (data.flush != null) { + message.flush = ResponseFlush.fromObject(data.flush); + } + if (data.info != null) { + message.info = ResponseInfo.fromObject(data.info); + } + if (data.init_chain != null) { + message.init_chain = ResponseInitChain.fromObject(data.init_chain); + } + if (data.query != null) { + message.query = ResponseQuery.fromObject(data.query); + } + if (data.check_tx != null) { + message.check_tx = ResponseCheckTx.fromObject(data.check_tx); + } + if (data.commit != null) { + message.commit = ResponseCommit.fromObject(data.commit); + } + if (data.list_snapshots != null) { + message.list_snapshots = ResponseListSnapshots.fromObject(data.list_snapshots); + } + if (data.offer_snapshot != null) { + message.offer_snapshot = ResponseOfferSnapshot.fromObject(data.offer_snapshot); + } + if (data.load_snapshot_chunk != null) { + message.load_snapshot_chunk = ResponseLoadSnapshotChunk.fromObject(data.load_snapshot_chunk); + } + if (data.apply_snapshot_chunk != null) { + message.apply_snapshot_chunk = ResponseApplySnapshotChunk.fromObject(data.apply_snapshot_chunk); + } + if (data.prepare_proposal != null) { + message.prepare_proposal = ResponsePrepareProposal.fromObject(data.prepare_proposal); + } + if (data.process_proposal != null) { + message.process_proposal = ResponseProcessProposal.fromObject(data.process_proposal); + } + if (data.extend_vote != null) { + message.extend_vote = ResponseExtendVote.fromObject(data.extend_vote); + } + if (data.verify_vote_extension != null) { + message.verify_vote_extension = ResponseVerifyVoteExtension.fromObject(data.verify_vote_extension); + } + if (data.finalize_block != null) { + message.finalize_block = ResponseFinalizeBlock.fromObject(data.finalize_block); + } + return message; + } + toObject() { + const data: { + exception?: ReturnType; + echo?: ReturnType; + flush?: ReturnType; + info?: ReturnType; + init_chain?: ReturnType; + query?: ReturnType; + check_tx?: ReturnType; + commit?: ReturnType; + list_snapshots?: ReturnType; + offer_snapshot?: ReturnType; + load_snapshot_chunk?: ReturnType; + apply_snapshot_chunk?: ReturnType; + prepare_proposal?: ReturnType; + process_proposal?: ReturnType; + extend_vote?: ReturnType; + verify_vote_extension?: ReturnType; + finalize_block?: ReturnType; + } = {}; + if (this.exception != null) { + data.exception = this.exception.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_exception) + writer.writeMessage(1, this.exception, () => this.exception.serialize(writer)); + if (this.has_echo) + writer.writeMessage(2, this.echo, () => this.echo.serialize(writer)); + if (this.has_flush) + writer.writeMessage(3, this.flush, () => this.flush.serialize(writer)); + if (this.has_info) + writer.writeMessage(4, this.info, () => this.info.serialize(writer)); + if (this.has_init_chain) + writer.writeMessage(6, this.init_chain, () => this.init_chain.serialize(writer)); + if (this.has_query) + writer.writeMessage(7, this.query, () => this.query.serialize(writer)); + if (this.has_check_tx) + writer.writeMessage(9, this.check_tx, () => this.check_tx.serialize(writer)); + if (this.has_commit) + writer.writeMessage(12, this.commit, () => this.commit.serialize(writer)); + if (this.has_list_snapshots) + writer.writeMessage(13, this.list_snapshots, () => this.list_snapshots.serialize(writer)); + if (this.has_offer_snapshot) + writer.writeMessage(14, this.offer_snapshot, () => this.offer_snapshot.serialize(writer)); + if (this.has_load_snapshot_chunk) + writer.writeMessage(15, this.load_snapshot_chunk, () => this.load_snapshot_chunk.serialize(writer)); + if (this.has_apply_snapshot_chunk) + writer.writeMessage(16, this.apply_snapshot_chunk, () => this.apply_snapshot_chunk.serialize(writer)); + if (this.has_prepare_proposal) + writer.writeMessage(17, this.prepare_proposal, () => this.prepare_proposal.serialize(writer)); + if (this.has_process_proposal) + writer.writeMessage(18, this.process_proposal, () => this.process_proposal.serialize(writer)); + if (this.has_extend_vote) + writer.writeMessage(19, this.extend_vote, () => this.extend_vote.serialize(writer)); + if (this.has_verify_vote_extension) + writer.writeMessage(20, this.verify_vote_extension, () => this.verify_vote_extension.serialize(writer)); + if (this.has_finalize_block) + writer.writeMessage(21, this.finalize_block, () => this.finalize_block.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Response { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Response(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.exception, () => message.exception = ResponseException.deserialize(reader)); + break; + case 2: + reader.readMessage(message.echo, () => message.echo = ResponseEcho.deserialize(reader)); + break; + case 3: + reader.readMessage(message.flush, () => message.flush = ResponseFlush.deserialize(reader)); + break; + case 4: + reader.readMessage(message.info, () => message.info = ResponseInfo.deserialize(reader)); + break; + case 6: + reader.readMessage(message.init_chain, () => message.init_chain = ResponseInitChain.deserialize(reader)); + break; + case 7: + reader.readMessage(message.query, () => message.query = ResponseQuery.deserialize(reader)); + break; + case 9: + reader.readMessage(message.check_tx, () => message.check_tx = ResponseCheckTx.deserialize(reader)); + break; + case 12: + reader.readMessage(message.commit, () => message.commit = ResponseCommit.deserialize(reader)); + break; + case 13: + reader.readMessage(message.list_snapshots, () => message.list_snapshots = ResponseListSnapshots.deserialize(reader)); + break; + case 14: + reader.readMessage(message.offer_snapshot, () => message.offer_snapshot = ResponseOfferSnapshot.deserialize(reader)); + break; + case 15: + reader.readMessage(message.load_snapshot_chunk, () => message.load_snapshot_chunk = ResponseLoadSnapshotChunk.deserialize(reader)); + break; + case 16: + reader.readMessage(message.apply_snapshot_chunk, () => message.apply_snapshot_chunk = ResponseApplySnapshotChunk.deserialize(reader)); + break; + case 17: + reader.readMessage(message.prepare_proposal, () => message.prepare_proposal = ResponsePrepareProposal.deserialize(reader)); + break; + case 18: + reader.readMessage(message.process_proposal, () => message.process_proposal = ResponseProcessProposal.deserialize(reader)); + break; + case 19: + reader.readMessage(message.extend_vote, () => message.extend_vote = ResponseExtendVote.deserialize(reader)); + break; + case 20: + reader.readMessage(message.verify_vote_extension, () => message.verify_vote_extension = ResponseVerifyVoteExtension.deserialize(reader)); + break; + case 21: + reader.readMessage(message.finalize_block, () => message.finalize_block = ResponseFinalizeBlock.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Response { + return Response.deserialize(bytes); + } + } + export class ResponseException extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + error?: 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 ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get error() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set error(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + error?: string; + }): ResponseException { + const message = new ResponseException({}); + if (data.error != null) { + message.error = data.error; + } + return message; + } + toObject() { + const data: { + error?: string; + } = {}; + if (this.error != null) { + data.error = this.error; + } + 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.error.length) + writer.writeString(1, this.error); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseException { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseException(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.error = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseException { + return ResponseException.deserialize(bytes); + } + } + export class ResponseEcho 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; + }): ResponseEcho { + const message = new ResponseEcho({}); + 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): ResponseEcho { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseEcho(); + 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): ResponseEcho { + return ResponseEcho.deserialize(bytes); + } + } + export class ResponseFlush 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: {}): ResponseFlush { + const message = new ResponseFlush({}); + 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): ResponseFlush { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseFlush(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseFlush { + return ResponseFlush.deserialize(bytes); + } + } + export class ResponseInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: string; + version?: string; + app_version?: number; + last_block_height?: number; + last_block_app_hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("app_version" in data && data.app_version != undefined) { + this.app_version = data.app_version; + } + if ("last_block_height" in data && data.last_block_height != undefined) { + this.last_block_height = data.last_block_height; + } + if ("last_block_app_hash" in data && data.last_block_app_hash != undefined) { + this.last_block_app_hash = data.last_block_app_hash; + } + } + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set data(value: string) { + pb_1.Message.setField(this, 1, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 2, value); + } + get app_version() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set app_version(value: number) { + pb_1.Message.setField(this, 3, value); + } + get last_block_height() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set last_block_height(value: number) { + pb_1.Message.setField(this, 4, value); + } + get last_block_app_hash() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set last_block_app_hash(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + data?: string; + version?: string; + app_version?: number; + last_block_height?: number; + last_block_app_hash?: Uint8Array; + }): ResponseInfo { + const message = new ResponseInfo({}); + if (data.data != null) { + message.data = data.data; + } + if (data.version != null) { + message.version = data.version; + } + if (data.app_version != null) { + message.app_version = data.app_version; + } + if (data.last_block_height != null) { + message.last_block_height = data.last_block_height; + } + if (data.last_block_app_hash != null) { + message.last_block_app_hash = data.last_block_app_hash; + } + return message; + } + toObject() { + const data: { + data?: string; + version?: string; + app_version?: number; + last_block_height?: number; + last_block_app_hash?: Uint8Array; + } = {}; + if (this.data != null) { + data.data = this.data; + } + if (this.version != null) { + data.version = this.version; + } + if (this.app_version != null) { + data.app_version = this.app_version; + } + if (this.last_block_height != null) { + data.last_block_height = this.last_block_height; + } + if (this.last_block_app_hash != null) { + data.last_block_app_hash = this.last_block_app_hash; + } + 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.data.length) + writer.writeString(1, this.data); + if (this.version.length) + writer.writeString(2, this.version); + if (this.app_version != 0) + writer.writeUint64(3, this.app_version); + if (this.last_block_height != 0) + writer.writeInt64(4, this.last_block_height); + if (this.last_block_app_hash.length) + writer.writeBytes(5, this.last_block_app_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readString(); + break; + case 2: + message.version = reader.readString(); + break; + case 3: + message.app_version = reader.readUint64(); + break; + case 4: + message.last_block_height = reader.readInt64(); + break; + case 5: + message.last_block_app_hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseInfo { + return ResponseInfo.deserialize(bytes); + } + } + export class ResponseInitChain extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + consensus_params?: dependency_3.tendermint.types.ConsensusParams; + validators?: ValidatorUpdate[]; + app_hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + 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_hash" in data && data.app_hash != undefined) { + this.app_hash = data.app_hash; + } + } + } + get consensus_params() { + return pb_1.Message.getWrapperField(this, dependency_3.tendermint.types.ConsensusParams, 1) as dependency_3.tendermint.types.ConsensusParams; + } + set consensus_params(value: dependency_3.tendermint.types.ConsensusParams) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_consensus_params() { + return pb_1.Message.getField(this, 1) != null; + } + get validators() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorUpdate, 2) as ValidatorUpdate[]; + } + set validators(value: ValidatorUpdate[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get app_hash() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set app_hash(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + consensus_params?: ReturnType; + validators?: ReturnType[]; + app_hash?: Uint8Array; + }): ResponseInitChain { + const message = new ResponseInitChain({}); + 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_hash != null) { + message.app_hash = data.app_hash; + } + return message; + } + toObject() { + const data: { + consensus_params?: ReturnType; + validators?: ReturnType[]; + app_hash?: Uint8Array; + } = {}; + 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_hash != null) { + data.app_hash = this.app_hash; + } + 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_params) + writer.writeMessage(1, this.consensus_params, () => this.consensus_params.serialize(writer)); + if (this.validators.length) + writer.writeRepeatedMessage(2, this.validators, (item: ValidatorUpdate) => item.serialize(writer)); + if (this.app_hash.length) + writer.writeBytes(3, this.app_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseInitChain { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseInitChain(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.consensus_params, () => message.consensus_params = dependency_3.tendermint.types.ConsensusParams.deserialize(reader)); + break; + case 2: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ValidatorUpdate.deserialize(reader), ValidatorUpdate)); + break; + case 3: + message.app_hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseInitChain { + return ResponseInitChain.deserialize(bytes); + } + } + export class ResponseQuery extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + log?: string; + info?: string; + index?: number; + key?: Uint8Array; + value?: Uint8Array; + proof_ops?: dependency_1.tendermint.crypto.ProofOps; + height?: number; + codespace?: 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 ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("log" in data && data.log != undefined) { + this.log = data.log; + } + if ("info" in data && data.info != undefined) { + this.info = data.info; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("proof_ops" in data && data.proof_ops != undefined) { + this.proof_ops = data.proof_ops; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("codespace" in data && data.codespace != undefined) { + this.codespace = data.codespace; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get log() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set log(value: string) { + pb_1.Message.setField(this, 3, value); + } + get info() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set info(value: string) { + pb_1.Message.setField(this, 4, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 5, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get proof_ops() { + return pb_1.Message.getWrapperField(this, dependency_1.tendermint.crypto.ProofOps, 8) as dependency_1.tendermint.crypto.ProofOps; + } + set proof_ops(value: dependency_1.tendermint.crypto.ProofOps) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_proof_ops() { + return pb_1.Message.getField(this, 8) != null; + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 9, value); + } + get codespace() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set codespace(value: string) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + code?: number; + log?: string; + info?: string; + index?: number; + key?: Uint8Array; + value?: Uint8Array; + proof_ops?: ReturnType; + height?: number; + codespace?: string; + }): ResponseQuery { + const message = new ResponseQuery({}); + if (data.code != null) { + message.code = data.code; + } + if (data.log != null) { + message.log = data.log; + } + if (data.info != null) { + message.info = data.info; + } + if (data.index != null) { + message.index = data.index; + } + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + if (data.proof_ops != null) { + message.proof_ops = dependency_1.tendermint.crypto.ProofOps.fromObject(data.proof_ops); + } + if (data.height != null) { + message.height = data.height; + } + if (data.codespace != null) { + message.codespace = data.codespace; + } + return message; + } + toObject() { + const data: { + code?: number; + log?: string; + info?: string; + index?: number; + key?: Uint8Array; + value?: Uint8Array; + proof_ops?: ReturnType; + height?: number; + codespace?: string; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.log != null) { + data.log = this.log; + } + if (this.info != null) { + data.info = this.info; + } + if (this.index != null) { + data.index = this.index; + } + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + if (this.proof_ops != null) { + data.proof_ops = this.proof_ops.toObject(); + } + if (this.height != null) { + data.height = this.height; + } + if (this.codespace != null) { + data.codespace = this.codespace; + } + 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.code != 0) + writer.writeUint32(1, this.code); + if (this.log.length) + writer.writeString(3, this.log); + if (this.info.length) + writer.writeString(4, this.info); + if (this.index != 0) + writer.writeInt64(5, this.index); + if (this.key.length) + writer.writeBytes(6, this.key); + if (this.value.length) + writer.writeBytes(7, this.value); + if (this.has_proof_ops) + writer.writeMessage(8, this.proof_ops, () => this.proof_ops.serialize(writer)); + if (this.height != 0) + writer.writeInt64(9, this.height); + if (this.codespace.length) + writer.writeString(10, this.codespace); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseQuery { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseQuery(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readUint32(); + break; + case 3: + message.log = reader.readString(); + break; + case 4: + message.info = reader.readString(); + break; + case 5: + message.index = reader.readInt64(); + break; + case 6: + message.key = reader.readBytes(); + break; + case 7: + message.value = reader.readBytes(); + break; + case 8: + reader.readMessage(message.proof_ops, () => message.proof_ops = dependency_1.tendermint.crypto.ProofOps.deserialize(reader)); + break; + case 9: + message.height = reader.readInt64(); + break; + case 10: + message.codespace = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseQuery { + return ResponseQuery.deserialize(bytes); + } + } + export class ResponseCheckTx extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + data?: Uint8Array; + log?: string; + info?: string; + gas_wanted?: number; + gas_used?: number; + events?: Event[]; + codespace?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("log" in data && data.log != undefined) { + this.log = data.log; + } + if ("info" in data && data.info != undefined) { + this.info = data.info; + } + if ("gas_wanted" in data && data.gas_wanted != undefined) { + this.gas_wanted = data.gas_wanted; + } + if ("gas_used" in data && data.gas_used != undefined) { + this.gas_used = data.gas_used; + } + if ("events" in data && data.events != undefined) { + this.events = data.events; + } + if ("codespace" in data && data.codespace != undefined) { + this.codespace = data.codespace; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get log() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set log(value: string) { + pb_1.Message.setField(this, 3, value); + } + get info() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set info(value: string) { + pb_1.Message.setField(this, 4, value); + } + get gas_wanted() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set gas_wanted(value: number) { + pb_1.Message.setField(this, 5, value); + } + get gas_used() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set gas_used(value: number) { + pb_1.Message.setField(this, 6, value); + } + get events() { + return pb_1.Message.getRepeatedWrapperField(this, Event, 7) as Event[]; + } + set events(value: Event[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get codespace() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set codespace(value: string) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + code?: number; + data?: Uint8Array; + log?: string; + info?: string; + gas_wanted?: number; + gas_used?: number; + events?: ReturnType[]; + codespace?: string; + }): ResponseCheckTx { + const message = new ResponseCheckTx({}); + if (data.code != null) { + message.code = data.code; + } + if (data.data != null) { + message.data = data.data; + } + if (data.log != null) { + message.log = data.log; + } + if (data.info != null) { + message.info = data.info; + } + if (data.gas_wanted != null) { + message.gas_wanted = data.gas_wanted; + } + if (data.gas_used != null) { + message.gas_used = data.gas_used; + } + if (data.events != null) { + message.events = data.events.map(item => Event.fromObject(item)); + } + if (data.codespace != null) { + message.codespace = data.codespace; + } + return message; + } + toObject() { + const data: { + code?: number; + data?: Uint8Array; + log?: string; + info?: string; + gas_wanted?: number; + gas_used?: number; + events?: ReturnType[]; + codespace?: string; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.data != null) { + data.data = this.data; + } + if (this.log != null) { + data.log = this.log; + } + if (this.info != null) { + data.info = this.info; + } + if (this.gas_wanted != null) { + data.gas_wanted = this.gas_wanted; + } + if (this.gas_used != null) { + data.gas_used = this.gas_used; + } + if (this.events != null) { + data.events = this.events.map((item: Event) => item.toObject()); + } + if (this.codespace != null) { + data.codespace = this.codespace; + } + 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.code != 0) + writer.writeUint32(1, this.code); + if (this.data.length) + writer.writeBytes(2, this.data); + if (this.log.length) + writer.writeString(3, this.log); + if (this.info.length) + writer.writeString(4, this.info); + if (this.gas_wanted != 0) + writer.writeInt64(5, this.gas_wanted); + if (this.gas_used != 0) + writer.writeInt64(6, this.gas_used); + if (this.events.length) + writer.writeRepeatedMessage(7, this.events, (item: Event) => item.serialize(writer)); + if (this.codespace.length) + writer.writeString(8, this.codespace); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseCheckTx { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseCheckTx(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readUint32(); + break; + case 2: + message.data = reader.readBytes(); + break; + case 3: + message.log = reader.readString(); + break; + case 4: + message.info = reader.readString(); + break; + case 5: + message.gas_wanted = reader.readInt64(); + break; + case 6: + message.gas_used = reader.readInt64(); + break; + case 7: + reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 7, Event.deserialize(reader), Event)); + break; + case 8: + message.codespace = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseCheckTx { + return ResponseCheckTx.deserialize(bytes); + } + } + export class ResponseCommit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + retain_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 ("retain_height" in data && data.retain_height != undefined) { + this.retain_height = data.retain_height; + } + } + } + get retain_height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set retain_height(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + retain_height?: number; + }): ResponseCommit { + const message = new ResponseCommit({}); + if (data.retain_height != null) { + message.retain_height = data.retain_height; + } + return message; + } + toObject() { + const data: { + retain_height?: number; + } = {}; + if (this.retain_height != null) { + data.retain_height = this.retain_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.retain_height != 0) + writer.writeInt64(3, this.retain_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseCommit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseCommit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 3: + message.retain_height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseCommit { + return ResponseCommit.deserialize(bytes); + } + } + export class ResponseListSnapshots extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + snapshots?: Snapshot[]; + }) { + 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 ("snapshots" in data && data.snapshots != undefined) { + this.snapshots = data.snapshots; + } + } + } + get snapshots() { + return pb_1.Message.getRepeatedWrapperField(this, Snapshot, 1) as Snapshot[]; + } + set snapshots(value: Snapshot[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + snapshots?: ReturnType[]; + }): ResponseListSnapshots { + const message = new ResponseListSnapshots({}); + if (data.snapshots != null) { + message.snapshots = data.snapshots.map(item => Snapshot.fromObject(item)); + } + return message; + } + toObject() { + const data: { + snapshots?: ReturnType[]; + } = {}; + if (this.snapshots != null) { + data.snapshots = this.snapshots.map((item: Snapshot) => item.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.snapshots.length) + writer.writeRepeatedMessage(1, this.snapshots, (item: Snapshot) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseListSnapshots { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseListSnapshots(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.snapshots, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Snapshot.deserialize(reader), Snapshot)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseListSnapshots { + return ResponseListSnapshots.deserialize(bytes); + } + } + export class ResponseOfferSnapshot extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: ResponseOfferSnapshot.Result; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseOfferSnapshot.Result.UNKNOWN) as ResponseOfferSnapshot.Result; + } + set result(value: ResponseOfferSnapshot.Result) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + result?: ResponseOfferSnapshot.Result; + }): ResponseOfferSnapshot { + const message = new ResponseOfferSnapshot({}); + if (data.result != null) { + message.result = data.result; + } + return message; + } + toObject() { + const data: { + result?: ResponseOfferSnapshot.Result; + } = {}; + if (this.result != null) { + data.result = this.result; + } + 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.result != ResponseOfferSnapshot.Result.UNKNOWN) + writer.writeEnum(1, this.result); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseOfferSnapshot { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseOfferSnapshot(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.result = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseOfferSnapshot { + return ResponseOfferSnapshot.deserialize(bytes); + } + } + export namespace ResponseOfferSnapshot { + export enum Result { + UNKNOWN = 0, + ACCEPT = 1, + ABORT = 2, + REJECT = 3, + REJECT_FORMAT = 4, + REJECT_SENDER = 5 + } + } + export class ResponseLoadSnapshotChunk extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + chunk?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("chunk" in data && data.chunk != undefined) { + this.chunk = data.chunk; + } + } + } + get chunk() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set chunk(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + chunk?: Uint8Array; + }): ResponseLoadSnapshotChunk { + const message = new ResponseLoadSnapshotChunk({}); + if (data.chunk != null) { + message.chunk = data.chunk; + } + return message; + } + toObject() { + const data: { + chunk?: Uint8Array; + } = {}; + if (this.chunk != null) { + data.chunk = this.chunk; + } + 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.chunk.length) + writer.writeBytes(1, this.chunk); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseLoadSnapshotChunk { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseLoadSnapshotChunk(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.chunk = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseLoadSnapshotChunk { + return ResponseLoadSnapshotChunk.deserialize(bytes); + } + } + export class ResponseApplySnapshotChunk extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + result?: ResponseApplySnapshotChunk.Result; + refetch_chunks?: number[]; + reject_senders?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + if ("refetch_chunks" in data && data.refetch_chunks != undefined) { + this.refetch_chunks = data.refetch_chunks; + } + if ("reject_senders" in data && data.reject_senders != undefined) { + this.reject_senders = data.reject_senders; + } + } + } + get result() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseApplySnapshotChunk.Result.UNKNOWN) as ResponseApplySnapshotChunk.Result; + } + set result(value: ResponseApplySnapshotChunk.Result) { + pb_1.Message.setField(this, 1, value); + } + get refetch_chunks() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as number[]; + } + set refetch_chunks(value: number[]) { + pb_1.Message.setField(this, 2, value); + } + get reject_senders() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set reject_senders(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + result?: ResponseApplySnapshotChunk.Result; + refetch_chunks?: number[]; + reject_senders?: string[]; + }): ResponseApplySnapshotChunk { + const message = new ResponseApplySnapshotChunk({}); + if (data.result != null) { + message.result = data.result; + } + if (data.refetch_chunks != null) { + message.refetch_chunks = data.refetch_chunks; + } + if (data.reject_senders != null) { + message.reject_senders = data.reject_senders; + } + return message; + } + toObject() { + const data: { + result?: ResponseApplySnapshotChunk.Result; + refetch_chunks?: number[]; + reject_senders?: string[]; + } = {}; + if (this.result != null) { + data.result = this.result; + } + if (this.refetch_chunks != null) { + data.refetch_chunks = this.refetch_chunks; + } + if (this.reject_senders != null) { + data.reject_senders = this.reject_senders; + } + 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.result != ResponseApplySnapshotChunk.Result.UNKNOWN) + writer.writeEnum(1, this.result); + if (this.refetch_chunks.length) + writer.writePackedUint32(2, this.refetch_chunks); + if (this.reject_senders.length) + writer.writeRepeatedString(3, this.reject_senders); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseApplySnapshotChunk { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseApplySnapshotChunk(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.result = reader.readEnum(); + break; + case 2: + message.refetch_chunks = reader.readPackedUint32(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseApplySnapshotChunk { + return ResponseApplySnapshotChunk.deserialize(bytes); + } + } + export namespace ResponseApplySnapshotChunk { + export enum Result { + UNKNOWN = 0, + ACCEPT = 1, + ABORT = 2, + RETRY = 3, + RETRY_SNAPSHOT = 4, + REJECT_SNAPSHOT = 5 + } + } + export class ResponsePrepareProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + txs?: Uint8Array[]; + }) { + 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 ("txs" in data && data.txs != undefined) { + this.txs = data.txs; + } + } + } + get txs() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as Uint8Array[]; + } + set txs(value: Uint8Array[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + txs?: Uint8Array[]; + }): ResponsePrepareProposal { + const message = new ResponsePrepareProposal({}); + if (data.txs != null) { + message.txs = data.txs; + } + return message; + } + toObject() { + const data: { + txs?: Uint8Array[]; + } = {}; + if (this.txs != null) { + data.txs = this.txs; + } + 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.txs.length) + writer.writeRepeatedBytes(1, this.txs); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponsePrepareProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponsePrepareProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponsePrepareProposal { + return ResponsePrepareProposal.deserialize(bytes); + } + } + export class ResponseProcessProposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + status?: ResponseProcessProposal.ProposalStatus; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseProcessProposal.ProposalStatus.UNKNOWN) as ResponseProcessProposal.ProposalStatus; + } + set status(value: ResponseProcessProposal.ProposalStatus) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + status?: ResponseProcessProposal.ProposalStatus; + }): ResponseProcessProposal { + const message = new ResponseProcessProposal({}); + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + status?: ResponseProcessProposal.ProposalStatus; + } = {}; + if (this.status != null) { + data.status = this.status; + } + 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.status != ResponseProcessProposal.ProposalStatus.UNKNOWN) + writer.writeEnum(1, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseProcessProposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseProcessProposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.status = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseProcessProposal { + return ResponseProcessProposal.deserialize(bytes); + } + } + export namespace ResponseProcessProposal { + export enum ProposalStatus { + UNKNOWN = 0, + ACCEPT = 1, + REJECT = 2 + } + } + export class ResponseExtendVote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vote_extension?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("vote_extension" in data && data.vote_extension != undefined) { + this.vote_extension = data.vote_extension; + } + } + } + get vote_extension() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set vote_extension(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + vote_extension?: Uint8Array; + }): ResponseExtendVote { + const message = new ResponseExtendVote({}); + if (data.vote_extension != null) { + message.vote_extension = data.vote_extension; + } + return message; + } + toObject() { + const data: { + vote_extension?: Uint8Array; + } = {}; + if (this.vote_extension != null) { + data.vote_extension = this.vote_extension; + } + 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.vote_extension.length) + writer.writeBytes(1, this.vote_extension); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseExtendVote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseExtendVote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.vote_extension = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseExtendVote { + return ResponseExtendVote.deserialize(bytes); + } + } + export class ResponseVerifyVoteExtension extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + status?: ResponseVerifyVoteExtension.VerifyStatus; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 1, ResponseVerifyVoteExtension.VerifyStatus.UNKNOWN) as ResponseVerifyVoteExtension.VerifyStatus; + } + set status(value: ResponseVerifyVoteExtension.VerifyStatus) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + status?: ResponseVerifyVoteExtension.VerifyStatus; + }): ResponseVerifyVoteExtension { + const message = new ResponseVerifyVoteExtension({}); + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + status?: ResponseVerifyVoteExtension.VerifyStatus; + } = {}; + if (this.status != null) { + data.status = this.status; + } + 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.status != ResponseVerifyVoteExtension.VerifyStatus.UNKNOWN) + writer.writeEnum(1, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseVerifyVoteExtension { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseVerifyVoteExtension(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.status = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseVerifyVoteExtension { + return ResponseVerifyVoteExtension.deserialize(bytes); + } + } + export namespace ResponseVerifyVoteExtension { + export enum VerifyStatus { + UNKNOWN = 0, + ACCEPT = 1, + REJECT = 2 + } + } + export class ResponseFinalizeBlock extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + events?: Event[]; + tx_results?: ExecTxResult[]; + validator_updates?: ValidatorUpdate[]; + consensus_param_updates?: dependency_3.tendermint.types.ConsensusParams; + app_hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("events" in data && data.events != undefined) { + this.events = data.events; + } + if ("tx_results" in data && data.tx_results != undefined) { + this.tx_results = data.tx_results; + } + if ("validator_updates" in data && data.validator_updates != undefined) { + this.validator_updates = data.validator_updates; + } + if ("consensus_param_updates" in data && data.consensus_param_updates != undefined) { + this.consensus_param_updates = data.consensus_param_updates; + } + if ("app_hash" in data && data.app_hash != undefined) { + this.app_hash = data.app_hash; + } + } + } + get events() { + return pb_1.Message.getRepeatedWrapperField(this, Event, 1) as Event[]; + } + set events(value: Event[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get tx_results() { + return pb_1.Message.getRepeatedWrapperField(this, ExecTxResult, 2) as ExecTxResult[]; + } + set tx_results(value: ExecTxResult[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get validator_updates() { + return pb_1.Message.getRepeatedWrapperField(this, ValidatorUpdate, 3) as ValidatorUpdate[]; + } + set validator_updates(value: ValidatorUpdate[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get consensus_param_updates() { + return pb_1.Message.getWrapperField(this, dependency_3.tendermint.types.ConsensusParams, 4) as dependency_3.tendermint.types.ConsensusParams; + } + set consensus_param_updates(value: dependency_3.tendermint.types.ConsensusParams) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_consensus_param_updates() { + return pb_1.Message.getField(this, 4) != null; + } + get app_hash() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set app_hash(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + events?: ReturnType[]; + tx_results?: ReturnType[]; + validator_updates?: ReturnType[]; + consensus_param_updates?: ReturnType; + app_hash?: Uint8Array; + }): ResponseFinalizeBlock { + const message = new ResponseFinalizeBlock({}); + if (data.events != null) { + message.events = data.events.map(item => Event.fromObject(item)); + } + if (data.tx_results != null) { + message.tx_results = data.tx_results.map(item => ExecTxResult.fromObject(item)); + } + if (data.validator_updates != null) { + message.validator_updates = data.validator_updates.map(item => ValidatorUpdate.fromObject(item)); + } + if (data.consensus_param_updates != null) { + message.consensus_param_updates = dependency_3.tendermint.types.ConsensusParams.fromObject(data.consensus_param_updates); + } + if (data.app_hash != null) { + message.app_hash = data.app_hash; + } + return message; + } + toObject() { + const data: { + events?: ReturnType[]; + tx_results?: ReturnType[]; + validator_updates?: ReturnType[]; + consensus_param_updates?: ReturnType; + app_hash?: Uint8Array; + } = {}; + if (this.events != null) { + data.events = this.events.map((item: Event) => item.toObject()); + } + if (this.tx_results != null) { + data.tx_results = this.tx_results.map((item: ExecTxResult) => item.toObject()); + } + if (this.validator_updates != null) { + data.validator_updates = this.validator_updates.map((item: ValidatorUpdate) => item.toObject()); + } + if (this.consensus_param_updates != null) { + data.consensus_param_updates = this.consensus_param_updates.toObject(); + } + if (this.app_hash != null) { + data.app_hash = this.app_hash; + } + 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.events.length) + writer.writeRepeatedMessage(1, this.events, (item: Event) => item.serialize(writer)); + if (this.tx_results.length) + writer.writeRepeatedMessage(2, this.tx_results, (item: ExecTxResult) => item.serialize(writer)); + if (this.validator_updates.length) + writer.writeRepeatedMessage(3, this.validator_updates, (item: ValidatorUpdate) => item.serialize(writer)); + if (this.has_consensus_param_updates) + writer.writeMessage(4, this.consensus_param_updates, () => this.consensus_param_updates.serialize(writer)); + if (this.app_hash.length) + writer.writeBytes(5, this.app_hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResponseFinalizeBlock { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResponseFinalizeBlock(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Event.deserialize(reader), Event)); + break; + case 2: + reader.readMessage(message.tx_results, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ExecTxResult.deserialize(reader), ExecTxResult)); + break; + case 3: + reader.readMessage(message.validator_updates, () => pb_1.Message.addToRepeatedWrapperField(message, 3, ValidatorUpdate.deserialize(reader), ValidatorUpdate)); + break; + case 4: + reader.readMessage(message.consensus_param_updates, () => message.consensus_param_updates = dependency_3.tendermint.types.ConsensusParams.deserialize(reader)); + break; + case 5: + message.app_hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResponseFinalizeBlock { + return ResponseFinalizeBlock.deserialize(bytes); + } + } + export class CommitInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + round?: number; + votes?: VoteInfo[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("round" in data && data.round != undefined) { + this.round = data.round; + } + if ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + } + } + get round() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set round(value: number) { + pb_1.Message.setField(this, 1, value); + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, VoteInfo, 2) as VoteInfo[]; + } + set votes(value: VoteInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + round?: number; + votes?: ReturnType[]; + }): CommitInfo { + const message = new CommitInfo({}); + if (data.round != null) { + message.round = data.round; + } + if (data.votes != null) { + message.votes = data.votes.map(item => VoteInfo.fromObject(item)); + } + return message; + } + toObject() { + const data: { + round?: number; + votes?: ReturnType[]; + } = {}; + if (this.round != null) { + data.round = this.round; + } + if (this.votes != null) { + data.votes = this.votes.map((item: VoteInfo) => item.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.round != 0) + writer.writeInt32(1, this.round); + if (this.votes.length) + writer.writeRepeatedMessage(2, this.votes, (item: VoteInfo) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommitInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommitInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.round = reader.readInt32(); + break; + case 2: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 2, VoteInfo.deserialize(reader), VoteInfo)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommitInfo { + return CommitInfo.deserialize(bytes); + } + } + export class ExtendedCommitInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + round?: number; + votes?: ExtendedVoteInfo[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("round" in data && data.round != undefined) { + this.round = data.round; + } + if ("votes" in data && data.votes != undefined) { + this.votes = data.votes; + } + } + } + get round() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set round(value: number) { + pb_1.Message.setField(this, 1, value); + } + get votes() { + return pb_1.Message.getRepeatedWrapperField(this, ExtendedVoteInfo, 2) as ExtendedVoteInfo[]; + } + set votes(value: ExtendedVoteInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + round?: number; + votes?: ReturnType[]; + }): ExtendedCommitInfo { + const message = new ExtendedCommitInfo({}); + if (data.round != null) { + message.round = data.round; + } + if (data.votes != null) { + message.votes = data.votes.map(item => ExtendedVoteInfo.fromObject(item)); + } + return message; + } + toObject() { + const data: { + round?: number; + votes?: ReturnType[]; + } = {}; + if (this.round != null) { + data.round = this.round; + } + if (this.votes != null) { + data.votes = this.votes.map((item: ExtendedVoteInfo) => item.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.round != 0) + writer.writeInt32(1, this.round); + if (this.votes.length) + writer.writeRepeatedMessage(2, this.votes, (item: ExtendedVoteInfo) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExtendedCommitInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExtendedCommitInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.round = reader.readInt32(); + break; + case 2: + reader.readMessage(message.votes, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ExtendedVoteInfo.deserialize(reader), ExtendedVoteInfo)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ExtendedCommitInfo { + return ExtendedCommitInfo.deserialize(bytes); + } + } + export class Event extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type?: string; + attributes?: EventAttribute[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("attributes" in data && data.attributes != undefined) { + this.attributes = data.attributes; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 1, value); + } + get attributes() { + return pb_1.Message.getRepeatedWrapperField(this, EventAttribute, 2) as EventAttribute[]; + } + set attributes(value: EventAttribute[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + type?: string; + attributes?: ReturnType[]; + }): Event { + const message = new Event({}); + if (data.type != null) { + message.type = data.type; + } + if (data.attributes != null) { + message.attributes = data.attributes.map(item => EventAttribute.fromObject(item)); + } + return message; + } + toObject() { + const data: { + type?: string; + attributes?: ReturnType[]; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.attributes != null) { + data.attributes = this.attributes.map((item: EventAttribute) => item.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.type.length) + writer.writeString(1, this.type); + if (this.attributes.length) + writer.writeRepeatedMessage(2, this.attributes, (item: EventAttribute) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Event { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Event(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readString(); + break; + case 2: + reader.readMessage(message.attributes, () => pb_1.Message.addToRepeatedWrapperField(message, 2, EventAttribute.deserialize(reader), EventAttribute)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Event { + return Event.deserialize(bytes); + } + } + export class EventAttribute extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: string; + value?: string; + index?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set value(value: string) { + pb_1.Message.setField(this, 2, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set index(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + key?: string; + value?: string; + index?: boolean; + }): EventAttribute { + const message = new EventAttribute({}); + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + if (data.index != null) { + message.index = data.index; + } + return message; + } + toObject() { + const data: { + key?: string; + value?: string; + index?: boolean; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + if (this.index != null) { + data.index = this.index; + } + 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.key.length) + writer.writeString(1, this.key); + if (this.value.length) + writer.writeString(2, this.value); + if (this.index != false) + writer.writeBool(3, this.index); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventAttribute { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EventAttribute(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readString(); + break; + case 2: + message.value = reader.readString(); + break; + case 3: + message.index = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EventAttribute { + return EventAttribute.deserialize(bytes); + } + } + export class ExecTxResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + data?: Uint8Array; + log?: string; + info?: string; + gas_wanted?: number; + gas_used?: number; + events?: Event[]; + codespace?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("log" in data && data.log != undefined) { + this.log = data.log; + } + if ("info" in data && data.info != undefined) { + this.info = data.info; + } + if ("gas_wanted" in data && data.gas_wanted != undefined) { + this.gas_wanted = data.gas_wanted; + } + if ("gas_used" in data && data.gas_used != undefined) { + this.gas_used = data.gas_used; + } + if ("events" in data && data.events != undefined) { + this.events = data.events; + } + if ("codespace" in data && data.codespace != undefined) { + this.codespace = data.codespace; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get log() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set log(value: string) { + pb_1.Message.setField(this, 3, value); + } + get info() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set info(value: string) { + pb_1.Message.setField(this, 4, value); + } + get gas_wanted() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set gas_wanted(value: number) { + pb_1.Message.setField(this, 5, value); + } + get gas_used() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set gas_used(value: number) { + pb_1.Message.setField(this, 6, value); + } + get events() { + return pb_1.Message.getRepeatedWrapperField(this, Event, 7) as Event[]; + } + set events(value: Event[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get codespace() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set codespace(value: string) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + code?: number; + data?: Uint8Array; + log?: string; + info?: string; + gas_wanted?: number; + gas_used?: number; + events?: ReturnType[]; + codespace?: string; + }): ExecTxResult { + const message = new ExecTxResult({}); + if (data.code != null) { + message.code = data.code; + } + if (data.data != null) { + message.data = data.data; + } + if (data.log != null) { + message.log = data.log; + } + if (data.info != null) { + message.info = data.info; + } + if (data.gas_wanted != null) { + message.gas_wanted = data.gas_wanted; + } + if (data.gas_used != null) { + message.gas_used = data.gas_used; + } + if (data.events != null) { + message.events = data.events.map(item => Event.fromObject(item)); + } + if (data.codespace != null) { + message.codespace = data.codespace; + } + return message; + } + toObject() { + const data: { + code?: number; + data?: Uint8Array; + log?: string; + info?: string; + gas_wanted?: number; + gas_used?: number; + events?: ReturnType[]; + codespace?: string; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.data != null) { + data.data = this.data; + } + if (this.log != null) { + data.log = this.log; + } + if (this.info != null) { + data.info = this.info; + } + if (this.gas_wanted != null) { + data.gas_wanted = this.gas_wanted; + } + if (this.gas_used != null) { + data.gas_used = this.gas_used; + } + if (this.events != null) { + data.events = this.events.map((item: Event) => item.toObject()); + } + if (this.codespace != null) { + data.codespace = this.codespace; + } + 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.code != 0) + writer.writeUint32(1, this.code); + if (this.data.length) + writer.writeBytes(2, this.data); + if (this.log.length) + writer.writeString(3, this.log); + if (this.info.length) + writer.writeString(4, this.info); + if (this.gas_wanted != 0) + writer.writeInt64(5, this.gas_wanted); + if (this.gas_used != 0) + writer.writeInt64(6, this.gas_used); + if (this.events.length) + writer.writeRepeatedMessage(7, this.events, (item: Event) => item.serialize(writer)); + if (this.codespace.length) + writer.writeString(8, this.codespace); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExecTxResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExecTxResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readUint32(); + break; + case 2: + message.data = reader.readBytes(); + break; + case 3: + message.log = reader.readString(); + break; + case 4: + message.info = reader.readString(); + break; + case 5: + message.gas_wanted = reader.readInt64(); + break; + case 6: + message.gas_used = reader.readInt64(); + break; + case 7: + reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 7, Event.deserialize(reader), Event)); + break; + case 8: + message.codespace = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ExecTxResult { + return ExecTxResult.deserialize(bytes); + } + } + export class TxResult extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + index?: number; + tx?: Uint8Array; + result?: ExecTxResult; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("tx" in data && data.tx != undefined) { + this.tx = data.tx; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 2, value); + } + get tx() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set tx(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get result() { + return pb_1.Message.getWrapperField(this, ExecTxResult, 4) as ExecTxResult; + } + set result(value: ExecTxResult) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_result() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + height?: number; + index?: number; + tx?: Uint8Array; + result?: ReturnType; + }): TxResult { + const message = new TxResult({}); + if (data.height != null) { + message.height = data.height; + } + if (data.index != null) { + message.index = data.index; + } + if (data.tx != null) { + message.tx = data.tx; + } + if (data.result != null) { + message.result = ExecTxResult.fromObject(data.result); + } + return message; + } + toObject() { + const data: { + height?: number; + index?: number; + tx?: Uint8Array; + result?: ReturnType; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.index != null) { + data.index = this.index; + } + if (this.tx != null) { + data.tx = this.tx; + } + if (this.result != null) { + data.result = this.result.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.height != 0) + writer.writeInt64(1, this.height); + if (this.index != 0) + writer.writeUint32(2, this.index); + if (this.tx.length) + writer.writeBytes(3, this.tx); + if (this.has_result) + writer.writeMessage(4, this.result, () => this.result.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxResult { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxResult(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + message.index = reader.readUint32(); + break; + case 3: + message.tx = reader.readBytes(); + break; + case 4: + reader.readMessage(message.result, () => message.result = ExecTxResult.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxResult { + return TxResult.deserialize(bytes); + } + } + export class Validator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: Uint8Array; + power?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set address(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set power(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + address?: Uint8Array; + power?: number; + }): Validator { + const message = new Validator({}); + if (data.address != null) { + message.address = data.address; + } + if (data.power != null) { + message.power = data.power; + } + return message; + } + toObject() { + const data: { + address?: Uint8Array; + power?: number; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.power != null) { + data.power = this.power; + } + 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.address.length) + writer.writeBytes(1, this.address); + if (this.power != 0) + writer.writeInt64(3, this.power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Validator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Validator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readBytes(); + break; + case 3: + message.power = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Validator { + return Validator.deserialize(bytes); + } + } + export class ValidatorUpdate extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pub_key?: dependency_2.tendermint.crypto.PublicKey; + power?: 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 ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("power" in data && data.power != undefined) { + this.power = data.power; + } + } + } + get pub_key() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.crypto.PublicKey, 1) as dependency_2.tendermint.crypto.PublicKey; + } + set pub_key(value: dependency_2.tendermint.crypto.PublicKey) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_pub_key() { + return pb_1.Message.getField(this, 1) != null; + } + get power() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set power(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + pub_key?: ReturnType; + power?: number; + }): ValidatorUpdate { + const message = new ValidatorUpdate({}); + if (data.pub_key != null) { + message.pub_key = dependency_2.tendermint.crypto.PublicKey.fromObject(data.pub_key); + } + if (data.power != null) { + message.power = data.power; + } + return message; + } + toObject() { + const data: { + pub_key?: ReturnType; + power?: number; + } = {}; + if (this.pub_key != null) { + data.pub_key = this.pub_key.toObject(); + } + if (this.power != null) { + data.power = this.power; + } + 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_pub_key) + writer.writeMessage(1, this.pub_key, () => this.pub_key.serialize(writer)); + if (this.power != 0) + writer.writeInt64(2, this.power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorUpdate { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorUpdate(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pub_key, () => message.pub_key = dependency_2.tendermint.crypto.PublicKey.deserialize(reader)); + break; + case 2: + message.power = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorUpdate { + return ValidatorUpdate.deserialize(bytes); + } + } + export class VoteInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: Validator; + block_id_flag?: dependency_4.tendermint.types.BlockIDFlag; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("block_id_flag" in data && data.block_id_flag != undefined) { + this.block_id_flag = data.block_id_flag; + } + } + } + get validator() { + return pb_1.Message.getWrapperField(this, Validator, 1) as Validator; + } + set validator(value: Validator) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_validator() { + return pb_1.Message.getField(this, 1) != null; + } + get block_id_flag() { + return pb_1.Message.getFieldWithDefault(this, 3, dependency_4.tendermint.types.BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN) as dependency_4.tendermint.types.BlockIDFlag; + } + set block_id_flag(value: dependency_4.tendermint.types.BlockIDFlag) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + validator?: ReturnType; + block_id_flag?: dependency_4.tendermint.types.BlockIDFlag; + }): VoteInfo { + const message = new VoteInfo({}); + if (data.validator != null) { + message.validator = Validator.fromObject(data.validator); + } + if (data.block_id_flag != null) { + message.block_id_flag = data.block_id_flag; + } + return message; + } + toObject() { + const data: { + validator?: ReturnType; + block_id_flag?: dependency_4.tendermint.types.BlockIDFlag; + } = {}; + if (this.validator != null) { + data.validator = this.validator.toObject(); + } + if (this.block_id_flag != null) { + data.block_id_flag = this.block_id_flag; + } + 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_validator) + writer.writeMessage(1, this.validator, () => this.validator.serialize(writer)); + if (this.block_id_flag != dependency_4.tendermint.types.BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN) + writer.writeEnum(3, this.block_id_flag); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VoteInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VoteInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validator, () => message.validator = Validator.deserialize(reader)); + break; + case 3: + message.block_id_flag = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VoteInfo { + return VoteInfo.deserialize(bytes); + } + } + export class ExtendedVoteInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validator?: Validator; + vote_extension?: Uint8Array; + extension_signature?: Uint8Array; + block_id_flag?: dependency_4.tendermint.types.BlockIDFlag; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("vote_extension" in data && data.vote_extension != undefined) { + this.vote_extension = data.vote_extension; + } + if ("extension_signature" in data && data.extension_signature != undefined) { + this.extension_signature = data.extension_signature; + } + if ("block_id_flag" in data && data.block_id_flag != undefined) { + this.block_id_flag = data.block_id_flag; + } + } + } + get validator() { + return pb_1.Message.getWrapperField(this, Validator, 1) as Validator; + } + set validator(value: Validator) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_validator() { + return pb_1.Message.getField(this, 1) != null; + } + get vote_extension() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set vote_extension(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get extension_signature() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set extension_signature(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get block_id_flag() { + return pb_1.Message.getFieldWithDefault(this, 5, dependency_4.tendermint.types.BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN) as dependency_4.tendermint.types.BlockIDFlag; + } + set block_id_flag(value: dependency_4.tendermint.types.BlockIDFlag) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + validator?: ReturnType; + vote_extension?: Uint8Array; + extension_signature?: Uint8Array; + block_id_flag?: dependency_4.tendermint.types.BlockIDFlag; + }): ExtendedVoteInfo { + const message = new ExtendedVoteInfo({}); + if (data.validator != null) { + message.validator = Validator.fromObject(data.validator); + } + if (data.vote_extension != null) { + message.vote_extension = data.vote_extension; + } + if (data.extension_signature != null) { + message.extension_signature = data.extension_signature; + } + if (data.block_id_flag != null) { + message.block_id_flag = data.block_id_flag; + } + return message; + } + toObject() { + const data: { + validator?: ReturnType; + vote_extension?: Uint8Array; + extension_signature?: Uint8Array; + block_id_flag?: dependency_4.tendermint.types.BlockIDFlag; + } = {}; + if (this.validator != null) { + data.validator = this.validator.toObject(); + } + if (this.vote_extension != null) { + data.vote_extension = this.vote_extension; + } + if (this.extension_signature != null) { + data.extension_signature = this.extension_signature; + } + if (this.block_id_flag != null) { + data.block_id_flag = this.block_id_flag; + } + 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_validator) + writer.writeMessage(1, this.validator, () => this.validator.serialize(writer)); + if (this.vote_extension.length) + writer.writeBytes(3, this.vote_extension); + if (this.extension_signature.length) + writer.writeBytes(4, this.extension_signature); + if (this.block_id_flag != dependency_4.tendermint.types.BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN) + writer.writeEnum(5, this.block_id_flag); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExtendedVoteInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExtendedVoteInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validator, () => message.validator = Validator.deserialize(reader)); + break; + case 3: + message.vote_extension = reader.readBytes(); + break; + case 4: + message.extension_signature = reader.readBytes(); + break; + case 5: + message.block_id_flag = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ExtendedVoteInfo { + return ExtendedVoteInfo.deserialize(bytes); + } + } + export class Misbehavior extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type?: MisbehaviorType; + validator?: Validator; + height?: number; + time?: dependency_5.google.protobuf.Timestamp; + total_voting_power?: 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 ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("total_voting_power" in data && data.total_voting_power != undefined) { + this.total_voting_power = data.total_voting_power; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, MisbehaviorType.UNKNOWN) as MisbehaviorType; + } + set type(value: MisbehaviorType) { + pb_1.Message.setField(this, 1, value); + } + get validator() { + return pb_1.Message.getWrapperField(this, Validator, 2) as Validator; + } + set validator(value: Validator) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_validator() { + return pb_1.Message.getField(this, 2) != null; + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Timestamp, 4) as dependency_5.google.protobuf.Timestamp; + } + set time(value: dependency_5.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_time() { + return pb_1.Message.getField(this, 4) != null; + } + get total_voting_power() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set total_voting_power(value: number) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + type?: MisbehaviorType; + validator?: ReturnType; + height?: number; + time?: ReturnType; + total_voting_power?: number; + }): Misbehavior { + const message = new Misbehavior({}); + if (data.type != null) { + message.type = data.type; + } + if (data.validator != null) { + message.validator = Validator.fromObject(data.validator); + } + if (data.height != null) { + message.height = data.height; + } + if (data.time != null) { + message.time = dependency_5.google.protobuf.Timestamp.fromObject(data.time); + } + if (data.total_voting_power != null) { + message.total_voting_power = data.total_voting_power; + } + return message; + } + toObject() { + const data: { + type?: MisbehaviorType; + validator?: ReturnType; + height?: number; + time?: ReturnType; + total_voting_power?: number; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.validator != null) { + data.validator = this.validator.toObject(); + } + if (this.height != null) { + data.height = this.height; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.total_voting_power != null) { + data.total_voting_power = this.total_voting_power; + } + 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.type != MisbehaviorType.UNKNOWN) + writer.writeEnum(1, this.type); + if (this.has_validator) + writer.writeMessage(2, this.validator, () => this.validator.serialize(writer)); + if (this.height != 0) + writer.writeInt64(3, this.height); + if (this.has_time) + writer.writeMessage(4, this.time, () => this.time.serialize(writer)); + if (this.total_voting_power != 0) + writer.writeInt64(5, this.total_voting_power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Misbehavior { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Misbehavior(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readEnum(); + break; + case 2: + reader.readMessage(message.validator, () => message.validator = Validator.deserialize(reader)); + break; + case 3: + message.height = reader.readInt64(); + break; + case 4: + reader.readMessage(message.time, () => message.time = dependency_5.google.protobuf.Timestamp.deserialize(reader)); + break; + case 5: + message.total_voting_power = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Misbehavior { + return Misbehavior.deserialize(bytes); + } + } + export class Snapshot extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + format?: number; + chunks?: number; + hash?: Uint8Array; + metadata?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("format" in data && data.format != undefined) { + this.format = data.format; + } + if ("chunks" in data && data.chunks != undefined) { + this.chunks = data.chunks; + } + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get format() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set format(value: number) { + pb_1.Message.setField(this, 2, value); + } + get chunks() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set chunks(value: number) { + pb_1.Message.setField(this, 3, value); + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get metadata() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set metadata(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + height?: number; + format?: number; + chunks?: number; + hash?: Uint8Array; + metadata?: Uint8Array; + }): Snapshot { + const message = new Snapshot({}); + if (data.height != null) { + message.height = data.height; + } + if (data.format != null) { + message.format = data.format; + } + if (data.chunks != null) { + message.chunks = data.chunks; + } + if (data.hash != null) { + message.hash = data.hash; + } + if (data.metadata != null) { + message.metadata = data.metadata; + } + return message; + } + toObject() { + const data: { + height?: number; + format?: number; + chunks?: number; + hash?: Uint8Array; + metadata?: Uint8Array; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.format != null) { + data.format = this.format; + } + if (this.chunks != null) { + data.chunks = this.chunks; + } + if (this.hash != null) { + data.hash = this.hash; + } + if (this.metadata != null) { + data.metadata = this.metadata; + } + 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.height != 0) + writer.writeUint64(1, this.height); + if (this.format != 0) + writer.writeUint32(2, this.format); + if (this.chunks != 0) + writer.writeUint32(3, this.chunks); + if (this.hash.length) + writer.writeBytes(4, this.hash); + if (this.metadata.length) + writer.writeBytes(5, this.metadata); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Snapshot { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Snapshot(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readUint64(); + break; + case 2: + message.format = reader.readUint32(); + break; + case 3: + message.chunks = reader.readUint32(); + break; + case 4: + message.hash = reader.readBytes(); + break; + case 5: + message.metadata = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Snapshot { + return Snapshot.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedABCIService { + static definition = { + Echo: { + path: "/tendermint.abci.ABCI/Echo", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestEcho) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestEcho.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseEcho) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseEcho.deserialize(new Uint8Array(bytes)) + }, + Flush: { + path: "/tendermint.abci.ABCI/Flush", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestFlush) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestFlush.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseFlush) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseFlush.deserialize(new Uint8Array(bytes)) + }, + Info: { + path: "/tendermint.abci.ABCI/Info", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestInfo) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestInfo.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseInfo) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseInfo.deserialize(new Uint8Array(bytes)) + }, + CheckTx: { + path: "/tendermint.abci.ABCI/CheckTx", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestCheckTx) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestCheckTx.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseCheckTx) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseCheckTx.deserialize(new Uint8Array(bytes)) + }, + Query: { + path: "/tendermint.abci.ABCI/Query", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestQuery) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestQuery.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseQuery) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseQuery.deserialize(new Uint8Array(bytes)) + }, + Commit: { + path: "/tendermint.abci.ABCI/Commit", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestCommit) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestCommit.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseCommit) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseCommit.deserialize(new Uint8Array(bytes)) + }, + InitChain: { + path: "/tendermint.abci.ABCI/InitChain", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestInitChain) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestInitChain.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseInitChain) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseInitChain.deserialize(new Uint8Array(bytes)) + }, + ListSnapshots: { + path: "/tendermint.abci.ABCI/ListSnapshots", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestListSnapshots) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestListSnapshots.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseListSnapshots) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseListSnapshots.deserialize(new Uint8Array(bytes)) + }, + OfferSnapshot: { + path: "/tendermint.abci.ABCI/OfferSnapshot", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestOfferSnapshot) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestOfferSnapshot.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseOfferSnapshot) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseOfferSnapshot.deserialize(new Uint8Array(bytes)) + }, + LoadSnapshotChunk: { + path: "/tendermint.abci.ABCI/LoadSnapshotChunk", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestLoadSnapshotChunk) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestLoadSnapshotChunk.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseLoadSnapshotChunk) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseLoadSnapshotChunk.deserialize(new Uint8Array(bytes)) + }, + ApplySnapshotChunk: { + path: "/tendermint.abci.ABCI/ApplySnapshotChunk", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestApplySnapshotChunk) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestApplySnapshotChunk.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseApplySnapshotChunk) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseApplySnapshotChunk.deserialize(new Uint8Array(bytes)) + }, + PrepareProposal: { + path: "/tendermint.abci.ABCI/PrepareProposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestPrepareProposal) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestPrepareProposal.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponsePrepareProposal) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponsePrepareProposal.deserialize(new Uint8Array(bytes)) + }, + ProcessProposal: { + path: "/tendermint.abci.ABCI/ProcessProposal", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestProcessProposal) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestProcessProposal.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseProcessProposal) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseProcessProposal.deserialize(new Uint8Array(bytes)) + }, + ExtendVote: { + path: "/tendermint.abci.ABCI/ExtendVote", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestExtendVote) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestExtendVote.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseExtendVote) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseExtendVote.deserialize(new Uint8Array(bytes)) + }, + VerifyVoteExtension: { + path: "/tendermint.abci.ABCI/VerifyVoteExtension", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestVerifyVoteExtension) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestVerifyVoteExtension.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseVerifyVoteExtension) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseVerifyVoteExtension.deserialize(new Uint8Array(bytes)) + }, + FinalizeBlock: { + path: "/tendermint.abci.ABCI/FinalizeBlock", + requestStream: false, + responseStream: false, + requestSerialize: (message: RequestFinalizeBlock) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RequestFinalizeBlock.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResponseFinalizeBlock) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResponseFinalizeBlock.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Echo(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Flush(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Info(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CheckTx(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Query(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Commit(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract InitChain(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ListSnapshots(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract OfferSnapshot(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract LoadSnapshotChunk(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ApplySnapshotChunk(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PrepareProposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ProcessProposal(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ExtendVote(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VerifyVoteExtension(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract FinalizeBlock(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ABCIClient extends grpc_1.makeGenericClientConstructor(UnimplementedABCIService.definition, "ABCI", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Echo: GrpcUnaryServiceInterface = (message: RequestEcho, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Echo(message, metadata, options, callback); + }; + Flush: GrpcUnaryServiceInterface = (message: RequestFlush, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Flush(message, metadata, options, callback); + }; + Info: GrpcUnaryServiceInterface = (message: RequestInfo, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Info(message, metadata, options, callback); + }; + CheckTx: GrpcUnaryServiceInterface = (message: RequestCheckTx, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CheckTx(message, metadata, options, callback); + }; + Query: GrpcUnaryServiceInterface = (message: RequestQuery, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Query(message, metadata, options, callback); + }; + Commit: GrpcUnaryServiceInterface = (message: RequestCommit, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Commit(message, metadata, options, callback); + }; + InitChain: GrpcUnaryServiceInterface = (message: RequestInitChain, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.InitChain(message, metadata, options, callback); + }; + ListSnapshots: GrpcUnaryServiceInterface = (message: RequestListSnapshots, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ListSnapshots(message, metadata, options, callback); + }; + OfferSnapshot: GrpcUnaryServiceInterface = (message: RequestOfferSnapshot, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.OfferSnapshot(message, metadata, options, callback); + }; + LoadSnapshotChunk: GrpcUnaryServiceInterface = (message: RequestLoadSnapshotChunk, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.LoadSnapshotChunk(message, metadata, options, callback); + }; + ApplySnapshotChunk: GrpcUnaryServiceInterface = (message: RequestApplySnapshotChunk, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ApplySnapshotChunk(message, metadata, options, callback); + }; + PrepareProposal: GrpcUnaryServiceInterface = (message: RequestPrepareProposal, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PrepareProposal(message, metadata, options, callback); + }; + ProcessProposal: GrpcUnaryServiceInterface = (message: RequestProcessProposal, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ProcessProposal(message, metadata, options, callback); + }; + ExtendVote: GrpcUnaryServiceInterface = (message: RequestExtendVote, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ExtendVote(message, metadata, options, callback); + }; + VerifyVoteExtension: GrpcUnaryServiceInterface = (message: RequestVerifyVoteExtension, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyVoteExtension(message, metadata, options, callback); + }; + FinalizeBlock: GrpcUnaryServiceInterface = (message: RequestFinalizeBlock, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.FinalizeBlock(message, metadata, options, callback); + }; + } +} diff --git a/proto/tendermint/abci/types_pb.d.ts b/codegen/tendermint/abci/types_pb.d.ts similarity index 82% rename from proto/tendermint/abci/types_pb.d.ts rename to codegen/tendermint/abci/types_pb.d.ts index a8ff8cd..f6d2d9b 100644 --- a/proto/tendermint/abci/types_pb.d.ts +++ b/codegen/tendermint/abci/types_pb.d.ts @@ -3,9 +3,9 @@ import * as jspb from "google-protobuf"; import * as tendermint_crypto_proof_pb from "../../tendermint/crypto/proof_pb"; -import * as tendermint_types_types_pb from "../../tendermint/types/types_pb"; import * as tendermint_crypto_keys_pb from "../../tendermint/crypto/keys_pb"; import * as tendermint_types_params_pb from "../../tendermint/types/params_pb"; +import * as tendermint_types_validator_pb from "../../tendermint/types/validator_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; @@ -35,26 +35,11 @@ export class Request extends jspb.Message { getQuery(): RequestQuery | undefined; setQuery(value?: RequestQuery): void; - hasBeginBlock(): boolean; - clearBeginBlock(): void; - getBeginBlock(): RequestBeginBlock | undefined; - setBeginBlock(value?: RequestBeginBlock): void; - hasCheckTx(): boolean; clearCheckTx(): void; getCheckTx(): RequestCheckTx | undefined; setCheckTx(value?: RequestCheckTx): void; - hasDeliverTx(): boolean; - clearDeliverTx(): void; - getDeliverTx(): RequestDeliverTx | undefined; - setDeliverTx(value?: RequestDeliverTx): void; - - hasEndBlock(): boolean; - clearEndBlock(): void; - getEndBlock(): RequestEndBlock | undefined; - setEndBlock(value?: RequestEndBlock): void; - hasCommit(): boolean; clearCommit(): void; getCommit(): RequestCommit | undefined; @@ -90,6 +75,21 @@ export class Request extends jspb.Message { getProcessProposal(): RequestProcessProposal | undefined; setProcessProposal(value?: RequestProcessProposal): void; + hasExtendVote(): boolean; + clearExtendVote(): void; + getExtendVote(): RequestExtendVote | undefined; + setExtendVote(value?: RequestExtendVote): void; + + hasVerifyVoteExtension(): boolean; + clearVerifyVoteExtension(): void; + getVerifyVoteExtension(): RequestVerifyVoteExtension | undefined; + setVerifyVoteExtension(value?: RequestVerifyVoteExtension): void; + + hasFinalizeBlock(): boolean; + clearFinalizeBlock(): void; + getFinalizeBlock(): RequestFinalizeBlock | undefined; + setFinalizeBlock(value?: RequestFinalizeBlock): void; + getValueCase(): Request.ValueCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Request.AsObject; @@ -108,10 +108,7 @@ export namespace Request { info?: RequestInfo.AsObject, initChain?: RequestInitChain.AsObject, query?: RequestQuery.AsObject, - beginBlock?: RequestBeginBlock.AsObject, checkTx?: RequestCheckTx.AsObject, - deliverTx?: RequestDeliverTx.AsObject, - endBlock?: RequestEndBlock.AsObject, commit?: RequestCommit.AsObject, listSnapshots?: RequestListSnapshots.AsObject, offerSnapshot?: RequestOfferSnapshot.AsObject, @@ -119,6 +116,9 @@ export namespace Request { applySnapshotChunk?: RequestApplySnapshotChunk.AsObject, prepareProposal?: RequestPrepareProposal.AsObject, processProposal?: RequestProcessProposal.AsObject, + extendVote?: RequestExtendVote.AsObject, + verifyVoteExtension?: RequestVerifyVoteExtension.AsObject, + finalizeBlock?: RequestFinalizeBlock.AsObject, } export enum ValueCase { @@ -128,10 +128,7 @@ export namespace Request { INFO = 3, INIT_CHAIN = 5, QUERY = 6, - BEGIN_BLOCK = 7, CHECK_TX = 8, - DELIVER_TX = 9, - END_BLOCK = 10, COMMIT = 11, LIST_SNAPSHOTS = 12, OFFER_SNAPSHOT = 13, @@ -139,6 +136,9 @@ export namespace Request { APPLY_SNAPSHOT_CHUNK = 15, PREPARE_PROPOSAL = 16, PROCESS_PROPOSAL = 17, + EXTEND_VOTE = 18, + VERIFY_VOTE_EXTENSION = 19, + FINALIZE_BLOCK = 20, } } @@ -292,46 +292,6 @@ export namespace RequestQuery { } } -export class RequestBeginBlock extends jspb.Message { - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - - hasHeader(): boolean; - clearHeader(): void; - getHeader(): tendermint_types_types_pb.Header | undefined; - setHeader(value?: tendermint_types_types_pb.Header): void; - - hasLastCommitInfo(): boolean; - clearLastCommitInfo(): void; - getLastCommitInfo(): CommitInfo | undefined; - setLastCommitInfo(value?: CommitInfo): void; - - clearByzantineValidatorsList(): void; - getByzantineValidatorsList(): Array; - setByzantineValidatorsList(value: Array): void; - addByzantineValidators(value?: Misbehavior, index?: number): Misbehavior; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestBeginBlock.AsObject; - static toObject(includeInstance: boolean, msg: RequestBeginBlock): RequestBeginBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestBeginBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestBeginBlock; - static deserializeBinaryFromReader(message: RequestBeginBlock, reader: jspb.BinaryReader): RequestBeginBlock; -} - -export namespace RequestBeginBlock { - export type AsObject = { - hash: Uint8Array | string, - header?: tendermint_types_types_pb.Header.AsObject, - lastCommitInfo?: CommitInfo.AsObject, - byzantineValidatorsList: Array, - } -} - export class RequestCheckTx extends jspb.Message { getTx(): Uint8Array | string; getTx_asU8(): Uint8Array; @@ -358,48 +318,6 @@ export namespace RequestCheckTx { } } -export class RequestDeliverTx extends jspb.Message { - getTx(): Uint8Array | string; - getTx_asU8(): Uint8Array; - getTx_asB64(): string; - setTx(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestDeliverTx.AsObject; - static toObject(includeInstance: boolean, msg: RequestDeliverTx): RequestDeliverTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestDeliverTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestDeliverTx; - static deserializeBinaryFromReader(message: RequestDeliverTx, reader: jspb.BinaryReader): RequestDeliverTx; -} - -export namespace RequestDeliverTx { - export type AsObject = { - tx: Uint8Array | string, - } -} - -export class RequestEndBlock extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestEndBlock.AsObject; - static toObject(includeInstance: boolean, msg: RequestEndBlock): RequestEndBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestEndBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestEndBlock; - static deserializeBinaryFromReader(message: RequestEndBlock, reader: jspb.BinaryReader): RequestEndBlock; -} - -export namespace RequestEndBlock { - export type AsObject = { - height: number, - } -} - export class RequestCommit extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RequestCommit.AsObject; @@ -644,6 +562,172 @@ export namespace RequestProcessProposal { } } +export class RequestExtendVote extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + getHeight(): number; + setHeight(value: number): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + clearTxsList(): void; + getTxsList(): Array; + getTxsList_asU8(): Array; + getTxsList_asB64(): Array; + setTxsList(value: Array): void; + addTxs(value: Uint8Array | string, index?: number): Uint8Array | string; + + hasProposedLastCommit(): boolean; + clearProposedLastCommit(): void; + getProposedLastCommit(): CommitInfo | undefined; + setProposedLastCommit(value?: CommitInfo): void; + + clearMisbehaviorList(): void; + getMisbehaviorList(): Array; + setMisbehaviorList(value: Array): void; + addMisbehavior(value?: Misbehavior, index?: number): Misbehavior; + + getNextValidatorsHash(): Uint8Array | string; + getNextValidatorsHash_asU8(): Uint8Array; + getNextValidatorsHash_asB64(): string; + setNextValidatorsHash(value: Uint8Array | string): void; + + getProposerAddress(): Uint8Array | string; + getProposerAddress_asU8(): Uint8Array; + getProposerAddress_asB64(): string; + setProposerAddress(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestExtendVote.AsObject; + static toObject(includeInstance: boolean, msg: RequestExtendVote): RequestExtendVote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestExtendVote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestExtendVote; + static deserializeBinaryFromReader(message: RequestExtendVote, reader: jspb.BinaryReader): RequestExtendVote; +} + +export namespace RequestExtendVote { + export type AsObject = { + hash: Uint8Array | string, + height: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + txsList: Array, + proposedLastCommit?: CommitInfo.AsObject, + misbehaviorList: Array, + nextValidatorsHash: Uint8Array | string, + proposerAddress: Uint8Array | string, + } +} + +export class RequestVerifyVoteExtension extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + getValidatorAddress(): Uint8Array | string; + getValidatorAddress_asU8(): Uint8Array; + getValidatorAddress_asB64(): string; + setValidatorAddress(value: Uint8Array | string): void; + + getHeight(): number; + setHeight(value: number): void; + + getVoteExtension(): Uint8Array | string; + getVoteExtension_asU8(): Uint8Array; + getVoteExtension_asB64(): string; + setVoteExtension(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestVerifyVoteExtension.AsObject; + static toObject(includeInstance: boolean, msg: RequestVerifyVoteExtension): RequestVerifyVoteExtension.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestVerifyVoteExtension, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestVerifyVoteExtension; + static deserializeBinaryFromReader(message: RequestVerifyVoteExtension, reader: jspb.BinaryReader): RequestVerifyVoteExtension; +} + +export namespace RequestVerifyVoteExtension { + export type AsObject = { + hash: Uint8Array | string, + validatorAddress: Uint8Array | string, + height: number, + voteExtension: Uint8Array | string, + } +} + +export class RequestFinalizeBlock extends jspb.Message { + clearTxsList(): void; + getTxsList(): Array; + getTxsList_asU8(): Array; + getTxsList_asB64(): Array; + setTxsList(value: Array): void; + addTxs(value: Uint8Array | string, index?: number): Uint8Array | string; + + hasDecidedLastCommit(): boolean; + clearDecidedLastCommit(): void; + getDecidedLastCommit(): CommitInfo | undefined; + setDecidedLastCommit(value?: CommitInfo): void; + + clearMisbehaviorList(): void; + getMisbehaviorList(): Array; + setMisbehaviorList(value: Array): void; + addMisbehavior(value?: Misbehavior, index?: number): Misbehavior; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + getHeight(): number; + setHeight(value: number): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getNextValidatorsHash(): Uint8Array | string; + getNextValidatorsHash_asU8(): Uint8Array; + getNextValidatorsHash_asB64(): string; + setNextValidatorsHash(value: Uint8Array | string): void; + + getProposerAddress(): Uint8Array | string; + getProposerAddress_asU8(): Uint8Array; + getProposerAddress_asB64(): string; + setProposerAddress(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestFinalizeBlock.AsObject; + static toObject(includeInstance: boolean, msg: RequestFinalizeBlock): RequestFinalizeBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestFinalizeBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestFinalizeBlock; + static deserializeBinaryFromReader(message: RequestFinalizeBlock, reader: jspb.BinaryReader): RequestFinalizeBlock; +} + +export namespace RequestFinalizeBlock { + export type AsObject = { + txsList: Array, + decidedLastCommit?: CommitInfo.AsObject, + misbehaviorList: Array, + hash: Uint8Array | string, + height: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + nextValidatorsHash: Uint8Array | string, + proposerAddress: Uint8Array | string, + } +} + export class Response extends jspb.Message { hasException(): boolean; clearException(): void; @@ -675,26 +759,11 @@ export class Response extends jspb.Message { getQuery(): ResponseQuery | undefined; setQuery(value?: ResponseQuery): void; - hasBeginBlock(): boolean; - clearBeginBlock(): void; - getBeginBlock(): ResponseBeginBlock | undefined; - setBeginBlock(value?: ResponseBeginBlock): void; - hasCheckTx(): boolean; clearCheckTx(): void; getCheckTx(): ResponseCheckTx | undefined; setCheckTx(value?: ResponseCheckTx): void; - hasDeliverTx(): boolean; - clearDeliverTx(): void; - getDeliverTx(): ResponseDeliverTx | undefined; - setDeliverTx(value?: ResponseDeliverTx): void; - - hasEndBlock(): boolean; - clearEndBlock(): void; - getEndBlock(): ResponseEndBlock | undefined; - setEndBlock(value?: ResponseEndBlock): void; - hasCommit(): boolean; clearCommit(): void; getCommit(): ResponseCommit | undefined; @@ -730,6 +799,21 @@ export class Response extends jspb.Message { getProcessProposal(): ResponseProcessProposal | undefined; setProcessProposal(value?: ResponseProcessProposal): void; + hasExtendVote(): boolean; + clearExtendVote(): void; + getExtendVote(): ResponseExtendVote | undefined; + setExtendVote(value?: ResponseExtendVote): void; + + hasVerifyVoteExtension(): boolean; + clearVerifyVoteExtension(): void; + getVerifyVoteExtension(): ResponseVerifyVoteExtension | undefined; + setVerifyVoteExtension(value?: ResponseVerifyVoteExtension): void; + + hasFinalizeBlock(): boolean; + clearFinalizeBlock(): void; + getFinalizeBlock(): ResponseFinalizeBlock | undefined; + setFinalizeBlock(value?: ResponseFinalizeBlock): void; + getValueCase(): Response.ValueCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Response.AsObject; @@ -749,10 +833,7 @@ export namespace Response { info?: ResponseInfo.AsObject, initChain?: ResponseInitChain.AsObject, query?: ResponseQuery.AsObject, - beginBlock?: ResponseBeginBlock.AsObject, checkTx?: ResponseCheckTx.AsObject, - deliverTx?: ResponseDeliverTx.AsObject, - endBlock?: ResponseEndBlock.AsObject, commit?: ResponseCommit.AsObject, listSnapshots?: ResponseListSnapshots.AsObject, offerSnapshot?: ResponseOfferSnapshot.AsObject, @@ -760,6 +841,9 @@ export namespace Response { applySnapshotChunk?: ResponseApplySnapshotChunk.AsObject, prepareProposal?: ResponsePrepareProposal.AsObject, processProposal?: ResponseProcessProposal.AsObject, + extendVote?: ResponseExtendVote.AsObject, + verifyVoteExtension?: ResponseVerifyVoteExtension.AsObject, + finalizeBlock?: ResponseFinalizeBlock.AsObject, } export enum ValueCase { @@ -770,10 +854,7 @@ export namespace Response { INFO = 4, INIT_CHAIN = 6, QUERY = 7, - BEGIN_BLOCK = 8, CHECK_TX = 9, - DELIVER_TX = 10, - END_BLOCK = 11, COMMIT = 12, LIST_SNAPSHOTS = 13, OFFER_SNAPSHOT = 14, @@ -781,6 +862,9 @@ export namespace Response { APPLY_SNAPSHOT_CHUNK = 16, PREPARE_PROPOSAL = 17, PROCESS_PROPOSAL = 18, + EXTEND_VOTE = 19, + VERIFY_VOTE_EXTENSION = 20, + FINALIZE_BLOCK = 21, } } @@ -970,28 +1054,6 @@ export namespace ResponseQuery { } } -export class ResponseBeginBlock extends jspb.Message { - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: Event, index?: number): Event; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseBeginBlock.AsObject; - static toObject(includeInstance: boolean, msg: ResponseBeginBlock): ResponseBeginBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseBeginBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseBeginBlock; - static deserializeBinaryFromReader(message: ResponseBeginBlock, reader: jspb.BinaryReader): ResponseBeginBlock; -} - -export namespace ResponseBeginBlock { - export type AsObject = { - eventsList: Array, - } -} - export class ResponseCheckTx extends jspb.Message { getCode(): number; setCode(value: number): void; @@ -1021,15 +1083,6 @@ export class ResponseCheckTx extends jspb.Message { getCodespace(): string; setCodespace(value: string): void; - getSender(): string; - setSender(value: string): void; - - getPriority(): number; - setPriority(value: number): void; - - getMempoolError(): string; - setMempoolError(value: string): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ResponseCheckTx.AsObject; static toObject(includeInstance: boolean, msg: ResponseCheckTx): ResponseCheckTx.AsObject; @@ -1050,104 +1103,10 @@ export namespace ResponseCheckTx { gasUsed: number, eventsList: Array, codespace: string, - sender: string, - priority: number, - mempoolError: string, - } -} - -export class ResponseDeliverTx extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - getLog(): string; - setLog(value: string): void; - - getInfo(): string; - setInfo(value: string): void; - - getGasWanted(): number; - setGasWanted(value: number): void; - - getGasUsed(): number; - setGasUsed(value: number): void; - - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: Event, index?: number): Event; - - getCodespace(): string; - setCodespace(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseDeliverTx.AsObject; - static toObject(includeInstance: boolean, msg: ResponseDeliverTx): ResponseDeliverTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseDeliverTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseDeliverTx; - static deserializeBinaryFromReader(message: ResponseDeliverTx, reader: jspb.BinaryReader): ResponseDeliverTx; -} - -export namespace ResponseDeliverTx { - export type AsObject = { - code: number, - data: Uint8Array | string, - log: string, - info: string, - gasWanted: number, - gasUsed: number, - eventsList: Array, - codespace: string, - } -} - -export class ResponseEndBlock extends jspb.Message { - clearValidatorUpdatesList(): void; - getValidatorUpdatesList(): Array; - setValidatorUpdatesList(value: Array): void; - addValidatorUpdates(value?: ValidatorUpdate, index?: number): ValidatorUpdate; - - hasConsensusParamUpdates(): boolean; - clearConsensusParamUpdates(): void; - getConsensusParamUpdates(): tendermint_types_params_pb.ConsensusParams | undefined; - setConsensusParamUpdates(value?: tendermint_types_params_pb.ConsensusParams): void; - - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: Event, index?: number): Event; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseEndBlock.AsObject; - static toObject(includeInstance: boolean, msg: ResponseEndBlock): ResponseEndBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseEndBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseEndBlock; - static deserializeBinaryFromReader(message: ResponseEndBlock, reader: jspb.BinaryReader): ResponseEndBlock; -} - -export namespace ResponseEndBlock { - export type AsObject = { - validatorUpdatesList: Array, - consensusParamUpdates?: tendermint_types_params_pb.ConsensusParams.AsObject, - eventsList: Array, } } export class ResponseCommit extends jspb.Message { - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - getRetainHeight(): number; setRetainHeight(value: number): void; @@ -1163,7 +1122,6 @@ export class ResponseCommit extends jspb.Message { export namespace ResponseCommit { export type AsObject = { - data: Uint8Array | string, retainHeight: number, } } @@ -1338,6 +1296,102 @@ export namespace ResponseProcessProposal { export const ProposalStatus: ProposalStatusMap; } +export class ResponseExtendVote extends jspb.Message { + getVoteExtension(): Uint8Array | string; + getVoteExtension_asU8(): Uint8Array; + getVoteExtension_asB64(): string; + setVoteExtension(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseExtendVote.AsObject; + static toObject(includeInstance: boolean, msg: ResponseExtendVote): ResponseExtendVote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseExtendVote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseExtendVote; + static deserializeBinaryFromReader(message: ResponseExtendVote, reader: jspb.BinaryReader): ResponseExtendVote; +} + +export namespace ResponseExtendVote { + export type AsObject = { + voteExtension: Uint8Array | string, + } +} + +export class ResponseVerifyVoteExtension extends jspb.Message { + getStatus(): ResponseVerifyVoteExtension.VerifyStatusMap[keyof ResponseVerifyVoteExtension.VerifyStatusMap]; + setStatus(value: ResponseVerifyVoteExtension.VerifyStatusMap[keyof ResponseVerifyVoteExtension.VerifyStatusMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseVerifyVoteExtension.AsObject; + static toObject(includeInstance: boolean, msg: ResponseVerifyVoteExtension): ResponseVerifyVoteExtension.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseVerifyVoteExtension, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseVerifyVoteExtension; + static deserializeBinaryFromReader(message: ResponseVerifyVoteExtension, reader: jspb.BinaryReader): ResponseVerifyVoteExtension; +} + +export namespace ResponseVerifyVoteExtension { + export type AsObject = { + status: ResponseVerifyVoteExtension.VerifyStatusMap[keyof ResponseVerifyVoteExtension.VerifyStatusMap], + } + + export interface VerifyStatusMap { + UNKNOWN: 0; + ACCEPT: 1; + REJECT: 2; + } + + export const VerifyStatus: VerifyStatusMap; +} + +export class ResponseFinalizeBlock extends jspb.Message { + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value?: Event, index?: number): Event; + + clearTxResultsList(): void; + getTxResultsList(): Array; + setTxResultsList(value: Array): void; + addTxResults(value?: ExecTxResult, index?: number): ExecTxResult; + + clearValidatorUpdatesList(): void; + getValidatorUpdatesList(): Array; + setValidatorUpdatesList(value: Array): void; + addValidatorUpdates(value?: ValidatorUpdate, index?: number): ValidatorUpdate; + + hasConsensusParamUpdates(): boolean; + clearConsensusParamUpdates(): void; + getConsensusParamUpdates(): tendermint_types_params_pb.ConsensusParams | undefined; + setConsensusParamUpdates(value?: tendermint_types_params_pb.ConsensusParams): void; + + getAppHash(): Uint8Array | string; + getAppHash_asU8(): Uint8Array; + getAppHash_asB64(): string; + setAppHash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseFinalizeBlock.AsObject; + static toObject(includeInstance: boolean, msg: ResponseFinalizeBlock): ResponseFinalizeBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseFinalizeBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseFinalizeBlock; + static deserializeBinaryFromReader(message: ResponseFinalizeBlock, reader: jspb.BinaryReader): ResponseFinalizeBlock; +} + +export namespace ResponseFinalizeBlock { + export type AsObject = { + eventsList: Array, + txResultsList: Array, + validatorUpdatesList: Array, + consensusParamUpdates?: tendermint_types_params_pb.ConsensusParams.AsObject, + appHash: Uint8Array | string, + } +} + export class CommitInfo extends jspb.Message { getRound(): number; setRound(value: number): void; @@ -1444,6 +1498,58 @@ export namespace EventAttribute { } } +export class ExecTxResult extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getLog(): string; + setLog(value: string): void; + + getInfo(): string; + setInfo(value: string): void; + + getGasWanted(): number; + setGasWanted(value: number): void; + + getGasUsed(): number; + setGasUsed(value: number): void; + + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value?: Event, index?: number): Event; + + getCodespace(): string; + setCodespace(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExecTxResult.AsObject; + static toObject(includeInstance: boolean, msg: ExecTxResult): ExecTxResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExecTxResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExecTxResult; + static deserializeBinaryFromReader(message: ExecTxResult, reader: jspb.BinaryReader): ExecTxResult; +} + +export namespace ExecTxResult { + export type AsObject = { + code: number, + data: Uint8Array | string, + log: string, + info: string, + gasWanted: number, + gasUsed: number, + eventsList: Array, + codespace: string, + } +} + export class TxResult extends jspb.Message { getHeight(): number; setHeight(value: number): void; @@ -1458,8 +1564,8 @@ export class TxResult extends jspb.Message { hasResult(): boolean; clearResult(): void; - getResult(): ResponseDeliverTx | undefined; - setResult(value?: ResponseDeliverTx): void; + getResult(): ExecTxResult | undefined; + setResult(value?: ExecTxResult): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TxResult.AsObject; @@ -1476,7 +1582,7 @@ export namespace TxResult { height: number, index: number, tx: Uint8Array | string, - result?: ResponseDeliverTx.AsObject, + result?: ExecTxResult.AsObject, } } @@ -1538,8 +1644,8 @@ export class VoteInfo extends jspb.Message { getValidator(): Validator | undefined; setValidator(value?: Validator): void; - getSignedLastBlock(): boolean; - setSignedLastBlock(value: boolean): void; + getBlockIdFlag(): tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap]; + setBlockIdFlag(value: tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap]): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): VoteInfo.AsObject; @@ -1554,7 +1660,7 @@ export class VoteInfo extends jspb.Message { export namespace VoteInfo { export type AsObject = { validator?: Validator.AsObject, - signedLastBlock: boolean, + blockIdFlag: tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap], } } @@ -1564,14 +1670,19 @@ export class ExtendedVoteInfo extends jspb.Message { getValidator(): Validator | undefined; setValidator(value?: Validator): void; - getSignedLastBlock(): boolean; - setSignedLastBlock(value: boolean): void; - getVoteExtension(): Uint8Array | string; getVoteExtension_asU8(): Uint8Array; getVoteExtension_asB64(): string; setVoteExtension(value: Uint8Array | string): void; + getExtensionSignature(): Uint8Array | string; + getExtensionSignature_asU8(): Uint8Array; + getExtensionSignature_asB64(): string; + setExtensionSignature(value: Uint8Array | string): void; + + getBlockIdFlag(): tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap]; + setBlockIdFlag(value: tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap]): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExtendedVoteInfo.AsObject; static toObject(includeInstance: boolean, msg: ExtendedVoteInfo): ExtendedVoteInfo.AsObject; @@ -1585,8 +1696,9 @@ export class ExtendedVoteInfo extends jspb.Message { export namespace ExtendedVoteInfo { export type AsObject = { validator?: Validator.AsObject, - signedLastBlock: boolean, voteExtension: Uint8Array | string, + extensionSignature: Uint8Array | string, + blockIdFlag: tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap], } } diff --git a/proto/tendermint/abci/types_pb.js b/codegen/tendermint/abci/types_pb.js similarity index 86% rename from proto/tendermint/abci/types_pb.js rename to codegen/tendermint/abci/types_pb.js index 1c16772..4d00a14 100644 --- a/proto/tendermint/abci/types_pb.js +++ b/codegen/tendermint/abci/types_pb.js @@ -17,12 +17,12 @@ var global = (function() { return this || window || global || self || Function(' var tendermint_crypto_proof_pb = require('../../tendermint/crypto/proof_pb.js'); goog.object.extend(proto, tendermint_crypto_proof_pb); -var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); -goog.object.extend(proto, tendermint_types_types_pb); var tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js'); goog.object.extend(proto, tendermint_crypto_keys_pb); var tendermint_types_params_pb = require('../../tendermint/types/params_pb.js'); goog.object.extend(proto, tendermint_types_params_pb); +var tendermint_types_validator_pb = require('../../tendermint/types/validator_pb.js'); +goog.object.extend(proto, tendermint_types_validator_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); @@ -31,6 +31,7 @@ goog.exportSymbol('proto.tendermint.abci.CheckTxType', null, global); goog.exportSymbol('proto.tendermint.abci.CommitInfo', null, global); goog.exportSymbol('proto.tendermint.abci.Event', null, global); goog.exportSymbol('proto.tendermint.abci.EventAttribute', null, global); +goog.exportSymbol('proto.tendermint.abci.ExecTxResult', null, global); goog.exportSymbol('proto.tendermint.abci.ExtendedCommitInfo', null, global); goog.exportSymbol('proto.tendermint.abci.ExtendedVoteInfo', null, global); goog.exportSymbol('proto.tendermint.abci.Misbehavior', null, global); @@ -38,12 +39,11 @@ goog.exportSymbol('proto.tendermint.abci.MisbehaviorType', null, global); goog.exportSymbol('proto.tendermint.abci.Request', null, global); goog.exportSymbol('proto.tendermint.abci.Request.ValueCase', null, global); goog.exportSymbol('proto.tendermint.abci.RequestApplySnapshotChunk', null, global); -goog.exportSymbol('proto.tendermint.abci.RequestBeginBlock', null, global); goog.exportSymbol('proto.tendermint.abci.RequestCheckTx', null, global); goog.exportSymbol('proto.tendermint.abci.RequestCommit', null, global); -goog.exportSymbol('proto.tendermint.abci.RequestDeliverTx', null, global); goog.exportSymbol('proto.tendermint.abci.RequestEcho', null, global); -goog.exportSymbol('proto.tendermint.abci.RequestEndBlock', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestExtendVote', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestFinalizeBlock', null, global); goog.exportSymbol('proto.tendermint.abci.RequestFlush', null, global); goog.exportSymbol('proto.tendermint.abci.RequestInfo', null, global); goog.exportSymbol('proto.tendermint.abci.RequestInitChain', null, global); @@ -53,17 +53,17 @@ goog.exportSymbol('proto.tendermint.abci.RequestOfferSnapshot', null, global); goog.exportSymbol('proto.tendermint.abci.RequestPrepareProposal', null, global); goog.exportSymbol('proto.tendermint.abci.RequestProcessProposal', null, global); goog.exportSymbol('proto.tendermint.abci.RequestQuery', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestVerifyVoteExtension', null, global); goog.exportSymbol('proto.tendermint.abci.Response', null, global); goog.exportSymbol('proto.tendermint.abci.Response.ValueCase', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseApplySnapshotChunk', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseApplySnapshotChunk.Result', null, global); -goog.exportSymbol('proto.tendermint.abci.ResponseBeginBlock', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseCheckTx', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseCommit', null, global); -goog.exportSymbol('proto.tendermint.abci.ResponseDeliverTx', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseEcho', null, global); -goog.exportSymbol('proto.tendermint.abci.ResponseEndBlock', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseException', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseExtendVote', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseFinalizeBlock', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseFlush', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseInfo', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseInitChain', null, global); @@ -75,6 +75,8 @@ goog.exportSymbol('proto.tendermint.abci.ResponsePrepareProposal', null, global) goog.exportSymbol('proto.tendermint.abci.ResponseProcessProposal', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseProcessProposal.ProposalStatus', null, global); goog.exportSymbol('proto.tendermint.abci.ResponseQuery', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseVerifyVoteExtension', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseVerifyVoteExtension.VerifyStatus', null, global); goog.exportSymbol('proto.tendermint.abci.Snapshot', null, global); goog.exportSymbol('proto.tendermint.abci.TxResult', null, global); goog.exportSymbol('proto.tendermint.abci.Validator', null, global); @@ -216,16 +218,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestBeginBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestBeginBlock.repeatedFields_, null); +proto.tendermint.abci.RequestCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.RequestBeginBlock, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestCheckTx, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestBeginBlock.displayName = 'proto.tendermint.abci.RequestBeginBlock'; + proto.tendermint.abci.RequestCheckTx.displayName = 'proto.tendermint.abci.RequestCheckTx'; } /** * Generated by JsPbCodeGenerator. @@ -237,16 +239,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestCheckTx = function(opt_data) { +proto.tendermint.abci.RequestCommit = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.RequestCheckTx, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestCommit, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestCheckTx.displayName = 'proto.tendermint.abci.RequestCheckTx'; + proto.tendermint.abci.RequestCommit.displayName = 'proto.tendermint.abci.RequestCommit'; } /** * Generated by JsPbCodeGenerator. @@ -258,16 +260,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestDeliverTx = function(opt_data) { +proto.tendermint.abci.RequestListSnapshots = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.RequestDeliverTx, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestListSnapshots, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestDeliverTx.displayName = 'proto.tendermint.abci.RequestDeliverTx'; + proto.tendermint.abci.RequestListSnapshots.displayName = 'proto.tendermint.abci.RequestListSnapshots'; } /** * Generated by JsPbCodeGenerator. @@ -279,16 +281,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestEndBlock = function(opt_data) { +proto.tendermint.abci.RequestOfferSnapshot = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.RequestEndBlock, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestOfferSnapshot, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestEndBlock.displayName = 'proto.tendermint.abci.RequestEndBlock'; + proto.tendermint.abci.RequestOfferSnapshot.displayName = 'proto.tendermint.abci.RequestOfferSnapshot'; } /** * Generated by JsPbCodeGenerator. @@ -300,16 +302,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestCommit = function(opt_data) { +proto.tendermint.abci.RequestLoadSnapshotChunk = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.RequestCommit, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestLoadSnapshotChunk, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestCommit.displayName = 'proto.tendermint.abci.RequestCommit'; + proto.tendermint.abci.RequestLoadSnapshotChunk.displayName = 'proto.tendermint.abci.RequestLoadSnapshotChunk'; } /** * Generated by JsPbCodeGenerator. @@ -321,16 +323,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestListSnapshots = function(opt_data) { +proto.tendermint.abci.RequestApplySnapshotChunk = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.RequestListSnapshots, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestApplySnapshotChunk, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestListSnapshots.displayName = 'proto.tendermint.abci.RequestListSnapshots'; + proto.tendermint.abci.RequestApplySnapshotChunk.displayName = 'proto.tendermint.abci.RequestApplySnapshotChunk'; } /** * Generated by JsPbCodeGenerator. @@ -342,16 +344,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestOfferSnapshot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.tendermint.abci.RequestPrepareProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestPrepareProposal.repeatedFields_, null); }; -goog.inherits(proto.tendermint.abci.RequestOfferSnapshot, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestPrepareProposal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestOfferSnapshot.displayName = 'proto.tendermint.abci.RequestOfferSnapshot'; + proto.tendermint.abci.RequestPrepareProposal.displayName = 'proto.tendermint.abci.RequestPrepareProposal'; } /** * Generated by JsPbCodeGenerator. @@ -363,16 +365,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestLoadSnapshotChunk = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.tendermint.abci.RequestProcessProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestProcessProposal.repeatedFields_, null); }; -goog.inherits(proto.tendermint.abci.RequestLoadSnapshotChunk, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestProcessProposal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestLoadSnapshotChunk.displayName = 'proto.tendermint.abci.RequestLoadSnapshotChunk'; + proto.tendermint.abci.RequestProcessProposal.displayName = 'proto.tendermint.abci.RequestProcessProposal'; } /** * Generated by JsPbCodeGenerator. @@ -384,16 +386,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestApplySnapshotChunk = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.tendermint.abci.RequestExtendVote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestExtendVote.repeatedFields_, null); }; -goog.inherits(proto.tendermint.abci.RequestApplySnapshotChunk, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestExtendVote, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestApplySnapshotChunk.displayName = 'proto.tendermint.abci.RequestApplySnapshotChunk'; + proto.tendermint.abci.RequestExtendVote.displayName = 'proto.tendermint.abci.RequestExtendVote'; } /** * Generated by JsPbCodeGenerator. @@ -405,16 +407,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestPrepareProposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestPrepareProposal.repeatedFields_, null); +proto.tendermint.abci.RequestVerifyVoteExtension = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.RequestPrepareProposal, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestVerifyVoteExtension, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestPrepareProposal.displayName = 'proto.tendermint.abci.RequestPrepareProposal'; + proto.tendermint.abci.RequestVerifyVoteExtension.displayName = 'proto.tendermint.abci.RequestVerifyVoteExtension'; } /** * Generated by JsPbCodeGenerator. @@ -426,16 +428,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.RequestProcessProposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestProcessProposal.repeatedFields_, null); +proto.tendermint.abci.RequestFinalizeBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestFinalizeBlock.repeatedFields_, null); }; -goog.inherits(proto.tendermint.abci.RequestProcessProposal, jspb.Message); +goog.inherits(proto.tendermint.abci.RequestFinalizeBlock, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.RequestProcessProposal.displayName = 'proto.tendermint.abci.RequestProcessProposal'; + proto.tendermint.abci.RequestFinalizeBlock.displayName = 'proto.tendermint.abci.RequestFinalizeBlock'; } /** * Generated by JsPbCodeGenerator. @@ -594,16 +596,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseBeginBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseBeginBlock.repeatedFields_, null); +proto.tendermint.abci.ResponseCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseCheckTx.repeatedFields_, null); }; -goog.inherits(proto.tendermint.abci.ResponseBeginBlock, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseCheckTx, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseBeginBlock.displayName = 'proto.tendermint.abci.ResponseBeginBlock'; + proto.tendermint.abci.ResponseCheckTx.displayName = 'proto.tendermint.abci.ResponseCheckTx'; } /** * Generated by JsPbCodeGenerator. @@ -615,16 +617,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseCheckTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseCheckTx.repeatedFields_, null); +proto.tendermint.abci.ResponseCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.ResponseCheckTx, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseCommit, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseCheckTx.displayName = 'proto.tendermint.abci.ResponseCheckTx'; + proto.tendermint.abci.ResponseCommit.displayName = 'proto.tendermint.abci.ResponseCommit'; } /** * Generated by JsPbCodeGenerator. @@ -636,16 +638,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseDeliverTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseDeliverTx.repeatedFields_, null); +proto.tendermint.abci.ResponseListSnapshots = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseListSnapshots.repeatedFields_, null); }; -goog.inherits(proto.tendermint.abci.ResponseDeliverTx, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseListSnapshots, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseDeliverTx.displayName = 'proto.tendermint.abci.ResponseDeliverTx'; + proto.tendermint.abci.ResponseListSnapshots.displayName = 'proto.tendermint.abci.ResponseListSnapshots'; } /** * Generated by JsPbCodeGenerator. @@ -657,16 +659,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseEndBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseEndBlock.repeatedFields_, null); +proto.tendermint.abci.ResponseOfferSnapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.ResponseEndBlock, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseOfferSnapshot, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseEndBlock.displayName = 'proto.tendermint.abci.ResponseEndBlock'; + proto.tendermint.abci.ResponseOfferSnapshot.displayName = 'proto.tendermint.abci.ResponseOfferSnapshot'; } /** * Generated by JsPbCodeGenerator. @@ -678,16 +680,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseCommit = function(opt_data) { +proto.tendermint.abci.ResponseLoadSnapshotChunk = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.ResponseCommit, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseLoadSnapshotChunk, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseCommit.displayName = 'proto.tendermint.abci.ResponseCommit'; + proto.tendermint.abci.ResponseLoadSnapshotChunk.displayName = 'proto.tendermint.abci.ResponseLoadSnapshotChunk'; } /** * Generated by JsPbCodeGenerator. @@ -699,16 +701,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseListSnapshots = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseListSnapshots.repeatedFields_, null); +proto.tendermint.abci.ResponseApplySnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseApplySnapshotChunk.repeatedFields_, null); }; -goog.inherits(proto.tendermint.abci.ResponseListSnapshots, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseApplySnapshotChunk, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseListSnapshots.displayName = 'proto.tendermint.abci.ResponseListSnapshots'; + proto.tendermint.abci.ResponseApplySnapshotChunk.displayName = 'proto.tendermint.abci.ResponseApplySnapshotChunk'; } /** * Generated by JsPbCodeGenerator. @@ -720,16 +722,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseOfferSnapshot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.tendermint.abci.ResponsePrepareProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponsePrepareProposal.repeatedFields_, null); }; -goog.inherits(proto.tendermint.abci.ResponseOfferSnapshot, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponsePrepareProposal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseOfferSnapshot.displayName = 'proto.tendermint.abci.ResponseOfferSnapshot'; + proto.tendermint.abci.ResponsePrepareProposal.displayName = 'proto.tendermint.abci.ResponsePrepareProposal'; } /** * Generated by JsPbCodeGenerator. @@ -741,16 +743,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseLoadSnapshotChunk = function(opt_data) { +proto.tendermint.abci.ResponseProcessProposal = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.ResponseLoadSnapshotChunk, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseProcessProposal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseLoadSnapshotChunk.displayName = 'proto.tendermint.abci.ResponseLoadSnapshotChunk'; + proto.tendermint.abci.ResponseProcessProposal.displayName = 'proto.tendermint.abci.ResponseProcessProposal'; } /** * Generated by JsPbCodeGenerator. @@ -762,16 +764,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseApplySnapshotChunk = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseApplySnapshotChunk.repeatedFields_, null); +proto.tendermint.abci.ResponseExtendVote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.ResponseApplySnapshotChunk, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseExtendVote, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseApplySnapshotChunk.displayName = 'proto.tendermint.abci.ResponseApplySnapshotChunk'; + proto.tendermint.abci.ResponseExtendVote.displayName = 'proto.tendermint.abci.ResponseExtendVote'; } /** * Generated by JsPbCodeGenerator. @@ -783,16 +785,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponsePrepareProposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponsePrepareProposal.repeatedFields_, null); +proto.tendermint.abci.ResponseVerifyVoteExtension = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.tendermint.abci.ResponsePrepareProposal, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseVerifyVoteExtension, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponsePrepareProposal.displayName = 'proto.tendermint.abci.ResponsePrepareProposal'; + proto.tendermint.abci.ResponseVerifyVoteExtension.displayName = 'proto.tendermint.abci.ResponseVerifyVoteExtension'; } /** * Generated by JsPbCodeGenerator. @@ -804,16 +806,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.tendermint.abci.ResponseProcessProposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.tendermint.abci.ResponseFinalizeBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseFinalizeBlock.repeatedFields_, null); }; -goog.inherits(proto.tendermint.abci.ResponseProcessProposal, jspb.Message); +goog.inherits(proto.tendermint.abci.ResponseFinalizeBlock, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.tendermint.abci.ResponseProcessProposal.displayName = 'proto.tendermint.abci.ResponseProcessProposal'; + proto.tendermint.abci.ResponseFinalizeBlock.displayName = 'proto.tendermint.abci.ResponseFinalizeBlock'; } /** * Generated by JsPbCodeGenerator. @@ -899,6 +901,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.tendermint.abci.EventAttribute.displayName = 'proto.tendermint.abci.EventAttribute'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ExecTxResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ExecTxResult.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ExecTxResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ExecTxResult.displayName = 'proto.tendermint.abci.ExecTxResult'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -1055,7 +1078,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array>} * @const */ -proto.tendermint.abci.Request.oneofGroups_ = [[1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17]]; +proto.tendermint.abci.Request.oneofGroups_ = [[1,2,3,5,6,8,11,12,13,14,15,16,17,18,19,20]]; /** * @enum {number} @@ -1067,17 +1090,17 @@ proto.tendermint.abci.Request.ValueCase = { INFO: 3, INIT_CHAIN: 5, QUERY: 6, - BEGIN_BLOCK: 7, CHECK_TX: 8, - DELIVER_TX: 9, - END_BLOCK: 10, COMMIT: 11, LIST_SNAPSHOTS: 12, OFFER_SNAPSHOT: 13, LOAD_SNAPSHOT_CHUNK: 14, APPLY_SNAPSHOT_CHUNK: 15, PREPARE_PROPOSAL: 16, - PROCESS_PROPOSAL: 17 + PROCESS_PROPOSAL: 17, + EXTEND_VOTE: 18, + VERIFY_VOTE_EXTENSION: 19, + FINALIZE_BLOCK: 20 }; /** @@ -1123,17 +1146,17 @@ proto.tendermint.abci.Request.toObject = function(includeInstance, msg) { info: (f = msg.getInfo()) && proto.tendermint.abci.RequestInfo.toObject(includeInstance, f), initChain: (f = msg.getInitChain()) && proto.tendermint.abci.RequestInitChain.toObject(includeInstance, f), query: (f = msg.getQuery()) && proto.tendermint.abci.RequestQuery.toObject(includeInstance, f), - beginBlock: (f = msg.getBeginBlock()) && proto.tendermint.abci.RequestBeginBlock.toObject(includeInstance, f), checkTx: (f = msg.getCheckTx()) && proto.tendermint.abci.RequestCheckTx.toObject(includeInstance, f), - deliverTx: (f = msg.getDeliverTx()) && proto.tendermint.abci.RequestDeliverTx.toObject(includeInstance, f), - endBlock: (f = msg.getEndBlock()) && proto.tendermint.abci.RequestEndBlock.toObject(includeInstance, f), commit: (f = msg.getCommit()) && proto.tendermint.abci.RequestCommit.toObject(includeInstance, f), listSnapshots: (f = msg.getListSnapshots()) && proto.tendermint.abci.RequestListSnapshots.toObject(includeInstance, f), offerSnapshot: (f = msg.getOfferSnapshot()) && proto.tendermint.abci.RequestOfferSnapshot.toObject(includeInstance, f), loadSnapshotChunk: (f = msg.getLoadSnapshotChunk()) && proto.tendermint.abci.RequestLoadSnapshotChunk.toObject(includeInstance, f), applySnapshotChunk: (f = msg.getApplySnapshotChunk()) && proto.tendermint.abci.RequestApplySnapshotChunk.toObject(includeInstance, f), prepareProposal: (f = msg.getPrepareProposal()) && proto.tendermint.abci.RequestPrepareProposal.toObject(includeInstance, f), - processProposal: (f = msg.getProcessProposal()) && proto.tendermint.abci.RequestProcessProposal.toObject(includeInstance, f) + processProposal: (f = msg.getProcessProposal()) && proto.tendermint.abci.RequestProcessProposal.toObject(includeInstance, f), + extendVote: (f = msg.getExtendVote()) && proto.tendermint.abci.RequestExtendVote.toObject(includeInstance, f), + verifyVoteExtension: (f = msg.getVerifyVoteExtension()) && proto.tendermint.abci.RequestVerifyVoteExtension.toObject(includeInstance, f), + finalizeBlock: (f = msg.getFinalizeBlock()) && proto.tendermint.abci.RequestFinalizeBlock.toObject(includeInstance, f) }; if (includeInstance) { @@ -1195,26 +1218,11 @@ proto.tendermint.abci.Request.deserializeBinaryFromReader = function(msg, reader reader.readMessage(value,proto.tendermint.abci.RequestQuery.deserializeBinaryFromReader); msg.setQuery(value); break; - case 7: - var value = new proto.tendermint.abci.RequestBeginBlock; - reader.readMessage(value,proto.tendermint.abci.RequestBeginBlock.deserializeBinaryFromReader); - msg.setBeginBlock(value); - break; case 8: var value = new proto.tendermint.abci.RequestCheckTx; reader.readMessage(value,proto.tendermint.abci.RequestCheckTx.deserializeBinaryFromReader); msg.setCheckTx(value); break; - case 9: - var value = new proto.tendermint.abci.RequestDeliverTx; - reader.readMessage(value,proto.tendermint.abci.RequestDeliverTx.deserializeBinaryFromReader); - msg.setDeliverTx(value); - break; - case 10: - var value = new proto.tendermint.abci.RequestEndBlock; - reader.readMessage(value,proto.tendermint.abci.RequestEndBlock.deserializeBinaryFromReader); - msg.setEndBlock(value); - break; case 11: var value = new proto.tendermint.abci.RequestCommit; reader.readMessage(value,proto.tendermint.abci.RequestCommit.deserializeBinaryFromReader); @@ -1250,6 +1258,21 @@ proto.tendermint.abci.Request.deserializeBinaryFromReader = function(msg, reader reader.readMessage(value,proto.tendermint.abci.RequestProcessProposal.deserializeBinaryFromReader); msg.setProcessProposal(value); break; + case 18: + var value = new proto.tendermint.abci.RequestExtendVote; + reader.readMessage(value,proto.tendermint.abci.RequestExtendVote.deserializeBinaryFromReader); + msg.setExtendVote(value); + break; + case 19: + var value = new proto.tendermint.abci.RequestVerifyVoteExtension; + reader.readMessage(value,proto.tendermint.abci.RequestVerifyVoteExtension.deserializeBinaryFromReader); + msg.setVerifyVoteExtension(value); + break; + case 20: + var value = new proto.tendermint.abci.RequestFinalizeBlock; + reader.readMessage(value,proto.tendermint.abci.RequestFinalizeBlock.deserializeBinaryFromReader); + msg.setFinalizeBlock(value); + break; default: reader.skipField(); break; @@ -1319,14 +1342,6 @@ proto.tendermint.abci.Request.serializeBinaryToWriter = function(message, writer proto.tendermint.abci.RequestQuery.serializeBinaryToWriter ); } - f = message.getBeginBlock(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.tendermint.abci.RequestBeginBlock.serializeBinaryToWriter - ); - } f = message.getCheckTx(); if (f != null) { writer.writeMessage( @@ -1335,22 +1350,6 @@ proto.tendermint.abci.Request.serializeBinaryToWriter = function(message, writer proto.tendermint.abci.RequestCheckTx.serializeBinaryToWriter ); } - f = message.getDeliverTx(); - if (f != null) { - writer.writeMessage( - 9, - f, - proto.tendermint.abci.RequestDeliverTx.serializeBinaryToWriter - ); - } - f = message.getEndBlock(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.tendermint.abci.RequestEndBlock.serializeBinaryToWriter - ); - } f = message.getCommit(); if (f != null) { writer.writeMessage( @@ -1407,6 +1406,30 @@ proto.tendermint.abci.Request.serializeBinaryToWriter = function(message, writer proto.tendermint.abci.RequestProcessProposal.serializeBinaryToWriter ); } + f = message.getExtendVote(); + if (f != null) { + writer.writeMessage( + 18, + f, + proto.tendermint.abci.RequestExtendVote.serializeBinaryToWriter + ); + } + f = message.getVerifyVoteExtension(); + if (f != null) { + writer.writeMessage( + 19, + f, + proto.tendermint.abci.RequestVerifyVoteExtension.serializeBinaryToWriter + ); + } + f = message.getFinalizeBlock(); + if (f != null) { + writer.writeMessage( + 20, + f, + proto.tendermint.abci.RequestFinalizeBlock.serializeBinaryToWriter + ); + } }; @@ -1595,43 +1618,6 @@ proto.tendermint.abci.Request.prototype.hasQuery = function() { }; -/** - * optional RequestBeginBlock begin_block = 7; - * @return {?proto.tendermint.abci.RequestBeginBlock} - */ -proto.tendermint.abci.Request.prototype.getBeginBlock = function() { - return /** @type{?proto.tendermint.abci.RequestBeginBlock} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestBeginBlock, 7)); -}; - - -/** - * @param {?proto.tendermint.abci.RequestBeginBlock|undefined} value - * @return {!proto.tendermint.abci.Request} returns this -*/ -proto.tendermint.abci.Request.prototype.setBeginBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 7, proto.tendermint.abci.Request.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.Request} returns this - */ -proto.tendermint.abci.Request.prototype.clearBeginBlock = function() { - return this.setBeginBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tendermint.abci.Request.prototype.hasBeginBlock = function() { - return jspb.Message.getField(this, 7) != null; -}; - - /** * optional RequestCheckTx check_tx = 8; * @return {?proto.tendermint.abci.RequestCheckTx} @@ -1670,21 +1656,21 @@ proto.tendermint.abci.Request.prototype.hasCheckTx = function() { /** - * optional RequestDeliverTx deliver_tx = 9; - * @return {?proto.tendermint.abci.RequestDeliverTx} + * optional RequestCommit commit = 11; + * @return {?proto.tendermint.abci.RequestCommit} */ -proto.tendermint.abci.Request.prototype.getDeliverTx = function() { - return /** @type{?proto.tendermint.abci.RequestDeliverTx} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestDeliverTx, 9)); +proto.tendermint.abci.Request.prototype.getCommit = function() { + return /** @type{?proto.tendermint.abci.RequestCommit} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestCommit, 11)); }; /** - * @param {?proto.tendermint.abci.RequestDeliverTx|undefined} value + * @param {?proto.tendermint.abci.RequestCommit|undefined} value * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.setDeliverTx = function(value) { - return jspb.Message.setOneofWrapperField(this, 9, proto.tendermint.abci.Request.oneofGroups_[0], value); +proto.tendermint.abci.Request.prototype.setCommit = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.tendermint.abci.Request.oneofGroups_[0], value); }; @@ -1692,8 +1678,8 @@ proto.tendermint.abci.Request.prototype.setDeliverTx = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.clearDeliverTx = function() { - return this.setDeliverTx(undefined); +proto.tendermint.abci.Request.prototype.clearCommit = function() { + return this.setCommit(undefined); }; @@ -1701,27 +1687,27 @@ proto.tendermint.abci.Request.prototype.clearDeliverTx = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Request.prototype.hasDeliverTx = function() { - return jspb.Message.getField(this, 9) != null; +proto.tendermint.abci.Request.prototype.hasCommit = function() { + return jspb.Message.getField(this, 11) != null; }; /** - * optional RequestEndBlock end_block = 10; - * @return {?proto.tendermint.abci.RequestEndBlock} + * optional RequestListSnapshots list_snapshots = 12; + * @return {?proto.tendermint.abci.RequestListSnapshots} */ -proto.tendermint.abci.Request.prototype.getEndBlock = function() { - return /** @type{?proto.tendermint.abci.RequestEndBlock} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestEndBlock, 10)); +proto.tendermint.abci.Request.prototype.getListSnapshots = function() { + return /** @type{?proto.tendermint.abci.RequestListSnapshots} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestListSnapshots, 12)); }; /** - * @param {?proto.tendermint.abci.RequestEndBlock|undefined} value + * @param {?proto.tendermint.abci.RequestListSnapshots|undefined} value * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.setEndBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.tendermint.abci.Request.oneofGroups_[0], value); +proto.tendermint.abci.Request.prototype.setListSnapshots = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.tendermint.abci.Request.oneofGroups_[0], value); }; @@ -1729,8 +1715,8 @@ proto.tendermint.abci.Request.prototype.setEndBlock = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.clearEndBlock = function() { - return this.setEndBlock(undefined); +proto.tendermint.abci.Request.prototype.clearListSnapshots = function() { + return this.setListSnapshots(undefined); }; @@ -1738,27 +1724,27 @@ proto.tendermint.abci.Request.prototype.clearEndBlock = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Request.prototype.hasEndBlock = function() { - return jspb.Message.getField(this, 10) != null; +proto.tendermint.abci.Request.prototype.hasListSnapshots = function() { + return jspb.Message.getField(this, 12) != null; }; /** - * optional RequestCommit commit = 11; - * @return {?proto.tendermint.abci.RequestCommit} + * optional RequestOfferSnapshot offer_snapshot = 13; + * @return {?proto.tendermint.abci.RequestOfferSnapshot} */ -proto.tendermint.abci.Request.prototype.getCommit = function() { - return /** @type{?proto.tendermint.abci.RequestCommit} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestCommit, 11)); +proto.tendermint.abci.Request.prototype.getOfferSnapshot = function() { + return /** @type{?proto.tendermint.abci.RequestOfferSnapshot} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestOfferSnapshot, 13)); }; /** - * @param {?proto.tendermint.abci.RequestCommit|undefined} value + * @param {?proto.tendermint.abci.RequestOfferSnapshot|undefined} value * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.setCommit = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.tendermint.abci.Request.oneofGroups_[0], value); +proto.tendermint.abci.Request.prototype.setOfferSnapshot = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.tendermint.abci.Request.oneofGroups_[0], value); }; @@ -1766,8 +1752,8 @@ proto.tendermint.abci.Request.prototype.setCommit = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.clearCommit = function() { - return this.setCommit(undefined); +proto.tendermint.abci.Request.prototype.clearOfferSnapshot = function() { + return this.setOfferSnapshot(undefined); }; @@ -1775,27 +1761,27 @@ proto.tendermint.abci.Request.prototype.clearCommit = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Request.prototype.hasCommit = function() { - return jspb.Message.getField(this, 11) != null; +proto.tendermint.abci.Request.prototype.hasOfferSnapshot = function() { + return jspb.Message.getField(this, 13) != null; }; /** - * optional RequestListSnapshots list_snapshots = 12; - * @return {?proto.tendermint.abci.RequestListSnapshots} + * optional RequestLoadSnapshotChunk load_snapshot_chunk = 14; + * @return {?proto.tendermint.abci.RequestLoadSnapshotChunk} */ -proto.tendermint.abci.Request.prototype.getListSnapshots = function() { - return /** @type{?proto.tendermint.abci.RequestListSnapshots} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestListSnapshots, 12)); +proto.tendermint.abci.Request.prototype.getLoadSnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.RequestLoadSnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestLoadSnapshotChunk, 14)); }; /** - * @param {?proto.tendermint.abci.RequestListSnapshots|undefined} value + * @param {?proto.tendermint.abci.RequestLoadSnapshotChunk|undefined} value * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.setListSnapshots = function(value) { - return jspb.Message.setOneofWrapperField(this, 12, proto.tendermint.abci.Request.oneofGroups_[0], value); +proto.tendermint.abci.Request.prototype.setLoadSnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.tendermint.abci.Request.oneofGroups_[0], value); }; @@ -1803,8 +1789,8 @@ proto.tendermint.abci.Request.prototype.setListSnapshots = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.clearListSnapshots = function() { - return this.setListSnapshots(undefined); +proto.tendermint.abci.Request.prototype.clearLoadSnapshotChunk = function() { + return this.setLoadSnapshotChunk(undefined); }; @@ -1812,27 +1798,27 @@ proto.tendermint.abci.Request.prototype.clearListSnapshots = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Request.prototype.hasListSnapshots = function() { - return jspb.Message.getField(this, 12) != null; +proto.tendermint.abci.Request.prototype.hasLoadSnapshotChunk = function() { + return jspb.Message.getField(this, 14) != null; }; /** - * optional RequestOfferSnapshot offer_snapshot = 13; - * @return {?proto.tendermint.abci.RequestOfferSnapshot} + * optional RequestApplySnapshotChunk apply_snapshot_chunk = 15; + * @return {?proto.tendermint.abci.RequestApplySnapshotChunk} */ -proto.tendermint.abci.Request.prototype.getOfferSnapshot = function() { - return /** @type{?proto.tendermint.abci.RequestOfferSnapshot} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestOfferSnapshot, 13)); +proto.tendermint.abci.Request.prototype.getApplySnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.RequestApplySnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestApplySnapshotChunk, 15)); }; /** - * @param {?proto.tendermint.abci.RequestOfferSnapshot|undefined} value + * @param {?proto.tendermint.abci.RequestApplySnapshotChunk|undefined} value * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.setOfferSnapshot = function(value) { - return jspb.Message.setOneofWrapperField(this, 13, proto.tendermint.abci.Request.oneofGroups_[0], value); +proto.tendermint.abci.Request.prototype.setApplySnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.tendermint.abci.Request.oneofGroups_[0], value); }; @@ -1840,8 +1826,8 @@ proto.tendermint.abci.Request.prototype.setOfferSnapshot = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.clearOfferSnapshot = function() { - return this.setOfferSnapshot(undefined); +proto.tendermint.abci.Request.prototype.clearApplySnapshotChunk = function() { + return this.setApplySnapshotChunk(undefined); }; @@ -1849,27 +1835,27 @@ proto.tendermint.abci.Request.prototype.clearOfferSnapshot = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Request.prototype.hasOfferSnapshot = function() { - return jspb.Message.getField(this, 13) != null; +proto.tendermint.abci.Request.prototype.hasApplySnapshotChunk = function() { + return jspb.Message.getField(this, 15) != null; }; /** - * optional RequestLoadSnapshotChunk load_snapshot_chunk = 14; - * @return {?proto.tendermint.abci.RequestLoadSnapshotChunk} + * optional RequestPrepareProposal prepare_proposal = 16; + * @return {?proto.tendermint.abci.RequestPrepareProposal} */ -proto.tendermint.abci.Request.prototype.getLoadSnapshotChunk = function() { - return /** @type{?proto.tendermint.abci.RequestLoadSnapshotChunk} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestLoadSnapshotChunk, 14)); +proto.tendermint.abci.Request.prototype.getPrepareProposal = function() { + return /** @type{?proto.tendermint.abci.RequestPrepareProposal} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestPrepareProposal, 16)); }; /** - * @param {?proto.tendermint.abci.RequestLoadSnapshotChunk|undefined} value + * @param {?proto.tendermint.abci.RequestPrepareProposal|undefined} value * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.setLoadSnapshotChunk = function(value) { - return jspb.Message.setOneofWrapperField(this, 14, proto.tendermint.abci.Request.oneofGroups_[0], value); +proto.tendermint.abci.Request.prototype.setPrepareProposal = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.tendermint.abci.Request.oneofGroups_[0], value); }; @@ -1877,8 +1863,8 @@ proto.tendermint.abci.Request.prototype.setLoadSnapshotChunk = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.clearLoadSnapshotChunk = function() { - return this.setLoadSnapshotChunk(undefined); +proto.tendermint.abci.Request.prototype.clearPrepareProposal = function() { + return this.setPrepareProposal(undefined); }; @@ -1886,27 +1872,27 @@ proto.tendermint.abci.Request.prototype.clearLoadSnapshotChunk = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Request.prototype.hasLoadSnapshotChunk = function() { - return jspb.Message.getField(this, 14) != null; +proto.tendermint.abci.Request.prototype.hasPrepareProposal = function() { + return jspb.Message.getField(this, 16) != null; }; /** - * optional RequestApplySnapshotChunk apply_snapshot_chunk = 15; - * @return {?proto.tendermint.abci.RequestApplySnapshotChunk} + * optional RequestProcessProposal process_proposal = 17; + * @return {?proto.tendermint.abci.RequestProcessProposal} */ -proto.tendermint.abci.Request.prototype.getApplySnapshotChunk = function() { - return /** @type{?proto.tendermint.abci.RequestApplySnapshotChunk} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestApplySnapshotChunk, 15)); +proto.tendermint.abci.Request.prototype.getProcessProposal = function() { + return /** @type{?proto.tendermint.abci.RequestProcessProposal} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestProcessProposal, 17)); }; /** - * @param {?proto.tendermint.abci.RequestApplySnapshotChunk|undefined} value + * @param {?proto.tendermint.abci.RequestProcessProposal|undefined} value * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.setApplySnapshotChunk = function(value) { - return jspb.Message.setOneofWrapperField(this, 15, proto.tendermint.abci.Request.oneofGroups_[0], value); +proto.tendermint.abci.Request.prototype.setProcessProposal = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.tendermint.abci.Request.oneofGroups_[0], value); }; @@ -1914,8 +1900,8 @@ proto.tendermint.abci.Request.prototype.setApplySnapshotChunk = function(value) * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.clearApplySnapshotChunk = function() { - return this.setApplySnapshotChunk(undefined); +proto.tendermint.abci.Request.prototype.clearProcessProposal = function() { + return this.setProcessProposal(undefined); }; @@ -1923,27 +1909,27 @@ proto.tendermint.abci.Request.prototype.clearApplySnapshotChunk = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Request.prototype.hasApplySnapshotChunk = function() { - return jspb.Message.getField(this, 15) != null; +proto.tendermint.abci.Request.prototype.hasProcessProposal = function() { + return jspb.Message.getField(this, 17) != null; }; /** - * optional RequestPrepareProposal prepare_proposal = 16; - * @return {?proto.tendermint.abci.RequestPrepareProposal} + * optional RequestExtendVote extend_vote = 18; + * @return {?proto.tendermint.abci.RequestExtendVote} */ -proto.tendermint.abci.Request.prototype.getPrepareProposal = function() { - return /** @type{?proto.tendermint.abci.RequestPrepareProposal} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestPrepareProposal, 16)); +proto.tendermint.abci.Request.prototype.getExtendVote = function() { + return /** @type{?proto.tendermint.abci.RequestExtendVote} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestExtendVote, 18)); }; /** - * @param {?proto.tendermint.abci.RequestPrepareProposal|undefined} value + * @param {?proto.tendermint.abci.RequestExtendVote|undefined} value * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.setPrepareProposal = function(value) { - return jspb.Message.setOneofWrapperField(this, 16, proto.tendermint.abci.Request.oneofGroups_[0], value); +proto.tendermint.abci.Request.prototype.setExtendVote = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.tendermint.abci.Request.oneofGroups_[0], value); }; @@ -1951,8 +1937,8 @@ proto.tendermint.abci.Request.prototype.setPrepareProposal = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.clearPrepareProposal = function() { - return this.setPrepareProposal(undefined); +proto.tendermint.abci.Request.prototype.clearExtendVote = function() { + return this.setExtendVote(undefined); }; @@ -1960,27 +1946,27 @@ proto.tendermint.abci.Request.prototype.clearPrepareProposal = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Request.prototype.hasPrepareProposal = function() { - return jspb.Message.getField(this, 16) != null; +proto.tendermint.abci.Request.prototype.hasExtendVote = function() { + return jspb.Message.getField(this, 18) != null; }; /** - * optional RequestProcessProposal process_proposal = 17; - * @return {?proto.tendermint.abci.RequestProcessProposal} + * optional RequestVerifyVoteExtension verify_vote_extension = 19; + * @return {?proto.tendermint.abci.RequestVerifyVoteExtension} */ -proto.tendermint.abci.Request.prototype.getProcessProposal = function() { - return /** @type{?proto.tendermint.abci.RequestProcessProposal} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestProcessProposal, 17)); +proto.tendermint.abci.Request.prototype.getVerifyVoteExtension = function() { + return /** @type{?proto.tendermint.abci.RequestVerifyVoteExtension} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestVerifyVoteExtension, 19)); }; /** - * @param {?proto.tendermint.abci.RequestProcessProposal|undefined} value + * @param {?proto.tendermint.abci.RequestVerifyVoteExtension|undefined} value * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.setProcessProposal = function(value) { - return jspb.Message.setOneofWrapperField(this, 17, proto.tendermint.abci.Request.oneofGroups_[0], value); +proto.tendermint.abci.Request.prototype.setVerifyVoteExtension = function(value) { + return jspb.Message.setOneofWrapperField(this, 19, proto.tendermint.abci.Request.oneofGroups_[0], value); }; @@ -1988,8 +1974,8 @@ proto.tendermint.abci.Request.prototype.setProcessProposal = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Request} returns this */ -proto.tendermint.abci.Request.prototype.clearProcessProposal = function() { - return this.setProcessProposal(undefined); +proto.tendermint.abci.Request.prototype.clearVerifyVoteExtension = function() { + return this.setVerifyVoteExtension(undefined); }; @@ -1997,8 +1983,45 @@ proto.tendermint.abci.Request.prototype.clearProcessProposal = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Request.prototype.hasProcessProposal = function() { - return jspb.Message.getField(this, 17) != null; +proto.tendermint.abci.Request.prototype.hasVerifyVoteExtension = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional RequestFinalizeBlock finalize_block = 20; + * @return {?proto.tendermint.abci.RequestFinalizeBlock} + */ +proto.tendermint.abci.Request.prototype.getFinalizeBlock = function() { + return /** @type{?proto.tendermint.abci.RequestFinalizeBlock} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestFinalizeBlock, 20)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestFinalizeBlock|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setFinalizeBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 20, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearFinalizeBlock = function() { + return this.setFinalizeBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasFinalizeBlock = function() { + return jspb.Message.getField(this, 20) != null; }; @@ -3074,13 +3097,6 @@ proto.tendermint.abci.RequestQuery.prototype.setProve = function(value) { -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tendermint.abci.RequestBeginBlock.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3096,8 +3112,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestBeginBlock.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestCheckTx.toObject(opt_includeInstance, this); }; @@ -3106,17 +3122,14 @@ proto.tendermint.abci.RequestBeginBlock.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestBeginBlock} msg The msg instance to transform. + * @param {!proto.tendermint.abci.RequestCheckTx} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestBeginBlock.toObject = function(includeInstance, msg) { +proto.tendermint.abci.RequestCheckTx.toObject = function(includeInstance, msg) { var f, obj = { - hash: msg.getHash_asB64(), - header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f), - lastCommitInfo: (f = msg.getLastCommitInfo()) && proto.tendermint.abci.CommitInfo.toObject(includeInstance, f), - byzantineValidatorsList: jspb.Message.toObjectList(msg.getByzantineValidatorsList(), - proto.tendermint.abci.Misbehavior.toObject, includeInstance) + tx: msg.getTx_asB64(), + type: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -3130,23 +3143,23 @@ proto.tendermint.abci.RequestBeginBlock.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestBeginBlock} + * @return {!proto.tendermint.abci.RequestCheckTx} */ -proto.tendermint.abci.RequestBeginBlock.deserializeBinary = function(bytes) { +proto.tendermint.abci.RequestCheckTx.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestBeginBlock; - return proto.tendermint.abci.RequestBeginBlock.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.RequestCheckTx; + return proto.tendermint.abci.RequestCheckTx.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestBeginBlock} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.RequestCheckTx} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestBeginBlock} + * @return {!proto.tendermint.abci.RequestCheckTx} */ -proto.tendermint.abci.RequestBeginBlock.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.RequestCheckTx.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3155,22 +3168,11 @@ proto.tendermint.abci.RequestBeginBlock.deserializeBinaryFromReader = function(m switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); + msg.setTx(value); break; case 2: - var value = new tendermint_types_types_pb.Header; - reader.readMessage(value,tendermint_types_types_pb.Header.deserializeBinaryFromReader); - msg.setHeader(value); - break; - case 3: - var value = new proto.tendermint.abci.CommitInfo; - reader.readMessage(value,proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader); - msg.setLastCommitInfo(value); - break; - case 4: - var value = new proto.tendermint.abci.Misbehavior; - reader.readMessage(value,proto.tendermint.abci.Misbehavior.deserializeBinaryFromReader); - msg.addByzantineValidators(value); + var value = /** @type {!proto.tendermint.abci.CheckTxType} */ (reader.readEnum()); + msg.setType(value); break; default: reader.skipField(); @@ -3185,9 +3187,9 @@ proto.tendermint.abci.RequestBeginBlock.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.RequestBeginBlock.prototype.serializeBinary = function() { +proto.tendermint.abci.RequestCheckTx.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestBeginBlock.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.RequestCheckTx.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3195,197 +3197,187 @@ proto.tendermint.abci.RequestBeginBlock.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestBeginBlock} message + * @param {!proto.tendermint.abci.RequestCheckTx} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestBeginBlock.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.RequestCheckTx.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHash_asU8(); + f = message.getTx_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getHeader(); - if (f != null) { - writer.writeMessage( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 2, - f, - tendermint_types_types_pb.Header.serializeBinaryToWriter - ); - } - f = message.getLastCommitInfo(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.tendermint.abci.CommitInfo.serializeBinaryToWriter - ); - } - f = message.getByzantineValidatorsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.tendermint.abci.Misbehavior.serializeBinaryToWriter + f ); } }; /** - * optional bytes hash = 1; + * optional bytes tx = 1; * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.RequestBeginBlock.prototype.getHash = function() { +proto.tendermint.abci.RequestCheckTx.prototype.getTx = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes hash = 1; - * This is a type-conversion wrapper around `getHash()` + * optional bytes tx = 1; + * This is a type-conversion wrapper around `getTx()` * @return {string} */ -proto.tendermint.abci.RequestBeginBlock.prototype.getHash_asB64 = function() { +proto.tendermint.abci.RequestCheckTx.prototype.getTx_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); + this.getTx())); }; /** - * optional bytes hash = 1; + * optional bytes tx = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` + * This is a type-conversion wrapper around `getTx()` * @return {!Uint8Array} */ -proto.tendermint.abci.RequestBeginBlock.prototype.getHash_asU8 = function() { +proto.tendermint.abci.RequestCheckTx.prototype.getTx_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); + this.getTx())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + * @return {!proto.tendermint.abci.RequestCheckTx} returns this */ -proto.tendermint.abci.RequestBeginBlock.prototype.setHash = function(value) { +proto.tendermint.abci.RequestCheckTx.prototype.setTx = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional tendermint.types.Header header = 2; - * @return {?proto.tendermint.types.Header} + * optional CheckTxType type = 2; + * @return {!proto.tendermint.abci.CheckTxType} */ -proto.tendermint.abci.RequestBeginBlock.prototype.getHeader = function() { - return /** @type{?proto.tendermint.types.Header} */ ( - jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 2)); +proto.tendermint.abci.RequestCheckTx.prototype.getType = function() { + return /** @type {!proto.tendermint.abci.CheckTxType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {?proto.tendermint.types.Header|undefined} value - * @return {!proto.tendermint.abci.RequestBeginBlock} returns this -*/ -proto.tendermint.abci.RequestBeginBlock.prototype.setHeader = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + * @param {!proto.tendermint.abci.CheckTxType} value + * @return {!proto.tendermint.abci.RequestCheckTx} returns this + */ +proto.tendermint.abci.RequestCheckTx.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.RequestBeginBlock} returns this - */ -proto.tendermint.abci.RequestBeginBlock.prototype.clearHeader = function() { - return this.setHeader(undefined); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Returns whether this field is set. - * @return {boolean} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.tendermint.abci.RequestBeginBlock.prototype.hasHeader = function() { - return jspb.Message.getField(this, 2) != null; +proto.tendermint.abci.RequestCommit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestCommit.toObject(opt_includeInstance, this); }; /** - * optional CommitInfo last_commit_info = 3; - * @return {?proto.tendermint.abci.CommitInfo} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestCommit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestBeginBlock.prototype.getLastCommitInfo = function() { - return /** @type{?proto.tendermint.abci.CommitInfo} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.CommitInfo, 3)); -}; - - -/** - * @param {?proto.tendermint.abci.CommitInfo|undefined} value - * @return {!proto.tendermint.abci.RequestBeginBlock} returns this -*/ -proto.tendermint.abci.RequestBeginBlock.prototype.setLastCommitInfo = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; +proto.tendermint.abci.RequestCommit.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** - * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.RequestBeginBlock} returns this - */ -proto.tendermint.abci.RequestBeginBlock.prototype.clearLastCommitInfo = function() { - return this.setLastCommitInfo(undefined); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestCommit} */ -proto.tendermint.abci.RequestBeginBlock.prototype.hasLastCommitInfo = function() { - return jspb.Message.getField(this, 3) != null; +proto.tendermint.abci.RequestCommit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestCommit; + return proto.tendermint.abci.RequestCommit.deserializeBinaryFromReader(msg, reader); }; /** - * repeated Misbehavior byzantine_validators = 4; - * @return {!Array} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestCommit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestCommit} */ -proto.tendermint.abci.RequestBeginBlock.prototype.getByzantineValidatorsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Misbehavior, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tendermint.abci.RequestBeginBlock} returns this -*/ -proto.tendermint.abci.RequestBeginBlock.prototype.setByzantineValidatorsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); +proto.tendermint.abci.RequestCommit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!proto.tendermint.abci.Misbehavior=} opt_value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.Misbehavior} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.tendermint.abci.RequestBeginBlock.prototype.addByzantineValidators = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.abci.Misbehavior, opt_index); +proto.tendermint.abci.RequestCommit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestCommit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestCommit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestBeginBlock.prototype.clearByzantineValidatorsList = function() { - return this.setByzantineValidatorsList([]); +proto.tendermint.abci.RequestCommit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -3405,8 +3397,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestCheckTx.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestListSnapshots.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestListSnapshots.toObject(opt_includeInstance, this); }; @@ -3415,14 +3407,13 @@ proto.tendermint.abci.RequestCheckTx.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestCheckTx} msg The msg instance to transform. + * @param {!proto.tendermint.abci.RequestListSnapshots} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestCheckTx.toObject = function(includeInstance, msg) { +proto.tendermint.abci.RequestListSnapshots.toObject = function(includeInstance, msg) { var f, obj = { - tx: msg.getTx_asB64(), - type: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; if (includeInstance) { @@ -3436,37 +3427,29 @@ proto.tendermint.abci.RequestCheckTx.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestCheckTx} + * @return {!proto.tendermint.abci.RequestListSnapshots} */ -proto.tendermint.abci.RequestCheckTx.deserializeBinary = function(bytes) { +proto.tendermint.abci.RequestListSnapshots.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestCheckTx; - return proto.tendermint.abci.RequestCheckTx.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.RequestListSnapshots; + return proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestCheckTx} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.RequestListSnapshots} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestCheckTx} + * @return {!proto.tendermint.abci.RequestListSnapshots} */ -proto.tendermint.abci.RequestCheckTx.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTx(value); - break; - case 2: - var value = /** @type {!proto.tendermint.abci.CheckTxType} */ (reader.readEnum()); - msg.setType(value); - break; default: reader.skipField(); break; @@ -3480,9 +3463,9 @@ proto.tendermint.abci.RequestCheckTx.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.RequestCheckTx.prototype.serializeBinary = function() { +proto.tendermint.abci.RequestListSnapshots.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestCheckTx.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.RequestListSnapshots.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3490,86 +3473,12 @@ proto.tendermint.abci.RequestCheckTx.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestCheckTx} message + * @param {!proto.tendermint.abci.RequestListSnapshots} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestCheckTx.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.RequestListSnapshots.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * optional bytes tx = 1; - * @return {!(string|Uint8Array)} - */ -proto.tendermint.abci.RequestCheckTx.prototype.getTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes tx = 1; - * This is a type-conversion wrapper around `getTx()` - * @return {string} - */ -proto.tendermint.abci.RequestCheckTx.prototype.getTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTx())); -}; - - -/** - * optional bytes tx = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTx()` - * @return {!Uint8Array} - */ -proto.tendermint.abci.RequestCheckTx.prototype.getTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTx())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestCheckTx} returns this - */ -proto.tendermint.abci.RequestCheckTx.prototype.setTx = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional CheckTxType type = 2; - * @return {!proto.tendermint.abci.CheckTxType} - */ -proto.tendermint.abci.RequestCheckTx.prototype.getType = function() { - return /** @type {!proto.tendermint.abci.CheckTxType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.tendermint.abci.CheckTxType} value - * @return {!proto.tendermint.abci.RequestCheckTx} returns this - */ -proto.tendermint.abci.RequestCheckTx.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); }; @@ -3589,8 +3498,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestDeliverTx.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestOfferSnapshot.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestOfferSnapshot.toObject(opt_includeInstance, this); }; @@ -3599,13 +3508,14 @@ proto.tendermint.abci.RequestDeliverTx.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestDeliverTx} msg The msg instance to transform. + * @param {!proto.tendermint.abci.RequestOfferSnapshot} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestDeliverTx.toObject = function(includeInstance, msg) { +proto.tendermint.abci.RequestOfferSnapshot.toObject = function(includeInstance, msg) { var f, obj = { - tx: msg.getTx_asB64() + snapshot: (f = msg.getSnapshot()) && proto.tendermint.abci.Snapshot.toObject(includeInstance, f), + appHash: msg.getAppHash_asB64() }; if (includeInstance) { @@ -3619,23 +3529,23 @@ proto.tendermint.abci.RequestDeliverTx.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestDeliverTx} + * @return {!proto.tendermint.abci.RequestOfferSnapshot} */ -proto.tendermint.abci.RequestDeliverTx.deserializeBinary = function(bytes) { +proto.tendermint.abci.RequestOfferSnapshot.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestDeliverTx; - return proto.tendermint.abci.RequestDeliverTx.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.RequestOfferSnapshot; + return proto.tendermint.abci.RequestOfferSnapshot.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestDeliverTx} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.RequestOfferSnapshot} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestDeliverTx} + * @return {!proto.tendermint.abci.RequestOfferSnapshot} */ -proto.tendermint.abci.RequestDeliverTx.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.RequestOfferSnapshot.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3643,8 +3553,13 @@ proto.tendermint.abci.RequestDeliverTx.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: + var value = new proto.tendermint.abci.Snapshot; + reader.readMessage(value,proto.tendermint.abci.Snapshot.deserializeBinaryFromReader); + msg.setSnapshot(value); + break; + case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTx(value); + msg.setAppHash(value); break; default: reader.skipField(); @@ -3659,9 +3574,9 @@ proto.tendermint.abci.RequestDeliverTx.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.RequestDeliverTx.prototype.serializeBinary = function() { +proto.tendermint.abci.RequestOfferSnapshot.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestDeliverTx.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.RequestOfferSnapshot.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3669,16 +3584,24 @@ proto.tendermint.abci.RequestDeliverTx.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestDeliverTx} message + * @param {!proto.tendermint.abci.RequestOfferSnapshot} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestDeliverTx.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.RequestOfferSnapshot.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTx_asU8(); + f = message.getSnapshot(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.Snapshot.serializeBinaryToWriter + ); + } + f = message.getAppHash_asU8(); if (f.length > 0) { writer.writeBytes( - 1, + 2, f ); } @@ -3686,44 +3609,81 @@ proto.tendermint.abci.RequestDeliverTx.serializeBinaryToWriter = function(messag /** - * optional bytes tx = 1; - * @return {!(string|Uint8Array)} + * optional Snapshot snapshot = 1; + * @return {?proto.tendermint.abci.Snapshot} */ -proto.tendermint.abci.RequestDeliverTx.prototype.getTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.tendermint.abci.RequestOfferSnapshot.prototype.getSnapshot = function() { + return /** @type{?proto.tendermint.abci.Snapshot} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.Snapshot, 1)); }; /** - * optional bytes tx = 1; - * This is a type-conversion wrapper around `getTx()` - * @return {string} - */ -proto.tendermint.abci.RequestDeliverTx.prototype.getTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTx())); + * @param {?proto.tendermint.abci.Snapshot|undefined} value + * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this +*/ +proto.tendermint.abci.RequestOfferSnapshot.prototype.setSnapshot = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * optional bytes tx = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTx()` + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.clearSnapshot = function() { + return this.setSnapshot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.hasSnapshot = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes app_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes app_hash = 2; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppHash()` * @return {!Uint8Array} */ -proto.tendermint.abci.RequestDeliverTx.prototype.getTx_asU8 = function() { +proto.tendermint.abci.RequestOfferSnapshot.prototype.getAppHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTx())); + this.getAppHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestDeliverTx} returns this + * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this */ -proto.tendermint.abci.RequestDeliverTx.prototype.setTx = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.tendermint.abci.RequestOfferSnapshot.prototype.setAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3743,8 +3703,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestEndBlock.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestLoadSnapshotChunk.toObject(opt_includeInstance, this); }; @@ -3753,13 +3713,15 @@ proto.tendermint.abci.RequestEndBlock.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestEndBlock} msg The msg instance to transform. + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestEndBlock.toObject = function(includeInstance, msg) { +proto.tendermint.abci.RequestLoadSnapshotChunk.toObject = function(includeInstance, msg) { var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0) + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + format: jspb.Message.getFieldWithDefault(msg, 2, 0), + chunk: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -3773,23 +3735,23 @@ proto.tendermint.abci.RequestEndBlock.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestEndBlock} + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} */ -proto.tendermint.abci.RequestEndBlock.deserializeBinary = function(bytes) { +proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestEndBlock; - return proto.tendermint.abci.RequestEndBlock.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.RequestLoadSnapshotChunk; + return proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestEndBlock} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestEndBlock} + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} */ -proto.tendermint.abci.RequestEndBlock.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3797,9 +3759,17 @@ proto.tendermint.abci.RequestEndBlock.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {number} */ (reader.readUint64()); msg.setHeight(value); break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFormat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChunk(value); + break; default: reader.skipField(); break; @@ -3813,9 +3783,9 @@ proto.tendermint.abci.RequestEndBlock.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.RequestEndBlock.prototype.serializeBinary = function() { +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestEndBlock.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3823,138 +3793,87 @@ proto.tendermint.abci.RequestEndBlock.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestEndBlock} message + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestEndBlock.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHeight(); if (f !== 0) { - writer.writeInt64( + writer.writeUint64( 1, f ); } + f = message.getFormat(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getChunk(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } }; /** - * optional int64 height = 1; + * optional uint64 height = 1; * @return {number} */ -proto.tendermint.abci.RequestEndBlock.prototype.getHeight = function() { +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tendermint.abci.RequestEndBlock} returns this + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this */ -proto.tendermint.abci.RequestEndBlock.prototype.setHeight = function(value) { +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setHeight = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tendermint.abci.RequestCommit.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestCommit.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestCommit} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tendermint.abci.RequestCommit.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestCommit} + * optional uint32 format = 2; + * @return {number} */ -proto.tendermint.abci.RequestCommit.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestCommit; - return proto.tendermint.abci.RequestCommit.deserializeBinaryFromReader(msg, reader); +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestCommit} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestCommit} + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this */ -proto.tendermint.abci.RequestCommit.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 chunk = 3; + * @return {number} */ -proto.tendermint.abci.RequestCommit.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestCommit.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getChunk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestCommit} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this */ -proto.tendermint.abci.RequestCommit.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setChunk = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -3974,8 +3893,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.RequestListSnapshots.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestListSnapshots.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestApplySnapshotChunk.toObject(opt_includeInstance, this); }; @@ -3984,13 +3903,15 @@ proto.tendermint.abci.RequestListSnapshots.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestListSnapshots} msg The msg instance to transform. + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestListSnapshots.toObject = function(includeInstance, msg) { +proto.tendermint.abci.RequestApplySnapshotChunk.toObject = function(includeInstance, msg) { var f, obj = { - + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + chunk: msg.getChunk_asB64(), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -4004,29 +3925,41 @@ proto.tendermint.abci.RequestListSnapshots.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestListSnapshots} + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} */ -proto.tendermint.abci.RequestListSnapshots.deserializeBinary = function(bytes) { +proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestListSnapshots; - return proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.RequestApplySnapshotChunk; + return proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestListSnapshots} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestListSnapshots} + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} */ -proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChunk(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; default: reader.skipField(); break; @@ -4040,9 +3973,9 @@ proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.RequestListSnapshots.prototype.serializeBinary = function() { +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestListSnapshots.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.RequestApplySnapshotChunk.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4050,220 +3983,121 @@ proto.tendermint.abci.RequestListSnapshots.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestListSnapshots} message + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestListSnapshots.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.RequestApplySnapshotChunk.serializeBinaryToWriter = function(message, writer) { var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tendermint.abci.RequestOfferSnapshot.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestOfferSnapshot.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestOfferSnapshot} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tendermint.abci.RequestOfferSnapshot.toObject = function(includeInstance, msg) { - var f, obj = { - snapshot: (f = msg.getSnapshot()) && proto.tendermint.abci.Snapshot.toObject(includeInstance, f), - appHash: msg.getAppHash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestOfferSnapshot} - */ -proto.tendermint.abci.RequestOfferSnapshot.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestOfferSnapshot; - return proto.tendermint.abci.RequestOfferSnapshot.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestOfferSnapshot} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestOfferSnapshot} - */ -proto.tendermint.abci.RequestOfferSnapshot.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.tendermint.abci.Snapshot; - reader.readMessage(value,proto.tendermint.abci.Snapshot.deserializeBinaryFromReader); - msg.setSnapshot(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAppHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tendermint.abci.RequestOfferSnapshot.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestOfferSnapshot.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestOfferSnapshot} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tendermint.abci.RequestOfferSnapshot.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSnapshot(); - if (f != null) { - writer.writeMessage( + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( 1, - f, - proto.tendermint.abci.Snapshot.serializeBinaryToWriter + f ); } - f = message.getAppHash_asU8(); + f = message.getChunk_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional Snapshot snapshot = 1; - * @return {?proto.tendermint.abci.Snapshot} - */ -proto.tendermint.abci.RequestOfferSnapshot.prototype.getSnapshot = function() { - return /** @type{?proto.tendermint.abci.Snapshot} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.Snapshot, 1)); -}; - - -/** - * @param {?proto.tendermint.abci.Snapshot|undefined} value - * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this -*/ -proto.tendermint.abci.RequestOfferSnapshot.prototype.setSnapshot = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this + * optional uint32 index = 1; + * @return {number} */ -proto.tendermint.abci.RequestOfferSnapshot.prototype.clearSnapshot = function() { - return this.setSnapshot(undefined); +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this */ -proto.tendermint.abci.RequestOfferSnapshot.prototype.hasSnapshot = function() { - return jspb.Message.getField(this, 1) != null; +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional bytes app_hash = 2; + * optional bytes chunk = 2; * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.RequestOfferSnapshot.prototype.getAppHash = function() { +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes app_hash = 2; - * This is a type-conversion wrapper around `getAppHash()` + * optional bytes chunk = 2; + * This is a type-conversion wrapper around `getChunk()` * @return {string} */ -proto.tendermint.abci.RequestOfferSnapshot.prototype.getAppHash_asB64 = function() { +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAppHash())); + this.getChunk())); }; /** - * optional bytes app_hash = 2; + * optional bytes chunk = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAppHash()` + * This is a type-conversion wrapper around `getChunk()` * @return {!Uint8Array} */ -proto.tendermint.abci.RequestOfferSnapshot.prototype.getAppHash_asU8 = function() { +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAppHash())); + this.getChunk())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this */ -proto.tendermint.abci.RequestOfferSnapshot.prototype.setAppHash = function(value) { +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setChunk = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * optional string sender = 3; + * @return {string} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.RequestPrepareProposal.repeatedFields_ = [2,4]; @@ -4280,8 +4114,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestLoadSnapshotChunk.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestPrepareProposal.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestPrepareProposal.toObject(opt_includeInstance, this); }; @@ -4290,15 +4124,21 @@ proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.toObject = function(opt * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} msg The msg instance to transform. + * @param {!proto.tendermint.abci.RequestPrepareProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestLoadSnapshotChunk.toObject = function(includeInstance, msg) { +proto.tendermint.abci.RequestPrepareProposal.toObject = function(includeInstance, msg) { var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - format: jspb.Message.getFieldWithDefault(msg, 2, 0), - chunk: jspb.Message.getFieldWithDefault(msg, 3, 0) + maxTxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + txsList: msg.getTxsList_asB64(), + localLastCommit: (f = msg.getLocalLastCommit()) && proto.tendermint.abci.ExtendedCommitInfo.toObject(includeInstance, f), + misbehaviorList: jspb.Message.toObjectList(msg.getMisbehaviorList(), + proto.tendermint.abci.Misbehavior.toObject, includeInstance), + height: jspb.Message.getFieldWithDefault(msg, 5, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + nextValidatorsHash: msg.getNextValidatorsHash_asB64(), + proposerAddress: msg.getProposerAddress_asB64() }; if (includeInstance) { @@ -4312,23 +4152,23 @@ proto.tendermint.abci.RequestLoadSnapshotChunk.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} + * @return {!proto.tendermint.abci.RequestPrepareProposal} */ -proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinary = function(bytes) { +proto.tendermint.abci.RequestPrepareProposal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestLoadSnapshotChunk; - return proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.RequestPrepareProposal; + return proto.tendermint.abci.RequestPrepareProposal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.RequestPrepareProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} + * @return {!proto.tendermint.abci.RequestPrepareProposal} */ -proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.RequestPrepareProposal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4336,33 +4176,56 @@ proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader = fun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHeight(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxTxBytes(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFormat(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addTxs(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChunk(value); + var value = new proto.tendermint.abci.ExtendedCommitInfo; + reader.readMessage(value,proto.tendermint.abci.ExtendedCommitInfo.deserializeBinaryFromReader); + msg.setLocalLastCommit(value); break; - default: - reader.skipField(); + case 4: + var value = new proto.tendermint.abci.Misbehavior; + reader.readMessage(value,proto.tendermint.abci.Misbehavior.deserializeBinaryFromReader); + msg.addMisbehavior(value); break; - } - } - return msg; -}; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNextValidatorsHash(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProposerAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.serializeBinary = function() { +proto.tendermint.abci.RequestPrepareProposal.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.RequestPrepareProposal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4370,30 +4233,68 @@ proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.serializeBinary = funct /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} message + * @param {!proto.tendermint.abci.RequestPrepareProposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.RequestPrepareProposal.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHeight(); + f = message.getMaxTxBytes(); if (f !== 0) { - writer.writeUint64( + writer.writeInt64( 1, f ); } - f = message.getFormat(); - if (f !== 0) { - writer.writeUint32( + f = message.getTxsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 2, f ); } - f = message.getChunk(); - if (f !== 0) { - writer.writeUint32( + f = message.getLocalLastCommit(); + if (f != null) { + writer.writeMessage( 3, + f, + proto.tendermint.abci.ExtendedCommitInfo.serializeBinaryToWriter + ); + } + f = message.getMisbehaviorList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.abci.Misbehavior.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getNextValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProposerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, f ); } @@ -4401,270 +4302,295 @@ proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter = functio /** - * optional uint64 height = 1; + * optional int64 max_tx_bytes = 1; * @return {number} */ -proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getHeight = function() { +proto.tendermint.abci.RequestPrepareProposal.prototype.getMaxTxBytes = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this */ -proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setHeight = function(value) { +proto.tendermint.abci.RequestPrepareProposal.prototype.setMaxTxBytes = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 format = 2; - * @return {number} + * repeated bytes txs = 2; + * @return {!(Array|Array)} */ -proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getFormat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.tendermint.abci.RequestPrepareProposal.prototype.getTxsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + * repeated bytes txs = 2; + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} */ -proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setFormat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.tendermint.abci.RequestPrepareProposal.prototype.getTxsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTxsList())); }; /** - * optional uint32 chunk = 3; - * @return {number} + * repeated bytes txs = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} */ -proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getChunk = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.tendermint.abci.RequestPrepareProposal.prototype.getTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTxsList())); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + * @param {!(Array|Array)} value + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this */ -proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setChunk = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.tendermint.abci.RequestPrepareProposal.prototype.setTxsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + */ +proto.tendermint.abci.RequestPrepareProposal.prototype.addTxs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestApplySnapshotChunk.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestPrepareProposal.prototype.clearTxsList = function() { + return this.setTxsList([]); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional ExtendedCommitInfo local_last_commit = 3; + * @return {?proto.tendermint.abci.ExtendedCommitInfo} */ -proto.tendermint.abci.RequestApplySnapshotChunk.toObject = function(includeInstance, msg) { - var f, obj = { - index: jspb.Message.getFieldWithDefault(msg, 1, 0), - chunk: msg.getChunk_asB64(), - sender: jspb.Message.getFieldWithDefault(msg, 3, "") - }; +proto.tendermint.abci.RequestPrepareProposal.prototype.getLocalLastCommit = function() { + return /** @type{?proto.tendermint.abci.ExtendedCommitInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ExtendedCommitInfo, 3)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * @param {?proto.tendermint.abci.ExtendedCommitInfo|undefined} value + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this +*/ +proto.tendermint.abci.RequestPrepareProposal.prototype.setLocalLastCommit = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this */ -proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestApplySnapshotChunk; - return proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinaryFromReader(msg, reader); +proto.tendermint.abci.RequestPrepareProposal.prototype.clearLocalLastCommit = function() { + return this.setLocalLastCommit(undefined); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} + * Returns whether this field is set. + * @return {boolean} */ -proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setIndex(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChunk(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.tendermint.abci.RequestPrepareProposal.prototype.hasLocalLastCommit = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated Misbehavior misbehavior = 4; + * @return {!Array} */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestApplySnapshotChunk.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.tendermint.abci.RequestPrepareProposal.prototype.getMisbehaviorList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Misbehavior, 4)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tendermint.abci.RequestApplySnapshotChunk.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIndex(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getChunk_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getSender(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } + * @param {!Array} value + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this +*/ +proto.tendermint.abci.RequestPrepareProposal.prototype.setMisbehaviorList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * optional uint32 index = 1; + * @param {!proto.tendermint.abci.Misbehavior=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Misbehavior} + */ +proto.tendermint.abci.RequestPrepareProposal.prototype.addMisbehavior = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.abci.Misbehavior, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + */ +proto.tendermint.abci.RequestPrepareProposal.prototype.clearMisbehaviorList = function() { + return this.setMisbehaviorList([]); +}; + + +/** + * optional int64 height = 5; * @return {number} */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.tendermint.abci.RequestPrepareProposal.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.tendermint.abci.RequestPrepareProposal.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional bytes chunk = 2; + * optional google.protobuf.Timestamp time = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.abci.RequestPrepareProposal.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this +*/ +proto.tendermint.abci.RequestPrepareProposal.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + */ +proto.tendermint.abci.RequestPrepareProposal.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestPrepareProposal.prototype.hasTime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes next_validators_hash = 7; * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.tendermint.abci.RequestPrepareProposal.prototype.getNextValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * optional bytes chunk = 2; - * This is a type-conversion wrapper around `getChunk()` + * optional bytes next_validators_hash = 7; + * This is a type-conversion wrapper around `getNextValidatorsHash()` * @return {string} */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asB64 = function() { +proto.tendermint.abci.RequestPrepareProposal.prototype.getNextValidatorsHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChunk())); + this.getNextValidatorsHash())); }; /** - * optional bytes chunk = 2; + * optional bytes next_validators_hash = 7; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChunk()` + * This is a type-conversion wrapper around `getNextValidatorsHash()` * @return {!Uint8Array} */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asU8 = function() { +proto.tendermint.abci.RequestPrepareProposal.prototype.getNextValidatorsHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChunk())); + this.getNextValidatorsHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setChunk = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.tendermint.abci.RequestPrepareProposal.prototype.setNextValidatorsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); }; /** - * optional string sender = 3; + * optional bytes proposer_address = 8; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestPrepareProposal.prototype.getProposerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes proposer_address = 8; + * This is a type-conversion wrapper around `getProposerAddress()` * @return {string} */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.tendermint.abci.RequestPrepareProposal.prototype.getProposerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposerAddress())); }; /** - * @param {string} value - * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + * optional bytes proposer_address = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {!Uint8Array} */ -proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.tendermint.abci.RequestPrepareProposal.prototype.getProposerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposerAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + */ +proto.tendermint.abci.RequestPrepareProposal.prototype.setProposerAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); }; @@ -4674,7 +4600,7 @@ proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setSender = function(v * @private {!Array} * @const */ -proto.tendermint.abci.RequestPrepareProposal.repeatedFields_ = [2,4]; +proto.tendermint.abci.RequestProcessProposal.repeatedFields_ = [1,3]; @@ -4691,8 +4617,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestPrepareProposal.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestProcessProposal.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestProcessProposal.toObject(opt_includeInstance, this); }; @@ -4701,17 +4627,17 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestPrepareProposal} msg The msg instance to transform. + * @param {!proto.tendermint.abci.RequestProcessProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestPrepareProposal.toObject = function(includeInstance, msg) { +proto.tendermint.abci.RequestProcessProposal.toObject = function(includeInstance, msg) { var f, obj = { - maxTxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), txsList: msg.getTxsList_asB64(), - localLastCommit: (f = msg.getLocalLastCommit()) && proto.tendermint.abci.ExtendedCommitInfo.toObject(includeInstance, f), + proposedLastCommit: (f = msg.getProposedLastCommit()) && proto.tendermint.abci.CommitInfo.toObject(includeInstance, f), misbehaviorList: jspb.Message.toObjectList(msg.getMisbehaviorList(), proto.tendermint.abci.Misbehavior.toObject, includeInstance), + hash: msg.getHash_asB64(), height: jspb.Message.getFieldWithDefault(msg, 5, 0), time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), nextValidatorsHash: msg.getNextValidatorsHash_asB64(), @@ -4729,23 +4655,23 @@ proto.tendermint.abci.RequestPrepareProposal.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestPrepareProposal} + * @return {!proto.tendermint.abci.RequestProcessProposal} */ -proto.tendermint.abci.RequestPrepareProposal.deserializeBinary = function(bytes) { +proto.tendermint.abci.RequestProcessProposal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestPrepareProposal; - return proto.tendermint.abci.RequestPrepareProposal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.RequestProcessProposal; + return proto.tendermint.abci.RequestProcessProposal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestPrepareProposal} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.RequestProcessProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestPrepareProposal} + * @return {!proto.tendermint.abci.RequestProcessProposal} */ -proto.tendermint.abci.RequestPrepareProposal.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.RequestProcessProposal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4753,23 +4679,23 @@ proto.tendermint.abci.RequestPrepareProposal.deserializeBinaryFromReader = funct var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxTxBytes(value); - break; - case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.addTxs(value); break; - case 3: - var value = new proto.tendermint.abci.ExtendedCommitInfo; - reader.readMessage(value,proto.tendermint.abci.ExtendedCommitInfo.deserializeBinaryFromReader); - msg.setLocalLastCommit(value); + case 2: + var value = new proto.tendermint.abci.CommitInfo; + reader.readMessage(value,proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader); + msg.setProposedLastCommit(value); break; - case 4: + case 3: var value = new proto.tendermint.abci.Misbehavior; reader.readMessage(value,proto.tendermint.abci.Misbehavior.deserializeBinaryFromReader); msg.addMisbehavior(value); break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setHeight(value); @@ -4800,9 +4726,9 @@ proto.tendermint.abci.RequestPrepareProposal.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.serializeBinary = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestPrepareProposal.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.RequestProcessProposal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4810,42 +4736,42 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestPrepareProposal} message + * @param {!proto.tendermint.abci.RequestProcessProposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestPrepareProposal.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.RequestProcessProposal.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMaxTxBytes(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } f = message.getTxsList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes( - 2, + 1, f ); } - f = message.getLocalLastCommit(); + f = message.getProposedLastCommit(); if (f != null) { writer.writeMessage( - 3, + 2, f, - proto.tendermint.abci.ExtendedCommitInfo.serializeBinaryToWriter + proto.tendermint.abci.CommitInfo.serializeBinaryToWriter ); } f = message.getMisbehaviorList(); if (f.length > 0) { writer.writeRepeatedMessage( - 4, + 3, f, proto.tendermint.abci.Misbehavior.serializeBinaryToWriter ); } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } f = message.getHeight(); if (f !== 0) { writer.writeInt64( @@ -4879,51 +4805,33 @@ proto.tendermint.abci.RequestPrepareProposal.serializeBinaryToWriter = function( /** - * optional int64 max_tx_bytes = 1; - * @return {number} + * repeated bytes txs = 1; + * @return {!(Array|Array)} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getMaxTxBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.tendermint.abci.RequestProcessProposal.prototype.getTxsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * repeated bytes txs = 1; + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.setMaxTxBytes = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.tendermint.abci.RequestProcessProposal.prototype.getTxsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTxsList())); }; /** - * repeated bytes txs = 2; - * @return {!(Array|Array)} - */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getTxsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes txs = 2; - * This is a type-conversion wrapper around `getTxsList()` - * @return {!Array} - */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getTxsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getTxsList())); -}; - - -/** - * repeated bytes txs = 2; + * repeated bytes txs = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getTxsList()` * @return {!Array} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getTxsList_asU8 = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getTxsList_asU8 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsU8( this.getTxsList())); }; @@ -4931,57 +4839,57 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.getTxsList_asU8 = functio /** * @param {!(Array|Array)} value - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.setTxsList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.tendermint.abci.RequestProcessProposal.prototype.setTxsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.addTxs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.tendermint.abci.RequestProcessProposal.prototype.addTxs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.clearTxsList = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.clearTxsList = function() { return this.setTxsList([]); }; /** - * optional ExtendedCommitInfo local_last_commit = 3; - * @return {?proto.tendermint.abci.ExtendedCommitInfo} + * optional CommitInfo proposed_last_commit = 2; + * @return {?proto.tendermint.abci.CommitInfo} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getLocalLastCommit = function() { - return /** @type{?proto.tendermint.abci.ExtendedCommitInfo} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.ExtendedCommitInfo, 3)); +proto.tendermint.abci.RequestProcessProposal.prototype.getProposedLastCommit = function() { + return /** @type{?proto.tendermint.abci.CommitInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.CommitInfo, 2)); }; /** - * @param {?proto.tendermint.abci.ExtendedCommitInfo|undefined} value - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @param {?proto.tendermint.abci.CommitInfo|undefined} value + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.setLocalLastCommit = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.tendermint.abci.RequestProcessProposal.prototype.setProposedLastCommit = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.clearLocalLastCommit = function() { - return this.setLocalLastCommit(undefined); +proto.tendermint.abci.RequestProcessProposal.prototype.clearProposedLastCommit = function() { + return this.setProposedLastCommit(undefined); }; @@ -4989,27 +4897,27 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.clearLocalLastCommit = fu * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.hasLocalLastCommit = function() { - return jspb.Message.getField(this, 3) != null; +proto.tendermint.abci.RequestProcessProposal.prototype.hasProposedLastCommit = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * repeated Misbehavior misbehavior = 4; + * repeated Misbehavior misbehavior = 3; * @return {!Array} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getMisbehaviorList = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getMisbehaviorList = function() { return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Misbehavior, 4)); + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Misbehavior, 3)); }; /** * @param {!Array} value - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.setMisbehaviorList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); +proto.tendermint.abci.RequestProcessProposal.prototype.setMisbehaviorList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -5018,34 +4926,76 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.setMisbehaviorList = func * @param {number=} opt_index * @return {!proto.tendermint.abci.Misbehavior} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.addMisbehavior = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.abci.Misbehavior, opt_index); +proto.tendermint.abci.RequestProcessProposal.prototype.addMisbehavior = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.abci.Misbehavior, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.clearMisbehaviorList = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.clearMisbehaviorList = function() { return this.setMisbehaviorList([]); }; +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestProcessProposal.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes hash = 4; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.abci.RequestProcessProposal.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestProcessProposal.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + */ +proto.tendermint.abci.RequestProcessProposal.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + /** * optional int64 height = 5; * @return {number} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getHeight = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.setHeight = function(value) { +proto.tendermint.abci.RequestProcessProposal.prototype.setHeight = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; @@ -5054,7 +5004,7 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.setHeight = function(valu * optional google.protobuf.Timestamp time = 6; * @return {?proto.google.protobuf.Timestamp} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getTime = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getTime = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); }; @@ -5062,18 +5012,18 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.getTime = function() { /** * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.setTime = function(value) { +proto.tendermint.abci.RequestProcessProposal.prototype.setTime = function(value) { return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.clearTime = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.clearTime = function() { return this.setTime(undefined); }; @@ -5082,7 +5032,7 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.clearTime = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.hasTime = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.hasTime = function() { return jspb.Message.getField(this, 6) != null; }; @@ -5091,7 +5041,7 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.hasTime = function() { * optional bytes next_validators_hash = 7; * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getNextValidatorsHash = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getNextValidatorsHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; @@ -5101,7 +5051,7 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.getNextValidatorsHash = f * This is a type-conversion wrapper around `getNextValidatorsHash()` * @return {string} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getNextValidatorsHash_asB64 = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getNextValidatorsHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getNextValidatorsHash())); }; @@ -5114,7 +5064,7 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.getNextValidatorsHash_asB * This is a type-conversion wrapper around `getNextValidatorsHash()` * @return {!Uint8Array} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getNextValidatorsHash_asU8 = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getNextValidatorsHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getNextValidatorsHash())); }; @@ -5122,9 +5072,9 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.getNextValidatorsHash_asU /** * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.setNextValidatorsHash = function(value) { +proto.tendermint.abci.RequestProcessProposal.prototype.setNextValidatorsHash = function(value) { return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -5133,7 +5083,7 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.setNextValidatorsHash = f * optional bytes proposer_address = 8; * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getProposerAddress = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getProposerAddress = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; @@ -5143,7 +5093,7 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.getProposerAddress = func * This is a type-conversion wrapper around `getProposerAddress()` * @return {string} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getProposerAddress_asB64 = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getProposerAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getProposerAddress())); }; @@ -5156,7 +5106,7 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.getProposerAddress_asB64 * This is a type-conversion wrapper around `getProposerAddress()` * @return {!Uint8Array} */ -proto.tendermint.abci.RequestPrepareProposal.prototype.getProposerAddress_asU8 = function() { +proto.tendermint.abci.RequestProcessProposal.prototype.getProposerAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getProposerAddress())); }; @@ -5164,9 +5114,9 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.getProposerAddress_asU8 = /** * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestPrepareProposal} returns this + * @return {!proto.tendermint.abci.RequestProcessProposal} returns this */ -proto.tendermint.abci.RequestPrepareProposal.prototype.setProposerAddress = function(value) { +proto.tendermint.abci.RequestProcessProposal.prototype.setProposerAddress = function(value) { return jspb.Message.setProto3BytesField(this, 8, value); }; @@ -5177,7 +5127,7 @@ proto.tendermint.abci.RequestPrepareProposal.prototype.setProposerAddress = func * @private {!Array} * @const */ -proto.tendermint.abci.RequestProcessProposal.repeatedFields_ = [1,3]; +proto.tendermint.abci.RequestExtendVote.repeatedFields_ = [4,6]; @@ -5194,8 +5144,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.RequestProcessProposal.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.RequestProcessProposal.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestExtendVote.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestExtendVote.toObject(opt_includeInstance, this); }; @@ -5204,19 +5154,19 @@ proto.tendermint.abci.RequestProcessProposal.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.RequestProcessProposal} msg The msg instance to transform. + * @param {!proto.tendermint.abci.RequestExtendVote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestProcessProposal.toObject = function(includeInstance, msg) { +proto.tendermint.abci.RequestExtendVote.toObject = function(includeInstance, msg) { var f, obj = { + hash: msg.getHash_asB64(), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), txsList: msg.getTxsList_asB64(), proposedLastCommit: (f = msg.getProposedLastCommit()) && proto.tendermint.abci.CommitInfo.toObject(includeInstance, f), misbehaviorList: jspb.Message.toObjectList(msg.getMisbehaviorList(), proto.tendermint.abci.Misbehavior.toObject, includeInstance), - hash: msg.getHash_asB64(), - height: jspb.Message.getFieldWithDefault(msg, 5, 0), - time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), nextValidatorsHash: msg.getNextValidatorsHash_asB64(), proposerAddress: msg.getProposerAddress_asB64() }; @@ -5232,23 +5182,23 @@ proto.tendermint.abci.RequestProcessProposal.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.RequestProcessProposal} + * @return {!proto.tendermint.abci.RequestExtendVote} */ -proto.tendermint.abci.RequestProcessProposal.deserializeBinary = function(bytes) { +proto.tendermint.abci.RequestExtendVote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.RequestProcessProposal; - return proto.tendermint.abci.RequestProcessProposal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.RequestExtendVote; + return proto.tendermint.abci.RequestExtendVote.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.RequestProcessProposal} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.RequestExtendVote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.RequestProcessProposal} + * @return {!proto.tendermint.abci.RequestExtendVote} */ -proto.tendermint.abci.RequestProcessProposal.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.RequestExtendVote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5257,30 +5207,30 @@ proto.tendermint.abci.RequestProcessProposal.deserializeBinaryFromReader = funct switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addTxs(value); + msg.setHash(value); break; case 2: - var value = new proto.tendermint.abci.CommitInfo; - reader.readMessage(value,proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader); - msg.setProposedLastCommit(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); break; case 3: - var value = new proto.tendermint.abci.Misbehavior; - reader.readMessage(value,proto.tendermint.abci.Misbehavior.deserializeBinaryFromReader); - msg.addMisbehavior(value); + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); + msg.addTxs(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setHeight(value); + var value = new proto.tendermint.abci.CommitInfo; + reader.readMessage(value,proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader); + msg.setProposedLastCommit(value); break; case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTime(value); + var value = new proto.tendermint.abci.Misbehavior; + reader.readMessage(value,proto.tendermint.abci.Misbehavior.deserializeBinaryFromReader); + msg.addMisbehavior(value); break; case 7: var value = /** @type {!Uint8Array} */ (reader.readBytes()); @@ -5303,9 +5253,9 @@ proto.tendermint.abci.RequestProcessProposal.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.RequestProcessProposal.prototype.serializeBinary = function() { +proto.tendermint.abci.RequestExtendVote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.RequestProcessProposal.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.RequestExtendVote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5313,55 +5263,55 @@ proto.tendermint.abci.RequestProcessProposal.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.RequestProcessProposal} message + * @param {!proto.tendermint.abci.RequestExtendVote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.RequestProcessProposal.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.RequestExtendVote.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxsList_asU8(); + f = message.getHash_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 1, f ); } - f = message.getProposedLastCommit(); - if (f != null) { - writer.writeMessage( + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( 2, - f, - proto.tendermint.abci.CommitInfo.serializeBinaryToWriter + f ); } - f = message.getMisbehaviorList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getTime(); + if (f != null) { + writer.writeMessage( 3, f, - proto.tendermint.abci.Misbehavior.serializeBinaryToWriter + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getHash_asU8(); + f = message.getTxsList_asU8(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedBytes( 4, f ); } - f = message.getHeight(); - if (f !== 0) { - writer.writeInt64( + f = message.getProposedLastCommit(); + if (f != null) { + writer.writeMessage( 5, - f + f, + proto.tendermint.abci.CommitInfo.serializeBinaryToWriter ); } - f = message.getTime(); - if (f != null) { - writer.writeMessage( + f = message.getMisbehaviorList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 6, f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + proto.tendermint.abci.Misbehavior.serializeBinaryToWriter ); } f = message.getNextValidatorsHash_asU8(); @@ -5382,91 +5332,90 @@ proto.tendermint.abci.RequestProcessProposal.serializeBinaryToWriter = function( /** - * repeated bytes txs = 1; - * @return {!(Array|Array)} + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getTxsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +proto.tendermint.abci.RequestExtendVote.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * repeated bytes txs = 1; - * This is a type-conversion wrapper around `getTxsList()` - * @return {!Array} + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getTxsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getTxsList())); +proto.tendermint.abci.RequestExtendVote.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); }; /** - * repeated bytes txs = 1; + * optional bytes hash = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxsList()` - * @return {!Array} + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getTxsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getTxsList())); +proto.tendermint.abci.RequestExtendVote.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); }; /** - * @param {!(Array|Array)} value - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.setTxsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.tendermint.abci.RequestExtendVote.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * optional int64 height = 2; + * @return {number} */ -proto.tendermint.abci.RequestProcessProposal.prototype.addTxs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.tendermint.abci.RequestExtendVote.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * @param {number} value + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.clearTxsList = function() { - return this.setTxsList([]); +proto.tendermint.abci.RequestExtendVote.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional CommitInfo proposed_last_commit = 2; - * @return {?proto.tendermint.abci.CommitInfo} + * optional google.protobuf.Timestamp time = 3; + * @return {?proto.google.protobuf.Timestamp} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getProposedLastCommit = function() { - return /** @type{?proto.tendermint.abci.CommitInfo} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.CommitInfo, 2)); +proto.tendermint.abci.RequestExtendVote.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; /** - * @param {?proto.tendermint.abci.CommitInfo|undefined} value - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.setProposedLastCommit = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.tendermint.abci.RequestExtendVote.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.clearProposedLastCommit = function() { - return this.setProposedLastCommit(undefined); +proto.tendermint.abci.RequestExtendVote.prototype.clearTime = function() { + return this.setTime(undefined); }; @@ -5474,143 +5423,144 @@ proto.tendermint.abci.RequestProcessProposal.prototype.clearProposedLastCommit = * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.RequestProcessProposal.prototype.hasProposedLastCommit = function() { - return jspb.Message.getField(this, 2) != null; +proto.tendermint.abci.RequestExtendVote.prototype.hasTime = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * repeated Misbehavior misbehavior = 3; - * @return {!Array} + * repeated bytes txs = 4; + * @return {!(Array|Array)} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getMisbehaviorList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Misbehavior, 3)); +proto.tendermint.abci.RequestExtendVote.prototype.getTxsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 4)); }; /** - * @param {!Array} value - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this -*/ -proto.tendermint.abci.RequestProcessProposal.prototype.setMisbehaviorList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); + * repeated bytes txs = 4; + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} + */ +proto.tendermint.abci.RequestExtendVote.prototype.getTxsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTxsList())); }; /** - * @param {!proto.tendermint.abci.Misbehavior=} opt_value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.Misbehavior} + * repeated bytes txs = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} */ -proto.tendermint.abci.RequestProcessProposal.prototype.addMisbehavior = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.abci.Misbehavior, opt_index); +proto.tendermint.abci.RequestExtendVote.prototype.getTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTxsList())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * @param {!(Array|Array)} value + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.clearMisbehaviorList = function() { - return this.setMisbehaviorList([]); +proto.tendermint.abci.RequestExtendVote.prototype.setTxsList = function(value) { + return jspb.Message.setField(this, 4, value || []); }; /** - * optional bytes hash = 4; - * @return {!(string|Uint8Array)} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.tendermint.abci.RequestExtendVote.prototype.addTxs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** - * optional bytes hash = 4; - * This is a type-conversion wrapper around `getHash()` - * @return {string} + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); +proto.tendermint.abci.RequestExtendVote.prototype.clearTxsList = function() { + return this.setTxsList([]); }; /** - * optional bytes hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} + * optional CommitInfo proposed_last_commit = 5; + * @return {?proto.tendermint.abci.CommitInfo} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); +proto.tendermint.abci.RequestExtendVote.prototype.getProposedLastCommit = function() { + return /** @type{?proto.tendermint.abci.CommitInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.CommitInfo, 5)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this - */ -proto.tendermint.abci.RequestProcessProposal.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); + * @param {?proto.tendermint.abci.CommitInfo|undefined} value + * @return {!proto.tendermint.abci.RequestExtendVote} returns this +*/ +proto.tendermint.abci.RequestExtendVote.prototype.setProposedLastCommit = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** - * optional int64 height = 5; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.tendermint.abci.RequestExtendVote.prototype.clearProposedLastCommit = function() { + return this.setProposedLastCommit(undefined); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.tendermint.abci.RequestProcessProposal.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.tendermint.abci.RequestExtendVote.prototype.hasProposedLastCommit = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional google.protobuf.Timestamp time = 6; - * @return {?proto.google.protobuf.Timestamp} + * repeated Misbehavior misbehavior = 6; + * @return {!Array} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +proto.tendermint.abci.RequestExtendVote.prototype.getMisbehaviorList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Misbehavior, 6)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * @param {!Array} value + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); +proto.tendermint.abci.RequestExtendVote.prototype.setMisbehaviorList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * @param {!proto.tendermint.abci.Misbehavior=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Misbehavior} */ -proto.tendermint.abci.RequestProcessProposal.prototype.clearTime = function() { - return this.setTime(undefined); +proto.tendermint.abci.RequestExtendVote.prototype.addMisbehavior = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.tendermint.abci.Misbehavior, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.hasTime = function() { - return jspb.Message.getField(this, 6) != null; +proto.tendermint.abci.RequestExtendVote.prototype.clearMisbehaviorList = function() { + return this.setMisbehaviorList([]); }; @@ -5618,7 +5568,7 @@ proto.tendermint.abci.RequestProcessProposal.prototype.hasTime = function() { * optional bytes next_validators_hash = 7; * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getNextValidatorsHash = function() { +proto.tendermint.abci.RequestExtendVote.prototype.getNextValidatorsHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; @@ -5628,7 +5578,7 @@ proto.tendermint.abci.RequestProcessProposal.prototype.getNextValidatorsHash = f * This is a type-conversion wrapper around `getNextValidatorsHash()` * @return {string} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getNextValidatorsHash_asB64 = function() { +proto.tendermint.abci.RequestExtendVote.prototype.getNextValidatorsHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getNextValidatorsHash())); }; @@ -5641,7 +5591,7 @@ proto.tendermint.abci.RequestProcessProposal.prototype.getNextValidatorsHash_asB * This is a type-conversion wrapper around `getNextValidatorsHash()` * @return {!Uint8Array} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getNextValidatorsHash_asU8 = function() { +proto.tendermint.abci.RequestExtendVote.prototype.getNextValidatorsHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getNextValidatorsHash())); }; @@ -5649,9 +5599,9 @@ proto.tendermint.abci.RequestProcessProposal.prototype.getNextValidatorsHash_asU /** * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.setNextValidatorsHash = function(value) { +proto.tendermint.abci.RequestExtendVote.prototype.setNextValidatorsHash = function(value) { return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -5660,7 +5610,7 @@ proto.tendermint.abci.RequestProcessProposal.prototype.setNextValidatorsHash = f * optional bytes proposer_address = 8; * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getProposerAddress = function() { +proto.tendermint.abci.RequestExtendVote.prototype.getProposerAddress = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; @@ -5670,7 +5620,7 @@ proto.tendermint.abci.RequestProcessProposal.prototype.getProposerAddress = func * This is a type-conversion wrapper around `getProposerAddress()` * @return {string} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getProposerAddress_asB64 = function() { +proto.tendermint.abci.RequestExtendVote.prototype.getProposerAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getProposerAddress())); }; @@ -5683,7 +5633,7 @@ proto.tendermint.abci.RequestProcessProposal.prototype.getProposerAddress_asB64 * This is a type-conversion wrapper around `getProposerAddress()` * @return {!Uint8Array} */ -proto.tendermint.abci.RequestProcessProposal.prototype.getProposerAddress_asU8 = function() { +proto.tendermint.abci.RequestExtendVote.prototype.getProposerAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getProposerAddress())); }; @@ -5691,55 +5641,14 @@ proto.tendermint.abci.RequestProcessProposal.prototype.getProposerAddress_asU8 = /** * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.RequestProcessProposal} returns this + * @return {!proto.tendermint.abci.RequestExtendVote} returns this */ -proto.tendermint.abci.RequestProcessProposal.prototype.setProposerAddress = function(value) { +proto.tendermint.abci.RequestExtendVote.prototype.setProposerAddress = function(value) { return jspb.Message.setProto3BytesField(this, 8, value); }; -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.tendermint.abci.Response.oneofGroups_ = [[1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18]]; - -/** - * @enum {number} - */ -proto.tendermint.abci.Response.ValueCase = { - VALUE_NOT_SET: 0, - EXCEPTION: 1, - ECHO: 2, - FLUSH: 3, - INFO: 4, - INIT_CHAIN: 6, - QUERY: 7, - BEGIN_BLOCK: 8, - CHECK_TX: 9, - DELIVER_TX: 10, - END_BLOCK: 11, - COMMIT: 12, - LIST_SNAPSHOTS: 13, - OFFER_SNAPSHOT: 14, - LOAD_SNAPSHOT_CHUNK: 15, - APPLY_SNAPSHOT_CHUNK: 16, - PREPARE_PROPOSAL: 17, - PROCESS_PROPOSAL: 18 -}; - -/** - * @return {proto.tendermint.abci.Response.ValueCase} - */ -proto.tendermint.abci.Response.prototype.getValueCase = function() { - return /** @type {proto.tendermint.abci.Response.ValueCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.abci.Response.oneofGroups_[0])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5755,8 +5664,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.Response.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.Response.toObject(opt_includeInstance, this); +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestVerifyVoteExtension.toObject(opt_includeInstance, this); }; @@ -5765,29 +5674,16 @@ proto.tendermint.abci.Response.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.Response} msg The msg instance to transform. + * @param {!proto.tendermint.abci.RequestVerifyVoteExtension} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.Response.toObject = function(includeInstance, msg) { +proto.tendermint.abci.RequestVerifyVoteExtension.toObject = function(includeInstance, msg) { var f, obj = { - exception: (f = msg.getException()) && proto.tendermint.abci.ResponseException.toObject(includeInstance, f), - echo: (f = msg.getEcho()) && proto.tendermint.abci.ResponseEcho.toObject(includeInstance, f), - flush: (f = msg.getFlush()) && proto.tendermint.abci.ResponseFlush.toObject(includeInstance, f), - info: (f = msg.getInfo()) && proto.tendermint.abci.ResponseInfo.toObject(includeInstance, f), - initChain: (f = msg.getInitChain()) && proto.tendermint.abci.ResponseInitChain.toObject(includeInstance, f), - query: (f = msg.getQuery()) && proto.tendermint.abci.ResponseQuery.toObject(includeInstance, f), - beginBlock: (f = msg.getBeginBlock()) && proto.tendermint.abci.ResponseBeginBlock.toObject(includeInstance, f), - checkTx: (f = msg.getCheckTx()) && proto.tendermint.abci.ResponseCheckTx.toObject(includeInstance, f), - deliverTx: (f = msg.getDeliverTx()) && proto.tendermint.abci.ResponseDeliverTx.toObject(includeInstance, f), - endBlock: (f = msg.getEndBlock()) && proto.tendermint.abci.ResponseEndBlock.toObject(includeInstance, f), - commit: (f = msg.getCommit()) && proto.tendermint.abci.ResponseCommit.toObject(includeInstance, f), - listSnapshots: (f = msg.getListSnapshots()) && proto.tendermint.abci.ResponseListSnapshots.toObject(includeInstance, f), - offerSnapshot: (f = msg.getOfferSnapshot()) && proto.tendermint.abci.ResponseOfferSnapshot.toObject(includeInstance, f), - loadSnapshotChunk: (f = msg.getLoadSnapshotChunk()) && proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject(includeInstance, f), - applySnapshotChunk: (f = msg.getApplySnapshotChunk()) && proto.tendermint.abci.ResponseApplySnapshotChunk.toObject(includeInstance, f), - prepareProposal: (f = msg.getPrepareProposal()) && proto.tendermint.abci.ResponsePrepareProposal.toObject(includeInstance, f), - processProposal: (f = msg.getProcessProposal()) && proto.tendermint.abci.ResponseProcessProposal.toObject(includeInstance, f) + hash: msg.getHash_asB64(), + validatorAddress: msg.getValidatorAddress_asB64(), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + voteExtension: msg.getVoteExtension_asB64() }; if (includeInstance) { @@ -5801,23 +5697,23 @@ proto.tendermint.abci.Response.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.Response} + * @return {!proto.tendermint.abci.RequestVerifyVoteExtension} */ -proto.tendermint.abci.Response.deserializeBinary = function(bytes) { +proto.tendermint.abci.RequestVerifyVoteExtension.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.Response; - return proto.tendermint.abci.Response.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.RequestVerifyVoteExtension; + return proto.tendermint.abci.RequestVerifyVoteExtension.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.Response} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.RequestVerifyVoteExtension} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.Response} + * @return {!proto.tendermint.abci.RequestVerifyVoteExtension} */ -proto.tendermint.abci.Response.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.RequestVerifyVoteExtension.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5825,23 +5721,896 @@ proto.tendermint.abci.Response.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.tendermint.abci.ResponseException; - reader.readMessage(value,proto.tendermint.abci.ResponseException.deserializeBinaryFromReader); - msg.setException(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); break; case 2: - var value = new proto.tendermint.abci.ResponseEcho; - reader.readMessage(value,proto.tendermint.abci.ResponseEcho.deserializeBinaryFromReader); - msg.setEcho(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorAddress(value); break; case 3: - var value = new proto.tendermint.abci.ResponseFlush; - reader.readMessage(value,proto.tendermint.abci.ResponseFlush.deserializeBinaryFromReader); - msg.setFlush(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); break; case 4: - var value = new proto.tendermint.abci.ResponseInfo; - reader.readMessage(value,proto.tendermint.abci.ResponseInfo.deserializeBinaryFromReader); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setVoteExtension(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestVerifyVoteExtension.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestVerifyVoteExtension} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestVerifyVoteExtension.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getValidatorAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getVoteExtension_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestVerifyVoteExtension} returns this + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes validator_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getValidatorAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes validator_address = 2; + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {string} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getValidatorAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorAddress())); +}; + + +/** + * optional bytes validator_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getValidatorAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestVerifyVoteExtension} returns this + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestVerifyVoteExtension} returns this + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes vote_extension = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getVoteExtension = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes vote_extension = 4; + * This is a type-conversion wrapper around `getVoteExtension()` + * @return {string} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getVoteExtension_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getVoteExtension())); +}; + + +/** + * optional bytes vote_extension = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVoteExtension()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.getVoteExtension_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getVoteExtension())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestVerifyVoteExtension} returns this + */ +proto.tendermint.abci.RequestVerifyVoteExtension.prototype.setVoteExtension = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.RequestFinalizeBlock.repeatedFields_ = [1,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestFinalizeBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestFinalizeBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestFinalizeBlock.toObject = function(includeInstance, msg) { + var f, obj = { + txsList: msg.getTxsList_asB64(), + decidedLastCommit: (f = msg.getDecidedLastCommit()) && proto.tendermint.abci.CommitInfo.toObject(includeInstance, f), + misbehaviorList: jspb.Message.toObjectList(msg.getMisbehaviorList(), + proto.tendermint.abci.Misbehavior.toObject, includeInstance), + hash: msg.getHash_asB64(), + height: jspb.Message.getFieldWithDefault(msg, 5, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + nextValidatorsHash: msg.getNextValidatorsHash_asB64(), + proposerAddress: msg.getProposerAddress_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestFinalizeBlock} + */ +proto.tendermint.abci.RequestFinalizeBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestFinalizeBlock; + return proto.tendermint.abci.RequestFinalizeBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestFinalizeBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestFinalizeBlock} + */ +proto.tendermint.abci.RequestFinalizeBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addTxs(value); + break; + case 2: + var value = new proto.tendermint.abci.CommitInfo; + reader.readMessage(value,proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader); + msg.setDecidedLastCommit(value); + break; + case 3: + var value = new proto.tendermint.abci.Misbehavior; + reader.readMessage(value,proto.tendermint.abci.Misbehavior.deserializeBinaryFromReader); + msg.addMisbehavior(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNextValidatorsHash(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProposerAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestFinalizeBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestFinalizeBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestFinalizeBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getDecidedLastCommit(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.CommitInfo.serializeBinaryToWriter + ); + } + f = message.getMisbehaviorList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.tendermint.abci.Misbehavior.serializeBinaryToWriter + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getNextValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProposerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } +}; + + +/** + * repeated bytes txs = 1; + * @return {!(Array|Array)} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getTxsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes txs = 1; + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getTxsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTxsList())); +}; + + +/** + * repeated bytes txs = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTxsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.setTxsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.addTxs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + +/** + * optional CommitInfo decided_last_commit = 2; + * @return {?proto.tendermint.abci.CommitInfo} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getDecidedLastCommit = function() { + return /** @type{?proto.tendermint.abci.CommitInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.CommitInfo, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.CommitInfo|undefined} value + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this +*/ +proto.tendermint.abci.RequestFinalizeBlock.prototype.setDecidedLastCommit = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.clearDecidedLastCommit = function() { + return this.setDecidedLastCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.hasDecidedLastCommit = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated Misbehavior misbehavior = 3; + * @return {!Array} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getMisbehaviorList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Misbehavior, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this +*/ +proto.tendermint.abci.RequestFinalizeBlock.prototype.setMisbehaviorList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.tendermint.abci.Misbehavior=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Misbehavior} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.addMisbehavior = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.abci.Misbehavior, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.clearMisbehaviorList = function() { + return this.setMisbehaviorList([]); +}; + + +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes hash = 4; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional int64 height = 5; + * @return {number} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this +*/ +proto.tendermint.abci.RequestFinalizeBlock.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.hasTime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes next_validators_hash = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getNextValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes next_validators_hash = 7; + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {string} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getNextValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextValidatorsHash())); +}; + + +/** + * optional bytes next_validators_hash = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getNextValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextValidatorsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.setNextValidatorsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional bytes proposer_address = 8; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getProposerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes proposer_address = 8; + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {string} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getProposerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposerAddress())); +}; + + +/** + * optional bytes proposer_address = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.getProposerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposerAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestFinalizeBlock} returns this + */ +proto.tendermint.abci.RequestFinalizeBlock.prototype.setProposerAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.abci.Response.oneofGroups_ = [[1,2,3,4,6,7,9,12,13,14,15,16,17,18,19,20,21]]; + +/** + * @enum {number} + */ +proto.tendermint.abci.Response.ValueCase = { + VALUE_NOT_SET: 0, + EXCEPTION: 1, + ECHO: 2, + FLUSH: 3, + INFO: 4, + INIT_CHAIN: 6, + QUERY: 7, + CHECK_TX: 9, + 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: 21 +}; + +/** + * @return {proto.tendermint.abci.Response.ValueCase} + */ +proto.tendermint.abci.Response.prototype.getValueCase = function() { + return /** @type {proto.tendermint.abci.Response.ValueCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.abci.Response.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.Response.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Response.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Response.toObject = function(includeInstance, msg) { + var f, obj = { + exception: (f = msg.getException()) && proto.tendermint.abci.ResponseException.toObject(includeInstance, f), + echo: (f = msg.getEcho()) && proto.tendermint.abci.ResponseEcho.toObject(includeInstance, f), + flush: (f = msg.getFlush()) && proto.tendermint.abci.ResponseFlush.toObject(includeInstance, f), + info: (f = msg.getInfo()) && proto.tendermint.abci.ResponseInfo.toObject(includeInstance, f), + initChain: (f = msg.getInitChain()) && proto.tendermint.abci.ResponseInitChain.toObject(includeInstance, f), + query: (f = msg.getQuery()) && proto.tendermint.abci.ResponseQuery.toObject(includeInstance, f), + checkTx: (f = msg.getCheckTx()) && proto.tendermint.abci.ResponseCheckTx.toObject(includeInstance, f), + commit: (f = msg.getCommit()) && proto.tendermint.abci.ResponseCommit.toObject(includeInstance, f), + listSnapshots: (f = msg.getListSnapshots()) && proto.tendermint.abci.ResponseListSnapshots.toObject(includeInstance, f), + offerSnapshot: (f = msg.getOfferSnapshot()) && proto.tendermint.abci.ResponseOfferSnapshot.toObject(includeInstance, f), + loadSnapshotChunk: (f = msg.getLoadSnapshotChunk()) && proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject(includeInstance, f), + applySnapshotChunk: (f = msg.getApplySnapshotChunk()) && proto.tendermint.abci.ResponseApplySnapshotChunk.toObject(includeInstance, f), + prepareProposal: (f = msg.getPrepareProposal()) && proto.tendermint.abci.ResponsePrepareProposal.toObject(includeInstance, f), + processProposal: (f = msg.getProcessProposal()) && proto.tendermint.abci.ResponseProcessProposal.toObject(includeInstance, f), + extendVote: (f = msg.getExtendVote()) && proto.tendermint.abci.ResponseExtendVote.toObject(includeInstance, f), + verifyVoteExtension: (f = msg.getVerifyVoteExtension()) && proto.tendermint.abci.ResponseVerifyVoteExtension.toObject(includeInstance, f), + finalizeBlock: (f = msg.getFinalizeBlock()) && proto.tendermint.abci.ResponseFinalizeBlock.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.Response} + */ +proto.tendermint.abci.Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Response; + return proto.tendermint.abci.Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Response} + */ +proto.tendermint.abci.Response.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.ResponseException; + reader.readMessage(value,proto.tendermint.abci.ResponseException.deserializeBinaryFromReader); + msg.setException(value); + break; + case 2: + var value = new proto.tendermint.abci.ResponseEcho; + reader.readMessage(value,proto.tendermint.abci.ResponseEcho.deserializeBinaryFromReader); + msg.setEcho(value); + break; + case 3: + var value = new proto.tendermint.abci.ResponseFlush; + reader.readMessage(value,proto.tendermint.abci.ResponseFlush.deserializeBinaryFromReader); + msg.setFlush(value); + break; + case 4: + var value = new proto.tendermint.abci.ResponseInfo; + reader.readMessage(value,proto.tendermint.abci.ResponseInfo.deserializeBinaryFromReader); msg.setInfo(value); break; case 6: @@ -5854,26 +6623,11 @@ proto.tendermint.abci.Response.deserializeBinaryFromReader = function(msg, reade reader.readMessage(value,proto.tendermint.abci.ResponseQuery.deserializeBinaryFromReader); msg.setQuery(value); break; - case 8: - var value = new proto.tendermint.abci.ResponseBeginBlock; - reader.readMessage(value,proto.tendermint.abci.ResponseBeginBlock.deserializeBinaryFromReader); - msg.setBeginBlock(value); - break; case 9: var value = new proto.tendermint.abci.ResponseCheckTx; reader.readMessage(value,proto.tendermint.abci.ResponseCheckTx.deserializeBinaryFromReader); msg.setCheckTx(value); break; - case 10: - var value = new proto.tendermint.abci.ResponseDeliverTx; - reader.readMessage(value,proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader); - msg.setDeliverTx(value); - break; - case 11: - var value = new proto.tendermint.abci.ResponseEndBlock; - reader.readMessage(value,proto.tendermint.abci.ResponseEndBlock.deserializeBinaryFromReader); - msg.setEndBlock(value); - break; case 12: var value = new proto.tendermint.abci.ResponseCommit; reader.readMessage(value,proto.tendermint.abci.ResponseCommit.deserializeBinaryFromReader); @@ -5909,6 +6663,21 @@ proto.tendermint.abci.Response.deserializeBinaryFromReader = function(msg, reade reader.readMessage(value,proto.tendermint.abci.ResponseProcessProposal.deserializeBinaryFromReader); msg.setProcessProposal(value); break; + case 19: + var value = new proto.tendermint.abci.ResponseExtendVote; + reader.readMessage(value,proto.tendermint.abci.ResponseExtendVote.deserializeBinaryFromReader); + msg.setExtendVote(value); + break; + case 20: + var value = new proto.tendermint.abci.ResponseVerifyVoteExtension; + reader.readMessage(value,proto.tendermint.abci.ResponseVerifyVoteExtension.deserializeBinaryFromReader); + msg.setVerifyVoteExtension(value); + break; + case 21: + var value = new proto.tendermint.abci.ResponseFinalizeBlock; + reader.readMessage(value,proto.tendermint.abci.ResponseFinalizeBlock.deserializeBinaryFromReader); + msg.setFinalizeBlock(value); + break; default: reader.skipField(); break; @@ -5986,14 +6755,6 @@ proto.tendermint.abci.Response.serializeBinaryToWriter = function(message, write proto.tendermint.abci.ResponseQuery.serializeBinaryToWriter ); } - f = message.getBeginBlock(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.tendermint.abci.ResponseBeginBlock.serializeBinaryToWriter - ); - } f = message.getCheckTx(); if (f != null) { writer.writeMessage( @@ -6002,22 +6763,6 @@ proto.tendermint.abci.Response.serializeBinaryToWriter = function(message, write proto.tendermint.abci.ResponseCheckTx.serializeBinaryToWriter ); } - f = message.getDeliverTx(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter - ); - } - f = message.getEndBlock(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.tendermint.abci.ResponseEndBlock.serializeBinaryToWriter - ); - } f = message.getCommit(); if (f != null) { writer.writeMessage( @@ -6074,6 +6819,30 @@ proto.tendermint.abci.Response.serializeBinaryToWriter = function(message, write proto.tendermint.abci.ResponseProcessProposal.serializeBinaryToWriter ); } + f = message.getExtendVote(); + if (f != null) { + writer.writeMessage( + 19, + f, + proto.tendermint.abci.ResponseExtendVote.serializeBinaryToWriter + ); + } + f = message.getVerifyVoteExtension(); + if (f != null) { + writer.writeMessage( + 20, + f, + proto.tendermint.abci.ResponseVerifyVoteExtension.serializeBinaryToWriter + ); + } + f = message.getFinalizeBlock(); + if (f != null) { + writer.writeMessage( + 21, + f, + proto.tendermint.abci.ResponseFinalizeBlock.serializeBinaryToWriter + ); + } }; @@ -6299,43 +7068,6 @@ proto.tendermint.abci.Response.prototype.hasQuery = function() { }; -/** - * optional ResponseBeginBlock begin_block = 8; - * @return {?proto.tendermint.abci.ResponseBeginBlock} - */ -proto.tendermint.abci.Response.prototype.getBeginBlock = function() { - return /** @type{?proto.tendermint.abci.ResponseBeginBlock} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseBeginBlock, 8)); -}; - - -/** - * @param {?proto.tendermint.abci.ResponseBeginBlock|undefined} value - * @return {!proto.tendermint.abci.Response} returns this -*/ -proto.tendermint.abci.Response.prototype.setBeginBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 8, proto.tendermint.abci.Response.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.Response} returns this - */ -proto.tendermint.abci.Response.prototype.clearBeginBlock = function() { - return this.setBeginBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tendermint.abci.Response.prototype.hasBeginBlock = function() { - return jspb.Message.getField(this, 8) != null; -}; - - /** * optional ResponseCheckTx check_tx = 9; * @return {?proto.tendermint.abci.ResponseCheckTx} @@ -6373,80 +7105,6 @@ proto.tendermint.abci.Response.prototype.hasCheckTx = function() { }; -/** - * optional ResponseDeliverTx deliver_tx = 10; - * @return {?proto.tendermint.abci.ResponseDeliverTx} - */ -proto.tendermint.abci.Response.prototype.getDeliverTx = function() { - return /** @type{?proto.tendermint.abci.ResponseDeliverTx} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseDeliverTx, 10)); -}; - - -/** - * @param {?proto.tendermint.abci.ResponseDeliverTx|undefined} value - * @return {!proto.tendermint.abci.Response} returns this -*/ -proto.tendermint.abci.Response.prototype.setDeliverTx = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.tendermint.abci.Response.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.Response} returns this - */ -proto.tendermint.abci.Response.prototype.clearDeliverTx = function() { - return this.setDeliverTx(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tendermint.abci.Response.prototype.hasDeliverTx = function() { - return jspb.Message.getField(this, 10) != null; -}; - - -/** - * optional ResponseEndBlock end_block = 11; - * @return {?proto.tendermint.abci.ResponseEndBlock} - */ -proto.tendermint.abci.Response.prototype.getEndBlock = function() { - return /** @type{?proto.tendermint.abci.ResponseEndBlock} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseEndBlock, 11)); -}; - - -/** - * @param {?proto.tendermint.abci.ResponseEndBlock|undefined} value - * @return {!proto.tendermint.abci.Response} returns this -*/ -proto.tendermint.abci.Response.prototype.setEndBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.tendermint.abci.Response.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.Response} returns this - */ -proto.tendermint.abci.Response.prototype.clearEndBlock = function() { - return this.setEndBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tendermint.abci.Response.prototype.hasEndBlock = function() { - return jspb.Message.getField(this, 11) != null; -}; - - /** * optional ResponseCommit commit = 12; * @return {?proto.tendermint.abci.ResponseCommit} @@ -6655,8 +7313,119 @@ proto.tendermint.abci.Response.prototype.setPrepareProposal = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Response} returns this */ -proto.tendermint.abci.Response.prototype.clearPrepareProposal = function() { - return this.setPrepareProposal(undefined); +proto.tendermint.abci.Response.prototype.clearPrepareProposal = function() { + return this.setPrepareProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasPrepareProposal = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional ResponseProcessProposal process_proposal = 18; + * @return {?proto.tendermint.abci.ResponseProcessProposal} + */ +proto.tendermint.abci.Response.prototype.getProcessProposal = function() { + return /** @type{?proto.tendermint.abci.ResponseProcessProposal} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseProcessProposal, 18)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseProcessProposal|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setProcessProposal = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearProcessProposal = function() { + return this.setProcessProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasProcessProposal = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional ResponseExtendVote extend_vote = 19; + * @return {?proto.tendermint.abci.ResponseExtendVote} + */ +proto.tendermint.abci.Response.prototype.getExtendVote = function() { + return /** @type{?proto.tendermint.abci.ResponseExtendVote} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseExtendVote, 19)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseExtendVote|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setExtendVote = function(value) { + return jspb.Message.setOneofWrapperField(this, 19, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearExtendVote = function() { + return this.setExtendVote(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasExtendVote = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional ResponseVerifyVoteExtension verify_vote_extension = 20; + * @return {?proto.tendermint.abci.ResponseVerifyVoteExtension} + */ +proto.tendermint.abci.Response.prototype.getVerifyVoteExtension = function() { + return /** @type{?proto.tendermint.abci.ResponseVerifyVoteExtension} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseVerifyVoteExtension, 20)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseVerifyVoteExtension|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setVerifyVoteExtension = function(value) { + return jspb.Message.setOneofWrapperField(this, 20, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearVerifyVoteExtension = function() { + return this.setVerifyVoteExtension(undefined); }; @@ -6664,27 +7433,27 @@ proto.tendermint.abci.Response.prototype.clearPrepareProposal = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Response.prototype.hasPrepareProposal = function() { - return jspb.Message.getField(this, 17) != null; +proto.tendermint.abci.Response.prototype.hasVerifyVoteExtension = function() { + return jspb.Message.getField(this, 20) != null; }; /** - * optional ResponseProcessProposal process_proposal = 18; - * @return {?proto.tendermint.abci.ResponseProcessProposal} + * optional ResponseFinalizeBlock finalize_block = 21; + * @return {?proto.tendermint.abci.ResponseFinalizeBlock} */ -proto.tendermint.abci.Response.prototype.getProcessProposal = function() { - return /** @type{?proto.tendermint.abci.ResponseProcessProposal} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseProcessProposal, 18)); +proto.tendermint.abci.Response.prototype.getFinalizeBlock = function() { + return /** @type{?proto.tendermint.abci.ResponseFinalizeBlock} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseFinalizeBlock, 21)); }; /** - * @param {?proto.tendermint.abci.ResponseProcessProposal|undefined} value + * @param {?proto.tendermint.abci.ResponseFinalizeBlock|undefined} value * @return {!proto.tendermint.abci.Response} returns this */ -proto.tendermint.abci.Response.prototype.setProcessProposal = function(value) { - return jspb.Message.setOneofWrapperField(this, 18, proto.tendermint.abci.Response.oneofGroups_[0], value); +proto.tendermint.abci.Response.prototype.setFinalizeBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 21, proto.tendermint.abci.Response.oneofGroups_[0], value); }; @@ -6692,8 +7461,8 @@ proto.tendermint.abci.Response.prototype.setProcessProposal = function(value) { * Clears the message field making it undefined. * @return {!proto.tendermint.abci.Response} returns this */ -proto.tendermint.abci.Response.prototype.clearProcessProposal = function() { - return this.setProcessProposal(undefined); +proto.tendermint.abci.Response.prototype.clearFinalizeBlock = function() { + return this.setFinalizeBlock(undefined); }; @@ -6701,8 +7470,8 @@ proto.tendermint.abci.Response.prototype.clearProcessProposal = function() { * Returns whether this field is set. * @return {boolean} */ -proto.tendermint.abci.Response.prototype.hasProcessProposal = function() { - return jspb.Message.getField(this, 18) != null; +proto.tendermint.abci.Response.prototype.hasFinalizeBlock = function() { + return jspb.Message.getField(this, 21) != null; }; @@ -8051,7 +8820,7 @@ proto.tendermint.abci.ResponseQuery.prototype.setCodespace = function(value) { * @private {!Array} * @const */ -proto.tendermint.abci.ResponseBeginBlock.repeatedFields_ = [1]; +proto.tendermint.abci.ResponseCheckTx.repeatedFields_ = [7]; @@ -8068,8 +8837,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseBeginBlock.toObject(opt_includeInstance, this); +proto.tendermint.abci.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseCheckTx.toObject(opt_includeInstance, this); }; @@ -8078,14 +8847,21 @@ proto.tendermint.abci.ResponseBeginBlock.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseBeginBlock} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ResponseCheckTx} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseBeginBlock.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ResponseCheckTx.toObject = function(includeInstance, msg) { var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + data: msg.getData_asB64(), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), + gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), eventsList: jspb.Message.toObjectList(msg.getEventsList(), - proto.tendermint.abci.Event.toObject, includeInstance) + proto.tendermint.abci.Event.toObject, includeInstance), + codespace: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -8099,23 +8875,23 @@ proto.tendermint.abci.ResponseBeginBlock.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseBeginBlock} + * @return {!proto.tendermint.abci.ResponseCheckTx} */ -proto.tendermint.abci.ResponseBeginBlock.deserializeBinary = function(bytes) { +proto.tendermint.abci.ResponseCheckTx.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseBeginBlock; - return proto.tendermint.abci.ResponseBeginBlock.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ResponseCheckTx; + return proto.tendermint.abci.ResponseCheckTx.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseBeginBlock} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ResponseCheckTx} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseBeginBlock} + * @return {!proto.tendermint.abci.ResponseCheckTx} */ -proto.tendermint.abci.ResponseBeginBlock.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ResponseCheckTx.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8123,10 +8899,38 @@ proto.tendermint.abci.ResponseBeginBlock.deserializeBinaryFromReader = function( var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasWanted(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasUsed(value); + break; + case 7: var value = new proto.tendermint.abci.Event; reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); msg.addEvents(value); break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setCodespace(value); + break; default: reader.skipField(); break; @@ -8140,49 +8944,230 @@ proto.tendermint.abci.ResponseBeginBlock.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseBeginBlock.prototype.serializeBinary = function() { +proto.tendermint.abci.ResponseCheckTx.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseBeginBlock.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.ResponseCheckTx.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseBeginBlock} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseCheckTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseCheckTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getGasWanted(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.tendermint.abci.Event.serializeBinaryToWriter + ); + } + f = message.getCodespace(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 gas_wanted = 5; + * @return {number} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 gas_used = 6; + * @return {number} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this */ -proto.tendermint.abci.ResponseBeginBlock.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.tendermint.abci.Event.serializeBinaryToWriter - ); - } +proto.tendermint.abci.ResponseCheckTx.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * repeated Event events = 1; + * repeated Event events = 7; * @return {!Array} */ -proto.tendermint.abci.ResponseBeginBlock.prototype.getEventsList = function() { +proto.tendermint.abci.ResponseCheckTx.prototype.getEventsList = function() { return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 1)); + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 7)); }; /** * @param {!Array} value - * @return {!proto.tendermint.abci.ResponseBeginBlock} returns this + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this */ -proto.tendermint.abci.ResponseBeginBlock.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.tendermint.abci.ResponseCheckTx.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -8191,27 +9176,38 @@ proto.tendermint.abci.ResponseBeginBlock.prototype.setEventsList = function(valu * @param {number=} opt_index * @return {!proto.tendermint.abci.Event} */ -proto.tendermint.abci.ResponseBeginBlock.prototype.addEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.abci.Event, opt_index); +proto.tendermint.abci.ResponseCheckTx.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.tendermint.abci.Event, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ResponseBeginBlock} returns this + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this */ -proto.tendermint.abci.ResponseBeginBlock.prototype.clearEventsList = function() { +proto.tendermint.abci.ResponseCheckTx.prototype.clearEventsList = function() { return this.setEventsList([]); }; +/** + * optional string codespace = 8; + * @return {string} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {string} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this */ -proto.tendermint.abci.ResponseCheckTx.repeatedFields_ = [7]; +proto.tendermint.abci.ResponseCheckTx.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + @@ -8228,8 +9224,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseCheckTx.toObject(opt_includeInstance, this); +proto.tendermint.abci.ResponseCommit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseCommit.toObject(opt_includeInstance, this); }; @@ -8238,24 +9234,13 @@ proto.tendermint.abci.ResponseCheckTx.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseCheckTx} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ResponseCommit} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseCheckTx.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ResponseCommit.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - data: msg.getData_asB64(), - log: jspb.Message.getFieldWithDefault(msg, 3, ""), - info: jspb.Message.getFieldWithDefault(msg, 4, ""), - gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), - gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), - eventsList: jspb.Message.toObjectList(msg.getEventsList(), - proto.tendermint.abci.Event.toObject, includeInstance), - codespace: jspb.Message.getFieldWithDefault(msg, 8, ""), - sender: jspb.Message.getFieldWithDefault(msg, 9, ""), - priority: jspb.Message.getFieldWithDefault(msg, 10, 0), - mempoolError: jspb.Message.getFieldWithDefault(msg, 11, "") + retainHeight: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -8269,73 +9254,32 @@ proto.tendermint.abci.ResponseCheckTx.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseCheckTx} + * @return {!proto.tendermint.abci.ResponseCommit} */ -proto.tendermint.abci.ResponseCheckTx.deserializeBinary = function(bytes) { +proto.tendermint.abci.ResponseCommit.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseCheckTx; - return proto.tendermint.abci.ResponseCheckTx.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ResponseCommit; + return proto.tendermint.abci.ResponseCommit.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseCheckTx} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ResponseCommit} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseCheckTx} + * @return {!proto.tendermint.abci.ResponseCommit} */ -proto.tendermint.abci.ResponseCheckTx.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ResponseCommit.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCode(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLog(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setInfo(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGasWanted(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGasUsed(value); - break; - case 7: - var value = new proto.tendermint.abci.Event; - reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); - msg.addEvents(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setCodespace(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - case 10: var value = /** @type {number} */ (reader.readInt64()); - msg.setPriority(value); - break; - case 11: - var value = /** @type {string} */ (reader.readString()); - msg.setMempoolError(value); + msg.setRetainHeight(value); break; default: reader.skipField(); @@ -8350,9 +9294,9 @@ proto.tendermint.abci.ResponseCheckTx.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseCheckTx.prototype.serializeBinary = function() { +proto.tendermint.abci.ResponseCommit.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseCheckTx.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8360,343 +9304,343 @@ proto.tendermint.abci.ResponseCheckTx.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseCheckTx} message + * @param {!proto.tendermint.abci.ResponseCommit} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseCheckTx.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getLog(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getInfo(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getGasWanted(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getGasUsed(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.tendermint.abci.Event.serializeBinaryToWriter - ); - } - f = message.getCodespace(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getSender(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getPriority(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getMempoolError(); - if (f.length > 0) { - writer.writeString( - 11, - f - ); - } -}; - - -/** - * optional uint32 code = 1; - * @return {number} - */ -proto.tendermint.abci.ResponseCheckTx.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this - */ -proto.tendermint.abci.ResponseCheckTx.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.tendermint.abci.ResponseCheckTx.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes data = 2; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.tendermint.abci.ResponseCheckTx.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.tendermint.abci.ResponseCheckTx.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); +proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRetainHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * optional int64 retain_height = 3; + * @return {number} */ -proto.tendermint.abci.ResponseCheckTx.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.tendermint.abci.ResponseCommit.prototype.getRetainHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * optional string log = 3; - * @return {string} + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCommit} returns this */ -proto.tendermint.abci.ResponseCheckTx.prototype.getLog = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.tendermint.abci.ResponseCommit.prototype.setRetainHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; + /** - * @param {string} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.tendermint.abci.ResponseCheckTx.prototype.setLog = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; +proto.tendermint.abci.ResponseListSnapshots.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string info = 4; - * @return {string} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.tendermint.abci.ResponseCheckTx.prototype.getInfo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.tendermint.abci.ResponseListSnapshots.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseListSnapshots.toObject(opt_includeInstance, this); }; /** - * @param {string} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseListSnapshots} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseCheckTx.prototype.setInfo = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.tendermint.abci.ResponseListSnapshots.toObject = function(includeInstance, msg) { + var f, obj = { + snapshotsList: jspb.Message.toObjectList(msg.getSnapshotsList(), + proto.tendermint.abci.Snapshot.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 gas_wanted = 5; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseListSnapshots} */ -proto.tendermint.abci.ResponseCheckTx.prototype.getGasWanted = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.tendermint.abci.ResponseListSnapshots.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseListSnapshots; + return proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseListSnapshots} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseListSnapshots} */ -proto.tendermint.abci.ResponseCheckTx.prototype.setGasWanted = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.Snapshot; + reader.readMessage(value,proto.tendermint.abci.Snapshot.deserializeBinaryFromReader); + msg.addSnapshots(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 gas_used = 6; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseCheckTx.prototype.getGasUsed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.tendermint.abci.ResponseListSnapshots.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseListSnapshots.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseListSnapshots} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseCheckTx.prototype.setGasUsed = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.tendermint.abci.ResponseListSnapshots.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSnapshotsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.abci.Snapshot.serializeBinaryToWriter + ); + } }; /** - * repeated Event events = 7; - * @return {!Array} + * repeated Snapshot snapshots = 1; + * @return {!Array} */ -proto.tendermint.abci.ResponseCheckTx.prototype.getEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 7)); +proto.tendermint.abci.ResponseListSnapshots.prototype.getSnapshotsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Snapshot, 1)); }; /** - * @param {!Array} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseListSnapshots} returns this */ -proto.tendermint.abci.ResponseCheckTx.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); +proto.tendermint.abci.ResponseListSnapshots.prototype.setSnapshotsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.tendermint.abci.Event=} opt_value + * @param {!proto.tendermint.abci.Snapshot=} opt_value * @param {number=} opt_index - * @return {!proto.tendermint.abci.Event} + * @return {!proto.tendermint.abci.Snapshot} */ -proto.tendermint.abci.ResponseCheckTx.prototype.addEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.tendermint.abci.Event, opt_index); +proto.tendermint.abci.ResponseListSnapshots.prototype.addSnapshots = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.abci.Snapshot, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * @return {!proto.tendermint.abci.ResponseListSnapshots} returns this */ -proto.tendermint.abci.ResponseCheckTx.prototype.clearEventsList = function() { - return this.setEventsList([]); +proto.tendermint.abci.ResponseListSnapshots.prototype.clearSnapshotsList = function() { + return this.setSnapshotsList([]); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string codespace = 8; - * @return {string} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.tendermint.abci.ResponseCheckTx.prototype.getCodespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.tendermint.abci.ResponseOfferSnapshot.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseOfferSnapshot.toObject(opt_includeInstance, this); }; /** - * @param {string} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseOfferSnapshot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseCheckTx.prototype.setCodespace = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.tendermint.abci.ResponseOfferSnapshot.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional string sender = 9; - * @return {string} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseOfferSnapshot} + */ +proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseOfferSnapshot; + return proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseOfferSnapshot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseOfferSnapshot} */ -proto.tendermint.abci.ResponseCheckTx.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.abci.ResponseOfferSnapshot.Result} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {string} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseCheckTx.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); +proto.tendermint.abci.ResponseOfferSnapshot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional int64 priority = 10; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseOfferSnapshot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseCheckTx.prototype.getPriority = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } }; /** - * @param {number} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * @enum {number} */ -proto.tendermint.abci.ResponseCheckTx.prototype.setPriority = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); +proto.tendermint.abci.ResponseOfferSnapshot.Result = { + UNKNOWN: 0, + ACCEPT: 1, + ABORT: 2, + REJECT: 3, + REJECT_FORMAT: 4, + REJECT_SENDER: 5 }; - /** - * optional string mempool_error = 11; - * @return {string} + * optional Result result = 1; + * @return {!proto.tendermint.abci.ResponseOfferSnapshot.Result} */ -proto.tendermint.abci.ResponseCheckTx.prototype.getMempoolError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +proto.tendermint.abci.ResponseOfferSnapshot.prototype.getResult = function() { + return /** @type {!proto.tendermint.abci.ResponseOfferSnapshot.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + * @param {!proto.tendermint.abci.ResponseOfferSnapshot.Result} value + * @return {!proto.tendermint.abci.ResponseOfferSnapshot} returns this */ -proto.tendermint.abci.ResponseCheckTx.prototype.setMempoolError = function(value) { - return jspb.Message.setProto3StringField(this, 11, value); +proto.tendermint.abci.ResponseOfferSnapshot.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tendermint.abci.ResponseDeliverTx.repeatedFields_ = [7]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -8712,8 +9656,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseDeliverTx.toObject(opt_includeInstance, this); +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject(opt_includeInstance, this); }; @@ -8722,21 +9666,13 @@ proto.tendermint.abci.ResponseDeliverTx.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseDeliverTx} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ResponseLoadSnapshotChunk} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseDeliverTx.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - data: msg.getData_asB64(), - log: jspb.Message.getFieldWithDefault(msg, 3, ""), - info: jspb.Message.getFieldWithDefault(msg, 4, ""), - gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), - gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), - eventsList: jspb.Message.toObjectList(msg.getEventsList(), - proto.tendermint.abci.Event.toObject, includeInstance), - codespace: jspb.Message.getFieldWithDefault(msg, 8, "") + chunk: msg.getChunk_asB64() }; if (includeInstance) { @@ -8750,23 +9686,23 @@ proto.tendermint.abci.ResponseDeliverTx.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseDeliverTx} + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} */ -proto.tendermint.abci.ResponseDeliverTx.deserializeBinary = function(bytes) { +proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseDeliverTx; - return proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ResponseLoadSnapshotChunk; + return proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseDeliverTx} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ResponseLoadSnapshotChunk} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseDeliverTx} + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} */ -proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8774,37 +9710,8 @@ proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCode(value); - break; - case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLog(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setInfo(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGasWanted(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGasUsed(value); - break; - case 7: - var value = new proto.tendermint.abci.Event; - reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); - msg.addEvents(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setCodespace(value); + msg.setChunk(value); break; default: reader.skipField(); @@ -8819,9 +9726,9 @@ proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.serializeBinary = function() { +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8829,66 +9736,16 @@ proto.tendermint.abci.ResponseDeliverTx.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseDeliverTx} message + * @param {!proto.tendermint.abci.ResponseLoadSnapshotChunk} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getData_asU8(); + f = message.getChunk_asU8(); if (f.length > 0) { writer.writeBytes( - 2, - f - ); - } - f = message.getLog(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getInfo(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getGasWanted(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getGasUsed(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.tendermint.abci.Event.serializeBinaryToWriter - ); - } - f = message.getCodespace(); - if (f.length > 0) { - writer.writeString( - 8, + 1, f ); } @@ -8896,190 +9753,293 @@ proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter = function(messa /** - * optional uint32 code = 1; - * @return {number} + * optional bytes chunk = 1; + * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + * optional bytes chunk = 1; + * This is a type-conversion wrapper around `getChunk()` + * @return {string} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChunk())); }; /** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} + * optional bytes chunk = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChunk()` + * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChunk())); }; /** - * optional bytes data = 2; - * This is a type-conversion wrapper around `getData()` - * @return {string} + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} returns this */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.setChunk = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; + /** - * optional bytes data = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); +proto.tendermint.abci.ResponseApplySnapshotChunk.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseApplySnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0), + refetchChunksList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + rejectSendersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseApplySnapshotChunk; + return proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} */ (reader.readEnum()); + msg.setResult(value); + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addRefetchChunks(values[i]); + } + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addRejectSenders(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional string log = 3; - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getLog = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseApplySnapshotChunk.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {string} value - * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseDeliverTx.prototype.setLog = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.tendermint.abci.ResponseApplySnapshotChunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getRefetchChunksList(); + if (f.length > 0) { + writer.writePackedUint32( + 2, + f + ); + } + f = message.getRejectSendersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } }; /** - * optional string info = 4; - * @return {string} + * @enum {number} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getInfo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.tendermint.abci.ResponseApplySnapshotChunk.Result = { + UNKNOWN: 0, + ACCEPT: 1, + ABORT: 2, + RETRY: 3, + RETRY_SNAPSHOT: 4, + REJECT_SNAPSHOT: 5 }; - /** - * @param {string} value - * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + * optional Result result = 1; + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.setInfo = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getResult = function() { + return /** @type {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional int64 gas_wanted = 5; - * @return {number} + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getGasWanted = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + * repeated uint32 refetch_chunks = 2; + * @return {!Array} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.setGasWanted = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRefetchChunksList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * optional int64 gas_used = 6; - * @return {number} + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getGasUsed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setRefetchChunksList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** * @param {number} value - * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this */ -proto.tendermint.abci.ResponseDeliverTx.prototype.setGasUsed = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRefetchChunks = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * repeated Event events = 7; - * @return {!Array} + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this -*/ -proto.tendermint.abci.ResponseDeliverTx.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRefetchChunksList = function() { + return this.setRefetchChunksList([]); }; /** - * @param {!proto.tendermint.abci.Event=} opt_value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.Event} + * repeated string reject_senders = 3; + * @return {!Array} */ -proto.tendermint.abci.ResponseDeliverTx.prototype.addEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.tendermint.abci.Event, opt_index); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRejectSendersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this */ -proto.tendermint.abci.ResponseDeliverTx.prototype.clearEventsList = function() { - return this.setEventsList([]); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setRejectSendersList = function(value) { + return jspb.Message.setField(this, 3, value || []); }; /** - * optional string codespace = 8; - * @return {string} + * @param {string} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this */ -proto.tendermint.abci.ResponseDeliverTx.prototype.getCodespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRejectSenders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; /** - * @param {string} value - * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this */ -proto.tendermint.abci.ResponseDeliverTx.prototype.setCodespace = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRejectSendersList = function() { + return this.setRejectSendersList([]); }; @@ -9089,7 +10049,7 @@ proto.tendermint.abci.ResponseDeliverTx.prototype.setCodespace = function(value) * @private {!Array} * @const */ -proto.tendermint.abci.ResponseEndBlock.repeatedFields_ = [1,3]; +proto.tendermint.abci.ResponsePrepareProposal.repeatedFields_ = [1]; @@ -9106,8 +10066,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseEndBlock.toObject(opt_includeInstance, this); +proto.tendermint.abci.ResponsePrepareProposal.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponsePrepareProposal.toObject(opt_includeInstance, this); }; @@ -9116,17 +10076,13 @@ proto.tendermint.abci.ResponseEndBlock.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseEndBlock} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ResponsePrepareProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseEndBlock.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ResponsePrepareProposal.toObject = function(includeInstance, msg) { var f, obj = { - validatorUpdatesList: jspb.Message.toObjectList(msg.getValidatorUpdatesList(), - proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), - consensusParamUpdates: (f = msg.getConsensusParamUpdates()) && tendermint_types_params_pb.ConsensusParams.toObject(includeInstance, f), - eventsList: jspb.Message.toObjectList(msg.getEventsList(), - proto.tendermint.abci.Event.toObject, includeInstance) + txsList: msg.getTxsList_asB64() }; if (includeInstance) { @@ -9140,23 +10096,23 @@ proto.tendermint.abci.ResponseEndBlock.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseEndBlock} + * @return {!proto.tendermint.abci.ResponsePrepareProposal} */ -proto.tendermint.abci.ResponseEndBlock.deserializeBinary = function(bytes) { +proto.tendermint.abci.ResponsePrepareProposal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseEndBlock; - return proto.tendermint.abci.ResponseEndBlock.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ResponsePrepareProposal; + return proto.tendermint.abci.ResponsePrepareProposal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseEndBlock} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ResponsePrepareProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseEndBlock} + * @return {!proto.tendermint.abci.ResponsePrepareProposal} */ -proto.tendermint.abci.ResponseEndBlock.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ResponsePrepareProposal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9164,186 +10120,106 @@ proto.tendermint.abci.ResponseEndBlock.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.tendermint.abci.ValidatorUpdate; - reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); - msg.addValidatorUpdates(value); - break; - case 2: - var value = new tendermint_types_params_pb.ConsensusParams; - reader.readMessage(value,tendermint_types_params_pb.ConsensusParams.deserializeBinaryFromReader); - msg.setConsensusParamUpdates(value); - break; - case 3: - var value = new proto.tendermint.abci.Event; - reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); - msg.addEvents(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addTxs(value); break; default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tendermint.abci.ResponseEndBlock.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseEndBlock.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseEndBlock} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tendermint.abci.ResponseEndBlock.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValidatorUpdatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter - ); - } - f = message.getConsensusParamUpdates(); - if (f != null) { - writer.writeMessage( - 2, - f, - tendermint_types_params_pb.ConsensusParams.serializeBinaryToWriter - ); - } - f = message.getEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.tendermint.abci.Event.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ValidatorUpdate validator_updates = 1; - * @return {!Array} - */ -proto.tendermint.abci.ResponseEndBlock.prototype.getValidatorUpdatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ValidatorUpdate, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tendermint.abci.ResponseEndBlock} returns this -*/ -proto.tendermint.abci.ResponseEndBlock.prototype.setValidatorUpdatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.ValidatorUpdate} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseEndBlock.prototype.addValidatorUpdates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.abci.ValidatorUpdate, opt_index); +proto.tendermint.abci.ResponsePrepareProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponsePrepareProposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponsePrepareProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseEndBlock.prototype.clearValidatorUpdatesList = function() { - return this.setValidatorUpdatesList([]); +proto.tendermint.abci.ResponsePrepareProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } }; /** - * optional tendermint.types.ConsensusParams consensus_param_updates = 2; - * @return {?proto.tendermint.types.ConsensusParams} + * repeated bytes txs = 1; + * @return {!(Array|Array)} */ -proto.tendermint.abci.ResponseEndBlock.prototype.getConsensusParamUpdates = function() { - return /** @type{?proto.tendermint.types.ConsensusParams} */ ( - jspb.Message.getWrapperField(this, tendermint_types_params_pb.ConsensusParams, 2)); -}; - - -/** - * @param {?proto.tendermint.types.ConsensusParams|undefined} value - * @return {!proto.tendermint.abci.ResponseEndBlock} returns this -*/ -proto.tendermint.abci.ResponseEndBlock.prototype.setConsensusParamUpdates = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.tendermint.abci.ResponsePrepareProposal.prototype.getTxsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * Clears the message field making it undefined. - * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + * repeated bytes txs = 1; + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} */ -proto.tendermint.abci.ResponseEndBlock.prototype.clearConsensusParamUpdates = function() { - return this.setConsensusParamUpdates(undefined); +proto.tendermint.abci.ResponsePrepareProposal.prototype.getTxsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTxsList())); }; /** - * Returns whether this field is set. - * @return {boolean} + * repeated bytes txs = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} */ -proto.tendermint.abci.ResponseEndBlock.prototype.hasConsensusParamUpdates = function() { - return jspb.Message.getField(this, 2) != null; +proto.tendermint.abci.ResponsePrepareProposal.prototype.getTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTxsList())); }; /** - * repeated Event events = 3; - * @return {!Array} + * @param {!(Array|Array)} value + * @return {!proto.tendermint.abci.ResponsePrepareProposal} returns this */ -proto.tendermint.abci.ResponseEndBlock.prototype.getEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tendermint.abci.ResponseEndBlock} returns this -*/ -proto.tendermint.abci.ResponseEndBlock.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.tendermint.abci.ResponsePrepareProposal.prototype.setTxsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * @param {!proto.tendermint.abci.Event=} opt_value + * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.tendermint.abci.Event} + * @return {!proto.tendermint.abci.ResponsePrepareProposal} returns this */ -proto.tendermint.abci.ResponseEndBlock.prototype.addEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.abci.Event, opt_index); +proto.tendermint.abci.ResponsePrepareProposal.prototype.addTxs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + * @return {!proto.tendermint.abci.ResponsePrepareProposal} returns this */ -proto.tendermint.abci.ResponseEndBlock.prototype.clearEventsList = function() { - return this.setEventsList([]); +proto.tendermint.abci.ResponsePrepareProposal.prototype.clearTxsList = function() { + return this.setTxsList([]); }; @@ -9363,8 +10239,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponseCommit.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseCommit.toObject(opt_includeInstance, this); +proto.tendermint.abci.ResponseProcessProposal.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseProcessProposal.toObject(opt_includeInstance, this); }; @@ -9373,14 +10249,13 @@ proto.tendermint.abci.ResponseCommit.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseCommit} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ResponseProcessProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseCommit.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ResponseProcessProposal.toObject = function(includeInstance, msg) { var f, obj = { - data: msg.getData_asB64(), - retainHeight: jspb.Message.getFieldWithDefault(msg, 3, 0) + status: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -9394,36 +10269,32 @@ proto.tendermint.abci.ResponseCommit.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseCommit} + * @return {!proto.tendermint.abci.ResponseProcessProposal} */ -proto.tendermint.abci.ResponseCommit.deserializeBinary = function(bytes) { +proto.tendermint.abci.ResponseProcessProposal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseCommit; - return proto.tendermint.abci.ResponseCommit.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ResponseProcessProposal; + return proto.tendermint.abci.ResponseProcessProposal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseCommit} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ResponseProcessProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseCommit} + * @return {!proto.tendermint.abci.ResponseProcessProposal} */ -proto.tendermint.abci.ResponseCommit.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ResponseProcessProposal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRetainHeight(value); + case 1: + var value = /** @type {!proto.tendermint.abci.ResponseProcessProposal.ProposalStatus} */ (reader.readEnum()); + msg.setStatus(value); break; default: reader.skipField(); @@ -9438,9 +10309,9 @@ proto.tendermint.abci.ResponseCommit.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseCommit.prototype.serializeBinary = function() { +proto.tendermint.abci.ResponseProcessProposal.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.ResponseProcessProposal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9448,23 +10319,16 @@ proto.tendermint.abci.ResponseCommit.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseCommit} message + * @param {!proto.tendermint.abci.ResponseProcessProposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.ResponseProcessProposal.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getRetainHeight(); - if (f !== 0) { - writer.writeInt64( - 3, + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, f ); } @@ -9472,73 +10336,33 @@ proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter = function(message, /** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.tendermint.abci.ResponseCommit.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes data = 2; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.tendermint.abci.ResponseCommit.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.tendermint.abci.ResponseCommit.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.ResponseCommit} returns this + * @enum {number} */ -proto.tendermint.abci.ResponseCommit.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.tendermint.abci.ResponseProcessProposal.ProposalStatus = { + UNKNOWN: 0, + ACCEPT: 1, + REJECT: 2 }; - /** - * optional int64 retain_height = 3; - * @return {number} + * optional ProposalStatus status = 1; + * @return {!proto.tendermint.abci.ResponseProcessProposal.ProposalStatus} */ -proto.tendermint.abci.ResponseCommit.prototype.getRetainHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.tendermint.abci.ResponseProcessProposal.prototype.getStatus = function() { + return /** @type {!proto.tendermint.abci.ResponseProcessProposal.ProposalStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.ResponseCommit} returns this + * @param {!proto.tendermint.abci.ResponseProcessProposal.ProposalStatus} value + * @return {!proto.tendermint.abci.ResponseProcessProposal} returns this */ -proto.tendermint.abci.ResponseCommit.prototype.setRetainHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.tendermint.abci.ResponseProcessProposal.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tendermint.abci.ResponseListSnapshots.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -9554,8 +10378,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponseListSnapshots.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseListSnapshots.toObject(opt_includeInstance, this); +proto.tendermint.abci.ResponseExtendVote.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseExtendVote.toObject(opt_includeInstance, this); }; @@ -9564,14 +10388,13 @@ proto.tendermint.abci.ResponseListSnapshots.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseListSnapshots} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ResponseExtendVote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseListSnapshots.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ResponseExtendVote.toObject = function(includeInstance, msg) { var f, obj = { - snapshotsList: jspb.Message.toObjectList(msg.getSnapshotsList(), - proto.tendermint.abci.Snapshot.toObject, includeInstance) + voteExtension: msg.getVoteExtension_asB64() }; if (includeInstance) { @@ -9585,23 +10408,23 @@ proto.tendermint.abci.ResponseListSnapshots.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseListSnapshots} + * @return {!proto.tendermint.abci.ResponseExtendVote} */ -proto.tendermint.abci.ResponseListSnapshots.deserializeBinary = function(bytes) { +proto.tendermint.abci.ResponseExtendVote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseListSnapshots; - return proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ResponseExtendVote; + return proto.tendermint.abci.ResponseExtendVote.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseListSnapshots} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ResponseExtendVote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseListSnapshots} + * @return {!proto.tendermint.abci.ResponseExtendVote} */ -proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ResponseExtendVote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9609,9 +10432,8 @@ proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.tendermint.abci.Snapshot; - reader.readMessage(value,proto.tendermint.abci.Snapshot.deserializeBinaryFromReader); - msg.addSnapshots(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setVoteExtension(value); break; default: reader.skipField(); @@ -9626,9 +10448,9 @@ proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseListSnapshots.prototype.serializeBinary = function() { +proto.tendermint.abci.ResponseExtendVote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseListSnapshots.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.ResponseExtendVote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9636,58 +10458,61 @@ proto.tendermint.abci.ResponseListSnapshots.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseListSnapshots} message + * @param {!proto.tendermint.abci.ResponseExtendVote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseListSnapshots.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.ResponseExtendVote.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSnapshotsList(); + f = message.getVoteExtension_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 1, - f, - proto.tendermint.abci.Snapshot.serializeBinaryToWriter + f ); } }; /** - * repeated Snapshot snapshots = 1; - * @return {!Array} + * optional bytes vote_extension = 1; + * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.ResponseListSnapshots.prototype.getSnapshotsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Snapshot, 1)); +proto.tendermint.abci.ResponseExtendVote.prototype.getVoteExtension = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.tendermint.abci.ResponseListSnapshots} returns this -*/ -proto.tendermint.abci.ResponseListSnapshots.prototype.setSnapshotsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * optional bytes vote_extension = 1; + * This is a type-conversion wrapper around `getVoteExtension()` + * @return {string} + */ +proto.tendermint.abci.ResponseExtendVote.prototype.getVoteExtension_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getVoteExtension())); }; /** - * @param {!proto.tendermint.abci.Snapshot=} opt_value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.Snapshot} + * optional bytes vote_extension = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVoteExtension()` + * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseListSnapshots.prototype.addSnapshots = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.abci.Snapshot, opt_index); +proto.tendermint.abci.ResponseExtendVote.prototype.getVoteExtension_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getVoteExtension())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ResponseListSnapshots} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseExtendVote} returns this */ -proto.tendermint.abci.ResponseListSnapshots.prototype.clearSnapshotsList = function() { - return this.setSnapshotsList([]); +proto.tendermint.abci.ResponseExtendVote.prototype.setVoteExtension = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -9707,8 +10532,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponseOfferSnapshot.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseOfferSnapshot.toObject(opt_includeInstance, this); +proto.tendermint.abci.ResponseVerifyVoteExtension.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseVerifyVoteExtension.toObject(opt_includeInstance, this); }; @@ -9717,13 +10542,13 @@ proto.tendermint.abci.ResponseOfferSnapshot.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseOfferSnapshot} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ResponseVerifyVoteExtension} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseOfferSnapshot.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ResponseVerifyVoteExtension.toObject = function(includeInstance, msg) { var f, obj = { - result: jspb.Message.getFieldWithDefault(msg, 1, 0) + status: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -9737,23 +10562,23 @@ proto.tendermint.abci.ResponseOfferSnapshot.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseOfferSnapshot} + * @return {!proto.tendermint.abci.ResponseVerifyVoteExtension} */ -proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinary = function(bytes) { +proto.tendermint.abci.ResponseVerifyVoteExtension.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseOfferSnapshot; - return proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ResponseVerifyVoteExtension; + return proto.tendermint.abci.ResponseVerifyVoteExtension.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseOfferSnapshot} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ResponseVerifyVoteExtension} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseOfferSnapshot} + * @return {!proto.tendermint.abci.ResponseVerifyVoteExtension} */ -proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ResponseVerifyVoteExtension.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9761,8 +10586,8 @@ proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.tendermint.abci.ResponseOfferSnapshot.Result} */ (reader.readEnum()); - msg.setResult(value); + var value = /** @type {!proto.tendermint.abci.ResponseVerifyVoteExtension.VerifyStatus} */ (reader.readEnum()); + msg.setStatus(value); break; default: reader.skipField(); @@ -9777,9 +10602,9 @@ proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseOfferSnapshot.prototype.serializeBinary = function() { +proto.tendermint.abci.ResponseVerifyVoteExtension.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.ResponseVerifyVoteExtension.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9787,13 +10612,13 @@ proto.tendermint.abci.ResponseOfferSnapshot.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseOfferSnapshot} message + * @param {!proto.tendermint.abci.ResponseVerifyVoteExtension} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.ResponseVerifyVoteExtension.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getResult(); + f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( 1, @@ -9806,34 +10631,38 @@ proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter = function(m /** * @enum {number} */ -proto.tendermint.abci.ResponseOfferSnapshot.Result = { +proto.tendermint.abci.ResponseVerifyVoteExtension.VerifyStatus = { UNKNOWN: 0, ACCEPT: 1, - ABORT: 2, - REJECT: 3, - REJECT_FORMAT: 4, - REJECT_SENDER: 5 + REJECT: 2 }; /** - * optional Result result = 1; - * @return {!proto.tendermint.abci.ResponseOfferSnapshot.Result} + * optional VerifyStatus status = 1; + * @return {!proto.tendermint.abci.ResponseVerifyVoteExtension.VerifyStatus} */ -proto.tendermint.abci.ResponseOfferSnapshot.prototype.getResult = function() { - return /** @type {!proto.tendermint.abci.ResponseOfferSnapshot.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.tendermint.abci.ResponseVerifyVoteExtension.prototype.getStatus = function() { + return /** @type {!proto.tendermint.abci.ResponseVerifyVoteExtension.VerifyStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!proto.tendermint.abci.ResponseOfferSnapshot.Result} value - * @return {!proto.tendermint.abci.ResponseOfferSnapshot} returns this + * @param {!proto.tendermint.abci.ResponseVerifyVoteExtension.VerifyStatus} value + * @return {!proto.tendermint.abci.ResponseVerifyVoteExtension} returns this */ -proto.tendermint.abci.ResponseOfferSnapshot.prototype.setResult = function(value) { +proto.tendermint.abci.ResponseVerifyVoteExtension.prototype.setStatus = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseFinalizeBlock.repeatedFields_ = [1,2,3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -9849,8 +10678,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject(opt_includeInstance, this); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseFinalizeBlock.toObject(opt_includeInstance, this); }; @@ -9859,13 +10688,20 @@ proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseLoadSnapshotChunk} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ResponseFinalizeBlock} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ResponseFinalizeBlock.toObject = function(includeInstance, msg) { var f, obj = { - chunk: msg.getChunk_asB64() + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.toObject, includeInstance), + txResultsList: jspb.Message.toObjectList(msg.getTxResultsList(), + proto.tendermint.abci.ExecTxResult.toObject, includeInstance), + validatorUpdatesList: jspb.Message.toObjectList(msg.getValidatorUpdatesList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + consensusParamUpdates: (f = msg.getConsensusParamUpdates()) && tendermint_types_params_pb.ConsensusParams.toObject(includeInstance, f), + appHash: msg.getAppHash_asB64() }; if (includeInstance) { @@ -9879,23 +10715,23 @@ proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinary = function(bytes) { +proto.tendermint.abci.ResponseFinalizeBlock.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseLoadSnapshotChunk; - return proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ResponseFinalizeBlock; + return proto.tendermint.abci.ResponseFinalizeBlock.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseLoadSnapshotChunk} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ResponseFinalizeBlock} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ResponseFinalizeBlock.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9903,8 +10739,28 @@ proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader = fu var field = reader.getFieldNumber(); switch (field) { case 1: + var value = new proto.tendermint.abci.Event; + reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + case 2: + var value = new proto.tendermint.abci.ExecTxResult; + reader.readMessage(value,proto.tendermint.abci.ExecTxResult.deserializeBinaryFromReader); + msg.addTxResults(value); + break; + case 3: + var value = new proto.tendermint.abci.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidatorUpdates(value); + break; + case 4: + var value = new tendermint_types_params_pb.ConsensusParams; + reader.readMessage(value,tendermint_types_params_pb.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParamUpdates(value); + break; + case 5: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChunk(value); + msg.setAppHash(value); break; default: reader.skipField(); @@ -9919,9 +10775,9 @@ proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.serializeBinary = function() { +proto.tendermint.abci.ResponseFinalizeBlock.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.ResponseFinalizeBlock.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9929,16 +10785,48 @@ proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseLoadSnapshotChunk} message + * @param {!proto.tendermint.abci.ResponseFinalizeBlock} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.ResponseFinalizeBlock.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChunk_asU8(); + f = message.getEventsList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, + f, + proto.tendermint.abci.Event.serializeBinaryToWriter + ); + } + f = message.getTxResultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.ExecTxResult.serializeBinaryToWriter + ); + } + f = message.getValidatorUpdatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getConsensusParamUpdates(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_params_pb.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, f ); } @@ -9946,293 +10834,195 @@ proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter = functi /** - * optional bytes chunk = 1; - * @return {!(string|Uint8Array)} - */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes chunk = 1; - * This is a type-conversion wrapper around `getChunk()` - * @return {string} + * repeated Event events = 1; + * @return {!Array} */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChunk())); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 1)); }; /** - * optional bytes chunk = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChunk()` - * @return {!Uint8Array} - */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChunk())); + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} returns this +*/ +proto.tendermint.abci.ResponseFinalizeBlock.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} returns this + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} */ -proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.setChunk = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.abci.Event, opt_index); }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tendermint.abci.ResponseApplySnapshotChunk.repeatedFields_ = [2,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} returns this */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseApplySnapshotChunk.toObject(opt_includeInstance, this); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.clearEventsList = function() { + return this.setEventsList([]); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated ExecTxResult tx_results = 2; + * @return {!Array} */ -proto.tendermint.abci.ResponseApplySnapshotChunk.toObject = function(includeInstance, msg) { - var f, obj = { - result: jspb.Message.getFieldWithDefault(msg, 1, 0), - refetchChunksList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - rejectSendersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.tendermint.abci.ResponseFinalizeBlock.prototype.getTxResultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ExecTxResult, 2)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} - */ -proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseApplySnapshotChunk; - return proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinaryFromReader(msg, reader); + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} returns this +*/ +proto.tendermint.abci.ResponseFinalizeBlock.prototype.setTxResultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} - */ -proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} */ (reader.readEnum()); - msg.setResult(value); - break; - case 2: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); - for (var i = 0; i < values.length; i++) { - msg.addRefetchChunks(values[i]); - } - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addRejectSenders(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +/** + * @param {!proto.tendermint.abci.ExecTxResult=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ExecTxResult} + */ +proto.tendermint.abci.ResponseFinalizeBlock.prototype.addTxResults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.ExecTxResult, opt_index); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} returns this */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseApplySnapshotChunk.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.clearTxResultsList = function() { + return this.setTxResultsList([]); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated ValidatorUpdate validator_updates = 3; + * @return {!Array} */ -proto.tendermint.abci.ResponseApplySnapshotChunk.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResult(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getRefetchChunksList(); - if (f.length > 0) { - writer.writePackedUint32( - 2, - f - ); - } - f = message.getRejectSendersList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } +proto.tendermint.abci.ResponseFinalizeBlock.prototype.getValidatorUpdatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ValidatorUpdate, 3)); }; /** - * @enum {number} - */ -proto.tendermint.abci.ResponseApplySnapshotChunk.Result = { - UNKNOWN: 0, - ACCEPT: 1, - ABORT: 2, - RETRY: 3, - RETRY_SNAPSHOT: 4, - REJECT_SNAPSHOT: 5 + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} returns this +*/ +proto.tendermint.abci.ResponseFinalizeBlock.prototype.setValidatorUpdatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; + /** - * optional Result result = 1; - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getResult = function() { - return /** @type {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.addValidatorUpdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.abci.ValidatorUpdate, opt_index); }; /** - * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} value - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} returns this */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setResult = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.clearValidatorUpdatesList = function() { + return this.setValidatorUpdatesList([]); }; /** - * repeated uint32 refetch_chunks = 2; - * @return {!Array} + * optional tendermint.types.ConsensusParams consensus_param_updates = 4; + * @return {?proto.tendermint.types.ConsensusParams} */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRefetchChunksList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.getConsensusParamUpdates = function() { + return /** @type{?proto.tendermint.types.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.ConsensusParams, 4)); }; /** - * @param {!Array} value - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this - */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setRefetchChunksList = function(value) { - return jspb.Message.setField(this, 2, value || []); + * @param {?proto.tendermint.types.ConsensusParams|undefined} value + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} returns this +*/ +proto.tendermint.abci.ResponseFinalizeBlock.prototype.setConsensusParamUpdates = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} returns this */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRefetchChunks = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.clearConsensusParamUpdates = function() { + return this.setConsensusParamUpdates(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRefetchChunksList = function() { - return this.setRefetchChunksList([]); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.hasConsensusParamUpdates = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * repeated string reject_senders = 3; - * @return {!Array} + * optional bytes app_hash = 5; + * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRejectSendersList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {!Array} value - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + * optional bytes app_hash = 5; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setRejectSendersList = function(value) { - return jspb.Message.setField(this, 3, value || []); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); }; /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + * optional bytes app_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppHash()` + * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRejectSenders = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseFinalizeBlock} returns this */ -proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRejectSendersList = function() { - return this.setRejectSendersList([]); +proto.tendermint.abci.ResponseFinalizeBlock.prototype.setAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -10242,7 +11032,7 @@ proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRejectSendersLis * @private {!Array} * @const */ -proto.tendermint.abci.ResponsePrepareProposal.repeatedFields_ = [1]; +proto.tendermint.abci.CommitInfo.repeatedFields_ = [2]; @@ -10259,8 +11049,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponsePrepareProposal.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponsePrepareProposal.toObject(opt_includeInstance, this); +proto.tendermint.abci.CommitInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.CommitInfo.toObject(opt_includeInstance, this); }; @@ -10269,13 +11059,15 @@ proto.tendermint.abci.ResponsePrepareProposal.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponsePrepareProposal} msg The msg instance to transform. + * @param {!proto.tendermint.abci.CommitInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponsePrepareProposal.toObject = function(includeInstance, msg) { +proto.tendermint.abci.CommitInfo.toObject = function(includeInstance, msg) { var f, obj = { - txsList: msg.getTxsList_asB64() + round: jspb.Message.getFieldWithDefault(msg, 1, 0), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + proto.tendermint.abci.VoteInfo.toObject, includeInstance) }; if (includeInstance) { @@ -10289,23 +11081,23 @@ proto.tendermint.abci.ResponsePrepareProposal.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponsePrepareProposal} + * @return {!proto.tendermint.abci.CommitInfo} */ -proto.tendermint.abci.ResponsePrepareProposal.deserializeBinary = function(bytes) { +proto.tendermint.abci.CommitInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponsePrepareProposal; - return proto.tendermint.abci.ResponsePrepareProposal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.CommitInfo; + return proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponsePrepareProposal} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.CommitInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponsePrepareProposal} + * @return {!proto.tendermint.abci.CommitInfo} */ -proto.tendermint.abci.ResponsePrepareProposal.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10313,8 +11105,13 @@ proto.tendermint.abci.ResponsePrepareProposal.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addTxs(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 2: + var value = new proto.tendermint.abci.VoteInfo; + reader.readMessage(value,proto.tendermint.abci.VoteInfo.deserializeBinaryFromReader); + msg.addVotes(value); break; default: reader.skipField(); @@ -10329,9 +11126,9 @@ proto.tendermint.abci.ResponsePrepareProposal.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ResponsePrepareProposal.prototype.serializeBinary = function() { +proto.tendermint.abci.CommitInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponsePrepareProposal.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.CommitInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10339,84 +11136,94 @@ proto.tendermint.abci.ResponsePrepareProposal.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponsePrepareProposal} message + * @param {!proto.tendermint.abci.CommitInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponsePrepareProposal.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.CommitInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( 1, f ); } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.VoteInfo.serializeBinaryToWriter + ); + } }; /** - * repeated bytes txs = 1; - * @return {!(Array|Array)} + * optional int32 round = 1; + * @return {number} */ -proto.tendermint.abci.ResponsePrepareProposal.prototype.getTxsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +proto.tendermint.abci.CommitInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * repeated bytes txs = 1; - * This is a type-conversion wrapper around `getTxsList()` - * @return {!Array} + * @param {number} value + * @return {!proto.tendermint.abci.CommitInfo} returns this */ -proto.tendermint.abci.ResponsePrepareProposal.prototype.getTxsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getTxsList())); +proto.tendermint.abci.CommitInfo.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * repeated bytes txs = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxsList()` - * @return {!Array} + * repeated VoteInfo votes = 2; + * @return {!Array} */ -proto.tendermint.abci.ResponsePrepareProposal.prototype.getTxsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getTxsList())); +proto.tendermint.abci.CommitInfo.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.VoteInfo, 2)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.tendermint.abci.ResponsePrepareProposal} returns this - */ -proto.tendermint.abci.ResponsePrepareProposal.prototype.setTxsList = function(value) { - return jspb.Message.setField(this, 1, value || []); + * @param {!Array} value + * @return {!proto.tendermint.abci.CommitInfo} returns this +*/ +proto.tendermint.abci.CommitInfo.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {!(string|Uint8Array)} value + * @param {!proto.tendermint.abci.VoteInfo=} opt_value * @param {number=} opt_index - * @return {!proto.tendermint.abci.ResponsePrepareProposal} returns this + * @return {!proto.tendermint.abci.VoteInfo} */ -proto.tendermint.abci.ResponsePrepareProposal.prototype.addTxs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.tendermint.abci.CommitInfo.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.VoteInfo, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ResponsePrepareProposal} returns this + * @return {!proto.tendermint.abci.CommitInfo} returns this */ -proto.tendermint.abci.ResponsePrepareProposal.prototype.clearTxsList = function() { - return this.setTxsList([]); +proto.tendermint.abci.CommitInfo.prototype.clearVotesList = function() { + return this.setVotesList([]); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ExtendedCommitInfo.repeatedFields_ = [2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -10432,8 +11239,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ResponseProcessProposal.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ResponseProcessProposal.toObject(opt_includeInstance, this); +proto.tendermint.abci.ExtendedCommitInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ExtendedCommitInfo.toObject(opt_includeInstance, this); }; @@ -10442,13 +11249,15 @@ proto.tendermint.abci.ResponseProcessProposal.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ResponseProcessProposal} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ExtendedCommitInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseProcessProposal.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ExtendedCommitInfo.toObject = function(includeInstance, msg) { var f, obj = { - status: jspb.Message.getFieldWithDefault(msg, 1, 0) + round: jspb.Message.getFieldWithDefault(msg, 1, 0), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + proto.tendermint.abci.ExtendedVoteInfo.toObject, includeInstance) }; if (includeInstance) { @@ -10462,23 +11271,23 @@ proto.tendermint.abci.ResponseProcessProposal.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ResponseProcessProposal} + * @return {!proto.tendermint.abci.ExtendedCommitInfo} */ -proto.tendermint.abci.ResponseProcessProposal.deserializeBinary = function(bytes) { +proto.tendermint.abci.ExtendedCommitInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ResponseProcessProposal; - return proto.tendermint.abci.ResponseProcessProposal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ExtendedCommitInfo; + return proto.tendermint.abci.ExtendedCommitInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ResponseProcessProposal} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ExtendedCommitInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ResponseProcessProposal} + * @return {!proto.tendermint.abci.ExtendedCommitInfo} */ -proto.tendermint.abci.ResponseProcessProposal.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ExtendedCommitInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10486,8 +11295,13 @@ proto.tendermint.abci.ResponseProcessProposal.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.tendermint.abci.ResponseProcessProposal.ProposalStatus} */ (reader.readEnum()); - msg.setStatus(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 2: + var value = new proto.tendermint.abci.ExtendedVoteInfo; + reader.readMessage(value,proto.tendermint.abci.ExtendedVoteInfo.deserializeBinaryFromReader); + msg.addVotes(value); break; default: reader.skipField(); @@ -10502,9 +11316,9 @@ proto.tendermint.abci.ResponseProcessProposal.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ResponseProcessProposal.prototype.serializeBinary = function() { +proto.tendermint.abci.ExtendedCommitInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ResponseProcessProposal.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.ExtendedCommitInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10512,46 +11326,83 @@ proto.tendermint.abci.ResponseProcessProposal.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ResponseProcessProposal} message + * @param {!proto.tendermint.abci.ExtendedCommitInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ResponseProcessProposal.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.ExtendedCommitInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( 1, f ); } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.ExtendedVoteInfo.serializeBinaryToWriter + ); + } }; /** - * @enum {number} + * optional int32 round = 1; + * @return {number} */ -proto.tendermint.abci.ResponseProcessProposal.ProposalStatus = { - UNKNOWN: 0, - ACCEPT: 1, - REJECT: 2 +proto.tendermint.abci.ExtendedCommitInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** - * optional ProposalStatus status = 1; - * @return {!proto.tendermint.abci.ResponseProcessProposal.ProposalStatus} + * @param {number} value + * @return {!proto.tendermint.abci.ExtendedCommitInfo} returns this */ -proto.tendermint.abci.ResponseProcessProposal.prototype.getStatus = function() { - return /** @type {!proto.tendermint.abci.ResponseProcessProposal.ProposalStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.tendermint.abci.ExtendedCommitInfo.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * @param {!proto.tendermint.abci.ResponseProcessProposal.ProposalStatus} value - * @return {!proto.tendermint.abci.ResponseProcessProposal} returns this + * repeated ExtendedVoteInfo votes = 2; + * @return {!Array} */ -proto.tendermint.abci.ResponseProcessProposal.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.tendermint.abci.ExtendedCommitInfo.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ExtendedVoteInfo, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ExtendedCommitInfo} returns this +*/ +proto.tendermint.abci.ExtendedCommitInfo.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.ExtendedVoteInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ExtendedVoteInfo} + */ +proto.tendermint.abci.ExtendedCommitInfo.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.ExtendedVoteInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ExtendedCommitInfo} returns this + */ +proto.tendermint.abci.ExtendedCommitInfo.prototype.clearVotesList = function() { + return this.setVotesList([]); }; @@ -10561,7 +11412,7 @@ proto.tendermint.abci.ResponseProcessProposal.prototype.setStatus = function(val * @private {!Array} * @const */ -proto.tendermint.abci.CommitInfo.repeatedFields_ = [2]; +proto.tendermint.abci.Event.repeatedFields_ = [2]; @@ -10578,8 +11429,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.CommitInfo.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.CommitInfo.toObject(opt_includeInstance, this); +proto.tendermint.abci.Event.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Event.toObject(opt_includeInstance, this); }; @@ -10588,15 +11439,15 @@ proto.tendermint.abci.CommitInfo.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.CommitInfo} msg The msg instance to transform. + * @param {!proto.tendermint.abci.Event} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.CommitInfo.toObject = function(includeInstance, msg) { +proto.tendermint.abci.Event.toObject = function(includeInstance, msg) { var f, obj = { - round: jspb.Message.getFieldWithDefault(msg, 1, 0), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.tendermint.abci.VoteInfo.toObject, includeInstance) + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + attributesList: jspb.Message.toObjectList(msg.getAttributesList(), + proto.tendermint.abci.EventAttribute.toObject, includeInstance) }; if (includeInstance) { @@ -10610,23 +11461,23 @@ proto.tendermint.abci.CommitInfo.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.CommitInfo} + * @return {!proto.tendermint.abci.Event} */ -proto.tendermint.abci.CommitInfo.deserializeBinary = function(bytes) { +proto.tendermint.abci.Event.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.CommitInfo; - return proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.Event; + return proto.tendermint.abci.Event.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.CommitInfo} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.Event} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.CommitInfo} + * @return {!proto.tendermint.abci.Event} */ -proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.Event.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10634,13 +11485,13 @@ proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRound(value); + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); break; case 2: - var value = new proto.tendermint.abci.VoteInfo; - reader.readMessage(value,proto.tendermint.abci.VoteInfo.deserializeBinaryFromReader); - msg.addVotes(value); + var value = new proto.tendermint.abci.EventAttribute; + reader.readMessage(value,proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader); + msg.addAttributes(value); break; default: reader.skipField(); @@ -10655,9 +11506,9 @@ proto.tendermint.abci.CommitInfo.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.CommitInfo.prototype.serializeBinary = function() { +proto.tendermint.abci.Event.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.CommitInfo.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.Event.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10665,94 +11516,87 @@ proto.tendermint.abci.CommitInfo.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.CommitInfo} message + * @param {!proto.tendermint.abci.Event} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.CommitInfo.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.Event.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRound(); - if (f !== 0) { - writer.writeInt32( + f = message.getType(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getVotesList(); + f = message.getAttributesList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, - proto.tendermint.abci.VoteInfo.serializeBinaryToWriter + proto.tendermint.abci.EventAttribute.serializeBinaryToWriter ); } }; /** - * optional int32 round = 1; - * @return {number} + * optional string type = 1; + * @return {string} */ -proto.tendermint.abci.CommitInfo.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.tendermint.abci.Event.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.CommitInfo} returns this + * @param {string} value + * @return {!proto.tendermint.abci.Event} returns this */ -proto.tendermint.abci.CommitInfo.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.tendermint.abci.Event.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated VoteInfo votes = 2; - * @return {!Array} + * repeated EventAttribute attributes = 2; + * @return {!Array} */ -proto.tendermint.abci.CommitInfo.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.VoteInfo, 2)); +proto.tendermint.abci.Event.prototype.getAttributesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.EventAttribute, 2)); }; /** - * @param {!Array} value - * @return {!proto.tendermint.abci.CommitInfo} returns this + * @param {!Array} value + * @return {!proto.tendermint.abci.Event} returns this */ -proto.tendermint.abci.CommitInfo.prototype.setVotesList = function(value) { +proto.tendermint.abci.Event.prototype.setAttributesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {!proto.tendermint.abci.VoteInfo=} opt_value + * @param {!proto.tendermint.abci.EventAttribute=} opt_value * @param {number=} opt_index - * @return {!proto.tendermint.abci.VoteInfo} + * @return {!proto.tendermint.abci.EventAttribute} */ -proto.tendermint.abci.CommitInfo.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.VoteInfo, opt_index); +proto.tendermint.abci.Event.prototype.addAttributes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.EventAttribute, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.CommitInfo} returns this + * @return {!proto.tendermint.abci.Event} returns this */ -proto.tendermint.abci.CommitInfo.prototype.clearVotesList = function() { - return this.setVotesList([]); +proto.tendermint.abci.Event.prototype.clearAttributesList = function() { + return this.setAttributesList([]); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tendermint.abci.ExtendedCommitInfo.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -10768,8 +11612,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.ExtendedCommitInfo.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.ExtendedCommitInfo.toObject(opt_includeInstance, this); +proto.tendermint.abci.EventAttribute.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.EventAttribute.toObject(opt_includeInstance, this); }; @@ -10778,15 +11622,15 @@ proto.tendermint.abci.ExtendedCommitInfo.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.ExtendedCommitInfo} msg The msg instance to transform. + * @param {!proto.tendermint.abci.EventAttribute} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ExtendedCommitInfo.toObject = function(includeInstance, msg) { +proto.tendermint.abci.EventAttribute.toObject = function(includeInstance, msg) { var f, obj = { - round: jspb.Message.getFieldWithDefault(msg, 1, 0), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.tendermint.abci.ExtendedVoteInfo.toObject, includeInstance) + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, ""), + index: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -10800,23 +11644,23 @@ proto.tendermint.abci.ExtendedCommitInfo.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.ExtendedCommitInfo} + * @return {!proto.tendermint.abci.EventAttribute} */ -proto.tendermint.abci.ExtendedCommitInfo.deserializeBinary = function(bytes) { +proto.tendermint.abci.EventAttribute.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.ExtendedCommitInfo; - return proto.tendermint.abci.ExtendedCommitInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.EventAttribute; + return proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.ExtendedCommitInfo} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.EventAttribute} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.ExtendedCommitInfo} + * @return {!proto.tendermint.abci.EventAttribute} */ -proto.tendermint.abci.ExtendedCommitInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10824,13 +11668,16 @@ proto.tendermint.abci.ExtendedCommitInfo.deserializeBinaryFromReader = function( var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRound(value); + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); break; case 2: - var value = new proto.tendermint.abci.ExtendedVoteInfo; - reader.readMessage(value,proto.tendermint.abci.ExtendedVoteInfo.deserializeBinaryFromReader); - msg.addVotes(value); + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIndex(value); break; default: reader.skipField(); @@ -10845,9 +11692,9 @@ proto.tendermint.abci.ExtendedCommitInfo.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.ExtendedCommitInfo.prototype.serializeBinary = function() { +proto.tendermint.abci.EventAttribute.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.ExtendedCommitInfo.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.EventAttribute.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10855,83 +11702,87 @@ proto.tendermint.abci.ExtendedCommitInfo.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.ExtendedCommitInfo} message + * @param {!proto.tendermint.abci.EventAttribute} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.ExtendedCommitInfo.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.EventAttribute.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRound(); - if (f !== 0) { - writer.writeInt32( + f = message.getKey(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getVotesList(); + f = message.getValue(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 2, - f, - proto.tendermint.abci.ExtendedVoteInfo.serializeBinaryToWriter + f + ); + } + f = message.getIndex(); + if (f) { + writer.writeBool( + 3, + f ); } }; /** - * optional int32 round = 1; - * @return {number} + * optional string key = 1; + * @return {string} */ -proto.tendermint.abci.ExtendedCommitInfo.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.tendermint.abci.EventAttribute.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.tendermint.abci.ExtendedCommitInfo} returns this + * @param {string} value + * @return {!proto.tendermint.abci.EventAttribute} returns this */ -proto.tendermint.abci.ExtendedCommitInfo.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.tendermint.abci.EventAttribute.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated ExtendedVoteInfo votes = 2; - * @return {!Array} + * optional string value = 2; + * @return {string} */ -proto.tendermint.abci.ExtendedCommitInfo.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ExtendedVoteInfo, 2)); +proto.tendermint.abci.EventAttribute.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!Array} value - * @return {!proto.tendermint.abci.ExtendedCommitInfo} returns this -*/ -proto.tendermint.abci.ExtendedCommitInfo.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + * @param {string} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * @param {!proto.tendermint.abci.ExtendedVoteInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.ExtendedVoteInfo} + * optional bool index = 3; + * @return {boolean} */ -proto.tendermint.abci.ExtendedCommitInfo.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.ExtendedVoteInfo, opt_index); +proto.tendermint.abci.EventAttribute.prototype.getIndex = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.ExtendedCommitInfo} returns this + * @param {boolean} value + * @return {!proto.tendermint.abci.EventAttribute} returns this */ -proto.tendermint.abci.ExtendedCommitInfo.prototype.clearVotesList = function() { - return this.setVotesList([]); +proto.tendermint.abci.EventAttribute.prototype.setIndex = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -10941,7 +11792,7 @@ proto.tendermint.abci.ExtendedCommitInfo.prototype.clearVotesList = function() { * @private {!Array} * @const */ -proto.tendermint.abci.Event.repeatedFields_ = [2]; +proto.tendermint.abci.ExecTxResult.repeatedFields_ = [7]; @@ -10958,8 +11809,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.abci.Event.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.Event.toObject(opt_includeInstance, this); +proto.tendermint.abci.ExecTxResult.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ExecTxResult.toObject(opt_includeInstance, this); }; @@ -10968,15 +11819,21 @@ proto.tendermint.abci.Event.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.Event} msg The msg instance to transform. + * @param {!proto.tendermint.abci.ExecTxResult} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.Event.toObject = function(includeInstance, msg) { +proto.tendermint.abci.ExecTxResult.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, ""), - attributesList: jspb.Message.toObjectList(msg.getAttributesList(), - proto.tendermint.abci.EventAttribute.toObject, includeInstance) + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + data: msg.getData_asB64(), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), + gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.toObject, includeInstance), + codespace: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -10990,23 +11847,23 @@ proto.tendermint.abci.Event.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.Event} + * @return {!proto.tendermint.abci.ExecTxResult} */ -proto.tendermint.abci.Event.deserializeBinary = function(bytes) { +proto.tendermint.abci.ExecTxResult.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.Event; - return proto.tendermint.abci.Event.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.abci.ExecTxResult; + return proto.tendermint.abci.ExecTxResult.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.abci.Event} msg The message object to deserialize into. + * @param {!proto.tendermint.abci.ExecTxResult} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.Event} + * @return {!proto.tendermint.abci.ExecTxResult} */ -proto.tendermint.abci.Event.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.abci.ExecTxResult.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11014,13 +11871,37 @@ proto.tendermint.abci.Event.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setType(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); break; case 2: - var value = new proto.tendermint.abci.EventAttribute; - reader.readMessage(value,proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader); - msg.addAttributes(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasWanted(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasUsed(value); + break; + case 7: + var value = new proto.tendermint.abci.Event; + reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setCodespace(value); break; default: reader.skipField(); @@ -11035,9 +11916,9 @@ proto.tendermint.abci.Event.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.abci.Event.prototype.serializeBinary = function() { +proto.tendermint.abci.ExecTxResult.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.Event.serializeBinaryToWriter(this, writer); + proto.tendermint.abci.ExecTxResult.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11045,273 +11926,257 @@ proto.tendermint.abci.Event.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.Event} message + * @param {!proto.tendermint.abci.ExecTxResult} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.abci.Event.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.abci.ExecTxResult.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLog(); if (f.length > 0) { writer.writeString( - 1, + 3, f ); } - f = message.getAttributesList(); + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getGasWanted(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getEventsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 2, + 7, f, - proto.tendermint.abci.EventAttribute.serializeBinaryToWriter + proto.tendermint.abci.Event.serializeBinaryToWriter + ); + } + f = message.getCodespace(); + if (f.length > 0) { + writer.writeString( + 8, + f ); } }; /** - * optional string type = 1; - * @return {string} + * optional uint32 code = 1; + * @return {number} */ -proto.tendermint.abci.Event.prototype.getType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.tendermint.abci.ExecTxResult.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.tendermint.abci.Event} returns this + * @param {number} value + * @return {!proto.tendermint.abci.ExecTxResult} returns this */ -proto.tendermint.abci.Event.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.tendermint.abci.ExecTxResult.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * repeated EventAttribute attributes = 2; - * @return {!Array} + * optional bytes data = 2; + * @return {!(string|Uint8Array)} */ -proto.tendermint.abci.Event.prototype.getAttributesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.EventAttribute, 2)); +proto.tendermint.abci.ExecTxResult.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!Array} value - * @return {!proto.tendermint.abci.Event} returns this -*/ -proto.tendermint.abci.Event.prototype.setAttributesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.tendermint.abci.ExecTxResult.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); }; /** - * @param {!proto.tendermint.abci.EventAttribute=} opt_value - * @param {number=} opt_index - * @return {!proto.tendermint.abci.EventAttribute} + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} */ -proto.tendermint.abci.Event.prototype.addAttributes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.EventAttribute, opt_index); +proto.tendermint.abci.ExecTxResult.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.tendermint.abci.Event} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ExecTxResult} returns this */ -proto.tendermint.abci.Event.prototype.clearAttributesList = function() { - return this.setAttributesList([]); +proto.tendermint.abci.ExecTxResult.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ExecTxResult.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ExecTxResult} returns this + */ +proto.tendermint.abci.ExecTxResult.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional string info = 4; + * @return {string} */ -proto.tendermint.abci.EventAttribute.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.abci.EventAttribute.toObject(opt_includeInstance, this); +proto.tendermint.abci.ExecTxResult.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tendermint.abci.EventAttribute} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.tendermint.abci.ExecTxResult} returns this */ -proto.tendermint.abci.EventAttribute.toObject = function(includeInstance, msg) { - var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, ""), - value: jspb.Message.getFieldWithDefault(msg, 2, ""), - index: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.tendermint.abci.ExecTxResult.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.abci.EventAttribute} + * optional int64 gas_wanted = 5; + * @return {number} */ -proto.tendermint.abci.EventAttribute.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.abci.EventAttribute; - return proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader(msg, reader); +proto.tendermint.abci.ExecTxResult.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tendermint.abci.EventAttribute} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.abci.EventAttribute} + * @param {number} value + * @return {!proto.tendermint.abci.ExecTxResult} returns this */ -proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setKey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setValue(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.tendermint.abci.ExecTxResult.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional int64 gas_used = 6; + * @return {number} */ -proto.tendermint.abci.EventAttribute.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tendermint.abci.EventAttribute.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.tendermint.abci.ExecTxResult.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.abci.EventAttribute} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.tendermint.abci.ExecTxResult} returns this */ -proto.tendermint.abci.EventAttribute.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getValue(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIndex(); - if (f) { - writer.writeBool( - 3, - f - ); - } +proto.tendermint.abci.ExecTxResult.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional string key = 1; - * @return {string} + * repeated Event events = 7; + * @return {!Array} */ -proto.tendermint.abci.EventAttribute.prototype.getKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.tendermint.abci.ExecTxResult.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 7)); }; /** - * @param {string} value - * @return {!proto.tendermint.abci.EventAttribute} returns this - */ -proto.tendermint.abci.EventAttribute.prototype.setKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {!Array} value + * @return {!proto.tendermint.abci.ExecTxResult} returns this +*/ +proto.tendermint.abci.ExecTxResult.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; /** - * optional string value = 2; - * @return {string} + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} */ -proto.tendermint.abci.EventAttribute.prototype.getValue = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.tendermint.abci.ExecTxResult.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.tendermint.abci.Event, opt_index); }; /** - * @param {string} value - * @return {!proto.tendermint.abci.EventAttribute} returns this + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ExecTxResult} returns this */ -proto.tendermint.abci.EventAttribute.prototype.setValue = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.tendermint.abci.ExecTxResult.prototype.clearEventsList = function() { + return this.setEventsList([]); }; /** - * optional bool index = 3; - * @return {boolean} + * optional string codespace = 8; + * @return {string} */ -proto.tendermint.abci.EventAttribute.prototype.getIndex = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.tendermint.abci.ExecTxResult.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** - * @param {boolean} value - * @return {!proto.tendermint.abci.EventAttribute} returns this + * @param {string} value + * @return {!proto.tendermint.abci.ExecTxResult} returns this */ -proto.tendermint.abci.EventAttribute.prototype.setIndex = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.tendermint.abci.ExecTxResult.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); }; @@ -11350,7 +12215,7 @@ proto.tendermint.abci.TxResult.toObject = function(includeInstance, msg) { height: jspb.Message.getFieldWithDefault(msg, 1, 0), index: jspb.Message.getFieldWithDefault(msg, 2, 0), tx: msg.getTx_asB64(), - result: (f = msg.getResult()) && proto.tendermint.abci.ResponseDeliverTx.toObject(includeInstance, f) + result: (f = msg.getResult()) && proto.tendermint.abci.ExecTxResult.toObject(includeInstance, f) }; if (includeInstance) { @@ -11400,8 +12265,8 @@ proto.tendermint.abci.TxResult.deserializeBinaryFromReader = function(msg, reade msg.setTx(value); break; case 4: - var value = new proto.tendermint.abci.ResponseDeliverTx; - reader.readMessage(value,proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader); + var value = new proto.tendermint.abci.ExecTxResult; + reader.readMessage(value,proto.tendermint.abci.ExecTxResult.deserializeBinaryFromReader); msg.setResult(value); break; default: @@ -11459,7 +12324,7 @@ proto.tendermint.abci.TxResult.serializeBinaryToWriter = function(message, write writer.writeMessage( 4, f, - proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter + proto.tendermint.abci.ExecTxResult.serializeBinaryToWriter ); } }; @@ -11544,17 +12409,17 @@ proto.tendermint.abci.TxResult.prototype.setTx = function(value) { /** - * optional ResponseDeliverTx result = 4; - * @return {?proto.tendermint.abci.ResponseDeliverTx} + * optional ExecTxResult result = 4; + * @return {?proto.tendermint.abci.ExecTxResult} */ proto.tendermint.abci.TxResult.prototype.getResult = function() { - return /** @type{?proto.tendermint.abci.ResponseDeliverTx} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseDeliverTx, 4)); + return /** @type{?proto.tendermint.abci.ExecTxResult} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ExecTxResult, 4)); }; /** - * @param {?proto.tendermint.abci.ResponseDeliverTx|undefined} value + * @param {?proto.tendermint.abci.ExecTxResult|undefined} value * @return {!proto.tendermint.abci.TxResult} returns this */ proto.tendermint.abci.TxResult.prototype.setResult = function(value) { @@ -11978,7 +12843,7 @@ proto.tendermint.abci.VoteInfo.prototype.toObject = function(opt_includeInstance proto.tendermint.abci.VoteInfo.toObject = function(includeInstance, msg) { var f, obj = { validator: (f = msg.getValidator()) && proto.tendermint.abci.Validator.toObject(includeInstance, f), - signedLastBlock: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + blockIdFlag: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -12020,9 +12885,9 @@ proto.tendermint.abci.VoteInfo.deserializeBinaryFromReader = function(msg, reade reader.readMessage(value,proto.tendermint.abci.Validator.deserializeBinaryFromReader); msg.setValidator(value); break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSignedLastBlock(value); + case 3: + var value = /** @type {!proto.tendermint.types.BlockIDFlag} */ (reader.readEnum()); + msg.setBlockIdFlag(value); break; default: reader.skipField(); @@ -12061,10 +12926,10 @@ proto.tendermint.abci.VoteInfo.serializeBinaryToWriter = function(message, write proto.tendermint.abci.Validator.serializeBinaryToWriter ); } - f = message.getSignedLastBlock(); - if (f) { - writer.writeBool( - 2, + f = message.getBlockIdFlag(); + if (f !== 0.0) { + writer.writeEnum( + 3, f ); } @@ -12109,20 +12974,20 @@ proto.tendermint.abci.VoteInfo.prototype.hasValidator = function() { /** - * optional bool signed_last_block = 2; - * @return {boolean} + * optional tendermint.types.BlockIDFlag block_id_flag = 3; + * @return {!proto.tendermint.types.BlockIDFlag} */ -proto.tendermint.abci.VoteInfo.prototype.getSignedLastBlock = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.tendermint.abci.VoteInfo.prototype.getBlockIdFlag = function() { + return /** @type {!proto.tendermint.types.BlockIDFlag} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {boolean} value + * @param {!proto.tendermint.types.BlockIDFlag} value * @return {!proto.tendermint.abci.VoteInfo} returns this */ -proto.tendermint.abci.VoteInfo.prototype.setSignedLastBlock = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.tendermint.abci.VoteInfo.prototype.setBlockIdFlag = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); }; @@ -12159,8 +13024,9 @@ proto.tendermint.abci.ExtendedVoteInfo.prototype.toObject = function(opt_include proto.tendermint.abci.ExtendedVoteInfo.toObject = function(includeInstance, msg) { var f, obj = { validator: (f = msg.getValidator()) && proto.tendermint.abci.Validator.toObject(includeInstance, f), - signedLastBlock: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - voteExtension: msg.getVoteExtension_asB64() + voteExtension: msg.getVoteExtension_asB64(), + extensionSignature: msg.getExtensionSignature_asB64(), + blockIdFlag: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -12202,14 +13068,18 @@ proto.tendermint.abci.ExtendedVoteInfo.deserializeBinaryFromReader = function(ms reader.readMessage(value,proto.tendermint.abci.Validator.deserializeBinaryFromReader); msg.setValidator(value); break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSignedLastBlock(value); - break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setVoteExtension(value); break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExtensionSignature(value); + break; + case 5: + var value = /** @type {!proto.tendermint.types.BlockIDFlag} */ (reader.readEnum()); + msg.setBlockIdFlag(value); + break; default: reader.skipField(); break; @@ -12247,17 +13117,24 @@ proto.tendermint.abci.ExtendedVoteInfo.serializeBinaryToWriter = function(messag proto.tendermint.abci.Validator.serializeBinaryToWriter ); } - f = message.getSignedLastBlock(); - if (f) { - writer.writeBool( - 2, + f = message.getVoteExtension_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, f ); } - f = message.getVoteExtension_asU8(); + f = message.getExtensionSignature_asU8(); if (f.length > 0) { writer.writeBytes( - 3, + 4, + f + ); + } + f = message.getBlockIdFlag(); + if (f !== 0.0) { + writer.writeEnum( + 5, f ); } @@ -12301,24 +13178,6 @@ proto.tendermint.abci.ExtendedVoteInfo.prototype.hasValidator = function() { }; -/** - * optional bool signed_last_block = 2; - * @return {boolean} - */ -proto.tendermint.abci.ExtendedVoteInfo.prototype.getSignedLastBlock = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.tendermint.abci.ExtendedVoteInfo} returns this - */ -proto.tendermint.abci.ExtendedVoteInfo.prototype.setSignedLastBlock = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - /** * optional bytes vote_extension = 3; * @return {!(string|Uint8Array)} @@ -12361,6 +13220,66 @@ proto.tendermint.abci.ExtendedVoteInfo.prototype.setVoteExtension = function(val }; +/** + * optional bytes extension_signature = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ExtendedVoteInfo.prototype.getExtensionSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes extension_signature = 4; + * This is a type-conversion wrapper around `getExtensionSignature()` + * @return {string} + */ +proto.tendermint.abci.ExtendedVoteInfo.prototype.getExtensionSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExtensionSignature())); +}; + + +/** + * optional bytes extension_signature = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExtensionSignature()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ExtendedVoteInfo.prototype.getExtensionSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExtensionSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ExtendedVoteInfo} returns this + */ +proto.tendermint.abci.ExtendedVoteInfo.prototype.setExtensionSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional tendermint.types.BlockIDFlag block_id_flag = 5; + * @return {!proto.tendermint.types.BlockIDFlag} + */ +proto.tendermint.abci.ExtendedVoteInfo.prototype.getBlockIdFlag = function() { + return /** @type {!proto.tendermint.types.BlockIDFlag} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.tendermint.types.BlockIDFlag} value + * @return {!proto.tendermint.abci.ExtendedVoteInfo} returns this + */ +proto.tendermint.abci.ExtendedVoteInfo.prototype.setBlockIdFlag = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + diff --git a/proto/tendermint/abci/types_pb_service.d.ts b/codegen/tendermint/abci/types_pb_service.d.ts similarity index 78% rename from proto/tendermint/abci/types_pb_service.d.ts rename to codegen/tendermint/abci/types_pb_service.d.ts index 17c715b..f372c15 100644 --- a/proto/tendermint/abci/types_pb_service.d.ts +++ b/codegen/tendermint/abci/types_pb_service.d.ts @@ -4,168 +4,168 @@ import * as tendermint_abci_types_pb from "../../tendermint/abci/types_pb"; import {grpc} from "@improbable-eng/grpc-web"; -type ABCIApplicationEcho = { +type ABCIEcho = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestEcho; readonly responseType: typeof tendermint_abci_types_pb.ResponseEcho; }; -type ABCIApplicationFlush = { +type ABCIFlush = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestFlush; readonly responseType: typeof tendermint_abci_types_pb.ResponseFlush; }; -type ABCIApplicationInfo = { +type ABCIInfo = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestInfo; readonly responseType: typeof tendermint_abci_types_pb.ResponseInfo; }; -type ABCIApplicationDeliverTx = { +type ABCICheckTx = { readonly methodName: string; - readonly service: typeof ABCIApplication; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tendermint_abci_types_pb.RequestDeliverTx; - readonly responseType: typeof tendermint_abci_types_pb.ResponseDeliverTx; -}; - -type ABCIApplicationCheckTx = { - readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestCheckTx; readonly responseType: typeof tendermint_abci_types_pb.ResponseCheckTx; }; -type ABCIApplicationQuery = { +type ABCIQuery = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestQuery; readonly responseType: typeof tendermint_abci_types_pb.ResponseQuery; }; -type ABCIApplicationCommit = { +type ABCICommit = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestCommit; readonly responseType: typeof tendermint_abci_types_pb.ResponseCommit; }; -type ABCIApplicationInitChain = { +type ABCIInitChain = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestInitChain; readonly responseType: typeof tendermint_abci_types_pb.ResponseInitChain; }; -type ABCIApplicationBeginBlock = { - readonly methodName: string; - readonly service: typeof ABCIApplication; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tendermint_abci_types_pb.RequestBeginBlock; - readonly responseType: typeof tendermint_abci_types_pb.ResponseBeginBlock; -}; - -type ABCIApplicationEndBlock = { - readonly methodName: string; - readonly service: typeof ABCIApplication; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tendermint_abci_types_pb.RequestEndBlock; - readonly responseType: typeof tendermint_abci_types_pb.ResponseEndBlock; -}; - -type ABCIApplicationListSnapshots = { +type ABCIListSnapshots = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestListSnapshots; readonly responseType: typeof tendermint_abci_types_pb.ResponseListSnapshots; }; -type ABCIApplicationOfferSnapshot = { +type ABCIOfferSnapshot = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestOfferSnapshot; readonly responseType: typeof tendermint_abci_types_pb.ResponseOfferSnapshot; }; -type ABCIApplicationLoadSnapshotChunk = { +type ABCILoadSnapshotChunk = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestLoadSnapshotChunk; readonly responseType: typeof tendermint_abci_types_pb.ResponseLoadSnapshotChunk; }; -type ABCIApplicationApplySnapshotChunk = { +type ABCIApplySnapshotChunk = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestApplySnapshotChunk; readonly responseType: typeof tendermint_abci_types_pb.ResponseApplySnapshotChunk; }; -type ABCIApplicationPrepareProposal = { +type ABCIPrepareProposal = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestPrepareProposal; readonly responseType: typeof tendermint_abci_types_pb.ResponsePrepareProposal; }; -type ABCIApplicationProcessProposal = { +type ABCIProcessProposal = { readonly methodName: string; - readonly service: typeof ABCIApplication; + readonly service: typeof ABCI; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof tendermint_abci_types_pb.RequestProcessProposal; readonly responseType: typeof tendermint_abci_types_pb.ResponseProcessProposal; }; -export class ABCIApplication { +type ABCIExtendVote = { + readonly methodName: string; + readonly service: typeof ABCI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof tendermint_abci_types_pb.RequestExtendVote; + readonly responseType: typeof tendermint_abci_types_pb.ResponseExtendVote; +}; + +type ABCIVerifyVoteExtension = { + readonly methodName: string; + readonly service: typeof ABCI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof tendermint_abci_types_pb.RequestVerifyVoteExtension; + readonly responseType: typeof tendermint_abci_types_pb.ResponseVerifyVoteExtension; +}; + +type ABCIFinalizeBlock = { + readonly methodName: string; + readonly service: typeof ABCI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof tendermint_abci_types_pb.RequestFinalizeBlock; + readonly responseType: typeof tendermint_abci_types_pb.ResponseFinalizeBlock; +}; + +export class ABCI { static readonly serviceName: string; - static readonly Echo: ABCIApplicationEcho; - static readonly Flush: ABCIApplicationFlush; - static readonly Info: ABCIApplicationInfo; - static readonly DeliverTx: ABCIApplicationDeliverTx; - static readonly CheckTx: ABCIApplicationCheckTx; - static readonly Query: ABCIApplicationQuery; - static readonly Commit: ABCIApplicationCommit; - static readonly InitChain: ABCIApplicationInitChain; - static readonly BeginBlock: ABCIApplicationBeginBlock; - static readonly EndBlock: ABCIApplicationEndBlock; - static readonly ListSnapshots: ABCIApplicationListSnapshots; - static readonly OfferSnapshot: ABCIApplicationOfferSnapshot; - static readonly LoadSnapshotChunk: ABCIApplicationLoadSnapshotChunk; - static readonly ApplySnapshotChunk: ABCIApplicationApplySnapshotChunk; - static readonly PrepareProposal: ABCIApplicationPrepareProposal; - static readonly ProcessProposal: ABCIApplicationProcessProposal; + static readonly Echo: ABCIEcho; + static readonly Flush: ABCIFlush; + static readonly Info: ABCIInfo; + static readonly CheckTx: ABCICheckTx; + static readonly Query: ABCIQuery; + static readonly Commit: ABCICommit; + static readonly InitChain: ABCIInitChain; + static readonly ListSnapshots: ABCIListSnapshots; + static readonly OfferSnapshot: ABCIOfferSnapshot; + static readonly LoadSnapshotChunk: ABCILoadSnapshotChunk; + static readonly ApplySnapshotChunk: ABCIApplySnapshotChunk; + static readonly PrepareProposal: ABCIPrepareProposal; + static readonly ProcessProposal: ABCIProcessProposal; + static readonly ExtendVote: ABCIExtendVote; + static readonly VerifyVoteExtension: ABCIVerifyVoteExtension; + static readonly FinalizeBlock: ABCIFinalizeBlock; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -196,7 +196,7 @@ interface BidirectionalStream { on(type: 'status', handler: (status: Status) => void): BidirectionalStream; } -export class ABCIApplicationClient { +export class ABCIClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); @@ -227,15 +227,6 @@ export class ABCIApplicationClient { requestMessage: tendermint_abci_types_pb.RequestInfo, callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseInfo|null) => void ): UnaryResponse; - deliverTx( - requestMessage: tendermint_abci_types_pb.RequestDeliverTx, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseDeliverTx|null) => void - ): UnaryResponse; - deliverTx( - requestMessage: tendermint_abci_types_pb.RequestDeliverTx, - callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseDeliverTx|null) => void - ): UnaryResponse; checkTx( requestMessage: tendermint_abci_types_pb.RequestCheckTx, metadata: grpc.Metadata, @@ -272,24 +263,6 @@ export class ABCIApplicationClient { requestMessage: tendermint_abci_types_pb.RequestInitChain, callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseInitChain|null) => void ): UnaryResponse; - beginBlock( - requestMessage: tendermint_abci_types_pb.RequestBeginBlock, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseBeginBlock|null) => void - ): UnaryResponse; - beginBlock( - requestMessage: tendermint_abci_types_pb.RequestBeginBlock, - callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseBeginBlock|null) => void - ): UnaryResponse; - endBlock( - requestMessage: tendermint_abci_types_pb.RequestEndBlock, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseEndBlock|null) => void - ): UnaryResponse; - endBlock( - requestMessage: tendermint_abci_types_pb.RequestEndBlock, - callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseEndBlock|null) => void - ): UnaryResponse; listSnapshots( requestMessage: tendermint_abci_types_pb.RequestListSnapshots, metadata: grpc.Metadata, @@ -344,5 +317,32 @@ export class ABCIApplicationClient { requestMessage: tendermint_abci_types_pb.RequestProcessProposal, callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseProcessProposal|null) => void ): UnaryResponse; + extendVote( + requestMessage: tendermint_abci_types_pb.RequestExtendVote, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseExtendVote|null) => void + ): UnaryResponse; + extendVote( + requestMessage: tendermint_abci_types_pb.RequestExtendVote, + callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseExtendVote|null) => void + ): UnaryResponse; + verifyVoteExtension( + requestMessage: tendermint_abci_types_pb.RequestVerifyVoteExtension, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseVerifyVoteExtension|null) => void + ): UnaryResponse; + verifyVoteExtension( + requestMessage: tendermint_abci_types_pb.RequestVerifyVoteExtension, + callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseVerifyVoteExtension|null) => void + ): UnaryResponse; + finalizeBlock( + requestMessage: tendermint_abci_types_pb.RequestFinalizeBlock, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseFinalizeBlock|null) => void + ): UnaryResponse; + finalizeBlock( + requestMessage: tendermint_abci_types_pb.RequestFinalizeBlock, + callback: (error: ServiceError|null, responseMessage: tendermint_abci_types_pb.ResponseFinalizeBlock|null) => void + ): UnaryResponse; } diff --git a/proto/tendermint/abci/types_pb_service.js b/codegen/tendermint/abci/types_pb_service.js similarity index 76% rename from proto/tendermint/abci/types_pb_service.js rename to codegen/tendermint/abci/types_pb_service.js index 219ac85..6b5a808 100644 --- a/proto/tendermint/abci/types_pb_service.js +++ b/codegen/tendermint/abci/types_pb_service.js @@ -4,168 +4,168 @@ var tendermint_abci_types_pb = require("../../tendermint/abci/types_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; -var ABCIApplication = (function () { - function ABCIApplication() {} - ABCIApplication.serviceName = "tendermint.abci.ABCIApplication"; - return ABCIApplication; +var ABCI = (function () { + function ABCI() {} + ABCI.serviceName = "tendermint.abci.ABCI"; + return ABCI; }()); -ABCIApplication.Echo = { +ABCI.Echo = { methodName: "Echo", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestEcho, responseType: tendermint_abci_types_pb.ResponseEcho }; -ABCIApplication.Flush = { +ABCI.Flush = { methodName: "Flush", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestFlush, responseType: tendermint_abci_types_pb.ResponseFlush }; -ABCIApplication.Info = { +ABCI.Info = { methodName: "Info", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestInfo, responseType: tendermint_abci_types_pb.ResponseInfo }; -ABCIApplication.DeliverTx = { - methodName: "DeliverTx", - service: ABCIApplication, - requestStream: false, - responseStream: false, - requestType: tendermint_abci_types_pb.RequestDeliverTx, - responseType: tendermint_abci_types_pb.ResponseDeliverTx -}; - -ABCIApplication.CheckTx = { +ABCI.CheckTx = { methodName: "CheckTx", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestCheckTx, responseType: tendermint_abci_types_pb.ResponseCheckTx }; -ABCIApplication.Query = { +ABCI.Query = { methodName: "Query", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestQuery, responseType: tendermint_abci_types_pb.ResponseQuery }; -ABCIApplication.Commit = { +ABCI.Commit = { methodName: "Commit", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestCommit, responseType: tendermint_abci_types_pb.ResponseCommit }; -ABCIApplication.InitChain = { +ABCI.InitChain = { methodName: "InitChain", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestInitChain, responseType: tendermint_abci_types_pb.ResponseInitChain }; -ABCIApplication.BeginBlock = { - methodName: "BeginBlock", - service: ABCIApplication, - requestStream: false, - responseStream: false, - requestType: tendermint_abci_types_pb.RequestBeginBlock, - responseType: tendermint_abci_types_pb.ResponseBeginBlock -}; - -ABCIApplication.EndBlock = { - methodName: "EndBlock", - service: ABCIApplication, - requestStream: false, - responseStream: false, - requestType: tendermint_abci_types_pb.RequestEndBlock, - responseType: tendermint_abci_types_pb.ResponseEndBlock -}; - -ABCIApplication.ListSnapshots = { +ABCI.ListSnapshots = { methodName: "ListSnapshots", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestListSnapshots, responseType: tendermint_abci_types_pb.ResponseListSnapshots }; -ABCIApplication.OfferSnapshot = { +ABCI.OfferSnapshot = { methodName: "OfferSnapshot", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestOfferSnapshot, responseType: tendermint_abci_types_pb.ResponseOfferSnapshot }; -ABCIApplication.LoadSnapshotChunk = { +ABCI.LoadSnapshotChunk = { methodName: "LoadSnapshotChunk", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestLoadSnapshotChunk, responseType: tendermint_abci_types_pb.ResponseLoadSnapshotChunk }; -ABCIApplication.ApplySnapshotChunk = { +ABCI.ApplySnapshotChunk = { methodName: "ApplySnapshotChunk", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestApplySnapshotChunk, responseType: tendermint_abci_types_pb.ResponseApplySnapshotChunk }; -ABCIApplication.PrepareProposal = { +ABCI.PrepareProposal = { methodName: "PrepareProposal", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestPrepareProposal, responseType: tendermint_abci_types_pb.ResponsePrepareProposal }; -ABCIApplication.ProcessProposal = { +ABCI.ProcessProposal = { methodName: "ProcessProposal", - service: ABCIApplication, + service: ABCI, requestStream: false, responseStream: false, requestType: tendermint_abci_types_pb.RequestProcessProposal, responseType: tendermint_abci_types_pb.ResponseProcessProposal }; -exports.ABCIApplication = ABCIApplication; +ABCI.ExtendVote = { + methodName: "ExtendVote", + service: ABCI, + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestExtendVote, + responseType: tendermint_abci_types_pb.ResponseExtendVote +}; + +ABCI.VerifyVoteExtension = { + methodName: "VerifyVoteExtension", + service: ABCI, + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestVerifyVoteExtension, + responseType: tendermint_abci_types_pb.ResponseVerifyVoteExtension +}; + +ABCI.FinalizeBlock = { + methodName: "FinalizeBlock", + service: ABCI, + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestFinalizeBlock, + responseType: tendermint_abci_types_pb.ResponseFinalizeBlock +}; + +exports.ABCI = ABCI; -function ABCIApplicationClient(serviceHost, options) { +function ABCIClient(serviceHost, options) { this.serviceHost = serviceHost; this.options = options || {}; } -ABCIApplicationClient.prototype.echo = function echo(requestMessage, metadata, callback) { +ABCIClient.prototype.echo = function echo(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.Echo, { + var client = grpc.unary(ABCI.Echo, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -192,11 +192,11 @@ ABCIApplicationClient.prototype.echo = function echo(requestMessage, metadata, c }; }; -ABCIApplicationClient.prototype.flush = function flush(requestMessage, metadata, callback) { +ABCIClient.prototype.flush = function flush(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.Flush, { + var client = grpc.unary(ABCI.Flush, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -223,11 +223,11 @@ ABCIApplicationClient.prototype.flush = function flush(requestMessage, metadata, }; }; -ABCIApplicationClient.prototype.info = function info(requestMessage, metadata, callback) { +ABCIClient.prototype.info = function info(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.Info, { + var client = grpc.unary(ABCI.Info, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -254,11 +254,11 @@ ABCIApplicationClient.prototype.info = function info(requestMessage, metadata, c }; }; -ABCIApplicationClient.prototype.deliverTx = function deliverTx(requestMessage, metadata, callback) { +ABCIClient.prototype.checkTx = function checkTx(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.DeliverTx, { + var client = grpc.unary(ABCI.CheckTx, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -285,11 +285,11 @@ ABCIApplicationClient.prototype.deliverTx = function deliverTx(requestMessage, m }; }; -ABCIApplicationClient.prototype.checkTx = function checkTx(requestMessage, metadata, callback) { +ABCIClient.prototype.query = function query(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.CheckTx, { + var client = grpc.unary(ABCI.Query, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -316,11 +316,11 @@ ABCIApplicationClient.prototype.checkTx = function checkTx(requestMessage, metad }; }; -ABCIApplicationClient.prototype.query = function query(requestMessage, metadata, callback) { +ABCIClient.prototype.commit = function commit(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.Query, { + var client = grpc.unary(ABCI.Commit, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -347,11 +347,11 @@ ABCIApplicationClient.prototype.query = function query(requestMessage, metadata, }; }; -ABCIApplicationClient.prototype.commit = function commit(requestMessage, metadata, callback) { +ABCIClient.prototype.initChain = function initChain(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.Commit, { + var client = grpc.unary(ABCI.InitChain, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -378,11 +378,11 @@ ABCIApplicationClient.prototype.commit = function commit(requestMessage, metadat }; }; -ABCIApplicationClient.prototype.initChain = function initChain(requestMessage, metadata, callback) { +ABCIClient.prototype.listSnapshots = function listSnapshots(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.InitChain, { + var client = grpc.unary(ABCI.ListSnapshots, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -409,11 +409,11 @@ ABCIApplicationClient.prototype.initChain = function initChain(requestMessage, m }; }; -ABCIApplicationClient.prototype.beginBlock = function beginBlock(requestMessage, metadata, callback) { +ABCIClient.prototype.offerSnapshot = function offerSnapshot(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.BeginBlock, { + var client = grpc.unary(ABCI.OfferSnapshot, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -440,11 +440,11 @@ ABCIApplicationClient.prototype.beginBlock = function beginBlock(requestMessage, }; }; -ABCIApplicationClient.prototype.endBlock = function endBlock(requestMessage, metadata, callback) { +ABCIClient.prototype.loadSnapshotChunk = function loadSnapshotChunk(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.EndBlock, { + var client = grpc.unary(ABCI.LoadSnapshotChunk, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -471,11 +471,11 @@ ABCIApplicationClient.prototype.endBlock = function endBlock(requestMessage, met }; }; -ABCIApplicationClient.prototype.listSnapshots = function listSnapshots(requestMessage, metadata, callback) { +ABCIClient.prototype.applySnapshotChunk = function applySnapshotChunk(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.ListSnapshots, { + var client = grpc.unary(ABCI.ApplySnapshotChunk, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -502,11 +502,11 @@ ABCIApplicationClient.prototype.listSnapshots = function listSnapshots(requestMe }; }; -ABCIApplicationClient.prototype.offerSnapshot = function offerSnapshot(requestMessage, metadata, callback) { +ABCIClient.prototype.prepareProposal = function prepareProposal(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.OfferSnapshot, { + var client = grpc.unary(ABCI.PrepareProposal, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -533,11 +533,11 @@ ABCIApplicationClient.prototype.offerSnapshot = function offerSnapshot(requestMe }; }; -ABCIApplicationClient.prototype.loadSnapshotChunk = function loadSnapshotChunk(requestMessage, metadata, callback) { +ABCIClient.prototype.processProposal = function processProposal(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.LoadSnapshotChunk, { + var client = grpc.unary(ABCI.ProcessProposal, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -564,11 +564,11 @@ ABCIApplicationClient.prototype.loadSnapshotChunk = function loadSnapshotChunk(r }; }; -ABCIApplicationClient.prototype.applySnapshotChunk = function applySnapshotChunk(requestMessage, metadata, callback) { +ABCIClient.prototype.extendVote = function extendVote(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.ApplySnapshotChunk, { + var client = grpc.unary(ABCI.ExtendVote, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -595,11 +595,11 @@ ABCIApplicationClient.prototype.applySnapshotChunk = function applySnapshotChunk }; }; -ABCIApplicationClient.prototype.prepareProposal = function prepareProposal(requestMessage, metadata, callback) { +ABCIClient.prototype.verifyVoteExtension = function verifyVoteExtension(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.PrepareProposal, { + var client = grpc.unary(ABCI.VerifyVoteExtension, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -626,11 +626,11 @@ ABCIApplicationClient.prototype.prepareProposal = function prepareProposal(reque }; }; -ABCIApplicationClient.prototype.processProposal = function processProposal(requestMessage, metadata, callback) { +ABCIClient.prototype.finalizeBlock = function finalizeBlock(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } - var client = grpc.unary(ABCIApplication.ProcessProposal, { + var client = grpc.unary(ABCI.FinalizeBlock, { request: requestMessage, host: this.serviceHost, metadata: metadata, @@ -657,5 +657,5 @@ ABCIApplicationClient.prototype.processProposal = function processProposal(reque }; }; -exports.ABCIApplicationClient = ABCIApplicationClient; +exports.ABCIClient = ABCIClient; diff --git a/codegen/tendermint/crypto/keys.ts b/codegen/tendermint/crypto/keys.ts new file mode 100644 index 0000000..e43d40b --- /dev/null +++ b/codegen/tendermint/crypto/keys.ts @@ -0,0 +1,118 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/crypto/keys.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace tendermint.crypto { + export class PublicKey extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2]]; + constructor(data?: any[] | ({} & (({ + ed25519?: Uint8Array; + secp256k1?: never; + } | { + ed25519?: never; + secp256k1?: Uint8Array; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("ed25519" in data && data.ed25519 != undefined) { + this.ed25519 = data.ed25519; + } + if ("secp256k1" in data && data.secp256k1 != undefined) { + this.secp256k1 = data.secp256k1; + } + } + } + get ed25519() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set ed25519(value: Uint8Array) { + pb_1.Message.setOneofField(this, 1, this.#one_of_decls[0], value); + } + get has_ed25519() { + return pb_1.Message.getField(this, 1) != null; + } + get secp256k1() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set secp256k1(value: Uint8Array) { + pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value); + } + get has_secp256k1() { + return pb_1.Message.getField(this, 2) != null; + } + get sum() { + const cases: { + [index: number]: "none" | "ed25519" | "secp256k1"; + } = { + 0: "none", + 1: "ed25519", + 2: "secp256k1" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2])]; + } + static fromObject(data: { + ed25519?: Uint8Array; + secp256k1?: Uint8Array; + }): PublicKey { + const message = new PublicKey({}); + if (data.ed25519 != null) { + message.ed25519 = data.ed25519; + } + if (data.secp256k1 != null) { + message.secp256k1 = data.secp256k1; + } + return message; + } + toObject() { + const data: { + ed25519?: Uint8Array; + secp256k1?: Uint8Array; + } = {}; + if (this.ed25519 != null) { + data.ed25519 = this.ed25519; + } + if (this.secp256k1 != null) { + data.secp256k1 = this.secp256k1; + } + 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_ed25519) + writer.writeBytes(1, this.ed25519); + if (this.has_secp256k1) + writer.writeBytes(2, this.secp256k1); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PublicKey { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PublicKey(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.ed25519 = reader.readBytes(); + break; + case 2: + message.secp256k1 = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PublicKey { + return PublicKey.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/crypto/keys_pb.d.ts b/codegen/tendermint/crypto/keys_pb.d.ts similarity index 100% rename from proto/tendermint/crypto/keys_pb.d.ts rename to codegen/tendermint/crypto/keys_pb.d.ts diff --git a/proto/tendermint/crypto/keys_pb.js b/codegen/tendermint/crypto/keys_pb.js similarity index 100% rename from proto/tendermint/crypto/keys_pb.js rename to codegen/tendermint/crypto/keys_pb.js diff --git a/proto/tendermint/crypto/keys_pb_service.d.ts b/codegen/tendermint/crypto/keys_pb_service.d.ts similarity index 100% rename from proto/tendermint/crypto/keys_pb_service.d.ts rename to codegen/tendermint/crypto/keys_pb_service.d.ts diff --git a/proto/tendermint/crypto/keys_pb_service.js b/codegen/tendermint/crypto/keys_pb_service.js similarity index 100% rename from proto/tendermint/crypto/keys_pb_service.js rename to codegen/tendermint/crypto/keys_pb_service.js diff --git a/codegen/tendermint/crypto/proof.ts b/codegen/tendermint/crypto/proof.ts new file mode 100644 index 0000000..fb845bd --- /dev/null +++ b/codegen/tendermint/crypto/proof.ts @@ -0,0 +1,531 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/crypto/proof.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace tendermint.crypto { + export class Proof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + total?: number; + index?: number; + leaf_hash?: Uint8Array; + aunts?: Uint8Array[]; + }) { + 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 ("total" in data && data.total != undefined) { + this.total = data.total; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("leaf_hash" in data && data.leaf_hash != undefined) { + this.leaf_hash = data.leaf_hash; + } + if ("aunts" in data && data.aunts != undefined) { + this.aunts = data.aunts; + } + } + } + get total() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set total(value: number) { + pb_1.Message.setField(this, 1, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 2, value); + } + get leaf_hash() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set leaf_hash(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + get aunts() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as Uint8Array[]; + } + set aunts(value: Uint8Array[]) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + total?: number; + index?: number; + leaf_hash?: Uint8Array; + aunts?: Uint8Array[]; + }): Proof { + const message = new Proof({}); + if (data.total != null) { + message.total = data.total; + } + if (data.index != null) { + message.index = data.index; + } + if (data.leaf_hash != null) { + message.leaf_hash = data.leaf_hash; + } + if (data.aunts != null) { + message.aunts = data.aunts; + } + return message; + } + toObject() { + const data: { + total?: number; + index?: number; + leaf_hash?: Uint8Array; + aunts?: Uint8Array[]; + } = {}; + if (this.total != null) { + data.total = this.total; + } + if (this.index != null) { + data.index = this.index; + } + if (this.leaf_hash != null) { + data.leaf_hash = this.leaf_hash; + } + if (this.aunts != null) { + data.aunts = this.aunts; + } + 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.total != 0) + writer.writeInt64(1, this.total); + if (this.index != 0) + writer.writeInt64(2, this.index); + if (this.leaf_hash.length) + writer.writeBytes(3, this.leaf_hash); + if (this.aunts.length) + writer.writeRepeatedBytes(4, this.aunts); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Proof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Proof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.total = reader.readInt64(); + break; + case 2: + message.index = reader.readInt64(); + break; + case 3: + message.leaf_hash = reader.readBytes(); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Proof { + return Proof.deserialize(bytes); + } + } + export class ValueOp extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: Uint8Array; + proof?: Proof; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("proof" in data && data.proof != undefined) { + this.proof = data.proof; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get proof() { + return pb_1.Message.getWrapperField(this, Proof, 2) as Proof; + } + set proof(value: Proof) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_proof() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + key?: Uint8Array; + proof?: ReturnType; + }): ValueOp { + const message = new ValueOp({}); + if (data.key != null) { + message.key = data.key; + } + if (data.proof != null) { + message.proof = Proof.fromObject(data.proof); + } + return message; + } + toObject() { + const data: { + key?: Uint8Array; + proof?: ReturnType; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.proof != null) { + data.proof = this.proof.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.key.length) + writer.writeBytes(1, this.key); + if (this.has_proof) + writer.writeMessage(2, this.proof, () => this.proof.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValueOp { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValueOp(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readBytes(); + break; + case 2: + reader.readMessage(message.proof, () => message.proof = Proof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValueOp { + return ValueOp.deserialize(bytes); + } + } + export class DominoOp extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: string; + input?: string; + output?: 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 ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("input" in data && data.input != undefined) { + this.input = data.input; + } + if ("output" in data && data.output != undefined) { + this.output = data.output; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 1, value); + } + get input() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set input(value: string) { + pb_1.Message.setField(this, 2, value); + } + get output() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set output(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + key?: string; + input?: string; + output?: string; + }): DominoOp { + const message = new DominoOp({}); + if (data.key != null) { + message.key = data.key; + } + if (data.input != null) { + message.input = data.input; + } + if (data.output != null) { + message.output = data.output; + } + return message; + } + toObject() { + const data: { + key?: string; + input?: string; + output?: string; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.input != null) { + data.input = this.input; + } + if (this.output != null) { + data.output = this.output; + } + 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.key.length) + writer.writeString(1, this.key); + if (this.input.length) + writer.writeString(2, this.input); + if (this.output.length) + writer.writeString(3, this.output); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DominoOp { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DominoOp(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readString(); + break; + case 2: + message.input = reader.readString(); + break; + case 3: + message.output = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DominoOp { + return DominoOp.deserialize(bytes); + } + } + export class ProofOp extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type?: string; + key?: Uint8Array; + data?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 1, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set key(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + type?: string; + key?: Uint8Array; + data?: Uint8Array; + }): ProofOp { + const message = new ProofOp({}); + if (data.type != null) { + message.type = data.type; + } + if (data.key != null) { + message.key = data.key; + } + if (data.data != null) { + message.data = data.data; + } + return message; + } + toObject() { + const data: { + type?: string; + key?: Uint8Array; + data?: Uint8Array; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.key != null) { + data.key = this.key; + } + if (this.data != null) { + data.data = this.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 (this.type.length) + writer.writeString(1, this.type); + if (this.key.length) + writer.writeBytes(2, this.key); + if (this.data.length) + writer.writeBytes(3, this.data); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProofOp { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProofOp(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readString(); + break; + case 2: + message.key = reader.readBytes(); + break; + case 3: + message.data = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProofOp { + return ProofOp.deserialize(bytes); + } + } + export class ProofOps extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + ops?: ProofOp[]; + }) { + 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 ("ops" in data && data.ops != undefined) { + this.ops = data.ops; + } + } + } + get ops() { + return pb_1.Message.getRepeatedWrapperField(this, ProofOp, 1) as ProofOp[]; + } + set ops(value: ProofOp[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + ops?: ReturnType[]; + }): ProofOps { + const message = new ProofOps({}); + if (data.ops != null) { + message.ops = data.ops.map(item => ProofOp.fromObject(item)); + } + return message; + } + toObject() { + const data: { + ops?: ReturnType[]; + } = {}; + if (this.ops != null) { + data.ops = this.ops.map((item: ProofOp) => item.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.ops.length) + writer.writeRepeatedMessage(1, this.ops, (item: ProofOp) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProofOps { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProofOps(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.ops, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ProofOp.deserialize(reader), ProofOp)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProofOps { + return ProofOps.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/crypto/proof_pb.d.ts b/codegen/tendermint/crypto/proof_pb.d.ts similarity index 100% rename from proto/tendermint/crypto/proof_pb.d.ts rename to codegen/tendermint/crypto/proof_pb.d.ts diff --git a/proto/tendermint/crypto/proof_pb.js b/codegen/tendermint/crypto/proof_pb.js similarity index 100% rename from proto/tendermint/crypto/proof_pb.js rename to codegen/tendermint/crypto/proof_pb.js diff --git a/proto/tendermint/crypto/proof_pb_service.d.ts b/codegen/tendermint/crypto/proof_pb_service.d.ts similarity index 100% rename from proto/tendermint/crypto/proof_pb_service.d.ts rename to codegen/tendermint/crypto/proof_pb_service.d.ts diff --git a/proto/tendermint/crypto/proof_pb_service.js b/codegen/tendermint/crypto/proof_pb_service.js similarity index 100% rename from proto/tendermint/crypto/proof_pb_service.js rename to codegen/tendermint/crypto/proof_pb_service.js diff --git a/codegen/tendermint/libs/bits/types.ts b/codegen/tendermint/libs/bits/types.ts new file mode 100644 index 0000000..04864fc --- /dev/null +++ b/codegen/tendermint/libs/bits/types.ts @@ -0,0 +1,98 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/libs/bits/types.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace tendermint.libs.bits { + export class BitArray extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + bits?: number; + elems?: number[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("bits" in data && data.bits != undefined) { + this.bits = data.bits; + } + if ("elems" in data && data.elems != undefined) { + this.elems = data.elems; + } + } + } + get bits() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set bits(value: number) { + pb_1.Message.setField(this, 1, value); + } + get elems() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as number[]; + } + set elems(value: number[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + bits?: number; + elems?: number[]; + }): BitArray { + const message = new BitArray({}); + if (data.bits != null) { + message.bits = data.bits; + } + if (data.elems != null) { + message.elems = data.elems; + } + return message; + } + toObject() { + const data: { + bits?: number; + elems?: number[]; + } = {}; + if (this.bits != null) { + data.bits = this.bits; + } + if (this.elems != null) { + data.elems = this.elems; + } + 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.bits != 0) + writer.writeInt64(1, this.bits); + if (this.elems.length) + writer.writePackedUint64(2, this.elems); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BitArray { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BitArray(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.bits = reader.readInt64(); + break; + case 2: + message.elems = reader.readPackedUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BitArray { + return BitArray.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/libs/bits/types_pb.d.ts b/codegen/tendermint/libs/bits/types_pb.d.ts similarity index 100% rename from proto/tendermint/libs/bits/types_pb.d.ts rename to codegen/tendermint/libs/bits/types_pb.d.ts diff --git a/proto/tendermint/libs/bits/types_pb.js b/codegen/tendermint/libs/bits/types_pb.js similarity index 100% rename from proto/tendermint/libs/bits/types_pb.js rename to codegen/tendermint/libs/bits/types_pb.js diff --git a/proto/tendermint/libs/bits/types_pb_service.d.ts b/codegen/tendermint/libs/bits/types_pb_service.d.ts similarity index 100% rename from proto/tendermint/libs/bits/types_pb_service.d.ts rename to codegen/tendermint/libs/bits/types_pb_service.d.ts diff --git a/proto/tendermint/libs/bits/types_pb_service.js b/codegen/tendermint/libs/bits/types_pb_service.js similarity index 100% rename from proto/tendermint/libs/bits/types_pb_service.js rename to codegen/tendermint/libs/bits/types_pb_service.js diff --git a/codegen/tendermint/p2p/types.ts b/codegen/tendermint/p2p/types.ts new file mode 100644 index 0000000..44f0005 --- /dev/null +++ b/codegen/tendermint/p2p/types.ts @@ -0,0 +1,559 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/p2p/types.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace tendermint.p2p { + export class NetAddress extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + ip?: string; + port?: 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 ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("ip" in data && data.ip != undefined) { + this.ip = data.ip; + } + if ("port" in data && data.port != undefined) { + this.port = data.port; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get ip() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set ip(value: string) { + pb_1.Message.setField(this, 2, value); + } + get port() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set port(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + id?: string; + ip?: string; + port?: number; + }): NetAddress { + const message = new NetAddress({}); + if (data.id != null) { + message.id = data.id; + } + if (data.ip != null) { + message.ip = data.ip; + } + if (data.port != null) { + message.port = data.port; + } + return message; + } + toObject() { + const data: { + id?: string; + ip?: string; + port?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.ip != null) { + data.ip = this.ip; + } + if (this.port != null) { + data.port = this.port; + } + 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.id.length) + writer.writeString(1, this.id); + if (this.ip.length) + writer.writeString(2, this.ip); + if (this.port != 0) + writer.writeUint32(3, this.port); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NetAddress { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NetAddress(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readString(); + break; + case 2: + message.ip = reader.readString(); + break; + case 3: + message.port = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): NetAddress { + return NetAddress.deserialize(bytes); + } + } + export class ProtocolVersion extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + p2p?: number; + block?: number; + app?: 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 ("p2p" in data && data.p2p != undefined) { + this.p2p = data.p2p; + } + if ("block" in data && data.block != undefined) { + this.block = data.block; + } + if ("app" in data && data.app != undefined) { + this.app = data.app; + } + } + } + get p2p() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set p2p(value: number) { + pb_1.Message.setField(this, 1, value); + } + get block() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set block(value: number) { + pb_1.Message.setField(this, 2, value); + } + get app() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set app(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + p2p?: number; + block?: number; + app?: number; + }): ProtocolVersion { + const message = new ProtocolVersion({}); + if (data.p2p != null) { + message.p2p = data.p2p; + } + if (data.block != null) { + message.block = data.block; + } + if (data.app != null) { + message.app = data.app; + } + return message; + } + toObject() { + const data: { + p2p?: number; + block?: number; + app?: number; + } = {}; + if (this.p2p != null) { + data.p2p = this.p2p; + } + if (this.block != null) { + data.block = this.block; + } + if (this.app != null) { + data.app = this.app; + } + 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.p2p != 0) + writer.writeUint64(1, this.p2p); + if (this.block != 0) + writer.writeUint64(2, this.block); + if (this.app != 0) + writer.writeUint64(3, this.app); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProtocolVersion { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProtocolVersion(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.p2p = reader.readUint64(); + break; + case 2: + message.block = reader.readUint64(); + break; + case 3: + message.app = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProtocolVersion { + return ProtocolVersion.deserialize(bytes); + } + } + export class DefaultNodeInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + protocol_version?: ProtocolVersion; + default_node_id?: string; + listen_addr?: string; + network?: string; + version?: string; + channels?: Uint8Array; + moniker?: string; + other?: DefaultNodeInfoOther; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("protocol_version" in data && data.protocol_version != undefined) { + this.protocol_version = data.protocol_version; + } + if ("default_node_id" in data && data.default_node_id != undefined) { + this.default_node_id = data.default_node_id; + } + if ("listen_addr" in data && data.listen_addr != undefined) { + this.listen_addr = data.listen_addr; + } + if ("network" in data && data.network != undefined) { + this.network = data.network; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("channels" in data && data.channels != undefined) { + this.channels = data.channels; + } + if ("moniker" in data && data.moniker != undefined) { + this.moniker = data.moniker; + } + if ("other" in data && data.other != undefined) { + this.other = data.other; + } + } + } + get protocol_version() { + return pb_1.Message.getWrapperField(this, ProtocolVersion, 1) as ProtocolVersion; + } + set protocol_version(value: ProtocolVersion) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_protocol_version() { + return pb_1.Message.getField(this, 1) != null; + } + get default_node_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set default_node_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get listen_addr() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set listen_addr(value: string) { + pb_1.Message.setField(this, 3, value); + } + get network() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set network(value: string) { + pb_1.Message.setField(this, 4, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 5, value); + } + get channels() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set channels(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get moniker() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set moniker(value: string) { + pb_1.Message.setField(this, 7, value); + } + get other() { + return pb_1.Message.getWrapperField(this, DefaultNodeInfoOther, 8) as DefaultNodeInfoOther; + } + set other(value: DefaultNodeInfoOther) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_other() { + return pb_1.Message.getField(this, 8) != null; + } + static fromObject(data: { + protocol_version?: ReturnType; + default_node_id?: string; + listen_addr?: string; + network?: string; + version?: string; + channels?: Uint8Array; + moniker?: string; + other?: ReturnType; + }): DefaultNodeInfo { + const message = new DefaultNodeInfo({}); + if (data.protocol_version != null) { + message.protocol_version = ProtocolVersion.fromObject(data.protocol_version); + } + if (data.default_node_id != null) { + message.default_node_id = data.default_node_id; + } + if (data.listen_addr != null) { + message.listen_addr = data.listen_addr; + } + if (data.network != null) { + message.network = data.network; + } + if (data.version != null) { + message.version = data.version; + } + if (data.channels != null) { + message.channels = data.channels; + } + if (data.moniker != null) { + message.moniker = data.moniker; + } + if (data.other != null) { + message.other = DefaultNodeInfoOther.fromObject(data.other); + } + return message; + } + toObject() { + const data: { + protocol_version?: ReturnType; + default_node_id?: string; + listen_addr?: string; + network?: string; + version?: string; + channels?: Uint8Array; + moniker?: string; + other?: ReturnType; + } = {}; + if (this.protocol_version != null) { + data.protocol_version = this.protocol_version.toObject(); + } + if (this.default_node_id != null) { + data.default_node_id = this.default_node_id; + } + if (this.listen_addr != null) { + data.listen_addr = this.listen_addr; + } + if (this.network != null) { + data.network = this.network; + } + if (this.version != null) { + data.version = this.version; + } + if (this.channels != null) { + data.channels = this.channels; + } + if (this.moniker != null) { + data.moniker = this.moniker; + } + if (this.other != null) { + data.other = this.other.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_protocol_version) + writer.writeMessage(1, this.protocol_version, () => this.protocol_version.serialize(writer)); + if (this.default_node_id.length) + writer.writeString(2, this.default_node_id); + if (this.listen_addr.length) + writer.writeString(3, this.listen_addr); + if (this.network.length) + writer.writeString(4, this.network); + if (this.version.length) + writer.writeString(5, this.version); + if (this.channels.length) + writer.writeBytes(6, this.channels); + if (this.moniker.length) + writer.writeString(7, this.moniker); + if (this.has_other) + writer.writeMessage(8, this.other, () => this.other.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DefaultNodeInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DefaultNodeInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.protocol_version, () => message.protocol_version = ProtocolVersion.deserialize(reader)); + break; + case 2: + message.default_node_id = reader.readString(); + break; + case 3: + message.listen_addr = reader.readString(); + break; + case 4: + message.network = reader.readString(); + break; + case 5: + message.version = reader.readString(); + break; + case 6: + message.channels = reader.readBytes(); + break; + case 7: + message.moniker = reader.readString(); + break; + case 8: + reader.readMessage(message.other, () => message.other = DefaultNodeInfoOther.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DefaultNodeInfo { + return DefaultNodeInfo.deserialize(bytes); + } + } + export class DefaultNodeInfoOther extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tx_index?: string; + rpc_address?: 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 ("tx_index" in data && data.tx_index != undefined) { + this.tx_index = data.tx_index; + } + if ("rpc_address" in data && data.rpc_address != undefined) { + this.rpc_address = data.rpc_address; + } + } + } + get tx_index() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set tx_index(value: string) { + pb_1.Message.setField(this, 1, value); + } + get rpc_address() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set rpc_address(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tx_index?: string; + rpc_address?: string; + }): DefaultNodeInfoOther { + const message = new DefaultNodeInfoOther({}); + if (data.tx_index != null) { + message.tx_index = data.tx_index; + } + if (data.rpc_address != null) { + message.rpc_address = data.rpc_address; + } + return message; + } + toObject() { + const data: { + tx_index?: string; + rpc_address?: string; + } = {}; + if (this.tx_index != null) { + data.tx_index = this.tx_index; + } + if (this.rpc_address != null) { + data.rpc_address = this.rpc_address; + } + 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.tx_index.length) + writer.writeString(1, this.tx_index); + if (this.rpc_address.length) + writer.writeString(2, this.rpc_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DefaultNodeInfoOther { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DefaultNodeInfoOther(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tx_index = reader.readString(); + break; + case 2: + message.rpc_address = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DefaultNodeInfoOther { + return DefaultNodeInfoOther.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/p2p/types_pb.d.ts b/codegen/tendermint/p2p/types_pb.d.ts similarity index 100% rename from proto/tendermint/p2p/types_pb.d.ts rename to codegen/tendermint/p2p/types_pb.d.ts diff --git a/proto/tendermint/p2p/types_pb.js b/codegen/tendermint/p2p/types_pb.js similarity index 100% rename from proto/tendermint/p2p/types_pb.js rename to codegen/tendermint/p2p/types_pb.js diff --git a/proto/tendermint/p2p/types_pb_service.d.ts b/codegen/tendermint/p2p/types_pb_service.d.ts similarity index 100% rename from proto/tendermint/p2p/types_pb_service.d.ts rename to codegen/tendermint/p2p/types_pb_service.d.ts diff --git a/proto/tendermint/p2p/types_pb_service.js b/codegen/tendermint/p2p/types_pb_service.js similarity index 100% rename from proto/tendermint/p2p/types_pb_service.js rename to codegen/tendermint/p2p/types_pb_service.js diff --git a/codegen/tendermint/types/block.ts b/codegen/tendermint/types/block.ts new file mode 100644 index 0000000..5df4941 --- /dev/null +++ b/codegen/tendermint/types/block.ts @@ -0,0 +1,159 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/types/block.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as dependency_2 from "./types"; +import * as dependency_3 from "./evidence"; +import * as pb_1 from "google-protobuf"; +export namespace tendermint.types { + export class Block extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + header?: dependency_2.tendermint.types.Header; + data?: dependency_2.tendermint.types.Data; + evidence?: dependency_3.tendermint.types.EvidenceList; + last_commit?: dependency_2.tendermint.types.Commit; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("header" in data && data.header != undefined) { + this.header = data.header; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("evidence" in data && data.evidence != undefined) { + this.evidence = data.evidence; + } + if ("last_commit" in data && data.last_commit != undefined) { + this.last_commit = data.last_commit; + } + } + } + get header() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.types.Header, 1) as dependency_2.tendermint.types.Header; + } + set header(value: dependency_2.tendermint.types.Header) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_header() { + return pb_1.Message.getField(this, 1) != null; + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.types.Data, 2) as dependency_2.tendermint.types.Data; + } + set data(value: dependency_2.tendermint.types.Data) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_data() { + return pb_1.Message.getField(this, 2) != null; + } + get evidence() { + return pb_1.Message.getWrapperField(this, dependency_3.tendermint.types.EvidenceList, 3) as dependency_3.tendermint.types.EvidenceList; + } + set evidence(value: dependency_3.tendermint.types.EvidenceList) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_evidence() { + return pb_1.Message.getField(this, 3) != null; + } + get last_commit() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.types.Commit, 4) as dependency_2.tendermint.types.Commit; + } + set last_commit(value: dependency_2.tendermint.types.Commit) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_last_commit() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + header?: ReturnType; + data?: ReturnType; + evidence?: ReturnType; + last_commit?: ReturnType; + }): Block { + const message = new Block({}); + if (data.header != null) { + message.header = dependency_2.tendermint.types.Header.fromObject(data.header); + } + if (data.data != null) { + message.data = dependency_2.tendermint.types.Data.fromObject(data.data); + } + if (data.evidence != null) { + message.evidence = dependency_3.tendermint.types.EvidenceList.fromObject(data.evidence); + } + if (data.last_commit != null) { + message.last_commit = dependency_2.tendermint.types.Commit.fromObject(data.last_commit); + } + return message; + } + toObject() { + const data: { + header?: ReturnType; + data?: ReturnType; + evidence?: ReturnType; + last_commit?: ReturnType; + } = {}; + if (this.header != null) { + data.header = this.header.toObject(); + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.evidence != null) { + data.evidence = this.evidence.toObject(); + } + if (this.last_commit != null) { + data.last_commit = this.last_commit.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_header) + writer.writeMessage(1, this.header, () => this.header.serialize(writer)); + if (this.has_data) + writer.writeMessage(2, this.data, () => this.data.serialize(writer)); + if (this.has_evidence) + writer.writeMessage(3, this.evidence, () => this.evidence.serialize(writer)); + if (this.has_last_commit) + writer.writeMessage(4, this.last_commit, () => this.last_commit.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Block { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Block(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.header, () => message.header = dependency_2.tendermint.types.Header.deserialize(reader)); + break; + case 2: + reader.readMessage(message.data, () => message.data = dependency_2.tendermint.types.Data.deserialize(reader)); + break; + case 3: + reader.readMessage(message.evidence, () => message.evidence = dependency_3.tendermint.types.EvidenceList.deserialize(reader)); + break; + case 4: + reader.readMessage(message.last_commit, () => message.last_commit = dependency_2.tendermint.types.Commit.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Block { + return Block.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/types/block_pb.d.ts b/codegen/tendermint/types/block_pb.d.ts similarity index 100% rename from proto/tendermint/types/block_pb.d.ts rename to codegen/tendermint/types/block_pb.d.ts diff --git a/proto/tendermint/types/block_pb.js b/codegen/tendermint/types/block_pb.js similarity index 100% rename from proto/tendermint/types/block_pb.js rename to codegen/tendermint/types/block_pb.js diff --git a/proto/tendermint/types/block_pb_service.d.ts b/codegen/tendermint/types/block_pb_service.d.ts similarity index 100% rename from proto/tendermint/types/block_pb_service.d.ts rename to codegen/tendermint/types/block_pb_service.d.ts diff --git a/proto/tendermint/types/block_pb_service.js b/codegen/tendermint/types/block_pb_service.js similarity index 100% rename from proto/tendermint/types/block_pb_service.js rename to codegen/tendermint/types/block_pb_service.js diff --git a/codegen/tendermint/types/evidence.ts b/codegen/tendermint/types/evidence.ts new file mode 100644 index 0000000..d127533 --- /dev/null +++ b/codegen/tendermint/types/evidence.ts @@ -0,0 +1,521 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/types/evidence.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as dependency_2 from "./../../google/protobuf/timestamp"; +import * as dependency_3 from "./types"; +import * as dependency_4 from "./validator"; +import * as pb_1 from "google-protobuf"; +export namespace tendermint.types { + export class Evidence extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2]]; + constructor(data?: any[] | ({} & (({ + duplicate_vote_evidence?: DuplicateVoteEvidence; + light_client_attack_evidence?: never; + } | { + duplicate_vote_evidence?: never; + light_client_attack_evidence?: LightClientAttackEvidence; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("duplicate_vote_evidence" in data && data.duplicate_vote_evidence != undefined) { + this.duplicate_vote_evidence = data.duplicate_vote_evidence; + } + if ("light_client_attack_evidence" in data && data.light_client_attack_evidence != undefined) { + this.light_client_attack_evidence = data.light_client_attack_evidence; + } + } + } + get duplicate_vote_evidence() { + return pb_1.Message.getWrapperField(this, DuplicateVoteEvidence, 1) as DuplicateVoteEvidence; + } + set duplicate_vote_evidence(value: DuplicateVoteEvidence) { + pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); + } + get has_duplicate_vote_evidence() { + return pb_1.Message.getField(this, 1) != null; + } + get light_client_attack_evidence() { + return pb_1.Message.getWrapperField(this, LightClientAttackEvidence, 2) as LightClientAttackEvidence; + } + set light_client_attack_evidence(value: LightClientAttackEvidence) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_light_client_attack_evidence() { + return pb_1.Message.getField(this, 2) != null; + } + get sum() { + const cases: { + [index: number]: "none" | "duplicate_vote_evidence" | "light_client_attack_evidence"; + } = { + 0: "none", + 1: "duplicate_vote_evidence", + 2: "light_client_attack_evidence" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2])]; + } + static fromObject(data: { + duplicate_vote_evidence?: ReturnType; + light_client_attack_evidence?: ReturnType; + }): Evidence { + const message = new Evidence({}); + if (data.duplicate_vote_evidence != null) { + message.duplicate_vote_evidence = DuplicateVoteEvidence.fromObject(data.duplicate_vote_evidence); + } + if (data.light_client_attack_evidence != null) { + message.light_client_attack_evidence = LightClientAttackEvidence.fromObject(data.light_client_attack_evidence); + } + return message; + } + toObject() { + const data: { + duplicate_vote_evidence?: ReturnType; + light_client_attack_evidence?: ReturnType; + } = {}; + if (this.duplicate_vote_evidence != null) { + data.duplicate_vote_evidence = this.duplicate_vote_evidence.toObject(); + } + if (this.light_client_attack_evidence != null) { + data.light_client_attack_evidence = this.light_client_attack_evidence.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_duplicate_vote_evidence) + writer.writeMessage(1, this.duplicate_vote_evidence, () => this.duplicate_vote_evidence.serialize(writer)); + if (this.has_light_client_attack_evidence) + writer.writeMessage(2, this.light_client_attack_evidence, () => this.light_client_attack_evidence.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Evidence { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Evidence(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.duplicate_vote_evidence, () => message.duplicate_vote_evidence = DuplicateVoteEvidence.deserialize(reader)); + break; + case 2: + reader.readMessage(message.light_client_attack_evidence, () => message.light_client_attack_evidence = LightClientAttackEvidence.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Evidence { + return Evidence.deserialize(bytes); + } + } + export class DuplicateVoteEvidence extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vote_a?: dependency_3.tendermint.types.Vote; + vote_b?: dependency_3.tendermint.types.Vote; + total_voting_power?: number; + validator_power?: number; + timestamp?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("vote_a" in data && data.vote_a != undefined) { + this.vote_a = data.vote_a; + } + if ("vote_b" in data && data.vote_b != undefined) { + this.vote_b = data.vote_b; + } + if ("total_voting_power" in data && data.total_voting_power != undefined) { + this.total_voting_power = data.total_voting_power; + } + if ("validator_power" in data && data.validator_power != undefined) { + this.validator_power = data.validator_power; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get vote_a() { + return pb_1.Message.getWrapperField(this, dependency_3.tendermint.types.Vote, 1) as dependency_3.tendermint.types.Vote; + } + set vote_a(value: dependency_3.tendermint.types.Vote) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_vote_a() { + return pb_1.Message.getField(this, 1) != null; + } + get vote_b() { + return pb_1.Message.getWrapperField(this, dependency_3.tendermint.types.Vote, 2) as dependency_3.tendermint.types.Vote; + } + set vote_b(value: dependency_3.tendermint.types.Vote) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_vote_b() { + return pb_1.Message.getField(this, 2) != null; + } + get total_voting_power() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set total_voting_power(value: number) { + pb_1.Message.setField(this, 3, value); + } + get validator_power() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set validator_power(value: number) { + pb_1.Message.setField(this, 4, value); + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 5) as dependency_2.google.protobuf.Timestamp; + } + set timestamp(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + vote_a?: ReturnType; + vote_b?: ReturnType; + total_voting_power?: number; + validator_power?: number; + timestamp?: ReturnType; + }): DuplicateVoteEvidence { + const message = new DuplicateVoteEvidence({}); + if (data.vote_a != null) { + message.vote_a = dependency_3.tendermint.types.Vote.fromObject(data.vote_a); + } + if (data.vote_b != null) { + message.vote_b = dependency_3.tendermint.types.Vote.fromObject(data.vote_b); + } + if (data.total_voting_power != null) { + message.total_voting_power = data.total_voting_power; + } + if (data.validator_power != null) { + message.validator_power = data.validator_power; + } + if (data.timestamp != null) { + message.timestamp = dependency_2.google.protobuf.Timestamp.fromObject(data.timestamp); + } + return message; + } + toObject() { + const data: { + vote_a?: ReturnType; + vote_b?: ReturnType; + total_voting_power?: number; + validator_power?: number; + timestamp?: ReturnType; + } = {}; + if (this.vote_a != null) { + data.vote_a = this.vote_a.toObject(); + } + if (this.vote_b != null) { + data.vote_b = this.vote_b.toObject(); + } + if (this.total_voting_power != null) { + data.total_voting_power = this.total_voting_power; + } + if (this.validator_power != null) { + data.validator_power = this.validator_power; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp.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_vote_a) + writer.writeMessage(1, this.vote_a, () => this.vote_a.serialize(writer)); + if (this.has_vote_b) + writer.writeMessage(2, this.vote_b, () => this.vote_b.serialize(writer)); + if (this.total_voting_power != 0) + writer.writeInt64(3, this.total_voting_power); + if (this.validator_power != 0) + writer.writeInt64(4, this.validator_power); + if (this.has_timestamp) + writer.writeMessage(5, this.timestamp, () => this.timestamp.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DuplicateVoteEvidence { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DuplicateVoteEvidence(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.vote_a, () => message.vote_a = dependency_3.tendermint.types.Vote.deserialize(reader)); + break; + case 2: + reader.readMessage(message.vote_b, () => message.vote_b = dependency_3.tendermint.types.Vote.deserialize(reader)); + break; + case 3: + message.total_voting_power = reader.readInt64(); + break; + case 4: + message.validator_power = reader.readInt64(); + break; + case 5: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DuplicateVoteEvidence { + return DuplicateVoteEvidence.deserialize(bytes); + } + } + export class LightClientAttackEvidence extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + conflicting_block?: dependency_3.tendermint.types.LightBlock; + common_height?: number; + byzantine_validators?: dependency_4.tendermint.types.Validator[]; + total_voting_power?: number; + timestamp?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("conflicting_block" in data && data.conflicting_block != undefined) { + this.conflicting_block = data.conflicting_block; + } + if ("common_height" in data && data.common_height != undefined) { + this.common_height = data.common_height; + } + if ("byzantine_validators" in data && data.byzantine_validators != undefined) { + this.byzantine_validators = data.byzantine_validators; + } + if ("total_voting_power" in data && data.total_voting_power != undefined) { + this.total_voting_power = data.total_voting_power; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + } + } + get conflicting_block() { + return pb_1.Message.getWrapperField(this, dependency_3.tendermint.types.LightBlock, 1) as dependency_3.tendermint.types.LightBlock; + } + set conflicting_block(value: dependency_3.tendermint.types.LightBlock) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_conflicting_block() { + return pb_1.Message.getField(this, 1) != null; + } + get common_height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set common_height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get byzantine_validators() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.tendermint.types.Validator, 3) as dependency_4.tendermint.types.Validator[]; + } + set byzantine_validators(value: dependency_4.tendermint.types.Validator[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get total_voting_power() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set total_voting_power(value: number) { + pb_1.Message.setField(this, 4, value); + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 5) as dependency_2.google.protobuf.Timestamp; + } + set timestamp(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + conflicting_block?: ReturnType; + common_height?: number; + byzantine_validators?: ReturnType[]; + total_voting_power?: number; + timestamp?: ReturnType; + }): LightClientAttackEvidence { + const message = new LightClientAttackEvidence({}); + if (data.conflicting_block != null) { + message.conflicting_block = dependency_3.tendermint.types.LightBlock.fromObject(data.conflicting_block); + } + if (data.common_height != null) { + message.common_height = data.common_height; + } + if (data.byzantine_validators != null) { + message.byzantine_validators = data.byzantine_validators.map(item => dependency_4.tendermint.types.Validator.fromObject(item)); + } + if (data.total_voting_power != null) { + message.total_voting_power = data.total_voting_power; + } + if (data.timestamp != null) { + message.timestamp = dependency_2.google.protobuf.Timestamp.fromObject(data.timestamp); + } + return message; + } + toObject() { + const data: { + conflicting_block?: ReturnType; + common_height?: number; + byzantine_validators?: ReturnType[]; + total_voting_power?: number; + timestamp?: ReturnType; + } = {}; + if (this.conflicting_block != null) { + data.conflicting_block = this.conflicting_block.toObject(); + } + if (this.common_height != null) { + data.common_height = this.common_height; + } + if (this.byzantine_validators != null) { + data.byzantine_validators = this.byzantine_validators.map((item: dependency_4.tendermint.types.Validator) => item.toObject()); + } + if (this.total_voting_power != null) { + data.total_voting_power = this.total_voting_power; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp.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_conflicting_block) + writer.writeMessage(1, this.conflicting_block, () => this.conflicting_block.serialize(writer)); + if (this.common_height != 0) + writer.writeInt64(2, this.common_height); + if (this.byzantine_validators.length) + writer.writeRepeatedMessage(3, this.byzantine_validators, (item: dependency_4.tendermint.types.Validator) => item.serialize(writer)); + if (this.total_voting_power != 0) + writer.writeInt64(4, this.total_voting_power); + if (this.has_timestamp) + writer.writeMessage(5, this.timestamp, () => this.timestamp.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LightClientAttackEvidence { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LightClientAttackEvidence(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.conflicting_block, () => message.conflicting_block = dependency_3.tendermint.types.LightBlock.deserialize(reader)); + break; + case 2: + message.common_height = reader.readInt64(); + break; + case 3: + reader.readMessage(message.byzantine_validators, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_4.tendermint.types.Validator.deserialize(reader), dependency_4.tendermint.types.Validator)); + break; + case 4: + message.total_voting_power = reader.readInt64(); + break; + case 5: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): LightClientAttackEvidence { + return LightClientAttackEvidence.deserialize(bytes); + } + } + export class EvidenceList extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + evidence?: Evidence[]; + }) { + 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 ("evidence" in data && data.evidence != undefined) { + this.evidence = data.evidence; + } + } + } + get evidence() { + return pb_1.Message.getRepeatedWrapperField(this, Evidence, 1) as Evidence[]; + } + set evidence(value: Evidence[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + evidence?: ReturnType[]; + }): EvidenceList { + const message = new EvidenceList({}); + if (data.evidence != null) { + message.evidence = data.evidence.map(item => Evidence.fromObject(item)); + } + return message; + } + toObject() { + const data: { + evidence?: ReturnType[]; + } = {}; + if (this.evidence != null) { + data.evidence = this.evidence.map((item: Evidence) => item.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.evidence.length) + writer.writeRepeatedMessage(1, this.evidence, (item: Evidence) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EvidenceList { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EvidenceList(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.evidence, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Evidence.deserialize(reader), Evidence)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EvidenceList { + return EvidenceList.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/types/evidence_pb.d.ts b/codegen/tendermint/types/evidence_pb.d.ts similarity index 100% rename from proto/tendermint/types/evidence_pb.d.ts rename to codegen/tendermint/types/evidence_pb.d.ts diff --git a/proto/tendermint/types/evidence_pb.js b/codegen/tendermint/types/evidence_pb.js similarity index 100% rename from proto/tendermint/types/evidence_pb.js rename to codegen/tendermint/types/evidence_pb.js diff --git a/proto/tendermint/types/evidence_pb_service.d.ts b/codegen/tendermint/types/evidence_pb_service.d.ts similarity index 100% rename from proto/tendermint/types/evidence_pb_service.d.ts rename to codegen/tendermint/types/evidence_pb_service.d.ts diff --git a/proto/tendermint/types/evidence_pb_service.js b/codegen/tendermint/types/evidence_pb_service.js similarity index 100% rename from proto/tendermint/types/evidence_pb_service.js rename to codegen/tendermint/types/evidence_pb_service.js diff --git a/codegen/tendermint/types/params.ts b/codegen/tendermint/types/params.ts new file mode 100644 index 0000000..2f7f594 --- /dev/null +++ b/codegen/tendermint/types/params.ts @@ -0,0 +1,681 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/types/params.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as dependency_2 from "./../../google/protobuf/duration"; +import * as pb_1 from "google-protobuf"; +export namespace tendermint.types { + export class ConsensusParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block?: BlockParams; + evidence?: EvidenceParams; + validator?: ValidatorParams; + version?: VersionParams; + abci?: ABCIParams; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block" in data && data.block != undefined) { + this.block = data.block; + } + if ("evidence" in data && data.evidence != undefined) { + this.evidence = data.evidence; + } + if ("validator" in data && data.validator != undefined) { + this.validator = data.validator; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("abci" in data && data.abci != undefined) { + this.abci = data.abci; + } + } + } + get block() { + return pb_1.Message.getWrapperField(this, BlockParams, 1) as BlockParams; + } + set block(value: BlockParams) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_block() { + return pb_1.Message.getField(this, 1) != null; + } + get evidence() { + return pb_1.Message.getWrapperField(this, EvidenceParams, 2) as EvidenceParams; + } + set evidence(value: EvidenceParams) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_evidence() { + return pb_1.Message.getField(this, 2) != null; + } + get validator() { + return pb_1.Message.getWrapperField(this, ValidatorParams, 3) as ValidatorParams; + } + set validator(value: ValidatorParams) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_validator() { + return pb_1.Message.getField(this, 3) != null; + } + get version() { + return pb_1.Message.getWrapperField(this, VersionParams, 4) as VersionParams; + } + set version(value: VersionParams) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_version() { + return pb_1.Message.getField(this, 4) != null; + } + get abci() { + return pb_1.Message.getWrapperField(this, ABCIParams, 5) as ABCIParams; + } + set abci(value: ABCIParams) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_abci() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + block?: ReturnType; + evidence?: ReturnType; + validator?: ReturnType; + version?: ReturnType; + abci?: ReturnType; + }): ConsensusParams { + const message = new ConsensusParams({}); + if (data.block != null) { + message.block = BlockParams.fromObject(data.block); + } + if (data.evidence != null) { + message.evidence = EvidenceParams.fromObject(data.evidence); + } + if (data.validator != null) { + message.validator = ValidatorParams.fromObject(data.validator); + } + if (data.version != null) { + message.version = VersionParams.fromObject(data.version); + } + if (data.abci != null) { + message.abci = ABCIParams.fromObject(data.abci); + } + return message; + } + toObject() { + const data: { + block?: ReturnType; + evidence?: ReturnType; + validator?: ReturnType; + version?: ReturnType; + abci?: ReturnType; + } = {}; + if (this.block != null) { + data.block = this.block.toObject(); + } + if (this.evidence != null) { + data.evidence = this.evidence.toObject(); + } + if (this.validator != null) { + data.validator = this.validator.toObject(); + } + if (this.version != null) { + data.version = this.version.toObject(); + } + if (this.abci != null) { + data.abci = this.abci.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_block) + writer.writeMessage(1, this.block, () => this.block.serialize(writer)); + if (this.has_evidence) + writer.writeMessage(2, this.evidence, () => this.evidence.serialize(writer)); + if (this.has_validator) + writer.writeMessage(3, this.validator, () => this.validator.serialize(writer)); + if (this.has_version) + writer.writeMessage(4, this.version, () => this.version.serialize(writer)); + if (this.has_abci) + writer.writeMessage(5, this.abci, () => this.abci.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConsensusParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConsensusParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.block, () => message.block = BlockParams.deserialize(reader)); + break; + case 2: + reader.readMessage(message.evidence, () => message.evidence = EvidenceParams.deserialize(reader)); + break; + case 3: + reader.readMessage(message.validator, () => message.validator = ValidatorParams.deserialize(reader)); + break; + case 4: + reader.readMessage(message.version, () => message.version = VersionParams.deserialize(reader)); + break; + case 5: + reader.readMessage(message.abci, () => message.abci = ABCIParams.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ConsensusParams { + return ConsensusParams.deserialize(bytes); + } + } + export class BlockParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + max_bytes?: number; + max_gas?: 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 ("max_bytes" in data && data.max_bytes != undefined) { + this.max_bytes = data.max_bytes; + } + if ("max_gas" in data && data.max_gas != undefined) { + this.max_gas = data.max_gas; + } + } + } + get max_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set max_bytes(value: number) { + pb_1.Message.setField(this, 1, value); + } + get max_gas() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set max_gas(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + max_bytes?: number; + max_gas?: number; + }): BlockParams { + const message = new BlockParams({}); + if (data.max_bytes != null) { + message.max_bytes = data.max_bytes; + } + if (data.max_gas != null) { + message.max_gas = data.max_gas; + } + return message; + } + toObject() { + const data: { + max_bytes?: number; + max_gas?: number; + } = {}; + if (this.max_bytes != null) { + data.max_bytes = this.max_bytes; + } + if (this.max_gas != null) { + data.max_gas = this.max_gas; + } + 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.max_bytes != 0) + writer.writeInt64(1, this.max_bytes); + if (this.max_gas != 0) + writer.writeInt64(2, this.max_gas); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BlockParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.max_bytes = reader.readInt64(); + break; + case 2: + message.max_gas = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BlockParams { + return BlockParams.deserialize(bytes); + } + } + export class EvidenceParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + max_age_num_blocks?: number; + max_age_duration?: dependency_2.google.protobuf.Duration; + max_bytes?: 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 ("max_age_num_blocks" in data && data.max_age_num_blocks != undefined) { + this.max_age_num_blocks = data.max_age_num_blocks; + } + if ("max_age_duration" in data && data.max_age_duration != undefined) { + this.max_age_duration = data.max_age_duration; + } + if ("max_bytes" in data && data.max_bytes != undefined) { + this.max_bytes = data.max_bytes; + } + } + } + get max_age_num_blocks() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set max_age_num_blocks(value: number) { + pb_1.Message.setField(this, 1, value); + } + get max_age_duration() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 2) as dependency_2.google.protobuf.Duration; + } + set max_age_duration(value: dependency_2.google.protobuf.Duration) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_max_age_duration() { + return pb_1.Message.getField(this, 2) != null; + } + get max_bytes() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set max_bytes(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + max_age_num_blocks?: number; + max_age_duration?: ReturnType; + max_bytes?: number; + }): EvidenceParams { + const message = new EvidenceParams({}); + if (data.max_age_num_blocks != null) { + message.max_age_num_blocks = data.max_age_num_blocks; + } + if (data.max_age_duration != null) { + message.max_age_duration = dependency_2.google.protobuf.Duration.fromObject(data.max_age_duration); + } + if (data.max_bytes != null) { + message.max_bytes = data.max_bytes; + } + return message; + } + toObject() { + const data: { + max_age_num_blocks?: number; + max_age_duration?: ReturnType; + max_bytes?: number; + } = {}; + if (this.max_age_num_blocks != null) { + data.max_age_num_blocks = this.max_age_num_blocks; + } + if (this.max_age_duration != null) { + data.max_age_duration = this.max_age_duration.toObject(); + } + if (this.max_bytes != null) { + data.max_bytes = this.max_bytes; + } + 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.max_age_num_blocks != 0) + writer.writeInt64(1, this.max_age_num_blocks); + if (this.has_max_age_duration) + writer.writeMessage(2, this.max_age_duration, () => this.max_age_duration.serialize(writer)); + if (this.max_bytes != 0) + writer.writeInt64(3, this.max_bytes); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EvidenceParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EvidenceParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.max_age_num_blocks = reader.readInt64(); + break; + case 2: + reader.readMessage(message.max_age_duration, () => message.max_age_duration = dependency_2.google.protobuf.Duration.deserialize(reader)); + break; + case 3: + message.max_bytes = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EvidenceParams { + return EvidenceParams.deserialize(bytes); + } + } + export class ValidatorParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pub_key_types?: string[]; + }) { + 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 ("pub_key_types" in data && data.pub_key_types != undefined) { + this.pub_key_types = data.pub_key_types; + } + } + } + get pub_key_types() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set pub_key_types(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + pub_key_types?: string[]; + }): ValidatorParams { + const message = new ValidatorParams({}); + if (data.pub_key_types != null) { + message.pub_key_types = data.pub_key_types; + } + return message; + } + toObject() { + const data: { + pub_key_types?: string[]; + } = {}; + if (this.pub_key_types != null) { + data.pub_key_types = this.pub_key_types; + } + 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.pub_key_types.length) + writer.writeRepeatedString(1, this.pub_key_types); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorParams { + return ValidatorParams.deserialize(bytes); + } + } + export class VersionParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + app?: 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 ("app" in data && data.app != undefined) { + this.app = data.app; + } + } + } + get app() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set app(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + app?: number; + }): VersionParams { + const message = new VersionParams({}); + if (data.app != null) { + message.app = data.app; + } + return message; + } + toObject() { + const data: { + app?: number; + } = {}; + if (this.app != null) { + data.app = this.app; + } + 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.app != 0) + writer.writeUint64(1, this.app); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VersionParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VersionParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.app = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VersionParams { + return VersionParams.deserialize(bytes); + } + } + export class HashedParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_max_bytes?: number; + block_max_gas?: 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 ("block_max_bytes" in data && data.block_max_bytes != undefined) { + this.block_max_bytes = data.block_max_bytes; + } + if ("block_max_gas" in data && data.block_max_gas != undefined) { + this.block_max_gas = data.block_max_gas; + } + } + } + get block_max_bytes() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set block_max_bytes(value: number) { + pb_1.Message.setField(this, 1, value); + } + get block_max_gas() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set block_max_gas(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + block_max_bytes?: number; + block_max_gas?: number; + }): HashedParams { + const message = new HashedParams({}); + if (data.block_max_bytes != null) { + message.block_max_bytes = data.block_max_bytes; + } + if (data.block_max_gas != null) { + message.block_max_gas = data.block_max_gas; + } + return message; + } + toObject() { + const data: { + block_max_bytes?: number; + block_max_gas?: number; + } = {}; + if (this.block_max_bytes != null) { + data.block_max_bytes = this.block_max_bytes; + } + if (this.block_max_gas != null) { + data.block_max_gas = this.block_max_gas; + } + 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.block_max_bytes != 0) + writer.writeInt64(1, this.block_max_bytes); + if (this.block_max_gas != 0) + writer.writeInt64(2, this.block_max_gas); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HashedParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HashedParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_max_bytes = reader.readInt64(); + break; + case 2: + message.block_max_gas = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): HashedParams { + return HashedParams.deserialize(bytes); + } + } + export class ABCIParams extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vote_extensions_enable_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 ("vote_extensions_enable_height" in data && data.vote_extensions_enable_height != undefined) { + this.vote_extensions_enable_height = data.vote_extensions_enable_height; + } + } + } + get vote_extensions_enable_height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set vote_extensions_enable_height(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + vote_extensions_enable_height?: number; + }): ABCIParams { + const message = new ABCIParams({}); + if (data.vote_extensions_enable_height != null) { + message.vote_extensions_enable_height = data.vote_extensions_enable_height; + } + return message; + } + toObject() { + const data: { + vote_extensions_enable_height?: number; + } = {}; + if (this.vote_extensions_enable_height != null) { + data.vote_extensions_enable_height = this.vote_extensions_enable_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.vote_extensions_enable_height != 0) + writer.writeInt64(1, this.vote_extensions_enable_height); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ABCIParams { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ABCIParams(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.vote_extensions_enable_height = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ABCIParams { + return ABCIParams.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/types/params_pb.d.ts b/codegen/tendermint/types/params_pb.d.ts similarity index 86% rename from proto/tendermint/types/params_pb.d.ts rename to codegen/tendermint/types/params_pb.d.ts index a130404..63b2a0c 100644 --- a/proto/tendermint/types/params_pb.d.ts +++ b/codegen/tendermint/types/params_pb.d.ts @@ -26,6 +26,11 @@ export class ConsensusParams extends jspb.Message { getVersion(): VersionParams | undefined; setVersion(value?: VersionParams): void; + hasAbci(): boolean; + clearAbci(): void; + getAbci(): ABCIParams | undefined; + setAbci(value?: ABCIParams): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ConsensusParams.AsObject; static toObject(includeInstance: boolean, msg: ConsensusParams): ConsensusParams.AsObject; @@ -42,6 +47,7 @@ export namespace ConsensusParams { evidence?: EvidenceParams.AsObject, validator?: ValidatorParams.AsObject, version?: VersionParams.AsObject, + abci?: ABCIParams.AsObject, } } @@ -165,3 +171,23 @@ export namespace HashedParams { } } +export class ABCIParams extends jspb.Message { + getVoteExtensionsEnableHeight(): number; + setVoteExtensionsEnableHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ABCIParams.AsObject; + static toObject(includeInstance: boolean, msg: ABCIParams): ABCIParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ABCIParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ABCIParams; + static deserializeBinaryFromReader(message: ABCIParams, reader: jspb.BinaryReader): ABCIParams; +} + +export namespace ABCIParams { + export type AsObject = { + voteExtensionsEnableHeight: number, + } +} + diff --git a/proto/tendermint/types/params_pb.js b/codegen/tendermint/types/params_pb.js similarity index 86% rename from proto/tendermint/types/params_pb.js rename to codegen/tendermint/types/params_pb.js index 463c0c4..b16617b 100644 --- a/proto/tendermint/types/params_pb.js +++ b/codegen/tendermint/types/params_pb.js @@ -19,6 +19,7 @@ var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_pb); +goog.exportSymbol('proto.tendermint.types.ABCIParams', null, global); goog.exportSymbol('proto.tendermint.types.BlockParams', null, global); goog.exportSymbol('proto.tendermint.types.ConsensusParams', null, global); goog.exportSymbol('proto.tendermint.types.EvidenceParams', null, global); @@ -151,6 +152,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.tendermint.types.HashedParams.displayName = 'proto.tendermint.types.HashedParams'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.ABCIParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.ABCIParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ABCIParams.displayName = 'proto.tendermint.types.ABCIParams'; +} @@ -186,7 +208,8 @@ proto.tendermint.types.ConsensusParams.toObject = function(includeInstance, msg) block: (f = msg.getBlock()) && proto.tendermint.types.BlockParams.toObject(includeInstance, f), evidence: (f = msg.getEvidence()) && proto.tendermint.types.EvidenceParams.toObject(includeInstance, f), validator: (f = msg.getValidator()) && proto.tendermint.types.ValidatorParams.toObject(includeInstance, f), - version: (f = msg.getVersion()) && proto.tendermint.types.VersionParams.toObject(includeInstance, f) + version: (f = msg.getVersion()) && proto.tendermint.types.VersionParams.toObject(includeInstance, f), + abci: (f = msg.getAbci()) && proto.tendermint.types.ABCIParams.toObject(includeInstance, f) }; if (includeInstance) { @@ -243,6 +266,11 @@ proto.tendermint.types.ConsensusParams.deserializeBinaryFromReader = function(ms reader.readMessage(value,proto.tendermint.types.VersionParams.deserializeBinaryFromReader); msg.setVersion(value); break; + case 5: + var value = new proto.tendermint.types.ABCIParams; + reader.readMessage(value,proto.tendermint.types.ABCIParams.deserializeBinaryFromReader); + msg.setAbci(value); + break; default: reader.skipField(); break; @@ -304,6 +332,14 @@ proto.tendermint.types.ConsensusParams.serializeBinaryToWriter = function(messag proto.tendermint.types.VersionParams.serializeBinaryToWriter ); } + f = message.getAbci(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.types.ABCIParams.serializeBinaryToWriter + ); + } }; @@ -455,6 +491,43 @@ proto.tendermint.types.ConsensusParams.prototype.hasVersion = function() { }; +/** + * optional ABCIParams abci = 5; + * @return {?proto.tendermint.types.ABCIParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getAbci = function() { + return /** @type{?proto.tendermint.types.ABCIParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.ABCIParams, 5)); +}; + + +/** + * @param {?proto.tendermint.types.ABCIParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setAbci = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearAbci = function() { + return this.setAbci(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasAbci = function() { + return jspb.Message.getField(this, 5) != null; +}; + + @@ -1272,4 +1345,134 @@ proto.tendermint.types.HashedParams.prototype.setBlockMaxGas = function(value) { }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.ABCIParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ABCIParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.ABCIParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ABCIParams.toObject = function(includeInstance, msg) { + var f, obj = { + voteExtensionsEnableHeight: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.ABCIParams} + */ +proto.tendermint.types.ABCIParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ABCIParams; + return proto.tendermint.types.ABCIParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ABCIParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ABCIParams} + */ +proto.tendermint.types.ABCIParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVoteExtensionsEnableHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ABCIParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ABCIParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.ABCIParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ABCIParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVoteExtensionsEnableHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 vote_extensions_enable_height = 1; + * @return {number} + */ +proto.tendermint.types.ABCIParams.prototype.getVoteExtensionsEnableHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.ABCIParams} returns this + */ +proto.tendermint.types.ABCIParams.prototype.setVoteExtensionsEnableHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + goog.object.extend(exports, proto.tendermint.types); diff --git a/proto/tendermint/types/params_pb_service.d.ts b/codegen/tendermint/types/params_pb_service.d.ts similarity index 100% rename from proto/tendermint/types/params_pb_service.d.ts rename to codegen/tendermint/types/params_pb_service.d.ts diff --git a/proto/tendermint/types/params_pb_service.js b/codegen/tendermint/types/params_pb_service.js similarity index 100% rename from proto/tendermint/types/params_pb_service.js rename to codegen/tendermint/types/params_pb_service.js diff --git a/codegen/tendermint/types/types.ts b/codegen/tendermint/types/types.ts new file mode 100644 index 0000000..def9f51 --- /dev/null +++ b/codegen/tendermint/types/types.ts @@ -0,0 +1,2303 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/types/types.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as dependency_2 from "./../../google/protobuf/timestamp"; +import * as dependency_3 from "./../crypto/proof"; +import * as dependency_4 from "./../version/types"; +import * as dependency_5 from "./validator"; +import * as pb_1 from "google-protobuf"; +export namespace tendermint.types { + export enum SignedMsgType { + SIGNED_MSG_TYPE_UNKNOWN = 0, + SIGNED_MSG_TYPE_PREVOTE = 1, + SIGNED_MSG_TYPE_PRECOMMIT = 2, + SIGNED_MSG_TYPE_PROPOSAL = 32 + } + export class PartSetHeader extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + total?: number; + hash?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("total" in data && data.total != undefined) { + this.total = data.total; + } + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + } + } + get total() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set total(value: number) { + pb_1.Message.setField(this, 1, value); + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + total?: number; + hash?: Uint8Array; + }): PartSetHeader { + const message = new PartSetHeader({}); + if (data.total != null) { + message.total = data.total; + } + if (data.hash != null) { + message.hash = data.hash; + } + return message; + } + toObject() { + const data: { + total?: number; + hash?: Uint8Array; + } = {}; + if (this.total != null) { + data.total = this.total; + } + if (this.hash != null) { + data.hash = this.hash; + } + 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.total != 0) + writer.writeUint32(1, this.total); + if (this.hash.length) + writer.writeBytes(2, this.hash); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PartSetHeader { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PartSetHeader(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.total = reader.readUint32(); + break; + case 2: + message.hash = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PartSetHeader { + return PartSetHeader.deserialize(bytes); + } + } + export class Part extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + index?: number; + bytes?: Uint8Array; + proof?: dependency_3.tendermint.crypto.Proof; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("bytes" in data && data.bytes != undefined) { + this.bytes = data.bytes; + } + if ("proof" in data && data.proof != undefined) { + this.proof = data.proof; + } + } + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 1, value); + } + get bytes() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set bytes(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get proof() { + return pb_1.Message.getWrapperField(this, dependency_3.tendermint.crypto.Proof, 3) as dependency_3.tendermint.crypto.Proof; + } + set proof(value: dependency_3.tendermint.crypto.Proof) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_proof() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + index?: number; + bytes?: Uint8Array; + proof?: ReturnType; + }): Part { + const message = new Part({}); + if (data.index != null) { + message.index = data.index; + } + if (data.bytes != null) { + message.bytes = data.bytes; + } + if (data.proof != null) { + message.proof = dependency_3.tendermint.crypto.Proof.fromObject(data.proof); + } + return message; + } + toObject() { + const data: { + index?: number; + bytes?: Uint8Array; + proof?: ReturnType; + } = {}; + if (this.index != null) { + data.index = this.index; + } + if (this.bytes != null) { + data.bytes = this.bytes; + } + if (this.proof != null) { + data.proof = this.proof.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.index != 0) + writer.writeUint32(1, this.index); + if (this.bytes.length) + writer.writeBytes(2, this.bytes); + if (this.has_proof) + writer.writeMessage(3, this.proof, () => this.proof.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Part { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Part(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.index = reader.readUint32(); + break; + case 2: + message.bytes = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof, () => message.proof = dependency_3.tendermint.crypto.Proof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Part { + return Part.deserialize(bytes); + } + } + export class BlockID extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + hash?: Uint8Array; + part_set_header?: PartSetHeader; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("hash" in data && data.hash != undefined) { + this.hash = data.hash; + } + if ("part_set_header" in data && data.part_set_header != undefined) { + this.part_set_header = data.part_set_header; + } + } + } + get hash() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set hash(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get part_set_header() { + return pb_1.Message.getWrapperField(this, PartSetHeader, 2) as PartSetHeader; + } + set part_set_header(value: PartSetHeader) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_part_set_header() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + hash?: Uint8Array; + part_set_header?: ReturnType; + }): BlockID { + const message = new BlockID({}); + if (data.hash != null) { + message.hash = data.hash; + } + if (data.part_set_header != null) { + message.part_set_header = PartSetHeader.fromObject(data.part_set_header); + } + return message; + } + toObject() { + const data: { + hash?: Uint8Array; + part_set_header?: ReturnType; + } = {}; + if (this.hash != null) { + data.hash = this.hash; + } + if (this.part_set_header != null) { + data.part_set_header = this.part_set_header.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.hash.length) + writer.writeBytes(1, this.hash); + if (this.has_part_set_header) + writer.writeMessage(2, this.part_set_header, () => this.part_set_header.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockID { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BlockID(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.hash = reader.readBytes(); + break; + case 2: + reader.readMessage(message.part_set_header, () => message.part_set_header = PartSetHeader.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BlockID { + return BlockID.deserialize(bytes); + } + } + export class Header extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + version?: dependency_4.tendermint.version.Consensus; + chain_id?: string; + height?: number; + time?: dependency_2.google.protobuf.Timestamp; + last_block_id?: BlockID; + last_commit_hash?: Uint8Array; + data_hash?: Uint8Array; + validators_hash?: Uint8Array; + next_validators_hash?: Uint8Array; + consensus_hash?: Uint8Array; + app_hash?: Uint8Array; + last_results_hash?: Uint8Array; + evidence_hash?: Uint8Array; + proposer_address?: Uint8Array; + }) { + 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 ("chain_id" in data && data.chain_id != undefined) { + this.chain_id = data.chain_id; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("last_block_id" in data && data.last_block_id != undefined) { + this.last_block_id = data.last_block_id; + } + if ("last_commit_hash" in data && data.last_commit_hash != undefined) { + this.last_commit_hash = data.last_commit_hash; + } + if ("data_hash" in data && data.data_hash != undefined) { + this.data_hash = data.data_hash; + } + if ("validators_hash" in data && data.validators_hash != undefined) { + this.validators_hash = data.validators_hash; + } + if ("next_validators_hash" in data && data.next_validators_hash != undefined) { + this.next_validators_hash = data.next_validators_hash; + } + if ("consensus_hash" in data && data.consensus_hash != undefined) { + this.consensus_hash = data.consensus_hash; + } + if ("app_hash" in data && data.app_hash != undefined) { + this.app_hash = data.app_hash; + } + if ("last_results_hash" in data && data.last_results_hash != undefined) { + this.last_results_hash = data.last_results_hash; + } + if ("evidence_hash" in data && data.evidence_hash != undefined) { + this.evidence_hash = data.evidence_hash; + } + if ("proposer_address" in data && data.proposer_address != undefined) { + this.proposer_address = data.proposer_address; + } + } + } + get version() { + return pb_1.Message.getWrapperField(this, dependency_4.tendermint.version.Consensus, 1) as dependency_4.tendermint.version.Consensus; + } + set version(value: dependency_4.tendermint.version.Consensus) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_version() { + 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 height() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 3, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 4) as dependency_2.google.protobuf.Timestamp; + } + set time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_time() { + return pb_1.Message.getField(this, 4) != null; + } + get last_block_id() { + return pb_1.Message.getWrapperField(this, BlockID, 5) as BlockID; + } + set last_block_id(value: BlockID) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_last_block_id() { + return pb_1.Message.getField(this, 5) != null; + } + get last_commit_hash() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set last_commit_hash(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get data_hash() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set data_hash(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + get validators_hash() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + set validators_hash(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + get next_validators_hash() { + return pb_1.Message.getFieldWithDefault(this, 9, new Uint8Array(0)) as Uint8Array; + } + set next_validators_hash(value: Uint8Array) { + pb_1.Message.setField(this, 9, value); + } + get consensus_hash() { + return pb_1.Message.getFieldWithDefault(this, 10, new Uint8Array(0)) as Uint8Array; + } + set consensus_hash(value: Uint8Array) { + pb_1.Message.setField(this, 10, value); + } + get app_hash() { + return pb_1.Message.getFieldWithDefault(this, 11, new Uint8Array(0)) as Uint8Array; + } + set app_hash(value: Uint8Array) { + pb_1.Message.setField(this, 11, value); + } + get last_results_hash() { + return pb_1.Message.getFieldWithDefault(this, 12, new Uint8Array(0)) as Uint8Array; + } + set last_results_hash(value: Uint8Array) { + pb_1.Message.setField(this, 12, value); + } + get evidence_hash() { + return pb_1.Message.getFieldWithDefault(this, 13, new Uint8Array(0)) as Uint8Array; + } + set evidence_hash(value: Uint8Array) { + pb_1.Message.setField(this, 13, value); + } + get proposer_address() { + return pb_1.Message.getFieldWithDefault(this, 14, new Uint8Array(0)) as Uint8Array; + } + set proposer_address(value: Uint8Array) { + pb_1.Message.setField(this, 14, value); + } + static fromObject(data: { + version?: ReturnType; + chain_id?: string; + height?: number; + time?: ReturnType; + last_block_id?: ReturnType; + last_commit_hash?: Uint8Array; + data_hash?: Uint8Array; + validators_hash?: Uint8Array; + next_validators_hash?: Uint8Array; + consensus_hash?: Uint8Array; + app_hash?: Uint8Array; + last_results_hash?: Uint8Array; + evidence_hash?: Uint8Array; + proposer_address?: Uint8Array; + }): Header { + const message = new Header({}); + if (data.version != null) { + message.version = dependency_4.tendermint.version.Consensus.fromObject(data.version); + } + if (data.chain_id != null) { + message.chain_id = data.chain_id; + } + if (data.height != null) { + message.height = data.height; + } + if (data.time != null) { + message.time = dependency_2.google.protobuf.Timestamp.fromObject(data.time); + } + if (data.last_block_id != null) { + message.last_block_id = BlockID.fromObject(data.last_block_id); + } + if (data.last_commit_hash != null) { + message.last_commit_hash = data.last_commit_hash; + } + if (data.data_hash != null) { + message.data_hash = data.data_hash; + } + if (data.validators_hash != null) { + message.validators_hash = data.validators_hash; + } + if (data.next_validators_hash != null) { + message.next_validators_hash = data.next_validators_hash; + } + if (data.consensus_hash != null) { + message.consensus_hash = data.consensus_hash; + } + if (data.app_hash != null) { + message.app_hash = data.app_hash; + } + if (data.last_results_hash != null) { + message.last_results_hash = data.last_results_hash; + } + if (data.evidence_hash != null) { + message.evidence_hash = data.evidence_hash; + } + if (data.proposer_address != null) { + message.proposer_address = data.proposer_address; + } + return message; + } + toObject() { + const data: { + version?: ReturnType; + chain_id?: string; + height?: number; + time?: ReturnType; + last_block_id?: ReturnType; + last_commit_hash?: Uint8Array; + data_hash?: Uint8Array; + validators_hash?: Uint8Array; + next_validators_hash?: Uint8Array; + consensus_hash?: Uint8Array; + app_hash?: Uint8Array; + last_results_hash?: Uint8Array; + evidence_hash?: Uint8Array; + proposer_address?: Uint8Array; + } = {}; + if (this.version != null) { + data.version = this.version.toObject(); + } + if (this.chain_id != null) { + data.chain_id = this.chain_id; + } + if (this.height != null) { + data.height = this.height; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.last_block_id != null) { + data.last_block_id = this.last_block_id.toObject(); + } + if (this.last_commit_hash != null) { + data.last_commit_hash = this.last_commit_hash; + } + if (this.data_hash != null) { + data.data_hash = this.data_hash; + } + if (this.validators_hash != null) { + data.validators_hash = this.validators_hash; + } + if (this.next_validators_hash != null) { + data.next_validators_hash = this.next_validators_hash; + } + if (this.consensus_hash != null) { + data.consensus_hash = this.consensus_hash; + } + if (this.app_hash != null) { + data.app_hash = this.app_hash; + } + if (this.last_results_hash != null) { + data.last_results_hash = this.last_results_hash; + } + if (this.evidence_hash != null) { + data.evidence_hash = this.evidence_hash; + } + if (this.proposer_address != null) { + data.proposer_address = this.proposer_address; + } + 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_version) + writer.writeMessage(1, this.version, () => this.version.serialize(writer)); + if (this.chain_id.length) + writer.writeString(2, this.chain_id); + if (this.height != 0) + writer.writeInt64(3, this.height); + if (this.has_time) + writer.writeMessage(4, this.time, () => this.time.serialize(writer)); + if (this.has_last_block_id) + writer.writeMessage(5, this.last_block_id, () => this.last_block_id.serialize(writer)); + if (this.last_commit_hash.length) + writer.writeBytes(6, this.last_commit_hash); + if (this.data_hash.length) + writer.writeBytes(7, this.data_hash); + if (this.validators_hash.length) + writer.writeBytes(8, this.validators_hash); + if (this.next_validators_hash.length) + writer.writeBytes(9, this.next_validators_hash); + if (this.consensus_hash.length) + writer.writeBytes(10, this.consensus_hash); + if (this.app_hash.length) + writer.writeBytes(11, this.app_hash); + if (this.last_results_hash.length) + writer.writeBytes(12, this.last_results_hash); + if (this.evidence_hash.length) + writer.writeBytes(13, this.evidence_hash); + if (this.proposer_address.length) + writer.writeBytes(14, this.proposer_address); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Header { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Header(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.version, () => message.version = dependency_4.tendermint.version.Consensus.deserialize(reader)); + break; + case 2: + message.chain_id = reader.readString(); + break; + case 3: + message.height = reader.readInt64(); + break; + case 4: + reader.readMessage(message.time, () => message.time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 5: + reader.readMessage(message.last_block_id, () => message.last_block_id = BlockID.deserialize(reader)); + break; + case 6: + message.last_commit_hash = reader.readBytes(); + break; + case 7: + message.data_hash = reader.readBytes(); + break; + case 8: + message.validators_hash = reader.readBytes(); + break; + case 9: + message.next_validators_hash = reader.readBytes(); + break; + case 10: + message.consensus_hash = reader.readBytes(); + break; + case 11: + message.app_hash = reader.readBytes(); + break; + case 12: + message.last_results_hash = reader.readBytes(); + break; + case 13: + message.evidence_hash = reader.readBytes(); + break; + case 14: + message.proposer_address = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Header { + return Header.deserialize(bytes); + } + } + export class Data extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + txs?: Uint8Array[]; + }) { + 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 ("txs" in data && data.txs != undefined) { + this.txs = data.txs; + } + } + } + get txs() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as Uint8Array[]; + } + set txs(value: Uint8Array[]) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + txs?: Uint8Array[]; + }): Data { + const message = new Data({}); + if (data.txs != null) { + message.txs = data.txs; + } + return message; + } + toObject() { + const data: { + txs?: Uint8Array[]; + } = {}; + if (this.txs != null) { + data.txs = this.txs; + } + 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.txs.length) + writer.writeRepeatedBytes(1, this.txs); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Data { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Data(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readBytes()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Data { + return Data.deserialize(bytes); + } + } + export class Vote extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type?: SignedMsgType; + height?: number; + round?: number; + block_id?: BlockID; + timestamp?: dependency_2.google.protobuf.Timestamp; + validator_address?: Uint8Array; + validator_index?: number; + signature?: Uint8Array; + extension?: Uint8Array; + extension_signature?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("round" in data && data.round != undefined) { + this.round = data.round; + } + if ("block_id" in data && data.block_id != undefined) { + this.block_id = data.block_id; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("validator_index" in data && data.validator_index != undefined) { + this.validator_index = data.validator_index; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + if ("extension" in data && data.extension != undefined) { + this.extension = data.extension; + } + if ("extension_signature" in data && data.extension_signature != undefined) { + this.extension_signature = data.extension_signature; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN) as SignedMsgType; + } + set type(value: SignedMsgType) { + pb_1.Message.setField(this, 1, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get round() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set round(value: number) { + pb_1.Message.setField(this, 3, value); + } + get block_id() { + return pb_1.Message.getWrapperField(this, BlockID, 4) as BlockID; + } + set block_id(value: BlockID) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_block_id() { + return pb_1.Message.getField(this, 4) != null; + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 5) as dependency_2.google.protobuf.Timestamp; + } + set timestamp(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 5) != null; + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set validator_address(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + get validator_index() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set validator_index(value: number) { + pb_1.Message.setField(this, 7, value); + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 8, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 8, value); + } + get extension() { + return pb_1.Message.getFieldWithDefault(this, 9, new Uint8Array(0)) as Uint8Array; + } + set extension(value: Uint8Array) { + pb_1.Message.setField(this, 9, value); + } + get extension_signature() { + return pb_1.Message.getFieldWithDefault(this, 10, new Uint8Array(0)) as Uint8Array; + } + set extension_signature(value: Uint8Array) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + type?: SignedMsgType; + height?: number; + round?: number; + block_id?: ReturnType; + timestamp?: ReturnType; + validator_address?: Uint8Array; + validator_index?: number; + signature?: Uint8Array; + extension?: Uint8Array; + extension_signature?: Uint8Array; + }): Vote { + const message = new Vote({}); + if (data.type != null) { + message.type = data.type; + } + if (data.height != null) { + message.height = data.height; + } + if (data.round != null) { + message.round = data.round; + } + if (data.block_id != null) { + message.block_id = BlockID.fromObject(data.block_id); + } + if (data.timestamp != null) { + message.timestamp = dependency_2.google.protobuf.Timestamp.fromObject(data.timestamp); + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.validator_index != null) { + message.validator_index = data.validator_index; + } + if (data.signature != null) { + message.signature = data.signature; + } + if (data.extension != null) { + message.extension = data.extension; + } + if (data.extension_signature != null) { + message.extension_signature = data.extension_signature; + } + return message; + } + toObject() { + const data: { + type?: SignedMsgType; + height?: number; + round?: number; + block_id?: ReturnType; + timestamp?: ReturnType; + validator_address?: Uint8Array; + validator_index?: number; + signature?: Uint8Array; + extension?: Uint8Array; + extension_signature?: Uint8Array; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.height != null) { + data.height = this.height; + } + if (this.round != null) { + data.round = this.round; + } + if (this.block_id != null) { + data.block_id = this.block_id.toObject(); + } + if (this.timestamp != null) { + data.timestamp = this.timestamp.toObject(); + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.validator_index != null) { + data.validator_index = this.validator_index; + } + if (this.signature != null) { + data.signature = this.signature; + } + if (this.extension != null) { + data.extension = this.extension; + } + if (this.extension_signature != null) { + data.extension_signature = this.extension_signature; + } + 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.type != SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN) + writer.writeEnum(1, this.type); + if (this.height != 0) + writer.writeInt64(2, this.height); + if (this.round != 0) + writer.writeInt32(3, this.round); + if (this.has_block_id) + writer.writeMessage(4, this.block_id, () => this.block_id.serialize(writer)); + if (this.has_timestamp) + writer.writeMessage(5, this.timestamp, () => this.timestamp.serialize(writer)); + if (this.validator_address.length) + writer.writeBytes(6, this.validator_address); + if (this.validator_index != 0) + writer.writeInt32(7, this.validator_index); + if (this.signature.length) + writer.writeBytes(8, this.signature); + if (this.extension.length) + writer.writeBytes(9, this.extension); + if (this.extension_signature.length) + writer.writeBytes(10, this.extension_signature); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Vote { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Vote(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readEnum(); + break; + case 2: + message.height = reader.readInt64(); + break; + case 3: + message.round = reader.readInt32(); + break; + case 4: + reader.readMessage(message.block_id, () => message.block_id = BlockID.deserialize(reader)); + break; + case 5: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 6: + message.validator_address = reader.readBytes(); + break; + case 7: + message.validator_index = reader.readInt32(); + break; + case 8: + message.signature = reader.readBytes(); + break; + case 9: + message.extension = reader.readBytes(); + break; + case 10: + message.extension_signature = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Vote { + return Vote.deserialize(bytes); + } + } + export class Commit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + round?: number; + block_id?: BlockID; + signatures?: CommitSig[]; + }) { + 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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("round" in data && data.round != undefined) { + this.round = data.round; + } + if ("block_id" in data && data.block_id != undefined) { + this.block_id = data.block_id; + } + if ("signatures" in data && data.signatures != undefined) { + this.signatures = data.signatures; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get round() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set round(value: number) { + pb_1.Message.setField(this, 2, value); + } + get block_id() { + return pb_1.Message.getWrapperField(this, BlockID, 3) as BlockID; + } + set block_id(value: BlockID) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_block_id() { + return pb_1.Message.getField(this, 3) != null; + } + get signatures() { + return pb_1.Message.getRepeatedWrapperField(this, CommitSig, 4) as CommitSig[]; + } + set signatures(value: CommitSig[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + height?: number; + round?: number; + block_id?: ReturnType; + signatures?: ReturnType[]; + }): Commit { + const message = new Commit({}); + if (data.height != null) { + message.height = data.height; + } + if (data.round != null) { + message.round = data.round; + } + if (data.block_id != null) { + message.block_id = BlockID.fromObject(data.block_id); + } + if (data.signatures != null) { + message.signatures = data.signatures.map(item => CommitSig.fromObject(item)); + } + return message; + } + toObject() { + const data: { + height?: number; + round?: number; + block_id?: ReturnType; + signatures?: ReturnType[]; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.round != null) { + data.round = this.round; + } + if (this.block_id != null) { + data.block_id = this.block_id.toObject(); + } + if (this.signatures != null) { + data.signatures = this.signatures.map((item: CommitSig) => item.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.height != 0) + writer.writeInt64(1, this.height); + if (this.round != 0) + writer.writeInt32(2, this.round); + if (this.has_block_id) + writer.writeMessage(3, this.block_id, () => this.block_id.serialize(writer)); + if (this.signatures.length) + writer.writeRepeatedMessage(4, this.signatures, (item: CommitSig) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Commit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Commit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + message.round = reader.readInt32(); + break; + case 3: + reader.readMessage(message.block_id, () => message.block_id = BlockID.deserialize(reader)); + break; + case 4: + reader.readMessage(message.signatures, () => pb_1.Message.addToRepeatedWrapperField(message, 4, CommitSig.deserialize(reader), CommitSig)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Commit { + return Commit.deserialize(bytes); + } + } + export class CommitSig extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_id_flag?: dependency_5.tendermint.types.BlockIDFlag; + validator_address?: Uint8Array; + timestamp?: dependency_2.google.protobuf.Timestamp; + signature?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_id_flag" in data && data.block_id_flag != undefined) { + this.block_id_flag = data.block_id_flag; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + } + } + get block_id_flag() { + return pb_1.Message.getFieldWithDefault(this, 1, dependency_5.tendermint.types.BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN) as dependency_5.tendermint.types.BlockIDFlag; + } + set block_id_flag(value: dependency_5.tendermint.types.BlockIDFlag) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set validator_address(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 3) as dependency_2.google.protobuf.Timestamp; + } + set timestamp(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 3) != null; + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + block_id_flag?: dependency_5.tendermint.types.BlockIDFlag; + validator_address?: Uint8Array; + timestamp?: ReturnType; + signature?: Uint8Array; + }): CommitSig { + const message = new CommitSig({}); + if (data.block_id_flag != null) { + message.block_id_flag = data.block_id_flag; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.timestamp != null) { + message.timestamp = dependency_2.google.protobuf.Timestamp.fromObject(data.timestamp); + } + if (data.signature != null) { + message.signature = data.signature; + } + return message; + } + toObject() { + const data: { + block_id_flag?: dependency_5.tendermint.types.BlockIDFlag; + validator_address?: Uint8Array; + timestamp?: ReturnType; + signature?: Uint8Array; + } = {}; + if (this.block_id_flag != null) { + data.block_id_flag = this.block_id_flag; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp.toObject(); + } + if (this.signature != null) { + data.signature = this.signature; + } + 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.block_id_flag != dependency_5.tendermint.types.BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN) + writer.writeEnum(1, this.block_id_flag); + if (this.validator_address.length) + writer.writeBytes(2, this.validator_address); + if (this.has_timestamp) + writer.writeMessage(3, this.timestamp, () => this.timestamp.serialize(writer)); + if (this.signature.length) + writer.writeBytes(4, this.signature); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommitSig { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommitSig(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_id_flag = reader.readEnum(); + break; + case 2: + message.validator_address = reader.readBytes(); + break; + case 3: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 4: + message.signature = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CommitSig { + return CommitSig.deserialize(bytes); + } + } + export class ExtendedCommit extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + height?: number; + round?: number; + block_id?: BlockID; + extended_signatures?: ExtendedCommitSig[]; + }) { + 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 ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("round" in data && data.round != undefined) { + this.round = data.round; + } + if ("block_id" in data && data.block_id != undefined) { + this.block_id = data.block_id; + } + if ("extended_signatures" in data && data.extended_signatures != undefined) { + this.extended_signatures = data.extended_signatures; + } + } + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 1, value); + } + get round() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set round(value: number) { + pb_1.Message.setField(this, 2, value); + } + get block_id() { + return pb_1.Message.getWrapperField(this, BlockID, 3) as BlockID; + } + set block_id(value: BlockID) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_block_id() { + return pb_1.Message.getField(this, 3) != null; + } + get extended_signatures() { + return pb_1.Message.getRepeatedWrapperField(this, ExtendedCommitSig, 4) as ExtendedCommitSig[]; + } + set extended_signatures(value: ExtendedCommitSig[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + height?: number; + round?: number; + block_id?: ReturnType; + extended_signatures?: ReturnType[]; + }): ExtendedCommit { + const message = new ExtendedCommit({}); + if (data.height != null) { + message.height = data.height; + } + if (data.round != null) { + message.round = data.round; + } + if (data.block_id != null) { + message.block_id = BlockID.fromObject(data.block_id); + } + if (data.extended_signatures != null) { + message.extended_signatures = data.extended_signatures.map(item => ExtendedCommitSig.fromObject(item)); + } + return message; + } + toObject() { + const data: { + height?: number; + round?: number; + block_id?: ReturnType; + extended_signatures?: ReturnType[]; + } = {}; + if (this.height != null) { + data.height = this.height; + } + if (this.round != null) { + data.round = this.round; + } + if (this.block_id != null) { + data.block_id = this.block_id.toObject(); + } + if (this.extended_signatures != null) { + data.extended_signatures = this.extended_signatures.map((item: ExtendedCommitSig) => item.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.height != 0) + writer.writeInt64(1, this.height); + if (this.round != 0) + writer.writeInt32(2, this.round); + if (this.has_block_id) + writer.writeMessage(3, this.block_id, () => this.block_id.serialize(writer)); + if (this.extended_signatures.length) + writer.writeRepeatedMessage(4, this.extended_signatures, (item: ExtendedCommitSig) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExtendedCommit { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExtendedCommit(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.height = reader.readInt64(); + break; + case 2: + message.round = reader.readInt32(); + break; + case 3: + reader.readMessage(message.block_id, () => message.block_id = BlockID.deserialize(reader)); + break; + case 4: + reader.readMessage(message.extended_signatures, () => pb_1.Message.addToRepeatedWrapperField(message, 4, ExtendedCommitSig.deserialize(reader), ExtendedCommitSig)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ExtendedCommit { + return ExtendedCommit.deserialize(bytes); + } + } + export class ExtendedCommitSig extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_id_flag?: dependency_5.tendermint.types.BlockIDFlag; + validator_address?: Uint8Array; + timestamp?: dependency_2.google.protobuf.Timestamp; + signature?: Uint8Array; + extension?: Uint8Array; + extension_signature?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("block_id_flag" in data && data.block_id_flag != undefined) { + this.block_id_flag = data.block_id_flag; + } + if ("validator_address" in data && data.validator_address != undefined) { + this.validator_address = data.validator_address; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + if ("extension" in data && data.extension != undefined) { + this.extension = data.extension; + } + if ("extension_signature" in data && data.extension_signature != undefined) { + this.extension_signature = data.extension_signature; + } + } + } + get block_id_flag() { + return pb_1.Message.getFieldWithDefault(this, 1, dependency_5.tendermint.types.BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN) as dependency_5.tendermint.types.BlockIDFlag; + } + set block_id_flag(value: dependency_5.tendermint.types.BlockIDFlag) { + pb_1.Message.setField(this, 1, value); + } + get validator_address() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set validator_address(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 3) as dependency_2.google.protobuf.Timestamp; + } + set timestamp(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 3) != null; + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get extension() { + return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; + } + set extension(value: Uint8Array) { + pb_1.Message.setField(this, 5, value); + } + get extension_signature() { + return pb_1.Message.getFieldWithDefault(this, 6, new Uint8Array(0)) as Uint8Array; + } + set extension_signature(value: Uint8Array) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + block_id_flag?: dependency_5.tendermint.types.BlockIDFlag; + validator_address?: Uint8Array; + timestamp?: ReturnType; + signature?: Uint8Array; + extension?: Uint8Array; + extension_signature?: Uint8Array; + }): ExtendedCommitSig { + const message = new ExtendedCommitSig({}); + if (data.block_id_flag != null) { + message.block_id_flag = data.block_id_flag; + } + if (data.validator_address != null) { + message.validator_address = data.validator_address; + } + if (data.timestamp != null) { + message.timestamp = dependency_2.google.protobuf.Timestamp.fromObject(data.timestamp); + } + if (data.signature != null) { + message.signature = data.signature; + } + if (data.extension != null) { + message.extension = data.extension; + } + if (data.extension_signature != null) { + message.extension_signature = data.extension_signature; + } + return message; + } + toObject() { + const data: { + block_id_flag?: dependency_5.tendermint.types.BlockIDFlag; + validator_address?: Uint8Array; + timestamp?: ReturnType; + signature?: Uint8Array; + extension?: Uint8Array; + extension_signature?: Uint8Array; + } = {}; + if (this.block_id_flag != null) { + data.block_id_flag = this.block_id_flag; + } + if (this.validator_address != null) { + data.validator_address = this.validator_address; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp.toObject(); + } + if (this.signature != null) { + data.signature = this.signature; + } + if (this.extension != null) { + data.extension = this.extension; + } + if (this.extension_signature != null) { + data.extension_signature = this.extension_signature; + } + 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.block_id_flag != dependency_5.tendermint.types.BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN) + writer.writeEnum(1, this.block_id_flag); + if (this.validator_address.length) + writer.writeBytes(2, this.validator_address); + if (this.has_timestamp) + writer.writeMessage(3, this.timestamp, () => this.timestamp.serialize(writer)); + if (this.signature.length) + writer.writeBytes(4, this.signature); + if (this.extension.length) + writer.writeBytes(5, this.extension); + if (this.extension_signature.length) + writer.writeBytes(6, this.extension_signature); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExtendedCommitSig { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExtendedCommitSig(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block_id_flag = reader.readEnum(); + break; + case 2: + message.validator_address = reader.readBytes(); + break; + case 3: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 4: + message.signature = reader.readBytes(); + break; + case 5: + message.extension = reader.readBytes(); + break; + case 6: + message.extension_signature = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ExtendedCommitSig { + return ExtendedCommitSig.deserialize(bytes); + } + } + export class Proposal extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type?: SignedMsgType; + height?: number; + round?: number; + pol_round?: number; + block_id?: BlockID; + timestamp?: dependency_2.google.protobuf.Timestamp; + signature?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("height" in data && data.height != undefined) { + this.height = data.height; + } + if ("round" in data && data.round != undefined) { + this.round = data.round; + } + if ("pol_round" in data && data.pol_round != undefined) { + this.pol_round = data.pol_round; + } + if ("block_id" in data && data.block_id != undefined) { + this.block_id = data.block_id; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("signature" in data && data.signature != undefined) { + this.signature = data.signature; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN) as SignedMsgType; + } + set type(value: SignedMsgType) { + pb_1.Message.setField(this, 1, value); + } + get height() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set height(value: number) { + pb_1.Message.setField(this, 2, value); + } + get round() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set round(value: number) { + pb_1.Message.setField(this, 3, value); + } + get pol_round() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set pol_round(value: number) { + pb_1.Message.setField(this, 4, value); + } + get block_id() { + return pb_1.Message.getWrapperField(this, BlockID, 5) as BlockID; + } + set block_id(value: BlockID) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_block_id() { + return pb_1.Message.getField(this, 5) != null; + } + get timestamp() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 6) as dependency_2.google.protobuf.Timestamp; + } + set timestamp(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_timestamp() { + return pb_1.Message.getField(this, 6) != null; + } + get signature() { + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; + } + set signature(value: Uint8Array) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + type?: SignedMsgType; + height?: number; + round?: number; + pol_round?: number; + block_id?: ReturnType; + timestamp?: ReturnType; + signature?: Uint8Array; + }): Proposal { + const message = new Proposal({}); + if (data.type != null) { + message.type = data.type; + } + if (data.height != null) { + message.height = data.height; + } + if (data.round != null) { + message.round = data.round; + } + if (data.pol_round != null) { + message.pol_round = data.pol_round; + } + if (data.block_id != null) { + message.block_id = BlockID.fromObject(data.block_id); + } + if (data.timestamp != null) { + message.timestamp = dependency_2.google.protobuf.Timestamp.fromObject(data.timestamp); + } + if (data.signature != null) { + message.signature = data.signature; + } + return message; + } + toObject() { + const data: { + type?: SignedMsgType; + height?: number; + round?: number; + pol_round?: number; + block_id?: ReturnType; + timestamp?: ReturnType; + signature?: Uint8Array; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.height != null) { + data.height = this.height; + } + if (this.round != null) { + data.round = this.round; + } + if (this.pol_round != null) { + data.pol_round = this.pol_round; + } + if (this.block_id != null) { + data.block_id = this.block_id.toObject(); + } + if (this.timestamp != null) { + data.timestamp = this.timestamp.toObject(); + } + if (this.signature != null) { + data.signature = this.signature; + } + 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.type != SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN) + writer.writeEnum(1, this.type); + if (this.height != 0) + writer.writeInt64(2, this.height); + if (this.round != 0) + writer.writeInt32(3, this.round); + if (this.pol_round != 0) + writer.writeInt32(4, this.pol_round); + if (this.has_block_id) + writer.writeMessage(5, this.block_id, () => this.block_id.serialize(writer)); + if (this.has_timestamp) + writer.writeMessage(6, this.timestamp, () => this.timestamp.serialize(writer)); + if (this.signature.length) + writer.writeBytes(7, this.signature); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Proposal { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Proposal(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readEnum(); + break; + case 2: + message.height = reader.readInt64(); + break; + case 3: + message.round = reader.readInt32(); + break; + case 4: + message.pol_round = reader.readInt32(); + break; + case 5: + reader.readMessage(message.block_id, () => message.block_id = BlockID.deserialize(reader)); + break; + case 6: + reader.readMessage(message.timestamp, () => message.timestamp = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 7: + message.signature = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Proposal { + return Proposal.deserialize(bytes); + } + } + export class SignedHeader extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + header?: Header; + commit?: Commit; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("header" in data && data.header != undefined) { + this.header = data.header; + } + if ("commit" in data && data.commit != undefined) { + this.commit = data.commit; + } + } + } + get header() { + return pb_1.Message.getWrapperField(this, Header, 1) as Header; + } + set header(value: Header) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_header() { + return pb_1.Message.getField(this, 1) != null; + } + get commit() { + return pb_1.Message.getWrapperField(this, Commit, 2) as Commit; + } + set commit(value: Commit) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_commit() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + header?: ReturnType; + commit?: ReturnType; + }): SignedHeader { + const message = new SignedHeader({}); + if (data.header != null) { + message.header = Header.fromObject(data.header); + } + if (data.commit != null) { + message.commit = Commit.fromObject(data.commit); + } + return message; + } + toObject() { + const data: { + header?: ReturnType; + commit?: ReturnType; + } = {}; + if (this.header != null) { + data.header = this.header.toObject(); + } + if (this.commit != null) { + data.commit = this.commit.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_header) + writer.writeMessage(1, this.header, () => this.header.serialize(writer)); + if (this.has_commit) + writer.writeMessage(2, this.commit, () => this.commit.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignedHeader { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignedHeader(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.header, () => message.header = Header.deserialize(reader)); + break; + case 2: + reader.readMessage(message.commit, () => message.commit = Commit.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SignedHeader { + return SignedHeader.deserialize(bytes); + } + } + export class LightBlock extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + signed_header?: SignedHeader; + validator_set?: dependency_5.tendermint.types.ValidatorSet; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("signed_header" in data && data.signed_header != undefined) { + this.signed_header = data.signed_header; + } + if ("validator_set" in data && data.validator_set != undefined) { + this.validator_set = data.validator_set; + } + } + } + get signed_header() { + return pb_1.Message.getWrapperField(this, SignedHeader, 1) as SignedHeader; + } + set signed_header(value: SignedHeader) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_signed_header() { + return pb_1.Message.getField(this, 1) != null; + } + get validator_set() { + return pb_1.Message.getWrapperField(this, dependency_5.tendermint.types.ValidatorSet, 2) as dependency_5.tendermint.types.ValidatorSet; + } + set validator_set(value: dependency_5.tendermint.types.ValidatorSet) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_validator_set() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + signed_header?: ReturnType; + validator_set?: ReturnType; + }): LightBlock { + const message = new LightBlock({}); + if (data.signed_header != null) { + message.signed_header = SignedHeader.fromObject(data.signed_header); + } + if (data.validator_set != null) { + message.validator_set = dependency_5.tendermint.types.ValidatorSet.fromObject(data.validator_set); + } + return message; + } + toObject() { + const data: { + signed_header?: ReturnType; + validator_set?: ReturnType; + } = {}; + if (this.signed_header != null) { + data.signed_header = this.signed_header.toObject(); + } + if (this.validator_set != null) { + data.validator_set = this.validator_set.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_signed_header) + writer.writeMessage(1, this.signed_header, () => this.signed_header.serialize(writer)); + if (this.has_validator_set) + writer.writeMessage(2, this.validator_set, () => this.validator_set.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LightBlock { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LightBlock(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.signed_header, () => message.signed_header = SignedHeader.deserialize(reader)); + break; + case 2: + reader.readMessage(message.validator_set, () => message.validator_set = dependency_5.tendermint.types.ValidatorSet.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): LightBlock { + return LightBlock.deserialize(bytes); + } + } + export class BlockMeta extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block_id?: BlockID; + block_size?: number; + header?: Header; + num_txs?: 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 ("block_id" in data && data.block_id != undefined) { + this.block_id = data.block_id; + } + if ("block_size" in data && data.block_size != undefined) { + this.block_size = data.block_size; + } + if ("header" in data && data.header != undefined) { + this.header = data.header; + } + if ("num_txs" in data && data.num_txs != undefined) { + this.num_txs = data.num_txs; + } + } + } + get block_id() { + return pb_1.Message.getWrapperField(this, BlockID, 1) as BlockID; + } + set block_id(value: BlockID) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_block_id() { + return pb_1.Message.getField(this, 1) != null; + } + get block_size() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set block_size(value: number) { + pb_1.Message.setField(this, 2, value); + } + get header() { + return pb_1.Message.getWrapperField(this, Header, 3) as Header; + } + set header(value: Header) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_header() { + return pb_1.Message.getField(this, 3) != null; + } + get num_txs() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set num_txs(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + block_id?: ReturnType; + block_size?: number; + header?: ReturnType; + num_txs?: number; + }): BlockMeta { + const message = new BlockMeta({}); + if (data.block_id != null) { + message.block_id = BlockID.fromObject(data.block_id); + } + if (data.block_size != null) { + message.block_size = data.block_size; + } + if (data.header != null) { + message.header = Header.fromObject(data.header); + } + if (data.num_txs != null) { + message.num_txs = data.num_txs; + } + return message; + } + toObject() { + const data: { + block_id?: ReturnType; + block_size?: number; + header?: ReturnType; + num_txs?: number; + } = {}; + if (this.block_id != null) { + data.block_id = this.block_id.toObject(); + } + if (this.block_size != null) { + data.block_size = this.block_size; + } + if (this.header != null) { + data.header = this.header.toObject(); + } + if (this.num_txs != null) { + data.num_txs = this.num_txs; + } + 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_block_id) + writer.writeMessage(1, this.block_id, () => this.block_id.serialize(writer)); + if (this.block_size != 0) + writer.writeInt64(2, this.block_size); + if (this.has_header) + writer.writeMessage(3, this.header, () => this.header.serialize(writer)); + if (this.num_txs != 0) + writer.writeInt64(4, this.num_txs); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockMeta { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BlockMeta(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.block_id, () => message.block_id = BlockID.deserialize(reader)); + break; + case 2: + message.block_size = reader.readInt64(); + break; + case 3: + reader.readMessage(message.header, () => message.header = Header.deserialize(reader)); + break; + case 4: + message.num_txs = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BlockMeta { + return BlockMeta.deserialize(bytes); + } + } + export class TxProof extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + root_hash?: Uint8Array; + data?: Uint8Array; + proof?: dependency_3.tendermint.crypto.Proof; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("root_hash" in data && data.root_hash != undefined) { + this.root_hash = data.root_hash; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("proof" in data && data.proof != undefined) { + this.proof = data.proof; + } + } + } + get root_hash() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set root_hash(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set data(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + get proof() { + return pb_1.Message.getWrapperField(this, dependency_3.tendermint.crypto.Proof, 3) as dependency_3.tendermint.crypto.Proof; + } + set proof(value: dependency_3.tendermint.crypto.Proof) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_proof() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + root_hash?: Uint8Array; + data?: Uint8Array; + proof?: ReturnType; + }): TxProof { + const message = new TxProof({}); + if (data.root_hash != null) { + message.root_hash = data.root_hash; + } + if (data.data != null) { + message.data = data.data; + } + if (data.proof != null) { + message.proof = dependency_3.tendermint.crypto.Proof.fromObject(data.proof); + } + return message; + } + toObject() { + const data: { + root_hash?: Uint8Array; + data?: Uint8Array; + proof?: ReturnType; + } = {}; + if (this.root_hash != null) { + data.root_hash = this.root_hash; + } + if (this.data != null) { + data.data = this.data; + } + if (this.proof != null) { + data.proof = this.proof.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.root_hash.length) + writer.writeBytes(1, this.root_hash); + if (this.data.length) + writer.writeBytes(2, this.data); + if (this.has_proof) + writer.writeMessage(3, this.proof, () => this.proof.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TxProof { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TxProof(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.root_hash = reader.readBytes(); + break; + case 2: + message.data = reader.readBytes(); + break; + case 3: + reader.readMessage(message.proof, () => message.proof = dependency_3.tendermint.crypto.Proof.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TxProof { + return TxProof.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/types/types_pb.d.ts b/codegen/tendermint/types/types_pb.d.ts similarity index 81% rename from proto/tendermint/types/types_pb.d.ts rename to codegen/tendermint/types/types_pb.d.ts index ef167c9..ad17fbc 100644 --- a/proto/tendermint/types/types_pb.d.ts +++ b/codegen/tendermint/types/types_pb.d.ts @@ -247,6 +247,16 @@ export class Vote extends jspb.Message { getSignature_asB64(): string; setSignature(value: Uint8Array | string): void; + getExtension$(): Uint8Array | string; + getExtension_asU8(): Uint8Array; + getExtension_asB64(): string; + setExtension$(value: Uint8Array | string): void; + + getExtensionSignature(): Uint8Array | string; + getExtensionSignature_asU8(): Uint8Array; + getExtensionSignature_asB64(): string; + setExtensionSignature(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Vote.AsObject; static toObject(includeInstance: boolean, msg: Vote): Vote.AsObject; @@ -267,6 +277,8 @@ export namespace Vote { validatorAddress: Uint8Array | string, validatorIndex: number, signature: Uint8Array | string, + extension: Uint8Array | string, + extensionSignature: Uint8Array | string, } } @@ -307,8 +319,8 @@ export namespace Commit { } export class CommitSig extends jspb.Message { - getBlockIdFlag(): BlockIDFlagMap[keyof BlockIDFlagMap]; - setBlockIdFlag(value: BlockIDFlagMap[keyof BlockIDFlagMap]): void; + getBlockIdFlag(): tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap]; + setBlockIdFlag(value: tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap]): void; getValidatorAddress(): Uint8Array | string; getValidatorAddress_asU8(): Uint8Array; @@ -337,13 +349,99 @@ export class CommitSig extends jspb.Message { export namespace CommitSig { export type AsObject = { - blockIdFlag: BlockIDFlagMap[keyof BlockIDFlagMap], + blockIdFlag: tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap], validatorAddress: Uint8Array | string, timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, signature: Uint8Array | string, } } +export class ExtendedCommit extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + getRound(): number; + setRound(value: number): void; + + hasBlockId(): boolean; + clearBlockId(): void; + getBlockId(): BlockID | undefined; + setBlockId(value?: BlockID): void; + + clearExtendedSignaturesList(): void; + getExtendedSignaturesList(): Array; + setExtendedSignaturesList(value: Array): void; + addExtendedSignatures(value?: ExtendedCommitSig, index?: number): ExtendedCommitSig; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtendedCommit.AsObject; + static toObject(includeInstance: boolean, msg: ExtendedCommit): ExtendedCommit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtendedCommit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtendedCommit; + static deserializeBinaryFromReader(message: ExtendedCommit, reader: jspb.BinaryReader): ExtendedCommit; +} + +export namespace ExtendedCommit { + export type AsObject = { + height: number, + round: number, + blockId?: BlockID.AsObject, + extendedSignaturesList: Array, + } +} + +export class ExtendedCommitSig extends jspb.Message { + getBlockIdFlag(): tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap]; + setBlockIdFlag(value: tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap]): void; + + getValidatorAddress(): Uint8Array | string; + getValidatorAddress_asU8(): Uint8Array; + getValidatorAddress_asB64(): string; + setValidatorAddress(value: Uint8Array | string): void; + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): void; + + getExtension$(): Uint8Array | string; + getExtension_asU8(): Uint8Array; + getExtension_asB64(): string; + setExtension$(value: Uint8Array | string): void; + + getExtensionSignature(): Uint8Array | string; + getExtensionSignature_asU8(): Uint8Array; + getExtensionSignature_asB64(): string; + setExtensionSignature(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtendedCommitSig.AsObject; + static toObject(includeInstance: boolean, msg: ExtendedCommitSig): ExtendedCommitSig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtendedCommitSig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtendedCommitSig; + static deserializeBinaryFromReader(message: ExtendedCommitSig, reader: jspb.BinaryReader): ExtendedCommitSig; +} + +export namespace ExtendedCommitSig { + export type AsObject = { + blockIdFlag: tendermint_types_validator_pb.BlockIDFlagMap[keyof tendermint_types_validator_pb.BlockIDFlagMap], + validatorAddress: Uint8Array | string, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + signature: Uint8Array | string, + extension: Uint8Array | string, + extensionSignature: Uint8Array | string, + } +} + export class Proposal extends jspb.Message { getType(): SignedMsgTypeMap[keyof SignedMsgTypeMap]; setType(value: SignedMsgTypeMap[keyof SignedMsgTypeMap]): void; @@ -520,15 +618,6 @@ export namespace TxProof { } } -export interface BlockIDFlagMap { - BLOCK_ID_FLAG_UNKNOWN: 0; - BLOCK_ID_FLAG_ABSENT: 1; - BLOCK_ID_FLAG_COMMIT: 2; - BLOCK_ID_FLAG_NIL: 3; -} - -export const BlockIDFlag: BlockIDFlagMap; - export interface SignedMsgTypeMap { SIGNED_MSG_TYPE_UNKNOWN: 0; SIGNED_MSG_TYPE_PREVOTE: 1; diff --git a/proto/tendermint/types/types_pb.js b/codegen/tendermint/types/types_pb.js similarity index 83% rename from proto/tendermint/types/types_pb.js rename to codegen/tendermint/types/types_pb.js index 3081141..0af7b8f 100644 --- a/proto/tendermint/types/types_pb.js +++ b/codegen/tendermint/types/types_pb.js @@ -26,11 +26,12 @@ goog.object.extend(proto, tendermint_version_types_pb); var tendermint_types_validator_pb = require('../../tendermint/types/validator_pb.js'); goog.object.extend(proto, tendermint_types_validator_pb); goog.exportSymbol('proto.tendermint.types.BlockID', null, global); -goog.exportSymbol('proto.tendermint.types.BlockIDFlag', null, global); goog.exportSymbol('proto.tendermint.types.BlockMeta', null, global); goog.exportSymbol('proto.tendermint.types.Commit', null, global); goog.exportSymbol('proto.tendermint.types.CommitSig', null, global); goog.exportSymbol('proto.tendermint.types.Data', null, global); +goog.exportSymbol('proto.tendermint.types.ExtendedCommit', null, global); +goog.exportSymbol('proto.tendermint.types.ExtendedCommitSig', null, global); goog.exportSymbol('proto.tendermint.types.Header', null, global); goog.exportSymbol('proto.tendermint.types.LightBlock', null, global); goog.exportSymbol('proto.tendermint.types.Part', null, global); @@ -208,6 +209,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.tendermint.types.CommitSig.displayName = 'proto.tendermint.types.CommitSig'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.ExtendedCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.ExtendedCommit.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.ExtendedCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ExtendedCommit.displayName = 'proto.tendermint.types.ExtendedCommit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.ExtendedCommitSig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.ExtendedCommitSig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ExtendedCommitSig.displayName = 'proto.tendermint.types.ExtendedCommitSig'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -1955,7 +1998,9 @@ proto.tendermint.types.Vote.toObject = function(includeInstance, msg) { timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), validatorAddress: msg.getValidatorAddress_asB64(), validatorIndex: jspb.Message.getFieldWithDefault(msg, 7, 0), - signature: msg.getSignature_asB64() + signature: msg.getSignature_asB64(), + extension: msg.getExtension_asB64(), + extensionSignature: msg.getExtensionSignature_asB64() }; if (includeInstance) { @@ -2026,6 +2071,14 @@ proto.tendermint.types.Vote.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setSignature(value); break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExtension$(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExtensionSignature(value); + break; default: reader.skipField(); break; @@ -2113,6 +2166,20 @@ proto.tendermint.types.Vote.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getExtension_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } + f = message.getExtensionSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } }; @@ -2346,6 +2413,90 @@ proto.tendermint.types.Vote.prototype.setSignature = function(value) { }; +/** + * optional bytes extension = 9; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Vote.prototype.getExtension$ = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes extension = 9; + * This is a type-conversion wrapper around `getExtension$()` + * @return {string} + */ +proto.tendermint.types.Vote.prototype.getExtension_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExtension$())); +}; + + +/** + * optional bytes extension = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExtension$()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Vote.prototype.getExtension_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExtension$())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setExtension$ = function(value) { + return jspb.Message.setProto3BytesField(this, 9, value); +}; + + +/** + * optional bytes extension_signature = 10; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Vote.prototype.getExtensionSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes extension_signature = 10; + * This is a type-conversion wrapper around `getExtensionSignature()` + * @return {string} + */ +proto.tendermint.types.Vote.prototype.getExtensionSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExtensionSignature())); +}; + + +/** + * optional bytes extension_signature = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExtensionSignature()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Vote.prototype.getExtensionSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExtensionSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setExtensionSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 10, value); +}; + + /** * List of repeated fields within this message type. @@ -2907,6 +3058,13 @@ proto.tendermint.types.CommitSig.prototype.setSignature = function(value) { +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.ExtendedCommit.repeatedFields_ = [4]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2922,8 +3080,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.tendermint.types.Proposal.prototype.toObject = function(opt_includeInstance) { - return proto.tendermint.types.Proposal.toObject(opt_includeInstance, this); +proto.tendermint.types.ExtendedCommit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ExtendedCommit.toObject(opt_includeInstance, this); }; @@ -2932,19 +3090,17 @@ proto.tendermint.types.Proposal.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.tendermint.types.Proposal} msg The msg instance to transform. + * @param {!proto.tendermint.types.ExtendedCommit} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.types.Proposal.toObject = function(includeInstance, msg) { +proto.tendermint.types.ExtendedCommit.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - height: jspb.Message.getFieldWithDefault(msg, 2, 0), - round: jspb.Message.getFieldWithDefault(msg, 3, 0), - polRound: jspb.Message.getFieldWithDefault(msg, 4, 0), + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), - timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - signature: msg.getSignature_asB64() + extendedSignaturesList: jspb.Message.toObjectList(msg.getExtendedSignaturesList(), + proto.tendermint.types.ExtendedCommitSig.toObject, includeInstance) }; if (includeInstance) { @@ -2958,23 +3114,23 @@ proto.tendermint.types.Proposal.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tendermint.types.Proposal} + * @return {!proto.tendermint.types.ExtendedCommit} */ -proto.tendermint.types.Proposal.deserializeBinary = function(bytes) { +proto.tendermint.types.ExtendedCommit.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tendermint.types.Proposal; - return proto.tendermint.types.Proposal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.tendermint.types.ExtendedCommit; + return proto.tendermint.types.ExtendedCommit.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.tendermint.types.Proposal} msg The message object to deserialize into. + * @param {!proto.tendermint.types.ExtendedCommit} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tendermint.types.Proposal} + * @return {!proto.tendermint.types.ExtendedCommit} */ -proto.tendermint.types.Proposal.deserializeBinaryFromReader = function(msg, reader) { +proto.tendermint.types.ExtendedCommit.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2982,34 +3138,22 @@ proto.tendermint.types.Proposal.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.tendermint.types.SignedMsgType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setHeight(value); break; - case 3: + case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setRound(value); break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPolRound(value); - break; - case 5: + case 3: var value = new proto.tendermint.types.BlockID; reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); msg.setBlockId(value); break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTimestamp(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); + case 4: + var value = new proto.tendermint.types.ExtendedCommitSig; + reader.readMessage(value,proto.tendermint.types.ExtendedCommitSig.deserializeBinaryFromReader); + msg.addExtendedSignatures(value); break; default: reader.skipField(); @@ -3024,9 +3168,9 @@ proto.tendermint.types.Proposal.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.tendermint.types.Proposal.prototype.serializeBinary = function() { +proto.tendermint.types.ExtendedCommit.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.tendermint.types.Proposal.serializeBinaryToWriter(this, writer); + proto.tendermint.types.ExtendedCommit.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3034,153 +3178,828 @@ proto.tendermint.types.Proposal.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.tendermint.types.Proposal} message + * @param {!proto.tendermint.types.ExtendedCommit} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.tendermint.types.Proposal.serializeBinaryToWriter = function(message, writer) { +proto.tendermint.types.ExtendedCommit.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } f = message.getHeight(); if (f !== 0) { writer.writeInt64( - 2, + 1, f ); } f = message.getRound(); if (f !== 0) { writer.writeInt32( - 3, - f - ); - } - f = message.getPolRound(); - if (f !== 0) { - writer.writeInt32( - 4, + 2, f ); } f = message.getBlockId(); if (f != null) { writer.writeMessage( - 5, + 3, f, proto.tendermint.types.BlockID.serializeBinaryToWriter ); } - f = message.getTimestamp(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); + f = message.getExtendedSignaturesList(); if (f.length > 0) { - writer.writeBytes( - 7, - f + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.types.ExtendedCommitSig.serializeBinaryToWriter ); } }; /** - * optional SignedMsgType type = 1; - * @return {!proto.tendermint.types.SignedMsgType} + * optional int64 height = 1; + * @return {number} */ -proto.tendermint.types.Proposal.prototype.getType = function() { - return /** @type {!proto.tendermint.types.SignedMsgType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.tendermint.types.ExtendedCommit.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!proto.tendermint.types.SignedMsgType} value - * @return {!proto.tendermint.types.Proposal} returns this + * @param {number} value + * @return {!proto.tendermint.types.ExtendedCommit} returns this */ -proto.tendermint.types.Proposal.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.tendermint.types.ExtendedCommit.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional int64 height = 2; + * optional int32 round = 2; * @return {number} */ -proto.tendermint.types.Proposal.prototype.getHeight = function() { +proto.tendermint.types.ExtendedCommit.prototype.getRound = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.tendermint.types.Proposal} returns this + * @return {!proto.tendermint.types.ExtendedCommit} returns this */ -proto.tendermint.types.Proposal.prototype.setHeight = function(value) { +proto.tendermint.types.ExtendedCommit.prototype.setRound = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int32 round = 3; - * @return {number} + * optional BlockID block_id = 3; + * @return {?proto.tendermint.types.BlockID} */ -proto.tendermint.types.Proposal.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.tendermint.types.ExtendedCommit.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 3)); }; /** - * @param {number} value - * @return {!proto.tendermint.types.Proposal} returns this - */ -proto.tendermint.types.Proposal.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.ExtendedCommit} returns this +*/ +proto.tendermint.types.ExtendedCommit.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * optional int32 pol_round = 4; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ExtendedCommit} returns this */ -proto.tendermint.types.Proposal.prototype.getPolRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.tendermint.types.ExtendedCommit.prototype.clearBlockId = function() { + return this.setBlockId(undefined); }; /** - * @param {number} value - * @return {!proto.tendermint.types.Proposal} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.tendermint.types.Proposal.prototype.setPolRound = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.tendermint.types.ExtendedCommit.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional BlockID block_id = 5; - * @return {?proto.tendermint.types.BlockID} + * repeated ExtendedCommitSig extended_signatures = 4; + * @return {!Array} */ -proto.tendermint.types.Proposal.prototype.getBlockId = function() { - return /** @type{?proto.tendermint.types.BlockID} */ ( - jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 5)); +proto.tendermint.types.ExtendedCommit.prototype.getExtendedSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.ExtendedCommitSig, 4)); }; /** - * @param {?proto.tendermint.types.BlockID|undefined} value - * @return {!proto.tendermint.types.Proposal} returns this + * @param {!Array} value + * @return {!proto.tendermint.types.ExtendedCommit} returns this */ -proto.tendermint.types.Proposal.prototype.setBlockId = function(value) { +proto.tendermint.types.ExtendedCommit.prototype.setExtendedSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.tendermint.types.ExtendedCommitSig=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.ExtendedCommitSig} + */ +proto.tendermint.types.ExtendedCommit.prototype.addExtendedSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.types.ExtendedCommitSig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.ExtendedCommit} returns this + */ +proto.tendermint.types.ExtendedCommit.prototype.clearExtendedSignaturesList = function() { + return this.setExtendedSignaturesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ExtendedCommitSig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.ExtendedCommitSig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ExtendedCommitSig.toObject = function(includeInstance, msg) { + var f, obj = { + blockIdFlag: jspb.Message.getFieldWithDefault(msg, 1, 0), + validatorAddress: msg.getValidatorAddress_asB64(), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + signature: msg.getSignature_asB64(), + extension: msg.getExtension_asB64(), + extensionSignature: msg.getExtensionSignature_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.ExtendedCommitSig} + */ +proto.tendermint.types.ExtendedCommitSig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ExtendedCommitSig; + return proto.tendermint.types.ExtendedCommitSig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ExtendedCommitSig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ExtendedCommitSig} + */ +proto.tendermint.types.ExtendedCommitSig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.types.BlockIDFlag} */ (reader.readEnum()); + msg.setBlockIdFlag(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorAddress(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExtension$(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExtensionSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ExtendedCommitSig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.ExtendedCommitSig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ExtendedCommitSig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockIdFlag(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getValidatorAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getExtension_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getExtensionSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } +}; + + +/** + * optional BlockIDFlag block_id_flag = 1; + * @return {!proto.tendermint.types.BlockIDFlag} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getBlockIdFlag = function() { + return /** @type {!proto.tendermint.types.BlockIDFlag} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.types.BlockIDFlag} value + * @return {!proto.tendermint.types.ExtendedCommitSig} returns this + */ +proto.tendermint.types.ExtendedCommitSig.prototype.setBlockIdFlag = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes validator_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getValidatorAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes validator_address = 2; + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {string} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getValidatorAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorAddress())); +}; + + +/** + * optional bytes validator_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getValidatorAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.ExtendedCommitSig} returns this + */ +proto.tendermint.types.ExtendedCommitSig.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.types.ExtendedCommitSig} returns this +*/ +proto.tendermint.types.ExtendedCommitSig.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ExtendedCommitSig} returns this + */ +proto.tendermint.types.ExtendedCommitSig.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes signature = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes signature = 4; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.ExtendedCommitSig} returns this + */ +proto.tendermint.types.ExtendedCommitSig.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes extension = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getExtension$ = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes extension = 5; + * This is a type-conversion wrapper around `getExtension$()` + * @return {string} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getExtension_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExtension$())); +}; + + +/** + * optional bytes extension = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExtension$()` + * @return {!Uint8Array} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getExtension_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExtension$())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.ExtendedCommitSig} returns this + */ +proto.tendermint.types.ExtendedCommitSig.prototype.setExtension$ = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional bytes extension_signature = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getExtensionSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes extension_signature = 6; + * This is a type-conversion wrapper around `getExtensionSignature()` + * @return {string} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getExtensionSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExtensionSignature())); +}; + + +/** + * optional bytes extension_signature = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExtensionSignature()` + * @return {!Uint8Array} + */ +proto.tendermint.types.ExtendedCommitSig.prototype.getExtensionSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExtensionSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.ExtendedCommitSig} returns this + */ +proto.tendermint.types.ExtendedCommitSig.prototype.setExtensionSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Proposal.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Proposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Proposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Proposal.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + round: jspb.Message.getFieldWithDefault(msg, 3, 0), + polRound: jspb.Message.getFieldWithDefault(msg, 4, 0), + blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + signature: msg.getSignature_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Proposal} + */ +proto.tendermint.types.Proposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Proposal; + return proto.tendermint.types.Proposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Proposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Proposal} + */ +proto.tendermint.types.Proposal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.types.SignedMsgType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPolRound(value); + break; + case 5: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Proposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Proposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Proposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Proposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getPolRound(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } +}; + + +/** + * optional SignedMsgType type = 1; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.types.Proposal.prototype.getType = function() { + return /** @type {!proto.tendermint.types.SignedMsgType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.types.SignedMsgType} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.tendermint.types.Proposal.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 round = 3; + * @return {number} + */ +proto.tendermint.types.Proposal.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 pol_round = 4; + * @return {number} + */ +proto.tendermint.types.Proposal.prototype.getPolRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setPolRound = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional BlockID block_id = 5; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Proposal.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 5)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.Proposal} returns this +*/ +proto.tendermint.types.Proposal.prototype.setBlockId = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; @@ -4207,16 +5026,6 @@ proto.tendermint.types.TxProof.prototype.hasProof = function() { }; -/** - * @enum {number} - */ -proto.tendermint.types.BlockIDFlag = { - BLOCK_ID_FLAG_UNKNOWN: 0, - BLOCK_ID_FLAG_ABSENT: 1, - BLOCK_ID_FLAG_COMMIT: 2, - BLOCK_ID_FLAG_NIL: 3 -}; - /** * @enum {number} */ diff --git a/proto/tendermint/types/types_pb_service.d.ts b/codegen/tendermint/types/types_pb_service.d.ts similarity index 100% rename from proto/tendermint/types/types_pb_service.d.ts rename to codegen/tendermint/types/types_pb_service.d.ts diff --git a/proto/tendermint/types/types_pb_service.js b/codegen/tendermint/types/types_pb_service.js similarity index 100% rename from proto/tendermint/types/types_pb_service.js rename to codegen/tendermint/types/types_pb_service.js diff --git a/codegen/tendermint/types/validator.ts b/codegen/tendermint/types/validator.ts new file mode 100644 index 0000000..feeecc2 --- /dev/null +++ b/codegen/tendermint/types/validator.ts @@ -0,0 +1,364 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/types/validator.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as dependency_2 from "./../crypto/keys"; +import * as pb_1 from "google-protobuf"; +export namespace tendermint.types { + export enum BlockIDFlag { + BLOCK_ID_FLAG_UNKNOWN = 0, + BLOCK_ID_FLAG_ABSENT = 1, + BLOCK_ID_FLAG_COMMIT = 2, + BLOCK_ID_FLAG_NIL = 3 + } + export class ValidatorSet extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + validators?: Validator[]; + proposer?: Validator; + total_voting_power?: number; + }) { + 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 ("validators" in data && data.validators != undefined) { + this.validators = data.validators; + } + if ("proposer" in data && data.proposer != undefined) { + this.proposer = data.proposer; + } + if ("total_voting_power" in data && data.total_voting_power != undefined) { + this.total_voting_power = data.total_voting_power; + } + } + } + get validators() { + return pb_1.Message.getRepeatedWrapperField(this, Validator, 1) as Validator[]; + } + set validators(value: Validator[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get proposer() { + return pb_1.Message.getWrapperField(this, Validator, 2) as Validator; + } + set proposer(value: Validator) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_proposer() { + return pb_1.Message.getField(this, 2) != null; + } + get total_voting_power() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set total_voting_power(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + validators?: ReturnType[]; + proposer?: ReturnType; + total_voting_power?: number; + }): ValidatorSet { + const message = new ValidatorSet({}); + if (data.validators != null) { + message.validators = data.validators.map(item => Validator.fromObject(item)); + } + if (data.proposer != null) { + message.proposer = Validator.fromObject(data.proposer); + } + if (data.total_voting_power != null) { + message.total_voting_power = data.total_voting_power; + } + return message; + } + toObject() { + const data: { + validators?: ReturnType[]; + proposer?: ReturnType; + total_voting_power?: number; + } = {}; + if (this.validators != null) { + data.validators = this.validators.map((item: Validator) => item.toObject()); + } + if (this.proposer != null) { + data.proposer = this.proposer.toObject(); + } + if (this.total_voting_power != null) { + data.total_voting_power = this.total_voting_power; + } + 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.validators.length) + writer.writeRepeatedMessage(1, this.validators, (item: Validator) => item.serialize(writer)); + if (this.has_proposer) + writer.writeMessage(2, this.proposer, () => this.proposer.serialize(writer)); + if (this.total_voting_power != 0) + writer.writeInt64(3, this.total_voting_power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValidatorSet { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidatorSet(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Validator.deserialize(reader), Validator)); + break; + case 2: + reader.readMessage(message.proposer, () => message.proposer = Validator.deserialize(reader)); + break; + case 3: + message.total_voting_power = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ValidatorSet { + return ValidatorSet.deserialize(bytes); + } + } + export class Validator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + address?: Uint8Array; + pub_key?: dependency_2.tendermint.crypto.PublicKey; + voting_power?: number; + proposer_priority?: 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 ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("voting_power" in data && data.voting_power != undefined) { + this.voting_power = data.voting_power; + } + if ("proposer_priority" in data && data.proposer_priority != undefined) { + this.proposer_priority = data.proposer_priority; + } + } + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; + } + set address(value: Uint8Array) { + pb_1.Message.setField(this, 1, value); + } + get pub_key() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.crypto.PublicKey, 2) as dependency_2.tendermint.crypto.PublicKey; + } + set pub_key(value: dependency_2.tendermint.crypto.PublicKey) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_pub_key() { + return pb_1.Message.getField(this, 2) != null; + } + get voting_power() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set voting_power(value: number) { + pb_1.Message.setField(this, 3, value); + } + get proposer_priority() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set proposer_priority(value: number) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + address?: Uint8Array; + pub_key?: ReturnType; + voting_power?: number; + proposer_priority?: number; + }): Validator { + const message = new Validator({}); + if (data.address != null) { + message.address = data.address; + } + if (data.pub_key != null) { + message.pub_key = dependency_2.tendermint.crypto.PublicKey.fromObject(data.pub_key); + } + if (data.voting_power != null) { + message.voting_power = data.voting_power; + } + if (data.proposer_priority != null) { + message.proposer_priority = data.proposer_priority; + } + return message; + } + toObject() { + const data: { + address?: Uint8Array; + pub_key?: ReturnType; + voting_power?: number; + proposer_priority?: number; + } = {}; + if (this.address != null) { + data.address = this.address; + } + if (this.pub_key != null) { + data.pub_key = this.pub_key.toObject(); + } + if (this.voting_power != null) { + data.voting_power = this.voting_power; + } + if (this.proposer_priority != null) { + data.proposer_priority = this.proposer_priority; + } + 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.address.length) + writer.writeBytes(1, this.address); + if (this.has_pub_key) + writer.writeMessage(2, this.pub_key, () => this.pub_key.serialize(writer)); + if (this.voting_power != 0) + writer.writeInt64(3, this.voting_power); + if (this.proposer_priority != 0) + writer.writeInt64(4, this.proposer_priority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Validator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Validator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.address = reader.readBytes(); + break; + case 2: + reader.readMessage(message.pub_key, () => message.pub_key = dependency_2.tendermint.crypto.PublicKey.deserialize(reader)); + break; + case 3: + message.voting_power = reader.readInt64(); + break; + case 4: + message.proposer_priority = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Validator { + return Validator.deserialize(bytes); + } + } + export class SimpleValidator extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pub_key?: dependency_2.tendermint.crypto.PublicKey; + voting_power?: 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 ("pub_key" in data && data.pub_key != undefined) { + this.pub_key = data.pub_key; + } + if ("voting_power" in data && data.voting_power != undefined) { + this.voting_power = data.voting_power; + } + } + } + get pub_key() { + return pb_1.Message.getWrapperField(this, dependency_2.tendermint.crypto.PublicKey, 1) as dependency_2.tendermint.crypto.PublicKey; + } + set pub_key(value: dependency_2.tendermint.crypto.PublicKey) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_pub_key() { + return pb_1.Message.getField(this, 1) != null; + } + get voting_power() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set voting_power(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + pub_key?: ReturnType; + voting_power?: number; + }): SimpleValidator { + const message = new SimpleValidator({}); + if (data.pub_key != null) { + message.pub_key = dependency_2.tendermint.crypto.PublicKey.fromObject(data.pub_key); + } + if (data.voting_power != null) { + message.voting_power = data.voting_power; + } + return message; + } + toObject() { + const data: { + pub_key?: ReturnType; + voting_power?: number; + } = {}; + if (this.pub_key != null) { + data.pub_key = this.pub_key.toObject(); + } + if (this.voting_power != null) { + data.voting_power = this.voting_power; + } + 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_pub_key) + writer.writeMessage(1, this.pub_key, () => this.pub_key.serialize(writer)); + if (this.voting_power != 0) + writer.writeInt64(2, this.voting_power); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SimpleValidator { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SimpleValidator(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.pub_key, () => message.pub_key = dependency_2.tendermint.crypto.PublicKey.deserialize(reader)); + break; + case 2: + message.voting_power = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SimpleValidator { + return SimpleValidator.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/types/validator_pb.d.ts b/codegen/tendermint/types/validator_pb.d.ts similarity index 95% rename from proto/tendermint/types/validator_pb.d.ts rename to codegen/tendermint/types/validator_pb.d.ts index 2b3a179..ff88783 100644 --- a/proto/tendermint/types/validator_pb.d.ts +++ b/codegen/tendermint/types/validator_pb.d.ts @@ -99,3 +99,12 @@ export namespace SimpleValidator { } } +export interface BlockIDFlagMap { + BLOCK_ID_FLAG_UNKNOWN: 0; + BLOCK_ID_FLAG_ABSENT: 1; + BLOCK_ID_FLAG_COMMIT: 2; + BLOCK_ID_FLAG_NIL: 3; +} + +export const BlockIDFlag: BlockIDFlagMap; + diff --git a/proto/tendermint/types/validator_pb.js b/codegen/tendermint/types/validator_pb.js similarity index 98% rename from proto/tendermint/types/validator_pb.js rename to codegen/tendermint/types/validator_pb.js index ca6f0cf..1fbfdb2 100644 --- a/proto/tendermint/types/validator_pb.js +++ b/codegen/tendermint/types/validator_pb.js @@ -19,6 +19,7 @@ var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js'); goog.object.extend(proto, tendermint_crypto_keys_pb); +goog.exportSymbol('proto.tendermint.types.BlockIDFlag', null, global); goog.exportSymbol('proto.tendermint.types.SimpleValidator', null, global); goog.exportSymbol('proto.tendermint.types.Validator', null, global); goog.exportSymbol('proto.tendermint.types.ValidatorSet', null, global); @@ -772,4 +773,14 @@ proto.tendermint.types.SimpleValidator.prototype.setVotingPower = function(value }; +/** + * @enum {number} + */ +proto.tendermint.types.BlockIDFlag = { + BLOCK_ID_FLAG_UNKNOWN: 0, + BLOCK_ID_FLAG_ABSENT: 1, + BLOCK_ID_FLAG_COMMIT: 2, + BLOCK_ID_FLAG_NIL: 3 +}; + goog.object.extend(exports, proto.tendermint.types); diff --git a/proto/tendermint/types/validator_pb_service.d.ts b/codegen/tendermint/types/validator_pb_service.d.ts similarity index 100% rename from proto/tendermint/types/validator_pb_service.d.ts rename to codegen/tendermint/types/validator_pb_service.d.ts diff --git a/proto/tendermint/types/validator_pb_service.js b/codegen/tendermint/types/validator_pb_service.js similarity index 100% rename from proto/tendermint/types/validator_pb_service.js rename to codegen/tendermint/types/validator_pb_service.js diff --git a/codegen/tendermint/version/types.ts b/codegen/tendermint/version/types.ts new file mode 100644 index 0000000..f3a2e28 --- /dev/null +++ b/codegen/tendermint/version/types.ts @@ -0,0 +1,189 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.20.3 + * source: tendermint/version/types.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./../../gogoproto/gogo"; +import * as pb_1 from "google-protobuf"; +export namespace tendermint.version { + export class App extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + protocol?: number; + software?: 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 ("protocol" in data && data.protocol != undefined) { + this.protocol = data.protocol; + } + if ("software" in data && data.software != undefined) { + this.software = data.software; + } + } + } + get protocol() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set protocol(value: number) { + pb_1.Message.setField(this, 1, value); + } + get software() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set software(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + protocol?: number; + software?: string; + }): App { + const message = new App({}); + if (data.protocol != null) { + message.protocol = data.protocol; + } + if (data.software != null) { + message.software = data.software; + } + return message; + } + toObject() { + const data: { + protocol?: number; + software?: string; + } = {}; + if (this.protocol != null) { + data.protocol = this.protocol; + } + if (this.software != null) { + data.software = this.software; + } + 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.protocol != 0) + writer.writeUint64(1, this.protocol); + if (this.software.length) + writer.writeString(2, this.software); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): App { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new App(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.protocol = reader.readUint64(); + break; + case 2: + message.software = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): App { + return App.deserialize(bytes); + } + } + export class Consensus extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + block?: number; + app?: 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 ("block" in data && data.block != undefined) { + this.block = data.block; + } + if ("app" in data && data.app != undefined) { + this.app = data.app; + } + } + } + get block() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set block(value: number) { + pb_1.Message.setField(this, 1, value); + } + get app() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set app(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + block?: number; + app?: number; + }): Consensus { + const message = new Consensus({}); + if (data.block != null) { + message.block = data.block; + } + if (data.app != null) { + message.app = data.app; + } + return message; + } + toObject() { + const data: { + block?: number; + app?: number; + } = {}; + if (this.block != null) { + data.block = this.block; + } + if (this.app != null) { + data.app = this.app; + } + 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.block != 0) + writer.writeUint64(1, this.block); + if (this.app != 0) + writer.writeUint64(2, this.app); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Consensus { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Consensus(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.block = reader.readUint64(); + break; + case 2: + message.app = reader.readUint64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Consensus { + return Consensus.deserialize(bytes); + } + } +} diff --git a/proto/tendermint/version/types_pb.d.ts b/codegen/tendermint/version/types_pb.d.ts similarity index 100% rename from proto/tendermint/version/types_pb.d.ts rename to codegen/tendermint/version/types_pb.d.ts diff --git a/proto/tendermint/version/types_pb.js b/codegen/tendermint/version/types_pb.js similarity index 100% rename from proto/tendermint/version/types_pb.js rename to codegen/tendermint/version/types_pb.js diff --git a/proto/tendermint/version/types_pb_service.d.ts b/codegen/tendermint/version/types_pb_service.d.ts similarity index 100% rename from proto/tendermint/version/types_pb_service.d.ts rename to codegen/tendermint/version/types_pb_service.d.ts diff --git a/proto/tendermint/version/types_pb_service.js b/codegen/tendermint/version/types_pb_service.js similarity index 100% rename from proto/tendermint/version/types_pb_service.js rename to codegen/tendermint/version/types_pb_service.js diff --git a/proto/bandchain/v1/node/query_pb.d.ts b/proto/bandchain/v1/node/query_pb.d.ts deleted file mode 100644 index 4da73d3..0000000 --- a/proto/bandchain/v1/node/query_pb.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -// package: bandchain.v1.node -// file: bandchain/v1/node/query.proto - -import * as jspb from 'google-protobuf' -import * as google_api_annotations_pb from '../../../google/api/annotations_pb' -import * as gogoproto_gogo_pb from '../../../gogoproto/gogo_pb' - -export class ChainIDRequest extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): ChainIDRequest.AsObject - static toObject( - includeInstance: boolean, - msg: ChainIDRequest, - ): ChainIDRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: ChainIDRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): ChainIDRequest - static deserializeBinaryFromReader( - message: ChainIDRequest, - reader: jspb.BinaryReader, - ): ChainIDRequest -} - -export namespace ChainIDRequest { - export type AsObject = {} -} - -export class ChainIDResponse extends jspb.Message { - getChainId(): string - setChainId(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): ChainIDResponse.AsObject - static toObject( - includeInstance: boolean, - msg: ChainIDResponse, - ): ChainIDResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: ChainIDResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): ChainIDResponse - static deserializeBinaryFromReader( - message: ChainIDResponse, - reader: jspb.BinaryReader, - ): ChainIDResponse -} - -export namespace ChainIDResponse { - export type AsObject = { - chainId: string - } -} - -export class EVMValidatorsRequest extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): EVMValidatorsRequest.AsObject - static toObject( - includeInstance: boolean, - msg: EVMValidatorsRequest, - ): EVMValidatorsRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: EVMValidatorsRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): EVMValidatorsRequest - static deserializeBinaryFromReader( - message: EVMValidatorsRequest, - reader: jspb.BinaryReader, - ): EVMValidatorsRequest -} - -export namespace EVMValidatorsRequest { - export type AsObject = {} -} - -export class EVMValidatorsResponse extends jspb.Message { - getBlockHeight(): number - setBlockHeight(value: number): void - - clearValidatorsList(): void - getValidatorsList(): Array - setValidatorsList(value: Array): void - addValidators(value?: ValidatorMinimal, index?: number): ValidatorMinimal - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): EVMValidatorsResponse.AsObject - static toObject( - includeInstance: boolean, - msg: EVMValidatorsResponse, - ): EVMValidatorsResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: EVMValidatorsResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): EVMValidatorsResponse - static deserializeBinaryFromReader( - message: EVMValidatorsResponse, - reader: jspb.BinaryReader, - ): EVMValidatorsResponse -} - -export namespace EVMValidatorsResponse { - export type AsObject = { - blockHeight: number - validatorsList: Array - } -} - -export class ValidatorMinimal extends jspb.Message { - getAddress(): string - setAddress(value: string): void - - getVotingPower(): number - setVotingPower(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): ValidatorMinimal.AsObject - static toObject( - includeInstance: boolean, - msg: ValidatorMinimal, - ): ValidatorMinimal.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: ValidatorMinimal, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): ValidatorMinimal - static deserializeBinaryFromReader( - message: ValidatorMinimal, - reader: jspb.BinaryReader, - ): ValidatorMinimal -} - -export namespace ValidatorMinimal { - export type AsObject = { - address: string - votingPower: number - } -} diff --git a/proto/bandchain/v1/node/query_pb.js b/proto/bandchain/v1/node/query_pb.js deleted file mode 100644 index e09c82b..0000000 --- a/proto/bandchain/v1/node/query_pb.js +++ /dev/null @@ -1,893 +0,0 @@ -// source: bandchain/v1/node/query.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf') -var goog = jspb -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - function () { - return this - }.call(null) || - Function('return this')() - -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') -goog.object.extend(proto, google_api_annotations_pb) -var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') -goog.object.extend(proto, gogoproto_gogo_pb) -goog.exportSymbol('proto.bandchain.v1.node.ChainIDRequest', null, global) -goog.exportSymbol('proto.bandchain.v1.node.ChainIDResponse', null, global) -goog.exportSymbol('proto.bandchain.v1.node.EVMValidatorsRequest', null, global) -goog.exportSymbol('proto.bandchain.v1.node.EVMValidatorsResponse', null, global) -goog.exportSymbol('proto.bandchain.v1.node.ValidatorMinimal', null, global) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.node.ChainIDRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.node.ChainIDRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.node.ChainIDRequest.displayName = - 'proto.bandchain.v1.node.ChainIDRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.node.ChainIDResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.node.ChainIDResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.node.ChainIDResponse.displayName = - 'proto.bandchain.v1.node.ChainIDResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.node.EVMValidatorsRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.node.EVMValidatorsRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.node.EVMValidatorsRequest.displayName = - 'proto.bandchain.v1.node.EVMValidatorsRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.node.EVMValidatorsResponse = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.bandchain.v1.node.EVMValidatorsResponse.repeatedFields_, - null, - ) -} -goog.inherits(proto.bandchain.v1.node.EVMValidatorsResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.node.EVMValidatorsResponse.displayName = - 'proto.bandchain.v1.node.EVMValidatorsResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.node.ValidatorMinimal = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.node.ValidatorMinimal, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.node.ValidatorMinimal.displayName = - 'proto.bandchain.v1.node.ValidatorMinimal' -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.node.ChainIDRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.node.ChainIDRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.node.ChainIDRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.node.ChainIDRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.node.ChainIDRequest} - */ -proto.bandchain.v1.node.ChainIDRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.node.ChainIDRequest() - return proto.bandchain.v1.node.ChainIDRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.node.ChainIDRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.node.ChainIDRequest} - */ -proto.bandchain.v1.node.ChainIDRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.node.ChainIDRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.node.ChainIDRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.node.ChainIDRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.node.ChainIDRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.node.ChainIDResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.node.ChainIDResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.node.ChainIDResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.node.ChainIDResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - chainId: jspb.Message.getFieldWithDefault(msg, 1, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.node.ChainIDResponse} - */ -proto.bandchain.v1.node.ChainIDResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.node.ChainIDResponse() - return proto.bandchain.v1.node.ChainIDResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.node.ChainIDResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.node.ChainIDResponse} - */ -proto.bandchain.v1.node.ChainIDResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setChainId(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.node.ChainIDResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.node.ChainIDResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.node.ChainIDResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.node.ChainIDResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getChainId() - if (f.length > 0) { - writer.writeString(1, f) - } -} - -/** - * optional string chain_id = 1; - * @return {string} - */ -proto.bandchain.v1.node.ChainIDResponse.prototype.getChainId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.bandchain.v1.node.ChainIDResponse} returns this - */ -proto.bandchain.v1.node.ChainIDResponse.prototype.setChainId = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.node.EVMValidatorsRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.node.EVMValidatorsRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.node.EVMValidatorsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.node.EVMValidatorsRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.node.EVMValidatorsRequest} - */ -proto.bandchain.v1.node.EVMValidatorsRequest.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.node.EVMValidatorsRequest() - return proto.bandchain.v1.node.EVMValidatorsRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.node.EVMValidatorsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.node.EVMValidatorsRequest} - */ -proto.bandchain.v1.node.EVMValidatorsRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.node.EVMValidatorsRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.node.EVMValidatorsRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.node.EVMValidatorsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.node.EVMValidatorsRequest.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - } - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.bandchain.v1.node.EVMValidatorsResponse.repeatedFields_ = [2] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.node.EVMValidatorsResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.node.EVMValidatorsResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.node.EVMValidatorsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.node.EVMValidatorsResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), - validatorsList: jspb.Message.toObjectList( - msg.getValidatorsList(), - proto.bandchain.v1.node.ValidatorMinimal.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.node.EVMValidatorsResponse} - */ -proto.bandchain.v1.node.EVMValidatorsResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.node.EVMValidatorsResponse() - return proto.bandchain.v1.node.EVMValidatorsResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.node.EVMValidatorsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.node.EVMValidatorsResponse} - */ -proto.bandchain.v1.node.EVMValidatorsResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()) - msg.setBlockHeight(value) - break - case 2: - var value = new proto.bandchain.v1.node.ValidatorMinimal() - reader.readMessage( - value, - proto.bandchain.v1.node.ValidatorMinimal - .deserializeBinaryFromReader, - ) - msg.addValidators(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.node.EVMValidatorsResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.node.EVMValidatorsResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.node.EVMValidatorsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.node.EVMValidatorsResponse.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getBlockHeight() - if (f !== 0) { - writer.writeInt64(1, f) - } - f = message.getValidatorsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.bandchain.v1.node.ValidatorMinimal.serializeBinaryToWriter, - ) - } - } - -/** - * optional int64 block_height = 1; - * @return {number} - */ -proto.bandchain.v1.node.EVMValidatorsResponse.prototype.getBlockHeight = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.node.EVMValidatorsResponse} returns this - */ -proto.bandchain.v1.node.EVMValidatorsResponse.prototype.setBlockHeight = - function (value) { - return jspb.Message.setProto3IntField(this, 1, value) - } - -/** - * repeated ValidatorMinimal validators = 2; - * @return {!Array} - */ -proto.bandchain.v1.node.EVMValidatorsResponse.prototype.getValidatorsList = - function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - proto.bandchain.v1.node.ValidatorMinimal, - 2, - ) - ) - } - -/** - * @param {!Array} value - * @return {!proto.bandchain.v1.node.EVMValidatorsResponse} returns this - */ -proto.bandchain.v1.node.EVMValidatorsResponse.prototype.setValidatorsList = - function (value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value) - } - -/** - * @param {!proto.bandchain.v1.node.ValidatorMinimal=} opt_value - * @param {number=} opt_index - * @return {!proto.bandchain.v1.node.ValidatorMinimal} - */ -proto.bandchain.v1.node.EVMValidatorsResponse.prototype.addValidators = - function (opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.bandchain.v1.node.ValidatorMinimal, - opt_index, - ) - } - -/** - * Clears the list making it empty but non-null. - * @return {!proto.bandchain.v1.node.EVMValidatorsResponse} returns this - */ -proto.bandchain.v1.node.EVMValidatorsResponse.prototype.clearValidatorsList = - function () { - return this.setValidatorsList([]) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.node.ValidatorMinimal.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.node.ValidatorMinimal.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.node.ValidatorMinimal} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.node.ValidatorMinimal.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ''), - votingPower: jspb.Message.getFieldWithDefault(msg, 2, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.node.ValidatorMinimal} - */ -proto.bandchain.v1.node.ValidatorMinimal.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.node.ValidatorMinimal() - return proto.bandchain.v1.node.ValidatorMinimal.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.node.ValidatorMinimal} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.node.ValidatorMinimal} - */ -proto.bandchain.v1.node.ValidatorMinimal.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setAddress(value) - break - case 2: - var value = /** @type {number} */ (reader.readInt64()) - msg.setVotingPower(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.node.ValidatorMinimal.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.node.ValidatorMinimal.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.node.ValidatorMinimal} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.node.ValidatorMinimal.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getAddress() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getVotingPower() - if (f !== 0) { - writer.writeInt64(2, f) - } -} - -/** - * optional string address = 1; - * @return {string} - */ -proto.bandchain.v1.node.ValidatorMinimal.prototype.getAddress = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.bandchain.v1.node.ValidatorMinimal} returns this - */ -proto.bandchain.v1.node.ValidatorMinimal.prototype.setAddress = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional int64 voting_power = 2; - * @return {number} - */ -proto.bandchain.v1.node.ValidatorMinimal.prototype.getVotingPower = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.node.ValidatorMinimal} returns this - */ -proto.bandchain.v1.node.ValidatorMinimal.prototype.setVotingPower = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -goog.object.extend(exports, proto.bandchain.v1.node) diff --git a/proto/bandchain/v1/node/query_pb_service.d.ts b/proto/bandchain/v1/node/query_pb_service.d.ts deleted file mode 100644 index 63ab5b4..0000000 --- a/proto/bandchain/v1/node/query_pb_service.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -// package: bandchain.v1.node -// file: bandchain/v1/node/query.proto - -import * as bandchain_v1_node_query_pb from '../../../bandchain/v1/node/query_pb' -import { grpc } from '@improbable-eng/grpc-web' - -type ServiceChainID = { - readonly methodName: string - readonly service: typeof Service - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof bandchain_v1_node_query_pb.ChainIDRequest - readonly responseType: typeof bandchain_v1_node_query_pb.ChainIDResponse -} - -type ServiceEVMValidators = { - readonly methodName: string - readonly service: typeof Service - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof bandchain_v1_node_query_pb.EVMValidatorsRequest - readonly responseType: typeof bandchain_v1_node_query_pb.EVMValidatorsResponse -} - -export class Service { - static readonly serviceName: string - static readonly ChainID: ServiceChainID - static readonly EVMValidators: ServiceEVMValidators -} - -export type ServiceError = { - message: string - code: number - metadata: grpc.Metadata -} -export type Status = { details: string; code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void -} -interface ResponseStream { - cancel(): void - on(type: 'data', handler: (message: T) => void): ResponseStream - on(type: 'end', handler: (status?: Status) => void): ResponseStream - on(type: 'status', handler: (status: Status) => void): ResponseStream -} -interface RequestStream { - write(message: T): RequestStream - end(): void - cancel(): void - on(type: 'end', handler: (status?: Status) => void): RequestStream - on(type: 'status', handler: (status: Status) => void): RequestStream -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream - end(): void - cancel(): void - on( - type: 'data', - handler: (message: ResT) => void, - ): BidirectionalStream - on( - type: 'end', - handler: (status?: Status) => void, - ): BidirectionalStream - on( - type: 'status', - handler: (status: Status) => void, - ): BidirectionalStream -} - -export class ServiceClient { - readonly serviceHost: string - - constructor(serviceHost: string, options?: grpc.RpcOptions) - chainID( - requestMessage: bandchain_v1_node_query_pb.ChainIDRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_node_query_pb.ChainIDResponse | null, - ) => void, - ): UnaryResponse - chainID( - requestMessage: bandchain_v1_node_query_pb.ChainIDRequest, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_node_query_pb.ChainIDResponse | null, - ) => void, - ): UnaryResponse - eVMValidators( - requestMessage: bandchain_v1_node_query_pb.EVMValidatorsRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_node_query_pb.EVMValidatorsResponse | null, - ) => void, - ): UnaryResponse - eVMValidators( - requestMessage: bandchain_v1_node_query_pb.EVMValidatorsRequest, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_node_query_pb.EVMValidatorsResponse | null, - ) => void, - ): UnaryResponse -} diff --git a/proto/bandchain/v1/node/query_pb_service.js b/proto/bandchain/v1/node/query_pb_service.js deleted file mode 100644 index 61edf9a..0000000 --- a/proto/bandchain/v1/node/query_pb_service.js +++ /dev/null @@ -1,108 +0,0 @@ -// package: bandchain.v1.node -// file: bandchain/v1/node/query.proto - -var bandchain_v1_node_query_pb = require('../../../bandchain/v1/node/query_pb') -var grpc = require('@improbable-eng/grpc-web').grpc - -var Service = (function () { - function Service() {} - Service.serviceName = 'bandchain.v1.node.Service' - return Service -})() - -Service.ChainID = { - methodName: 'ChainID', - service: Service, - requestStream: false, - responseStream: false, - requestType: bandchain_v1_node_query_pb.ChainIDRequest, - responseType: bandchain_v1_node_query_pb.ChainIDResponse, -} - -Service.EVMValidators = { - methodName: 'EVMValidators', - service: Service, - requestStream: false, - responseStream: false, - requestType: bandchain_v1_node_query_pb.EVMValidatorsRequest, - responseType: bandchain_v1_node_query_pb.EVMValidatorsResponse, -} - -exports.Service = Service - -function ServiceClient(serviceHost, options) { - this.serviceHost = serviceHost - this.options = options || {} -} - -ServiceClient.prototype.chainID = function chainID( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Service.ChainID, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -ServiceClient.prototype.eVMValidators = function eVMValidators( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Service.EVMValidators, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -exports.ServiceClient = ServiceClient diff --git a/proto/bandchain/v1/oracle/proof_pb.d.ts b/proto/bandchain/v1/oracle/proof_pb.d.ts deleted file mode 100644 index 2c3264b..0000000 --- a/proto/bandchain/v1/oracle/proof_pb.d.ts +++ /dev/null @@ -1,859 +0,0 @@ -// package: bandchain.v1.oracle -// file: bandchain/v1/oracle/proof.proto - -import * as jspb from 'google-protobuf' -import * as google_api_annotations_pb from '../../../google/api/annotations_pb' -import * as gogoproto_gogo_pb from '../../../gogoproto/gogo_pb' -import * as oracle_v1_oracle_pb from '../../../oracle/v1/oracle_pb' - -export class ProofRequest extends jspb.Message { - getRequestId(): number - setRequestId(value: number): void - - getHeight(): number - setHeight(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): ProofRequest.AsObject - static toObject( - includeInstance: boolean, - msg: ProofRequest, - ): ProofRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: ProofRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): ProofRequest - static deserializeBinaryFromReader( - message: ProofRequest, - reader: jspb.BinaryReader, - ): ProofRequest -} - -export namespace ProofRequest { - export type AsObject = { - requestId: number - height: number - } -} - -export class ProofResponse extends jspb.Message { - getHeight(): number - setHeight(value: number): void - - hasResult(): boolean - clearResult(): void - getResult(): SingleProofResult | undefined - setResult(value?: SingleProofResult): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): ProofResponse.AsObject - static toObject( - includeInstance: boolean, - msg: ProofResponse, - ): ProofResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: ProofResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): ProofResponse - static deserializeBinaryFromReader( - message: ProofResponse, - reader: jspb.BinaryReader, - ): ProofResponse -} - -export namespace ProofResponse { - export type AsObject = { - height: number - result?: SingleProofResult.AsObject - } -} - -export class MultiProofRequest extends jspb.Message { - clearRequestIdsList(): void - getRequestIdsList(): Array - setRequestIdsList(value: Array): void - addRequestIds(value: number, index?: number): number - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MultiProofRequest.AsObject - static toObject( - includeInstance: boolean, - msg: MultiProofRequest, - ): MultiProofRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MultiProofRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MultiProofRequest - static deserializeBinaryFromReader( - message: MultiProofRequest, - reader: jspb.BinaryReader, - ): MultiProofRequest -} - -export namespace MultiProofRequest { - export type AsObject = { - requestIdsList: Array - } -} - -export class MultiProofResponse extends jspb.Message { - getHeight(): number - setHeight(value: number): void - - hasResult(): boolean - clearResult(): void - getResult(): MultiProofResult | undefined - setResult(value?: MultiProofResult): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MultiProofResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MultiProofResponse, - ): MultiProofResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MultiProofResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MultiProofResponse - static deserializeBinaryFromReader( - message: MultiProofResponse, - reader: jspb.BinaryReader, - ): MultiProofResponse -} - -export namespace MultiProofResponse { - export type AsObject = { - height: number - result?: MultiProofResult.AsObject - } -} - -export class RequestCountProofRequest extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): RequestCountProofRequest.AsObject - static toObject( - includeInstance: boolean, - msg: RequestCountProofRequest, - ): RequestCountProofRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: RequestCountProofRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): RequestCountProofRequest - static deserializeBinaryFromReader( - message: RequestCountProofRequest, - reader: jspb.BinaryReader, - ): RequestCountProofRequest -} - -export namespace RequestCountProofRequest { - export type AsObject = {} -} - -export class RequestCountProofResponse extends jspb.Message { - getHeight(): number - setHeight(value: number): void - - hasResult(): boolean - clearResult(): void - getResult(): CountProofResult | undefined - setResult(value?: CountProofResult): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): RequestCountProofResponse.AsObject - static toObject( - includeInstance: boolean, - msg: RequestCountProofResponse, - ): RequestCountProofResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: RequestCountProofResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): RequestCountProofResponse - static deserializeBinaryFromReader( - message: RequestCountProofResponse, - reader: jspb.BinaryReader, - ): RequestCountProofResponse -} - -export namespace RequestCountProofResponse { - export type AsObject = { - height: number - result?: CountProofResult.AsObject - } -} - -export class SingleProofResult extends jspb.Message { - hasProof(): boolean - clearProof(): void - getProof(): SingleProof | undefined - setProof(value?: SingleProof): void - - getEvmProofBytes(): Uint8Array | string - getEvmProofBytes_asU8(): Uint8Array - getEvmProofBytes_asB64(): string - setEvmProofBytes(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): SingleProofResult.AsObject - static toObject( - includeInstance: boolean, - msg: SingleProofResult, - ): SingleProofResult.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: SingleProofResult, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): SingleProofResult - static deserializeBinaryFromReader( - message: SingleProofResult, - reader: jspb.BinaryReader, - ): SingleProofResult -} - -export namespace SingleProofResult { - export type AsObject = { - proof?: SingleProof.AsObject - evmProofBytes: Uint8Array | string - } -} - -export class MultiProofResult extends jspb.Message { - hasProof(): boolean - clearProof(): void - getProof(): MultiProof | undefined - setProof(value?: MultiProof): void - - getEvmProofBytes(): Uint8Array | string - getEvmProofBytes_asU8(): Uint8Array - getEvmProofBytes_asB64(): string - setEvmProofBytes(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MultiProofResult.AsObject - static toObject( - includeInstance: boolean, - msg: MultiProofResult, - ): MultiProofResult.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MultiProofResult, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MultiProofResult - static deserializeBinaryFromReader( - message: MultiProofResult, - reader: jspb.BinaryReader, - ): MultiProofResult -} - -export namespace MultiProofResult { - export type AsObject = { - proof?: MultiProof.AsObject - evmProofBytes: Uint8Array | string - } -} - -export class CountProofResult extends jspb.Message { - hasProof(): boolean - clearProof(): void - getProof(): CountProof | undefined - setProof(value?: CountProof): void - - getEvmProofBytes(): Uint8Array | string - getEvmProofBytes_asU8(): Uint8Array - getEvmProofBytes_asB64(): string - setEvmProofBytes(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): CountProofResult.AsObject - static toObject( - includeInstance: boolean, - msg: CountProofResult, - ): CountProofResult.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: CountProofResult, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): CountProofResult - static deserializeBinaryFromReader( - message: CountProofResult, - reader: jspb.BinaryReader, - ): CountProofResult -} - -export namespace CountProofResult { - export type AsObject = { - proof?: CountProof.AsObject - evmProofBytes: Uint8Array | string - } -} - -export class SingleProof extends jspb.Message { - getBlockHeight(): number - setBlockHeight(value: number): void - - hasOracleDataProof(): boolean - clearOracleDataProof(): void - getOracleDataProof(): OracleDataProof | undefined - setOracleDataProof(value?: OracleDataProof): void - - hasBlockRelayProof(): boolean - clearBlockRelayProof(): void - getBlockRelayProof(): BlockRelayProof | undefined - setBlockRelayProof(value?: BlockRelayProof): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): SingleProof.AsObject - static toObject( - includeInstance: boolean, - msg: SingleProof, - ): SingleProof.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: SingleProof, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): SingleProof - static deserializeBinaryFromReader( - message: SingleProof, - reader: jspb.BinaryReader, - ): SingleProof -} - -export namespace SingleProof { - export type AsObject = { - blockHeight: number - oracleDataProof?: OracleDataProof.AsObject - blockRelayProof?: BlockRelayProof.AsObject - } -} - -export class MultiProof extends jspb.Message { - getBlockHeight(): number - setBlockHeight(value: number): void - - clearOracleDataMultiProofList(): void - getOracleDataMultiProofList(): Array - setOracleDataMultiProofList(value: Array): void - addOracleDataMultiProof( - value?: OracleDataProof, - index?: number, - ): OracleDataProof - - hasBlockRelayProof(): boolean - clearBlockRelayProof(): void - getBlockRelayProof(): BlockRelayProof | undefined - setBlockRelayProof(value?: BlockRelayProof): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MultiProof.AsObject - static toObject( - includeInstance: boolean, - msg: MultiProof, - ): MultiProof.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MultiProof, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MultiProof - static deserializeBinaryFromReader( - message: MultiProof, - reader: jspb.BinaryReader, - ): MultiProof -} - -export namespace MultiProof { - export type AsObject = { - blockHeight: number - oracleDataMultiProofList: Array - blockRelayProof?: BlockRelayProof.AsObject - } -} - -export class CountProof extends jspb.Message { - getBlockHeight(): number - setBlockHeight(value: number): void - - hasCountProof(): boolean - clearCountProof(): void - getCountProof(): RequestsCountProof | undefined - setCountProof(value?: RequestsCountProof): void - - hasBlockRelayProof(): boolean - clearBlockRelayProof(): void - getBlockRelayProof(): BlockRelayProof | undefined - setBlockRelayProof(value?: BlockRelayProof): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): CountProof.AsObject - static toObject( - includeInstance: boolean, - msg: CountProof, - ): CountProof.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: CountProof, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): CountProof - static deserializeBinaryFromReader( - message: CountProof, - reader: jspb.BinaryReader, - ): CountProof -} - -export namespace CountProof { - export type AsObject = { - blockHeight: number - countProof?: RequestsCountProof.AsObject - blockRelayProof?: BlockRelayProof.AsObject - } -} - -export class OracleDataProof extends jspb.Message { - hasResult(): boolean - clearResult(): void - getResult(): oracle_v1_oracle_pb.Result | undefined - setResult(value?: oracle_v1_oracle_pb.Result): void - - getVersion(): number - setVersion(value: number): void - - clearMerklePathsList(): void - getMerklePathsList(): Array - setMerklePathsList(value: Array): void - addMerklePaths(value?: IAVLMerklePath, index?: number): IAVLMerklePath - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): OracleDataProof.AsObject - static toObject( - includeInstance: boolean, - msg: OracleDataProof, - ): OracleDataProof.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: OracleDataProof, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): OracleDataProof - static deserializeBinaryFromReader( - message: OracleDataProof, - reader: jspb.BinaryReader, - ): OracleDataProof -} - -export namespace OracleDataProof { - export type AsObject = { - result?: oracle_v1_oracle_pb.Result.AsObject - version: number - merklePathsList: Array - } -} - -export class IAVLMerklePath extends jspb.Message { - getIsDataOnRight(): boolean - setIsDataOnRight(value: boolean): void - - getSubtreeHeight(): number - setSubtreeHeight(value: number): void - - getSubtreeSize(): number - setSubtreeSize(value: number): void - - getSubtreeVersion(): number - setSubtreeVersion(value: number): void - - getSiblingHash(): Uint8Array | string - getSiblingHash_asU8(): Uint8Array - getSiblingHash_asB64(): string - setSiblingHash(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): IAVLMerklePath.AsObject - static toObject( - includeInstance: boolean, - msg: IAVLMerklePath, - ): IAVLMerklePath.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: IAVLMerklePath, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): IAVLMerklePath - static deserializeBinaryFromReader( - message: IAVLMerklePath, - reader: jspb.BinaryReader, - ): IAVLMerklePath -} - -export namespace IAVLMerklePath { - export type AsObject = { - isDataOnRight: boolean - subtreeHeight: number - subtreeSize: number - subtreeVersion: number - siblingHash: Uint8Array | string - } -} - -export class BlockRelayProof extends jspb.Message { - hasMultiStoreProof(): boolean - clearMultiStoreProof(): void - getMultiStoreProof(): MultiStoreProof | undefined - setMultiStoreProof(value?: MultiStoreProof): void - - hasBlockHeaderMerkleParts(): boolean - clearBlockHeaderMerkleParts(): void - getBlockHeaderMerkleParts(): BlockHeaderMerkleParts | undefined - setBlockHeaderMerkleParts(value?: BlockHeaderMerkleParts): void - - hasCommonEncodedVotePart(): boolean - clearCommonEncodedVotePart(): void - getCommonEncodedVotePart(): CommonEncodedVotePart | undefined - setCommonEncodedVotePart(value?: CommonEncodedVotePart): void - - clearSignaturesList(): void - getSignaturesList(): Array - setSignaturesList(value: Array): void - addSignatures(value?: TMSignature, index?: number): TMSignature - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): BlockRelayProof.AsObject - static toObject( - includeInstance: boolean, - msg: BlockRelayProof, - ): BlockRelayProof.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: BlockRelayProof, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): BlockRelayProof - static deserializeBinaryFromReader( - message: BlockRelayProof, - reader: jspb.BinaryReader, - ): BlockRelayProof -} - -export namespace BlockRelayProof { - export type AsObject = { - multiStoreProof?: MultiStoreProof.AsObject - blockHeaderMerkleParts?: BlockHeaderMerkleParts.AsObject - commonEncodedVotePart?: CommonEncodedVotePart.AsObject - signaturesList: Array - } -} - -export class MultiStoreProof extends jspb.Message { - getOracleIavlStateHash(): Uint8Array | string - getOracleIavlStateHash_asU8(): Uint8Array - getOracleIavlStateHash_asB64(): string - setOracleIavlStateHash(value: Uint8Array | string): void - - getParamsStoreMerkleHash(): Uint8Array | string - getParamsStoreMerkleHash_asU8(): Uint8Array - getParamsStoreMerkleHash_asB64(): string - setParamsStoreMerkleHash(value: Uint8Array | string): void - - getSlashingToStakingStoresMerkleHash(): Uint8Array | string - getSlashingToStakingStoresMerkleHash_asU8(): Uint8Array - getSlashingToStakingStoresMerkleHash_asB64(): string - setSlashingToStakingStoresMerkleHash(value: Uint8Array | string): void - - getTransferToUpgradeStoresMerkleHash(): Uint8Array | string - getTransferToUpgradeStoresMerkleHash_asU8(): Uint8Array - getTransferToUpgradeStoresMerkleHash_asB64(): string - setTransferToUpgradeStoresMerkleHash(value: Uint8Array | string): void - - getAuthToMintStoresMerkleHash(): Uint8Array | string - getAuthToMintStoresMerkleHash_asU8(): Uint8Array - getAuthToMintStoresMerkleHash_asB64(): string - setAuthToMintStoresMerkleHash(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MultiStoreProof.AsObject - static toObject( - includeInstance: boolean, - msg: MultiStoreProof, - ): MultiStoreProof.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MultiStoreProof, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MultiStoreProof - static deserializeBinaryFromReader( - message: MultiStoreProof, - reader: jspb.BinaryReader, - ): MultiStoreProof -} - -export namespace MultiStoreProof { - export type AsObject = { - oracleIavlStateHash: Uint8Array | string - paramsStoreMerkleHash: Uint8Array | string - slashingToStakingStoresMerkleHash: Uint8Array | string - transferToUpgradeStoresMerkleHash: Uint8Array | string - authToMintStoresMerkleHash: Uint8Array | string - } -} - -export class BlockHeaderMerkleParts extends jspb.Message { - getVersionAndChainIdHash(): Uint8Array | string - getVersionAndChainIdHash_asU8(): Uint8Array - getVersionAndChainIdHash_asB64(): string - setVersionAndChainIdHash(value: Uint8Array | string): void - - getHeight(): number - setHeight(value: number): void - - getTimeSecond(): number - setTimeSecond(value: number): void - - getTimeNanoSecond(): number - setTimeNanoSecond(value: number): void - - getLastBlockIdAndOther(): Uint8Array | string - getLastBlockIdAndOther_asU8(): Uint8Array - getLastBlockIdAndOther_asB64(): string - setLastBlockIdAndOther(value: Uint8Array | string): void - - getNextValidatorHashAndConsensusHash(): Uint8Array | string - getNextValidatorHashAndConsensusHash_asU8(): Uint8Array - getNextValidatorHashAndConsensusHash_asB64(): string - setNextValidatorHashAndConsensusHash(value: Uint8Array | string): void - - getLastResultsHash(): Uint8Array | string - getLastResultsHash_asU8(): Uint8Array - getLastResultsHash_asB64(): string - setLastResultsHash(value: Uint8Array | string): void - - getEvidenceAndProposerHash(): Uint8Array | string - getEvidenceAndProposerHash_asU8(): Uint8Array - getEvidenceAndProposerHash_asB64(): string - setEvidenceAndProposerHash(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): BlockHeaderMerkleParts.AsObject - static toObject( - includeInstance: boolean, - msg: BlockHeaderMerkleParts, - ): BlockHeaderMerkleParts.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: BlockHeaderMerkleParts, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): BlockHeaderMerkleParts - static deserializeBinaryFromReader( - message: BlockHeaderMerkleParts, - reader: jspb.BinaryReader, - ): BlockHeaderMerkleParts -} - -export namespace BlockHeaderMerkleParts { - export type AsObject = { - versionAndChainIdHash: Uint8Array | string - height: number - timeSecond: number - timeNanoSecond: number - lastBlockIdAndOther: Uint8Array | string - nextValidatorHashAndConsensusHash: Uint8Array | string - lastResultsHash: Uint8Array | string - evidenceAndProposerHash: Uint8Array | string - } -} - -export class CommonEncodedVotePart extends jspb.Message { - getSignedDataPrefix(): Uint8Array | string - getSignedDataPrefix_asU8(): Uint8Array - getSignedDataPrefix_asB64(): string - setSignedDataPrefix(value: Uint8Array | string): void - - getSignedDataSuffix(): Uint8Array | string - getSignedDataSuffix_asU8(): Uint8Array - getSignedDataSuffix_asB64(): string - setSignedDataSuffix(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): CommonEncodedVotePart.AsObject - static toObject( - includeInstance: boolean, - msg: CommonEncodedVotePart, - ): CommonEncodedVotePart.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: CommonEncodedVotePart, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): CommonEncodedVotePart - static deserializeBinaryFromReader( - message: CommonEncodedVotePart, - reader: jspb.BinaryReader, - ): CommonEncodedVotePart -} - -export namespace CommonEncodedVotePart { - export type AsObject = { - signedDataPrefix: Uint8Array | string - signedDataSuffix: Uint8Array | string - } -} - -export class TMSignature extends jspb.Message { - getR(): Uint8Array | string - getR_asU8(): Uint8Array - getR_asB64(): string - setR(value: Uint8Array | string): void - - getS(): Uint8Array | string - getS_asU8(): Uint8Array - getS_asB64(): string - setS(value: Uint8Array | string): void - - getV(): number - setV(value: number): void - - getEncodedTimestamp(): Uint8Array | string - getEncodedTimestamp_asU8(): Uint8Array - getEncodedTimestamp_asB64(): string - setEncodedTimestamp(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): TMSignature.AsObject - static toObject( - includeInstance: boolean, - msg: TMSignature, - ): TMSignature.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: TMSignature, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): TMSignature - static deserializeBinaryFromReader( - message: TMSignature, - reader: jspb.BinaryReader, - ): TMSignature -} - -export namespace TMSignature { - export type AsObject = { - r: Uint8Array | string - s: Uint8Array | string - v: number - encodedTimestamp: Uint8Array | string - } -} - -export class RequestsCountProof extends jspb.Message { - getCount(): number - setCount(value: number): void - - getVersion(): number - setVersion(value: number): void - - clearMerklePathsList(): void - getMerklePathsList(): Array - setMerklePathsList(value: Array): void - addMerklePaths(value?: IAVLMerklePath, index?: number): IAVLMerklePath - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): RequestsCountProof.AsObject - static toObject( - includeInstance: boolean, - msg: RequestsCountProof, - ): RequestsCountProof.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: RequestsCountProof, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): RequestsCountProof - static deserializeBinaryFromReader( - message: RequestsCountProof, - reader: jspb.BinaryReader, - ): RequestsCountProof -} - -export namespace RequestsCountProof { - export type AsObject = { - count: number - version: number - merklePathsList: Array - } -} diff --git a/proto/bandchain/v1/oracle/proof_pb.js b/proto/bandchain/v1/oracle/proof_pb.js deleted file mode 100644 index 83b67c9..0000000 --- a/proto/bandchain/v1/oracle/proof_pb.js +++ /dev/null @@ -1,5610 +0,0 @@ -// source: bandchain/v1/oracle/proof.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf') -var goog = jspb -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - function () { - return this - }.call(null) || - Function('return this')() - -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') -goog.object.extend(proto, google_api_annotations_pb) -var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') -goog.object.extend(proto, gogoproto_gogo_pb) -var oracle_v1_oracle_pb = require('../../../oracle/v1/oracle_pb.js') -goog.object.extend(proto, oracle_v1_oracle_pb) -goog.exportSymbol( - 'proto.bandchain.v1.oracle.BlockHeaderMerkleParts', - null, - global, -) -goog.exportSymbol('proto.bandchain.v1.oracle.BlockRelayProof', null, global) -goog.exportSymbol( - 'proto.bandchain.v1.oracle.CommonEncodedVotePart', - null, - global, -) -goog.exportSymbol('proto.bandchain.v1.oracle.CountProof', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.CountProofResult', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.IAVLMerklePath', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.MultiProof', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.MultiProofRequest', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.MultiProofResponse', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.MultiProofResult', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.MultiStoreProof', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.OracleDataProof', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.ProofRequest', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.ProofResponse', null, global) -goog.exportSymbol( - 'proto.bandchain.v1.oracle.RequestCountProofRequest', - null, - global, -) -goog.exportSymbol( - 'proto.bandchain.v1.oracle.RequestCountProofResponse', - null, - global, -) -goog.exportSymbol('proto.bandchain.v1.oracle.RequestsCountProof', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.SingleProof', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.SingleProofResult', null, global) -goog.exportSymbol('proto.bandchain.v1.oracle.TMSignature', null, global) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.ProofRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.ProofRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.ProofRequest.displayName = - 'proto.bandchain.v1.oracle.ProofRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.ProofResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.ProofResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.ProofResponse.displayName = - 'proto.bandchain.v1.oracle.ProofResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.MultiProofRequest = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.bandchain.v1.oracle.MultiProofRequest.repeatedFields_, - null, - ) -} -goog.inherits(proto.bandchain.v1.oracle.MultiProofRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.MultiProofRequest.displayName = - 'proto.bandchain.v1.oracle.MultiProofRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.MultiProofResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.MultiProofResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.MultiProofResponse.displayName = - 'proto.bandchain.v1.oracle.MultiProofResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.RequestCountProofRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.RequestCountProofRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.RequestCountProofRequest.displayName = - 'proto.bandchain.v1.oracle.RequestCountProofRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.RequestCountProofResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.RequestCountProofResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.RequestCountProofResponse.displayName = - 'proto.bandchain.v1.oracle.RequestCountProofResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.SingleProofResult = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.SingleProofResult, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.SingleProofResult.displayName = - 'proto.bandchain.v1.oracle.SingleProofResult' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.MultiProofResult = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.MultiProofResult, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.MultiProofResult.displayName = - 'proto.bandchain.v1.oracle.MultiProofResult' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.CountProofResult = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.CountProofResult, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.CountProofResult.displayName = - 'proto.bandchain.v1.oracle.CountProofResult' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.SingleProof = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.SingleProof, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.SingleProof.displayName = - 'proto.bandchain.v1.oracle.SingleProof' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.MultiProof = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.bandchain.v1.oracle.MultiProof.repeatedFields_, - null, - ) -} -goog.inherits(proto.bandchain.v1.oracle.MultiProof, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.MultiProof.displayName = - 'proto.bandchain.v1.oracle.MultiProof' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.CountProof = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.CountProof, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.CountProof.displayName = - 'proto.bandchain.v1.oracle.CountProof' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.OracleDataProof = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.bandchain.v1.oracle.OracleDataProof.repeatedFields_, - null, - ) -} -goog.inherits(proto.bandchain.v1.oracle.OracleDataProof, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.OracleDataProof.displayName = - 'proto.bandchain.v1.oracle.OracleDataProof' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.IAVLMerklePath = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.IAVLMerklePath, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.IAVLMerklePath.displayName = - 'proto.bandchain.v1.oracle.IAVLMerklePath' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.BlockRelayProof = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.bandchain.v1.oracle.BlockRelayProof.repeatedFields_, - null, - ) -} -goog.inherits(proto.bandchain.v1.oracle.BlockRelayProof, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.BlockRelayProof.displayName = - 'proto.bandchain.v1.oracle.BlockRelayProof' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.MultiStoreProof = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.MultiStoreProof, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.MultiStoreProof.displayName = - 'proto.bandchain.v1.oracle.MultiStoreProof' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.BlockHeaderMerkleParts, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.BlockHeaderMerkleParts.displayName = - 'proto.bandchain.v1.oracle.BlockHeaderMerkleParts' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.CommonEncodedVotePart, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.CommonEncodedVotePart.displayName = - 'proto.bandchain.v1.oracle.CommonEncodedVotePart' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.TMSignature = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.bandchain.v1.oracle.TMSignature, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.TMSignature.displayName = - 'proto.bandchain.v1.oracle.TMSignature' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bandchain.v1.oracle.RequestsCountProof = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.bandchain.v1.oracle.RequestsCountProof.repeatedFields_, - null, - ) -} -goog.inherits(proto.bandchain.v1.oracle.RequestsCountProof, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bandchain.v1.oracle.RequestsCountProof.displayName = - 'proto.bandchain.v1.oracle.RequestsCountProof' -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.ProofRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.ProofRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.ProofRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.ProofRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - requestId: jspb.Message.getFieldWithDefault(msg, 1, 0), - height: jspb.Message.getFieldWithDefault(msg, 2, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.ProofRequest} - */ -proto.bandchain.v1.oracle.ProofRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.ProofRequest() - return proto.bandchain.v1.oracle.ProofRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.ProofRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.ProofRequest} - */ -proto.bandchain.v1.oracle.ProofRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - case 2: - var value = /** @type {number} */ (reader.readInt64()) - msg.setHeight(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.ProofRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.ProofRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.ProofRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.ProofRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getHeight() - if (f !== 0) { - writer.writeInt64(2, f) - } -} - -/** - * optional uint64 request_id = 1; - * @return {number} - */ -proto.bandchain.v1.oracle.ProofRequest.prototype.getRequestId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.ProofRequest} returns this - */ -proto.bandchain.v1.oracle.ProofRequest.prototype.setRequestId = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional int64 height = 2; - * @return {number} - */ -proto.bandchain.v1.oracle.ProofRequest.prototype.getHeight = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.ProofRequest} returns this - */ -proto.bandchain.v1.oracle.ProofRequest.prototype.setHeight = function (value) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.ProofResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.ProofResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.ProofResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.ProofResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - result: - (f = msg.getResult()) && - proto.bandchain.v1.oracle.SingleProofResult.toObject( - includeInstance, - f, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.ProofResponse} - */ -proto.bandchain.v1.oracle.ProofResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.ProofResponse() - return proto.bandchain.v1.oracle.ProofResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.ProofResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.ProofResponse} - */ -proto.bandchain.v1.oracle.ProofResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()) - msg.setHeight(value) - break - case 2: - var value = new proto.bandchain.v1.oracle.SingleProofResult() - reader.readMessage( - value, - proto.bandchain.v1.oracle.SingleProofResult - .deserializeBinaryFromReader, - ) - msg.setResult(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.ProofResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.ProofResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.ProofResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.ProofResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getHeight() - if (f !== 0) { - writer.writeInt64(1, f) - } - f = message.getResult() - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bandchain.v1.oracle.SingleProofResult.serializeBinaryToWriter, - ) - } -} - -/** - * optional int64 height = 1; - * @return {number} - */ -proto.bandchain.v1.oracle.ProofResponse.prototype.getHeight = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.ProofResponse} returns this - */ -proto.bandchain.v1.oracle.ProofResponse.prototype.setHeight = function (value) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional SingleProofResult result = 2; - * @return {?proto.bandchain.v1.oracle.SingleProofResult} - */ -proto.bandchain.v1.oracle.ProofResponse.prototype.getResult = function () { - return /** @type{?proto.bandchain.v1.oracle.SingleProofResult} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.SingleProofResult, - 2, - ) - ) -} - -/** - * @param {?proto.bandchain.v1.oracle.SingleProofResult|undefined} value - * @return {!proto.bandchain.v1.oracle.ProofResponse} returns this - */ -proto.bandchain.v1.oracle.ProofResponse.prototype.setResult = function (value) { - return jspb.Message.setWrapperField(this, 2, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.ProofResponse} returns this - */ -proto.bandchain.v1.oracle.ProofResponse.prototype.clearResult = function () { - return this.setResult(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.ProofResponse.prototype.hasResult = function () { - return jspb.Message.getField(this, 2) != null -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.bandchain.v1.oracle.MultiProofRequest.repeatedFields_ = [1] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.MultiProofRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.MultiProofRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.MultiProofRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.MultiProofRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - requestIdsList: - (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.MultiProofRequest} - */ -proto.bandchain.v1.oracle.MultiProofRequest.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.MultiProofRequest() - return proto.bandchain.v1.oracle.MultiProofRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.MultiProofRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.MultiProofRequest} - */ -proto.bandchain.v1.oracle.MultiProofRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var values = /** @type {!Array} */ ( - reader.isDelimited() - ? reader.readPackedUint64() - : [reader.readUint64()] - ) - for (var i = 0; i < values.length; i++) { - msg.addRequestIds(values[i]) - } - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiProofRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.MultiProofRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.MultiProofRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.MultiProofRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getRequestIdsList() - if (f.length > 0) { - writer.writePackedUint64(1, f) - } -} - -/** - * repeated uint64 request_ids = 1; - * @return {!Array} - */ -proto.bandchain.v1.oracle.MultiProofRequest.prototype.getRequestIdsList = - function () { - return /** @type {!Array} */ ( - jspb.Message.getRepeatedField(this, 1) - ) - } - -/** - * @param {!Array} value - * @return {!proto.bandchain.v1.oracle.MultiProofRequest} returns this - */ -proto.bandchain.v1.oracle.MultiProofRequest.prototype.setRequestIdsList = - function (value) { - return jspb.Message.setField(this, 1, value || []) - } - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.bandchain.v1.oracle.MultiProofRequest} returns this - */ -proto.bandchain.v1.oracle.MultiProofRequest.prototype.addRequestIds = function ( - value, - opt_index, -) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.bandchain.v1.oracle.MultiProofRequest} returns this - */ -proto.bandchain.v1.oracle.MultiProofRequest.prototype.clearRequestIdsList = - function () { - return this.setRequestIdsList([]) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.MultiProofResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.MultiProofResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.MultiProofResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.MultiProofResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - result: - (f = msg.getResult()) && - proto.bandchain.v1.oracle.MultiProofResult.toObject( - includeInstance, - f, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.MultiProofResponse} - */ -proto.bandchain.v1.oracle.MultiProofResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.MultiProofResponse() - return proto.bandchain.v1.oracle.MultiProofResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.MultiProofResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.MultiProofResponse} - */ -proto.bandchain.v1.oracle.MultiProofResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()) - msg.setHeight(value) - break - case 2: - var value = new proto.bandchain.v1.oracle.MultiProofResult() - reader.readMessage( - value, - proto.bandchain.v1.oracle.MultiProofResult - .deserializeBinaryFromReader, - ) - msg.setResult(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiProofResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.MultiProofResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.MultiProofResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.MultiProofResponse.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getHeight() - if (f !== 0) { - writer.writeInt64(1, f) - } - f = message.getResult() - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bandchain.v1.oracle.MultiProofResult.serializeBinaryToWriter, - ) - } - } - -/** - * optional int64 height = 1; - * @return {number} - */ -proto.bandchain.v1.oracle.MultiProofResponse.prototype.getHeight = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.MultiProofResponse} returns this - */ -proto.bandchain.v1.oracle.MultiProofResponse.prototype.setHeight = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional MultiProofResult result = 2; - * @return {?proto.bandchain.v1.oracle.MultiProofResult} - */ -proto.bandchain.v1.oracle.MultiProofResponse.prototype.getResult = function () { - return /** @type{?proto.bandchain.v1.oracle.MultiProofResult} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.MultiProofResult, - 2, - ) - ) -} - -/** - * @param {?proto.bandchain.v1.oracle.MultiProofResult|undefined} value - * @return {!proto.bandchain.v1.oracle.MultiProofResponse} returns this - */ -proto.bandchain.v1.oracle.MultiProofResponse.prototype.setResult = function ( - value, -) { - return jspb.Message.setWrapperField(this, 2, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.MultiProofResponse} returns this - */ -proto.bandchain.v1.oracle.MultiProofResponse.prototype.clearResult = - function () { - return this.setResult(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.MultiProofResponse.prototype.hasResult = function () { - return jspb.Message.getField(this, 2) != null -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.RequestCountProofRequest.prototype.toObject = - function (opt_includeInstance) { - return proto.bandchain.v1.oracle.RequestCountProofRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.RequestCountProofRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.RequestCountProofRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.RequestCountProofRequest} - */ -proto.bandchain.v1.oracle.RequestCountProofRequest.deserializeBinary = - function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.RequestCountProofRequest() - return proto.bandchain.v1.oracle.RequestCountProofRequest.deserializeBinaryFromReader( - msg, - reader, - ) - } - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.RequestCountProofRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.RequestCountProofRequest} - */ -proto.bandchain.v1.oracle.RequestCountProofRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.RequestCountProofRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.RequestCountProofRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.RequestCountProofRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.RequestCountProofRequest.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.RequestCountProofResponse.prototype.toObject = - function (opt_includeInstance) { - return proto.bandchain.v1.oracle.RequestCountProofResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.RequestCountProofResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.RequestCountProofResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - result: - (f = msg.getResult()) && - proto.bandchain.v1.oracle.CountProofResult.toObject( - includeInstance, - f, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.RequestCountProofResponse} - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.deserializeBinary = - function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.RequestCountProofResponse() - return proto.bandchain.v1.oracle.RequestCountProofResponse.deserializeBinaryFromReader( - msg, - reader, - ) - } - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.RequestCountProofResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.RequestCountProofResponse} - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()) - msg.setHeight(value) - break - case 2: - var value = new proto.bandchain.v1.oracle.CountProofResult() - reader.readMessage( - value, - proto.bandchain.v1.oracle.CountProofResult - .deserializeBinaryFromReader, - ) - msg.setResult(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.RequestCountProofResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.RequestCountProofResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getHeight() - if (f !== 0) { - writer.writeInt64(1, f) - } - f = message.getResult() - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bandchain.v1.oracle.CountProofResult.serializeBinaryToWriter, - ) - } - } - -/** - * optional int64 height = 1; - * @return {number} - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.prototype.getHeight = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.RequestCountProofResponse} returns this - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.prototype.setHeight = - function (value) { - return jspb.Message.setProto3IntField(this, 1, value) - } - -/** - * optional CountProofResult result = 2; - * @return {?proto.bandchain.v1.oracle.CountProofResult} - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.prototype.getResult = - function () { - return /** @type{?proto.bandchain.v1.oracle.CountProofResult} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.CountProofResult, - 2, - ) - ) - } - -/** - * @param {?proto.bandchain.v1.oracle.CountProofResult|undefined} value - * @return {!proto.bandchain.v1.oracle.RequestCountProofResponse} returns this - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.prototype.setResult = - function (value) { - return jspb.Message.setWrapperField(this, 2, value) - } - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.RequestCountProofResponse} returns this - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.prototype.clearResult = - function () { - return this.setResult(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.RequestCountProofResponse.prototype.hasResult = - function () { - return jspb.Message.getField(this, 2) != null - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.SingleProofResult.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.SingleProofResult.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.SingleProofResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.SingleProofResult.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - proof: - (f = msg.getProof()) && - proto.bandchain.v1.oracle.SingleProof.toObject(includeInstance, f), - evmProofBytes: msg.getEvmProofBytes_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.SingleProofResult} - */ -proto.bandchain.v1.oracle.SingleProofResult.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.SingleProofResult() - return proto.bandchain.v1.oracle.SingleProofResult.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.SingleProofResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.SingleProofResult} - */ -proto.bandchain.v1.oracle.SingleProofResult.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new proto.bandchain.v1.oracle.SingleProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.SingleProof.deserializeBinaryFromReader, - ) - msg.setProof(value) - break - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setEvmProofBytes(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.SingleProofResult.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.SingleProofResult.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.SingleProofResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.SingleProofResult.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getProof() - if (f != null) { - writer.writeMessage( - 1, - f, - proto.bandchain.v1.oracle.SingleProof.serializeBinaryToWriter, - ) - } - f = message.getEvmProofBytes_asU8() - if (f.length > 0) { - writer.writeBytes(2, f) - } -} - -/** - * optional SingleProof proof = 1; - * @return {?proto.bandchain.v1.oracle.SingleProof} - */ -proto.bandchain.v1.oracle.SingleProofResult.prototype.getProof = function () { - return /** @type{?proto.bandchain.v1.oracle.SingleProof} */ ( - jspb.Message.getWrapperField(this, proto.bandchain.v1.oracle.SingleProof, 1) - ) -} - -/** - * @param {?proto.bandchain.v1.oracle.SingleProof|undefined} value - * @return {!proto.bandchain.v1.oracle.SingleProofResult} returns this - */ -proto.bandchain.v1.oracle.SingleProofResult.prototype.setProof = function ( - value, -) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.SingleProofResult} returns this - */ -proto.bandchain.v1.oracle.SingleProofResult.prototype.clearProof = function () { - return this.setProof(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.SingleProofResult.prototype.hasProof = function () { - return jspb.Message.getField(this, 1) != null -} - -/** - * optional bytes evm_proof_bytes = 2; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.SingleProofResult.prototype.getEvmProofBytes = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 2, '') - ) - } - -/** - * optional bytes evm_proof_bytes = 2; - * This is a type-conversion wrapper around `getEvmProofBytes()` - * @return {string} - */ -proto.bandchain.v1.oracle.SingleProofResult.prototype.getEvmProofBytes_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getEvmProofBytes()) - ) - } - -/** - * optional bytes evm_proof_bytes = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEvmProofBytes()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.SingleProofResult.prototype.getEvmProofBytes_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getEvmProofBytes()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.SingleProofResult} returns this - */ -proto.bandchain.v1.oracle.SingleProofResult.prototype.setEvmProofBytes = - function (value) { - return jspb.Message.setProto3BytesField(this, 2, value) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.MultiProofResult.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.MultiProofResult.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.MultiProofResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.MultiProofResult.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - proof: - (f = msg.getProof()) && - proto.bandchain.v1.oracle.MultiProof.toObject(includeInstance, f), - evmProofBytes: msg.getEvmProofBytes_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.MultiProofResult} - */ -proto.bandchain.v1.oracle.MultiProofResult.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.MultiProofResult() - return proto.bandchain.v1.oracle.MultiProofResult.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.MultiProofResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.MultiProofResult} - */ -proto.bandchain.v1.oracle.MultiProofResult.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new proto.bandchain.v1.oracle.MultiProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.MultiProof.deserializeBinaryFromReader, - ) - msg.setProof(value) - break - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setEvmProofBytes(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiProofResult.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.MultiProofResult.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.MultiProofResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.MultiProofResult.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getProof() - if (f != null) { - writer.writeMessage( - 1, - f, - proto.bandchain.v1.oracle.MultiProof.serializeBinaryToWriter, - ) - } - f = message.getEvmProofBytes_asU8() - if (f.length > 0) { - writer.writeBytes(2, f) - } -} - -/** - * optional MultiProof proof = 1; - * @return {?proto.bandchain.v1.oracle.MultiProof} - */ -proto.bandchain.v1.oracle.MultiProofResult.prototype.getProof = function () { - return /** @type{?proto.bandchain.v1.oracle.MultiProof} */ ( - jspb.Message.getWrapperField(this, proto.bandchain.v1.oracle.MultiProof, 1) - ) -} - -/** - * @param {?proto.bandchain.v1.oracle.MultiProof|undefined} value - * @return {!proto.bandchain.v1.oracle.MultiProofResult} returns this - */ -proto.bandchain.v1.oracle.MultiProofResult.prototype.setProof = function ( - value, -) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.MultiProofResult} returns this - */ -proto.bandchain.v1.oracle.MultiProofResult.prototype.clearProof = function () { - return this.setProof(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.MultiProofResult.prototype.hasProof = function () { - return jspb.Message.getField(this, 1) != null -} - -/** - * optional bytes evm_proof_bytes = 2; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.MultiProofResult.prototype.getEvmProofBytes = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 2, '') - ) - } - -/** - * optional bytes evm_proof_bytes = 2; - * This is a type-conversion wrapper around `getEvmProofBytes()` - * @return {string} - */ -proto.bandchain.v1.oracle.MultiProofResult.prototype.getEvmProofBytes_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getEvmProofBytes()) - ) - } - -/** - * optional bytes evm_proof_bytes = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEvmProofBytes()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiProofResult.prototype.getEvmProofBytes_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getEvmProofBytes()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.MultiProofResult} returns this - */ -proto.bandchain.v1.oracle.MultiProofResult.prototype.setEvmProofBytes = - function (value) { - return jspb.Message.setProto3BytesField(this, 2, value) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.CountProofResult.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.CountProofResult.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.CountProofResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.CountProofResult.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - proof: - (f = msg.getProof()) && - proto.bandchain.v1.oracle.CountProof.toObject(includeInstance, f), - evmProofBytes: msg.getEvmProofBytes_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.CountProofResult} - */ -proto.bandchain.v1.oracle.CountProofResult.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.CountProofResult() - return proto.bandchain.v1.oracle.CountProofResult.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.CountProofResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.CountProofResult} - */ -proto.bandchain.v1.oracle.CountProofResult.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new proto.bandchain.v1.oracle.CountProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.CountProof.deserializeBinaryFromReader, - ) - msg.setProof(value) - break - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setEvmProofBytes(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.CountProofResult.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.CountProofResult.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.CountProofResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.CountProofResult.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getProof() - if (f != null) { - writer.writeMessage( - 1, - f, - proto.bandchain.v1.oracle.CountProof.serializeBinaryToWriter, - ) - } - f = message.getEvmProofBytes_asU8() - if (f.length > 0) { - writer.writeBytes(2, f) - } -} - -/** - * optional CountProof proof = 1; - * @return {?proto.bandchain.v1.oracle.CountProof} - */ -proto.bandchain.v1.oracle.CountProofResult.prototype.getProof = function () { - return /** @type{?proto.bandchain.v1.oracle.CountProof} */ ( - jspb.Message.getWrapperField(this, proto.bandchain.v1.oracle.CountProof, 1) - ) -} - -/** - * @param {?proto.bandchain.v1.oracle.CountProof|undefined} value - * @return {!proto.bandchain.v1.oracle.CountProofResult} returns this - */ -proto.bandchain.v1.oracle.CountProofResult.prototype.setProof = function ( - value, -) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.CountProofResult} returns this - */ -proto.bandchain.v1.oracle.CountProofResult.prototype.clearProof = function () { - return this.setProof(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.CountProofResult.prototype.hasProof = function () { - return jspb.Message.getField(this, 1) != null -} - -/** - * optional bytes evm_proof_bytes = 2; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.CountProofResult.prototype.getEvmProofBytes = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 2, '') - ) - } - -/** - * optional bytes evm_proof_bytes = 2; - * This is a type-conversion wrapper around `getEvmProofBytes()` - * @return {string} - */ -proto.bandchain.v1.oracle.CountProofResult.prototype.getEvmProofBytes_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getEvmProofBytes()) - ) - } - -/** - * optional bytes evm_proof_bytes = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEvmProofBytes()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.CountProofResult.prototype.getEvmProofBytes_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getEvmProofBytes()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.CountProofResult} returns this - */ -proto.bandchain.v1.oracle.CountProofResult.prototype.setEvmProofBytes = - function (value) { - return jspb.Message.setProto3BytesField(this, 2, value) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.SingleProof.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.SingleProof.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.SingleProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.SingleProof.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), - oracleDataProof: - (f = msg.getOracleDataProof()) && - proto.bandchain.v1.oracle.OracleDataProof.toObject( - includeInstance, - f, - ), - blockRelayProof: - (f = msg.getBlockRelayProof()) && - proto.bandchain.v1.oracle.BlockRelayProof.toObject( - includeInstance, - f, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.SingleProof} - */ -proto.bandchain.v1.oracle.SingleProof.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.SingleProof() - return proto.bandchain.v1.oracle.SingleProof.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.SingleProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.SingleProof} - */ -proto.bandchain.v1.oracle.SingleProof.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setBlockHeight(value) - break - case 2: - var value = new proto.bandchain.v1.oracle.OracleDataProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.OracleDataProof.deserializeBinaryFromReader, - ) - msg.setOracleDataProof(value) - break - case 3: - var value = new proto.bandchain.v1.oracle.BlockRelayProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.BlockRelayProof.deserializeBinaryFromReader, - ) - msg.setBlockRelayProof(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.SingleProof.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.SingleProof.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.SingleProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.SingleProof.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getBlockHeight() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getOracleDataProof() - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bandchain.v1.oracle.OracleDataProof.serializeBinaryToWriter, - ) - } - f = message.getBlockRelayProof() - if (f != null) { - writer.writeMessage( - 3, - f, - proto.bandchain.v1.oracle.BlockRelayProof.serializeBinaryToWriter, - ) - } -} - -/** - * optional uint64 block_height = 1; - * @return {number} - */ -proto.bandchain.v1.oracle.SingleProof.prototype.getBlockHeight = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.SingleProof} returns this - */ -proto.bandchain.v1.oracle.SingleProof.prototype.setBlockHeight = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional OracleDataProof oracle_data_proof = 2; - * @return {?proto.bandchain.v1.oracle.OracleDataProof} - */ -proto.bandchain.v1.oracle.SingleProof.prototype.getOracleDataProof = - function () { - return /** @type{?proto.bandchain.v1.oracle.OracleDataProof} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.OracleDataProof, - 2, - ) - ) - } - -/** - * @param {?proto.bandchain.v1.oracle.OracleDataProof|undefined} value - * @return {!proto.bandchain.v1.oracle.SingleProof} returns this - */ -proto.bandchain.v1.oracle.SingleProof.prototype.setOracleDataProof = function ( - value, -) { - return jspb.Message.setWrapperField(this, 2, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.SingleProof} returns this - */ -proto.bandchain.v1.oracle.SingleProof.prototype.clearOracleDataProof = - function () { - return this.setOracleDataProof(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.SingleProof.prototype.hasOracleDataProof = - function () { - return jspb.Message.getField(this, 2) != null - } - -/** - * optional BlockRelayProof block_relay_proof = 3; - * @return {?proto.bandchain.v1.oracle.BlockRelayProof} - */ -proto.bandchain.v1.oracle.SingleProof.prototype.getBlockRelayProof = - function () { - return /** @type{?proto.bandchain.v1.oracle.BlockRelayProof} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.BlockRelayProof, - 3, - ) - ) - } - -/** - * @param {?proto.bandchain.v1.oracle.BlockRelayProof|undefined} value - * @return {!proto.bandchain.v1.oracle.SingleProof} returns this - */ -proto.bandchain.v1.oracle.SingleProof.prototype.setBlockRelayProof = function ( - value, -) { - return jspb.Message.setWrapperField(this, 3, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.SingleProof} returns this - */ -proto.bandchain.v1.oracle.SingleProof.prototype.clearBlockRelayProof = - function () { - return this.setBlockRelayProof(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.SingleProof.prototype.hasBlockRelayProof = - function () { - return jspb.Message.getField(this, 3) != null - } - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.bandchain.v1.oracle.MultiProof.repeatedFields_ = [2] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.MultiProof.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.MultiProof.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.MultiProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.MultiProof.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), - oracleDataMultiProofList: jspb.Message.toObjectList( - msg.getOracleDataMultiProofList(), - proto.bandchain.v1.oracle.OracleDataProof.toObject, - includeInstance, - ), - blockRelayProof: - (f = msg.getBlockRelayProof()) && - proto.bandchain.v1.oracle.BlockRelayProof.toObject( - includeInstance, - f, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.MultiProof} - */ -proto.bandchain.v1.oracle.MultiProof.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.MultiProof() - return proto.bandchain.v1.oracle.MultiProof.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.MultiProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.MultiProof} - */ -proto.bandchain.v1.oracle.MultiProof.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setBlockHeight(value) - break - case 2: - var value = new proto.bandchain.v1.oracle.OracleDataProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.OracleDataProof.deserializeBinaryFromReader, - ) - msg.addOracleDataMultiProof(value) - break - case 3: - var value = new proto.bandchain.v1.oracle.BlockRelayProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.BlockRelayProof.deserializeBinaryFromReader, - ) - msg.setBlockRelayProof(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiProof.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.MultiProof.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.MultiProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.MultiProof.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getBlockHeight() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getOracleDataMultiProofList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.bandchain.v1.oracle.OracleDataProof.serializeBinaryToWriter, - ) - } - f = message.getBlockRelayProof() - if (f != null) { - writer.writeMessage( - 3, - f, - proto.bandchain.v1.oracle.BlockRelayProof.serializeBinaryToWriter, - ) - } -} - -/** - * optional uint64 block_height = 1; - * @return {number} - */ -proto.bandchain.v1.oracle.MultiProof.prototype.getBlockHeight = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.MultiProof} returns this - */ -proto.bandchain.v1.oracle.MultiProof.prototype.setBlockHeight = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * repeated OracleDataProof oracle_data_multi_proof = 2; - * @return {!Array} - */ -proto.bandchain.v1.oracle.MultiProof.prototype.getOracleDataMultiProofList = - function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - proto.bandchain.v1.oracle.OracleDataProof, - 2, - ) - ) - } - -/** - * @param {!Array} value - * @return {!proto.bandchain.v1.oracle.MultiProof} returns this - */ -proto.bandchain.v1.oracle.MultiProof.prototype.setOracleDataMultiProofList = - function (value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value) - } - -/** - * @param {!proto.bandchain.v1.oracle.OracleDataProof=} opt_value - * @param {number=} opt_index - * @return {!proto.bandchain.v1.oracle.OracleDataProof} - */ -proto.bandchain.v1.oracle.MultiProof.prototype.addOracleDataMultiProof = - function (opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.bandchain.v1.oracle.OracleDataProof, - opt_index, - ) - } - -/** - * Clears the list making it empty but non-null. - * @return {!proto.bandchain.v1.oracle.MultiProof} returns this - */ -proto.bandchain.v1.oracle.MultiProof.prototype.clearOracleDataMultiProofList = - function () { - return this.setOracleDataMultiProofList([]) - } - -/** - * optional BlockRelayProof block_relay_proof = 3; - * @return {?proto.bandchain.v1.oracle.BlockRelayProof} - */ -proto.bandchain.v1.oracle.MultiProof.prototype.getBlockRelayProof = - function () { - return /** @type{?proto.bandchain.v1.oracle.BlockRelayProof} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.BlockRelayProof, - 3, - ) - ) - } - -/** - * @param {?proto.bandchain.v1.oracle.BlockRelayProof|undefined} value - * @return {!proto.bandchain.v1.oracle.MultiProof} returns this - */ -proto.bandchain.v1.oracle.MultiProof.prototype.setBlockRelayProof = function ( - value, -) { - return jspb.Message.setWrapperField(this, 3, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.MultiProof} returns this - */ -proto.bandchain.v1.oracle.MultiProof.prototype.clearBlockRelayProof = - function () { - return this.setBlockRelayProof(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.MultiProof.prototype.hasBlockRelayProof = - function () { - return jspb.Message.getField(this, 3) != null - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.CountProof.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.CountProof.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.CountProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.CountProof.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), - countProof: - (f = msg.getCountProof()) && - proto.bandchain.v1.oracle.RequestsCountProof.toObject( - includeInstance, - f, - ), - blockRelayProof: - (f = msg.getBlockRelayProof()) && - proto.bandchain.v1.oracle.BlockRelayProof.toObject( - includeInstance, - f, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.CountProof} - */ -proto.bandchain.v1.oracle.CountProof.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.CountProof() - return proto.bandchain.v1.oracle.CountProof.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.CountProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.CountProof} - */ -proto.bandchain.v1.oracle.CountProof.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setBlockHeight(value) - break - case 2: - var value = new proto.bandchain.v1.oracle.RequestsCountProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.RequestsCountProof - .deserializeBinaryFromReader, - ) - msg.setCountProof(value) - break - case 3: - var value = new proto.bandchain.v1.oracle.BlockRelayProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.BlockRelayProof.deserializeBinaryFromReader, - ) - msg.setBlockRelayProof(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.CountProof.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.CountProof.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.CountProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.CountProof.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getBlockHeight() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getCountProof() - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bandchain.v1.oracle.RequestsCountProof.serializeBinaryToWriter, - ) - } - f = message.getBlockRelayProof() - if (f != null) { - writer.writeMessage( - 3, - f, - proto.bandchain.v1.oracle.BlockRelayProof.serializeBinaryToWriter, - ) - } -} - -/** - * optional uint64 block_height = 1; - * @return {number} - */ -proto.bandchain.v1.oracle.CountProof.prototype.getBlockHeight = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.CountProof} returns this - */ -proto.bandchain.v1.oracle.CountProof.prototype.setBlockHeight = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional RequestsCountProof count_proof = 2; - * @return {?proto.bandchain.v1.oracle.RequestsCountProof} - */ -proto.bandchain.v1.oracle.CountProof.prototype.getCountProof = function () { - return /** @type{?proto.bandchain.v1.oracle.RequestsCountProof} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.RequestsCountProof, - 2, - ) - ) -} - -/** - * @param {?proto.bandchain.v1.oracle.RequestsCountProof|undefined} value - * @return {!proto.bandchain.v1.oracle.CountProof} returns this - */ -proto.bandchain.v1.oracle.CountProof.prototype.setCountProof = function ( - value, -) { - return jspb.Message.setWrapperField(this, 2, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.CountProof} returns this - */ -proto.bandchain.v1.oracle.CountProof.prototype.clearCountProof = function () { - return this.setCountProof(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.CountProof.prototype.hasCountProof = function () { - return jspb.Message.getField(this, 2) != null -} - -/** - * optional BlockRelayProof block_relay_proof = 3; - * @return {?proto.bandchain.v1.oracle.BlockRelayProof} - */ -proto.bandchain.v1.oracle.CountProof.prototype.getBlockRelayProof = - function () { - return /** @type{?proto.bandchain.v1.oracle.BlockRelayProof} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.BlockRelayProof, - 3, - ) - ) - } - -/** - * @param {?proto.bandchain.v1.oracle.BlockRelayProof|undefined} value - * @return {!proto.bandchain.v1.oracle.CountProof} returns this - */ -proto.bandchain.v1.oracle.CountProof.prototype.setBlockRelayProof = function ( - value, -) { - return jspb.Message.setWrapperField(this, 3, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.CountProof} returns this - */ -proto.bandchain.v1.oracle.CountProof.prototype.clearBlockRelayProof = - function () { - return this.setBlockRelayProof(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.CountProof.prototype.hasBlockRelayProof = - function () { - return jspb.Message.getField(this, 3) != null - } - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.bandchain.v1.oracle.OracleDataProof.repeatedFields_ = [3] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.OracleDataProof.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.OracleDataProof.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.OracleDataProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.OracleDataProof.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - result: - (f = msg.getResult()) && - oracle_v1_oracle_pb.Result.toObject(includeInstance, f), - version: jspb.Message.getFieldWithDefault(msg, 2, 0), - merklePathsList: jspb.Message.toObjectList( - msg.getMerklePathsList(), - proto.bandchain.v1.oracle.IAVLMerklePath.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.OracleDataProof} - */ -proto.bandchain.v1.oracle.OracleDataProof.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.OracleDataProof() - return proto.bandchain.v1.oracle.OracleDataProof.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.OracleDataProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.OracleDataProof} - */ -proto.bandchain.v1.oracle.OracleDataProof.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new oracle_v1_oracle_pb.Result() - reader.readMessage( - value, - oracle_v1_oracle_pb.Result.deserializeBinaryFromReader, - ) - msg.setResult(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setVersion(value) - break - case 3: - var value = new proto.bandchain.v1.oracle.IAVLMerklePath() - reader.readMessage( - value, - proto.bandchain.v1.oracle.IAVLMerklePath - .deserializeBinaryFromReader, - ) - msg.addMerklePaths(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.OracleDataProof.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.OracleDataProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.OracleDataProof.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getResult() - if (f != null) { - writer.writeMessage( - 1, - f, - oracle_v1_oracle_pb.Result.serializeBinaryToWriter, - ) - } - f = message.getVersion() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getMerklePathsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.bandchain.v1.oracle.IAVLMerklePath.serializeBinaryToWriter, - ) - } -} - -/** - * optional oracle.v1.Result result = 1; - * @return {?proto.oracle.v1.Result} - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.getResult = function () { - return /** @type{?proto.oracle.v1.Result} */ ( - jspb.Message.getWrapperField(this, oracle_v1_oracle_pb.Result, 1) - ) -} - -/** - * @param {?proto.oracle.v1.Result|undefined} value - * @return {!proto.bandchain.v1.oracle.OracleDataProof} returns this - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.setResult = function ( - value, -) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.OracleDataProof} returns this - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.clearResult = function () { - return this.setResult(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.hasResult = function () { - return jspb.Message.getField(this, 1) != null -} - -/** - * optional uint64 version = 2; - * @return {number} - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.getVersion = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.OracleDataProof} returns this - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.setVersion = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * repeated IAVLMerklePath merkle_paths = 3; - * @return {!Array} - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.getMerklePathsList = - function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - proto.bandchain.v1.oracle.IAVLMerklePath, - 3, - ) - ) - } - -/** - * @param {!Array} value - * @return {!proto.bandchain.v1.oracle.OracleDataProof} returns this - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.setMerklePathsList = - function (value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value) - } - -/** - * @param {!proto.bandchain.v1.oracle.IAVLMerklePath=} opt_value - * @param {number=} opt_index - * @return {!proto.bandchain.v1.oracle.IAVLMerklePath} - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.addMerklePaths = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 3, - opt_value, - proto.bandchain.v1.oracle.IAVLMerklePath, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.bandchain.v1.oracle.OracleDataProof} returns this - */ -proto.bandchain.v1.oracle.OracleDataProof.prototype.clearMerklePathsList = - function () { - return this.setMerklePathsList([]) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.IAVLMerklePath.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.IAVLMerklePath.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.IAVLMerklePath} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.IAVLMerklePath.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - isDataOnRight: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - subtreeHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - subtreeSize: jspb.Message.getFieldWithDefault(msg, 3, 0), - subtreeVersion: jspb.Message.getFieldWithDefault(msg, 4, 0), - siblingHash: msg.getSiblingHash_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.IAVLMerklePath} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.IAVLMerklePath() - return proto.bandchain.v1.oracle.IAVLMerklePath.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.IAVLMerklePath} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.IAVLMerklePath} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()) - msg.setIsDataOnRight(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint32()) - msg.setSubtreeHeight(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setSubtreeSize(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setSubtreeVersion(value) - break - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setSiblingHash(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.IAVLMerklePath.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.IAVLMerklePath} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.IAVLMerklePath.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getIsDataOnRight() - if (f) { - writer.writeBool(1, f) - } - f = message.getSubtreeHeight() - if (f !== 0) { - writer.writeUint32(2, f) - } - f = message.getSubtreeSize() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getSubtreeVersion() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getSiblingHash_asU8() - if (f.length > 0) { - writer.writeBytes(5, f) - } -} - -/** - * optional bool is_data_on_right = 1; - * @return {boolean} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.getIsDataOnRight = - function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 1, false) - ) - } - -/** - * @param {boolean} value - * @return {!proto.bandchain.v1.oracle.IAVLMerklePath} returns this - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.setIsDataOnRight = function ( - value, -) { - return jspb.Message.setProto3BooleanField(this, 1, value) -} - -/** - * optional uint32 subtree_height = 2; - * @return {number} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.getSubtreeHeight = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.IAVLMerklePath} returns this - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.setSubtreeHeight = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional uint64 subtree_size = 3; - * @return {number} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.getSubtreeSize = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.IAVLMerklePath} returns this - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.setSubtreeSize = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -/** - * optional uint64 subtree_version = 4; - * @return {number} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.getSubtreeVersion = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.IAVLMerklePath} returns this - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.setSubtreeVersion = - function (value) { - return jspb.Message.setProto3IntField(this, 4, value) - } - -/** - * optional bytes sibling_hash = 5; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.getSiblingHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 5, '') - ) - } - -/** - * optional bytes sibling_hash = 5; - * This is a type-conversion wrapper around `getSiblingHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.getSiblingHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getSiblingHash()) - ) - } - -/** - * optional bytes sibling_hash = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSiblingHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.getSiblingHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getSiblingHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.IAVLMerklePath} returns this - */ -proto.bandchain.v1.oracle.IAVLMerklePath.prototype.setSiblingHash = function ( - value, -) { - return jspb.Message.setProto3BytesField(this, 5, value) -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.bandchain.v1.oracle.BlockRelayProof.repeatedFields_ = [4] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.BlockRelayProof.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.BlockRelayProof.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.BlockRelayProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.BlockRelayProof.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - multiStoreProof: - (f = msg.getMultiStoreProof()) && - proto.bandchain.v1.oracle.MultiStoreProof.toObject( - includeInstance, - f, - ), - blockHeaderMerkleParts: - (f = msg.getBlockHeaderMerkleParts()) && - proto.bandchain.v1.oracle.BlockHeaderMerkleParts.toObject( - includeInstance, - f, - ), - commonEncodedVotePart: - (f = msg.getCommonEncodedVotePart()) && - proto.bandchain.v1.oracle.CommonEncodedVotePart.toObject( - includeInstance, - f, - ), - signaturesList: jspb.Message.toObjectList( - msg.getSignaturesList(), - proto.bandchain.v1.oracle.TMSignature.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} - */ -proto.bandchain.v1.oracle.BlockRelayProof.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.BlockRelayProof() - return proto.bandchain.v1.oracle.BlockRelayProof.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.BlockRelayProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} - */ -proto.bandchain.v1.oracle.BlockRelayProof.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new proto.bandchain.v1.oracle.MultiStoreProof() - reader.readMessage( - value, - proto.bandchain.v1.oracle.MultiStoreProof - .deserializeBinaryFromReader, - ) - msg.setMultiStoreProof(value) - break - case 2: - var value = new proto.bandchain.v1.oracle.BlockHeaderMerkleParts() - reader.readMessage( - value, - proto.bandchain.v1.oracle.BlockHeaderMerkleParts - .deserializeBinaryFromReader, - ) - msg.setBlockHeaderMerkleParts(value) - break - case 3: - var value = new proto.bandchain.v1.oracle.CommonEncodedVotePart() - reader.readMessage( - value, - proto.bandchain.v1.oracle.CommonEncodedVotePart - .deserializeBinaryFromReader, - ) - msg.setCommonEncodedVotePart(value) - break - case 4: - var value = new proto.bandchain.v1.oracle.TMSignature() - reader.readMessage( - value, - proto.bandchain.v1.oracle.TMSignature.deserializeBinaryFromReader, - ) - msg.addSignatures(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.BlockRelayProof.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.BlockRelayProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.BlockRelayProof.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getMultiStoreProof() - if (f != null) { - writer.writeMessage( - 1, - f, - proto.bandchain.v1.oracle.MultiStoreProof.serializeBinaryToWriter, - ) - } - f = message.getBlockHeaderMerkleParts() - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bandchain.v1.oracle.BlockHeaderMerkleParts.serializeBinaryToWriter, - ) - } - f = message.getCommonEncodedVotePart() - if (f != null) { - writer.writeMessage( - 3, - f, - proto.bandchain.v1.oracle.CommonEncodedVotePart.serializeBinaryToWriter, - ) - } - f = message.getSignaturesList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.bandchain.v1.oracle.TMSignature.serializeBinaryToWriter, - ) - } -} - -/** - * optional MultiStoreProof multi_store_proof = 1; - * @return {?proto.bandchain.v1.oracle.MultiStoreProof} - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.getMultiStoreProof = - function () { - return /** @type{?proto.bandchain.v1.oracle.MultiStoreProof} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.MultiStoreProof, - 1, - ) - ) - } - -/** - * @param {?proto.bandchain.v1.oracle.MultiStoreProof|undefined} value - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} returns this - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.setMultiStoreProof = - function (value) { - return jspb.Message.setWrapperField(this, 1, value) - } - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} returns this - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.clearMultiStoreProof = - function () { - return this.setMultiStoreProof(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.hasMultiStoreProof = - function () { - return jspb.Message.getField(this, 1) != null - } - -/** - * optional BlockHeaderMerkleParts block_header_merkle_parts = 2; - * @return {?proto.bandchain.v1.oracle.BlockHeaderMerkleParts} - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.getBlockHeaderMerkleParts = - function () { - return /** @type{?proto.bandchain.v1.oracle.BlockHeaderMerkleParts} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.BlockHeaderMerkleParts, - 2, - ) - ) - } - -/** - * @param {?proto.bandchain.v1.oracle.BlockHeaderMerkleParts|undefined} value - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} returns this - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.setBlockHeaderMerkleParts = - function (value) { - return jspb.Message.setWrapperField(this, 2, value) - } - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} returns this - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.clearBlockHeaderMerkleParts = - function () { - return this.setBlockHeaderMerkleParts(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.hasBlockHeaderMerkleParts = - function () { - return jspb.Message.getField(this, 2) != null - } - -/** - * optional CommonEncodedVotePart common_encoded_vote_part = 3; - * @return {?proto.bandchain.v1.oracle.CommonEncodedVotePart} - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.getCommonEncodedVotePart = - function () { - return /** @type{?proto.bandchain.v1.oracle.CommonEncodedVotePart} */ ( - jspb.Message.getWrapperField( - this, - proto.bandchain.v1.oracle.CommonEncodedVotePart, - 3, - ) - ) - } - -/** - * @param {?proto.bandchain.v1.oracle.CommonEncodedVotePart|undefined} value - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} returns this - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.setCommonEncodedVotePart = - function (value) { - return jspb.Message.setWrapperField(this, 3, value) - } - -/** - * Clears the message field making it undefined. - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} returns this - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.clearCommonEncodedVotePart = - function () { - return this.setCommonEncodedVotePart(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.hasCommonEncodedVotePart = - function () { - return jspb.Message.getField(this, 3) != null - } - -/** - * repeated TMSignature signatures = 4; - * @return {!Array} - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.getSignaturesList = - function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - proto.bandchain.v1.oracle.TMSignature, - 4, - ) - ) - } - -/** - * @param {!Array} value - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} returns this - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.setSignaturesList = - function (value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value) - } - -/** - * @param {!proto.bandchain.v1.oracle.TMSignature=} opt_value - * @param {number=} opt_index - * @return {!proto.bandchain.v1.oracle.TMSignature} - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.addSignatures = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 4, - opt_value, - proto.bandchain.v1.oracle.TMSignature, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.bandchain.v1.oracle.BlockRelayProof} returns this - */ -proto.bandchain.v1.oracle.BlockRelayProof.prototype.clearSignaturesList = - function () { - return this.setSignaturesList([]) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.MultiStoreProof.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.MultiStoreProof.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.MultiStoreProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.MultiStoreProof.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - oracleIavlStateHash: msg.getOracleIavlStateHash_asB64(), - paramsStoreMerkleHash: msg.getParamsStoreMerkleHash_asB64(), - slashingToStakingStoresMerkleHash: - msg.getSlashingToStakingStoresMerkleHash_asB64(), - transferToUpgradeStoresMerkleHash: - msg.getTransferToUpgradeStoresMerkleHash_asB64(), - authToMintStoresMerkleHash: msg.getAuthToMintStoresMerkleHash_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.MultiStoreProof} - */ -proto.bandchain.v1.oracle.MultiStoreProof.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.MultiStoreProof() - return proto.bandchain.v1.oracle.MultiStoreProof.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.MultiStoreProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.MultiStoreProof} - */ -proto.bandchain.v1.oracle.MultiStoreProof.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setOracleIavlStateHash(value) - break - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setParamsStoreMerkleHash(value) - break - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setSlashingToStakingStoresMerkleHash(value) - break - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setTransferToUpgradeStoresMerkleHash(value) - break - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setAuthToMintStoresMerkleHash(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.MultiStoreProof.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.MultiStoreProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.MultiStoreProof.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getOracleIavlStateHash_asU8() - if (f.length > 0) { - writer.writeBytes(1, f) - } - f = message.getParamsStoreMerkleHash_asU8() - if (f.length > 0) { - writer.writeBytes(2, f) - } - f = message.getSlashingToStakingStoresMerkleHash_asU8() - if (f.length > 0) { - writer.writeBytes(3, f) - } - f = message.getTransferToUpgradeStoresMerkleHash_asU8() - if (f.length > 0) { - writer.writeBytes(4, f) - } - f = message.getAuthToMintStoresMerkleHash_asU8() - if (f.length > 0) { - writer.writeBytes(5, f) - } -} - -/** - * optional bytes oracle_iavl_state_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getOracleIavlStateHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 1, '') - ) - } - -/** - * optional bytes oracle_iavl_state_hash = 1; - * This is a type-conversion wrapper around `getOracleIavlStateHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getOracleIavlStateHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getOracleIavlStateHash()) - ) - } - -/** - * optional bytes oracle_iavl_state_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOracleIavlStateHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getOracleIavlStateHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getOracleIavlStateHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.MultiStoreProof} returns this - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.setOracleIavlStateHash = - function (value) { - return jspb.Message.setProto3BytesField(this, 1, value) - } - -/** - * optional bytes params_store_merkle_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getParamsStoreMerkleHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 2, '') - ) - } - -/** - * optional bytes params_store_merkle_hash = 2; - * This is a type-conversion wrapper around `getParamsStoreMerkleHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getParamsStoreMerkleHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getParamsStoreMerkleHash()) - ) - } - -/** - * optional bytes params_store_merkle_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getParamsStoreMerkleHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getParamsStoreMerkleHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getParamsStoreMerkleHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.MultiStoreProof} returns this - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.setParamsStoreMerkleHash = - function (value) { - return jspb.Message.setProto3BytesField(this, 2, value) - } - -/** - * optional bytes slashing_to_staking_stores_merkle_hash = 3; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getSlashingToStakingStoresMerkleHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 3, '') - ) - } - -/** - * optional bytes slashing_to_staking_stores_merkle_hash = 3; - * This is a type-conversion wrapper around `getSlashingToStakingStoresMerkleHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getSlashingToStakingStoresMerkleHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getSlashingToStakingStoresMerkleHash()) - ) - } - -/** - * optional bytes slashing_to_staking_stores_merkle_hash = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSlashingToStakingStoresMerkleHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getSlashingToStakingStoresMerkleHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getSlashingToStakingStoresMerkleHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.MultiStoreProof} returns this - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.setSlashingToStakingStoresMerkleHash = - function (value) { - return jspb.Message.setProto3BytesField(this, 3, value) - } - -/** - * optional bytes transfer_to_upgrade_stores_merkle_hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getTransferToUpgradeStoresMerkleHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 4, '') - ) - } - -/** - * optional bytes transfer_to_upgrade_stores_merkle_hash = 4; - * This is a type-conversion wrapper around `getTransferToUpgradeStoresMerkleHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getTransferToUpgradeStoresMerkleHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getTransferToUpgradeStoresMerkleHash()) - ) - } - -/** - * optional bytes transfer_to_upgrade_stores_merkle_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTransferToUpgradeStoresMerkleHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getTransferToUpgradeStoresMerkleHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getTransferToUpgradeStoresMerkleHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.MultiStoreProof} returns this - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.setTransferToUpgradeStoresMerkleHash = - function (value) { - return jspb.Message.setProto3BytesField(this, 4, value) - } - -/** - * optional bytes auth_to_mint_stores_merkle_hash = 5; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getAuthToMintStoresMerkleHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 5, '') - ) - } - -/** - * optional bytes auth_to_mint_stores_merkle_hash = 5; - * This is a type-conversion wrapper around `getAuthToMintStoresMerkleHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getAuthToMintStoresMerkleHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getAuthToMintStoresMerkleHash()) - ) - } - -/** - * optional bytes auth_to_mint_stores_merkle_hash = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAuthToMintStoresMerkleHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.getAuthToMintStoresMerkleHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getAuthToMintStoresMerkleHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.MultiStoreProof} returns this - */ -proto.bandchain.v1.oracle.MultiStoreProof.prototype.setAuthToMintStoresMerkleHash = - function (value) { - return jspb.Message.setProto3BytesField(this, 5, value) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.toObject = - function (opt_includeInstance) { - return proto.bandchain.v1.oracle.BlockHeaderMerkleParts.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.BlockHeaderMerkleParts.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - versionAndChainIdHash: msg.getVersionAndChainIdHash_asB64(), - height: jspb.Message.getFieldWithDefault(msg, 2, 0), - timeSecond: jspb.Message.getFieldWithDefault(msg, 3, 0), - timeNanoSecond: jspb.Message.getFieldWithDefault(msg, 4, 0), - lastBlockIdAndOther: msg.getLastBlockIdAndOther_asB64(), - nextValidatorHashAndConsensusHash: - msg.getNextValidatorHashAndConsensusHash_asB64(), - lastResultsHash: msg.getLastResultsHash_asB64(), - evidenceAndProposerHash: msg.getEvidenceAndProposerHash_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.BlockHeaderMerkleParts() - return proto.bandchain.v1.oracle.BlockHeaderMerkleParts.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setVersionAndChainIdHash(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setHeight(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setTimeSecond(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint32()) - msg.setTimeNanoSecond(value) - break - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setLastBlockIdAndOther(value) - break - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setNextValidatorHashAndConsensusHash(value) - break - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setLastResultsHash(value) - break - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setEvidenceAndProposerHash(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.BlockHeaderMerkleParts.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getVersionAndChainIdHash_asU8() - if (f.length > 0) { - writer.writeBytes(1, f) - } - f = message.getHeight() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getTimeSecond() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getTimeNanoSecond() - if (f !== 0) { - writer.writeUint32(4, f) - } - f = message.getLastBlockIdAndOther_asU8() - if (f.length > 0) { - writer.writeBytes(5, f) - } - f = message.getNextValidatorHashAndConsensusHash_asU8() - if (f.length > 0) { - writer.writeBytes(6, f) - } - f = message.getLastResultsHash_asU8() - if (f.length > 0) { - writer.writeBytes(7, f) - } - f = message.getEvidenceAndProposerHash_asU8() - if (f.length > 0) { - writer.writeBytes(8, f) - } - } - -/** - * optional bytes version_and_chain_id_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getVersionAndChainIdHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 1, '') - ) - } - -/** - * optional bytes version_and_chain_id_hash = 1; - * This is a type-conversion wrapper around `getVersionAndChainIdHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getVersionAndChainIdHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getVersionAndChainIdHash()) - ) - } - -/** - * optional bytes version_and_chain_id_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVersionAndChainIdHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getVersionAndChainIdHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getVersionAndChainIdHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} returns this - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.setVersionAndChainIdHash = - function (value) { - return jspb.Message.setProto3BytesField(this, 1, value) - } - -/** - * optional uint64 height = 2; - * @return {number} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getHeight = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} returns this - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.setHeight = - function (value) { - return jspb.Message.setProto3IntField(this, 2, value) - } - -/** - * optional uint64 time_second = 3; - * @return {number} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getTimeSecond = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} returns this - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.setTimeSecond = - function (value) { - return jspb.Message.setProto3IntField(this, 3, value) - } - -/** - * optional uint32 time_nano_second = 4; - * @return {number} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getTimeNanoSecond = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} returns this - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.setTimeNanoSecond = - function (value) { - return jspb.Message.setProto3IntField(this, 4, value) - } - -/** - * optional bytes last_block_id_and_other = 5; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getLastBlockIdAndOther = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 5, '') - ) - } - -/** - * optional bytes last_block_id_and_other = 5; - * This is a type-conversion wrapper around `getLastBlockIdAndOther()` - * @return {string} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getLastBlockIdAndOther_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getLastBlockIdAndOther()) - ) - } - -/** - * optional bytes last_block_id_and_other = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastBlockIdAndOther()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getLastBlockIdAndOther_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getLastBlockIdAndOther()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} returns this - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.setLastBlockIdAndOther = - function (value) { - return jspb.Message.setProto3BytesField(this, 5, value) - } - -/** - * optional bytes next_validator_hash_and_consensus_hash = 6; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getNextValidatorHashAndConsensusHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 6, '') - ) - } - -/** - * optional bytes next_validator_hash_and_consensus_hash = 6; - * This is a type-conversion wrapper around `getNextValidatorHashAndConsensusHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getNextValidatorHashAndConsensusHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getNextValidatorHashAndConsensusHash()) - ) - } - -/** - * optional bytes next_validator_hash_and_consensus_hash = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNextValidatorHashAndConsensusHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getNextValidatorHashAndConsensusHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getNextValidatorHashAndConsensusHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} returns this - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.setNextValidatorHashAndConsensusHash = - function (value) { - return jspb.Message.setProto3BytesField(this, 6, value) - } - -/** - * optional bytes last_results_hash = 7; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getLastResultsHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 7, '') - ) - } - -/** - * optional bytes last_results_hash = 7; - * This is a type-conversion wrapper around `getLastResultsHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getLastResultsHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getLastResultsHash()) - ) - } - -/** - * optional bytes last_results_hash = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastResultsHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getLastResultsHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getLastResultsHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} returns this - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.setLastResultsHash = - function (value) { - return jspb.Message.setProto3BytesField(this, 7, value) - } - -/** - * optional bytes evidence_and_proposer_hash = 8; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getEvidenceAndProposerHash = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 8, '') - ) - } - -/** - * optional bytes evidence_and_proposer_hash = 8; - * This is a type-conversion wrapper around `getEvidenceAndProposerHash()` - * @return {string} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getEvidenceAndProposerHash_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getEvidenceAndProposerHash()) - ) - } - -/** - * optional bytes evidence_and_proposer_hash = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEvidenceAndProposerHash()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.getEvidenceAndProposerHash_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getEvidenceAndProposerHash()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.BlockHeaderMerkleParts} returns this - */ -proto.bandchain.v1.oracle.BlockHeaderMerkleParts.prototype.setEvidenceAndProposerHash = - function (value) { - return jspb.Message.setProto3BytesField(this, 8, value) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.toObject = - function (opt_includeInstance) { - return proto.bandchain.v1.oracle.CommonEncodedVotePart.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.CommonEncodedVotePart} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.CommonEncodedVotePart.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - signedDataPrefix: msg.getSignedDataPrefix_asB64(), - signedDataSuffix: msg.getSignedDataSuffix_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.CommonEncodedVotePart} - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.CommonEncodedVotePart() - return proto.bandchain.v1.oracle.CommonEncodedVotePart.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.CommonEncodedVotePart} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.CommonEncodedVotePart} - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setSignedDataPrefix(value) - break - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setSignedDataSuffix(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.CommonEncodedVotePart.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.CommonEncodedVotePart} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getSignedDataPrefix_asU8() - if (f.length > 0) { - writer.writeBytes(1, f) - } - f = message.getSignedDataSuffix_asU8() - if (f.length > 0) { - writer.writeBytes(2, f) - } - } - -/** - * optional bytes signed_data_prefix = 1; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.getSignedDataPrefix = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 1, '') - ) - } - -/** - * optional bytes signed_data_prefix = 1; - * This is a type-conversion wrapper around `getSignedDataPrefix()` - * @return {string} - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.getSignedDataPrefix_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getSignedDataPrefix()) - ) - } - -/** - * optional bytes signed_data_prefix = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignedDataPrefix()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.getSignedDataPrefix_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getSignedDataPrefix()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.CommonEncodedVotePart} returns this - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.setSignedDataPrefix = - function (value) { - return jspb.Message.setProto3BytesField(this, 1, value) - } - -/** - * optional bytes signed_data_suffix = 2; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.getSignedDataSuffix = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 2, '') - ) - } - -/** - * optional bytes signed_data_suffix = 2; - * This is a type-conversion wrapper around `getSignedDataSuffix()` - * @return {string} - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.getSignedDataSuffix_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getSignedDataSuffix()) - ) - } - -/** - * optional bytes signed_data_suffix = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignedDataSuffix()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.getSignedDataSuffix_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getSignedDataSuffix()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.CommonEncodedVotePart} returns this - */ -proto.bandchain.v1.oracle.CommonEncodedVotePart.prototype.setSignedDataSuffix = - function (value) { - return jspb.Message.setProto3BytesField(this, 2, value) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.TMSignature.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.TMSignature.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.TMSignature} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.TMSignature.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - r: msg.getR_asB64(), - s: msg.getS_asB64(), - v: jspb.Message.getFieldWithDefault(msg, 3, 0), - encodedTimestamp: msg.getEncodedTimestamp_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.TMSignature} - */ -proto.bandchain.v1.oracle.TMSignature.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.TMSignature() - return proto.bandchain.v1.oracle.TMSignature.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.TMSignature} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.TMSignature} - */ -proto.bandchain.v1.oracle.TMSignature.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setR(value) - break - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setS(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint32()) - msg.setV(value) - break - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setEncodedTimestamp(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.TMSignature.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.TMSignature} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.TMSignature.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getR_asU8() - if (f.length > 0) { - writer.writeBytes(1, f) - } - f = message.getS_asU8() - if (f.length > 0) { - writer.writeBytes(2, f) - } - f = message.getV() - if (f !== 0) { - writer.writeUint32(3, f) - } - f = message.getEncodedTimestamp_asU8() - if (f.length > 0) { - writer.writeBytes(4, f) - } -} - -/** - * optional bytes r = 1; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getR = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 1, '') - ) -} - -/** - * optional bytes r = 1; - * This is a type-conversion wrapper around `getR()` - * @return {string} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getR_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getR())) -} - -/** - * optional bytes r = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getR()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getR_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getR())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.TMSignature} returns this - */ -proto.bandchain.v1.oracle.TMSignature.prototype.setR = function (value) { - return jspb.Message.setProto3BytesField(this, 1, value) -} - -/** - * optional bytes s = 2; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getS = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 2, '') - ) -} - -/** - * optional bytes s = 2; - * This is a type-conversion wrapper around `getS()` - * @return {string} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getS_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getS())) -} - -/** - * optional bytes s = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getS()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getS_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getS())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.TMSignature} returns this - */ -proto.bandchain.v1.oracle.TMSignature.prototype.setS = function (value) { - return jspb.Message.setProto3BytesField(this, 2, value) -} - -/** - * optional uint32 v = 3; - * @return {number} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getV = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.TMSignature} returns this - */ -proto.bandchain.v1.oracle.TMSignature.prototype.setV = function (value) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -/** - * optional bytes encoded_timestamp = 4; - * @return {!(string|Uint8Array)} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getEncodedTimestamp = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 4, '') - ) - } - -/** - * optional bytes encoded_timestamp = 4; - * This is a type-conversion wrapper around `getEncodedTimestamp()` - * @return {string} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getEncodedTimestamp_asB64 = - function () { - return /** @type {string} */ ( - jspb.Message.bytesAsB64(this.getEncodedTimestamp()) - ) - } - -/** - * optional bytes encoded_timestamp = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEncodedTimestamp()` - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.TMSignature.prototype.getEncodedTimestamp_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getEncodedTimestamp()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bandchain.v1.oracle.TMSignature} returns this - */ -proto.bandchain.v1.oracle.TMSignature.prototype.setEncodedTimestamp = function ( - value, -) { - return jspb.Message.setProto3BytesField(this, 4, value) -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.bandchain.v1.oracle.RequestsCountProof.repeatedFields_ = [3] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.bandchain.v1.oracle.RequestsCountProof.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.bandchain.v1.oracle.RequestsCountProof.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bandchain.v1.oracle.RequestsCountProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.bandchain.v1.oracle.RequestsCountProof.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - count: jspb.Message.getFieldWithDefault(msg, 1, 0), - version: jspb.Message.getFieldWithDefault(msg, 2, 0), - merklePathsList: jspb.Message.toObjectList( - msg.getMerklePathsList(), - proto.bandchain.v1.oracle.IAVLMerklePath.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bandchain.v1.oracle.RequestsCountProof} - */ -proto.bandchain.v1.oracle.RequestsCountProof.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.bandchain.v1.oracle.RequestsCountProof() - return proto.bandchain.v1.oracle.RequestsCountProof.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.bandchain.v1.oracle.RequestsCountProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bandchain.v1.oracle.RequestsCountProof} - */ -proto.bandchain.v1.oracle.RequestsCountProof.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setCount(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setVersion(value) - break - case 3: - var value = new proto.bandchain.v1.oracle.IAVLMerklePath() - reader.readMessage( - value, - proto.bandchain.v1.oracle.IAVLMerklePath - .deserializeBinaryFromReader, - ) - msg.addMerklePaths(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.bandchain.v1.oracle.RequestsCountProof.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.bandchain.v1.oracle.RequestsCountProof.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.bandchain.v1.oracle.RequestsCountProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bandchain.v1.oracle.RequestsCountProof.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getCount() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getVersion() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getMerklePathsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.bandchain.v1.oracle.IAVLMerklePath.serializeBinaryToWriter, - ) - } - } - -/** - * optional uint64 count = 1; - * @return {number} - */ -proto.bandchain.v1.oracle.RequestsCountProof.prototype.getCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.RequestsCountProof} returns this - */ -proto.bandchain.v1.oracle.RequestsCountProof.prototype.setCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional uint64 version = 2; - * @return {number} - */ -proto.bandchain.v1.oracle.RequestsCountProof.prototype.getVersion = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) - } - -/** - * @param {number} value - * @return {!proto.bandchain.v1.oracle.RequestsCountProof} returns this - */ -proto.bandchain.v1.oracle.RequestsCountProof.prototype.setVersion = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * repeated IAVLMerklePath merkle_paths = 3; - * @return {!Array} - */ -proto.bandchain.v1.oracle.RequestsCountProof.prototype.getMerklePathsList = - function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - proto.bandchain.v1.oracle.IAVLMerklePath, - 3, - ) - ) - } - -/** - * @param {!Array} value - * @return {!proto.bandchain.v1.oracle.RequestsCountProof} returns this - */ -proto.bandchain.v1.oracle.RequestsCountProof.prototype.setMerklePathsList = - function (value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value) - } - -/** - * @param {!proto.bandchain.v1.oracle.IAVLMerklePath=} opt_value - * @param {number=} opt_index - * @return {!proto.bandchain.v1.oracle.IAVLMerklePath} - */ -proto.bandchain.v1.oracle.RequestsCountProof.prototype.addMerklePaths = - function (opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 3, - opt_value, - proto.bandchain.v1.oracle.IAVLMerklePath, - opt_index, - ) - } - -/** - * Clears the list making it empty but non-null. - * @return {!proto.bandchain.v1.oracle.RequestsCountProof} returns this - */ -proto.bandchain.v1.oracle.RequestsCountProof.prototype.clearMerklePathsList = - function () { - return this.setMerklePathsList([]) - } - -goog.object.extend(exports, proto.bandchain.v1.oracle) diff --git a/proto/bandchain/v1/oracle/proof_pb_service.d.ts b/proto/bandchain/v1/oracle/proof_pb_service.d.ts deleted file mode 100644 index 814cb6d..0000000 --- a/proto/bandchain/v1/oracle/proof_pb_service.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -// package: bandchain.v1.oracle -// file: bandchain/v1/oracle/proof.proto - -import * as bandchain_v1_oracle_proof_pb from '../../../bandchain/v1/oracle/proof_pb' -import { grpc } from '@improbable-eng/grpc-web' - -type ServiceProof = { - readonly methodName: string - readonly service: typeof Service - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof bandchain_v1_oracle_proof_pb.ProofRequest - readonly responseType: typeof bandchain_v1_oracle_proof_pb.ProofResponse -} - -type ServiceMultiProof = { - readonly methodName: string - readonly service: typeof Service - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof bandchain_v1_oracle_proof_pb.MultiProofRequest - readonly responseType: typeof bandchain_v1_oracle_proof_pb.MultiProofResponse -} - -type ServiceRequestCountProof = { - readonly methodName: string - readonly service: typeof Service - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof bandchain_v1_oracle_proof_pb.RequestCountProofRequest - readonly responseType: typeof bandchain_v1_oracle_proof_pb.RequestCountProofResponse -} - -export class Service { - static readonly serviceName: string - static readonly Proof: ServiceProof - static readonly MultiProof: ServiceMultiProof - static readonly RequestCountProof: ServiceRequestCountProof -} - -export type ServiceError = { - message: string - code: number - metadata: grpc.Metadata -} -export type Status = { details: string; code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void -} -interface ResponseStream { - cancel(): void - on(type: 'data', handler: (message: T) => void): ResponseStream - on(type: 'end', handler: (status?: Status) => void): ResponseStream - on(type: 'status', handler: (status: Status) => void): ResponseStream -} -interface RequestStream { - write(message: T): RequestStream - end(): void - cancel(): void - on(type: 'end', handler: (status?: Status) => void): RequestStream - on(type: 'status', handler: (status: Status) => void): RequestStream -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream - end(): void - cancel(): void - on( - type: 'data', - handler: (message: ResT) => void, - ): BidirectionalStream - on( - type: 'end', - handler: (status?: Status) => void, - ): BidirectionalStream - on( - type: 'status', - handler: (status: Status) => void, - ): BidirectionalStream -} - -export class ServiceClient { - readonly serviceHost: string - - constructor(serviceHost: string, options?: grpc.RpcOptions) - proof( - requestMessage: bandchain_v1_oracle_proof_pb.ProofRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_oracle_proof_pb.ProofResponse | null, - ) => void, - ): UnaryResponse - proof( - requestMessage: bandchain_v1_oracle_proof_pb.ProofRequest, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_oracle_proof_pb.ProofResponse | null, - ) => void, - ): UnaryResponse - multiProof( - requestMessage: bandchain_v1_oracle_proof_pb.MultiProofRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_oracle_proof_pb.MultiProofResponse | null, - ) => void, - ): UnaryResponse - multiProof( - requestMessage: bandchain_v1_oracle_proof_pb.MultiProofRequest, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_oracle_proof_pb.MultiProofResponse | null, - ) => void, - ): UnaryResponse - requestCountProof( - requestMessage: bandchain_v1_oracle_proof_pb.RequestCountProofRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_oracle_proof_pb.RequestCountProofResponse | null, - ) => void, - ): UnaryResponse - requestCountProof( - requestMessage: bandchain_v1_oracle_proof_pb.RequestCountProofRequest, - callback: ( - error: ServiceError | null, - responseMessage: bandchain_v1_oracle_proof_pb.RequestCountProofResponse | null, - ) => void, - ): UnaryResponse -} diff --git a/proto/bandchain/v1/oracle/proof_pb_service.js b/proto/bandchain/v1/oracle/proof_pb_service.js deleted file mode 100644 index 79e40ee..0000000 --- a/proto/bandchain/v1/oracle/proof_pb_service.js +++ /dev/null @@ -1,152 +0,0 @@ -// package: bandchain.v1.oracle -// file: bandchain/v1/oracle/proof.proto - -var bandchain_v1_oracle_proof_pb = require('../../../bandchain/v1/oracle/proof_pb') -var grpc = require('@improbable-eng/grpc-web').grpc - -var Service = (function () { - function Service() {} - Service.serviceName = 'bandchain.v1.oracle.Service' - return Service -})() - -Service.Proof = { - methodName: 'Proof', - service: Service, - requestStream: false, - responseStream: false, - requestType: bandchain_v1_oracle_proof_pb.ProofRequest, - responseType: bandchain_v1_oracle_proof_pb.ProofResponse, -} - -Service.MultiProof = { - methodName: 'MultiProof', - service: Service, - requestStream: false, - responseStream: false, - requestType: bandchain_v1_oracle_proof_pb.MultiProofRequest, - responseType: bandchain_v1_oracle_proof_pb.MultiProofResponse, -} - -Service.RequestCountProof = { - methodName: 'RequestCountProof', - service: Service, - requestStream: false, - responseStream: false, - requestType: bandchain_v1_oracle_proof_pb.RequestCountProofRequest, - responseType: bandchain_v1_oracle_proof_pb.RequestCountProofResponse, -} - -exports.Service = Service - -function ServiceClient(serviceHost, options) { - this.serviceHost = serviceHost - this.options = options || {} -} - -ServiceClient.prototype.proof = function proof( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Service.Proof, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -ServiceClient.prototype.multiProof = function multiProof( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Service.MultiProof, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -ServiceClient.prototype.requestCountProof = function requestCountProof( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Service.RequestCountProof, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -exports.ServiceClient = ServiceClient diff --git a/proto/chain b/proto/chain new file mode 160000 index 0000000..602d1c0 --- /dev/null +++ b/proto/chain @@ -0,0 +1 @@ +Subproject commit 602d1c0c29fe8ce41004fe9c23115d731e610287 diff --git a/proto/confio/proofs_pb.d.ts b/proto/confio/proofs_pb.d.ts deleted file mode 100644 index 1fd8044..0000000 --- a/proto/confio/proofs_pb.d.ts +++ /dev/null @@ -1,497 +0,0 @@ -// package: ics23 -// file: confio/proofs.proto - -import * as jspb from "google-protobuf"; - -export class ExistenceProof extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - getValue(): Uint8Array | string; - getValue_asU8(): Uint8Array; - getValue_asB64(): string; - setValue(value: Uint8Array | string): void; - - hasLeaf(): boolean; - clearLeaf(): void; - getLeaf(): LeafOp | undefined; - setLeaf(value?: LeafOp): void; - - clearPathList(): void; - getPathList(): Array; - setPathList(value: Array): void; - addPath(value?: InnerOp, index?: number): InnerOp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExistenceProof.AsObject; - static toObject(includeInstance: boolean, msg: ExistenceProof): ExistenceProof.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExistenceProof, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExistenceProof; - static deserializeBinaryFromReader(message: ExistenceProof, reader: jspb.BinaryReader): ExistenceProof; -} - -export namespace ExistenceProof { - export type AsObject = { - key: Uint8Array | string, - value: Uint8Array | string, - leaf?: LeafOp.AsObject, - pathList: Array, - } -} - -export class NonExistenceProof extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - hasLeft(): boolean; - clearLeft(): void; - getLeft(): ExistenceProof | undefined; - setLeft(value?: ExistenceProof): void; - - hasRight(): boolean; - clearRight(): void; - getRight(): ExistenceProof | undefined; - setRight(value?: ExistenceProof): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonExistenceProof.AsObject; - static toObject(includeInstance: boolean, msg: NonExistenceProof): NonExistenceProof.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonExistenceProof, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonExistenceProof; - static deserializeBinaryFromReader(message: NonExistenceProof, reader: jspb.BinaryReader): NonExistenceProof; -} - -export namespace NonExistenceProof { - export type AsObject = { - key: Uint8Array | string, - left?: ExistenceProof.AsObject, - right?: ExistenceProof.AsObject, - } -} - -export class CommitmentProof extends jspb.Message { - hasExist(): boolean; - clearExist(): void; - getExist(): ExistenceProof | undefined; - setExist(value?: ExistenceProof): void; - - hasNonexist(): boolean; - clearNonexist(): void; - getNonexist(): NonExistenceProof | undefined; - setNonexist(value?: NonExistenceProof): void; - - hasBatch(): boolean; - clearBatch(): void; - getBatch(): BatchProof | undefined; - setBatch(value?: BatchProof): void; - - hasCompressed(): boolean; - clearCompressed(): void; - getCompressed(): CompressedBatchProof | undefined; - setCompressed(value?: CompressedBatchProof): void; - - getProofCase(): CommitmentProof.ProofCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CommitmentProof.AsObject; - static toObject(includeInstance: boolean, msg: CommitmentProof): CommitmentProof.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CommitmentProof, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CommitmentProof; - static deserializeBinaryFromReader(message: CommitmentProof, reader: jspb.BinaryReader): CommitmentProof; -} - -export namespace CommitmentProof { - export type AsObject = { - exist?: ExistenceProof.AsObject, - nonexist?: NonExistenceProof.AsObject, - batch?: BatchProof.AsObject, - compressed?: CompressedBatchProof.AsObject, - } - - export enum ProofCase { - PROOF_NOT_SET = 0, - EXIST = 1, - NONEXIST = 2, - BATCH = 3, - COMPRESSED = 4, - } -} - -export class LeafOp extends jspb.Message { - getHash(): HashOpMap[keyof HashOpMap]; - setHash(value: HashOpMap[keyof HashOpMap]): void; - - getPrehashKey(): HashOpMap[keyof HashOpMap]; - setPrehashKey(value: HashOpMap[keyof HashOpMap]): void; - - getPrehashValue(): HashOpMap[keyof HashOpMap]; - setPrehashValue(value: HashOpMap[keyof HashOpMap]): void; - - getLength(): LengthOpMap[keyof LengthOpMap]; - setLength(value: LengthOpMap[keyof LengthOpMap]): void; - - getPrefix(): Uint8Array | string; - getPrefix_asU8(): Uint8Array; - getPrefix_asB64(): string; - setPrefix(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LeafOp.AsObject; - static toObject(includeInstance: boolean, msg: LeafOp): LeafOp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LeafOp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LeafOp; - static deserializeBinaryFromReader(message: LeafOp, reader: jspb.BinaryReader): LeafOp; -} - -export namespace LeafOp { - export type AsObject = { - hash: HashOpMap[keyof HashOpMap], - prehashKey: HashOpMap[keyof HashOpMap], - prehashValue: HashOpMap[keyof HashOpMap], - length: LengthOpMap[keyof LengthOpMap], - prefix: Uint8Array | string, - } -} - -export class InnerOp extends jspb.Message { - getHash(): HashOpMap[keyof HashOpMap]; - setHash(value: HashOpMap[keyof HashOpMap]): void; - - getPrefix(): Uint8Array | string; - getPrefix_asU8(): Uint8Array; - getPrefix_asB64(): string; - setPrefix(value: Uint8Array | string): void; - - getSuffix(): Uint8Array | string; - getSuffix_asU8(): Uint8Array; - getSuffix_asB64(): string; - setSuffix(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InnerOp.AsObject; - static toObject(includeInstance: boolean, msg: InnerOp): InnerOp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InnerOp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InnerOp; - static deserializeBinaryFromReader(message: InnerOp, reader: jspb.BinaryReader): InnerOp; -} - -export namespace InnerOp { - export type AsObject = { - hash: HashOpMap[keyof HashOpMap], - prefix: Uint8Array | string, - suffix: Uint8Array | string, - } -} - -export class ProofSpec extends jspb.Message { - hasLeafSpec(): boolean; - clearLeafSpec(): void; - getLeafSpec(): LeafOp | undefined; - setLeafSpec(value?: LeafOp): void; - - hasInnerSpec(): boolean; - clearInnerSpec(): void; - getInnerSpec(): InnerSpec | undefined; - setInnerSpec(value?: InnerSpec): void; - - getMaxDepth(): number; - setMaxDepth(value: number): void; - - getMinDepth(): number; - setMinDepth(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProofSpec.AsObject; - static toObject(includeInstance: boolean, msg: ProofSpec): ProofSpec.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProofSpec, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProofSpec; - static deserializeBinaryFromReader(message: ProofSpec, reader: jspb.BinaryReader): ProofSpec; -} - -export namespace ProofSpec { - export type AsObject = { - leafSpec?: LeafOp.AsObject, - innerSpec?: InnerSpec.AsObject, - maxDepth: number, - minDepth: number, - } -} - -export class InnerSpec extends jspb.Message { - clearChildOrderList(): void; - getChildOrderList(): Array; - setChildOrderList(value: Array): void; - addChildOrder(value: number, index?: number): number; - - getChildSize(): number; - setChildSize(value: number): void; - - getMinPrefixLength(): number; - setMinPrefixLength(value: number): void; - - getMaxPrefixLength(): number; - setMaxPrefixLength(value: number): void; - - getEmptyChild(): Uint8Array | string; - getEmptyChild_asU8(): Uint8Array; - getEmptyChild_asB64(): string; - setEmptyChild(value: Uint8Array | string): void; - - getHash(): HashOpMap[keyof HashOpMap]; - setHash(value: HashOpMap[keyof HashOpMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InnerSpec.AsObject; - static toObject(includeInstance: boolean, msg: InnerSpec): InnerSpec.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InnerSpec, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InnerSpec; - static deserializeBinaryFromReader(message: InnerSpec, reader: jspb.BinaryReader): InnerSpec; -} - -export namespace InnerSpec { - export type AsObject = { - childOrderList: Array, - childSize: number, - minPrefixLength: number, - maxPrefixLength: number, - emptyChild: Uint8Array | string, - hash: HashOpMap[keyof HashOpMap], - } -} - -export class BatchProof extends jspb.Message { - clearEntriesList(): void; - getEntriesList(): Array; - setEntriesList(value: Array): void; - addEntries(value?: BatchEntry, index?: number): BatchEntry; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchProof.AsObject; - static toObject(includeInstance: boolean, msg: BatchProof): BatchProof.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchProof, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchProof; - static deserializeBinaryFromReader(message: BatchProof, reader: jspb.BinaryReader): BatchProof; -} - -export namespace BatchProof { - export type AsObject = { - entriesList: Array, - } -} - -export class BatchEntry extends jspb.Message { - hasExist(): boolean; - clearExist(): void; - getExist(): ExistenceProof | undefined; - setExist(value?: ExistenceProof): void; - - hasNonexist(): boolean; - clearNonexist(): void; - getNonexist(): NonExistenceProof | undefined; - setNonexist(value?: NonExistenceProof): void; - - getProofCase(): BatchEntry.ProofCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchEntry.AsObject; - static toObject(includeInstance: boolean, msg: BatchEntry): BatchEntry.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchEntry, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchEntry; - static deserializeBinaryFromReader(message: BatchEntry, reader: jspb.BinaryReader): BatchEntry; -} - -export namespace BatchEntry { - export type AsObject = { - exist?: ExistenceProof.AsObject, - nonexist?: NonExistenceProof.AsObject, - } - - export enum ProofCase { - PROOF_NOT_SET = 0, - EXIST = 1, - NONEXIST = 2, - } -} - -export class CompressedBatchProof extends jspb.Message { - clearEntriesList(): void; - getEntriesList(): Array; - setEntriesList(value: Array): void; - addEntries(value?: CompressedBatchEntry, index?: number): CompressedBatchEntry; - - clearLookupInnersList(): void; - getLookupInnersList(): Array; - setLookupInnersList(value: Array): void; - addLookupInners(value?: InnerOp, index?: number): InnerOp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CompressedBatchProof.AsObject; - static toObject(includeInstance: boolean, msg: CompressedBatchProof): CompressedBatchProof.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CompressedBatchProof, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CompressedBatchProof; - static deserializeBinaryFromReader(message: CompressedBatchProof, reader: jspb.BinaryReader): CompressedBatchProof; -} - -export namespace CompressedBatchProof { - export type AsObject = { - entriesList: Array, - lookupInnersList: Array, - } -} - -export class CompressedBatchEntry extends jspb.Message { - hasExist(): boolean; - clearExist(): void; - getExist(): CompressedExistenceProof | undefined; - setExist(value?: CompressedExistenceProof): void; - - hasNonexist(): boolean; - clearNonexist(): void; - getNonexist(): CompressedNonExistenceProof | undefined; - setNonexist(value?: CompressedNonExistenceProof): void; - - getProofCase(): CompressedBatchEntry.ProofCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CompressedBatchEntry.AsObject; - static toObject(includeInstance: boolean, msg: CompressedBatchEntry): CompressedBatchEntry.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CompressedBatchEntry, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CompressedBatchEntry; - static deserializeBinaryFromReader(message: CompressedBatchEntry, reader: jspb.BinaryReader): CompressedBatchEntry; -} - -export namespace CompressedBatchEntry { - export type AsObject = { - exist?: CompressedExistenceProof.AsObject, - nonexist?: CompressedNonExistenceProof.AsObject, - } - - export enum ProofCase { - PROOF_NOT_SET = 0, - EXIST = 1, - NONEXIST = 2, - } -} - -export class CompressedExistenceProof extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - getValue(): Uint8Array | string; - getValue_asU8(): Uint8Array; - getValue_asB64(): string; - setValue(value: Uint8Array | string): void; - - hasLeaf(): boolean; - clearLeaf(): void; - getLeaf(): LeafOp | undefined; - setLeaf(value?: LeafOp): void; - - clearPathList(): void; - getPathList(): Array; - setPathList(value: Array): void; - addPath(value: number, index?: number): number; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CompressedExistenceProof.AsObject; - static toObject(includeInstance: boolean, msg: CompressedExistenceProof): CompressedExistenceProof.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CompressedExistenceProof, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CompressedExistenceProof; - static deserializeBinaryFromReader(message: CompressedExistenceProof, reader: jspb.BinaryReader): CompressedExistenceProof; -} - -export namespace CompressedExistenceProof { - export type AsObject = { - key: Uint8Array | string, - value: Uint8Array | string, - leaf?: LeafOp.AsObject, - pathList: Array, - } -} - -export class CompressedNonExistenceProof extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - hasLeft(): boolean; - clearLeft(): void; - getLeft(): CompressedExistenceProof | undefined; - setLeft(value?: CompressedExistenceProof): void; - - hasRight(): boolean; - clearRight(): void; - getRight(): CompressedExistenceProof | undefined; - setRight(value?: CompressedExistenceProof): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CompressedNonExistenceProof.AsObject; - static toObject(includeInstance: boolean, msg: CompressedNonExistenceProof): CompressedNonExistenceProof.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CompressedNonExistenceProof, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CompressedNonExistenceProof; - static deserializeBinaryFromReader(message: CompressedNonExistenceProof, reader: jspb.BinaryReader): CompressedNonExistenceProof; -} - -export namespace CompressedNonExistenceProof { - export type AsObject = { - key: Uint8Array | string, - left?: CompressedExistenceProof.AsObject, - right?: CompressedExistenceProof.AsObject, - } -} - -export interface HashOpMap { - NO_HASH: 0; - SHA256: 1; - SHA512: 2; - KECCAK: 3; - RIPEMD160: 4; - BITCOIN: 5; -} - -export const HashOp: HashOpMap; - -export interface LengthOpMap { - NO_PREFIX: 0; - VAR_PROTO: 1; - VAR_RLP: 2; - FIXED32_BIG: 3; - FIXED32_LITTLE: 4; - FIXED64_BIG: 5; - FIXED64_LITTLE: 6; - REQUIRE_32_BYTES: 7; - REQUIRE_64_BYTES: 8; -} - -export const LengthOp: LengthOpMap; - diff --git a/proto/confio/proofs_pb.js b/proto/confio/proofs_pb.js deleted file mode 100644 index 283738c..0000000 --- a/proto/confio/proofs_pb.js +++ /dev/null @@ -1,3751 +0,0 @@ -// source: confio/proofs.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.ics23.BatchEntry', null, global); -goog.exportSymbol('proto.ics23.BatchEntry.ProofCase', null, global); -goog.exportSymbol('proto.ics23.BatchProof', null, global); -goog.exportSymbol('proto.ics23.CommitmentProof', null, global); -goog.exportSymbol('proto.ics23.CommitmentProof.ProofCase', null, global); -goog.exportSymbol('proto.ics23.CompressedBatchEntry', null, global); -goog.exportSymbol('proto.ics23.CompressedBatchEntry.ProofCase', null, global); -goog.exportSymbol('proto.ics23.CompressedBatchProof', null, global); -goog.exportSymbol('proto.ics23.CompressedExistenceProof', null, global); -goog.exportSymbol('proto.ics23.CompressedNonExistenceProof', null, global); -goog.exportSymbol('proto.ics23.ExistenceProof', null, global); -goog.exportSymbol('proto.ics23.HashOp', null, global); -goog.exportSymbol('proto.ics23.InnerOp', null, global); -goog.exportSymbol('proto.ics23.InnerSpec', null, global); -goog.exportSymbol('proto.ics23.LeafOp', null, global); -goog.exportSymbol('proto.ics23.LengthOp', null, global); -goog.exportSymbol('proto.ics23.NonExistenceProof', null, global); -goog.exportSymbol('proto.ics23.ProofSpec', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.ExistenceProof = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ics23.ExistenceProof.repeatedFields_, null); -}; -goog.inherits(proto.ics23.ExistenceProof, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.ExistenceProof.displayName = 'proto.ics23.ExistenceProof'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.NonExistenceProof = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ics23.NonExistenceProof, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.NonExistenceProof.displayName = 'proto.ics23.NonExistenceProof'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.CommitmentProof = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ics23.CommitmentProof.oneofGroups_); -}; -goog.inherits(proto.ics23.CommitmentProof, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.CommitmentProof.displayName = 'proto.ics23.CommitmentProof'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.LeafOp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ics23.LeafOp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.LeafOp.displayName = 'proto.ics23.LeafOp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.InnerOp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ics23.InnerOp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.InnerOp.displayName = 'proto.ics23.InnerOp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.ProofSpec = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ics23.ProofSpec, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.ProofSpec.displayName = 'proto.ics23.ProofSpec'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.InnerSpec = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ics23.InnerSpec.repeatedFields_, null); -}; -goog.inherits(proto.ics23.InnerSpec, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.InnerSpec.displayName = 'proto.ics23.InnerSpec'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.BatchProof = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ics23.BatchProof.repeatedFields_, null); -}; -goog.inherits(proto.ics23.BatchProof, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.BatchProof.displayName = 'proto.ics23.BatchProof'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.BatchEntry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ics23.BatchEntry.oneofGroups_); -}; -goog.inherits(proto.ics23.BatchEntry, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.BatchEntry.displayName = 'proto.ics23.BatchEntry'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.CompressedBatchProof = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ics23.CompressedBatchProof.repeatedFields_, null); -}; -goog.inherits(proto.ics23.CompressedBatchProof, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.CompressedBatchProof.displayName = 'proto.ics23.CompressedBatchProof'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.CompressedBatchEntry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ics23.CompressedBatchEntry.oneofGroups_); -}; -goog.inherits(proto.ics23.CompressedBatchEntry, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.CompressedBatchEntry.displayName = 'proto.ics23.CompressedBatchEntry'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.CompressedExistenceProof = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ics23.CompressedExistenceProof.repeatedFields_, null); -}; -goog.inherits(proto.ics23.CompressedExistenceProof, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.CompressedExistenceProof.displayName = 'proto.ics23.CompressedExistenceProof'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ics23.CompressedNonExistenceProof = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ics23.CompressedNonExistenceProof, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ics23.CompressedNonExistenceProof.displayName = 'proto.ics23.CompressedNonExistenceProof'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ics23.ExistenceProof.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.ExistenceProof.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.ExistenceProof.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.ExistenceProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.ExistenceProof.toObject = function(includeInstance, msg) { - var f, obj = { - key: msg.getKey_asB64(), - value: msg.getValue_asB64(), - leaf: (f = msg.getLeaf()) && proto.ics23.LeafOp.toObject(includeInstance, f), - pathList: jspb.Message.toObjectList(msg.getPathList(), - proto.ics23.InnerOp.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.ExistenceProof} - */ -proto.ics23.ExistenceProof.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.ExistenceProof; - return proto.ics23.ExistenceProof.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.ExistenceProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.ExistenceProof} - */ -proto.ics23.ExistenceProof.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); - break; - case 3: - var value = new proto.ics23.LeafOp; - reader.readMessage(value,proto.ics23.LeafOp.deserializeBinaryFromReader); - msg.setLeaf(value); - break; - case 4: - var value = new proto.ics23.InnerOp; - reader.readMessage(value,proto.ics23.InnerOp.deserializeBinaryFromReader); - msg.addPath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.ExistenceProof.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.ExistenceProof.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.ExistenceProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.ExistenceProof.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getLeaf(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ics23.LeafOp.serializeBinaryToWriter - ); - } - f = message.getPathList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.ics23.InnerOp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes key = 1; - * @return {!(string|Uint8Array)} - */ -proto.ics23.ExistenceProof.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes key = 1; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.ics23.ExistenceProof.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.ics23.ExistenceProof.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.ExistenceProof} returns this - */ -proto.ics23.ExistenceProof.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes value = 2; - * @return {!(string|Uint8Array)} - */ -proto.ics23.ExistenceProof.prototype.getValue = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes value = 2; - * This is a type-conversion wrapper around `getValue()` - * @return {string} - */ -proto.ics23.ExistenceProof.prototype.getValue_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); -}; - - -/** - * optional bytes value = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` - * @return {!Uint8Array} - */ -proto.ics23.ExistenceProof.prototype.getValue_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.ExistenceProof} returns this - */ -proto.ics23.ExistenceProof.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional LeafOp leaf = 3; - * @return {?proto.ics23.LeafOp} - */ -proto.ics23.ExistenceProof.prototype.getLeaf = function() { - return /** @type{?proto.ics23.LeafOp} */ ( - jspb.Message.getWrapperField(this, proto.ics23.LeafOp, 3)); -}; - - -/** - * @param {?proto.ics23.LeafOp|undefined} value - * @return {!proto.ics23.ExistenceProof} returns this -*/ -proto.ics23.ExistenceProof.prototype.setLeaf = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.ExistenceProof} returns this - */ -proto.ics23.ExistenceProof.prototype.clearLeaf = function() { - return this.setLeaf(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.ExistenceProof.prototype.hasLeaf = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * repeated InnerOp path = 4; - * @return {!Array} - */ -proto.ics23.ExistenceProof.prototype.getPathList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ics23.InnerOp, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ics23.ExistenceProof} returns this -*/ -proto.ics23.ExistenceProof.prototype.setPathList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.ics23.InnerOp=} opt_value - * @param {number=} opt_index - * @return {!proto.ics23.InnerOp} - */ -proto.ics23.ExistenceProof.prototype.addPath = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.ics23.InnerOp, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ics23.ExistenceProof} returns this - */ -proto.ics23.ExistenceProof.prototype.clearPathList = function() { - return this.setPathList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.NonExistenceProof.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.NonExistenceProof.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.NonExistenceProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.NonExistenceProof.toObject = function(includeInstance, msg) { - var f, obj = { - key: msg.getKey_asB64(), - left: (f = msg.getLeft()) && proto.ics23.ExistenceProof.toObject(includeInstance, f), - right: (f = msg.getRight()) && proto.ics23.ExistenceProof.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.NonExistenceProof} - */ -proto.ics23.NonExistenceProof.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.NonExistenceProof; - return proto.ics23.NonExistenceProof.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.NonExistenceProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.NonExistenceProof} - */ -proto.ics23.NonExistenceProof.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 2: - var value = new proto.ics23.ExistenceProof; - reader.readMessage(value,proto.ics23.ExistenceProof.deserializeBinaryFromReader); - msg.setLeft(value); - break; - case 3: - var value = new proto.ics23.ExistenceProof; - reader.readMessage(value,proto.ics23.ExistenceProof.deserializeBinaryFromReader); - msg.setRight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.NonExistenceProof.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.NonExistenceProof.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.NonExistenceProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.NonExistenceProof.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getLeft(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ics23.ExistenceProof.serializeBinaryToWriter - ); - } - f = message.getRight(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ics23.ExistenceProof.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes key = 1; - * @return {!(string|Uint8Array)} - */ -proto.ics23.NonExistenceProof.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes key = 1; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.ics23.NonExistenceProof.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.ics23.NonExistenceProof.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.NonExistenceProof} returns this - */ -proto.ics23.NonExistenceProof.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional ExistenceProof left = 2; - * @return {?proto.ics23.ExistenceProof} - */ -proto.ics23.NonExistenceProof.prototype.getLeft = function() { - return /** @type{?proto.ics23.ExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.ExistenceProof, 2)); -}; - - -/** - * @param {?proto.ics23.ExistenceProof|undefined} value - * @return {!proto.ics23.NonExistenceProof} returns this -*/ -proto.ics23.NonExistenceProof.prototype.setLeft = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.NonExistenceProof} returns this - */ -proto.ics23.NonExistenceProof.prototype.clearLeft = function() { - return this.setLeft(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.NonExistenceProof.prototype.hasLeft = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional ExistenceProof right = 3; - * @return {?proto.ics23.ExistenceProof} - */ -proto.ics23.NonExistenceProof.prototype.getRight = function() { - return /** @type{?proto.ics23.ExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.ExistenceProof, 3)); -}; - - -/** - * @param {?proto.ics23.ExistenceProof|undefined} value - * @return {!proto.ics23.NonExistenceProof} returns this -*/ -proto.ics23.NonExistenceProof.prototype.setRight = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.NonExistenceProof} returns this - */ -proto.ics23.NonExistenceProof.prototype.clearRight = function() { - return this.setRight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.NonExistenceProof.prototype.hasRight = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.ics23.CommitmentProof.oneofGroups_ = [[1,2,3,4]]; - -/** - * @enum {number} - */ -proto.ics23.CommitmentProof.ProofCase = { - PROOF_NOT_SET: 0, - EXIST: 1, - NONEXIST: 2, - BATCH: 3, - COMPRESSED: 4 -}; - -/** - * @return {proto.ics23.CommitmentProof.ProofCase} - */ -proto.ics23.CommitmentProof.prototype.getProofCase = function() { - return /** @type {proto.ics23.CommitmentProof.ProofCase} */(jspb.Message.computeOneofCase(this, proto.ics23.CommitmentProof.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.CommitmentProof.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.CommitmentProof.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.CommitmentProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CommitmentProof.toObject = function(includeInstance, msg) { - var f, obj = { - exist: (f = msg.getExist()) && proto.ics23.ExistenceProof.toObject(includeInstance, f), - nonexist: (f = msg.getNonexist()) && proto.ics23.NonExistenceProof.toObject(includeInstance, f), - batch: (f = msg.getBatch()) && proto.ics23.BatchProof.toObject(includeInstance, f), - compressed: (f = msg.getCompressed()) && proto.ics23.CompressedBatchProof.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.CommitmentProof} - */ -proto.ics23.CommitmentProof.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.CommitmentProof; - return proto.ics23.CommitmentProof.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.CommitmentProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.CommitmentProof} - */ -proto.ics23.CommitmentProof.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ics23.ExistenceProof; - reader.readMessage(value,proto.ics23.ExistenceProof.deserializeBinaryFromReader); - msg.setExist(value); - break; - case 2: - var value = new proto.ics23.NonExistenceProof; - reader.readMessage(value,proto.ics23.NonExistenceProof.deserializeBinaryFromReader); - msg.setNonexist(value); - break; - case 3: - var value = new proto.ics23.BatchProof; - reader.readMessage(value,proto.ics23.BatchProof.deserializeBinaryFromReader); - msg.setBatch(value); - break; - case 4: - var value = new proto.ics23.CompressedBatchProof; - reader.readMessage(value,proto.ics23.CompressedBatchProof.deserializeBinaryFromReader); - msg.setCompressed(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.CommitmentProof.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.CommitmentProof.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.CommitmentProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CommitmentProof.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getExist(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ics23.ExistenceProof.serializeBinaryToWriter - ); - } - f = message.getNonexist(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ics23.NonExistenceProof.serializeBinaryToWriter - ); - } - f = message.getBatch(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ics23.BatchProof.serializeBinaryToWriter - ); - } - f = message.getCompressed(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.ics23.CompressedBatchProof.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ExistenceProof exist = 1; - * @return {?proto.ics23.ExistenceProof} - */ -proto.ics23.CommitmentProof.prototype.getExist = function() { - return /** @type{?proto.ics23.ExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.ExistenceProof, 1)); -}; - - -/** - * @param {?proto.ics23.ExistenceProof|undefined} value - * @return {!proto.ics23.CommitmentProof} returns this -*/ -proto.ics23.CommitmentProof.prototype.setExist = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.ics23.CommitmentProof.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.CommitmentProof} returns this - */ -proto.ics23.CommitmentProof.prototype.clearExist = function() { - return this.setExist(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.CommitmentProof.prototype.hasExist = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional NonExistenceProof nonexist = 2; - * @return {?proto.ics23.NonExistenceProof} - */ -proto.ics23.CommitmentProof.prototype.getNonexist = function() { - return /** @type{?proto.ics23.NonExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.NonExistenceProof, 2)); -}; - - -/** - * @param {?proto.ics23.NonExistenceProof|undefined} value - * @return {!proto.ics23.CommitmentProof} returns this -*/ -proto.ics23.CommitmentProof.prototype.setNonexist = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.ics23.CommitmentProof.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.CommitmentProof} returns this - */ -proto.ics23.CommitmentProof.prototype.clearNonexist = function() { - return this.setNonexist(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.CommitmentProof.prototype.hasNonexist = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional BatchProof batch = 3; - * @return {?proto.ics23.BatchProof} - */ -proto.ics23.CommitmentProof.prototype.getBatch = function() { - return /** @type{?proto.ics23.BatchProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.BatchProof, 3)); -}; - - -/** - * @param {?proto.ics23.BatchProof|undefined} value - * @return {!proto.ics23.CommitmentProof} returns this -*/ -proto.ics23.CommitmentProof.prototype.setBatch = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.ics23.CommitmentProof.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.CommitmentProof} returns this - */ -proto.ics23.CommitmentProof.prototype.clearBatch = function() { - return this.setBatch(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.CommitmentProof.prototype.hasBatch = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional CompressedBatchProof compressed = 4; - * @return {?proto.ics23.CompressedBatchProof} - */ -proto.ics23.CommitmentProof.prototype.getCompressed = function() { - return /** @type{?proto.ics23.CompressedBatchProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.CompressedBatchProof, 4)); -}; - - -/** - * @param {?proto.ics23.CompressedBatchProof|undefined} value - * @return {!proto.ics23.CommitmentProof} returns this -*/ -proto.ics23.CommitmentProof.prototype.setCompressed = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.ics23.CommitmentProof.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.CommitmentProof} returns this - */ -proto.ics23.CommitmentProof.prototype.clearCompressed = function() { - return this.setCompressed(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.CommitmentProof.prototype.hasCompressed = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.LeafOp.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.LeafOp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.LeafOp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.LeafOp.toObject = function(includeInstance, msg) { - var f, obj = { - hash: jspb.Message.getFieldWithDefault(msg, 1, 0), - prehashKey: jspb.Message.getFieldWithDefault(msg, 2, 0), - prehashValue: jspb.Message.getFieldWithDefault(msg, 3, 0), - length: jspb.Message.getFieldWithDefault(msg, 4, 0), - prefix: msg.getPrefix_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.LeafOp} - */ -proto.ics23.LeafOp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.LeafOp; - return proto.ics23.LeafOp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.LeafOp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.LeafOp} - */ -proto.ics23.LeafOp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.ics23.HashOp} */ (reader.readEnum()); - msg.setHash(value); - break; - case 2: - var value = /** @type {!proto.ics23.HashOp} */ (reader.readEnum()); - msg.setPrehashKey(value); - break; - case 3: - var value = /** @type {!proto.ics23.HashOp} */ (reader.readEnum()); - msg.setPrehashValue(value); - break; - case 4: - var value = /** @type {!proto.ics23.LengthOp} */ (reader.readEnum()); - msg.setLength(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPrefix(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.LeafOp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.LeafOp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.LeafOp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.LeafOp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getPrehashKey(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getPrehashValue(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getLength(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } - f = message.getPrefix_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional HashOp hash = 1; - * @return {!proto.ics23.HashOp} - */ -proto.ics23.LeafOp.prototype.getHash = function() { - return /** @type {!proto.ics23.HashOp} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.ics23.HashOp} value - * @return {!proto.ics23.LeafOp} returns this - */ -proto.ics23.LeafOp.prototype.setHash = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional HashOp prehash_key = 2; - * @return {!proto.ics23.HashOp} - */ -proto.ics23.LeafOp.prototype.getPrehashKey = function() { - return /** @type {!proto.ics23.HashOp} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.ics23.HashOp} value - * @return {!proto.ics23.LeafOp} returns this - */ -proto.ics23.LeafOp.prototype.setPrehashKey = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional HashOp prehash_value = 3; - * @return {!proto.ics23.HashOp} - */ -proto.ics23.LeafOp.prototype.getPrehashValue = function() { - return /** @type {!proto.ics23.HashOp} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.ics23.HashOp} value - * @return {!proto.ics23.LeafOp} returns this - */ -proto.ics23.LeafOp.prototype.setPrehashValue = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional LengthOp length = 4; - * @return {!proto.ics23.LengthOp} - */ -proto.ics23.LeafOp.prototype.getLength = function() { - return /** @type {!proto.ics23.LengthOp} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.ics23.LengthOp} value - * @return {!proto.ics23.LeafOp} returns this - */ -proto.ics23.LeafOp.prototype.setLength = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - -/** - * optional bytes prefix = 5; - * @return {!(string|Uint8Array)} - */ -proto.ics23.LeafOp.prototype.getPrefix = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes prefix = 5; - * This is a type-conversion wrapper around `getPrefix()` - * @return {string} - */ -proto.ics23.LeafOp.prototype.getPrefix_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPrefix())); -}; - - -/** - * optional bytes prefix = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPrefix()` - * @return {!Uint8Array} - */ -proto.ics23.LeafOp.prototype.getPrefix_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPrefix())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.LeafOp} returns this - */ -proto.ics23.LeafOp.prototype.setPrefix = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.InnerOp.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.InnerOp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.InnerOp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.InnerOp.toObject = function(includeInstance, msg) { - var f, obj = { - hash: jspb.Message.getFieldWithDefault(msg, 1, 0), - prefix: msg.getPrefix_asB64(), - suffix: msg.getSuffix_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.InnerOp} - */ -proto.ics23.InnerOp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.InnerOp; - return proto.ics23.InnerOp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.InnerOp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.InnerOp} - */ -proto.ics23.InnerOp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.ics23.HashOp} */ (reader.readEnum()); - msg.setHash(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPrefix(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSuffix(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.InnerOp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.InnerOp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.InnerOp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.InnerOp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getPrefix_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getSuffix_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional HashOp hash = 1; - * @return {!proto.ics23.HashOp} - */ -proto.ics23.InnerOp.prototype.getHash = function() { - return /** @type {!proto.ics23.HashOp} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.ics23.HashOp} value - * @return {!proto.ics23.InnerOp} returns this - */ -proto.ics23.InnerOp.prototype.setHash = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional bytes prefix = 2; - * @return {!(string|Uint8Array)} - */ -proto.ics23.InnerOp.prototype.getPrefix = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes prefix = 2; - * This is a type-conversion wrapper around `getPrefix()` - * @return {string} - */ -proto.ics23.InnerOp.prototype.getPrefix_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPrefix())); -}; - - -/** - * optional bytes prefix = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPrefix()` - * @return {!Uint8Array} - */ -proto.ics23.InnerOp.prototype.getPrefix_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPrefix())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.InnerOp} returns this - */ -proto.ics23.InnerOp.prototype.setPrefix = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes suffix = 3; - * @return {!(string|Uint8Array)} - */ -proto.ics23.InnerOp.prototype.getSuffix = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes suffix = 3; - * This is a type-conversion wrapper around `getSuffix()` - * @return {string} - */ -proto.ics23.InnerOp.prototype.getSuffix_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSuffix())); -}; - - -/** - * optional bytes suffix = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSuffix()` - * @return {!Uint8Array} - */ -proto.ics23.InnerOp.prototype.getSuffix_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSuffix())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.InnerOp} returns this - */ -proto.ics23.InnerOp.prototype.setSuffix = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.ProofSpec.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.ProofSpec.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.ProofSpec} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.ProofSpec.toObject = function(includeInstance, msg) { - var f, obj = { - leafSpec: (f = msg.getLeafSpec()) && proto.ics23.LeafOp.toObject(includeInstance, f), - innerSpec: (f = msg.getInnerSpec()) && proto.ics23.InnerSpec.toObject(includeInstance, f), - maxDepth: jspb.Message.getFieldWithDefault(msg, 3, 0), - minDepth: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.ProofSpec} - */ -proto.ics23.ProofSpec.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.ProofSpec; - return proto.ics23.ProofSpec.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.ProofSpec} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.ProofSpec} - */ -proto.ics23.ProofSpec.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ics23.LeafOp; - reader.readMessage(value,proto.ics23.LeafOp.deserializeBinaryFromReader); - msg.setLeafSpec(value); - break; - case 2: - var value = new proto.ics23.InnerSpec; - reader.readMessage(value,proto.ics23.InnerSpec.deserializeBinaryFromReader); - msg.setInnerSpec(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxDepth(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinDepth(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.ProofSpec.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.ProofSpec.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.ProofSpec} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.ProofSpec.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLeafSpec(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ics23.LeafOp.serializeBinaryToWriter - ); - } - f = message.getInnerSpec(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ics23.InnerSpec.serializeBinaryToWriter - ); - } - f = message.getMaxDepth(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getMinDepth(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } -}; - - -/** - * optional LeafOp leaf_spec = 1; - * @return {?proto.ics23.LeafOp} - */ -proto.ics23.ProofSpec.prototype.getLeafSpec = function() { - return /** @type{?proto.ics23.LeafOp} */ ( - jspb.Message.getWrapperField(this, proto.ics23.LeafOp, 1)); -}; - - -/** - * @param {?proto.ics23.LeafOp|undefined} value - * @return {!proto.ics23.ProofSpec} returns this -*/ -proto.ics23.ProofSpec.prototype.setLeafSpec = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.ProofSpec} returns this - */ -proto.ics23.ProofSpec.prototype.clearLeafSpec = function() { - return this.setLeafSpec(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.ProofSpec.prototype.hasLeafSpec = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional InnerSpec inner_spec = 2; - * @return {?proto.ics23.InnerSpec} - */ -proto.ics23.ProofSpec.prototype.getInnerSpec = function() { - return /** @type{?proto.ics23.InnerSpec} */ ( - jspb.Message.getWrapperField(this, proto.ics23.InnerSpec, 2)); -}; - - -/** - * @param {?proto.ics23.InnerSpec|undefined} value - * @return {!proto.ics23.ProofSpec} returns this -*/ -proto.ics23.ProofSpec.prototype.setInnerSpec = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.ProofSpec} returns this - */ -proto.ics23.ProofSpec.prototype.clearInnerSpec = function() { - return this.setInnerSpec(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.ProofSpec.prototype.hasInnerSpec = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int32 max_depth = 3; - * @return {number} - */ -proto.ics23.ProofSpec.prototype.getMaxDepth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ics23.ProofSpec} returns this - */ -proto.ics23.ProofSpec.prototype.setMaxDepth = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 min_depth = 4; - * @return {number} - */ -proto.ics23.ProofSpec.prototype.getMinDepth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ics23.ProofSpec} returns this - */ -proto.ics23.ProofSpec.prototype.setMinDepth = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ics23.InnerSpec.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.InnerSpec.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.InnerSpec.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.InnerSpec} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.InnerSpec.toObject = function(includeInstance, msg) { - var f, obj = { - childOrderList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - childSize: jspb.Message.getFieldWithDefault(msg, 2, 0), - minPrefixLength: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxPrefixLength: jspb.Message.getFieldWithDefault(msg, 4, 0), - emptyChild: msg.getEmptyChild_asB64(), - hash: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.InnerSpec} - */ -proto.ics23.InnerSpec.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.InnerSpec; - return proto.ics23.InnerSpec.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.InnerSpec} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.InnerSpec} - */ -proto.ics23.InnerSpec.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); - for (var i = 0; i < values.length; i++) { - msg.addChildOrder(values[i]); - } - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setChildSize(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinPrefixLength(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxPrefixLength(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEmptyChild(value); - break; - case 6: - var value = /** @type {!proto.ics23.HashOp} */ (reader.readEnum()); - msg.setHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.InnerSpec.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.InnerSpec.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.InnerSpec} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.InnerSpec.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChildOrderList(); - if (f.length > 0) { - writer.writePackedInt32( - 1, - f - ); - } - f = message.getChildSize(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getMinPrefixLength(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getMaxPrefixLength(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getEmptyChild_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getHash(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } -}; - - -/** - * repeated int32 child_order = 1; - * @return {!Array} - */ -proto.ics23.InnerSpec.prototype.getChildOrderList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ics23.InnerSpec} returns this - */ -proto.ics23.InnerSpec.prototype.setChildOrderList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.ics23.InnerSpec} returns this - */ -proto.ics23.InnerSpec.prototype.addChildOrder = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ics23.InnerSpec} returns this - */ -proto.ics23.InnerSpec.prototype.clearChildOrderList = function() { - return this.setChildOrderList([]); -}; - - -/** - * optional int32 child_size = 2; - * @return {number} - */ -proto.ics23.InnerSpec.prototype.getChildSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ics23.InnerSpec} returns this - */ -proto.ics23.InnerSpec.prototype.setChildSize = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int32 min_prefix_length = 3; - * @return {number} - */ -proto.ics23.InnerSpec.prototype.getMinPrefixLength = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ics23.InnerSpec} returns this - */ -proto.ics23.InnerSpec.prototype.setMinPrefixLength = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 max_prefix_length = 4; - * @return {number} - */ -proto.ics23.InnerSpec.prototype.getMaxPrefixLength = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ics23.InnerSpec} returns this - */ -proto.ics23.InnerSpec.prototype.setMaxPrefixLength = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bytes empty_child = 5; - * @return {!(string|Uint8Array)} - */ -proto.ics23.InnerSpec.prototype.getEmptyChild = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes empty_child = 5; - * This is a type-conversion wrapper around `getEmptyChild()` - * @return {string} - */ -proto.ics23.InnerSpec.prototype.getEmptyChild_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEmptyChild())); -}; - - -/** - * optional bytes empty_child = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEmptyChild()` - * @return {!Uint8Array} - */ -proto.ics23.InnerSpec.prototype.getEmptyChild_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEmptyChild())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.InnerSpec} returns this - */ -proto.ics23.InnerSpec.prototype.setEmptyChild = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional HashOp hash = 6; - * @return {!proto.ics23.HashOp} - */ -proto.ics23.InnerSpec.prototype.getHash = function() { - return /** @type {!proto.ics23.HashOp} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.ics23.HashOp} value - * @return {!proto.ics23.InnerSpec} returns this - */ -proto.ics23.InnerSpec.prototype.setHash = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ics23.BatchProof.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.BatchProof.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.BatchProof.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.BatchProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.BatchProof.toObject = function(includeInstance, msg) { - var f, obj = { - entriesList: jspb.Message.toObjectList(msg.getEntriesList(), - proto.ics23.BatchEntry.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.BatchProof} - */ -proto.ics23.BatchProof.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.BatchProof; - return proto.ics23.BatchProof.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.BatchProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.BatchProof} - */ -proto.ics23.BatchProof.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ics23.BatchEntry; - reader.readMessage(value,proto.ics23.BatchEntry.deserializeBinaryFromReader); - msg.addEntries(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.BatchProof.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.BatchProof.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.BatchProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.BatchProof.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntriesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.ics23.BatchEntry.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated BatchEntry entries = 1; - * @return {!Array} - */ -proto.ics23.BatchProof.prototype.getEntriesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ics23.BatchEntry, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ics23.BatchProof} returns this -*/ -proto.ics23.BatchProof.prototype.setEntriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.ics23.BatchEntry=} opt_value - * @param {number=} opt_index - * @return {!proto.ics23.BatchEntry} - */ -proto.ics23.BatchProof.prototype.addEntries = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ics23.BatchEntry, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ics23.BatchProof} returns this - */ -proto.ics23.BatchProof.prototype.clearEntriesList = function() { - return this.setEntriesList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.ics23.BatchEntry.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.ics23.BatchEntry.ProofCase = { - PROOF_NOT_SET: 0, - EXIST: 1, - NONEXIST: 2 -}; - -/** - * @return {proto.ics23.BatchEntry.ProofCase} - */ -proto.ics23.BatchEntry.prototype.getProofCase = function() { - return /** @type {proto.ics23.BatchEntry.ProofCase} */(jspb.Message.computeOneofCase(this, proto.ics23.BatchEntry.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.BatchEntry.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.BatchEntry.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.BatchEntry} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.BatchEntry.toObject = function(includeInstance, msg) { - var f, obj = { - exist: (f = msg.getExist()) && proto.ics23.ExistenceProof.toObject(includeInstance, f), - nonexist: (f = msg.getNonexist()) && proto.ics23.NonExistenceProof.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.BatchEntry} - */ -proto.ics23.BatchEntry.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.BatchEntry; - return proto.ics23.BatchEntry.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.BatchEntry} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.BatchEntry} - */ -proto.ics23.BatchEntry.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ics23.ExistenceProof; - reader.readMessage(value,proto.ics23.ExistenceProof.deserializeBinaryFromReader); - msg.setExist(value); - break; - case 2: - var value = new proto.ics23.NonExistenceProof; - reader.readMessage(value,proto.ics23.NonExistenceProof.deserializeBinaryFromReader); - msg.setNonexist(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.BatchEntry.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.BatchEntry.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.BatchEntry} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.BatchEntry.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getExist(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ics23.ExistenceProof.serializeBinaryToWriter - ); - } - f = message.getNonexist(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ics23.NonExistenceProof.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ExistenceProof exist = 1; - * @return {?proto.ics23.ExistenceProof} - */ -proto.ics23.BatchEntry.prototype.getExist = function() { - return /** @type{?proto.ics23.ExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.ExistenceProof, 1)); -}; - - -/** - * @param {?proto.ics23.ExistenceProof|undefined} value - * @return {!proto.ics23.BatchEntry} returns this -*/ -proto.ics23.BatchEntry.prototype.setExist = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.ics23.BatchEntry.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.BatchEntry} returns this - */ -proto.ics23.BatchEntry.prototype.clearExist = function() { - return this.setExist(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.BatchEntry.prototype.hasExist = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional NonExistenceProof nonexist = 2; - * @return {?proto.ics23.NonExistenceProof} - */ -proto.ics23.BatchEntry.prototype.getNonexist = function() { - return /** @type{?proto.ics23.NonExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.NonExistenceProof, 2)); -}; - - -/** - * @param {?proto.ics23.NonExistenceProof|undefined} value - * @return {!proto.ics23.BatchEntry} returns this -*/ -proto.ics23.BatchEntry.prototype.setNonexist = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.ics23.BatchEntry.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.BatchEntry} returns this - */ -proto.ics23.BatchEntry.prototype.clearNonexist = function() { - return this.setNonexist(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.BatchEntry.prototype.hasNonexist = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ics23.CompressedBatchProof.repeatedFields_ = [1,2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.CompressedBatchProof.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.CompressedBatchProof.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.CompressedBatchProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CompressedBatchProof.toObject = function(includeInstance, msg) { - var f, obj = { - entriesList: jspb.Message.toObjectList(msg.getEntriesList(), - proto.ics23.CompressedBatchEntry.toObject, includeInstance), - lookupInnersList: jspb.Message.toObjectList(msg.getLookupInnersList(), - proto.ics23.InnerOp.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.CompressedBatchProof} - */ -proto.ics23.CompressedBatchProof.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.CompressedBatchProof; - return proto.ics23.CompressedBatchProof.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.CompressedBatchProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.CompressedBatchProof} - */ -proto.ics23.CompressedBatchProof.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ics23.CompressedBatchEntry; - reader.readMessage(value,proto.ics23.CompressedBatchEntry.deserializeBinaryFromReader); - msg.addEntries(value); - break; - case 2: - var value = new proto.ics23.InnerOp; - reader.readMessage(value,proto.ics23.InnerOp.deserializeBinaryFromReader); - msg.addLookupInners(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.CompressedBatchProof.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.CompressedBatchProof.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.CompressedBatchProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CompressedBatchProof.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntriesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.ics23.CompressedBatchEntry.serializeBinaryToWriter - ); - } - f = message.getLookupInnersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.ics23.InnerOp.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated CompressedBatchEntry entries = 1; - * @return {!Array} - */ -proto.ics23.CompressedBatchProof.prototype.getEntriesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ics23.CompressedBatchEntry, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ics23.CompressedBatchProof} returns this -*/ -proto.ics23.CompressedBatchProof.prototype.setEntriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.ics23.CompressedBatchEntry=} opt_value - * @param {number=} opt_index - * @return {!proto.ics23.CompressedBatchEntry} - */ -proto.ics23.CompressedBatchProof.prototype.addEntries = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ics23.CompressedBatchEntry, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ics23.CompressedBatchProof} returns this - */ -proto.ics23.CompressedBatchProof.prototype.clearEntriesList = function() { - return this.setEntriesList([]); -}; - - -/** - * repeated InnerOp lookup_inners = 2; - * @return {!Array} - */ -proto.ics23.CompressedBatchProof.prototype.getLookupInnersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ics23.InnerOp, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ics23.CompressedBatchProof} returns this -*/ -proto.ics23.CompressedBatchProof.prototype.setLookupInnersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.ics23.InnerOp=} opt_value - * @param {number=} opt_index - * @return {!proto.ics23.InnerOp} - */ -proto.ics23.CompressedBatchProof.prototype.addLookupInners = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ics23.InnerOp, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ics23.CompressedBatchProof} returns this - */ -proto.ics23.CompressedBatchProof.prototype.clearLookupInnersList = function() { - return this.setLookupInnersList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.ics23.CompressedBatchEntry.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.ics23.CompressedBatchEntry.ProofCase = { - PROOF_NOT_SET: 0, - EXIST: 1, - NONEXIST: 2 -}; - -/** - * @return {proto.ics23.CompressedBatchEntry.ProofCase} - */ -proto.ics23.CompressedBatchEntry.prototype.getProofCase = function() { - return /** @type {proto.ics23.CompressedBatchEntry.ProofCase} */(jspb.Message.computeOneofCase(this, proto.ics23.CompressedBatchEntry.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.CompressedBatchEntry.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.CompressedBatchEntry.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.CompressedBatchEntry} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CompressedBatchEntry.toObject = function(includeInstance, msg) { - var f, obj = { - exist: (f = msg.getExist()) && proto.ics23.CompressedExistenceProof.toObject(includeInstance, f), - nonexist: (f = msg.getNonexist()) && proto.ics23.CompressedNonExistenceProof.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.CompressedBatchEntry} - */ -proto.ics23.CompressedBatchEntry.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.CompressedBatchEntry; - return proto.ics23.CompressedBatchEntry.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.CompressedBatchEntry} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.CompressedBatchEntry} - */ -proto.ics23.CompressedBatchEntry.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ics23.CompressedExistenceProof; - reader.readMessage(value,proto.ics23.CompressedExistenceProof.deserializeBinaryFromReader); - msg.setExist(value); - break; - case 2: - var value = new proto.ics23.CompressedNonExistenceProof; - reader.readMessage(value,proto.ics23.CompressedNonExistenceProof.deserializeBinaryFromReader); - msg.setNonexist(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.CompressedBatchEntry.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.CompressedBatchEntry.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.CompressedBatchEntry} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CompressedBatchEntry.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getExist(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ics23.CompressedExistenceProof.serializeBinaryToWriter - ); - } - f = message.getNonexist(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ics23.CompressedNonExistenceProof.serializeBinaryToWriter - ); - } -}; - - -/** - * optional CompressedExistenceProof exist = 1; - * @return {?proto.ics23.CompressedExistenceProof} - */ -proto.ics23.CompressedBatchEntry.prototype.getExist = function() { - return /** @type{?proto.ics23.CompressedExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.CompressedExistenceProof, 1)); -}; - - -/** - * @param {?proto.ics23.CompressedExistenceProof|undefined} value - * @return {!proto.ics23.CompressedBatchEntry} returns this -*/ -proto.ics23.CompressedBatchEntry.prototype.setExist = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.ics23.CompressedBatchEntry.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.CompressedBatchEntry} returns this - */ -proto.ics23.CompressedBatchEntry.prototype.clearExist = function() { - return this.setExist(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.CompressedBatchEntry.prototype.hasExist = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional CompressedNonExistenceProof nonexist = 2; - * @return {?proto.ics23.CompressedNonExistenceProof} - */ -proto.ics23.CompressedBatchEntry.prototype.getNonexist = function() { - return /** @type{?proto.ics23.CompressedNonExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.CompressedNonExistenceProof, 2)); -}; - - -/** - * @param {?proto.ics23.CompressedNonExistenceProof|undefined} value - * @return {!proto.ics23.CompressedBatchEntry} returns this -*/ -proto.ics23.CompressedBatchEntry.prototype.setNonexist = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.ics23.CompressedBatchEntry.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.CompressedBatchEntry} returns this - */ -proto.ics23.CompressedBatchEntry.prototype.clearNonexist = function() { - return this.setNonexist(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.CompressedBatchEntry.prototype.hasNonexist = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ics23.CompressedExistenceProof.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.CompressedExistenceProof.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.CompressedExistenceProof.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.CompressedExistenceProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CompressedExistenceProof.toObject = function(includeInstance, msg) { - var f, obj = { - key: msg.getKey_asB64(), - value: msg.getValue_asB64(), - leaf: (f = msg.getLeaf()) && proto.ics23.LeafOp.toObject(includeInstance, f), - pathList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.CompressedExistenceProof} - */ -proto.ics23.CompressedExistenceProof.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.CompressedExistenceProof; - return proto.ics23.CompressedExistenceProof.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.CompressedExistenceProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.CompressedExistenceProof} - */ -proto.ics23.CompressedExistenceProof.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); - break; - case 3: - var value = new proto.ics23.LeafOp; - reader.readMessage(value,proto.ics23.LeafOp.deserializeBinaryFromReader); - msg.setLeaf(value); - break; - case 4: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); - for (var i = 0; i < values.length; i++) { - msg.addPath(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.CompressedExistenceProof.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.CompressedExistenceProof.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.CompressedExistenceProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CompressedExistenceProof.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getLeaf(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ics23.LeafOp.serializeBinaryToWriter - ); - } - f = message.getPathList(); - if (f.length > 0) { - writer.writePackedInt32( - 4, - f - ); - } -}; - - -/** - * optional bytes key = 1; - * @return {!(string|Uint8Array)} - */ -proto.ics23.CompressedExistenceProof.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes key = 1; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.ics23.CompressedExistenceProof.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.ics23.CompressedExistenceProof.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.CompressedExistenceProof} returns this - */ -proto.ics23.CompressedExistenceProof.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes value = 2; - * @return {!(string|Uint8Array)} - */ -proto.ics23.CompressedExistenceProof.prototype.getValue = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes value = 2; - * This is a type-conversion wrapper around `getValue()` - * @return {string} - */ -proto.ics23.CompressedExistenceProof.prototype.getValue_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); -}; - - -/** - * optional bytes value = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` - * @return {!Uint8Array} - */ -proto.ics23.CompressedExistenceProof.prototype.getValue_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.CompressedExistenceProof} returns this - */ -proto.ics23.CompressedExistenceProof.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional LeafOp leaf = 3; - * @return {?proto.ics23.LeafOp} - */ -proto.ics23.CompressedExistenceProof.prototype.getLeaf = function() { - return /** @type{?proto.ics23.LeafOp} */ ( - jspb.Message.getWrapperField(this, proto.ics23.LeafOp, 3)); -}; - - -/** - * @param {?proto.ics23.LeafOp|undefined} value - * @return {!proto.ics23.CompressedExistenceProof} returns this -*/ -proto.ics23.CompressedExistenceProof.prototype.setLeaf = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.CompressedExistenceProof} returns this - */ -proto.ics23.CompressedExistenceProof.prototype.clearLeaf = function() { - return this.setLeaf(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.CompressedExistenceProof.prototype.hasLeaf = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * repeated int32 path = 4; - * @return {!Array} - */ -proto.ics23.CompressedExistenceProof.prototype.getPathList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ics23.CompressedExistenceProof} returns this - */ -proto.ics23.CompressedExistenceProof.prototype.setPathList = function(value) { - return jspb.Message.setField(this, 4, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.ics23.CompressedExistenceProof} returns this - */ -proto.ics23.CompressedExistenceProof.prototype.addPath = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ics23.CompressedExistenceProof} returns this - */ -proto.ics23.CompressedExistenceProof.prototype.clearPathList = function() { - return this.setPathList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ics23.CompressedNonExistenceProof.prototype.toObject = function(opt_includeInstance) { - return proto.ics23.CompressedNonExistenceProof.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ics23.CompressedNonExistenceProof} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CompressedNonExistenceProof.toObject = function(includeInstance, msg) { - var f, obj = { - key: msg.getKey_asB64(), - left: (f = msg.getLeft()) && proto.ics23.CompressedExistenceProof.toObject(includeInstance, f), - right: (f = msg.getRight()) && proto.ics23.CompressedExistenceProof.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ics23.CompressedNonExistenceProof} - */ -proto.ics23.CompressedNonExistenceProof.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ics23.CompressedNonExistenceProof; - return proto.ics23.CompressedNonExistenceProof.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ics23.CompressedNonExistenceProof} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ics23.CompressedNonExistenceProof} - */ -proto.ics23.CompressedNonExistenceProof.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 2: - var value = new proto.ics23.CompressedExistenceProof; - reader.readMessage(value,proto.ics23.CompressedExistenceProof.deserializeBinaryFromReader); - msg.setLeft(value); - break; - case 3: - var value = new proto.ics23.CompressedExistenceProof; - reader.readMessage(value,proto.ics23.CompressedExistenceProof.deserializeBinaryFromReader); - msg.setRight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ics23.CompressedNonExistenceProof.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ics23.CompressedNonExistenceProof.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ics23.CompressedNonExistenceProof} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ics23.CompressedNonExistenceProof.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getLeft(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ics23.CompressedExistenceProof.serializeBinaryToWriter - ); - } - f = message.getRight(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ics23.CompressedExistenceProof.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes key = 1; - * @return {!(string|Uint8Array)} - */ -proto.ics23.CompressedNonExistenceProof.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes key = 1; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.ics23.CompressedNonExistenceProof.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.ics23.CompressedNonExistenceProof.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ics23.CompressedNonExistenceProof} returns this - */ -proto.ics23.CompressedNonExistenceProof.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional CompressedExistenceProof left = 2; - * @return {?proto.ics23.CompressedExistenceProof} - */ -proto.ics23.CompressedNonExistenceProof.prototype.getLeft = function() { - return /** @type{?proto.ics23.CompressedExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.CompressedExistenceProof, 2)); -}; - - -/** - * @param {?proto.ics23.CompressedExistenceProof|undefined} value - * @return {!proto.ics23.CompressedNonExistenceProof} returns this -*/ -proto.ics23.CompressedNonExistenceProof.prototype.setLeft = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.CompressedNonExistenceProof} returns this - */ -proto.ics23.CompressedNonExistenceProof.prototype.clearLeft = function() { - return this.setLeft(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.CompressedNonExistenceProof.prototype.hasLeft = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional CompressedExistenceProof right = 3; - * @return {?proto.ics23.CompressedExistenceProof} - */ -proto.ics23.CompressedNonExistenceProof.prototype.getRight = function() { - return /** @type{?proto.ics23.CompressedExistenceProof} */ ( - jspb.Message.getWrapperField(this, proto.ics23.CompressedExistenceProof, 3)); -}; - - -/** - * @param {?proto.ics23.CompressedExistenceProof|undefined} value - * @return {!proto.ics23.CompressedNonExistenceProof} returns this -*/ -proto.ics23.CompressedNonExistenceProof.prototype.setRight = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ics23.CompressedNonExistenceProof} returns this - */ -proto.ics23.CompressedNonExistenceProof.prototype.clearRight = function() { - return this.setRight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ics23.CompressedNonExistenceProof.prototype.hasRight = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * @enum {number} - */ -proto.ics23.HashOp = { - NO_HASH: 0, - SHA256: 1, - SHA512: 2, - KECCAK: 3, - RIPEMD160: 4, - BITCOIN: 5 -}; - -/** - * @enum {number} - */ -proto.ics23.LengthOp = { - NO_PREFIX: 0, - VAR_PROTO: 1, - VAR_RLP: 2, - FIXED32_BIG: 3, - FIXED32_LITTLE: 4, - FIXED64_BIG: 5, - FIXED64_LITTLE: 6, - REQUIRE_32_BYTES: 7, - REQUIRE_64_BYTES: 8 -}; - -goog.object.extend(exports, proto.ics23); diff --git a/proto/confio/proofs_pb_service.d.ts b/proto/confio/proofs_pb_service.d.ts deleted file mode 100644 index e156b94..0000000 --- a/proto/confio/proofs_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: ics23 -// file: confio/proofs.proto - diff --git a/proto/confio/proofs_pb_service.js b/proto/confio/proofs_pb_service.js deleted file mode 100644 index e156b94..0000000 --- a/proto/confio/proofs_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: ics23 -// file: confio/proofs.proto - diff --git a/proto/cosmos-proto b/proto/cosmos-proto new file mode 160000 index 0000000..3e53812 --- /dev/null +++ b/proto/cosmos-proto @@ -0,0 +1 @@ +Subproject commit 3e53812559a5f89540930b1a40f16266a73ce1c9 diff --git a/proto/cosmos-sdk b/proto/cosmos-sdk new file mode 160000 index 0000000..b45cf75 --- /dev/null +++ b/proto/cosmos-sdk @@ -0,0 +1 @@ +Subproject commit b45cf753a7a344a275e0489c03360fc91663c220 diff --git a/proto/cosmos/base/kv/v1beta1/kv_pb_service.d.ts b/proto/cosmos/base/kv/v1beta1/kv_pb_service.d.ts deleted file mode 100644 index bac2f21..0000000 --- a/proto/cosmos/base/kv/v1beta1/kv_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.base.kv.v1beta1 -// file: cosmos/base/kv/v1beta1/kv.proto - diff --git a/proto/cosmos/base/kv/v1beta1/kv_pb_service.js b/proto/cosmos/base/kv/v1beta1/kv_pb_service.js deleted file mode 100644 index bac2f21..0000000 --- a/proto/cosmos/base/kv/v1beta1/kv_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.base.kv.v1beta1 -// file: cosmos/base/kv/v1beta1/kv.proto - diff --git a/proto/cosmos/base/node/v1beta1/query_pb.d.ts b/proto/cosmos/base/node/v1beta1/query_pb.d.ts deleted file mode 100644 index 3e721fb..0000000 --- a/proto/cosmos/base/node/v1beta1/query_pb.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -// package: cosmos.base.node.v1beta1 -// file: cosmos/base/node/v1beta1/query.proto - -import * as jspb from "google-protobuf"; -import * as google_api_annotations_pb from "../../../../google/api/annotations_pb"; - -export class ConfigRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConfigRequest.AsObject; - static toObject(includeInstance: boolean, msg: ConfigRequest): ConfigRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConfigRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConfigRequest; - static deserializeBinaryFromReader(message: ConfigRequest, reader: jspb.BinaryReader): ConfigRequest; -} - -export namespace ConfigRequest { - export type AsObject = { - } -} - -export class ConfigResponse extends jspb.Message { - getMinimumGasPrice(): string; - setMinimumGasPrice(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConfigResponse.AsObject; - static toObject(includeInstance: boolean, msg: ConfigResponse): ConfigResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConfigResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConfigResponse; - static deserializeBinaryFromReader(message: ConfigResponse, reader: jspb.BinaryReader): ConfigResponse; -} - -export namespace ConfigResponse { - export type AsObject = { - minimumGasPrice: string, - } -} - diff --git a/proto/cosmos/base/snapshots/v1beta1/snapshot_pb.js b/proto/cosmos/base/snapshots/v1beta1/snapshot_pb.js deleted file mode 100644 index 37cc32e..0000000 --- a/proto/cosmos/base/snapshots/v1beta1/snapshot_pb.js +++ /dev/null @@ -1,2230 +0,0 @@ -// source: cosmos/base/snapshots/v1beta1/snapshot.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); - -var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.Metadata', null, global); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.Snapshot', null, global); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta', null, global); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload', null, global); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem', null, global); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.SnapshotItem', null, global); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.SnapshotItem.ItemCase', null, global); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem', null, global); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.SnapshotSchema', null, global); -goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cosmos.base.snapshots.v1beta1.Snapshot, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.snapshots.v1beta1.Snapshot.displayName = 'proto.cosmos.base.snapshots.v1beta1.Snapshot'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.snapshots.v1beta1.Metadata = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.snapshots.v1beta1.Metadata.repeatedFields_, null); -}; -goog.inherits(proto.cosmos.base.snapshots.v1beta1.Metadata, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.snapshots.v1beta1.Metadata.displayName = 'proto.cosmos.base.snapshots.v1beta1.Metadata'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.base.snapshots.v1beta1.SnapshotItem.oneofGroups_); -}; -goog.inherits(proto.cosmos.base.snapshots.v1beta1.SnapshotItem, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.snapshots.v1beta1.SnapshotItem.displayName = 'proto.cosmos.base.snapshots.v1beta1.SnapshotItem'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.displayName = 'proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.displayName = 'proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.displayName = 'proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.displayName = 'proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.displayName = 'proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.repeatedFields_, null); -}; -goog.inherits(proto.cosmos.base.snapshots.v1beta1.SnapshotSchema, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.displayName = 'proto.cosmos.base.snapshots.v1beta1.SnapshotSchema'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.snapshots.v1beta1.Snapshot.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.snapshots.v1beta1.Snapshot} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.toObject = function(includeInstance, msg) { - var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - format: jspb.Message.getFieldWithDefault(msg, 2, 0), - chunks: jspb.Message.getFieldWithDefault(msg, 3, 0), - hash: msg.getHash_asB64(), - metadata: (f = msg.getMetadata()) && proto.cosmos.base.snapshots.v1beta1.Metadata.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.snapshots.v1beta1.Snapshot} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.snapshots.v1beta1.Snapshot; - return proto.cosmos.base.snapshots.v1beta1.Snapshot.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.snapshots.v1beta1.Snapshot} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.snapshots.v1beta1.Snapshot} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHeight(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFormat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChunks(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 5: - var value = new proto.cosmos.base.snapshots.v1beta1.Metadata; - reader.readMessage(value,proto.cosmos.base.snapshots.v1beta1.Metadata.deserializeBinaryFromReader); - msg.setMetadata(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.snapshots.v1beta1.Snapshot.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.snapshots.v1beta1.Snapshot} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getFormat(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getChunks(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.cosmos.base.snapshots.v1beta1.Metadata.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 height = 1; - * @return {number} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.cosmos.base.snapshots.v1beta1.Snapshot} returns this - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 format = 2; - * @return {number} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.getFormat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.cosmos.base.snapshots.v1beta1.Snapshot} returns this - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.setFormat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 chunks = 3; - * @return {number} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.getChunks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.cosmos.base.snapshots.v1beta1.Snapshot} returns this - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.setChunks = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes hash = 4; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.snapshots.v1beta1.Snapshot} returns this - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional Metadata metadata = 5; - * @return {?proto.cosmos.base.snapshots.v1beta1.Metadata} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.getMetadata = function() { - return /** @type{?proto.cosmos.base.snapshots.v1beta1.Metadata} */ ( - jspb.Message.getWrapperField(this, proto.cosmos.base.snapshots.v1beta1.Metadata, 5)); -}; - - -/** - * @param {?proto.cosmos.base.snapshots.v1beta1.Metadata|undefined} value - * @return {!proto.cosmos.base.snapshots.v1beta1.Snapshot} returns this -*/ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.snapshots.v1beta1.Snapshot} returns this - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.snapshots.v1beta1.Snapshot.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.snapshots.v1beta1.Metadata.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.snapshots.v1beta1.Metadata} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.toObject = function(includeInstance, msg) { - var f, obj = { - chunkHashesList: msg.getChunkHashesList_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.snapshots.v1beta1.Metadata} - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.snapshots.v1beta1.Metadata; - return proto.cosmos.base.snapshots.v1beta1.Metadata.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.snapshots.v1beta1.Metadata} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.snapshots.v1beta1.Metadata} - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addChunkHashes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.snapshots.v1beta1.Metadata.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.snapshots.v1beta1.Metadata} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChunkHashesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } -}; - - -/** - * repeated bytes chunk_hashes = 1; - * @return {!(Array|Array)} - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.prototype.getChunkHashesList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes chunk_hashes = 1; - * This is a type-conversion wrapper around `getChunkHashesList()` - * @return {!Array} - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.prototype.getChunkHashesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getChunkHashesList())); -}; - - -/** - * repeated bytes chunk_hashes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChunkHashesList()` - * @return {!Array} - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.prototype.getChunkHashesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getChunkHashesList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.cosmos.base.snapshots.v1beta1.Metadata} returns this - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.prototype.setChunkHashesList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.cosmos.base.snapshots.v1beta1.Metadata} returns this - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.prototype.addChunkHashes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.cosmos.base.snapshots.v1beta1.Metadata} returns this - */ -proto.cosmos.base.snapshots.v1beta1.Metadata.prototype.clearChunkHashesList = function() { - return this.setChunkHashesList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.oneofGroups_ = [[1,2,3,4,5,6]]; - -/** - * @enum {number} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.ItemCase = { - ITEM_NOT_SET: 0, - STORE: 1, - IAVL: 2, - EXTENSION: 3, - EXTENSION_PAYLOAD: 4, - KV: 5, - SCHEMA: 6 -}; - -/** - * @return {proto.cosmos.base.snapshots.v1beta1.SnapshotItem.ItemCase} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.getItemCase = function() { - return /** @type {proto.cosmos.base.snapshots.v1beta1.SnapshotItem.ItemCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.base.snapshots.v1beta1.SnapshotItem.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.snapshots.v1beta1.SnapshotItem.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.toObject = function(includeInstance, msg) { - var f, obj = { - store: (f = msg.getStore()) && proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.toObject(includeInstance, f), - iavl: (f = msg.getIavl()) && proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.toObject(includeInstance, f), - extension: (f = msg.getExtension$()) && proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.toObject(includeInstance, f), - extensionPayload: (f = msg.getExtensionPayload()) && proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.toObject(includeInstance, f), - kv: (f = msg.getKv()) && proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.toObject(includeInstance, f), - schema: (f = msg.getSchema()) && proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.snapshots.v1beta1.SnapshotItem; - return proto.cosmos.base.snapshots.v1beta1.SnapshotItem.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem; - reader.readMessage(value,proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.deserializeBinaryFromReader); - msg.setStore(value); - break; - case 2: - var value = new proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem; - reader.readMessage(value,proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.deserializeBinaryFromReader); - msg.setIavl(value); - break; - case 3: - var value = new proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta; - reader.readMessage(value,proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.deserializeBinaryFromReader); - msg.setExtension$(value); - break; - case 4: - var value = new proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload; - reader.readMessage(value,proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.deserializeBinaryFromReader); - msg.setExtensionPayload(value); - break; - case 5: - var value = new proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem; - reader.readMessage(value,proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.deserializeBinaryFromReader); - msg.setKv(value); - break; - case 6: - var value = new proto.cosmos.base.snapshots.v1beta1.SnapshotSchema; - reader.readMessage(value,proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.deserializeBinaryFromReader); - msg.setSchema(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.snapshots.v1beta1.SnapshotItem.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStore(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.serializeBinaryToWriter - ); - } - f = message.getIavl(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.serializeBinaryToWriter - ); - } - f = message.getExtension$(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.serializeBinaryToWriter - ); - } - f = message.getExtensionPayload(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.serializeBinaryToWriter - ); - } - f = message.getKv(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.serializeBinaryToWriter - ); - } - f = message.getSchema(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.serializeBinaryToWriter - ); - } -}; - - -/** - * optional SnapshotStoreItem store = 1; - * @return {?proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.getStore = function() { - return /** @type{?proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem} */ ( - jspb.Message.getWrapperField(this, proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem, 1)); -}; - - -/** - * @param {?proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem|undefined} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this -*/ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.setStore = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.cosmos.base.snapshots.v1beta1.SnapshotItem.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.clearStore = function() { - return this.setStore(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.hasStore = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional SnapshotIAVLItem iavl = 2; - * @return {?proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.getIavl = function() { - return /** @type{?proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} */ ( - jspb.Message.getWrapperField(this, proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem, 2)); -}; - - -/** - * @param {?proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem|undefined} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this -*/ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.setIavl = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.base.snapshots.v1beta1.SnapshotItem.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.clearIavl = function() { - return this.setIavl(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.hasIavl = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional SnapshotExtensionMeta extension = 3; - * @return {?proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.getExtension$ = function() { - return /** @type{?proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta} */ ( - jspb.Message.getWrapperField(this, proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta, 3)); -}; - - -/** - * @param {?proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta|undefined} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this -*/ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.setExtension$ = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.cosmos.base.snapshots.v1beta1.SnapshotItem.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.clearExtension$ = function() { - return this.setExtension$(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.hasExtension$ = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional SnapshotExtensionPayload extension_payload = 4; - * @return {?proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.getExtensionPayload = function() { - return /** @type{?proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload} */ ( - jspb.Message.getWrapperField(this, proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload, 4)); -}; - - -/** - * @param {?proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload|undefined} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this -*/ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.setExtensionPayload = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.cosmos.base.snapshots.v1beta1.SnapshotItem.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.clearExtensionPayload = function() { - return this.setExtensionPayload(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.hasExtensionPayload = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional SnapshotKVItem kv = 5; - * @return {?proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.getKv = function() { - return /** @type{?proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem} */ ( - jspb.Message.getWrapperField(this, proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem, 5)); -}; - - -/** - * @param {?proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem|undefined} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this -*/ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.setKv = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.cosmos.base.snapshots.v1beta1.SnapshotItem.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.clearKv = function() { - return this.setKv(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.hasKv = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional SnapshotSchema schema = 6; - * @return {?proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.getSchema = function() { - return /** @type{?proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} */ ( - jspb.Message.getWrapperField(this, proto.cosmos.base.snapshots.v1beta1.SnapshotSchema, 6)); -}; - - -/** - * @param {?proto.cosmos.base.snapshots.v1beta1.SnapshotSchema|undefined} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this -*/ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.setSchema = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.cosmos.base.snapshots.v1beta1.SnapshotItem.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.clearSchema = function() { - return this.setSchema(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotItem.prototype.hasSchema = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem; - return proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotStoreItem.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.toObject = function(includeInstance, msg) { - var f, obj = { - key: msg.getKey_asB64(), - value: msg.getValue_asB64(), - version: jspb.Message.getFieldWithDefault(msg, 3, 0), - height: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem; - return proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVersion(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getHeight(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } -}; - - -/** - * optional bytes key = 1; - * @return {!(string|Uint8Array)} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes key = 1; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes value = 2; - * @return {!(string|Uint8Array)} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.getValue = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes value = 2; - * This is a type-conversion wrapper around `getValue()` - * @return {string} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.getValue_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); -}; - - -/** - * optional bytes value = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.getValue_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 version = 3; - * @return {number} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 height = 4; - * @return {number} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - format: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta; - return proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFormat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFormat(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint32 format = 2; - * @return {number} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.prototype.getFormat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.prototype.setFormat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.toObject = function(includeInstance, msg) { - var f, obj = { - payload: msg.getPayload_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload; - return proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPayload(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayload_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes payload = 1; - * @return {!(string|Uint8Array)} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.prototype.getPayload = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes payload = 1; - * This is a type-conversion wrapper around `getPayload()` - * @return {string} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.prototype.getPayload_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPayload())); -}; - - -/** - * optional bytes payload = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPayload()` - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.prototype.getPayload_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPayload())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.prototype.setPayload = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.toObject = function(includeInstance, msg) { - var f, obj = { - key: msg.getKey_asB64(), - value: msg.getValue_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem; - return proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes key = 1; - * @return {!(string|Uint8Array)} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes key = 1; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes value = 2; - * @return {!(string|Uint8Array)} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.getValue = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes value = 2; - * This is a type-conversion wrapper around `getValue()` - * @return {string} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.getValue_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); -}; - - -/** - * optional bytes value = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.getValue_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotKVItem.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.toObject = function(includeInstance, msg) { - var f, obj = { - keysList: msg.getKeysList_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.snapshots.v1beta1.SnapshotSchema; - return proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addKeys(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKeysList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } -}; - - -/** - * repeated bytes keys = 1; - * @return {!(Array|Array)} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.prototype.getKeysList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes keys = 1; - * This is a type-conversion wrapper around `getKeysList()` - * @return {!Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.prototype.getKeysList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysList())); -}; - - -/** - * repeated bytes keys = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKeysList()` - * @return {!Array} - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.prototype.getKeysList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getKeysList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.prototype.setKeysList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.prototype.addKeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.cosmos.base.snapshots.v1beta1.SnapshotSchema} returns this - */ -proto.cosmos.base.snapshots.v1beta1.SnapshotSchema.prototype.clearKeysList = function() { - return this.setKeysList([]); -}; - - -goog.object.extend(exports, proto.cosmos.base.snapshots.v1beta1); diff --git a/proto/cosmos/base/snapshots/v1beta1/snapshot_pb_service.d.ts b/proto/cosmos/base/snapshots/v1beta1/snapshot_pb_service.d.ts deleted file mode 100644 index 51bd4dd..0000000 --- a/proto/cosmos/base/snapshots/v1beta1/snapshot_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.base.snapshots.v1beta1 -// file: cosmos/base/snapshots/v1beta1/snapshot.proto - diff --git a/proto/cosmos/base/snapshots/v1beta1/snapshot_pb_service.js b/proto/cosmos/base/snapshots/v1beta1/snapshot_pb_service.js deleted file mode 100644 index 51bd4dd..0000000 --- a/proto/cosmos/base/snapshots/v1beta1/snapshot_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.base.snapshots.v1beta1 -// file: cosmos/base/snapshots/v1beta1/snapshot.proto - diff --git a/proto/cosmos/base/store/v1beta1/commit_info_pb_service.d.ts b/proto/cosmos/base/store/v1beta1/commit_info_pb_service.d.ts deleted file mode 100644 index 6e58978..0000000 --- a/proto/cosmos/base/store/v1beta1/commit_info_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.base.store.v1beta1 -// file: cosmos/base/store/v1beta1/commit_info.proto - diff --git a/proto/cosmos/base/store/v1beta1/commit_info_pb_service.js b/proto/cosmos/base/store/v1beta1/commit_info_pb_service.js deleted file mode 100644 index 6e58978..0000000 --- a/proto/cosmos/base/store/v1beta1/commit_info_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.base.store.v1beta1 -// file: cosmos/base/store/v1beta1/commit_info.proto - diff --git a/proto/cosmos/base/store/v1beta1/listening_pb.d.ts b/proto/cosmos/base/store/v1beta1/listening_pb.d.ts deleted file mode 100644 index a8334fe..0000000 --- a/proto/cosmos/base/store/v1beta1/listening_pb.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -// package: cosmos.base.store.v1beta1 -// file: cosmos/base/store/v1beta1/listening.proto - -import * as jspb from "google-protobuf"; -import * as tendermint_abci_types_pb from "../../../../tendermint/abci/types_pb"; - -export class StoreKVPair extends jspb.Message { - getStoreKey(): string; - setStoreKey(value: string): void; - - getDelete(): boolean; - setDelete(value: boolean): void; - - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - getValue(): Uint8Array | string; - getValue_asU8(): Uint8Array; - getValue_asB64(): string; - setValue(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StoreKVPair.AsObject; - static toObject(includeInstance: boolean, msg: StoreKVPair): StoreKVPair.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StoreKVPair, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StoreKVPair; - static deserializeBinaryFromReader(message: StoreKVPair, reader: jspb.BinaryReader): StoreKVPair; -} - -export namespace StoreKVPair { - export type AsObject = { - storeKey: string, - pb_delete: boolean, - key: Uint8Array | string, - value: Uint8Array | string, - } -} - -export class BlockMetadata extends jspb.Message { - hasRequestBeginBlock(): boolean; - clearRequestBeginBlock(): void; - getRequestBeginBlock(): tendermint_abci_types_pb.RequestBeginBlock | undefined; - setRequestBeginBlock(value?: tendermint_abci_types_pb.RequestBeginBlock): void; - - hasResponseBeginBlock(): boolean; - clearResponseBeginBlock(): void; - getResponseBeginBlock(): tendermint_abci_types_pb.ResponseBeginBlock | undefined; - setResponseBeginBlock(value?: tendermint_abci_types_pb.ResponseBeginBlock): void; - - clearDeliverTxsList(): void; - getDeliverTxsList(): Array; - setDeliverTxsList(value: Array): void; - addDeliverTxs(value?: BlockMetadata.DeliverTx, index?: number): BlockMetadata.DeliverTx; - - hasRequestEndBlock(): boolean; - clearRequestEndBlock(): void; - getRequestEndBlock(): tendermint_abci_types_pb.RequestEndBlock | undefined; - setRequestEndBlock(value?: tendermint_abci_types_pb.RequestEndBlock): void; - - hasResponseEndBlock(): boolean; - clearResponseEndBlock(): void; - getResponseEndBlock(): tendermint_abci_types_pb.ResponseEndBlock | undefined; - setResponseEndBlock(value?: tendermint_abci_types_pb.ResponseEndBlock): void; - - hasResponseCommit(): boolean; - clearResponseCommit(): void; - getResponseCommit(): tendermint_abci_types_pb.ResponseCommit | undefined; - setResponseCommit(value?: tendermint_abci_types_pb.ResponseCommit): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockMetadata.AsObject; - static toObject(includeInstance: boolean, msg: BlockMetadata): BlockMetadata.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockMetadata, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockMetadata; - static deserializeBinaryFromReader(message: BlockMetadata, reader: jspb.BinaryReader): BlockMetadata; -} - -export namespace BlockMetadata { - export type AsObject = { - requestBeginBlock?: tendermint_abci_types_pb.RequestBeginBlock.AsObject, - responseBeginBlock?: tendermint_abci_types_pb.ResponseBeginBlock.AsObject, - deliverTxsList: Array, - requestEndBlock?: tendermint_abci_types_pb.RequestEndBlock.AsObject, - responseEndBlock?: tendermint_abci_types_pb.ResponseEndBlock.AsObject, - responseCommit?: tendermint_abci_types_pb.ResponseCommit.AsObject, - } - - export class DeliverTx extends jspb.Message { - hasRequest(): boolean; - clearRequest(): void; - getRequest(): tendermint_abci_types_pb.RequestDeliverTx | undefined; - setRequest(value?: tendermint_abci_types_pb.RequestDeliverTx): void; - - hasResponse(): boolean; - clearResponse(): void; - getResponse(): tendermint_abci_types_pb.ResponseDeliverTx | undefined; - setResponse(value?: tendermint_abci_types_pb.ResponseDeliverTx): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeliverTx.AsObject; - static toObject(includeInstance: boolean, msg: DeliverTx): DeliverTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeliverTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeliverTx; - static deserializeBinaryFromReader(message: DeliverTx, reader: jspb.BinaryReader): DeliverTx; - } - - export namespace DeliverTx { - export type AsObject = { - request?: tendermint_abci_types_pb.RequestDeliverTx.AsObject, - response?: tendermint_abci_types_pb.ResponseDeliverTx.AsObject, - } - } -} - diff --git a/proto/cosmos/base/store/v1beta1/listening_pb.js b/proto/cosmos/base/store/v1beta1/listening_pb.js deleted file mode 100644 index f1b7b36..0000000 --- a/proto/cosmos/base/store/v1beta1/listening_pb.js +++ /dev/null @@ -1,971 +0,0 @@ -// source: cosmos/base/store/v1beta1/listening.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); - -var tendermint_abci_types_pb = require('../../../../tendermint/abci/types_pb.js'); -goog.object.extend(proto, tendermint_abci_types_pb); -goog.exportSymbol('proto.cosmos.base.store.v1beta1.BlockMetadata', null, global); -goog.exportSymbol('proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx', null, global); -goog.exportSymbol('proto.cosmos.base.store.v1beta1.StoreKVPair', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.store.v1beta1.StoreKVPair = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cosmos.base.store.v1beta1.StoreKVPair, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.store.v1beta1.StoreKVPair.displayName = 'proto.cosmos.base.store.v1beta1.StoreKVPair'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.store.v1beta1.BlockMetadata = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.store.v1beta1.BlockMetadata.repeatedFields_, null); -}; -goog.inherits(proto.cosmos.base.store.v1beta1.BlockMetadata, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.store.v1beta1.BlockMetadata.displayName = 'proto.cosmos.base.store.v1beta1.BlockMetadata'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.displayName = 'proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.store.v1beta1.StoreKVPair.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.store.v1beta1.StoreKVPair} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.toObject = function(includeInstance, msg) { - var f, obj = { - storeKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - pb_delete: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - key: msg.getKey_asB64(), - value: msg.getValue_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.store.v1beta1.StoreKVPair; - return proto.cosmos.base.store.v1beta1.StoreKVPair.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.store.v1beta1.StoreKVPair} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setStoreKey(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDelete(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.store.v1beta1.StoreKVPair.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.store.v1beta1.StoreKVPair} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStoreKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getDelete(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional string store_key = 1; - * @return {string} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getStoreKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setStoreKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool delete = 2; - * @return {boolean} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getDelete = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setDelete = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bytes key = 3; - * @return {!(string|Uint8Array)} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes key = 3; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes value = 4; - * @return {!(string|Uint8Array)} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getValue = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes value = 4; - * This is a type-conversion wrapper around `getValue()` - * @return {string} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getValue_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); -}; - - -/** - * optional bytes value = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` - * @return {!Uint8Array} - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.getValue_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.cosmos.base.store.v1beta1.StoreKVPair} returns this - */ -proto.cosmos.base.store.v1beta1.StoreKVPair.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.store.v1beta1.BlockMetadata.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.store.v1beta1.BlockMetadata} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.toObject = function(includeInstance, msg) { - var f, obj = { - requestBeginBlock: (f = msg.getRequestBeginBlock()) && tendermint_abci_types_pb.RequestBeginBlock.toObject(includeInstance, f), - responseBeginBlock: (f = msg.getResponseBeginBlock()) && tendermint_abci_types_pb.ResponseBeginBlock.toObject(includeInstance, f), - deliverTxsList: jspb.Message.toObjectList(msg.getDeliverTxsList(), - proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.toObject, includeInstance), - requestEndBlock: (f = msg.getRequestEndBlock()) && tendermint_abci_types_pb.RequestEndBlock.toObject(includeInstance, f), - responseEndBlock: (f = msg.getResponseEndBlock()) && tendermint_abci_types_pb.ResponseEndBlock.toObject(includeInstance, f), - responseCommit: (f = msg.getResponseCommit()) && tendermint_abci_types_pb.ResponseCommit.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.store.v1beta1.BlockMetadata; - return proto.cosmos.base.store.v1beta1.BlockMetadata.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.store.v1beta1.BlockMetadata} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new tendermint_abci_types_pb.RequestBeginBlock; - reader.readMessage(value,tendermint_abci_types_pb.RequestBeginBlock.deserializeBinaryFromReader); - msg.setRequestBeginBlock(value); - break; - case 2: - var value = new tendermint_abci_types_pb.ResponseBeginBlock; - reader.readMessage(value,tendermint_abci_types_pb.ResponseBeginBlock.deserializeBinaryFromReader); - msg.setResponseBeginBlock(value); - break; - case 3: - var value = new proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx; - reader.readMessage(value,proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.deserializeBinaryFromReader); - msg.addDeliverTxs(value); - break; - case 4: - var value = new tendermint_abci_types_pb.RequestEndBlock; - reader.readMessage(value,tendermint_abci_types_pb.RequestEndBlock.deserializeBinaryFromReader); - msg.setRequestEndBlock(value); - break; - case 5: - var value = new tendermint_abci_types_pb.ResponseEndBlock; - reader.readMessage(value,tendermint_abci_types_pb.ResponseEndBlock.deserializeBinaryFromReader); - msg.setResponseEndBlock(value); - break; - case 6: - var value = new tendermint_abci_types_pb.ResponseCommit; - reader.readMessage(value,tendermint_abci_types_pb.ResponseCommit.deserializeBinaryFromReader); - msg.setResponseCommit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.store.v1beta1.BlockMetadata.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.store.v1beta1.BlockMetadata} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestBeginBlock(); - if (f != null) { - writer.writeMessage( - 1, - f, - tendermint_abci_types_pb.RequestBeginBlock.serializeBinaryToWriter - ); - } - f = message.getResponseBeginBlock(); - if (f != null) { - writer.writeMessage( - 2, - f, - tendermint_abci_types_pb.ResponseBeginBlock.serializeBinaryToWriter - ); - } - f = message.getDeliverTxsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.serializeBinaryToWriter - ); - } - f = message.getRequestEndBlock(); - if (f != null) { - writer.writeMessage( - 4, - f, - tendermint_abci_types_pb.RequestEndBlock.serializeBinaryToWriter - ); - } - f = message.getResponseEndBlock(); - if (f != null) { - writer.writeMessage( - 5, - f, - tendermint_abci_types_pb.ResponseEndBlock.serializeBinaryToWriter - ); - } - f = message.getResponseCommit(); - if (f != null) { - writer.writeMessage( - 6, - f, - tendermint_abci_types_pb.ResponseCommit.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.toObject = function(opt_includeInstance) { - return proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.toObject = function(includeInstance, msg) { - var f, obj = { - request: (f = msg.getRequest()) && tendermint_abci_types_pb.RequestDeliverTx.toObject(includeInstance, f), - response: (f = msg.getResponse()) && tendermint_abci_types_pb.ResponseDeliverTx.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx; - return proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new tendermint_abci_types_pb.RequestDeliverTx; - reader.readMessage(value,tendermint_abci_types_pb.RequestDeliverTx.deserializeBinaryFromReader); - msg.setRequest(value); - break; - case 2: - var value = new tendermint_abci_types_pb.ResponseDeliverTx; - reader.readMessage(value,tendermint_abci_types_pb.ResponseDeliverTx.deserializeBinaryFromReader); - msg.setResponse(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequest(); - if (f != null) { - writer.writeMessage( - 1, - f, - tendermint_abci_types_pb.RequestDeliverTx.serializeBinaryToWriter - ); - } - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 2, - f, - tendermint_abci_types_pb.ResponseDeliverTx.serializeBinaryToWriter - ); - } -}; - - -/** - * optional tendermint.abci.RequestDeliverTx request = 1; - * @return {?proto.tendermint.abci.RequestDeliverTx} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.getRequest = function() { - return /** @type{?proto.tendermint.abci.RequestDeliverTx} */ ( - jspb.Message.getWrapperField(this, tendermint_abci_types_pb.RequestDeliverTx, 1)); -}; - - -/** - * @param {?proto.tendermint.abci.RequestDeliverTx|undefined} value - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} returns this -*/ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.setRequest = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} returns this - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.clearRequest = function() { - return this.setRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.hasRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional tendermint.abci.ResponseDeliverTx response = 2; - * @return {?proto.tendermint.abci.ResponseDeliverTx} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.getResponse = function() { - return /** @type{?proto.tendermint.abci.ResponseDeliverTx} */ ( - jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseDeliverTx, 2)); -}; - - -/** - * @param {?proto.tendermint.abci.ResponseDeliverTx|undefined} value - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} returns this -*/ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.setResponse = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} returns this - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx.prototype.hasResponse = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional tendermint.abci.RequestBeginBlock request_begin_block = 1; - * @return {?proto.tendermint.abci.RequestBeginBlock} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.getRequestBeginBlock = function() { - return /** @type{?proto.tendermint.abci.RequestBeginBlock} */ ( - jspb.Message.getWrapperField(this, tendermint_abci_types_pb.RequestBeginBlock, 1)); -}; - - -/** - * @param {?proto.tendermint.abci.RequestBeginBlock|undefined} value - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this -*/ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.setRequestBeginBlock = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.clearRequestBeginBlock = function() { - return this.setRequestBeginBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.hasRequestBeginBlock = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional tendermint.abci.ResponseBeginBlock response_begin_block = 2; - * @return {?proto.tendermint.abci.ResponseBeginBlock} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.getResponseBeginBlock = function() { - return /** @type{?proto.tendermint.abci.ResponseBeginBlock} */ ( - jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseBeginBlock, 2)); -}; - - -/** - * @param {?proto.tendermint.abci.ResponseBeginBlock|undefined} value - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this -*/ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.setResponseBeginBlock = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.clearResponseBeginBlock = function() { - return this.setResponseBeginBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.hasResponseBeginBlock = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * repeated DeliverTx deliver_txs = 3; - * @return {!Array} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.getDeliverTxsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this -*/ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.setDeliverTxsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.addDeliverTxs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.store.v1beta1.BlockMetadata.DeliverTx, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.clearDeliverTxsList = function() { - return this.setDeliverTxsList([]); -}; - - -/** - * optional tendermint.abci.RequestEndBlock request_end_block = 4; - * @return {?proto.tendermint.abci.RequestEndBlock} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.getRequestEndBlock = function() { - return /** @type{?proto.tendermint.abci.RequestEndBlock} */ ( - jspb.Message.getWrapperField(this, tendermint_abci_types_pb.RequestEndBlock, 4)); -}; - - -/** - * @param {?proto.tendermint.abci.RequestEndBlock|undefined} value - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this -*/ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.setRequestEndBlock = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.clearRequestEndBlock = function() { - return this.setRequestEndBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.hasRequestEndBlock = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional tendermint.abci.ResponseEndBlock response_end_block = 5; - * @return {?proto.tendermint.abci.ResponseEndBlock} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.getResponseEndBlock = function() { - return /** @type{?proto.tendermint.abci.ResponseEndBlock} */ ( - jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseEndBlock, 5)); -}; - - -/** - * @param {?proto.tendermint.abci.ResponseEndBlock|undefined} value - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this -*/ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.setResponseEndBlock = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.clearResponseEndBlock = function() { - return this.setResponseEndBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.hasResponseEndBlock = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional tendermint.abci.ResponseCommit response_commit = 6; - * @return {?proto.tendermint.abci.ResponseCommit} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.getResponseCommit = function() { - return /** @type{?proto.tendermint.abci.ResponseCommit} */ ( - jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseCommit, 6)); -}; - - -/** - * @param {?proto.tendermint.abci.ResponseCommit|undefined} value - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this -*/ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.setResponseCommit = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.cosmos.base.store.v1beta1.BlockMetadata} returns this - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.clearResponseCommit = function() { - return this.setResponseCommit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cosmos.base.store.v1beta1.BlockMetadata.prototype.hasResponseCommit = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -goog.object.extend(exports, proto.cosmos.base.store.v1beta1); diff --git a/proto/cosmos/base/store/v1beta1/listening_pb_service.d.ts b/proto/cosmos/base/store/v1beta1/listening_pb_service.d.ts deleted file mode 100644 index 647175a..0000000 --- a/proto/cosmos/base/store/v1beta1/listening_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.base.store.v1beta1 -// file: cosmos/base/store/v1beta1/listening.proto - diff --git a/proto/cosmos/base/store/v1beta1/listening_pb_service.js b/proto/cosmos/base/store/v1beta1/listening_pb_service.js deleted file mode 100644 index 647175a..0000000 --- a/proto/cosmos/base/store/v1beta1/listening_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.base.store.v1beta1 -// file: cosmos/base/store/v1beta1/listening.proto - diff --git a/proto/cosmos/capability/module/v1/module_pb_service.d.ts b/proto/cosmos/capability/module/v1/module_pb_service.d.ts deleted file mode 100644 index e58700e..0000000 --- a/proto/cosmos/capability/module/v1/module_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.capability.module.v1 -// file: cosmos/capability/module/v1/module.proto - diff --git a/proto/cosmos/capability/module/v1/module_pb_service.js b/proto/cosmos/capability/module/v1/module_pb_service.js deleted file mode 100644 index e58700e..0000000 --- a/proto/cosmos/capability/module/v1/module_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.capability.module.v1 -// file: cosmos/capability/module/v1/module.proto - diff --git a/proto/cosmos/capability/v1beta1/capability_pb_service.d.ts b/proto/cosmos/capability/v1beta1/capability_pb_service.d.ts deleted file mode 100644 index 81ee4ed..0000000 --- a/proto/cosmos/capability/v1beta1/capability_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.capability.v1beta1 -// file: cosmos/capability/v1beta1/capability.proto - diff --git a/proto/cosmos/capability/v1beta1/capability_pb_service.js b/proto/cosmos/capability/v1beta1/capability_pb_service.js deleted file mode 100644 index 81ee4ed..0000000 --- a/proto/cosmos/capability/v1beta1/capability_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.capability.v1beta1 -// file: cosmos/capability/v1beta1/capability.proto - diff --git a/proto/cosmos/capability/v1beta1/genesis_pb_service.d.ts b/proto/cosmos/capability/v1beta1/genesis_pb_service.d.ts deleted file mode 100644 index 8e4f26a..0000000 --- a/proto/cosmos/capability/v1beta1/genesis_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.capability.v1beta1 -// file: cosmos/capability/v1beta1/genesis.proto - diff --git a/proto/cosmos/capability/v1beta1/genesis_pb_service.js b/proto/cosmos/capability/v1beta1/genesis_pb_service.js deleted file mode 100644 index 8e4f26a..0000000 --- a/proto/cosmos/capability/v1beta1/genesis_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: cosmos.capability.v1beta1 -// file: cosmos/capability/v1beta1/genesis.proto - diff --git a/proto/council/v1beta1/genesis_pb.d.ts b/proto/council/v1beta1/genesis_pb.d.ts deleted file mode 100644 index 6ecfd9a..0000000 --- a/proto/council/v1beta1/genesis_pb.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -// package: council.v1beta1 -// file: council/v1beta1/genesis.proto - -import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as council_v1beta1_types_pb from "../../council/v1beta1/types_pb"; - -export class GenesisState extends jspb.Message { - hasParams(): boolean; - clearParams(): void; - getParams(): council_v1beta1_types_pb.Params | undefined; - setParams(value?: council_v1beta1_types_pb.Params): void; - - clearCouncilsList(): void; - getCouncilsList(): Array; - setCouncilsList(value: Array): void; - addCouncils(value?: council_v1beta1_types_pb.CouncilInfo, index?: number): council_v1beta1_types_pb.CouncilInfo; - - getProposalcount(): number; - setProposalcount(value: number): void; - - clearProposalsList(): void; - getProposalsList(): Array; - setProposalsList(value: Array): void; - addProposals(value?: council_v1beta1_types_pb.Proposal, index?: number): council_v1beta1_types_pb.Proposal; - - clearVotesList(): void; - getVotesList(): Array; - setVotesList(value: Array): void; - addVotes(value?: council_v1beta1_types_pb.Vote, index?: number): council_v1beta1_types_pb.Vote; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenesisState.AsObject; - static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenesisState; - static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; -} - -export namespace GenesisState { - export type AsObject = { - params?: council_v1beta1_types_pb.Params.AsObject, - councilsList: Array, - proposalcount: number, - proposalsList: Array, - votesList: Array, - } -} - diff --git a/proto/council/v1beta1/genesis_pb.js b/proto/council/v1beta1/genesis_pb.js deleted file mode 100644 index ace3466..0000000 --- a/proto/council/v1beta1/genesis_pb.js +++ /dev/null @@ -1,391 +0,0 @@ -// source: council/v1beta1/genesis.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); -var council_v1beta1_types_pb = require('../../council/v1beta1/types_pb.js'); -goog.object.extend(proto, council_v1beta1_types_pb); -goog.exportSymbol('proto.council.v1beta1.GenesisState', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.GenesisState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.council.v1beta1.GenesisState.repeatedFields_, null); -}; -goog.inherits(proto.council.v1beta1.GenesisState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.GenesisState.displayName = 'proto.council.v1beta1.GenesisState'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.council.v1beta1.GenesisState.repeatedFields_ = [2,4,5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.GenesisState.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.GenesisState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.GenesisState.toObject = function(includeInstance, msg) { - var f, obj = { - params: (f = msg.getParams()) && council_v1beta1_types_pb.Params.toObject(includeInstance, f), - councilsList: jspb.Message.toObjectList(msg.getCouncilsList(), - council_v1beta1_types_pb.CouncilInfo.toObject, includeInstance), - proposalcount: jspb.Message.getFieldWithDefault(msg, 3, 0), - proposalsList: jspb.Message.toObjectList(msg.getProposalsList(), - council_v1beta1_types_pb.Proposal.toObject, includeInstance), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - council_v1beta1_types_pb.Vote.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.GenesisState} - */ -proto.council.v1beta1.GenesisState.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.GenesisState; - return proto.council.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.GenesisState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.GenesisState} - */ -proto.council.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new council_v1beta1_types_pb.Params; - reader.readMessage(value,council_v1beta1_types_pb.Params.deserializeBinaryFromReader); - msg.setParams(value); - break; - case 2: - var value = new council_v1beta1_types_pb.CouncilInfo; - reader.readMessage(value,council_v1beta1_types_pb.CouncilInfo.deserializeBinaryFromReader); - msg.addCouncils(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProposalcount(value); - break; - case 4: - var value = new council_v1beta1_types_pb.Proposal; - reader.readMessage(value,council_v1beta1_types_pb.Proposal.deserializeBinaryFromReader); - msg.addProposals(value); - break; - case 5: - var value = new council_v1beta1_types_pb.Vote; - reader.readMessage(value,council_v1beta1_types_pb.Vote.deserializeBinaryFromReader); - msg.addVotes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.GenesisState.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.GenesisState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getParams(); - if (f != null) { - writer.writeMessage( - 1, - f, - council_v1beta1_types_pb.Params.serializeBinaryToWriter - ); - } - f = message.getCouncilsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - council_v1beta1_types_pb.CouncilInfo.serializeBinaryToWriter - ); - } - f = message.getProposalcount(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getProposalsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - council_v1beta1_types_pb.Proposal.serializeBinaryToWriter - ); - } - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - council_v1beta1_types_pb.Vote.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Params params = 1; - * @return {?proto.council.v1beta1.Params} - */ -proto.council.v1beta1.GenesisState.prototype.getParams = function() { - return /** @type{?proto.council.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, council_v1beta1_types_pb.Params, 1)); -}; - - -/** - * @param {?proto.council.v1beta1.Params|undefined} value - * @return {!proto.council.v1beta1.GenesisState} returns this -*/ -proto.council.v1beta1.GenesisState.prototype.setParams = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.GenesisState} returns this - */ -proto.council.v1beta1.GenesisState.prototype.clearParams = function() { - return this.setParams(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.GenesisState.prototype.hasParams = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated CouncilInfo councils = 2; - * @return {!Array} - */ -proto.council.v1beta1.GenesisState.prototype.getCouncilsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, council_v1beta1_types_pb.CouncilInfo, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.council.v1beta1.GenesisState} returns this -*/ -proto.council.v1beta1.GenesisState.prototype.setCouncilsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.council.v1beta1.CouncilInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.council.v1beta1.CouncilInfo} - */ -proto.council.v1beta1.GenesisState.prototype.addCouncils = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.council.v1beta1.CouncilInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.council.v1beta1.GenesisState} returns this - */ -proto.council.v1beta1.GenesisState.prototype.clearCouncilsList = function() { - return this.setCouncilsList([]); -}; - - -/** - * optional uint64 proposalCount = 3; - * @return {number} - */ -proto.council.v1beta1.GenesisState.prototype.getProposalcount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.council.v1beta1.GenesisState} returns this - */ -proto.council.v1beta1.GenesisState.prototype.setProposalcount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * repeated Proposal proposals = 4; - * @return {!Array} - */ -proto.council.v1beta1.GenesisState.prototype.getProposalsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, council_v1beta1_types_pb.Proposal, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.council.v1beta1.GenesisState} returns this -*/ -proto.council.v1beta1.GenesisState.prototype.setProposalsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.council.v1beta1.Proposal=} opt_value - * @param {number=} opt_index - * @return {!proto.council.v1beta1.Proposal} - */ -proto.council.v1beta1.GenesisState.prototype.addProposals = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.council.v1beta1.Proposal, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.council.v1beta1.GenesisState} returns this - */ -proto.council.v1beta1.GenesisState.prototype.clearProposalsList = function() { - return this.setProposalsList([]); -}; - - -/** - * repeated Vote votes = 5; - * @return {!Array} - */ -proto.council.v1beta1.GenesisState.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, council_v1beta1_types_pb.Vote, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.council.v1beta1.GenesisState} returns this -*/ -proto.council.v1beta1.GenesisState.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.council.v1beta1.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.council.v1beta1.Vote} - */ -proto.council.v1beta1.GenesisState.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.council.v1beta1.Vote, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.council.v1beta1.GenesisState} returns this - */ -proto.council.v1beta1.GenesisState.prototype.clearVotesList = function() { - return this.setVotesList([]); -}; - - -goog.object.extend(exports, proto.council.v1beta1); diff --git a/proto/council/v1beta1/genesis_pb_service.d.ts b/proto/council/v1beta1/genesis_pb_service.d.ts deleted file mode 100644 index 52f0881..0000000 --- a/proto/council/v1beta1/genesis_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: council.v1beta1 -// file: council/v1beta1/genesis.proto - diff --git a/proto/council/v1beta1/genesis_pb_service.js b/proto/council/v1beta1/genesis_pb_service.js deleted file mode 100644 index 52f0881..0000000 --- a/proto/council/v1beta1/genesis_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: council.v1beta1 -// file: council/v1beta1/genesis.proto - diff --git a/proto/council/v1beta1/query_pb.d.ts b/proto/council/v1beta1/query_pb.d.ts deleted file mode 100644 index 3fed1b5..0000000 --- a/proto/council/v1beta1/query_pb.d.ts +++ /dev/null @@ -1,327 +0,0 @@ -// package: council.v1beta1 -// file: council/v1beta1/query.proto - -import * as jspb from "google-protobuf"; -import * as cosmos_base_query_v1beta1_pagination_pb from "../../cosmos/base/query/v1beta1/pagination_pb"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as google_api_annotations_pb from "../../google/api/annotations_pb"; -import * as council_v1beta1_types_pb from "../../council/v1beta1/types_pb"; - -export class QueryParamsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryParamsRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryParamsRequest): QueryParamsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryParamsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryParamsRequest; - static deserializeBinaryFromReader(message: QueryParamsRequest, reader: jspb.BinaryReader): QueryParamsRequest; -} - -export namespace QueryParamsRequest { - export type AsObject = { - } -} - -export class QueryParamsResponse extends jspb.Message { - hasParams(): boolean; - clearParams(): void; - getParams(): council_v1beta1_types_pb.Params | undefined; - setParams(value?: council_v1beta1_types_pb.Params): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryParamsResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryParamsResponse): QueryParamsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryParamsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryParamsResponse; - static deserializeBinaryFromReader(message: QueryParamsResponse, reader: jspb.BinaryReader): QueryParamsResponse; -} - -export namespace QueryParamsResponse { - export type AsObject = { - params?: council_v1beta1_types_pb.Params.AsObject, - } -} - -export class QueryCouncilInfoRequest extends jspb.Message { - getName(): string; - setName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryCouncilInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryCouncilInfoRequest): QueryCouncilInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryCouncilInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryCouncilInfoRequest; - static deserializeBinaryFromReader(message: QueryCouncilInfoRequest, reader: jspb.BinaryReader): QueryCouncilInfoRequest; -} - -export namespace QueryCouncilInfoRequest { - export type AsObject = { - name: string, - } -} - -export class QueryCouncilInfoResponse extends jspb.Message { - hasCouncilinfo(): boolean; - clearCouncilinfo(): void; - getCouncilinfo(): council_v1beta1_types_pb.CouncilInfo | undefined; - setCouncilinfo(value?: council_v1beta1_types_pb.CouncilInfo): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryCouncilInfoResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryCouncilInfoResponse): QueryCouncilInfoResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryCouncilInfoResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryCouncilInfoResponse; - static deserializeBinaryFromReader(message: QueryCouncilInfoResponse, reader: jspb.BinaryReader): QueryCouncilInfoResponse; -} - -export namespace QueryCouncilInfoResponse { - export type AsObject = { - councilinfo?: council_v1beta1_types_pb.CouncilInfo.AsObject, - } -} - -export class QueryCouncilInfosRequest extends jspb.Message { - hasPagination(): boolean; - clearPagination(): void; - getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; - setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryCouncilInfosRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryCouncilInfosRequest): QueryCouncilInfosRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryCouncilInfosRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryCouncilInfosRequest; - static deserializeBinaryFromReader(message: QueryCouncilInfosRequest, reader: jspb.BinaryReader): QueryCouncilInfosRequest; -} - -export namespace QueryCouncilInfosRequest { - export type AsObject = { - pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, - } -} - -export class QueryCouncilInfosResponse extends jspb.Message { - clearCouncilinfosList(): void; - getCouncilinfosList(): Array; - setCouncilinfosList(value: Array): void; - addCouncilinfos(value?: council_v1beta1_types_pb.CouncilInfo, index?: number): council_v1beta1_types_pb.CouncilInfo; - - hasPagination(): boolean; - clearPagination(): void; - getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; - setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryCouncilInfosResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryCouncilInfosResponse): QueryCouncilInfosResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryCouncilInfosResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryCouncilInfosResponse; - static deserializeBinaryFromReader(message: QueryCouncilInfosResponse, reader: jspb.BinaryReader): QueryCouncilInfosResponse; -} - -export namespace QueryCouncilInfosResponse { - export type AsObject = { - councilinfosList: Array, - pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, - } -} - -export class QueryProposalRequest extends jspb.Message { - getProposalId(): number; - setProposalId(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryProposalRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryProposalRequest): QueryProposalRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryProposalRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryProposalRequest; - static deserializeBinaryFromReader(message: QueryProposalRequest, reader: jspb.BinaryReader): QueryProposalRequest; -} - -export namespace QueryProposalRequest { - export type AsObject = { - proposalId: number, - } -} - -export class QueryProposalResponse extends jspb.Message { - hasProposal(): boolean; - clearProposal(): void; - getProposal(): council_v1beta1_types_pb.Proposal | undefined; - setProposal(value?: council_v1beta1_types_pb.Proposal): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryProposalResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryProposalResponse): QueryProposalResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryProposalResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryProposalResponse; - static deserializeBinaryFromReader(message: QueryProposalResponse, reader: jspb.BinaryReader): QueryProposalResponse; -} - -export namespace QueryProposalResponse { - export type AsObject = { - proposal?: council_v1beta1_types_pb.Proposal.AsObject, - } -} - -export class QueryProposalsRequest extends jspb.Message { - getProposalStatus(): string; - setProposalStatus(value: string): void; - - getProposer(): string; - setProposer(value: string): void; - - getCouncil(): string; - setCouncil(value: string): void; - - hasPagination(): boolean; - clearPagination(): void; - getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageRequest | undefined; - setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageRequest): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryProposalsRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryProposalsRequest): QueryProposalsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryProposalsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryProposalsRequest; - static deserializeBinaryFromReader(message: QueryProposalsRequest, reader: jspb.BinaryReader): QueryProposalsRequest; -} - -export namespace QueryProposalsRequest { - export type AsObject = { - proposalStatus: string, - proposer: string, - council: string, - pagination?: cosmos_base_query_v1beta1_pagination_pb.PageRequest.AsObject, - } -} - -export class QueryProposalsResponse extends jspb.Message { - clearProposalsList(): void; - getProposalsList(): Array; - setProposalsList(value: Array): void; - addProposals(value?: council_v1beta1_types_pb.Proposal, index?: number): council_v1beta1_types_pb.Proposal; - - hasPagination(): boolean; - clearPagination(): void; - getPagination(): cosmos_base_query_v1beta1_pagination_pb.PageResponse | undefined; - setPagination(value?: cosmos_base_query_v1beta1_pagination_pb.PageResponse): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryProposalsResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryProposalsResponse): QueryProposalsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryProposalsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryProposalsResponse; - static deserializeBinaryFromReader(message: QueryProposalsResponse, reader: jspb.BinaryReader): QueryProposalsResponse; -} - -export namespace QueryProposalsResponse { - export type AsObject = { - proposalsList: Array, - pagination?: cosmos_base_query_v1beta1_pagination_pb.PageResponse.AsObject, - } -} - -export class QueryVotesRequest extends jspb.Message { - getProposalId(): number; - setProposalId(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryVotesRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryVotesRequest): QueryVotesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryVotesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryVotesRequest; - static deserializeBinaryFromReader(message: QueryVotesRequest, reader: jspb.BinaryReader): QueryVotesRequest; -} - -export namespace QueryVotesRequest { - export type AsObject = { - proposalId: number, - } -} - -export class QueryVotesResponse extends jspb.Message { - clearVotesList(): void; - getVotesList(): Array; - setVotesList(value: Array): void; - addVotes(value?: council_v1beta1_types_pb.Vote, index?: number): council_v1beta1_types_pb.Vote; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryVotesResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryVotesResponse): QueryVotesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryVotesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryVotesResponse; - static deserializeBinaryFromReader(message: QueryVotesResponse, reader: jspb.BinaryReader): QueryVotesResponse; -} - -export namespace QueryVotesResponse { - export type AsObject = { - votesList: Array, - } -} - -export class QueryTallyResultRequest extends jspb.Message { - getProposalId(): number; - setProposalId(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryTallyResultRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryTallyResultRequest): QueryTallyResultRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryTallyResultRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryTallyResultRequest; - static deserializeBinaryFromReader(message: QueryTallyResultRequest, reader: jspb.BinaryReader): QueryTallyResultRequest; -} - -export namespace QueryTallyResultRequest { - export type AsObject = { - proposalId: number, - } -} - -export class QueryTallyResultResponse extends jspb.Message { - hasTally(): boolean; - clearTally(): void; - getTally(): council_v1beta1_types_pb.TallyResult | undefined; - setTally(value?: council_v1beta1_types_pb.TallyResult): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryTallyResultResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryTallyResultResponse): QueryTallyResultResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryTallyResultResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryTallyResultResponse; - static deserializeBinaryFromReader(message: QueryTallyResultResponse, reader: jspb.BinaryReader): QueryTallyResultResponse; -} - -export namespace QueryTallyResultResponse { - export type AsObject = { - tally?: council_v1beta1_types_pb.TallyResult.AsObject, - } -} - diff --git a/proto/council/v1beta1/query_pb_service.d.ts b/proto/council/v1beta1/query_pb_service.d.ts deleted file mode 100644 index cb256de..0000000 --- a/proto/council/v1beta1/query_pb_service.d.ts +++ /dev/null @@ -1,177 +0,0 @@ -// package: council.v1beta1 -// file: council/v1beta1/query.proto - -import * as council_v1beta1_query_pb from "../../council/v1beta1/query_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type QueryParams = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof council_v1beta1_query_pb.QueryParamsRequest; - readonly responseType: typeof council_v1beta1_query_pb.QueryParamsResponse; -}; - -type QueryCouncilInfo = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof council_v1beta1_query_pb.QueryCouncilInfoRequest; - readonly responseType: typeof council_v1beta1_query_pb.QueryCouncilInfoResponse; -}; - -type QueryCouncilInfos = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof council_v1beta1_query_pb.QueryCouncilInfosRequest; - readonly responseType: typeof council_v1beta1_query_pb.QueryCouncilInfosResponse; -}; - -type QueryProposal = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof council_v1beta1_query_pb.QueryProposalRequest; - readonly responseType: typeof council_v1beta1_query_pb.QueryProposalResponse; -}; - -type QueryProposals = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof council_v1beta1_query_pb.QueryProposalsRequest; - readonly responseType: typeof council_v1beta1_query_pb.QueryProposalsResponse; -}; - -type QueryVotes = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof council_v1beta1_query_pb.QueryVotesRequest; - readonly responseType: typeof council_v1beta1_query_pb.QueryVotesResponse; -}; - -type QueryTallyResult = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof council_v1beta1_query_pb.QueryTallyResultRequest; - readonly responseType: typeof council_v1beta1_query_pb.QueryTallyResultResponse; -}; - -export class Query { - static readonly serviceName: string; - static readonly Params: QueryParams; - static readonly CouncilInfo: QueryCouncilInfo; - static readonly CouncilInfos: QueryCouncilInfos; - static readonly Proposal: QueryProposal; - static readonly Proposals: QueryProposals; - static readonly Votes: QueryVotes; - static readonly TallyResult: QueryTallyResult; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class QueryClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - params( - requestMessage: council_v1beta1_query_pb.QueryParamsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryParamsResponse|null) => void - ): UnaryResponse; - params( - requestMessage: council_v1beta1_query_pb.QueryParamsRequest, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryParamsResponse|null) => void - ): UnaryResponse; - councilInfo( - requestMessage: council_v1beta1_query_pb.QueryCouncilInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryCouncilInfoResponse|null) => void - ): UnaryResponse; - councilInfo( - requestMessage: council_v1beta1_query_pb.QueryCouncilInfoRequest, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryCouncilInfoResponse|null) => void - ): UnaryResponse; - councilInfos( - requestMessage: council_v1beta1_query_pb.QueryCouncilInfosRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryCouncilInfosResponse|null) => void - ): UnaryResponse; - councilInfos( - requestMessage: council_v1beta1_query_pb.QueryCouncilInfosRequest, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryCouncilInfosResponse|null) => void - ): UnaryResponse; - proposal( - requestMessage: council_v1beta1_query_pb.QueryProposalRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryProposalResponse|null) => void - ): UnaryResponse; - proposal( - requestMessage: council_v1beta1_query_pb.QueryProposalRequest, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryProposalResponse|null) => void - ): UnaryResponse; - proposals( - requestMessage: council_v1beta1_query_pb.QueryProposalsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryProposalsResponse|null) => void - ): UnaryResponse; - proposals( - requestMessage: council_v1beta1_query_pb.QueryProposalsRequest, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryProposalsResponse|null) => void - ): UnaryResponse; - votes( - requestMessage: council_v1beta1_query_pb.QueryVotesRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryVotesResponse|null) => void - ): UnaryResponse; - votes( - requestMessage: council_v1beta1_query_pb.QueryVotesRequest, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryVotesResponse|null) => void - ): UnaryResponse; - tallyResult( - requestMessage: council_v1beta1_query_pb.QueryTallyResultRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryTallyResultResponse|null) => void - ): UnaryResponse; - tallyResult( - requestMessage: council_v1beta1_query_pb.QueryTallyResultRequest, - callback: (error: ServiceError|null, responseMessage: council_v1beta1_query_pb.QueryTallyResultResponse|null) => void - ): UnaryResponse; -} - diff --git a/proto/council/v1beta1/tx_pb.d.ts b/proto/council/v1beta1/tx_pb.d.ts deleted file mode 100644 index 82243bc..0000000 --- a/proto/council/v1beta1/tx_pb.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -// package: council.v1beta1 -// file: council/v1beta1/tx.proto - -import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; -import * as cosmos_base_v1beta1_coin_pb from "../../cosmos/base/v1beta1/coin_pb"; -import * as cosmos_proto_cosmos_pb from "../../cosmos_proto/cosmos_pb"; -import * as cosmos_params_v1beta1_params_pb from "../../cosmos/params/v1beta1/params_pb"; -import * as council_v1beta1_types_pb from "../../council/v1beta1/types_pb"; - -export class MsgSubmitProposal extends jspb.Message { - getCouncil(): council_v1beta1_types_pb.CouncilTypeMap[keyof council_v1beta1_types_pb.CouncilTypeMap]; - setCouncil(value: council_v1beta1_types_pb.CouncilTypeMap[keyof council_v1beta1_types_pb.CouncilTypeMap]): void; - - getProposer(): string; - setProposer(value: string): void; - - clearMessagesList(): void; - getMessagesList(): Array; - setMessagesList(value: Array): void; - addMessages(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any; - - getTitle(): string; - setTitle(value: string): void; - - getMetadata(): string; - setMetadata(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitProposal.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitProposal): MsgSubmitProposal.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitProposal, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitProposal; - static deserializeBinaryFromReader(message: MsgSubmitProposal, reader: jspb.BinaryReader): MsgSubmitProposal; -} - -export namespace MsgSubmitProposal { - export type AsObject = { - council: council_v1beta1_types_pb.CouncilTypeMap[keyof council_v1beta1_types_pb.CouncilTypeMap], - proposer: string, - messagesList: Array, - title: string, - metadata: string, - } -} - -export class MsgSubmitProposalResponse extends jspb.Message { - getProposalId(): number; - setProposalId(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitProposalResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitProposalResponse): MsgSubmitProposalResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitProposalResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitProposalResponse; - static deserializeBinaryFromReader(message: MsgSubmitProposalResponse, reader: jspb.BinaryReader): MsgSubmitProposalResponse; -} - -export namespace MsgSubmitProposalResponse { - export type AsObject = { - proposalId: number, - } -} - -export class MsgExecLegacyContent extends jspb.Message { - getCouncil(): council_v1beta1_types_pb.CouncilTypeMap[keyof council_v1beta1_types_pb.CouncilTypeMap]; - setCouncil(value: council_v1beta1_types_pb.CouncilTypeMap[keyof council_v1beta1_types_pb.CouncilTypeMap]): void; - - hasContent(): boolean; - clearContent(): void; - getContent(): google_protobuf_any_pb.Any | undefined; - setContent(value?: google_protobuf_any_pb.Any): void; - - getAuthority(): string; - setAuthority(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgExecLegacyContent.AsObject; - static toObject(includeInstance: boolean, msg: MsgExecLegacyContent): MsgExecLegacyContent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgExecLegacyContent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgExecLegacyContent; - static deserializeBinaryFromReader(message: MsgExecLegacyContent, reader: jspb.BinaryReader): MsgExecLegacyContent; -} - -export namespace MsgExecLegacyContent { - export type AsObject = { - council: council_v1beta1_types_pb.CouncilTypeMap[keyof council_v1beta1_types_pb.CouncilTypeMap], - content?: google_protobuf_any_pb.Any.AsObject, - authority: string, - } -} - -export class MsgExecLegacyContentResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgExecLegacyContentResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgExecLegacyContentResponse): MsgExecLegacyContentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgExecLegacyContentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgExecLegacyContentResponse; - static deserializeBinaryFromReader(message: MsgExecLegacyContentResponse, reader: jspb.BinaryReader): MsgExecLegacyContentResponse; -} - -export namespace MsgExecLegacyContentResponse { - export type AsObject = { - } -} - -export class MsgVote extends jspb.Message { - getProposalId(): number; - setProposalId(value: number): void; - - getVoter(): string; - setVoter(value: string): void; - - getOption(): council_v1beta1_types_pb.VoteOptionMap[keyof council_v1beta1_types_pb.VoteOptionMap]; - setOption(value: council_v1beta1_types_pb.VoteOptionMap[keyof council_v1beta1_types_pb.VoteOptionMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgVote.AsObject; - static toObject(includeInstance: boolean, msg: MsgVote): MsgVote.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgVote, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgVote; - static deserializeBinaryFromReader(message: MsgVote, reader: jspb.BinaryReader): MsgVote; -} - -export namespace MsgVote { - export type AsObject = { - proposalId: number, - voter: string, - option: council_v1beta1_types_pb.VoteOptionMap[keyof council_v1beta1_types_pb.VoteOptionMap], - } -} - -export class MsgVoteResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgVoteResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgVoteResponse): MsgVoteResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgVoteResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgVoteResponse; - static deserializeBinaryFromReader(message: MsgVoteResponse, reader: jspb.BinaryReader): MsgVoteResponse; -} - -export namespace MsgVoteResponse { - export type AsObject = { - } -} - diff --git a/proto/council/v1beta1/types_pb.d.ts b/proto/council/v1beta1/types_pb.d.ts deleted file mode 100644 index 38f2316..0000000 --- a/proto/council/v1beta1/types_pb.d.ts +++ /dev/null @@ -1,298 +0,0 @@ -// package: council.v1beta1 -// file: council/v1beta1/types.proto - -import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; -import * as cosmos_proto_cosmos_pb from "../../cosmos_proto/cosmos_pb"; -import * as cosmos_base_v1beta1_coin_pb from "../../cosmos/base/v1beta1/coin_pb"; - -export class Params extends jspb.Message { - hasVotingPeriod(): boolean; - clearVotingPeriod(): void; - getVotingPeriod(): google_protobuf_duration_pb.Duration | undefined; - setVotingPeriod(value?: google_protobuf_duration_pb.Duration): void; - - hasWaitingVetoPeriod(): boolean; - clearWaitingVetoPeriod(): void; - getWaitingVetoPeriod(): google_protobuf_duration_pb.Duration | undefined; - setWaitingVetoPeriod(value?: google_protobuf_duration_pb.Duration): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Params.AsObject; - static toObject(includeInstance: boolean, msg: Params): Params.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Params; - static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; -} - -export namespace Params { - export type AsObject = { - votingPeriod?: google_protobuf_duration_pb.Duration.AsObject, - waitingVetoPeriod?: google_protobuf_duration_pb.Duration.AsObject, - } -} - -export class Member extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - getWeight(): string; - setWeight(value: string): void; - - getMetadata(): string; - setMetadata(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Member.AsObject; - static toObject(includeInstance: boolean, msg: Member): Member.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Member, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Member; - static deserializeBinaryFromReader(message: Member, reader: jspb.BinaryReader): Member; -} - -export namespace Member { - export type AsObject = { - address: string, - weight: string, - metadata: string, - } -} - -export class CouncilInfo extends jspb.Message { - getCouncilType(): CouncilTypeMap[keyof CouncilTypeMap]; - setCouncilType(value: CouncilTypeMap[keyof CouncilTypeMap]): void; - - getAddress(): string; - setAddress(value: string): void; - - getVersion(): number; - setVersion(value: number): void; - - clearMembersList(): void; - getMembersList(): Array; - setMembersList(value: Array): void; - addMembers(value?: Member, index?: number): Member; - - hasCreatedAt(): boolean; - clearCreatedAt(): void; - getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getPercentageThreshold(): string; - setPercentageThreshold(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CouncilInfo.AsObject; - static toObject(includeInstance: boolean, msg: CouncilInfo): CouncilInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CouncilInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CouncilInfo; - static deserializeBinaryFromReader(message: CouncilInfo, reader: jspb.BinaryReader): CouncilInfo; -} - -export namespace CouncilInfo { - export type AsObject = { - councilType: CouncilTypeMap[keyof CouncilTypeMap], - address: string, - version: number, - membersList: Array, - createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - percentageThreshold: string, - } -} - -export class Proposal extends jspb.Message { - getId(): number; - setId(value: number): void; - - getCouncil(): CouncilTypeMap[keyof CouncilTypeMap]; - setCouncil(value: CouncilTypeMap[keyof CouncilTypeMap]): void; - - getTitle(): string; - setTitle(value: string): void; - - getMetadata(): string; - setMetadata(value: string): void; - - getProposer(): string; - setProposer(value: string): void; - - hasSubmitTime(): boolean; - clearSubmitTime(): void; - getSubmitTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setSubmitTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getStatus(): ProposalStatusMap[keyof ProposalStatusMap]; - setStatus(value: ProposalStatusMap[keyof ProposalStatusMap]): void; - - hasFinalTallyResult(): boolean; - clearFinalTallyResult(): void; - getFinalTallyResult(): TallyResult | undefined; - setFinalTallyResult(value?: TallyResult): void; - - hasVotingPeriodEnd(): boolean; - clearVotingPeriodEnd(): void; - getVotingPeriodEnd(): google_protobuf_timestamp_pb.Timestamp | undefined; - setVotingPeriodEnd(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getVetoProposalId(): number; - setVetoProposalId(value: number): void; - - hasVetoPeriodEnd(): boolean; - clearVetoPeriodEnd(): void; - getVetoPeriodEnd(): google_protobuf_timestamp_pb.Timestamp | undefined; - setVetoPeriodEnd(value?: google_protobuf_timestamp_pb.Timestamp): void; - - clearMessagesList(): void; - getMessagesList(): Array; - setMessagesList(value: Array): void; - addMessages(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Proposal.AsObject; - static toObject(includeInstance: boolean, msg: Proposal): Proposal.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Proposal, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Proposal; - static deserializeBinaryFromReader(message: Proposal, reader: jspb.BinaryReader): Proposal; -} - -export namespace Proposal { - export type AsObject = { - id: number, - council: CouncilTypeMap[keyof CouncilTypeMap], - title: string, - metadata: string, - proposer: string, - submitTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, - status: ProposalStatusMap[keyof ProposalStatusMap], - finalTallyResult?: TallyResult.AsObject, - votingPeriodEnd?: google_protobuf_timestamp_pb.Timestamp.AsObject, - vetoProposalId: number, - vetoPeriodEnd?: google_protobuf_timestamp_pb.Timestamp.AsObject, - messagesList: Array, - } -} - -export class TallyResult extends jspb.Message { - getYesCount(): string; - setYesCount(value: string): void; - - getNoCount(): string; - setNoCount(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TallyResult.AsObject; - static toObject(includeInstance: boolean, msg: TallyResult): TallyResult.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TallyResult, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TallyResult; - static deserializeBinaryFromReader(message: TallyResult, reader: jspb.BinaryReader): TallyResult; -} - -export namespace TallyResult { - export type AsObject = { - yesCount: string, - noCount: string, - } -} - -export class Vote extends jspb.Message { - getProposalId(): number; - setProposalId(value: number): void; - - getVoter(): string; - setVoter(value: string): void; - - getOption(): VoteOptionMap[keyof VoteOptionMap]; - setOption(value: VoteOptionMap[keyof VoteOptionMap]): void; - - hasSubmitTime(): boolean; - clearSubmitTime(): void; - getSubmitTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setSubmitTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Vote.AsObject; - static toObject(includeInstance: boolean, msg: Vote): Vote.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Vote, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Vote; - static deserializeBinaryFromReader(message: Vote, reader: jspb.BinaryReader): Vote; -} - -export namespace Vote { - export type AsObject = { - proposalId: number, - voter: string, - option: VoteOptionMap[keyof VoteOptionMap], - submitTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class VetoProposal extends jspb.Message { - getProposalId(): number; - setProposalId(value: number): void; - - getDescription(): string; - setDescription(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VetoProposal.AsObject; - static toObject(includeInstance: boolean, msg: VetoProposal): VetoProposal.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VetoProposal, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VetoProposal; - static deserializeBinaryFromReader(message: VetoProposal, reader: jspb.BinaryReader): VetoProposal; -} - -export namespace VetoProposal { - export type AsObject = { - proposalId: number, - description: string, - } -} - -export interface CouncilTypeMap { - COUNCIL_TYPE_UNSPECIFIED: 0; - COUNCIL_TYPE_BAND_DAO: 1; - COUNCIL_TYPE_GRANT: 2; - COUNCIL_TYPE_TECH: 3; -} - -export const CouncilType: CouncilTypeMap; - -export interface ProposalStatusMap { - PROPOSAL_STATUS_UNSPECIFIED: 0; - PROPOSAL_STATUS_SUBMITTED: 1; - PROPOSAL_STATUS_WAITING_VETO: 2; - PROPOSAL_STATUS_IN_VETO: 3; - PROPOSAL_STATUS_REJECTED_BY_COUNCIL: 4; - PROPOSAL_STATUS_REJECTED_BY_VETO: 5; - PROPOSAL_STATUS_EXECUTED: 6; - PROPOSAL_STATUS_EXECUTION_FAILED: 7; - PROPOSAL_STATUS_TALLYING_FAILED: 8; -} - -export const ProposalStatus: ProposalStatusMap; - -export interface VoteOptionMap { - VOTE_OPTION_UNSPECIFIED: 0; - VOTE_OPTION_YES: 1; - VOTE_OPTION_NO: 2; -} - -export const VoteOption: VoteOptionMap; - diff --git a/proto/council/v1beta1/types_pb.js b/proto/council/v1beta1/types_pb.js deleted file mode 100644 index da0f6ac..0000000 --- a/proto/council/v1beta1/types_pb.js +++ /dev/null @@ -1,2079 +0,0 @@ -// source: council/v1beta1/types.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); -var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, google_protobuf_any_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); -goog.object.extend(proto, google_protobuf_duration_pb); -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js'); -goog.object.extend(proto, cosmos_proto_cosmos_pb); -var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); -goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); -goog.exportSymbol('proto.council.v1beta1.CouncilInfo', null, global); -goog.exportSymbol('proto.council.v1beta1.CouncilType', null, global); -goog.exportSymbol('proto.council.v1beta1.Member', null, global); -goog.exportSymbol('proto.council.v1beta1.Params', null, global); -goog.exportSymbol('proto.council.v1beta1.Proposal', null, global); -goog.exportSymbol('proto.council.v1beta1.ProposalStatus', null, global); -goog.exportSymbol('proto.council.v1beta1.TallyResult', null, global); -goog.exportSymbol('proto.council.v1beta1.VetoProposal', null, global); -goog.exportSymbol('proto.council.v1beta1.Vote', null, global); -goog.exportSymbol('proto.council.v1beta1.VoteOption', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.Params = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.council.v1beta1.Params, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.Params.displayName = 'proto.council.v1beta1.Params'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.Member = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.council.v1beta1.Member, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.Member.displayName = 'proto.council.v1beta1.Member'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.CouncilInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.council.v1beta1.CouncilInfo.repeatedFields_, null); -}; -goog.inherits(proto.council.v1beta1.CouncilInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.CouncilInfo.displayName = 'proto.council.v1beta1.CouncilInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.Proposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.council.v1beta1.Proposal.repeatedFields_, null); -}; -goog.inherits(proto.council.v1beta1.Proposal, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.Proposal.displayName = 'proto.council.v1beta1.Proposal'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.TallyResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.council.v1beta1.TallyResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.TallyResult.displayName = 'proto.council.v1beta1.TallyResult'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.Vote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.council.v1beta1.Vote, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.Vote.displayName = 'proto.council.v1beta1.Vote'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.council.v1beta1.VetoProposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.council.v1beta1.VetoProposal, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.council.v1beta1.VetoProposal.displayName = 'proto.council.v1beta1.VetoProposal'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.Params.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.Params} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.Params.toObject = function(includeInstance, msg) { - var f, obj = { - votingPeriod: (f = msg.getVotingPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - waitingVetoPeriod: (f = msg.getWaitingVetoPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.Params} - */ -proto.council.v1beta1.Params.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.Params; - return proto.council.v1beta1.Params.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.Params} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.Params} - */ -proto.council.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setVotingPeriod(value); - break; - case 2: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setWaitingVetoPeriod(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.Params.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.Params.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.Params} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVotingPeriod(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getWaitingVetoPeriod(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } -}; - - -/** - * optional google.protobuf.Duration voting_period = 1; - * @return {?proto.google.protobuf.Duration} - */ -proto.council.v1beta1.Params.prototype.getVotingPeriod = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.council.v1beta1.Params} returns this -*/ -proto.council.v1beta1.Params.prototype.setVotingPeriod = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.Params} returns this - */ -proto.council.v1beta1.Params.prototype.clearVotingPeriod = function() { - return this.setVotingPeriod(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.Params.prototype.hasVotingPeriod = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Duration waiting_veto_period = 2; - * @return {?proto.google.protobuf.Duration} - */ -proto.council.v1beta1.Params.prototype.getWaitingVetoPeriod = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.council.v1beta1.Params} returns this -*/ -proto.council.v1beta1.Params.prototype.setWaitingVetoPeriod = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.Params} returns this - */ -proto.council.v1beta1.Params.prototype.clearWaitingVetoPeriod = function() { - return this.setWaitingVetoPeriod(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.Params.prototype.hasWaitingVetoPeriod = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.Member.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.Member.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.Member} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.Member.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - weight: jspb.Message.getFieldWithDefault(msg, 2, ""), - metadata: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.Member} - */ -proto.council.v1beta1.Member.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.Member; - return proto.council.v1beta1.Member.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.Member} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.Member} - */ -proto.council.v1beta1.Member.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setWeight(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMetadata(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.Member.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.Member.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.Member} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.Member.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getWeight(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getMetadata(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.council.v1beta1.Member.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.Member} returns this - */ -proto.council.v1beta1.Member.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string weight = 2; - * @return {string} - */ -proto.council.v1beta1.Member.prototype.getWeight = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.Member} returns this - */ -proto.council.v1beta1.Member.prototype.setWeight = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string metadata = 3; - * @return {string} - */ -proto.council.v1beta1.Member.prototype.getMetadata = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.Member} returns this - */ -proto.council.v1beta1.Member.prototype.setMetadata = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.council.v1beta1.CouncilInfo.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.CouncilInfo.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.CouncilInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.CouncilInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.CouncilInfo.toObject = function(includeInstance, msg) { - var f, obj = { - councilType: jspb.Message.getFieldWithDefault(msg, 1, 0), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - version: jspb.Message.getFieldWithDefault(msg, 3, 0), - membersList: jspb.Message.toObjectList(msg.getMembersList(), - proto.council.v1beta1.Member.toObject, includeInstance), - createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - percentageThreshold: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.CouncilInfo} - */ -proto.council.v1beta1.CouncilInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.CouncilInfo; - return proto.council.v1beta1.CouncilInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.CouncilInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.CouncilInfo} - */ -proto.council.v1beta1.CouncilInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.council.v1beta1.CouncilType} */ (reader.readEnum()); - msg.setCouncilType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setVersion(value); - break; - case 4: - var value = new proto.council.v1beta1.Member; - reader.readMessage(value,proto.council.v1beta1.Member.deserializeBinaryFromReader); - msg.addMembers(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setCreatedAt(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setPercentageThreshold(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.CouncilInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.CouncilInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.CouncilInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.CouncilInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCouncilType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getMembersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.council.v1beta1.Member.serializeBinaryToWriter - ); - } - f = message.getCreatedAt(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getPercentageThreshold(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional CouncilType council_type = 1; - * @return {!proto.council.v1beta1.CouncilType} - */ -proto.council.v1beta1.CouncilInfo.prototype.getCouncilType = function() { - return /** @type {!proto.council.v1beta1.CouncilType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.council.v1beta1.CouncilType} value - * @return {!proto.council.v1beta1.CouncilInfo} returns this - */ -proto.council.v1beta1.CouncilInfo.prototype.setCouncilType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string address = 2; - * @return {string} - */ -proto.council.v1beta1.CouncilInfo.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.CouncilInfo} returns this - */ -proto.council.v1beta1.CouncilInfo.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint64 version = 3; - * @return {number} - */ -proto.council.v1beta1.CouncilInfo.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.council.v1beta1.CouncilInfo} returns this - */ -proto.council.v1beta1.CouncilInfo.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * repeated Member members = 4; - * @return {!Array} - */ -proto.council.v1beta1.CouncilInfo.prototype.getMembersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.council.v1beta1.Member, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.council.v1beta1.CouncilInfo} returns this -*/ -proto.council.v1beta1.CouncilInfo.prototype.setMembersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.council.v1beta1.Member=} opt_value - * @param {number=} opt_index - * @return {!proto.council.v1beta1.Member} - */ -proto.council.v1beta1.CouncilInfo.prototype.addMembers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.council.v1beta1.Member, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.council.v1beta1.CouncilInfo} returns this - */ -proto.council.v1beta1.CouncilInfo.prototype.clearMembersList = function() { - return this.setMembersList([]); -}; - - -/** - * optional google.protobuf.Timestamp created_at = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.council.v1beta1.CouncilInfo.prototype.getCreatedAt = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.council.v1beta1.CouncilInfo} returns this -*/ -proto.council.v1beta1.CouncilInfo.prototype.setCreatedAt = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.CouncilInfo} returns this - */ -proto.council.v1beta1.CouncilInfo.prototype.clearCreatedAt = function() { - return this.setCreatedAt(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.CouncilInfo.prototype.hasCreatedAt = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional string percentage_threshold = 6; - * @return {string} - */ -proto.council.v1beta1.CouncilInfo.prototype.getPercentageThreshold = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.CouncilInfo} returns this - */ -proto.council.v1beta1.CouncilInfo.prototype.setPercentageThreshold = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.council.v1beta1.Proposal.repeatedFields_ = [12]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.Proposal.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.Proposal.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.Proposal} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.Proposal.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - council: jspb.Message.getFieldWithDefault(msg, 2, 0), - title: jspb.Message.getFieldWithDefault(msg, 3, ""), - metadata: jspb.Message.getFieldWithDefault(msg, 4, ""), - proposer: jspb.Message.getFieldWithDefault(msg, 5, ""), - submitTime: (f = msg.getSubmitTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - status: jspb.Message.getFieldWithDefault(msg, 7, 0), - finalTallyResult: (f = msg.getFinalTallyResult()) && proto.council.v1beta1.TallyResult.toObject(includeInstance, f), - votingPeriodEnd: (f = msg.getVotingPeriodEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - vetoProposalId: jspb.Message.getFieldWithDefault(msg, 10, 0), - vetoPeriodEnd: (f = msg.getVetoPeriodEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - messagesList: jspb.Message.toObjectList(msg.getMessagesList(), - google_protobuf_any_pb.Any.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.Proposal} - */ -proto.council.v1beta1.Proposal.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.Proposal; - return proto.council.v1beta1.Proposal.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.Proposal} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.Proposal} - */ -proto.council.v1beta1.Proposal.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = /** @type {!proto.council.v1beta1.CouncilType} */ (reader.readEnum()); - msg.setCouncil(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setTitle(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setMetadata(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setProposer(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSubmitTime(value); - break; - case 7: - var value = /** @type {!proto.council.v1beta1.ProposalStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 8: - var value = new proto.council.v1beta1.TallyResult; - reader.readMessage(value,proto.council.v1beta1.TallyResult.deserializeBinaryFromReader); - msg.setFinalTallyResult(value); - break; - case 9: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setVotingPeriodEnd(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setVetoProposalId(value); - break; - case 11: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setVetoPeriodEnd(value); - break; - case 12: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.addMessages(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.Proposal.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.Proposal.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.Proposal} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.Proposal.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getCouncil(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getTitle(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMetadata(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getProposer(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getSubmitTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 7, - f - ); - } - f = message.getFinalTallyResult(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.council.v1beta1.TallyResult.serializeBinaryToWriter - ); - } - f = message.getVotingPeriodEnd(); - if (f != null) { - writer.writeMessage( - 9, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getVetoProposalId(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getVetoPeriodEnd(); - if (f != null) { - writer.writeMessage( - 11, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getMessagesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 12, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.council.v1beta1.Proposal.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional CouncilType council = 2; - * @return {!proto.council.v1beta1.CouncilType} - */ -proto.council.v1beta1.Proposal.prototype.getCouncil = function() { - return /** @type {!proto.council.v1beta1.CouncilType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.council.v1beta1.CouncilType} value - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.setCouncil = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional string title = 3; - * @return {string} - */ -proto.council.v1beta1.Proposal.prototype.getTitle = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.setTitle = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string metadata = 4; - * @return {string} - */ -proto.council.v1beta1.Proposal.prototype.getMetadata = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.setMetadata = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string proposer = 5; - * @return {string} - */ -proto.council.v1beta1.Proposal.prototype.getProposer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.setProposer = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional google.protobuf.Timestamp submit_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.council.v1beta1.Proposal.prototype.getSubmitTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.council.v1beta1.Proposal} returns this -*/ -proto.council.v1beta1.Proposal.prototype.setSubmitTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.clearSubmitTime = function() { - return this.setSubmitTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.Proposal.prototype.hasSubmitTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional ProposalStatus status = 7; - * @return {!proto.council.v1beta1.ProposalStatus} - */ -proto.council.v1beta1.Proposal.prototype.getStatus = function() { - return /** @type {!proto.council.v1beta1.ProposalStatus} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {!proto.council.v1beta1.ProposalStatus} value - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); -}; - - -/** - * optional TallyResult final_tally_result = 8; - * @return {?proto.council.v1beta1.TallyResult} - */ -proto.council.v1beta1.Proposal.prototype.getFinalTallyResult = function() { - return /** @type{?proto.council.v1beta1.TallyResult} */ ( - jspb.Message.getWrapperField(this, proto.council.v1beta1.TallyResult, 8)); -}; - - -/** - * @param {?proto.council.v1beta1.TallyResult|undefined} value - * @return {!proto.council.v1beta1.Proposal} returns this -*/ -proto.council.v1beta1.Proposal.prototype.setFinalTallyResult = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.clearFinalTallyResult = function() { - return this.setFinalTallyResult(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.Proposal.prototype.hasFinalTallyResult = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional google.protobuf.Timestamp voting_period_end = 9; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.council.v1beta1.Proposal.prototype.getVotingPeriodEnd = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.council.v1beta1.Proposal} returns this -*/ -proto.council.v1beta1.Proposal.prototype.setVotingPeriodEnd = function(value) { - return jspb.Message.setWrapperField(this, 9, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.clearVotingPeriodEnd = function() { - return this.setVotingPeriodEnd(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.Proposal.prototype.hasVotingPeriodEnd = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional uint64 veto_proposal_id = 10; - * @return {number} - */ -proto.council.v1beta1.Proposal.prototype.getVetoProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.setVetoProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional google.protobuf.Timestamp veto_period_end = 11; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.council.v1beta1.Proposal.prototype.getVetoPeriodEnd = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.council.v1beta1.Proposal} returns this -*/ -proto.council.v1beta1.Proposal.prototype.setVetoPeriodEnd = function(value) { - return jspb.Message.setWrapperField(this, 11, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.clearVetoPeriodEnd = function() { - return this.setVetoPeriodEnd(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.Proposal.prototype.hasVetoPeriodEnd = function() { - return jspb.Message.getField(this, 11) != null; -}; - - -/** - * repeated google.protobuf.Any messages = 12; - * @return {!Array} - */ -proto.council.v1beta1.Proposal.prototype.getMessagesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 12)); -}; - - -/** - * @param {!Array} value - * @return {!proto.council.v1beta1.Proposal} returns this -*/ -proto.council.v1beta1.Proposal.prototype.setMessagesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); -}; - - -/** - * @param {!proto.google.protobuf.Any=} opt_value - * @param {number=} opt_index - * @return {!proto.google.protobuf.Any} - */ -proto.council.v1beta1.Proposal.prototype.addMessages = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.google.protobuf.Any, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.council.v1beta1.Proposal} returns this - */ -proto.council.v1beta1.Proposal.prototype.clearMessagesList = function() { - return this.setMessagesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.TallyResult.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.TallyResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.TallyResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.TallyResult.toObject = function(includeInstance, msg) { - var f, obj = { - yesCount: jspb.Message.getFieldWithDefault(msg, 1, ""), - noCount: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.TallyResult} - */ -proto.council.v1beta1.TallyResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.TallyResult; - return proto.council.v1beta1.TallyResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.TallyResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.TallyResult} - */ -proto.council.v1beta1.TallyResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setYesCount(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNoCount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.TallyResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.TallyResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.TallyResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.TallyResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getYesCount(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNoCount(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string yes_count = 1; - * @return {string} - */ -proto.council.v1beta1.TallyResult.prototype.getYesCount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.TallyResult} returns this - */ -proto.council.v1beta1.TallyResult.prototype.setYesCount = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string no_count = 2; - * @return {string} - */ -proto.council.v1beta1.TallyResult.prototype.getNoCount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.TallyResult} returns this - */ -proto.council.v1beta1.TallyResult.prototype.setNoCount = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.Vote.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.Vote.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.Vote} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.Vote.toObject = function(includeInstance, msg) { - var f, obj = { - proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), - voter: jspb.Message.getFieldWithDefault(msg, 2, ""), - option: jspb.Message.getFieldWithDefault(msg, 3, 0), - submitTime: (f = msg.getSubmitTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.Vote} - */ -proto.council.v1beta1.Vote.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.Vote; - return proto.council.v1beta1.Vote.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.Vote} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.Vote} - */ -proto.council.v1beta1.Vote.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProposalId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setVoter(value); - break; - case 3: - var value = /** @type {!proto.council.v1beta1.VoteOption} */ (reader.readEnum()); - msg.setOption(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSubmitTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.Vote.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.Vote.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.Vote} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.Vote.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProposalId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getVoter(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getOption(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getSubmitTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 proposal_id = 1; - * @return {number} - */ -proto.council.v1beta1.Vote.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.council.v1beta1.Vote} returns this - */ -proto.council.v1beta1.Vote.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string voter = 2; - * @return {string} - */ -proto.council.v1beta1.Vote.prototype.getVoter = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.Vote} returns this - */ -proto.council.v1beta1.Vote.prototype.setVoter = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional VoteOption option = 3; - * @return {!proto.council.v1beta1.VoteOption} - */ -proto.council.v1beta1.Vote.prototype.getOption = function() { - return /** @type {!proto.council.v1beta1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.council.v1beta1.VoteOption} value - * @return {!proto.council.v1beta1.Vote} returns this - */ -proto.council.v1beta1.Vote.prototype.setOption = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional google.protobuf.Timestamp submit_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.council.v1beta1.Vote.prototype.getSubmitTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.council.v1beta1.Vote} returns this -*/ -proto.council.v1beta1.Vote.prototype.setSubmitTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.council.v1beta1.Vote} returns this - */ -proto.council.v1beta1.Vote.prototype.clearSubmitTime = function() { - return this.setSubmitTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.council.v1beta1.Vote.prototype.hasSubmitTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.council.v1beta1.VetoProposal.prototype.toObject = function(opt_includeInstance) { - return proto.council.v1beta1.VetoProposal.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.council.v1beta1.VetoProposal} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.VetoProposal.toObject = function(includeInstance, msg) { - var f, obj = { - proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), - description: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.council.v1beta1.VetoProposal} - */ -proto.council.v1beta1.VetoProposal.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.council.v1beta1.VetoProposal; - return proto.council.v1beta1.VetoProposal.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.council.v1beta1.VetoProposal} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.council.v1beta1.VetoProposal} - */ -proto.council.v1beta1.VetoProposal.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProposalId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDescription(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.council.v1beta1.VetoProposal.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.council.v1beta1.VetoProposal.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.council.v1beta1.VetoProposal} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.council.v1beta1.VetoProposal.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProposalId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getDescription(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional uint64 proposal_id = 1; - * @return {number} - */ -proto.council.v1beta1.VetoProposal.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.council.v1beta1.VetoProposal} returns this - */ -proto.council.v1beta1.VetoProposal.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string description = 2; - * @return {string} - */ -proto.council.v1beta1.VetoProposal.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.council.v1beta1.VetoProposal} returns this - */ -proto.council.v1beta1.VetoProposal.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * @enum {number} - */ -proto.council.v1beta1.CouncilType = { - COUNCIL_TYPE_UNSPECIFIED: 0, - COUNCIL_TYPE_BAND_DAO: 1, - COUNCIL_TYPE_GRANT: 2, - COUNCIL_TYPE_TECH: 3 -}; - -/** - * @enum {number} - */ -proto.council.v1beta1.ProposalStatus = { - PROPOSAL_STATUS_UNSPECIFIED: 0, - PROPOSAL_STATUS_SUBMITTED: 1, - PROPOSAL_STATUS_WAITING_VETO: 2, - PROPOSAL_STATUS_IN_VETO: 3, - PROPOSAL_STATUS_REJECTED_BY_COUNCIL: 4, - PROPOSAL_STATUS_REJECTED_BY_VETO: 5, - PROPOSAL_STATUS_EXECUTED: 6, - PROPOSAL_STATUS_EXECUTION_FAILED: 7, - PROPOSAL_STATUS_TALLYING_FAILED: 8 -}; - -/** - * @enum {number} - */ -proto.council.v1beta1.VoteOption = { - VOTE_OPTION_UNSPECIFIED: 0, - VOTE_OPTION_YES: 1, - VOTE_OPTION_NO: 2 -}; - -goog.object.extend(exports, proto.council.v1beta1); diff --git a/proto/council/v1beta1/types_pb_service.d.ts b/proto/council/v1beta1/types_pb_service.d.ts deleted file mode 100644 index b60d3c2..0000000 --- a/proto/council/v1beta1/types_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: council.v1beta1 -// file: council/v1beta1/types.proto - diff --git a/proto/council/v1beta1/types_pb_service.js b/proto/council/v1beta1/types_pb_service.js deleted file mode 100644 index b60d3c2..0000000 --- a/proto/council/v1beta1/types_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: council.v1beta1 -// file: council/v1beta1/types.proto - diff --git a/proto/feeds/v1beta1/feeds_pb_service.d.ts b/proto/feeds/v1beta1/feeds_pb_service.d.ts deleted file mode 100644 index 3e8e5fd..0000000 --- a/proto/feeds/v1beta1/feeds_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/feeds.proto - diff --git a/proto/feeds/v1beta1/feeds_pb_service.js b/proto/feeds/v1beta1/feeds_pb_service.js deleted file mode 100644 index 3e8e5fd..0000000 --- a/proto/feeds/v1beta1/feeds_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/feeds.proto - diff --git a/proto/feeds/v1beta1/genesis_pb.d.ts b/proto/feeds/v1beta1/genesis_pb.d.ts deleted file mode 100644 index 8a67466..0000000 --- a/proto/feeds/v1beta1/genesis_pb.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/genesis.proto - -import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as feeds_v1beta1_params_pb from "../../feeds/v1beta1/params_pb"; -import * as feeds_v1beta1_feeds_pb from "../../feeds/v1beta1/feeds_pb"; - -export class GenesisState extends jspb.Message { - hasParams(): boolean; - clearParams(): void; - getParams(): feeds_v1beta1_params_pb.Params | undefined; - setParams(value?: feeds_v1beta1_params_pb.Params): void; - - clearDelegatorSignalsList(): void; - getDelegatorSignalsList(): Array; - setDelegatorSignalsList(value: Array): void; - addDelegatorSignals(value?: feeds_v1beta1_feeds_pb.DelegatorSignals, index?: number): feeds_v1beta1_feeds_pb.DelegatorSignals; - - hasReferenceSourceConfig(): boolean; - clearReferenceSourceConfig(): void; - getReferenceSourceConfig(): feeds_v1beta1_feeds_pb.ReferenceSourceConfig | undefined; - setReferenceSourceConfig(value?: feeds_v1beta1_feeds_pb.ReferenceSourceConfig): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenesisState.AsObject; - static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenesisState; - static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; -} - -export namespace GenesisState { - export type AsObject = { - params?: feeds_v1beta1_params_pb.Params.AsObject, - delegatorSignalsList: Array, - referenceSourceConfig?: feeds_v1beta1_feeds_pb.ReferenceSourceConfig.AsObject, - } -} - diff --git a/proto/feeds/v1beta1/genesis_pb.js b/proto/feeds/v1beta1/genesis_pb.js deleted file mode 100644 index d9d556b..0000000 --- a/proto/feeds/v1beta1/genesis_pb.js +++ /dev/null @@ -1,314 +0,0 @@ -// source: feeds/v1beta1/genesis.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); -var feeds_v1beta1_params_pb = require('../../feeds/v1beta1/params_pb.js'); -goog.object.extend(proto, feeds_v1beta1_params_pb); -var feeds_v1beta1_feeds_pb = require('../../feeds/v1beta1/feeds_pb.js'); -goog.object.extend(proto, feeds_v1beta1_feeds_pb); -goog.exportSymbol('proto.feeds.v1beta1.GenesisState', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.feeds.v1beta1.GenesisState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.feeds.v1beta1.GenesisState.repeatedFields_, null); -}; -goog.inherits(proto.feeds.v1beta1.GenesisState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.feeds.v1beta1.GenesisState.displayName = 'proto.feeds.v1beta1.GenesisState'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.feeds.v1beta1.GenesisState.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.feeds.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { - return proto.feeds.v1beta1.GenesisState.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.feeds.v1beta1.GenesisState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.feeds.v1beta1.GenesisState.toObject = function(includeInstance, msg) { - var f, obj = { - params: (f = msg.getParams()) && feeds_v1beta1_params_pb.Params.toObject(includeInstance, f), - delegatorSignalsList: jspb.Message.toObjectList(msg.getDelegatorSignalsList(), - feeds_v1beta1_feeds_pb.DelegatorSignals.toObject, includeInstance), - referenceSourceConfig: (f = msg.getReferenceSourceConfig()) && feeds_v1beta1_feeds_pb.ReferenceSourceConfig.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.feeds.v1beta1.GenesisState} - */ -proto.feeds.v1beta1.GenesisState.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.feeds.v1beta1.GenesisState; - return proto.feeds.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.feeds.v1beta1.GenesisState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.feeds.v1beta1.GenesisState} - */ -proto.feeds.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new feeds_v1beta1_params_pb.Params; - reader.readMessage(value,feeds_v1beta1_params_pb.Params.deserializeBinaryFromReader); - msg.setParams(value); - break; - case 2: - var value = new feeds_v1beta1_feeds_pb.DelegatorSignals; - reader.readMessage(value,feeds_v1beta1_feeds_pb.DelegatorSignals.deserializeBinaryFromReader); - msg.addDelegatorSignals(value); - break; - case 3: - var value = new feeds_v1beta1_feeds_pb.ReferenceSourceConfig; - reader.readMessage(value,feeds_v1beta1_feeds_pb.ReferenceSourceConfig.deserializeBinaryFromReader); - msg.setReferenceSourceConfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.feeds.v1beta1.GenesisState.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.feeds.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.feeds.v1beta1.GenesisState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.feeds.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getParams(); - if (f != null) { - writer.writeMessage( - 1, - f, - feeds_v1beta1_params_pb.Params.serializeBinaryToWriter - ); - } - f = message.getDelegatorSignalsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - feeds_v1beta1_feeds_pb.DelegatorSignals.serializeBinaryToWriter - ); - } - f = message.getReferenceSourceConfig(); - if (f != null) { - writer.writeMessage( - 3, - f, - feeds_v1beta1_feeds_pb.ReferenceSourceConfig.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Params params = 1; - * @return {?proto.feeds.v1beta1.Params} - */ -proto.feeds.v1beta1.GenesisState.prototype.getParams = function() { - return /** @type{?proto.feeds.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, feeds_v1beta1_params_pb.Params, 1)); -}; - - -/** - * @param {?proto.feeds.v1beta1.Params|undefined} value - * @return {!proto.feeds.v1beta1.GenesisState} returns this -*/ -proto.feeds.v1beta1.GenesisState.prototype.setParams = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.GenesisState} returns this - */ -proto.feeds.v1beta1.GenesisState.prototype.clearParams = function() { - return this.setParams(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.feeds.v1beta1.GenesisState.prototype.hasParams = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated DelegatorSignals delegator_signals = 2; - * @return {!Array} - */ -proto.feeds.v1beta1.GenesisState.prototype.getDelegatorSignalsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, feeds_v1beta1_feeds_pb.DelegatorSignals, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.feeds.v1beta1.GenesisState} returns this -*/ -proto.feeds.v1beta1.GenesisState.prototype.setDelegatorSignalsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.feeds.v1beta1.DelegatorSignals=} opt_value - * @param {number=} opt_index - * @return {!proto.feeds.v1beta1.DelegatorSignals} - */ -proto.feeds.v1beta1.GenesisState.prototype.addDelegatorSignals = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.feeds.v1beta1.DelegatorSignals, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.feeds.v1beta1.GenesisState} returns this - */ -proto.feeds.v1beta1.GenesisState.prototype.clearDelegatorSignalsList = function() { - return this.setDelegatorSignalsList([]); -}; - - -/** - * optional ReferenceSourceConfig reference_source_config = 3; - * @return {?proto.feeds.v1beta1.ReferenceSourceConfig} - */ -proto.feeds.v1beta1.GenesisState.prototype.getReferenceSourceConfig = function() { - return /** @type{?proto.feeds.v1beta1.ReferenceSourceConfig} */ ( - jspb.Message.getWrapperField(this, feeds_v1beta1_feeds_pb.ReferenceSourceConfig, 3)); -}; - - -/** - * @param {?proto.feeds.v1beta1.ReferenceSourceConfig|undefined} value - * @return {!proto.feeds.v1beta1.GenesisState} returns this -*/ -proto.feeds.v1beta1.GenesisState.prototype.setReferenceSourceConfig = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.feeds.v1beta1.GenesisState} returns this - */ -proto.feeds.v1beta1.GenesisState.prototype.clearReferenceSourceConfig = function() { - return this.setReferenceSourceConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.feeds.v1beta1.GenesisState.prototype.hasReferenceSourceConfig = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -goog.object.extend(exports, proto.feeds.v1beta1); diff --git a/proto/feeds/v1beta1/genesis_pb_service.d.ts b/proto/feeds/v1beta1/genesis_pb_service.d.ts deleted file mode 100644 index 0c5731e..0000000 --- a/proto/feeds/v1beta1/genesis_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/genesis.proto - diff --git a/proto/feeds/v1beta1/genesis_pb_service.js b/proto/feeds/v1beta1/genesis_pb_service.js deleted file mode 100644 index 0c5731e..0000000 --- a/proto/feeds/v1beta1/genesis_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/genesis.proto - diff --git a/proto/feeds/v1beta1/params_pb_service.d.ts b/proto/feeds/v1beta1/params_pb_service.d.ts deleted file mode 100644 index 717c86b..0000000 --- a/proto/feeds/v1beta1/params_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/params.proto - diff --git a/proto/feeds/v1beta1/params_pb_service.js b/proto/feeds/v1beta1/params_pb_service.js deleted file mode 100644 index 717c86b..0000000 --- a/proto/feeds/v1beta1/params_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/params.proto - diff --git a/proto/feeds/v1beta1/query_pb_service.d.ts b/proto/feeds/v1beta1/query_pb_service.d.ts deleted file mode 100644 index e164c8f..0000000 --- a/proto/feeds/v1beta1/query_pb_service.d.ts +++ /dev/null @@ -1,234 +0,0 @@ -// package: feeds.v1beta1 -// file: feeds/v1beta1/query.proto - -import * as feeds_v1beta1_query_pb from "../../feeds/v1beta1/query_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type QueryPrices = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QueryPricesRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QueryPricesResponse; -}; - -type QueryPrice = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QueryPriceRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QueryPriceResponse; -}; - -type QueryValidatorPrices = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QueryValidatorPricesRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QueryValidatorPricesResponse; -}; - -type QueryValidValidator = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QueryValidValidatorRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QueryValidValidatorResponse; -}; - -type QuerySignalTotalPowers = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QuerySignalTotalPowersRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QuerySignalTotalPowersResponse; -}; - -type QueryParams = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QueryParamsRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QueryParamsResponse; -}; - -type QueryReferenceSourceConfig = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QueryReferenceSourceConfigRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QueryReferenceSourceConfigResponse; -}; - -type QueryDelegatorSignals = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QueryDelegatorSignalsRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QueryDelegatorSignalsResponse; -}; - -type QueryCurrentFeeds = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QueryCurrentFeedsRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QueryCurrentFeedsResponse; -}; - -type QueryIsFeeder = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof feeds_v1beta1_query_pb.QueryIsFeederRequest; - readonly responseType: typeof feeds_v1beta1_query_pb.QueryIsFeederResponse; -}; - -export class Query { - static readonly serviceName: string; - static readonly Prices: QueryPrices; - static readonly Price: QueryPrice; - static readonly ValidatorPrices: QueryValidatorPrices; - static readonly ValidValidator: QueryValidValidator; - static readonly SignalTotalPowers: QuerySignalTotalPowers; - static readonly Params: QueryParams; - static readonly ReferenceSourceConfig: QueryReferenceSourceConfig; - static readonly DelegatorSignals: QueryDelegatorSignals; - static readonly CurrentFeeds: QueryCurrentFeeds; - static readonly IsFeeder: QueryIsFeeder; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class QueryClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - prices( - requestMessage: feeds_v1beta1_query_pb.QueryPricesRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryPricesResponse|null) => void - ): UnaryResponse; - prices( - requestMessage: feeds_v1beta1_query_pb.QueryPricesRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryPricesResponse|null) => void - ): UnaryResponse; - price( - requestMessage: feeds_v1beta1_query_pb.QueryPriceRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryPriceResponse|null) => void - ): UnaryResponse; - price( - requestMessage: feeds_v1beta1_query_pb.QueryPriceRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryPriceResponse|null) => void - ): UnaryResponse; - validatorPrices( - requestMessage: feeds_v1beta1_query_pb.QueryValidatorPricesRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryValidatorPricesResponse|null) => void - ): UnaryResponse; - validatorPrices( - requestMessage: feeds_v1beta1_query_pb.QueryValidatorPricesRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryValidatorPricesResponse|null) => void - ): UnaryResponse; - validValidator( - requestMessage: feeds_v1beta1_query_pb.QueryValidValidatorRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryValidValidatorResponse|null) => void - ): UnaryResponse; - validValidator( - requestMessage: feeds_v1beta1_query_pb.QueryValidValidatorRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryValidValidatorResponse|null) => void - ): UnaryResponse; - signalTotalPowers( - requestMessage: feeds_v1beta1_query_pb.QuerySignalTotalPowersRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QuerySignalTotalPowersResponse|null) => void - ): UnaryResponse; - signalTotalPowers( - requestMessage: feeds_v1beta1_query_pb.QuerySignalTotalPowersRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QuerySignalTotalPowersResponse|null) => void - ): UnaryResponse; - params( - requestMessage: feeds_v1beta1_query_pb.QueryParamsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryParamsResponse|null) => void - ): UnaryResponse; - params( - requestMessage: feeds_v1beta1_query_pb.QueryParamsRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryParamsResponse|null) => void - ): UnaryResponse; - referenceSourceConfig( - requestMessage: feeds_v1beta1_query_pb.QueryReferenceSourceConfigRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryReferenceSourceConfigResponse|null) => void - ): UnaryResponse; - referenceSourceConfig( - requestMessage: feeds_v1beta1_query_pb.QueryReferenceSourceConfigRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryReferenceSourceConfigResponse|null) => void - ): UnaryResponse; - delegatorSignals( - requestMessage: feeds_v1beta1_query_pb.QueryDelegatorSignalsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryDelegatorSignalsResponse|null) => void - ): UnaryResponse; - delegatorSignals( - requestMessage: feeds_v1beta1_query_pb.QueryDelegatorSignalsRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryDelegatorSignalsResponse|null) => void - ): UnaryResponse; - currentFeeds( - requestMessage: feeds_v1beta1_query_pb.QueryCurrentFeedsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryCurrentFeedsResponse|null) => void - ): UnaryResponse; - currentFeeds( - requestMessage: feeds_v1beta1_query_pb.QueryCurrentFeedsRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryCurrentFeedsResponse|null) => void - ): UnaryResponse; - isFeeder( - requestMessage: feeds_v1beta1_query_pb.QueryIsFeederRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryIsFeederResponse|null) => void - ): UnaryResponse; - isFeeder( - requestMessage: feeds_v1beta1_query_pb.QueryIsFeederRequest, - callback: (error: ServiceError|null, responseMessage: feeds_v1beta1_query_pb.QueryIsFeederResponse|null) => void - ): UnaryResponse; -} - diff --git a/proto/globalfee/v1beta1/genesis_pb.d.ts b/proto/globalfee/v1beta1/genesis_pb.d.ts deleted file mode 100644 index 597975d..0000000 --- a/proto/globalfee/v1beta1/genesis_pb.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -// package: globalfee.v1beta1 -// file: globalfee/v1beta1/genesis.proto - -import * as jspb from 'google-protobuf' -import * as gogoproto_gogo_pb from '../../gogoproto/gogo_pb' -import * as cosmos_base_v1beta1_coin_pb from '../../cosmos/base/v1beta1/coin_pb' - -export class GenesisState extends jspb.Message { - hasParams(): boolean - clearParams(): void - getParams(): Params | undefined - setParams(value?: Params): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): GenesisState.AsObject - static toObject( - includeInstance: boolean, - msg: GenesisState, - ): GenesisState.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: GenesisState, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): GenesisState - static deserializeBinaryFromReader( - message: GenesisState, - reader: jspb.BinaryReader, - ): GenesisState -} - -export namespace GenesisState { - export type AsObject = { - params?: Params.AsObject - } -} - -export class Params extends jspb.Message { - clearMinimumGasPricesList(): void - getMinimumGasPricesList(): Array - setMinimumGasPricesList( - value: Array, - ): void - addMinimumGasPrices( - value?: cosmos_base_v1beta1_coin_pb.DecCoin, - index?: number, - ): cosmos_base_v1beta1_coin_pb.DecCoin - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): Params.AsObject - static toObject(includeInstance: boolean, msg: Params): Params.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: Params, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): Params - static deserializeBinaryFromReader( - message: Params, - reader: jspb.BinaryReader, - ): Params -} - -export namespace Params { - export type AsObject = { - minimumGasPricesList: Array - } -} diff --git a/proto/globalfee/v1beta1/genesis_pb.js b/proto/globalfee/v1beta1/genesis_pb.js deleted file mode 100644 index b9ed755..0000000 --- a/proto/globalfee/v1beta1/genesis_pb.js +++ /dev/null @@ -1,424 +0,0 @@ -// source: globalfee/v1beta1/genesis.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf') -var goog = jspb -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - function () { - return this - }.call(null) || - Function('return this')() - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') -goog.object.extend(proto, gogoproto_gogo_pb) -var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') -goog.object.extend(proto, cosmos_base_v1beta1_coin_pb) -goog.exportSymbol('proto.globalfee.v1beta1.GenesisState', null, global) -goog.exportSymbol('proto.globalfee.v1beta1.Params', null, global) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.globalfee.v1beta1.GenesisState = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.globalfee.v1beta1.GenesisState, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.globalfee.v1beta1.GenesisState.displayName = - 'proto.globalfee.v1beta1.GenesisState' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.globalfee.v1beta1.Params = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.globalfee.v1beta1.Params.repeatedFields_, - null, - ) -} -goog.inherits(proto.globalfee.v1beta1.Params, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.globalfee.v1beta1.Params.displayName = 'proto.globalfee.v1beta1.Params' -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.globalfee.v1beta1.GenesisState.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.globalfee.v1beta1.GenesisState.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.globalfee.v1beta1.GenesisState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.globalfee.v1beta1.GenesisState.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - params: - (f = msg.getParams()) && - proto.globalfee.v1beta1.Params.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.globalfee.v1beta1.GenesisState} - */ -proto.globalfee.v1beta1.GenesisState.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.globalfee.v1beta1.GenesisState() - return proto.globalfee.v1beta1.GenesisState.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.globalfee.v1beta1.GenesisState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.globalfee.v1beta1.GenesisState} - */ -proto.globalfee.v1beta1.GenesisState.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new proto.globalfee.v1beta1.Params() - reader.readMessage( - value, - proto.globalfee.v1beta1.Params.deserializeBinaryFromReader, - ) - msg.setParams(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.globalfee.v1beta1.GenesisState.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.globalfee.v1beta1.GenesisState.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.globalfee.v1beta1.GenesisState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.globalfee.v1beta1.GenesisState.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getParams() - if (f != null) { - writer.writeMessage( - 1, - f, - proto.globalfee.v1beta1.Params.serializeBinaryToWriter, - ) - } -} - -/** - * optional Params params = 1; - * @return {?proto.globalfee.v1beta1.Params} - */ -proto.globalfee.v1beta1.GenesisState.prototype.getParams = function () { - return /** @type{?proto.globalfee.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, proto.globalfee.v1beta1.Params, 1) - ) -} - -/** - * @param {?proto.globalfee.v1beta1.Params|undefined} value - * @return {!proto.globalfee.v1beta1.GenesisState} returns this - */ -proto.globalfee.v1beta1.GenesisState.prototype.setParams = function (value) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.globalfee.v1beta1.GenesisState} returns this - */ -proto.globalfee.v1beta1.GenesisState.prototype.clearParams = function () { - return this.setParams(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.globalfee.v1beta1.GenesisState.prototype.hasParams = function () { - return jspb.Message.getField(this, 1) != null -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.globalfee.v1beta1.Params.repeatedFields_ = [1] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.globalfee.v1beta1.Params.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.globalfee.v1beta1.Params.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.globalfee.v1beta1.Params} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.globalfee.v1beta1.Params.toObject = function (includeInstance, msg) { - var f, - obj = { - minimumGasPricesList: jspb.Message.toObjectList( - msg.getMinimumGasPricesList(), - cosmos_base_v1beta1_coin_pb.DecCoin.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.globalfee.v1beta1.Params} - */ -proto.globalfee.v1beta1.Params.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.globalfee.v1beta1.Params() - return proto.globalfee.v1beta1.Params.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.globalfee.v1beta1.Params} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.globalfee.v1beta1.Params} - */ -proto.globalfee.v1beta1.Params.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new cosmos_base_v1beta1_coin_pb.DecCoin() - reader.readMessage( - value, - cosmos_base_v1beta1_coin_pb.DecCoin.deserializeBinaryFromReader, - ) - msg.addMinimumGasPrices(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.globalfee.v1beta1.Params.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.globalfee.v1beta1.Params.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.globalfee.v1beta1.Params} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.globalfee.v1beta1.Params.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getMinimumGasPricesList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter, - ) - } -} - -/** - * repeated cosmos.base.v1beta1.DecCoin minimum_gas_prices = 1; - * @return {!Array} - */ -proto.globalfee.v1beta1.Params.prototype.getMinimumGasPricesList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - cosmos_base_v1beta1_coin_pb.DecCoin, - 1, - ) - ) -} - -/** - * @param {!Array} value - * @return {!proto.globalfee.v1beta1.Params} returns this - */ -proto.globalfee.v1beta1.Params.prototype.setMinimumGasPricesList = function ( - value, -) { - return jspb.Message.setRepeatedWrapperField(this, 1, value) -} - -/** - * @param {!proto.cosmos.base.v1beta1.DecCoin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.DecCoin} - */ -proto.globalfee.v1beta1.Params.prototype.addMinimumGasPrices = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 1, - opt_value, - proto.cosmos.base.v1beta1.DecCoin, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.globalfee.v1beta1.Params} returns this - */ -proto.globalfee.v1beta1.Params.prototype.clearMinimumGasPricesList = - function () { - return this.setMinimumGasPricesList([]) - } - -goog.object.extend(exports, proto.globalfee.v1beta1) diff --git a/proto/globalfee/v1beta1/genesis_pb_service.d.ts b/proto/globalfee/v1beta1/genesis_pb_service.d.ts deleted file mode 100644 index 279dd30..0000000 --- a/proto/globalfee/v1beta1/genesis_pb_service.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// package: globalfee.v1beta1 -// file: globalfee/v1beta1/genesis.proto diff --git a/proto/globalfee/v1beta1/genesis_pb_service.js b/proto/globalfee/v1beta1/genesis_pb_service.js deleted file mode 100644 index 279dd30..0000000 --- a/proto/globalfee/v1beta1/genesis_pb_service.js +++ /dev/null @@ -1,2 +0,0 @@ -// package: globalfee.v1beta1 -// file: globalfee/v1beta1/genesis.proto diff --git a/proto/globalfee/v1beta1/query_pb.d.ts b/proto/globalfee/v1beta1/query_pb.d.ts deleted file mode 100644 index f28ef31..0000000 --- a/proto/globalfee/v1beta1/query_pb.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -// package: globalfee.v1beta1 -// file: globalfee/v1beta1/query.proto - -import * as jspb from 'google-protobuf' -import * as gogoproto_gogo_pb from '../../gogoproto/gogo_pb' -import * as google_api_annotations_pb from '../../google/api/annotations_pb' -import * as globalfee_v1beta1_genesis_pb from '../../globalfee/v1beta1/genesis_pb' - -export class QueryParamsRequest extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryParamsRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryParamsRequest, - ): QueryParamsRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryParamsRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryParamsRequest - static deserializeBinaryFromReader( - message: QueryParamsRequest, - reader: jspb.BinaryReader, - ): QueryParamsRequest -} - -export namespace QueryParamsRequest { - export type AsObject = {} -} - -export class QueryParamsResponse extends jspb.Message { - hasParams(): boolean - clearParams(): void - getParams(): globalfee_v1beta1_genesis_pb.Params | undefined - setParams(value?: globalfee_v1beta1_genesis_pb.Params): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryParamsResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryParamsResponse, - ): QueryParamsResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryParamsResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryParamsResponse - static deserializeBinaryFromReader( - message: QueryParamsResponse, - reader: jspb.BinaryReader, - ): QueryParamsResponse -} - -export namespace QueryParamsResponse { - export type AsObject = { - params?: globalfee_v1beta1_genesis_pb.Params.AsObject - } -} diff --git a/proto/globalfee/v1beta1/query_pb.js b/proto/globalfee/v1beta1/query_pb.js deleted file mode 100644 index bfda50d..0000000 --- a/proto/globalfee/v1beta1/query_pb.js +++ /dev/null @@ -1,360 +0,0 @@ -// source: globalfee/v1beta1/query.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf') -var goog = jspb -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - function () { - return this - }.call(null) || - Function('return this')() - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') -goog.object.extend(proto, gogoproto_gogo_pb) -var google_api_annotations_pb = require('../../google/api/annotations_pb.js') -goog.object.extend(proto, google_api_annotations_pb) -var globalfee_v1beta1_genesis_pb = require('../../globalfee/v1beta1/genesis_pb.js') -goog.object.extend(proto, globalfee_v1beta1_genesis_pb) -goog.exportSymbol('proto.globalfee.v1beta1.QueryParamsRequest', null, global) -goog.exportSymbol('proto.globalfee.v1beta1.QueryParamsResponse', null, global) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.globalfee.v1beta1.QueryParamsRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.globalfee.v1beta1.QueryParamsRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.globalfee.v1beta1.QueryParamsRequest.displayName = - 'proto.globalfee.v1beta1.QueryParamsRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.globalfee.v1beta1.QueryParamsResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.globalfee.v1beta1.QueryParamsResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.globalfee.v1beta1.QueryParamsResponse.displayName = - 'proto.globalfee.v1beta1.QueryParamsResponse' -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.globalfee.v1beta1.QueryParamsRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.globalfee.v1beta1.QueryParamsRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.globalfee.v1beta1.QueryParamsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.globalfee.v1beta1.QueryParamsRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.globalfee.v1beta1.QueryParamsRequest} - */ -proto.globalfee.v1beta1.QueryParamsRequest.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.globalfee.v1beta1.QueryParamsRequest() - return proto.globalfee.v1beta1.QueryParamsRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.globalfee.v1beta1.QueryParamsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.globalfee.v1beta1.QueryParamsRequest} - */ -proto.globalfee.v1beta1.QueryParamsRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.globalfee.v1beta1.QueryParamsRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.globalfee.v1beta1.QueryParamsRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.globalfee.v1beta1.QueryParamsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.globalfee.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.globalfee.v1beta1.QueryParamsResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.globalfee.v1beta1.QueryParamsResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.globalfee.v1beta1.QueryParamsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.globalfee.v1beta1.QueryParamsResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - params: - (f = msg.getParams()) && - globalfee_v1beta1_genesis_pb.Params.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.globalfee.v1beta1.QueryParamsResponse} - */ -proto.globalfee.v1beta1.QueryParamsResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.globalfee.v1beta1.QueryParamsResponse() - return proto.globalfee.v1beta1.QueryParamsResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.globalfee.v1beta1.QueryParamsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.globalfee.v1beta1.QueryParamsResponse} - */ -proto.globalfee.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new globalfee_v1beta1_genesis_pb.Params() - reader.readMessage( - value, - globalfee_v1beta1_genesis_pb.Params.deserializeBinaryFromReader, - ) - msg.setParams(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.globalfee.v1beta1.QueryParamsResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.globalfee.v1beta1.QueryParamsResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.globalfee.v1beta1.QueryParamsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.globalfee.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getParams() - if (f != null) { - writer.writeMessage( - 1, - f, - globalfee_v1beta1_genesis_pb.Params.serializeBinaryToWriter, - ) - } -} - -/** - * optional Params params = 1; - * @return {?proto.globalfee.v1beta1.Params} - */ -proto.globalfee.v1beta1.QueryParamsResponse.prototype.getParams = function () { - return /** @type{?proto.globalfee.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, globalfee_v1beta1_genesis_pb.Params, 1) - ) -} - -/** - * @param {?proto.globalfee.v1beta1.Params|undefined} value - * @return {!proto.globalfee.v1beta1.QueryParamsResponse} returns this - */ -proto.globalfee.v1beta1.QueryParamsResponse.prototype.setParams = function ( - value, -) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.globalfee.v1beta1.QueryParamsResponse} returns this - */ -proto.globalfee.v1beta1.QueryParamsResponse.prototype.clearParams = - function () { - return this.setParams(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.globalfee.v1beta1.QueryParamsResponse.prototype.hasParams = function () { - return jspb.Message.getField(this, 1) != null -} - -goog.object.extend(exports, proto.globalfee.v1beta1) diff --git a/proto/globalfee/v1beta1/query_pb_service.d.ts b/proto/globalfee/v1beta1/query_pb_service.d.ts deleted file mode 100644 index 8967ad0..0000000 --- a/proto/globalfee/v1beta1/query_pb_service.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -// package: globalfee.v1beta1 -// file: globalfee/v1beta1/query.proto - -import * as globalfee_v1beta1_query_pb from '../../globalfee/v1beta1/query_pb' -import { grpc } from '@improbable-eng/grpc-web' - -type QueryParams = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof globalfee_v1beta1_query_pb.QueryParamsRequest - readonly responseType: typeof globalfee_v1beta1_query_pb.QueryParamsResponse -} - -export class Query { - static readonly serviceName: string - static readonly Params: QueryParams -} - -export type ServiceError = { - message: string - code: number - metadata: grpc.Metadata -} -export type Status = { details: string; code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void -} -interface ResponseStream { - cancel(): void - on(type: 'data', handler: (message: T) => void): ResponseStream - on(type: 'end', handler: (status?: Status) => void): ResponseStream - on(type: 'status', handler: (status: Status) => void): ResponseStream -} -interface RequestStream { - write(message: T): RequestStream - end(): void - cancel(): void - on(type: 'end', handler: (status?: Status) => void): RequestStream - on(type: 'status', handler: (status: Status) => void): RequestStream -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream - end(): void - cancel(): void - on( - type: 'data', - handler: (message: ResT) => void, - ): BidirectionalStream - on( - type: 'end', - handler: (status?: Status) => void, - ): BidirectionalStream - on( - type: 'status', - handler: (status: Status) => void, - ): BidirectionalStream -} - -export class QueryClient { - readonly serviceHost: string - - constructor(serviceHost: string, options?: grpc.RpcOptions) - params( - requestMessage: globalfee_v1beta1_query_pb.QueryParamsRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: globalfee_v1beta1_query_pb.QueryParamsResponse | null, - ) => void, - ): UnaryResponse - params( - requestMessage: globalfee_v1beta1_query_pb.QueryParamsRequest, - callback: ( - error: ServiceError | null, - responseMessage: globalfee_v1beta1_query_pb.QueryParamsResponse | null, - ) => void, - ): UnaryResponse -} diff --git a/proto/globalfee/v1beta1/query_pb_service.js b/proto/globalfee/v1beta1/query_pb_service.js deleted file mode 100644 index 2361dec..0000000 --- a/proto/globalfee/v1beta1/query_pb_service.js +++ /dev/null @@ -1,64 +0,0 @@ -// package: globalfee.v1beta1 -// file: globalfee/v1beta1/query.proto - -var globalfee_v1beta1_query_pb = require('../../globalfee/v1beta1/query_pb') -var grpc = require('@improbable-eng/grpc-web').grpc - -var Query = (function () { - function Query() {} - Query.serviceName = 'globalfee.v1beta1.Query' - return Query -})() - -Query.Params = { - methodName: 'Params', - service: Query, - requestStream: false, - responseStream: false, - requestType: globalfee_v1beta1_query_pb.QueryParamsRequest, - responseType: globalfee_v1beta1_query_pb.QueryParamsResponse, -} - -exports.Query = Query - -function QueryClient(serviceHost, options) { - this.serviceHost = serviceHost - this.options = options || {} -} - -QueryClient.prototype.params = function params( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.Params, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -exports.QueryClient = QueryClient diff --git a/proto/globalfee/v1beta1/tx_pb.d.ts b/proto/globalfee/v1beta1/tx_pb.d.ts deleted file mode 100644 index 71a8019..0000000 --- a/proto/globalfee/v1beta1/tx_pb.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -// package: globalfee.v1beta1 -// file: globalfee/v1beta1/tx.proto - -import * as jspb from 'google-protobuf' -import * as gogoproto_gogo_pb from '../../gogoproto/gogo_pb' -import * as cosmos_proto_cosmos_pb from '../../cosmos_proto/cosmos_pb' -import * as cosmos_msg_v1_msg_pb from '../../cosmos/msg/v1/msg_pb' -import * as globalfee_v1beta1_genesis_pb from '../../globalfee/v1beta1/genesis_pb' - -export class MsgUpdateParams extends jspb.Message { - getAuthority(): string - setAuthority(value: string): void - - hasParams(): boolean - clearParams(): void - getParams(): globalfee_v1beta1_genesis_pb.Params | undefined - setParams(value?: globalfee_v1beta1_genesis_pb.Params): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgUpdateParams.AsObject - static toObject( - includeInstance: boolean, - msg: MsgUpdateParams, - ): MsgUpdateParams.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgUpdateParams, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgUpdateParams - static deserializeBinaryFromReader( - message: MsgUpdateParams, - reader: jspb.BinaryReader, - ): MsgUpdateParams -} - -export namespace MsgUpdateParams { - export type AsObject = { - authority: string - params?: globalfee_v1beta1_genesis_pb.Params.AsObject - } -} - -export class MsgUpdateParamsResponse extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MsgUpdateParamsResponse, - ): MsgUpdateParamsResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgUpdateParamsResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse - static deserializeBinaryFromReader( - message: MsgUpdateParamsResponse, - reader: jspb.BinaryReader, - ): MsgUpdateParamsResponse -} - -export namespace MsgUpdateParamsResponse { - export type AsObject = {} -} diff --git a/proto/globalfee/v1beta1/tx_pb.js b/proto/globalfee/v1beta1/tx_pb.js deleted file mode 100644 index 1ecd0cc..0000000 --- a/proto/globalfee/v1beta1/tx_pb.js +++ /dev/null @@ -1,387 +0,0 @@ -// source: globalfee/v1beta1/tx.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf') -var goog = jspb -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - function () { - return this - }.call(null) || - Function('return this')() - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') -goog.object.extend(proto, gogoproto_gogo_pb) -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js') -goog.object.extend(proto, cosmos_proto_cosmos_pb) -var cosmos_msg_v1_msg_pb = require('../../cosmos/msg/v1/msg_pb.js') -goog.object.extend(proto, cosmos_msg_v1_msg_pb) -var globalfee_v1beta1_genesis_pb = require('../../globalfee/v1beta1/genesis_pb.js') -goog.object.extend(proto, globalfee_v1beta1_genesis_pb) -goog.exportSymbol('proto.globalfee.v1beta1.MsgUpdateParams', null, global) -goog.exportSymbol( - 'proto.globalfee.v1beta1.MsgUpdateParamsResponse', - null, - global, -) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.globalfee.v1beta1.MsgUpdateParams = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.globalfee.v1beta1.MsgUpdateParams, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.globalfee.v1beta1.MsgUpdateParams.displayName = - 'proto.globalfee.v1beta1.MsgUpdateParams' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.globalfee.v1beta1.MsgUpdateParamsResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.globalfee.v1beta1.MsgUpdateParamsResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.globalfee.v1beta1.MsgUpdateParamsResponse.displayName = - 'proto.globalfee.v1beta1.MsgUpdateParamsResponse' -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.globalfee.v1beta1.MsgUpdateParams.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.globalfee.v1beta1.MsgUpdateParams.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.globalfee.v1beta1.MsgUpdateParams} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.globalfee.v1beta1.MsgUpdateParams.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - authority: jspb.Message.getFieldWithDefault(msg, 1, ''), - params: - (f = msg.getParams()) && - globalfee_v1beta1_genesis_pb.Params.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.globalfee.v1beta1.MsgUpdateParams} - */ -proto.globalfee.v1beta1.MsgUpdateParams.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.globalfee.v1beta1.MsgUpdateParams() - return proto.globalfee.v1beta1.MsgUpdateParams.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.globalfee.v1beta1.MsgUpdateParams} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.globalfee.v1beta1.MsgUpdateParams} - */ -proto.globalfee.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setAuthority(value) - break - case 2: - var value = new globalfee_v1beta1_genesis_pb.Params() - reader.readMessage( - value, - globalfee_v1beta1_genesis_pb.Params.deserializeBinaryFromReader, - ) - msg.setParams(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.globalfee.v1beta1.MsgUpdateParams.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.globalfee.v1beta1.MsgUpdateParams.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.globalfee.v1beta1.MsgUpdateParams} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.globalfee.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getAuthority() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getParams() - if (f != null) { - writer.writeMessage( - 2, - f, - globalfee_v1beta1_genesis_pb.Params.serializeBinaryToWriter, - ) - } -} - -/** - * optional string authority = 1; - * @return {string} - */ -proto.globalfee.v1beta1.MsgUpdateParams.prototype.getAuthority = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.globalfee.v1beta1.MsgUpdateParams} returns this - */ -proto.globalfee.v1beta1.MsgUpdateParams.prototype.setAuthority = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional Params params = 2; - * @return {?proto.globalfee.v1beta1.Params} - */ -proto.globalfee.v1beta1.MsgUpdateParams.prototype.getParams = function () { - return /** @type{?proto.globalfee.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, globalfee_v1beta1_genesis_pb.Params, 2) - ) -} - -/** - * @param {?proto.globalfee.v1beta1.Params|undefined} value - * @return {!proto.globalfee.v1beta1.MsgUpdateParams} returns this - */ -proto.globalfee.v1beta1.MsgUpdateParams.prototype.setParams = function (value) { - return jspb.Message.setWrapperField(this, 2, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.globalfee.v1beta1.MsgUpdateParams} returns this - */ -proto.globalfee.v1beta1.MsgUpdateParams.prototype.clearParams = function () { - return this.setParams(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.globalfee.v1beta1.MsgUpdateParams.prototype.hasParams = function () { - return jspb.Message.getField(this, 2) != null -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.globalfee.v1beta1.MsgUpdateParamsResponse.prototype.toObject = - function (opt_includeInstance) { - return proto.globalfee.v1beta1.MsgUpdateParamsResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.globalfee.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.globalfee.v1beta1.MsgUpdateParamsResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.globalfee.v1beta1.MsgUpdateParamsResponse} - */ -proto.globalfee.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.globalfee.v1beta1.MsgUpdateParamsResponse() - return proto.globalfee.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.globalfee.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.globalfee.v1beta1.MsgUpdateParamsResponse} - */ -proto.globalfee.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.globalfee.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.globalfee.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.globalfee.v1beta1.MsgUpdateParamsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.globalfee.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - } - -goog.object.extend(exports, proto.globalfee.v1beta1) diff --git a/proto/globalfee/v1beta1/tx_pb_service.d.ts b/proto/globalfee/v1beta1/tx_pb_service.d.ts deleted file mode 100644 index 817fef3..0000000 --- a/proto/globalfee/v1beta1/tx_pb_service.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -// package: globalfee.v1beta1 -// file: globalfee/v1beta1/tx.proto - -import * as globalfee_v1beta1_tx_pb from '../../globalfee/v1beta1/tx_pb' -import { grpc } from '@improbable-eng/grpc-web' - -type MsgUpdateParams = { - readonly methodName: string - readonly service: typeof Msg - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof globalfee_v1beta1_tx_pb.MsgUpdateParams - readonly responseType: typeof globalfee_v1beta1_tx_pb.MsgUpdateParamsResponse -} - -export class Msg { - static readonly serviceName: string - static readonly UpdateParams: MsgUpdateParams -} - -export type ServiceError = { - message: string - code: number - metadata: grpc.Metadata -} -export type Status = { details: string; code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void -} -interface ResponseStream { - cancel(): void - on(type: 'data', handler: (message: T) => void): ResponseStream - on(type: 'end', handler: (status?: Status) => void): ResponseStream - on(type: 'status', handler: (status: Status) => void): ResponseStream -} -interface RequestStream { - write(message: T): RequestStream - end(): void - cancel(): void - on(type: 'end', handler: (status?: Status) => void): RequestStream - on(type: 'status', handler: (status: Status) => void): RequestStream -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream - end(): void - cancel(): void - on( - type: 'data', - handler: (message: ResT) => void, - ): BidirectionalStream - on( - type: 'end', - handler: (status?: Status) => void, - ): BidirectionalStream - on( - type: 'status', - handler: (status: Status) => void, - ): BidirectionalStream -} - -export class MsgClient { - readonly serviceHost: string - - constructor(serviceHost: string, options?: grpc.RpcOptions) - updateParams( - requestMessage: globalfee_v1beta1_tx_pb.MsgUpdateParams, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: globalfee_v1beta1_tx_pb.MsgUpdateParamsResponse | null, - ) => void, - ): UnaryResponse - updateParams( - requestMessage: globalfee_v1beta1_tx_pb.MsgUpdateParams, - callback: ( - error: ServiceError | null, - responseMessage: globalfee_v1beta1_tx_pb.MsgUpdateParamsResponse | null, - ) => void, - ): UnaryResponse -} diff --git a/proto/ibc-go b/proto/ibc-go new file mode 160000 index 0000000..a766bce --- /dev/null +++ b/proto/ibc-go @@ -0,0 +1 @@ +Subproject commit a766bce91b4a2bb469d6a572cba0f0d2351d2cdd diff --git a/proto/ibc/core/channel/v1/tx_pb.d.ts b/proto/ibc/core/channel/v1/tx_pb.d.ts deleted file mode 100644 index d4f32d1..0000000 --- a/proto/ibc/core/channel/v1/tx_pb.d.ts +++ /dev/null @@ -1,576 +0,0 @@ -// package: ibc.core.channel.v1 -// file: ibc/core/channel/v1/tx.proto - -import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; -import * as ibc_core_client_v1_client_pb from "../../../../ibc/core/client/v1/client_pb"; -import * as ibc_core_channel_v1_channel_pb from "../../../../ibc/core/channel/v1/channel_pb"; - -export class MsgChannelOpenInit extends jspb.Message { - getPortId(): string; - setPortId(value: string): void; - - hasChannel(): boolean; - clearChannel(): void; - getChannel(): ibc_core_channel_v1_channel_pb.Channel | undefined; - setChannel(value?: ibc_core_channel_v1_channel_pb.Channel): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelOpenInit.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelOpenInit): MsgChannelOpenInit.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelOpenInit, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelOpenInit; - static deserializeBinaryFromReader(message: MsgChannelOpenInit, reader: jspb.BinaryReader): MsgChannelOpenInit; -} - -export namespace MsgChannelOpenInit { - export type AsObject = { - portId: string, - channel?: ibc_core_channel_v1_channel_pb.Channel.AsObject, - signer: string, - } -} - -export class MsgChannelOpenInitResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelOpenInitResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelOpenInitResponse): MsgChannelOpenInitResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelOpenInitResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelOpenInitResponse; - static deserializeBinaryFromReader(message: MsgChannelOpenInitResponse, reader: jspb.BinaryReader): MsgChannelOpenInitResponse; -} - -export namespace MsgChannelOpenInitResponse { - export type AsObject = { - } -} - -export class MsgChannelOpenTry extends jspb.Message { - getPortId(): string; - setPortId(value: string): void; - - getPreviousChannelId(): string; - setPreviousChannelId(value: string): void; - - hasChannel(): boolean; - clearChannel(): void; - getChannel(): ibc_core_channel_v1_channel_pb.Channel | undefined; - setChannel(value?: ibc_core_channel_v1_channel_pb.Channel): void; - - getCounterpartyVersion(): string; - setCounterpartyVersion(value: string): void; - - getProofInit(): Uint8Array | string; - getProofInit_asU8(): Uint8Array; - getProofInit_asB64(): string; - setProofInit(value: Uint8Array | string): void; - - hasProofHeight(): boolean; - clearProofHeight(): void; - getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; - setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelOpenTry.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelOpenTry): MsgChannelOpenTry.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelOpenTry, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelOpenTry; - static deserializeBinaryFromReader(message: MsgChannelOpenTry, reader: jspb.BinaryReader): MsgChannelOpenTry; -} - -export namespace MsgChannelOpenTry { - export type AsObject = { - portId: string, - previousChannelId: string, - channel?: ibc_core_channel_v1_channel_pb.Channel.AsObject, - counterpartyVersion: string, - proofInit: Uint8Array | string, - proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, - signer: string, - } -} - -export class MsgChannelOpenTryResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelOpenTryResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelOpenTryResponse): MsgChannelOpenTryResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelOpenTryResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelOpenTryResponse; - static deserializeBinaryFromReader(message: MsgChannelOpenTryResponse, reader: jspb.BinaryReader): MsgChannelOpenTryResponse; -} - -export namespace MsgChannelOpenTryResponse { - export type AsObject = { - } -} - -export class MsgChannelOpenAck extends jspb.Message { - getPortId(): string; - setPortId(value: string): void; - - getChannelId(): string; - setChannelId(value: string): void; - - getCounterpartyChannelId(): string; - setCounterpartyChannelId(value: string): void; - - getCounterpartyVersion(): string; - setCounterpartyVersion(value: string): void; - - getProofTry(): Uint8Array | string; - getProofTry_asU8(): Uint8Array; - getProofTry_asB64(): string; - setProofTry(value: Uint8Array | string): void; - - hasProofHeight(): boolean; - clearProofHeight(): void; - getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; - setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelOpenAck.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelOpenAck): MsgChannelOpenAck.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelOpenAck, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelOpenAck; - static deserializeBinaryFromReader(message: MsgChannelOpenAck, reader: jspb.BinaryReader): MsgChannelOpenAck; -} - -export namespace MsgChannelOpenAck { - export type AsObject = { - portId: string, - channelId: string, - counterpartyChannelId: string, - counterpartyVersion: string, - proofTry: Uint8Array | string, - proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, - signer: string, - } -} - -export class MsgChannelOpenAckResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelOpenAckResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelOpenAckResponse): MsgChannelOpenAckResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelOpenAckResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelOpenAckResponse; - static deserializeBinaryFromReader(message: MsgChannelOpenAckResponse, reader: jspb.BinaryReader): MsgChannelOpenAckResponse; -} - -export namespace MsgChannelOpenAckResponse { - export type AsObject = { - } -} - -export class MsgChannelOpenConfirm extends jspb.Message { - getPortId(): string; - setPortId(value: string): void; - - getChannelId(): string; - setChannelId(value: string): void; - - getProofAck(): Uint8Array | string; - getProofAck_asU8(): Uint8Array; - getProofAck_asB64(): string; - setProofAck(value: Uint8Array | string): void; - - hasProofHeight(): boolean; - clearProofHeight(): void; - getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; - setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelOpenConfirm.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelOpenConfirm): MsgChannelOpenConfirm.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelOpenConfirm, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelOpenConfirm; - static deserializeBinaryFromReader(message: MsgChannelOpenConfirm, reader: jspb.BinaryReader): MsgChannelOpenConfirm; -} - -export namespace MsgChannelOpenConfirm { - export type AsObject = { - portId: string, - channelId: string, - proofAck: Uint8Array | string, - proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, - signer: string, - } -} - -export class MsgChannelOpenConfirmResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelOpenConfirmResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelOpenConfirmResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelOpenConfirmResponse; - static deserializeBinaryFromReader(message: MsgChannelOpenConfirmResponse, reader: jspb.BinaryReader): MsgChannelOpenConfirmResponse; -} - -export namespace MsgChannelOpenConfirmResponse { - export type AsObject = { - } -} - -export class MsgChannelCloseInit extends jspb.Message { - getPortId(): string; - setPortId(value: string): void; - - getChannelId(): string; - setChannelId(value: string): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelCloseInit.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelCloseInit): MsgChannelCloseInit.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelCloseInit, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelCloseInit; - static deserializeBinaryFromReader(message: MsgChannelCloseInit, reader: jspb.BinaryReader): MsgChannelCloseInit; -} - -export namespace MsgChannelCloseInit { - export type AsObject = { - portId: string, - channelId: string, - signer: string, - } -} - -export class MsgChannelCloseInitResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelCloseInitResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelCloseInitResponse): MsgChannelCloseInitResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelCloseInitResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelCloseInitResponse; - static deserializeBinaryFromReader(message: MsgChannelCloseInitResponse, reader: jspb.BinaryReader): MsgChannelCloseInitResponse; -} - -export namespace MsgChannelCloseInitResponse { - export type AsObject = { - } -} - -export class MsgChannelCloseConfirm extends jspb.Message { - getPortId(): string; - setPortId(value: string): void; - - getChannelId(): string; - setChannelId(value: string): void; - - getProofInit(): Uint8Array | string; - getProofInit_asU8(): Uint8Array; - getProofInit_asB64(): string; - setProofInit(value: Uint8Array | string): void; - - hasProofHeight(): boolean; - clearProofHeight(): void; - getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; - setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelCloseConfirm.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelCloseConfirm): MsgChannelCloseConfirm.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelCloseConfirm, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelCloseConfirm; - static deserializeBinaryFromReader(message: MsgChannelCloseConfirm, reader: jspb.BinaryReader): MsgChannelCloseConfirm; -} - -export namespace MsgChannelCloseConfirm { - export type AsObject = { - portId: string, - channelId: string, - proofInit: Uint8Array | string, - proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, - signer: string, - } -} - -export class MsgChannelCloseConfirmResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgChannelCloseConfirmResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgChannelCloseConfirmResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgChannelCloseConfirmResponse; - static deserializeBinaryFromReader(message: MsgChannelCloseConfirmResponse, reader: jspb.BinaryReader): MsgChannelCloseConfirmResponse; -} - -export namespace MsgChannelCloseConfirmResponse { - export type AsObject = { - } -} - -export class MsgRecvPacket extends jspb.Message { - hasPacket(): boolean; - clearPacket(): void; - getPacket(): ibc_core_channel_v1_channel_pb.Packet | undefined; - setPacket(value?: ibc_core_channel_v1_channel_pb.Packet): void; - - getProofCommitment(): Uint8Array | string; - getProofCommitment_asU8(): Uint8Array; - getProofCommitment_asB64(): string; - setProofCommitment(value: Uint8Array | string): void; - - hasProofHeight(): boolean; - clearProofHeight(): void; - getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; - setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgRecvPacket.AsObject; - static toObject(includeInstance: boolean, msg: MsgRecvPacket): MsgRecvPacket.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgRecvPacket, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgRecvPacket; - static deserializeBinaryFromReader(message: MsgRecvPacket, reader: jspb.BinaryReader): MsgRecvPacket; -} - -export namespace MsgRecvPacket { - export type AsObject = { - packet?: ibc_core_channel_v1_channel_pb.Packet.AsObject, - proofCommitment: Uint8Array | string, - proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, - signer: string, - } -} - -export class MsgRecvPacketResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgRecvPacketResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgRecvPacketResponse): MsgRecvPacketResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgRecvPacketResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgRecvPacketResponse; - static deserializeBinaryFromReader(message: MsgRecvPacketResponse, reader: jspb.BinaryReader): MsgRecvPacketResponse; -} - -export namespace MsgRecvPacketResponse { - export type AsObject = { - } -} - -export class MsgTimeout extends jspb.Message { - hasPacket(): boolean; - clearPacket(): void; - getPacket(): ibc_core_channel_v1_channel_pb.Packet | undefined; - setPacket(value?: ibc_core_channel_v1_channel_pb.Packet): void; - - getProofUnreceived(): Uint8Array | string; - getProofUnreceived_asU8(): Uint8Array; - getProofUnreceived_asB64(): string; - setProofUnreceived(value: Uint8Array | string): void; - - hasProofHeight(): boolean; - clearProofHeight(): void; - getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; - setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; - - getNextSequenceRecv(): number; - setNextSequenceRecv(value: number): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgTimeout.AsObject; - static toObject(includeInstance: boolean, msg: MsgTimeout): MsgTimeout.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgTimeout, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgTimeout; - static deserializeBinaryFromReader(message: MsgTimeout, reader: jspb.BinaryReader): MsgTimeout; -} - -export namespace MsgTimeout { - export type AsObject = { - packet?: ibc_core_channel_v1_channel_pb.Packet.AsObject, - proofUnreceived: Uint8Array | string, - proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, - nextSequenceRecv: number, - signer: string, - } -} - -export class MsgTimeoutResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgTimeoutResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgTimeoutResponse): MsgTimeoutResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgTimeoutResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgTimeoutResponse; - static deserializeBinaryFromReader(message: MsgTimeoutResponse, reader: jspb.BinaryReader): MsgTimeoutResponse; -} - -export namespace MsgTimeoutResponse { - export type AsObject = { - } -} - -export class MsgTimeoutOnClose extends jspb.Message { - hasPacket(): boolean; - clearPacket(): void; - getPacket(): ibc_core_channel_v1_channel_pb.Packet | undefined; - setPacket(value?: ibc_core_channel_v1_channel_pb.Packet): void; - - getProofUnreceived(): Uint8Array | string; - getProofUnreceived_asU8(): Uint8Array; - getProofUnreceived_asB64(): string; - setProofUnreceived(value: Uint8Array | string): void; - - getProofClose(): Uint8Array | string; - getProofClose_asU8(): Uint8Array; - getProofClose_asB64(): string; - setProofClose(value: Uint8Array | string): void; - - hasProofHeight(): boolean; - clearProofHeight(): void; - getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; - setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; - - getNextSequenceRecv(): number; - setNextSequenceRecv(value: number): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgTimeoutOnClose.AsObject; - static toObject(includeInstance: boolean, msg: MsgTimeoutOnClose): MsgTimeoutOnClose.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgTimeoutOnClose, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgTimeoutOnClose; - static deserializeBinaryFromReader(message: MsgTimeoutOnClose, reader: jspb.BinaryReader): MsgTimeoutOnClose; -} - -export namespace MsgTimeoutOnClose { - export type AsObject = { - packet?: ibc_core_channel_v1_channel_pb.Packet.AsObject, - proofUnreceived: Uint8Array | string, - proofClose: Uint8Array | string, - proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, - nextSequenceRecv: number, - signer: string, - } -} - -export class MsgTimeoutOnCloseResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgTimeoutOnCloseResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgTimeoutOnCloseResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgTimeoutOnCloseResponse; - static deserializeBinaryFromReader(message: MsgTimeoutOnCloseResponse, reader: jspb.BinaryReader): MsgTimeoutOnCloseResponse; -} - -export namespace MsgTimeoutOnCloseResponse { - export type AsObject = { - } -} - -export class MsgAcknowledgement extends jspb.Message { - hasPacket(): boolean; - clearPacket(): void; - getPacket(): ibc_core_channel_v1_channel_pb.Packet | undefined; - setPacket(value?: ibc_core_channel_v1_channel_pb.Packet): void; - - getAcknowledgement(): Uint8Array | string; - getAcknowledgement_asU8(): Uint8Array; - getAcknowledgement_asB64(): string; - setAcknowledgement(value: Uint8Array | string): void; - - getProofAcked(): Uint8Array | string; - getProofAcked_asU8(): Uint8Array; - getProofAcked_asB64(): string; - setProofAcked(value: Uint8Array | string): void; - - hasProofHeight(): boolean; - clearProofHeight(): void; - getProofHeight(): ibc_core_client_v1_client_pb.Height | undefined; - setProofHeight(value?: ibc_core_client_v1_client_pb.Height): void; - - getSigner(): string; - setSigner(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgAcknowledgement.AsObject; - static toObject(includeInstance: boolean, msg: MsgAcknowledgement): MsgAcknowledgement.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgAcknowledgement, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgAcknowledgement; - static deserializeBinaryFromReader(message: MsgAcknowledgement, reader: jspb.BinaryReader): MsgAcknowledgement; -} - -export namespace MsgAcknowledgement { - export type AsObject = { - packet?: ibc_core_channel_v1_channel_pb.Packet.AsObject, - acknowledgement: Uint8Array | string, - proofAcked: Uint8Array | string, - proofHeight?: ibc_core_client_v1_client_pb.Height.AsObject, - signer: string, - } -} - -export class MsgAcknowledgementResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgAcknowledgementResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgAcknowledgementResponse): MsgAcknowledgementResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgAcknowledgementResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgAcknowledgementResponse; - static deserializeBinaryFromReader(message: MsgAcknowledgementResponse, reader: jspb.BinaryReader): MsgAcknowledgementResponse; -} - -export namespace MsgAcknowledgementResponse { - export type AsObject = { - } -} - diff --git a/proto/ibc/core/channel/v1/tx_pb.js b/proto/ibc/core/channel/v1/tx_pb.js deleted file mode 100644 index 69196df..0000000 --- a/proto/ibc/core/channel/v1/tx_pb.js +++ /dev/null @@ -1,4508 +0,0 @@ -// source: ibc/core/channel/v1/tx.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); -var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); -goog.object.extend(proto, ibc_core_client_v1_client_pb); -var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); -goog.object.extend(proto, ibc_core_channel_v1_channel_pb); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgAcknowledgement', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgAcknowledgementResponse', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelCloseConfirm', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelCloseInit', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelCloseInitResponse', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenAck', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenAckResponse', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenConfirm', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenInit', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenInitResponse', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenTry', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgChannelOpenTryResponse', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgRecvPacket', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgRecvPacketResponse', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgTimeout', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgTimeoutOnClose', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse', null, global); -goog.exportSymbol('proto.ibc.core.channel.v1.MsgTimeoutResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenInit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelOpenInit.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenInit'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelOpenInitResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenInitResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenInitResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenTry, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelOpenTry.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenTry'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelOpenTryResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenTryResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenTryResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenAck, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelOpenAck.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenAck'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelOpenAckResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenAckResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenAckResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenConfirm, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelOpenConfirm.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenConfirm'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelCloseInit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelCloseInit.displayName = 'proto.ibc.core.channel.v1.MsgChannelCloseInit'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelCloseInitResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelCloseInitResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelCloseInitResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelCloseConfirm, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelCloseConfirm.displayName = 'proto.ibc.core.channel.v1.MsgChannelCloseConfirm'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.displayName = 'proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgRecvPacket = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgRecvPacket, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgRecvPacket.displayName = 'proto.ibc.core.channel.v1.MsgRecvPacket'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgRecvPacketResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgRecvPacketResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgRecvPacketResponse.displayName = 'proto.ibc.core.channel.v1.MsgRecvPacketResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgTimeout = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgTimeout, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgTimeout.displayName = 'proto.ibc.core.channel.v1.MsgTimeout'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgTimeoutResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgTimeoutResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgTimeoutResponse.displayName = 'proto.ibc.core.channel.v1.MsgTimeoutResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgTimeoutOnClose, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgTimeoutOnClose.displayName = 'proto.ibc.core.channel.v1.MsgTimeoutOnClose'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.displayName = 'proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgAcknowledgement = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgAcknowledgement, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgAcknowledgement.displayName = 'proto.ibc.core.channel.v1.MsgAcknowledgement'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.core.channel.v1.MsgAcknowledgementResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.core.channel.v1.MsgAcknowledgementResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.core.channel.v1.MsgAcknowledgementResponse.displayName = 'proto.ibc.core.channel.v1.MsgAcknowledgementResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelOpenInit.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.toObject = function(includeInstance, msg) { - var f, obj = { - portId: jspb.Message.getFieldWithDefault(msg, 1, ""), - channel: (f = msg.getChannel()) && ibc_core_channel_v1_channel_pb.Channel.toObject(includeInstance, f), - signer: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelOpenInit; - return proto.ibc.core.channel.v1.MsgChannelOpenInit.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPortId(value); - break; - case 2: - var value = new ibc_core_channel_v1_channel_pb.Channel; - reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelOpenInit.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPortId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 2, - f, - ibc_core_channel_v1_channel_pb.Channel.serializeBinaryToWriter - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string port_id = 1; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.getPortId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.setPortId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional Channel channel = 2; - * @return {?proto.ibc.core.channel.v1.Channel} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.getChannel = function() { - return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( - jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 2)); -}; - - -/** - * @param {?proto.ibc.core.channel.v1.Channel|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} returns this -*/ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.clearChannel = function() { - return this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.hasChannel = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string signer = 3; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInit} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenInit.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelOpenInitResponse; - return proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInitResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelOpenTry.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.toObject = function(includeInstance, msg) { - var f, obj = { - portId: jspb.Message.getFieldWithDefault(msg, 1, ""), - previousChannelId: jspb.Message.getFieldWithDefault(msg, 2, ""), - channel: (f = msg.getChannel()) && ibc_core_channel_v1_channel_pb.Channel.toObject(includeInstance, f), - counterpartyVersion: jspb.Message.getFieldWithDefault(msg, 4, ""), - proofInit: msg.getProofInit_asB64(), - proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - signer: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelOpenTry; - return proto.ibc.core.channel.v1.MsgChannelOpenTry.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPortId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPreviousChannelId(value); - break; - case 3: - var value = new ibc_core_channel_v1_channel_pb.Channel; - reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setCounterpartyVersion(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProofInit(value); - break; - case 6: - var value = new ibc_core_client_v1_client_pb.Height; - reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); - msg.setProofHeight(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelOpenTry.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPortId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPreviousChannelId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 3, - f, - ibc_core_channel_v1_channel_pb.Channel.serializeBinaryToWriter - ); - } - f = message.getCounterpartyVersion(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getProofInit_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getProofHeight(); - if (f != null) { - writer.writeMessage( - 6, - f, - ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } -}; - - -/** - * optional string port_id = 1; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getPortId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setPortId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string previous_channel_id = 2; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getPreviousChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setPreviousChannelId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional Channel channel = 3; - * @return {?proto.ibc.core.channel.v1.Channel} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getChannel = function() { - return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( - jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 3)); -}; - - -/** - * @param {?proto.ibc.core.channel.v1.Channel|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this -*/ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.clearChannel = function() { - return this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.hasChannel = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string counterparty_version = 4; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getCounterpartyVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setCounterpartyVersion = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional bytes proof_init = 5; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getProofInit = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes proof_init = 5; - * This is a type-conversion wrapper around `getProofInit()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getProofInit_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProofInit())); -}; - - -/** - * optional bytes proof_init = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProofInit()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getProofInit_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProofInit())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setProofInit = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional ibc.core.client.v1.Height proof_height = 6; - * @return {?proto.ibc.core.client.v1.Height} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getProofHeight = function() { - return /** @type{?proto.ibc.core.client.v1.Height} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 6)); -}; - - -/** - * @param {?proto.ibc.core.client.v1.Height|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this -*/ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setProofHeight = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.clearProofHeight = function() { - return this.setProofHeight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.hasProofHeight = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional string signer = 7; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTry} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenTry.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelOpenTryResponse; - return proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTryResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelOpenAck.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.toObject = function(includeInstance, msg) { - var f, obj = { - portId: jspb.Message.getFieldWithDefault(msg, 1, ""), - channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), - counterpartyChannelId: jspb.Message.getFieldWithDefault(msg, 3, ""), - counterpartyVersion: jspb.Message.getFieldWithDefault(msg, 4, ""), - proofTry: msg.getProofTry_asB64(), - proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - signer: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelOpenAck; - return proto.ibc.core.channel.v1.MsgChannelOpenAck.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPortId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setCounterpartyChannelId(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setCounterpartyVersion(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProofTry(value); - break; - case 6: - var value = new ibc_core_client_v1_client_pb.Height; - reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); - msg.setProofHeight(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelOpenAck.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPortId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChannelId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getCounterpartyChannelId(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getCounterpartyVersion(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getProofTry_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getProofHeight(); - if (f != null) { - writer.writeMessage( - 6, - f, - ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } -}; - - -/** - * optional string port_id = 1; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getPortId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setPortId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string channel_id = 2; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setChannelId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string counterparty_channel_id = 3; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getCounterpartyChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setCounterpartyChannelId = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string counterparty_version = 4; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getCounterpartyVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setCounterpartyVersion = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional bytes proof_try = 5; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getProofTry = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes proof_try = 5; - * This is a type-conversion wrapper around `getProofTry()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getProofTry_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProofTry())); -}; - - -/** - * optional bytes proof_try = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProofTry()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getProofTry_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProofTry())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setProofTry = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional ibc.core.client.v1.Height proof_height = 6; - * @return {?proto.ibc.core.client.v1.Height} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getProofHeight = function() { - return /** @type{?proto.ibc.core.client.v1.Height} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 6)); -}; - - -/** - * @param {?proto.ibc.core.client.v1.Height|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this -*/ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setProofHeight = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.clearProofHeight = function() { - return this.setProofHeight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.hasProofHeight = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional string signer = 7; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAck} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenAck.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelOpenAckResponse; - return proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAckResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelOpenConfirm.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.toObject = function(includeInstance, msg) { - var f, obj = { - portId: jspb.Message.getFieldWithDefault(msg, 1, ""), - channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), - proofAck: msg.getProofAck_asB64(), - proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - signer: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelOpenConfirm; - return proto.ibc.core.channel.v1.MsgChannelOpenConfirm.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPortId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProofAck(value); - break; - case 4: - var value = new ibc_core_client_v1_client_pb.Height; - reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); - msg.setProofHeight(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelOpenConfirm.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPortId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChannelId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getProofAck_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getProofHeight(); - if (f != null) { - writer.writeMessage( - 4, - f, - ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional string port_id = 1; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getPortId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setPortId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string channel_id = 2; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setChannelId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bytes proof_ack = 3; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getProofAck = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes proof_ack = 3; - * This is a type-conversion wrapper around `getProofAck()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getProofAck_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProofAck())); -}; - - -/** - * optional bytes proof_ack = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProofAck()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getProofAck_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProofAck())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setProofAck = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional ibc.core.client.v1.Height proof_height = 4; - * @return {?proto.ibc.core.client.v1.Height} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getProofHeight = function() { - return /** @type{?proto.ibc.core.client.v1.Height} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 4)); -}; - - -/** - * @param {?proto.ibc.core.client.v1.Height|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this -*/ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setProofHeight = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.clearProofHeight = function() { - return this.setProofHeight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.hasProofHeight = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string signer = 5; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirm.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse; - return proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelCloseInit.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.toObject = function(includeInstance, msg) { - var f, obj = { - portId: jspb.Message.getFieldWithDefault(msg, 1, ""), - channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), - signer: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelCloseInit; - return proto.ibc.core.channel.v1.MsgChannelCloseInit.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPortId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelCloseInit.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPortId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChannelId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string port_id = 1; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.getPortId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} returns this - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.setPortId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string channel_id = 2; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.getChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} returns this - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.setChannelId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string signer = 3; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInit} returns this - */ -proto.ibc.core.channel.v1.MsgChannelCloseInit.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelCloseInitResponse; - return proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInitResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelCloseConfirm.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.toObject = function(includeInstance, msg) { - var f, obj = { - portId: jspb.Message.getFieldWithDefault(msg, 1, ""), - channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), - proofInit: msg.getProofInit_asB64(), - proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - signer: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelCloseConfirm; - return proto.ibc.core.channel.v1.MsgChannelCloseConfirm.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPortId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProofInit(value); - break; - case 4: - var value = new ibc_core_client_v1_client_pb.Height; - reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); - msg.setProofHeight(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelCloseConfirm.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPortId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChannelId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getProofInit_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getProofHeight(); - if (f != null) { - writer.writeMessage( - 4, - f, - ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional string port_id = 1; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getPortId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setPortId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string channel_id = 2; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setChannelId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bytes proof_init = 3; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getProofInit = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes proof_init = 3; - * This is a type-conversion wrapper around `getProofInit()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getProofInit_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProofInit())); -}; - - -/** - * optional bytes proof_init = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProofInit()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getProofInit_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProofInit())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setProofInit = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional ibc.core.client.v1.Height proof_height = 4; - * @return {?proto.ibc.core.client.v1.Height} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getProofHeight = function() { - return /** @type{?proto.ibc.core.client.v1.Height} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 4)); -}; - - -/** - * @param {?proto.ibc.core.client.v1.Height|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this -*/ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setProofHeight = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.clearProofHeight = function() { - return this.setProofHeight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.hasProofHeight = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string signer = 5; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} returns this - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirm.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse; - return proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgRecvPacket.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgRecvPacket.toObject = function(includeInstance, msg) { - var f, obj = { - packet: (f = msg.getPacket()) && ibc_core_channel_v1_channel_pb.Packet.toObject(includeInstance, f), - proofCommitment: msg.getProofCommitment_asB64(), - proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - signer: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgRecvPacket; - return proto.ibc.core.channel.v1.MsgRecvPacket.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new ibc_core_channel_v1_channel_pb.Packet; - reader.readMessage(value,ibc_core_channel_v1_channel_pb.Packet.deserializeBinaryFromReader); - msg.setPacket(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProofCommitment(value); - break; - case 3: - var value = new ibc_core_client_v1_client_pb.Height; - reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); - msg.setProofHeight(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgRecvPacket.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgRecvPacket.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPacket(); - if (f != null) { - writer.writeMessage( - 1, - f, - ibc_core_channel_v1_channel_pb.Packet.serializeBinaryToWriter - ); - } - f = message.getProofCommitment_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getProofHeight(); - if (f != null) { - writer.writeMessage( - 3, - f, - ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional Packet packet = 1; - * @return {?proto.ibc.core.channel.v1.Packet} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getPacket = function() { - return /** @type{?proto.ibc.core.channel.v1.Packet} */ ( - jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Packet, 1)); -}; - - -/** - * @param {?proto.ibc.core.channel.v1.Packet|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this -*/ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.setPacket = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.clearPacket = function() { - return this.setPacket(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.hasPacket = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes proof_commitment = 2; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getProofCommitment = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes proof_commitment = 2; - * This is a type-conversion wrapper around `getProofCommitment()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getProofCommitment_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProofCommitment())); -}; - - -/** - * optional bytes proof_commitment = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProofCommitment()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getProofCommitment_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProofCommitment())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.setProofCommitment = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional ibc.core.client.v1.Height proof_height = 3; - * @return {?proto.ibc.core.client.v1.Height} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getProofHeight = function() { - return /** @type{?proto.ibc.core.client.v1.Height} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)); -}; - - -/** - * @param {?proto.ibc.core.client.v1.Height|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this -*/ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.setProofHeight = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.clearProofHeight = function() { - return this.setProofHeight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.hasProofHeight = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string signer = 4; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgRecvPacket} returns this - */ -proto.ibc.core.channel.v1.MsgRecvPacket.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgRecvPacketResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgRecvPacketResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgRecvPacketResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} - */ -proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgRecvPacketResponse; - return proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} - */ -proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgRecvPacketResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgRecvPacketResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgRecvPacketResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgRecvPacketResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgTimeout.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgTimeout} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgTimeout.toObject = function(includeInstance, msg) { - var f, obj = { - packet: (f = msg.getPacket()) && ibc_core_channel_v1_channel_pb.Packet.toObject(includeInstance, f), - proofUnreceived: msg.getProofUnreceived_asB64(), - proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - nextSequenceRecv: jspb.Message.getFieldWithDefault(msg, 4, 0), - signer: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgTimeout} - */ -proto.ibc.core.channel.v1.MsgTimeout.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgTimeout; - return proto.ibc.core.channel.v1.MsgTimeout.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgTimeout} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgTimeout} - */ -proto.ibc.core.channel.v1.MsgTimeout.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new ibc_core_channel_v1_channel_pb.Packet; - reader.readMessage(value,ibc_core_channel_v1_channel_pb.Packet.deserializeBinaryFromReader); - msg.setPacket(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProofUnreceived(value); - break; - case 3: - var value = new ibc_core_client_v1_client_pb.Height; - reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); - msg.setProofHeight(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNextSequenceRecv(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgTimeout.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgTimeout} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgTimeout.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPacket(); - if (f != null) { - writer.writeMessage( - 1, - f, - ibc_core_channel_v1_channel_pb.Packet.serializeBinaryToWriter - ); - } - f = message.getProofUnreceived_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getProofHeight(); - if (f != null) { - writer.writeMessage( - 3, - f, - ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter - ); - } - f = message.getNextSequenceRecv(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional Packet packet = 1; - * @return {?proto.ibc.core.channel.v1.Packet} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.getPacket = function() { - return /** @type{?proto.ibc.core.channel.v1.Packet} */ ( - jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Packet, 1)); -}; - - -/** - * @param {?proto.ibc.core.channel.v1.Packet|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this -*/ -proto.ibc.core.channel.v1.MsgTimeout.prototype.setPacket = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.clearPacket = function() { - return this.setPacket(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.hasPacket = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes proof_unreceived = 2; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.getProofUnreceived = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes proof_unreceived = 2; - * This is a type-conversion wrapper around `getProofUnreceived()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.getProofUnreceived_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProofUnreceived())); -}; - - -/** - * optional bytes proof_unreceived = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProofUnreceived()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.getProofUnreceived_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProofUnreceived())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.setProofUnreceived = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional ibc.core.client.v1.Height proof_height = 3; - * @return {?proto.ibc.core.client.v1.Height} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.getProofHeight = function() { - return /** @type{?proto.ibc.core.client.v1.Height} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 3)); -}; - - -/** - * @param {?proto.ibc.core.client.v1.Height|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this -*/ -proto.ibc.core.channel.v1.MsgTimeout.prototype.setProofHeight = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.clearProofHeight = function() { - return this.setProofHeight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.hasProofHeight = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint64 next_sequence_recv = 4; - * @return {number} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.getNextSequenceRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.setNextSequenceRecv = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string signer = 5; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgTimeout} returns this - */ -proto.ibc.core.channel.v1.MsgTimeout.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgTimeoutResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgTimeoutResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgTimeoutResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgTimeoutResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgTimeoutResponse} - */ -proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgTimeoutResponse; - return proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgTimeoutResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgTimeoutResponse} - */ -proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgTimeoutResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgTimeoutResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgTimeoutResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgTimeoutResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgTimeoutOnClose.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.toObject = function(includeInstance, msg) { - var f, obj = { - packet: (f = msg.getPacket()) && ibc_core_channel_v1_channel_pb.Packet.toObject(includeInstance, f), - proofUnreceived: msg.getProofUnreceived_asB64(), - proofClose: msg.getProofClose_asB64(), - proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - nextSequenceRecv: jspb.Message.getFieldWithDefault(msg, 5, 0), - signer: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgTimeoutOnClose; - return proto.ibc.core.channel.v1.MsgTimeoutOnClose.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new ibc_core_channel_v1_channel_pb.Packet; - reader.readMessage(value,ibc_core_channel_v1_channel_pb.Packet.deserializeBinaryFromReader); - msg.setPacket(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProofUnreceived(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProofClose(value); - break; - case 4: - var value = new ibc_core_client_v1_client_pb.Height; - reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); - msg.setProofHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNextSequenceRecv(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgTimeoutOnClose.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPacket(); - if (f != null) { - writer.writeMessage( - 1, - f, - ibc_core_channel_v1_channel_pb.Packet.serializeBinaryToWriter - ); - } - f = message.getProofUnreceived_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getProofClose_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getProofHeight(); - if (f != null) { - writer.writeMessage( - 4, - f, - ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter - ); - } - f = message.getNextSequenceRecv(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional Packet packet = 1; - * @return {?proto.ibc.core.channel.v1.Packet} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getPacket = function() { - return /** @type{?proto.ibc.core.channel.v1.Packet} */ ( - jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Packet, 1)); -}; - - -/** - * @param {?proto.ibc.core.channel.v1.Packet|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this -*/ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setPacket = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.clearPacket = function() { - return this.setPacket(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.hasPacket = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes proof_unreceived = 2; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofUnreceived = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes proof_unreceived = 2; - * This is a type-conversion wrapper around `getProofUnreceived()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofUnreceived_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProofUnreceived())); -}; - - -/** - * optional bytes proof_unreceived = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProofUnreceived()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofUnreceived_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProofUnreceived())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setProofUnreceived = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes proof_close = 3; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofClose = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes proof_close = 3; - * This is a type-conversion wrapper around `getProofClose()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofClose_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProofClose())); -}; - - -/** - * optional bytes proof_close = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProofClose()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofClose_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProofClose())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setProofClose = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional ibc.core.client.v1.Height proof_height = 4; - * @return {?proto.ibc.core.client.v1.Height} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getProofHeight = function() { - return /** @type{?proto.ibc.core.client.v1.Height} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 4)); -}; - - -/** - * @param {?proto.ibc.core.client.v1.Height|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this -*/ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setProofHeight = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.clearProofHeight = function() { - return this.setProofHeight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.hasProofHeight = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional uint64 next_sequence_recv = 5; - * @return {number} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getNextSequenceRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setNextSequenceRecv = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string signer = 6; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} returns this - */ -proto.ibc.core.channel.v1.MsgTimeoutOnClose.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse; - return proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgAcknowledgement.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.toObject = function(includeInstance, msg) { - var f, obj = { - packet: (f = msg.getPacket()) && ibc_core_channel_v1_channel_pb.Packet.toObject(includeInstance, f), - acknowledgement: msg.getAcknowledgement_asB64(), - proofAcked: msg.getProofAcked_asB64(), - proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), - signer: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgAcknowledgement; - return proto.ibc.core.channel.v1.MsgAcknowledgement.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new ibc_core_channel_v1_channel_pb.Packet; - reader.readMessage(value,ibc_core_channel_v1_channel_pb.Packet.deserializeBinaryFromReader); - msg.setPacket(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAcknowledgement(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProofAcked(value); - break; - case 4: - var value = new ibc_core_client_v1_client_pb.Height; - reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); - msg.setProofHeight(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setSigner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgAcknowledgement.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPacket(); - if (f != null) { - writer.writeMessage( - 1, - f, - ibc_core_channel_v1_channel_pb.Packet.serializeBinaryToWriter - ); - } - f = message.getAcknowledgement_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getProofAcked_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getProofHeight(); - if (f != null) { - writer.writeMessage( - 4, - f, - ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter - ); - } - f = message.getSigner(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional Packet packet = 1; - * @return {?proto.ibc.core.channel.v1.Packet} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getPacket = function() { - return /** @type{?proto.ibc.core.channel.v1.Packet} */ ( - jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Packet, 1)); -}; - - -/** - * @param {?proto.ibc.core.channel.v1.Packet|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this -*/ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setPacket = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.clearPacket = function() { - return this.setPacket(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.hasPacket = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes acknowledgement = 2; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getAcknowledgement = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes acknowledgement = 2; - * This is a type-conversion wrapper around `getAcknowledgement()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getAcknowledgement_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAcknowledgement())); -}; - - -/** - * optional bytes acknowledgement = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAcknowledgement()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getAcknowledgement_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAcknowledgement())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setAcknowledgement = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes proof_acked = 3; - * @return {!(string|Uint8Array)} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getProofAcked = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes proof_acked = 3; - * This is a type-conversion wrapper around `getProofAcked()` - * @return {string} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getProofAcked_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProofAcked())); -}; - - -/** - * optional bytes proof_acked = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProofAcked()` - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getProofAcked_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProofAcked())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setProofAcked = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional ibc.core.client.v1.Height proof_height = 4; - * @return {?proto.ibc.core.client.v1.Height} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getProofHeight = function() { - return /** @type{?proto.ibc.core.client.v1.Height} */ ( - jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 4)); -}; - - -/** - * @param {?proto.ibc.core.client.v1.Height|undefined} value - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this -*/ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setProofHeight = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.clearProofHeight = function() { - return this.setProofHeight(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.hasProofHeight = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string signer = 5; - * @return {string} - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.getSigner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgement} returns this - */ -proto.ibc.core.channel.v1.MsgAcknowledgement.prototype.setSigner = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.core.channel.v1.MsgAcknowledgementResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.core.channel.v1.MsgAcknowledgementResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgAcknowledgementResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} - */ -proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.core.channel.v1.MsgAcknowledgementResponse; - return proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} - */ -proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.core.channel.v1.MsgAcknowledgementResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.core.channel.v1.MsgAcknowledgementResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.core.channel.v1.MsgAcknowledgementResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.core.channel.v1.MsgAcknowledgementResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/proto/ibc/lightclients/localhost/v1/localhost_pb_service.d.ts b/proto/ibc/lightclients/localhost/v1/localhost_pb_service.d.ts deleted file mode 100644 index 014c9fd..0000000 --- a/proto/ibc/lightclients/localhost/v1/localhost_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: ibc.lightclients.localhost.v1 -// file: ibc/lightclients/localhost/v1/localhost.proto - diff --git a/proto/ibc/lightclients/localhost/v1/localhost_pb_service.js b/proto/ibc/lightclients/localhost/v1/localhost_pb_service.js deleted file mode 100644 index 014c9fd..0000000 --- a/proto/ibc/lightclients/localhost/v1/localhost_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: ibc.lightclients.localhost.v1 -// file: ibc/lightclients/localhost/v1/localhost.proto - diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine_pb.d.ts b/proto/ibc/lightclients/solomachine/v1/solomachine_pb.d.ts deleted file mode 100644 index 0fa20eb..0000000 --- a/proto/ibc/lightclients/solomachine/v1/solomachine_pb.d.ts +++ /dev/null @@ -1,506 +0,0 @@ -// package: ibc.lightclients.solomachine.v1 -// file: ibc/lightclients/solomachine/v1/solomachine.proto - -import * as jspb from "google-protobuf"; -import * as ibc_core_connection_v1_connection_pb from "../../../../ibc/core/connection/v1/connection_pb"; -import * as ibc_core_channel_v1_channel_pb from "../../../../ibc/core/channel/v1/channel_pb"; -import * as gogoproto_gogo_pb from "../../../../gogoproto/gogo_pb"; -import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; - -export class ClientState extends jspb.Message { - getSequence(): number; - setSequence(value: number): void; - - getFrozenSequence(): number; - setFrozenSequence(value: number): void; - - hasConsensusState(): boolean; - clearConsensusState(): void; - getConsensusState(): ConsensusState | undefined; - setConsensusState(value?: ConsensusState): void; - - getAllowUpdateAfterProposal(): boolean; - setAllowUpdateAfterProposal(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClientState.AsObject; - static toObject(includeInstance: boolean, msg: ClientState): ClientState.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClientState, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClientState; - static deserializeBinaryFromReader(message: ClientState, reader: jspb.BinaryReader): ClientState; -} - -export namespace ClientState { - export type AsObject = { - sequence: number, - frozenSequence: number, - consensusState?: ConsensusState.AsObject, - allowUpdateAfterProposal: boolean, - } -} - -export class ConsensusState extends jspb.Message { - hasPublicKey(): boolean; - clearPublicKey(): void; - getPublicKey(): google_protobuf_any_pb.Any | undefined; - setPublicKey(value?: google_protobuf_any_pb.Any): void; - - getDiversifier(): string; - setDiversifier(value: string): void; - - getTimestamp(): number; - setTimestamp(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConsensusState.AsObject; - static toObject(includeInstance: boolean, msg: ConsensusState): ConsensusState.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConsensusState, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConsensusState; - static deserializeBinaryFromReader(message: ConsensusState, reader: jspb.BinaryReader): ConsensusState; -} - -export namespace ConsensusState { - export type AsObject = { - publicKey?: google_protobuf_any_pb.Any.AsObject, - diversifier: string, - timestamp: number, - } -} - -export class Header extends jspb.Message { - getSequence(): number; - setSequence(value: number): void; - - getTimestamp(): number; - setTimestamp(value: number): void; - - getSignature(): Uint8Array | string; - getSignature_asU8(): Uint8Array; - getSignature_asB64(): string; - setSignature(value: Uint8Array | string): void; - - hasNewPublicKey(): boolean; - clearNewPublicKey(): void; - getNewPublicKey(): google_protobuf_any_pb.Any | undefined; - setNewPublicKey(value?: google_protobuf_any_pb.Any): void; - - getNewDiversifier(): string; - setNewDiversifier(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Header.AsObject; - static toObject(includeInstance: boolean, msg: Header): Header.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Header; - static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; -} - -export namespace Header { - export type AsObject = { - sequence: number, - timestamp: number, - signature: Uint8Array | string, - newPublicKey?: google_protobuf_any_pb.Any.AsObject, - newDiversifier: string, - } -} - -export class Misbehaviour extends jspb.Message { - getClientId(): string; - setClientId(value: string): void; - - getSequence(): number; - setSequence(value: number): void; - - hasSignatureOne(): boolean; - clearSignatureOne(): void; - getSignatureOne(): SignatureAndData | undefined; - setSignatureOne(value?: SignatureAndData): void; - - hasSignatureTwo(): boolean; - clearSignatureTwo(): void; - getSignatureTwo(): SignatureAndData | undefined; - setSignatureTwo(value?: SignatureAndData): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Misbehaviour.AsObject; - static toObject(includeInstance: boolean, msg: Misbehaviour): Misbehaviour.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Misbehaviour, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Misbehaviour; - static deserializeBinaryFromReader(message: Misbehaviour, reader: jspb.BinaryReader): Misbehaviour; -} - -export namespace Misbehaviour { - export type AsObject = { - clientId: string, - sequence: number, - signatureOne?: SignatureAndData.AsObject, - signatureTwo?: SignatureAndData.AsObject, - } -} - -export class SignatureAndData extends jspb.Message { - getSignature(): Uint8Array | string; - getSignature_asU8(): Uint8Array; - getSignature_asB64(): string; - setSignature(value: Uint8Array | string): void; - - getDataType(): DataTypeMap[keyof DataTypeMap]; - setDataType(value: DataTypeMap[keyof DataTypeMap]): void; - - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - getTimestamp(): number; - setTimestamp(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignatureAndData.AsObject; - static toObject(includeInstance: boolean, msg: SignatureAndData): SignatureAndData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignatureAndData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignatureAndData; - static deserializeBinaryFromReader(message: SignatureAndData, reader: jspb.BinaryReader): SignatureAndData; -} - -export namespace SignatureAndData { - export type AsObject = { - signature: Uint8Array | string, - dataType: DataTypeMap[keyof DataTypeMap], - data: Uint8Array | string, - timestamp: number, - } -} - -export class TimestampedSignatureData extends jspb.Message { - getSignatureData(): Uint8Array | string; - getSignatureData_asU8(): Uint8Array; - getSignatureData_asB64(): string; - setSignatureData(value: Uint8Array | string): void; - - getTimestamp(): number; - setTimestamp(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimestampedSignatureData.AsObject; - static toObject(includeInstance: boolean, msg: TimestampedSignatureData): TimestampedSignatureData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimestampedSignatureData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimestampedSignatureData; - static deserializeBinaryFromReader(message: TimestampedSignatureData, reader: jspb.BinaryReader): TimestampedSignatureData; -} - -export namespace TimestampedSignatureData { - export type AsObject = { - signatureData: Uint8Array | string, - timestamp: number, - } -} - -export class SignBytes extends jspb.Message { - getSequence(): number; - setSequence(value: number): void; - - getTimestamp(): number; - setTimestamp(value: number): void; - - getDiversifier(): string; - setDiversifier(value: string): void; - - getDataType(): DataTypeMap[keyof DataTypeMap]; - setDataType(value: DataTypeMap[keyof DataTypeMap]): void; - - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignBytes.AsObject; - static toObject(includeInstance: boolean, msg: SignBytes): SignBytes.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignBytes, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignBytes; - static deserializeBinaryFromReader(message: SignBytes, reader: jspb.BinaryReader): SignBytes; -} - -export namespace SignBytes { - export type AsObject = { - sequence: number, - timestamp: number, - diversifier: string, - dataType: DataTypeMap[keyof DataTypeMap], - data: Uint8Array | string, - } -} - -export class HeaderData extends jspb.Message { - hasNewPubKey(): boolean; - clearNewPubKey(): void; - getNewPubKey(): google_protobuf_any_pb.Any | undefined; - setNewPubKey(value?: google_protobuf_any_pb.Any): void; - - getNewDiversifier(): string; - setNewDiversifier(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HeaderData.AsObject; - static toObject(includeInstance: boolean, msg: HeaderData): HeaderData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HeaderData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HeaderData; - static deserializeBinaryFromReader(message: HeaderData, reader: jspb.BinaryReader): HeaderData; -} - -export namespace HeaderData { - export type AsObject = { - newPubKey?: google_protobuf_any_pb.Any.AsObject, - newDiversifier: string, - } -} - -export class ClientStateData extends jspb.Message { - getPath(): Uint8Array | string; - getPath_asU8(): Uint8Array; - getPath_asB64(): string; - setPath(value: Uint8Array | string): void; - - hasClientState(): boolean; - clearClientState(): void; - getClientState(): google_protobuf_any_pb.Any | undefined; - setClientState(value?: google_protobuf_any_pb.Any): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClientStateData.AsObject; - static toObject(includeInstance: boolean, msg: ClientStateData): ClientStateData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClientStateData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClientStateData; - static deserializeBinaryFromReader(message: ClientStateData, reader: jspb.BinaryReader): ClientStateData; -} - -export namespace ClientStateData { - export type AsObject = { - path: Uint8Array | string, - clientState?: google_protobuf_any_pb.Any.AsObject, - } -} - -export class ConsensusStateData extends jspb.Message { - getPath(): Uint8Array | string; - getPath_asU8(): Uint8Array; - getPath_asB64(): string; - setPath(value: Uint8Array | string): void; - - hasConsensusState(): boolean; - clearConsensusState(): void; - getConsensusState(): google_protobuf_any_pb.Any | undefined; - setConsensusState(value?: google_protobuf_any_pb.Any): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConsensusStateData.AsObject; - static toObject(includeInstance: boolean, msg: ConsensusStateData): ConsensusStateData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConsensusStateData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConsensusStateData; - static deserializeBinaryFromReader(message: ConsensusStateData, reader: jspb.BinaryReader): ConsensusStateData; -} - -export namespace ConsensusStateData { - export type AsObject = { - path: Uint8Array | string, - consensusState?: google_protobuf_any_pb.Any.AsObject, - } -} - -export class ConnectionStateData extends jspb.Message { - getPath(): Uint8Array | string; - getPath_asU8(): Uint8Array; - getPath_asB64(): string; - setPath(value: Uint8Array | string): void; - - hasConnection(): boolean; - clearConnection(): void; - getConnection(): ibc_core_connection_v1_connection_pb.ConnectionEnd | undefined; - setConnection(value?: ibc_core_connection_v1_connection_pb.ConnectionEnd): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConnectionStateData.AsObject; - static toObject(includeInstance: boolean, msg: ConnectionStateData): ConnectionStateData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConnectionStateData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConnectionStateData; - static deserializeBinaryFromReader(message: ConnectionStateData, reader: jspb.BinaryReader): ConnectionStateData; -} - -export namespace ConnectionStateData { - export type AsObject = { - path: Uint8Array | string, - connection?: ibc_core_connection_v1_connection_pb.ConnectionEnd.AsObject, - } -} - -export class ChannelStateData extends jspb.Message { - getPath(): Uint8Array | string; - getPath_asU8(): Uint8Array; - getPath_asB64(): string; - setPath(value: Uint8Array | string): void; - - hasChannel(): boolean; - clearChannel(): void; - getChannel(): ibc_core_channel_v1_channel_pb.Channel | undefined; - setChannel(value?: ibc_core_channel_v1_channel_pb.Channel): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelStateData.AsObject; - static toObject(includeInstance: boolean, msg: ChannelStateData): ChannelStateData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelStateData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelStateData; - static deserializeBinaryFromReader(message: ChannelStateData, reader: jspb.BinaryReader): ChannelStateData; -} - -export namespace ChannelStateData { - export type AsObject = { - path: Uint8Array | string, - channel?: ibc_core_channel_v1_channel_pb.Channel.AsObject, - } -} - -export class PacketCommitmentData extends jspb.Message { - getPath(): Uint8Array | string; - getPath_asU8(): Uint8Array; - getPath_asB64(): string; - setPath(value: Uint8Array | string): void; - - getCommitment(): Uint8Array | string; - getCommitment_asU8(): Uint8Array; - getCommitment_asB64(): string; - setCommitment(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PacketCommitmentData.AsObject; - static toObject(includeInstance: boolean, msg: PacketCommitmentData): PacketCommitmentData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PacketCommitmentData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PacketCommitmentData; - static deserializeBinaryFromReader(message: PacketCommitmentData, reader: jspb.BinaryReader): PacketCommitmentData; -} - -export namespace PacketCommitmentData { - export type AsObject = { - path: Uint8Array | string, - commitment: Uint8Array | string, - } -} - -export class PacketAcknowledgementData extends jspb.Message { - getPath(): Uint8Array | string; - getPath_asU8(): Uint8Array; - getPath_asB64(): string; - setPath(value: Uint8Array | string): void; - - getAcknowledgement(): Uint8Array | string; - getAcknowledgement_asU8(): Uint8Array; - getAcknowledgement_asB64(): string; - setAcknowledgement(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PacketAcknowledgementData.AsObject; - static toObject(includeInstance: boolean, msg: PacketAcknowledgementData): PacketAcknowledgementData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PacketAcknowledgementData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PacketAcknowledgementData; - static deserializeBinaryFromReader(message: PacketAcknowledgementData, reader: jspb.BinaryReader): PacketAcknowledgementData; -} - -export namespace PacketAcknowledgementData { - export type AsObject = { - path: Uint8Array | string, - acknowledgement: Uint8Array | string, - } -} - -export class PacketReceiptAbsenceData extends jspb.Message { - getPath(): Uint8Array | string; - getPath_asU8(): Uint8Array; - getPath_asB64(): string; - setPath(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PacketReceiptAbsenceData.AsObject; - static toObject(includeInstance: boolean, msg: PacketReceiptAbsenceData): PacketReceiptAbsenceData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PacketReceiptAbsenceData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PacketReceiptAbsenceData; - static deserializeBinaryFromReader(message: PacketReceiptAbsenceData, reader: jspb.BinaryReader): PacketReceiptAbsenceData; -} - -export namespace PacketReceiptAbsenceData { - export type AsObject = { - path: Uint8Array | string, - } -} - -export class NextSequenceRecvData extends jspb.Message { - getPath(): Uint8Array | string; - getPath_asU8(): Uint8Array; - getPath_asB64(): string; - setPath(value: Uint8Array | string): void; - - getNextSeqRecv(): number; - setNextSeqRecv(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NextSequenceRecvData.AsObject; - static toObject(includeInstance: boolean, msg: NextSequenceRecvData): NextSequenceRecvData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NextSequenceRecvData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NextSequenceRecvData; - static deserializeBinaryFromReader(message: NextSequenceRecvData, reader: jspb.BinaryReader): NextSequenceRecvData; -} - -export namespace NextSequenceRecvData { - export type AsObject = { - path: Uint8Array | string, - nextSeqRecv: number, - } -} - -export interface DataTypeMap { - DATA_TYPE_UNINITIALIZED_UNSPECIFIED: 0; - DATA_TYPE_CLIENT_STATE: 1; - DATA_TYPE_CONSENSUS_STATE: 2; - DATA_TYPE_CONNECTION_STATE: 3; - DATA_TYPE_CHANNEL_STATE: 4; - DATA_TYPE_PACKET_COMMITMENT: 5; - DATA_TYPE_PACKET_ACKNOWLEDGEMENT: 6; - DATA_TYPE_PACKET_RECEIPT_ABSENCE: 7; - DATA_TYPE_NEXT_SEQUENCE_RECV: 8; - DATA_TYPE_HEADER: 9; -} - -export const DataType: DataTypeMap; - diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine_pb.js b/proto/ibc/lightclients/solomachine/v1/solomachine_pb.js deleted file mode 100644 index af822d0..0000000 --- a/proto/ibc/lightclients/solomachine/v1/solomachine_pb.js +++ /dev/null @@ -1,3885 +0,0 @@ -// source: ibc/lightclients/solomachine/v1/solomachine.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var ibc_core_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js'); -goog.object.extend(proto, ibc_core_connection_v1_connection_pb); -var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); -goog.object.extend(proto, ibc_core_channel_v1_channel_pb); -var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); -var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, google_protobuf_any_pb); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.ChannelStateData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.ClientState', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.ClientStateData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.ConnectionStateData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.ConsensusState', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.ConsensusStateData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.DataType', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.Header', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.HeaderData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.Misbehaviour', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.PacketCommitmentData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.SignBytes', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.SignatureAndData', null, global); -goog.exportSymbol('proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.ClientState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.ClientState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.ClientState.displayName = 'proto.ibc.lightclients.solomachine.v1.ClientState'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.ConsensusState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.ConsensusState.displayName = 'proto.ibc.lightclients.solomachine.v1.ConsensusState'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.Header = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.Header, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.Header.displayName = 'proto.ibc.lightclients.solomachine.v1.Header'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.Misbehaviour, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.Misbehaviour.displayName = 'proto.ibc.lightclients.solomachine.v1.Misbehaviour'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.SignatureAndData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.SignatureAndData.displayName = 'proto.ibc.lightclients.solomachine.v1.SignatureAndData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.displayName = 'proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.SignBytes = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.SignBytes, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.SignBytes.displayName = 'proto.ibc.lightclients.solomachine.v1.SignBytes'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.HeaderData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.HeaderData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.HeaderData.displayName = 'proto.ibc.lightclients.solomachine.v1.HeaderData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.ClientStateData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.ClientStateData.displayName = 'proto.ibc.lightclients.solomachine.v1.ClientStateData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.ConsensusStateData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.ConsensusStateData.displayName = 'proto.ibc.lightclients.solomachine.v1.ConsensusStateData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.ConnectionStateData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.ConnectionStateData.displayName = 'proto.ibc.lightclients.solomachine.v1.ConnectionStateData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.ChannelStateData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.ChannelStateData.displayName = 'proto.ibc.lightclients.solomachine.v1.ChannelStateData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.PacketCommitmentData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.displayName = 'proto.ibc.lightclients.solomachine.v1.PacketCommitmentData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.displayName = 'proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.displayName = 'proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.displayName = 'proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.ClientState.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.ClientState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ClientState.toObject = function(includeInstance, msg) { - var f, obj = { - sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), - frozenSequence: jspb.Message.getFieldWithDefault(msg, 2, 0), - consensusState: (f = msg.getConsensusState()) && proto.ibc.lightclients.solomachine.v1.ConsensusState.toObject(includeInstance, f), - allowUpdateAfterProposal: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.ClientState} - */ -proto.ibc.lightclients.solomachine.v1.ClientState.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.ClientState; - return proto.ibc.lightclients.solomachine.v1.ClientState.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.ClientState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.ClientState} - */ -proto.ibc.lightclients.solomachine.v1.ClientState.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSequence(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFrozenSequence(value); - break; - case 3: - var value = new proto.ibc.lightclients.solomachine.v1.ConsensusState; - reader.readMessage(value,proto.ibc.lightclients.solomachine.v1.ConsensusState.deserializeBinaryFromReader); - msg.setConsensusState(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAllowUpdateAfterProposal(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.ClientState.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.ClientState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ClientState.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSequence(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getFrozenSequence(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getConsensusState(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ibc.lightclients.solomachine.v1.ConsensusState.serializeBinaryToWriter - ); - } - f = message.getAllowUpdateAfterProposal(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional uint64 sequence = 1; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.getSequence = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.ClientState} returns this - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.setSequence = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 frozen_sequence = 2; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.getFrozenSequence = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.ClientState} returns this - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.setFrozenSequence = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional ConsensusState consensus_state = 3; - * @return {?proto.ibc.lightclients.solomachine.v1.ConsensusState} - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.getConsensusState = function() { - return /** @type{?proto.ibc.lightclients.solomachine.v1.ConsensusState} */ ( - jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v1.ConsensusState, 3)); -}; - - -/** - * @param {?proto.ibc.lightclients.solomachine.v1.ConsensusState|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.ClientState} returns this -*/ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.setConsensusState = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.ClientState} returns this - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.clearConsensusState = function() { - return this.setConsensusState(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.hasConsensusState = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bool allow_update_after_proposal = 4; - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.getAllowUpdateAfterProposal = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.ibc.lightclients.solomachine.v1.ClientState} returns this - */ -proto.ibc.lightclients.solomachine.v1.ClientState.prototype.setAllowUpdateAfterProposal = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.ConsensusState.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.ConsensusState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.toObject = function(includeInstance, msg) { - var f, obj = { - publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), - diversifier: jspb.Message.getFieldWithDefault(msg, 2, ""), - timestamp: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusState} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.ConsensusState; - return proto.ibc.lightclients.solomachine.v1.ConsensusState.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.ConsensusState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusState} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setPublicKey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDiversifier(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.ConsensusState.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.ConsensusState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPublicKey(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } - f = message.getDiversifier(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * optional google.protobuf.Any public_key = 1; - * @return {?proto.google.protobuf.Any} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.getPublicKey = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusState} returns this -*/ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.setPublicKey = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusState} returns this - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.clearPublicKey = function() { - return this.setPublicKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.hasPublicKey = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string diversifier = 2; - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.getDiversifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusState} returns this - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.setDiversifier = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint64 timestamp = 3; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusState} returns this - */ -proto.ibc.lightclients.solomachine.v1.ConsensusState.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.Header.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.Header} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.Header.toObject = function(includeInstance, msg) { - var f, obj = { - sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), - timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), - signature: msg.getSignature_asB64(), - newPublicKey: (f = msg.getNewPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), - newDiversifier: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.Header} - */ -proto.ibc.lightclients.solomachine.v1.Header.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.Header; - return proto.ibc.lightclients.solomachine.v1.Header.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.Header} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.Header} - */ -proto.ibc.lightclients.solomachine.v1.Header.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSequence(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 4: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setNewPublicKey(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setNewDiversifier(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.Header.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.Header} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.Header.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSequence(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getNewPublicKey(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } - f = message.getNewDiversifier(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional uint64 sequence = 1; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.getSequence = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.Header} returns this - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.setSequence = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 timestamp = 2; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.Header} returns this - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.Header} returns this - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional google.protobuf.Any new_public_key = 4; - * @return {?proto.google.protobuf.Any} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.getNewPublicKey = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.Header} returns this -*/ -proto.ibc.lightclients.solomachine.v1.Header.prototype.setNewPublicKey = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.Header} returns this - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.clearNewPublicKey = function() { - return this.setNewPublicKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.hasNewPublicKey = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string new_diversifier = 5; - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.getNewDiversifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.lightclients.solomachine.v1.Header} returns this - */ -proto.ibc.lightclients.solomachine.v1.Header.prototype.setNewDiversifier = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.Misbehaviour.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.toObject = function(includeInstance, msg) { - var f, obj = { - clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), - sequence: jspb.Message.getFieldWithDefault(msg, 2, 0), - signatureOne: (f = msg.getSignatureOne()) && proto.ibc.lightclients.solomachine.v1.SignatureAndData.toObject(includeInstance, f), - signatureTwo: (f = msg.getSignatureTwo()) && proto.ibc.lightclients.solomachine.v1.SignatureAndData.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.Misbehaviour; - return proto.ibc.lightclients.solomachine.v1.Misbehaviour.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setClientId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSequence(value); - break; - case 3: - var value = new proto.ibc.lightclients.solomachine.v1.SignatureAndData; - reader.readMessage(value,proto.ibc.lightclients.solomachine.v1.SignatureAndData.deserializeBinaryFromReader); - msg.setSignatureOne(value); - break; - case 4: - var value = new proto.ibc.lightclients.solomachine.v1.SignatureAndData; - reader.readMessage(value,proto.ibc.lightclients.solomachine.v1.SignatureAndData.deserializeBinaryFromReader); - msg.setSignatureTwo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.Misbehaviour.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClientId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSequence(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getSignatureOne(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ibc.lightclients.solomachine.v1.SignatureAndData.serializeBinaryToWriter - ); - } - f = message.getSignatureTwo(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.ibc.lightclients.solomachine.v1.SignatureAndData.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string client_id = 1; - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.getClientId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} returns this - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.setClientId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 sequence = 2; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.getSequence = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} returns this - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.setSequence = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional SignatureAndData signature_one = 3; - * @return {?proto.ibc.lightclients.solomachine.v1.SignatureAndData} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.getSignatureOne = function() { - return /** @type{?proto.ibc.lightclients.solomachine.v1.SignatureAndData} */ ( - jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v1.SignatureAndData, 3)); -}; - - -/** - * @param {?proto.ibc.lightclients.solomachine.v1.SignatureAndData|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} returns this -*/ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.setSignatureOne = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} returns this - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.clearSignatureOne = function() { - return this.setSignatureOne(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.hasSignatureOne = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional SignatureAndData signature_two = 4; - * @return {?proto.ibc.lightclients.solomachine.v1.SignatureAndData} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.getSignatureTwo = function() { - return /** @type{?proto.ibc.lightclients.solomachine.v1.SignatureAndData} */ ( - jspb.Message.getWrapperField(this, proto.ibc.lightclients.solomachine.v1.SignatureAndData, 4)); -}; - - -/** - * @param {?proto.ibc.lightclients.solomachine.v1.SignatureAndData|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} returns this -*/ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.setSignatureTwo = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.Misbehaviour} returns this - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.clearSignatureTwo = function() { - return this.setSignatureTwo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.Misbehaviour.prototype.hasSignatureTwo = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.SignatureAndData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.SignatureAndData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.toObject = function(includeInstance, msg) { - var f, obj = { - signature: msg.getSignature_asB64(), - dataType: jspb.Message.getFieldWithDefault(msg, 2, 0), - data: msg.getData_asB64(), - timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.SignatureAndData} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.SignatureAndData; - return proto.ibc.lightclients.solomachine.v1.SignatureAndData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.SignatureAndData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.SignatureAndData} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 2: - var value = /** @type {!proto.ibc.lightclients.solomachine.v1.DataType} */ (reader.readEnum()); - msg.setDataType(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.SignatureAndData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.SignatureAndData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDataType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } -}; - - -/** - * optional bytes signature = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes signature = 1; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.SignatureAndData} returns this - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional DataType data_type = 2; - * @return {!proto.ibc.lightclients.solomachine.v1.DataType} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.getDataType = function() { - return /** @type {!proto.ibc.lightclients.solomachine.v1.DataType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.ibc.lightclients.solomachine.v1.DataType} value - * @return {!proto.ibc.lightclients.solomachine.v1.SignatureAndData} returns this - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.setDataType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional bytes data = 3; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes data = 3; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.SignatureAndData} returns this - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional uint64 timestamp = 4; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.SignatureAndData} returns this - */ -proto.ibc.lightclients.solomachine.v1.SignatureAndData.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.toObject = function(includeInstance, msg) { - var f, obj = { - signatureData: msg.getSignatureData_asB64(), - timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData} - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData; - return proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData} - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignatureData(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignatureData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional bytes signature_data = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.prototype.getSignatureData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes signature_data = 1; - * This is a type-conversion wrapper around `getSignatureData()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.prototype.getSignatureData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignatureData())); -}; - - -/** - * optional bytes signature_data = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignatureData()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.prototype.getSignatureData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignatureData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData} returns this - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.prototype.setSignatureData = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint64 timestamp = 2; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData} returns this - */ -proto.ibc.lightclients.solomachine.v1.TimestampedSignatureData.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.SignBytes.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.SignBytes} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.toObject = function(includeInstance, msg) { - var f, obj = { - sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), - timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), - diversifier: jspb.Message.getFieldWithDefault(msg, 3, ""), - dataType: jspb.Message.getFieldWithDefault(msg, 4, 0), - data: msg.getData_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.SignBytes} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.SignBytes; - return proto.ibc.lightclients.solomachine.v1.SignBytes.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.SignBytes} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.SignBytes} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSequence(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setDiversifier(value); - break; - case 4: - var value = /** @type {!proto.ibc.lightclients.solomachine.v1.DataType} */ (reader.readEnum()); - msg.setDataType(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.SignBytes.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.SignBytes} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSequence(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getDiversifier(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getDataType(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional uint64 sequence = 1; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.getSequence = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.SignBytes} returns this - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.setSequence = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 timestamp = 2; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.SignBytes} returns this - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string diversifier = 3; - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.getDiversifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.lightclients.solomachine.v1.SignBytes} returns this - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.setDiversifier = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional DataType data_type = 4; - * @return {!proto.ibc.lightclients.solomachine.v1.DataType} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.getDataType = function() { - return /** @type {!proto.ibc.lightclients.solomachine.v1.DataType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.ibc.lightclients.solomachine.v1.DataType} value - * @return {!proto.ibc.lightclients.solomachine.v1.SignBytes} returns this - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.setDataType = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - -/** - * optional bytes data = 5; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes data = 5; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.SignBytes} returns this - */ -proto.ibc.lightclients.solomachine.v1.SignBytes.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.HeaderData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.HeaderData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.toObject = function(includeInstance, msg) { - var f, obj = { - newPubKey: (f = msg.getNewPubKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), - newDiversifier: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.HeaderData} - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.HeaderData; - return proto.ibc.lightclients.solomachine.v1.HeaderData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.HeaderData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.HeaderData} - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setNewPubKey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNewDiversifier(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.HeaderData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.HeaderData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNewPubKey(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } - f = message.getNewDiversifier(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional google.protobuf.Any new_pub_key = 1; - * @return {?proto.google.protobuf.Any} - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.prototype.getNewPubKey = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.HeaderData} returns this -*/ -proto.ibc.lightclients.solomachine.v1.HeaderData.prototype.setNewPubKey = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.HeaderData} returns this - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.prototype.clearNewPubKey = function() { - return this.setNewPubKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.prototype.hasNewPubKey = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string new_diversifier = 2; - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.prototype.getNewDiversifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ibc.lightclients.solomachine.v1.HeaderData} returns this - */ -proto.ibc.lightclients.solomachine.v1.HeaderData.prototype.setNewDiversifier = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.ClientStateData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.ClientStateData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.toObject = function(includeInstance, msg) { - var f, obj = { - path: msg.getPath_asB64(), - clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.ClientStateData} - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.ClientStateData; - return proto.ibc.lightclients.solomachine.v1.ClientStateData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.ClientStateData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.ClientStateData} - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPath(value); - break; - case 2: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setClientState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.ClientStateData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.ClientStateData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPath_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getClientState(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes path = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.getPath = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes path = 1; - * This is a type-conversion wrapper around `getPath()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.getPath_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPath())); -}; - - -/** - * optional bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPath()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.getPath_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPath())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.ClientStateData} returns this - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.setPath = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional google.protobuf.Any client_state = 2; - * @return {?proto.google.protobuf.Any} - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.getClientState = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.ClientStateData} returns this -*/ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.setClientState = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.ClientStateData} returns this - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.clearClientState = function() { - return this.setClientState(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.ClientStateData.prototype.hasClientState = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.ConsensusStateData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.ConsensusStateData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.toObject = function(includeInstance, msg) { - var f, obj = { - path: msg.getPath_asB64(), - consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusStateData} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.ConsensusStateData; - return proto.ibc.lightclients.solomachine.v1.ConsensusStateData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.ConsensusStateData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusStateData} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPath(value); - break; - case 2: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setConsensusState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.ConsensusStateData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.ConsensusStateData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPath_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getConsensusState(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes path = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.getPath = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes path = 1; - * This is a type-conversion wrapper around `getPath()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.getPath_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPath())); -}; - - -/** - * optional bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPath()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.getPath_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPath())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusStateData} returns this - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.setPath = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional google.protobuf.Any consensus_state = 2; - * @return {?proto.google.protobuf.Any} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.getConsensusState = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusStateData} returns this -*/ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.setConsensusState = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.ConsensusStateData} returns this - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.clearConsensusState = function() { - return this.setConsensusState(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.ConsensusStateData.prototype.hasConsensusState = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.ConnectionStateData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.ConnectionStateData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.toObject = function(includeInstance, msg) { - var f, obj = { - path: msg.getPath_asB64(), - connection: (f = msg.getConnection()) && ibc_core_connection_v1_connection_pb.ConnectionEnd.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.ConnectionStateData} - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.ConnectionStateData; - return proto.ibc.lightclients.solomachine.v1.ConnectionStateData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.ConnectionStateData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.ConnectionStateData} - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPath(value); - break; - case 2: - var value = new ibc_core_connection_v1_connection_pb.ConnectionEnd; - reader.readMessage(value,ibc_core_connection_v1_connection_pb.ConnectionEnd.deserializeBinaryFromReader); - msg.setConnection(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.ConnectionStateData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.ConnectionStateData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPath_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getConnection(); - if (f != null) { - writer.writeMessage( - 2, - f, - ibc_core_connection_v1_connection_pb.ConnectionEnd.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes path = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.getPath = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes path = 1; - * This is a type-conversion wrapper around `getPath()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.getPath_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPath())); -}; - - -/** - * optional bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPath()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.getPath_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPath())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.ConnectionStateData} returns this - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.setPath = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional ibc.core.connection.v1.ConnectionEnd connection = 2; - * @return {?proto.ibc.core.connection.v1.ConnectionEnd} - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.getConnection = function() { - return /** @type{?proto.ibc.core.connection.v1.ConnectionEnd} */ ( - jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.ConnectionEnd, 2)); -}; - - -/** - * @param {?proto.ibc.core.connection.v1.ConnectionEnd|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.ConnectionStateData} returns this -*/ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.setConnection = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.ConnectionStateData} returns this - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.clearConnection = function() { - return this.setConnection(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.ConnectionStateData.prototype.hasConnection = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.ChannelStateData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.ChannelStateData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.toObject = function(includeInstance, msg) { - var f, obj = { - path: msg.getPath_asB64(), - channel: (f = msg.getChannel()) && ibc_core_channel_v1_channel_pb.Channel.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.ChannelStateData} - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.ChannelStateData; - return proto.ibc.lightclients.solomachine.v1.ChannelStateData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.ChannelStateData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.ChannelStateData} - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPath(value); - break; - case 2: - var value = new ibc_core_channel_v1_channel_pb.Channel; - reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.ChannelStateData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.ChannelStateData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPath_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 2, - f, - ibc_core_channel_v1_channel_pb.Channel.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes path = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.getPath = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes path = 1; - * This is a type-conversion wrapper around `getPath()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.getPath_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPath())); -}; - - -/** - * optional bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPath()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.getPath_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPath())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.ChannelStateData} returns this - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.setPath = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional ibc.core.channel.v1.Channel channel = 2; - * @return {?proto.ibc.core.channel.v1.Channel} - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.getChannel = function() { - return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( - jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 2)); -}; - - -/** - * @param {?proto.ibc.core.channel.v1.Channel|undefined} value - * @return {!proto.ibc.lightclients.solomachine.v1.ChannelStateData} returns this -*/ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ibc.lightclients.solomachine.v1.ChannelStateData} returns this - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.clearChannel = function() { - return this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ibc.lightclients.solomachine.v1.ChannelStateData.prototype.hasChannel = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.PacketCommitmentData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.toObject = function(includeInstance, msg) { - var f, obj = { - path: msg.getPath_asB64(), - commitment: msg.getCommitment_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.PacketCommitmentData} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.PacketCommitmentData; - return proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.PacketCommitmentData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.PacketCommitmentData} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPath(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCommitment(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.PacketCommitmentData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPath_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getCommitment_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes path = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.getPath = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes path = 1; - * This is a type-conversion wrapper around `getPath()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.getPath_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPath())); -}; - - -/** - * optional bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPath()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.getPath_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPath())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.PacketCommitmentData} returns this - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.setPath = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes commitment = 2; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.getCommitment = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes commitment = 2; - * This is a type-conversion wrapper around `getCommitment()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.getCommitment_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCommitment())); -}; - - -/** - * optional bytes commitment = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCommitment()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.getCommitment_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCommitment())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.PacketCommitmentData} returns this - */ -proto.ibc.lightclients.solomachine.v1.PacketCommitmentData.prototype.setCommitment = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.toObject = function(includeInstance, msg) { - var f, obj = { - path: msg.getPath_asB64(), - acknowledgement: msg.getAcknowledgement_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData; - return proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPath(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAcknowledgement(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPath_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAcknowledgement_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes path = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.getPath = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes path = 1; - * This is a type-conversion wrapper around `getPath()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.getPath_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPath())); -}; - - -/** - * optional bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPath()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.getPath_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPath())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData} returns this - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.setPath = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes acknowledgement = 2; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.getAcknowledgement = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes acknowledgement = 2; - * This is a type-conversion wrapper around `getAcknowledgement()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.getAcknowledgement_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAcknowledgement())); -}; - - -/** - * optional bytes acknowledgement = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAcknowledgement()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.getAcknowledgement_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAcknowledgement())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData} returns this - */ -proto.ibc.lightclients.solomachine.v1.PacketAcknowledgementData.prototype.setAcknowledgement = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.toObject = function(includeInstance, msg) { - var f, obj = { - path: msg.getPath_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData} - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData; - return proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData} - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPath_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes path = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.prototype.getPath = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes path = 1; - * This is a type-conversion wrapper around `getPath()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.prototype.getPath_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPath())); -}; - - -/** - * optional bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPath()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.prototype.getPath_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPath())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData} returns this - */ -proto.ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData.prototype.setPath = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.prototype.toObject = function(opt_includeInstance) { - return proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.toObject = function(includeInstance, msg) { - var f, obj = { - path: msg.getPath_asB64(), - nextSeqRecv: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData} - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData; - return proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData} - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPath(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNextSeqRecv(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPath_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNextSeqRecv(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional bytes path = 1; - * @return {!(string|Uint8Array)} - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.prototype.getPath = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes path = 1; - * This is a type-conversion wrapper around `getPath()` - * @return {string} - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.prototype.getPath_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPath())); -}; - - -/** - * optional bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPath()` - * @return {!Uint8Array} - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.prototype.getPath_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPath())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData} returns this - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.prototype.setPath = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint64 next_seq_recv = 2; - * @return {number} - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.prototype.getNextSeqRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData} returns this - */ -proto.ibc.lightclients.solomachine.v1.NextSequenceRecvData.prototype.setNextSeqRecv = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * @enum {number} - */ -proto.ibc.lightclients.solomachine.v1.DataType = { - DATA_TYPE_UNINITIALIZED_UNSPECIFIED: 0, - DATA_TYPE_CLIENT_STATE: 1, - DATA_TYPE_CONSENSUS_STATE: 2, - DATA_TYPE_CONNECTION_STATE: 3, - DATA_TYPE_CHANNEL_STATE: 4, - DATA_TYPE_PACKET_COMMITMENT: 5, - DATA_TYPE_PACKET_ACKNOWLEDGEMENT: 6, - DATA_TYPE_PACKET_RECEIPT_ABSENCE: 7, - DATA_TYPE_NEXT_SEQUENCE_RECV: 8, - DATA_TYPE_HEADER: 9 -}; - -goog.object.extend(exports, proto.ibc.lightclients.solomachine.v1); diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine_pb_service.d.ts b/proto/ibc/lightclients/solomachine/v1/solomachine_pb_service.d.ts deleted file mode 100644 index 6ecd98f..0000000 --- a/proto/ibc/lightclients/solomachine/v1/solomachine_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: ibc.lightclients.solomachine.v1 -// file: ibc/lightclients/solomachine/v1/solomachine.proto - diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine_pb_service.js b/proto/ibc/lightclients/solomachine/v1/solomachine_pb_service.js deleted file mode 100644 index 6ecd98f..0000000 --- a/proto/ibc/lightclients/solomachine/v1/solomachine_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: ibc.lightclients.solomachine.v1 -// file: ibc/lightclients/solomachine/v1/solomachine.proto - diff --git a/proto/oracle/v1/genesis_pb.d.ts b/proto/oracle/v1/genesis_pb.d.ts deleted file mode 100644 index f24a9b7..0000000 --- a/proto/oracle/v1/genesis_pb.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/genesis.proto - -import * as jspb from 'google-protobuf' -import * as gogoproto_gogo_pb from '../../gogoproto/gogo_pb' -import * as oracle_v1_oracle_pb from '../../oracle/v1/oracle_pb' - -export class GenesisState extends jspb.Message { - hasParams(): boolean - clearParams(): void - getParams(): oracle_v1_oracle_pb.Params | undefined - setParams(value?: oracle_v1_oracle_pb.Params): void - - clearDataSourcesList(): void - getDataSourcesList(): Array - setDataSourcesList(value: Array): void - addDataSources( - value?: oracle_v1_oracle_pb.DataSource, - index?: number, - ): oracle_v1_oracle_pb.DataSource - - clearOracleScriptsList(): void - getOracleScriptsList(): Array - setOracleScriptsList(value: Array): void - addOracleScripts( - value?: oracle_v1_oracle_pb.OracleScript, - index?: number, - ): oracle_v1_oracle_pb.OracleScript - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): GenesisState.AsObject - static toObject( - includeInstance: boolean, - msg: GenesisState, - ): GenesisState.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: GenesisState, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): GenesisState - static deserializeBinaryFromReader( - message: GenesisState, - reader: jspb.BinaryReader, - ): GenesisState -} - -export namespace GenesisState { - export type AsObject = { - params?: oracle_v1_oracle_pb.Params.AsObject - dataSourcesList: Array - oracleScriptsList: Array - } -} diff --git a/proto/oracle/v1/genesis_pb.js b/proto/oracle/v1/genesis_pb.js deleted file mode 100644 index fc636df..0000000 --- a/proto/oracle/v1/genesis_pb.js +++ /dev/null @@ -1,358 +0,0 @@ -// source: oracle/v1/genesis.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf') -var goog = jspb -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - function () { - return this - }.call(null) || - Function('return this')() - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') -goog.object.extend(proto, gogoproto_gogo_pb) -var oracle_v1_oracle_pb = require('../../oracle/v1/oracle_pb.js') -goog.object.extend(proto, oracle_v1_oracle_pb) -goog.exportSymbol('proto.oracle.v1.GenesisState', null, global) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.GenesisState = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.GenesisState.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.GenesisState, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.GenesisState.displayName = 'proto.oracle.v1.GenesisState' -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.GenesisState.repeatedFields_ = [2, 3] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.GenesisState.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.GenesisState.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.GenesisState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.GenesisState.toObject = function (includeInstance, msg) { - var f, - obj = { - params: - (f = msg.getParams()) && - oracle_v1_oracle_pb.Params.toObject(includeInstance, f), - dataSourcesList: jspb.Message.toObjectList( - msg.getDataSourcesList(), - oracle_v1_oracle_pb.DataSource.toObject, - includeInstance, - ), - oracleScriptsList: jspb.Message.toObjectList( - msg.getOracleScriptsList(), - oracle_v1_oracle_pb.OracleScript.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.GenesisState} - */ -proto.oracle.v1.GenesisState.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.GenesisState() - return proto.oracle.v1.GenesisState.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.GenesisState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.GenesisState} - */ -proto.oracle.v1.GenesisState.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new oracle_v1_oracle_pb.Params() - reader.readMessage( - value, - oracle_v1_oracle_pb.Params.deserializeBinaryFromReader, - ) - msg.setParams(value) - break - case 2: - var value = new oracle_v1_oracle_pb.DataSource() - reader.readMessage( - value, - oracle_v1_oracle_pb.DataSource.deserializeBinaryFromReader, - ) - msg.addDataSources(value) - break - case 3: - var value = new oracle_v1_oracle_pb.OracleScript() - reader.readMessage( - value, - oracle_v1_oracle_pb.OracleScript.deserializeBinaryFromReader, - ) - msg.addOracleScripts(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.GenesisState.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.GenesisState.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.GenesisState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.GenesisState.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getParams() - if (f != null) { - writer.writeMessage( - 1, - f, - oracle_v1_oracle_pb.Params.serializeBinaryToWriter, - ) - } - f = message.getDataSourcesList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - oracle_v1_oracle_pb.DataSource.serializeBinaryToWriter, - ) - } - f = message.getOracleScriptsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - oracle_v1_oracle_pb.OracleScript.serializeBinaryToWriter, - ) - } -} - -/** - * optional Params params = 1; - * @return {?proto.oracle.v1.Params} - */ -proto.oracle.v1.GenesisState.prototype.getParams = function () { - return /** @type{?proto.oracle.v1.Params} */ ( - jspb.Message.getWrapperField(this, oracle_v1_oracle_pb.Params, 1) - ) -} - -/** - * @param {?proto.oracle.v1.Params|undefined} value - * @return {!proto.oracle.v1.GenesisState} returns this - */ -proto.oracle.v1.GenesisState.prototype.setParams = function (value) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.GenesisState} returns this - */ -proto.oracle.v1.GenesisState.prototype.clearParams = function () { - return this.setParams(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.GenesisState.prototype.hasParams = function () { - return jspb.Message.getField(this, 1) != null -} - -/** - * repeated DataSource data_sources = 2; - * @return {!Array} - */ -proto.oracle.v1.GenesisState.prototype.getDataSourcesList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - oracle_v1_oracle_pb.DataSource, - 2, - ) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.GenesisState} returns this - */ -proto.oracle.v1.GenesisState.prototype.setDataSourcesList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value) -} - -/** - * @param {!proto.oracle.v1.DataSource=} opt_value - * @param {number=} opt_index - * @return {!proto.oracle.v1.DataSource} - */ -proto.oracle.v1.GenesisState.prototype.addDataSources = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.oracle.v1.DataSource, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.GenesisState} returns this - */ -proto.oracle.v1.GenesisState.prototype.clearDataSourcesList = function () { - return this.setDataSourcesList([]) -} - -/** - * repeated OracleScript oracle_scripts = 3; - * @return {!Array} - */ -proto.oracle.v1.GenesisState.prototype.getOracleScriptsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - oracle_v1_oracle_pb.OracleScript, - 3, - ) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.GenesisState} returns this - */ -proto.oracle.v1.GenesisState.prototype.setOracleScriptsList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value) -} - -/** - * @param {!proto.oracle.v1.OracleScript=} opt_value - * @param {number=} opt_index - * @return {!proto.oracle.v1.OracleScript} - */ -proto.oracle.v1.GenesisState.prototype.addOracleScripts = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 3, - opt_value, - proto.oracle.v1.OracleScript, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.GenesisState} returns this - */ -proto.oracle.v1.GenesisState.prototype.clearOracleScriptsList = function () { - return this.setOracleScriptsList([]) -} - -goog.object.extend(exports, proto.oracle.v1) diff --git a/proto/oracle/v1/genesis_pb_service.d.ts b/proto/oracle/v1/genesis_pb_service.d.ts deleted file mode 100644 index 76a0b35..0000000 --- a/proto/oracle/v1/genesis_pb_service.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/genesis.proto diff --git a/proto/oracle/v1/genesis_pb_service.js b/proto/oracle/v1/genesis_pb_service.js deleted file mode 100644 index 76a0b35..0000000 --- a/proto/oracle/v1/genesis_pb_service.js +++ /dev/null @@ -1,2 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/genesis.proto diff --git a/proto/oracle/v1/oracle_pb.d.ts b/proto/oracle/v1/oracle_pb.d.ts deleted file mode 100644 index 40fcce8..0000000 --- a/proto/oracle/v1/oracle_pb.d.ts +++ /dev/null @@ -1,844 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/oracle.proto - -import * as jspb from 'google-protobuf' -import * as gogoproto_gogo_pb from '../../gogoproto/gogo_pb' -import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb' -import * as cosmos_base_v1beta1_coin_pb from '../../cosmos/base/v1beta1/coin_pb' - -export class DataSource extends jspb.Message { - getOwner(): string - setOwner(value: string): void - - getName(): string - setName(value: string): void - - getDescription(): string - setDescription(value: string): void - - getFilename(): string - setFilename(value: string): void - - getTreasury(): string - setTreasury(value: string): void - - clearFeeList(): void - getFeeList(): Array - setFeeList(value: Array): void - addFee( - value?: cosmos_base_v1beta1_coin_pb.Coin, - index?: number, - ): cosmos_base_v1beta1_coin_pb.Coin - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): DataSource.AsObject - static toObject( - includeInstance: boolean, - msg: DataSource, - ): DataSource.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: DataSource, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): DataSource - static deserializeBinaryFromReader( - message: DataSource, - reader: jspb.BinaryReader, - ): DataSource -} - -export namespace DataSource { - export type AsObject = { - owner: string - name: string - description: string - filename: string - treasury: string - feeList: Array - } -} - -export class OracleScript extends jspb.Message { - getOwner(): string - setOwner(value: string): void - - getName(): string - setName(value: string): void - - getDescription(): string - setDescription(value: string): void - - getFilename(): string - setFilename(value: string): void - - getSchema(): string - setSchema(value: string): void - - getSourceCodeUrl(): string - setSourceCodeUrl(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): OracleScript.AsObject - static toObject( - includeInstance: boolean, - msg: OracleScript, - ): OracleScript.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: OracleScript, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): OracleScript - static deserializeBinaryFromReader( - message: OracleScript, - reader: jspb.BinaryReader, - ): OracleScript -} - -export namespace OracleScript { - export type AsObject = { - owner: string - name: string - description: string - filename: string - schema: string - sourceCodeUrl: string - } -} - -export class RawRequest extends jspb.Message { - getExternalId(): number - setExternalId(value: number): void - - getDataSourceId(): number - setDataSourceId(value: number): void - - getCalldata(): Uint8Array | string - getCalldata_asU8(): Uint8Array - getCalldata_asB64(): string - setCalldata(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): RawRequest.AsObject - static toObject( - includeInstance: boolean, - msg: RawRequest, - ): RawRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: RawRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): RawRequest - static deserializeBinaryFromReader( - message: RawRequest, - reader: jspb.BinaryReader, - ): RawRequest -} - -export namespace RawRequest { - export type AsObject = { - externalId: number - dataSourceId: number - calldata: Uint8Array | string - } -} - -export class RawReport extends jspb.Message { - getExternalId(): number - setExternalId(value: number): void - - getExitCode(): number - setExitCode(value: number): void - - getData(): Uint8Array | string - getData_asU8(): Uint8Array - getData_asB64(): string - setData(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): RawReport.AsObject - static toObject(includeInstance: boolean, msg: RawReport): RawReport.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: RawReport, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): RawReport - static deserializeBinaryFromReader( - message: RawReport, - reader: jspb.BinaryReader, - ): RawReport -} - -export namespace RawReport { - export type AsObject = { - externalId: number - exitCode: number - data: Uint8Array | string - } -} - -export class Request extends jspb.Message { - getOracleScriptId(): number - setOracleScriptId(value: number): void - - getCalldata(): Uint8Array | string - getCalldata_asU8(): Uint8Array - getCalldata_asB64(): string - setCalldata(value: Uint8Array | string): void - - clearRequestedValidatorsList(): void - getRequestedValidatorsList(): Array - setRequestedValidatorsList(value: Array): void - addRequestedValidators(value: string, index?: number): string - - getMinCount(): number - setMinCount(value: number): void - - getRequestHeight(): number - setRequestHeight(value: number): void - - getRequestTime(): number - setRequestTime(value: number): void - - getClientId(): string - setClientId(value: string): void - - clearRawRequestsList(): void - getRawRequestsList(): Array - setRawRequestsList(value: Array): void - addRawRequests(value?: RawRequest, index?: number): RawRequest - - hasIbcChannel(): boolean - clearIbcChannel(): void - getIbcChannel(): IBCChannel | undefined - setIbcChannel(value?: IBCChannel): void - - getExecuteGas(): number - setExecuteGas(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): Request.AsObject - static toObject(includeInstance: boolean, msg: Request): Request.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: Request, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): Request - static deserializeBinaryFromReader( - message: Request, - reader: jspb.BinaryReader, - ): Request -} - -export namespace Request { - export type AsObject = { - oracleScriptId: number - calldata: Uint8Array | string - requestedValidatorsList: Array - minCount: number - requestHeight: number - requestTime: number - clientId: string - rawRequestsList: Array - ibcChannel?: IBCChannel.AsObject - executeGas: number - } -} - -export class Report extends jspb.Message { - getValidator(): string - setValidator(value: string): void - - getInBeforeResolve(): boolean - setInBeforeResolve(value: boolean): void - - clearRawReportsList(): void - getRawReportsList(): Array - setRawReportsList(value: Array): void - addRawReports(value?: RawReport, index?: number): RawReport - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): Report.AsObject - static toObject(includeInstance: boolean, msg: Report): Report.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: Report, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): Report - static deserializeBinaryFromReader( - message: Report, - reader: jspb.BinaryReader, - ): Report -} - -export namespace Report { - export type AsObject = { - validator: string - inBeforeResolve: boolean - rawReportsList: Array - } -} - -export class OracleRequestPacketData extends jspb.Message { - getClientId(): string - setClientId(value: string): void - - getOracleScriptId(): number - setOracleScriptId(value: number): void - - getCalldata(): Uint8Array | string - getCalldata_asU8(): Uint8Array - getCalldata_asB64(): string - setCalldata(value: Uint8Array | string): void - - getAskCount(): number - setAskCount(value: number): void - - getMinCount(): number - setMinCount(value: number): void - - clearFeeLimitList(): void - getFeeLimitList(): Array - setFeeLimitList(value: Array): void - addFeeLimit( - value?: cosmos_base_v1beta1_coin_pb.Coin, - index?: number, - ): cosmos_base_v1beta1_coin_pb.Coin - - getPrepareGas(): number - setPrepareGas(value: number): void - - getExecuteGas(): number - setExecuteGas(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): OracleRequestPacketData.AsObject - static toObject( - includeInstance: boolean, - msg: OracleRequestPacketData, - ): OracleRequestPacketData.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: OracleRequestPacketData, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): OracleRequestPacketData - static deserializeBinaryFromReader( - message: OracleRequestPacketData, - reader: jspb.BinaryReader, - ): OracleRequestPacketData -} - -export namespace OracleRequestPacketData { - export type AsObject = { - clientId: string - oracleScriptId: number - calldata: Uint8Array | string - askCount: number - minCount: number - feeLimitList: Array - prepareGas: number - executeGas: number - } -} - -export class OracleRequestPacketAcknowledgement extends jspb.Message { - getRequestId(): number - setRequestId(value: number): void - - serializeBinary(): Uint8Array - toObject( - includeInstance?: boolean, - ): OracleRequestPacketAcknowledgement.AsObject - static toObject( - includeInstance: boolean, - msg: OracleRequestPacketAcknowledgement, - ): OracleRequestPacketAcknowledgement.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: OracleRequestPacketAcknowledgement, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary( - bytes: Uint8Array, - ): OracleRequestPacketAcknowledgement - static deserializeBinaryFromReader( - message: OracleRequestPacketAcknowledgement, - reader: jspb.BinaryReader, - ): OracleRequestPacketAcknowledgement -} - -export namespace OracleRequestPacketAcknowledgement { - export type AsObject = { - requestId: number - } -} - -export class OracleResponsePacketData extends jspb.Message { - getClientId(): string - setClientId(value: string): void - - getRequestId(): number - setRequestId(value: number): void - - getAnsCount(): number - setAnsCount(value: number): void - - getRequestTime(): number - setRequestTime(value: number): void - - getResolveTime(): number - setResolveTime(value: number): void - - getResolveStatus(): ResolveStatusMap[keyof ResolveStatusMap] - setResolveStatus(value: ResolveStatusMap[keyof ResolveStatusMap]): void - - getResult(): Uint8Array | string - getResult_asU8(): Uint8Array - getResult_asB64(): string - setResult(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): OracleResponsePacketData.AsObject - static toObject( - includeInstance: boolean, - msg: OracleResponsePacketData, - ): OracleResponsePacketData.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: OracleResponsePacketData, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): OracleResponsePacketData - static deserializeBinaryFromReader( - message: OracleResponsePacketData, - reader: jspb.BinaryReader, - ): OracleResponsePacketData -} - -export namespace OracleResponsePacketData { - export type AsObject = { - clientId: string - requestId: number - ansCount: number - requestTime: number - resolveTime: number - resolveStatus: ResolveStatusMap[keyof ResolveStatusMap] - result: Uint8Array | string - } -} - -export class Result extends jspb.Message { - getClientId(): string - setClientId(value: string): void - - getOracleScriptId(): number - setOracleScriptId(value: number): void - - getCalldata(): Uint8Array | string - getCalldata_asU8(): Uint8Array - getCalldata_asB64(): string - setCalldata(value: Uint8Array | string): void - - getAskCount(): number - setAskCount(value: number): void - - getMinCount(): number - setMinCount(value: number): void - - getRequestId(): number - setRequestId(value: number): void - - getAnsCount(): number - setAnsCount(value: number): void - - getRequestTime(): number - setRequestTime(value: number): void - - getResolveTime(): number - setResolveTime(value: number): void - - getResolveStatus(): ResolveStatusMap[keyof ResolveStatusMap] - setResolveStatus(value: ResolveStatusMap[keyof ResolveStatusMap]): void - - getResult(): Uint8Array | string - getResult_asU8(): Uint8Array - getResult_asB64(): string - setResult(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): Result.AsObject - static toObject(includeInstance: boolean, msg: Result): Result.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: Result, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): Result - static deserializeBinaryFromReader( - message: Result, - reader: jspb.BinaryReader, - ): Result -} - -export namespace Result { - export type AsObject = { - clientId: string - oracleScriptId: number - calldata: Uint8Array | string - askCount: number - minCount: number - requestId: number - ansCount: number - requestTime: number - resolveTime: number - resolveStatus: ResolveStatusMap[keyof ResolveStatusMap] - result: Uint8Array | string - } -} - -export class ValidatorStatus extends jspb.Message { - getIsActive(): boolean - setIsActive(value: boolean): void - - hasSince(): boolean - clearSince(): void - getSince(): google_protobuf_timestamp_pb.Timestamp | undefined - setSince(value?: google_protobuf_timestamp_pb.Timestamp): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): ValidatorStatus.AsObject - static toObject( - includeInstance: boolean, - msg: ValidatorStatus, - ): ValidatorStatus.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: ValidatorStatus, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): ValidatorStatus - static deserializeBinaryFromReader( - message: ValidatorStatus, - reader: jspb.BinaryReader, - ): ValidatorStatus -} - -export namespace ValidatorStatus { - export type AsObject = { - isActive: boolean - since?: google_protobuf_timestamp_pb.Timestamp.AsObject - } -} - -export class ActiveValidator extends jspb.Message { - getAddress(): string - setAddress(value: string): void - - getPower(): number - setPower(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): ActiveValidator.AsObject - static toObject( - includeInstance: boolean, - msg: ActiveValidator, - ): ActiveValidator.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: ActiveValidator, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): ActiveValidator - static deserializeBinaryFromReader( - message: ActiveValidator, - reader: jspb.BinaryReader, - ): ActiveValidator -} - -export namespace ActiveValidator { - export type AsObject = { - address: string - power: number - } -} - -export class Params extends jspb.Message { - getMaxRawRequestCount(): number - setMaxRawRequestCount(value: number): void - - getMaxAskCount(): number - setMaxAskCount(value: number): void - - getMaxCalldataSize(): number - setMaxCalldataSize(value: number): void - - getMaxReportDataSize(): number - setMaxReportDataSize(value: number): void - - getExpirationBlockCount(): number - setExpirationBlockCount(value: number): void - - getBaseOwasmGas(): number - setBaseOwasmGas(value: number): void - - getPerValidatorRequestGas(): number - setPerValidatorRequestGas(value: number): void - - getSamplingTryCount(): number - setSamplingTryCount(value: number): void - - getOracleRewardPercentage(): number - setOracleRewardPercentage(value: number): void - - getInactivePenaltyDuration(): number - setInactivePenaltyDuration(value: number): void - - getIbcRequestEnabled(): boolean - setIbcRequestEnabled(value: boolean): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): Params.AsObject - static toObject(includeInstance: boolean, msg: Params): Params.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: Params, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): Params - static deserializeBinaryFromReader( - message: Params, - reader: jspb.BinaryReader, - ): Params -} - -export namespace Params { - export type AsObject = { - maxRawRequestCount: number - maxAskCount: number - maxCalldataSize: number - maxReportDataSize: number - expirationBlockCount: number - baseOwasmGas: number - perValidatorRequestGas: number - samplingTryCount: number - oracleRewardPercentage: number - inactivePenaltyDuration: number - ibcRequestEnabled: boolean - } -} - -export class PendingResolveList extends jspb.Message { - clearRequestIdsList(): void - getRequestIdsList(): Array - setRequestIdsList(value: Array): void - addRequestIds(value: number, index?: number): number - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): PendingResolveList.AsObject - static toObject( - includeInstance: boolean, - msg: PendingResolveList, - ): PendingResolveList.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: PendingResolveList, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): PendingResolveList - static deserializeBinaryFromReader( - message: PendingResolveList, - reader: jspb.BinaryReader, - ): PendingResolveList -} - -export namespace PendingResolveList { - export type AsObject = { - requestIdsList: Array - } -} - -export class IBCChannel extends jspb.Message { - getPortId(): string - setPortId(value: string): void - - getChannelId(): string - setChannelId(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): IBCChannel.AsObject - static toObject( - includeInstance: boolean, - msg: IBCChannel, - ): IBCChannel.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: IBCChannel, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): IBCChannel - static deserializeBinaryFromReader( - message: IBCChannel, - reader: jspb.BinaryReader, - ): IBCChannel -} - -export namespace IBCChannel { - export type AsObject = { - portId: string - channelId: string - } -} - -export class RequestVerification extends jspb.Message { - getChainId(): string - setChainId(value: string): void - - getValidator(): string - setValidator(value: string): void - - getRequestId(): number - setRequestId(value: number): void - - getExternalId(): number - setExternalId(value: number): void - - getDataSourceId(): number - setDataSourceId(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): RequestVerification.AsObject - static toObject( - includeInstance: boolean, - msg: RequestVerification, - ): RequestVerification.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: RequestVerification, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): RequestVerification - static deserializeBinaryFromReader( - message: RequestVerification, - reader: jspb.BinaryReader, - ): RequestVerification -} - -export namespace RequestVerification { - export type AsObject = { - chainId: string - validator: string - requestId: number - externalId: number - dataSourceId: number - } -} - -export class PriceResult extends jspb.Message { - getSymbol(): string - setSymbol(value: string): void - - getMultiplier(): number - setMultiplier(value: number): void - - getPx(): number - setPx(value: number): void - - getRequestId(): number - setRequestId(value: number): void - - getResolveTime(): number - setResolveTime(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): PriceResult.AsObject - static toObject( - includeInstance: boolean, - msg: PriceResult, - ): PriceResult.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: PriceResult, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): PriceResult - static deserializeBinaryFromReader( - message: PriceResult, - reader: jspb.BinaryReader, - ): PriceResult -} - -export namespace PriceResult { - export type AsObject = { - symbol: string - multiplier: number - px: number - requestId: number - resolveTime: number - } -} - -export interface ResolveStatusMap { - RESOLVE_STATUS_OPEN_UNSPECIFIED: 0 - RESOLVE_STATUS_SUCCESS: 1 - RESOLVE_STATUS_FAILURE: 2 - RESOLVE_STATUS_EXPIRED: 3 -} - -export const ResolveStatus: ResolveStatusMap diff --git a/proto/oracle/v1/oracle_pb.js b/proto/oracle/v1/oracle_pb.js deleted file mode 100644 index c79d3c6..0000000 --- a/proto/oracle/v1/oracle_pb.js +++ /dev/null @@ -1,4863 +0,0 @@ -// source: oracle/v1/oracle.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf') -var goog = jspb -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - function () { - return this - }.call(null) || - Function('return this')() - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') -goog.object.extend(proto, gogoproto_gogo_pb) -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') -goog.object.extend(proto, google_protobuf_timestamp_pb) -var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') -goog.object.extend(proto, cosmos_base_v1beta1_coin_pb) -goog.exportSymbol('proto.oracle.v1.ActiveValidator', null, global) -goog.exportSymbol('proto.oracle.v1.DataSource', null, global) -goog.exportSymbol('proto.oracle.v1.IBCChannel', null, global) -goog.exportSymbol( - 'proto.oracle.v1.OracleRequestPacketAcknowledgement', - null, - global, -) -goog.exportSymbol('proto.oracle.v1.OracleRequestPacketData', null, global) -goog.exportSymbol('proto.oracle.v1.OracleResponsePacketData', null, global) -goog.exportSymbol('proto.oracle.v1.OracleScript', null, global) -goog.exportSymbol('proto.oracle.v1.Params', null, global) -goog.exportSymbol('proto.oracle.v1.PendingResolveList', null, global) -goog.exportSymbol('proto.oracle.v1.PriceResult', null, global) -goog.exportSymbol('proto.oracle.v1.RawReport', null, global) -goog.exportSymbol('proto.oracle.v1.RawRequest', null, global) -goog.exportSymbol('proto.oracle.v1.Report', null, global) -goog.exportSymbol('proto.oracle.v1.Request', null, global) -goog.exportSymbol('proto.oracle.v1.RequestVerification', null, global) -goog.exportSymbol('proto.oracle.v1.ResolveStatus', null, global) -goog.exportSymbol('proto.oracle.v1.Result', null, global) -goog.exportSymbol('proto.oracle.v1.ValidatorStatus', null, global) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.DataSource = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.DataSource.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.DataSource, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.DataSource.displayName = 'proto.oracle.v1.DataSource' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.OracleScript = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.OracleScript, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.OracleScript.displayName = 'proto.oracle.v1.OracleScript' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.RawRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.RawRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.RawRequest.displayName = 'proto.oracle.v1.RawRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.RawReport = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.RawReport, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.RawReport.displayName = 'proto.oracle.v1.RawReport' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.Request = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.Request.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.Request, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.Request.displayName = 'proto.oracle.v1.Request' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.Report = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.Report.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.Report, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.Report.displayName = 'proto.oracle.v1.Report' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.OracleRequestPacketData = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.OracleRequestPacketData.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.OracleRequestPacketData, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.OracleRequestPacketData.displayName = - 'proto.oracle.v1.OracleRequestPacketData' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.OracleRequestPacketAcknowledgement = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.OracleRequestPacketAcknowledgement, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.OracleRequestPacketAcknowledgement.displayName = - 'proto.oracle.v1.OracleRequestPacketAcknowledgement' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.OracleResponsePacketData = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.OracleResponsePacketData, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.OracleResponsePacketData.displayName = - 'proto.oracle.v1.OracleResponsePacketData' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.Result = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.Result, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.Result.displayName = 'proto.oracle.v1.Result' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.ValidatorStatus = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.ValidatorStatus, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.ValidatorStatus.displayName = - 'proto.oracle.v1.ValidatorStatus' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.ActiveValidator = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.ActiveValidator, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.ActiveValidator.displayName = - 'proto.oracle.v1.ActiveValidator' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.Params = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.Params, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.Params.displayName = 'proto.oracle.v1.Params' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.PendingResolveList = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.PendingResolveList.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.PendingResolveList, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.PendingResolveList.displayName = - 'proto.oracle.v1.PendingResolveList' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.IBCChannel = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.IBCChannel, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.IBCChannel.displayName = 'proto.oracle.v1.IBCChannel' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.RequestVerification = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.RequestVerification, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.RequestVerification.displayName = - 'proto.oracle.v1.RequestVerification' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.PriceResult = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.PriceResult, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.PriceResult.displayName = 'proto.oracle.v1.PriceResult' -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.DataSource.repeatedFields_ = [6] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.DataSource.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.DataSource.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.DataSource} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.DataSource.toObject = function (includeInstance, msg) { - var f, - obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ''), - name: jspb.Message.getFieldWithDefault(msg, 2, ''), - description: jspb.Message.getFieldWithDefault(msg, 3, ''), - filename: jspb.Message.getFieldWithDefault(msg, 4, ''), - treasury: jspb.Message.getFieldWithDefault(msg, 5, ''), - feeList: jspb.Message.toObjectList( - msg.getFeeList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.DataSource} - */ -proto.oracle.v1.DataSource.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.DataSource() - return proto.oracle.v1.DataSource.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.DataSource} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.DataSource} - */ -proto.oracle.v1.DataSource.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setOwner(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setName(value) - break - case 3: - var value = /** @type {string} */ (reader.readString()) - msg.setDescription(value) - break - case 4: - var value = /** @type {string} */ (reader.readString()) - msg.setFilename(value) - break - case 5: - var value = /** @type {string} */ (reader.readString()) - msg.setTreasury(value) - break - case 6: - var value = new cosmos_base_v1beta1_coin_pb.Coin() - reader.readMessage( - value, - cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader, - ) - msg.addFee(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.DataSource.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.DataSource.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.DataSource} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.DataSource.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getOwner() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getName() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getDescription() - if (f.length > 0) { - writer.writeString(3, f) - } - f = message.getFilename() - if (f.length > 0) { - writer.writeString(4, f) - } - f = message.getTreasury() - if (f.length > 0) { - writer.writeString(5, f) - } - f = message.getFeeList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter, - ) - } -} - -/** - * optional string owner = 1; - * @return {string} - */ -proto.oracle.v1.DataSource.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.DataSource} returns this - */ -proto.oracle.v1.DataSource.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional string name = 2; - * @return {string} - */ -proto.oracle.v1.DataSource.prototype.getName = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.DataSource} returns this - */ -proto.oracle.v1.DataSource.prototype.setName = function (value) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -/** - * optional string description = 3; - * @return {string} - */ -proto.oracle.v1.DataSource.prototype.getDescription = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.DataSource} returns this - */ -proto.oracle.v1.DataSource.prototype.setDescription = function (value) { - return jspb.Message.setProto3StringField(this, 3, value) -} - -/** - * optional string filename = 4; - * @return {string} - */ -proto.oracle.v1.DataSource.prototype.getFilename = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.DataSource} returns this - */ -proto.oracle.v1.DataSource.prototype.setFilename = function (value) { - return jspb.Message.setProto3StringField(this, 4, value) -} - -/** - * optional string treasury = 5; - * @return {string} - */ -proto.oracle.v1.DataSource.prototype.getTreasury = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.DataSource} returns this - */ -proto.oracle.v1.DataSource.prototype.setTreasury = function (value) { - return jspb.Message.setProto3StringField(this, 5, value) -} - -/** - * repeated cosmos.base.v1beta1.Coin fee = 6; - * @return {!Array} - */ -proto.oracle.v1.DataSource.prototype.getFeeList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - cosmos_base_v1beta1_coin_pb.Coin, - 6, - ) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.DataSource} returns this - */ -proto.oracle.v1.DataSource.prototype.setFeeList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value) -} - -/** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} - */ -proto.oracle.v1.DataSource.prototype.addFee = function (opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 6, - opt_value, - proto.cosmos.base.v1beta1.Coin, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.DataSource} returns this - */ -proto.oracle.v1.DataSource.prototype.clearFeeList = function () { - return this.setFeeList([]) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.OracleScript.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.OracleScript.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.OracleScript} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.OracleScript.toObject = function (includeInstance, msg) { - var f, - obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ''), - name: jspb.Message.getFieldWithDefault(msg, 2, ''), - description: jspb.Message.getFieldWithDefault(msg, 3, ''), - filename: jspb.Message.getFieldWithDefault(msg, 4, ''), - schema: jspb.Message.getFieldWithDefault(msg, 5, ''), - sourceCodeUrl: jspb.Message.getFieldWithDefault(msg, 6, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.OracleScript} - */ -proto.oracle.v1.OracleScript.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.OracleScript() - return proto.oracle.v1.OracleScript.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.OracleScript} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.OracleScript} - */ -proto.oracle.v1.OracleScript.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setOwner(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setName(value) - break - case 3: - var value = /** @type {string} */ (reader.readString()) - msg.setDescription(value) - break - case 4: - var value = /** @type {string} */ (reader.readString()) - msg.setFilename(value) - break - case 5: - var value = /** @type {string} */ (reader.readString()) - msg.setSchema(value) - break - case 6: - var value = /** @type {string} */ (reader.readString()) - msg.setSourceCodeUrl(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.OracleScript.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.OracleScript.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.OracleScript} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.OracleScript.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getOwner() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getName() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getDescription() - if (f.length > 0) { - writer.writeString(3, f) - } - f = message.getFilename() - if (f.length > 0) { - writer.writeString(4, f) - } - f = message.getSchema() - if (f.length > 0) { - writer.writeString(5, f) - } - f = message.getSourceCodeUrl() - if (f.length > 0) { - writer.writeString(6, f) - } -} - -/** - * optional string owner = 1; - * @return {string} - */ -proto.oracle.v1.OracleScript.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.OracleScript} returns this - */ -proto.oracle.v1.OracleScript.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional string name = 2; - * @return {string} - */ -proto.oracle.v1.OracleScript.prototype.getName = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.OracleScript} returns this - */ -proto.oracle.v1.OracleScript.prototype.setName = function (value) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -/** - * optional string description = 3; - * @return {string} - */ -proto.oracle.v1.OracleScript.prototype.getDescription = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.OracleScript} returns this - */ -proto.oracle.v1.OracleScript.prototype.setDescription = function (value) { - return jspb.Message.setProto3StringField(this, 3, value) -} - -/** - * optional string filename = 4; - * @return {string} - */ -proto.oracle.v1.OracleScript.prototype.getFilename = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.OracleScript} returns this - */ -proto.oracle.v1.OracleScript.prototype.setFilename = function (value) { - return jspb.Message.setProto3StringField(this, 4, value) -} - -/** - * optional string schema = 5; - * @return {string} - */ -proto.oracle.v1.OracleScript.prototype.getSchema = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.OracleScript} returns this - */ -proto.oracle.v1.OracleScript.prototype.setSchema = function (value) { - return jspb.Message.setProto3StringField(this, 5, value) -} - -/** - * optional string source_code_url = 6; - * @return {string} - */ -proto.oracle.v1.OracleScript.prototype.getSourceCodeUrl = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.OracleScript} returns this - */ -proto.oracle.v1.OracleScript.prototype.setSourceCodeUrl = function (value) { - return jspb.Message.setProto3StringField(this, 6, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.RawRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.RawRequest.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.RawRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.RawRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - externalId: jspb.Message.getFieldWithDefault(msg, 1, 0), - dataSourceId: jspb.Message.getFieldWithDefault(msg, 2, 0), - calldata: msg.getCalldata_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.RawRequest} - */ -proto.oracle.v1.RawRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.RawRequest() - return proto.oracle.v1.RawRequest.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.RawRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.RawRequest} - */ -proto.oracle.v1.RawRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setExternalId(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setDataSourceId(value) - break - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setCalldata(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.RawRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.RawRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.RawRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.RawRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getExternalId() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getDataSourceId() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getCalldata_asU8() - if (f.length > 0) { - writer.writeBytes(3, f) - } -} - -/** - * optional uint64 external_id = 1; - * @return {number} - */ -proto.oracle.v1.RawRequest.prototype.getExternalId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.RawRequest} returns this - */ -proto.oracle.v1.RawRequest.prototype.setExternalId = function (value) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional uint64 data_source_id = 2; - * @return {number} - */ -proto.oracle.v1.RawRequest.prototype.getDataSourceId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.RawRequest} returns this - */ -proto.oracle.v1.RawRequest.prototype.setDataSourceId = function (value) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional bytes calldata = 3; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.RawRequest.prototype.getCalldata = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 3, '') - ) -} - -/** - * optional bytes calldata = 3; - * This is a type-conversion wrapper around `getCalldata()` - * @return {string} - */ -proto.oracle.v1.RawRequest.prototype.getCalldata_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getCalldata())) -} - -/** - * optional bytes calldata = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCalldata()` - * @return {!Uint8Array} - */ -proto.oracle.v1.RawRequest.prototype.getCalldata_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getCalldata())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.RawRequest} returns this - */ -proto.oracle.v1.RawRequest.prototype.setCalldata = function (value) { - return jspb.Message.setProto3BytesField(this, 3, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.RawReport.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.RawReport.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.RawReport} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.RawReport.toObject = function (includeInstance, msg) { - var f, - obj = { - externalId: jspb.Message.getFieldWithDefault(msg, 1, 0), - exitCode: jspb.Message.getFieldWithDefault(msg, 2, 0), - data: msg.getData_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.RawReport} - */ -proto.oracle.v1.RawReport.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.RawReport() - return proto.oracle.v1.RawReport.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.RawReport} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.RawReport} - */ -proto.oracle.v1.RawReport.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setExternalId(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint32()) - msg.setExitCode(value) - break - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setData(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.RawReport.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.RawReport.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.RawReport} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.RawReport.serializeBinaryToWriter = function (message, writer) { - var f = undefined - f = message.getExternalId() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getExitCode() - if (f !== 0) { - writer.writeUint32(2, f) - } - f = message.getData_asU8() - if (f.length > 0) { - writer.writeBytes(3, f) - } -} - -/** - * optional uint64 external_id = 1; - * @return {number} - */ -proto.oracle.v1.RawReport.prototype.getExternalId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.RawReport} returns this - */ -proto.oracle.v1.RawReport.prototype.setExternalId = function (value) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional uint32 exit_code = 2; - * @return {number} - */ -proto.oracle.v1.RawReport.prototype.getExitCode = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.RawReport} returns this - */ -proto.oracle.v1.RawReport.prototype.setExitCode = function (value) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional bytes data = 3; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.RawReport.prototype.getData = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 3, '') - ) -} - -/** - * optional bytes data = 3; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.oracle.v1.RawReport.prototype.getData_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData())) -} - -/** - * optional bytes data = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.oracle.v1.RawReport.prototype.getData_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.RawReport} returns this - */ -proto.oracle.v1.RawReport.prototype.setData = function (value) { - return jspb.Message.setProto3BytesField(this, 3, value) -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.Request.repeatedFields_ = [3, 8] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.Request.prototype.toObject = function (opt_includeInstance) { - return proto.oracle.v1.Request.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.Request} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.Request.toObject = function (includeInstance, msg) { - var f, - obj = { - oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), - calldata: msg.getCalldata_asB64(), - requestedValidatorsList: - (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, - minCount: jspb.Message.getFieldWithDefault(msg, 4, 0), - requestHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - requestTime: jspb.Message.getFieldWithDefault(msg, 6, 0), - clientId: jspb.Message.getFieldWithDefault(msg, 7, ''), - rawRequestsList: jspb.Message.toObjectList( - msg.getRawRequestsList(), - proto.oracle.v1.RawRequest.toObject, - includeInstance, - ), - ibcChannel: - (f = msg.getIbcChannel()) && - proto.oracle.v1.IBCChannel.toObject(includeInstance, f), - executeGas: jspb.Message.getFieldWithDefault(msg, 10, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.Request} - */ -proto.oracle.v1.Request.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.Request() - return proto.oracle.v1.Request.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.Request} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.Request} - */ -proto.oracle.v1.Request.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setOracleScriptId(value) - break - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setCalldata(value) - break - case 3: - var value = /** @type {string} */ (reader.readString()) - msg.addRequestedValidators(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMinCount(value) - break - case 5: - var value = /** @type {number} */ (reader.readInt64()) - msg.setRequestHeight(value) - break - case 6: - var value = /** @type {number} */ (reader.readInt64()) - msg.setRequestTime(value) - break - case 7: - var value = /** @type {string} */ (reader.readString()) - msg.setClientId(value) - break - case 8: - var value = new proto.oracle.v1.RawRequest() - reader.readMessage( - value, - proto.oracle.v1.RawRequest.deserializeBinaryFromReader, - ) - msg.addRawRequests(value) - break - case 9: - var value = new proto.oracle.v1.IBCChannel() - reader.readMessage( - value, - proto.oracle.v1.IBCChannel.deserializeBinaryFromReader, - ) - msg.setIbcChannel(value) - break - case 10: - var value = /** @type {number} */ (reader.readUint64()) - msg.setExecuteGas(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.Request.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.Request.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.Request} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.Request.serializeBinaryToWriter = function (message, writer) { - var f = undefined - f = message.getOracleScriptId() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getCalldata_asU8() - if (f.length > 0) { - writer.writeBytes(2, f) - } - f = message.getRequestedValidatorsList() - if (f.length > 0) { - writer.writeRepeatedString(3, f) - } - f = message.getMinCount() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getRequestHeight() - if (f !== 0) { - writer.writeInt64(5, f) - } - f = message.getRequestTime() - if (f !== 0) { - writer.writeInt64(6, f) - } - f = message.getClientId() - if (f.length > 0) { - writer.writeString(7, f) - } - f = message.getRawRequestsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - proto.oracle.v1.RawRequest.serializeBinaryToWriter, - ) - } - f = message.getIbcChannel() - if (f != null) { - writer.writeMessage( - 9, - f, - proto.oracle.v1.IBCChannel.serializeBinaryToWriter, - ) - } - f = message.getExecuteGas() - if (f !== 0) { - writer.writeUint64(10, f) - } -} - -/** - * optional uint64 oracle_script_id = 1; - * @return {number} - */ -proto.oracle.v1.Request.prototype.getOracleScriptId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setOracleScriptId = function (value) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional bytes calldata = 2; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.Request.prototype.getCalldata = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 2, '') - ) -} - -/** - * optional bytes calldata = 2; - * This is a type-conversion wrapper around `getCalldata()` - * @return {string} - */ -proto.oracle.v1.Request.prototype.getCalldata_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getCalldata())) -} - -/** - * optional bytes calldata = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCalldata()` - * @return {!Uint8Array} - */ -proto.oracle.v1.Request.prototype.getCalldata_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getCalldata())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setCalldata = function (value) { - return jspb.Message.setProto3BytesField(this, 2, value) -} - -/** - * repeated string requested_validators = 3; - * @return {!Array} - */ -proto.oracle.v1.Request.prototype.getRequestedValidatorsList = function () { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setRequestedValidatorsList = function ( - value, -) { - return jspb.Message.setField(this, 3, value || []) -} - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.addRequestedValidators = function ( - value, - opt_index, -) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.clearRequestedValidatorsList = function () { - return this.setRequestedValidatorsList([]) -} - -/** - * optional uint64 min_count = 4; - * @return {number} - */ -proto.oracle.v1.Request.prototype.getMinCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setMinCount = function (value) { - return jspb.Message.setProto3IntField(this, 4, value) -} - -/** - * optional int64 request_height = 5; - * @return {number} - */ -proto.oracle.v1.Request.prototype.getRequestHeight = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setRequestHeight = function (value) { - return jspb.Message.setProto3IntField(this, 5, value) -} - -/** - * optional int64 request_time = 6; - * @return {number} - */ -proto.oracle.v1.Request.prototype.getRequestTime = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setRequestTime = function (value) { - return jspb.Message.setProto3IntField(this, 6, value) -} - -/** - * optional string client_id = 7; - * @return {string} - */ -proto.oracle.v1.Request.prototype.getClientId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setClientId = function (value) { - return jspb.Message.setProto3StringField(this, 7, value) -} - -/** - * repeated RawRequest raw_requests = 8; - * @return {!Array} - */ -proto.oracle.v1.Request.prototype.getRawRequestsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.oracle.v1.RawRequest, 8) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setRawRequestsList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value) -} - -/** - * @param {!proto.oracle.v1.RawRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.oracle.v1.RawRequest} - */ -proto.oracle.v1.Request.prototype.addRawRequests = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 8, - opt_value, - proto.oracle.v1.RawRequest, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.clearRawRequestsList = function () { - return this.setRawRequestsList([]) -} - -/** - * optional IBCChannel ibc_channel = 9; - * @return {?proto.oracle.v1.IBCChannel} - */ -proto.oracle.v1.Request.prototype.getIbcChannel = function () { - return /** @type{?proto.oracle.v1.IBCChannel} */ ( - jspb.Message.getWrapperField(this, proto.oracle.v1.IBCChannel, 9) - ) -} - -/** - * @param {?proto.oracle.v1.IBCChannel|undefined} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setIbcChannel = function (value) { - return jspb.Message.setWrapperField(this, 9, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.clearIbcChannel = function () { - return this.setIbcChannel(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.Request.prototype.hasIbcChannel = function () { - return jspb.Message.getField(this, 9) != null -} - -/** - * optional uint64 execute_gas = 10; - * @return {number} - */ -proto.oracle.v1.Request.prototype.getExecuteGas = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Request} returns this - */ -proto.oracle.v1.Request.prototype.setExecuteGas = function (value) { - return jspb.Message.setProto3IntField(this, 10, value) -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.Report.repeatedFields_ = [3] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.Report.prototype.toObject = function (opt_includeInstance) { - return proto.oracle.v1.Report.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.Report} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.Report.toObject = function (includeInstance, msg) { - var f, - obj = { - validator: jspb.Message.getFieldWithDefault(msg, 1, ''), - inBeforeResolve: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - rawReportsList: jspb.Message.toObjectList( - msg.getRawReportsList(), - proto.oracle.v1.RawReport.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.Report} - */ -proto.oracle.v1.Report.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.Report() - return proto.oracle.v1.Report.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.Report} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.Report} - */ -proto.oracle.v1.Report.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setValidator(value) - break - case 2: - var value = /** @type {boolean} */ (reader.readBool()) - msg.setInBeforeResolve(value) - break - case 3: - var value = new proto.oracle.v1.RawReport() - reader.readMessage( - value, - proto.oracle.v1.RawReport.deserializeBinaryFromReader, - ) - msg.addRawReports(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.Report.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.Report.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.Report} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.Report.serializeBinaryToWriter = function (message, writer) { - var f = undefined - f = message.getValidator() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getInBeforeResolve() - if (f) { - writer.writeBool(2, f) - } - f = message.getRawReportsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.oracle.v1.RawReport.serializeBinaryToWriter, - ) - } -} - -/** - * optional string validator = 1; - * @return {string} - */ -proto.oracle.v1.Report.prototype.getValidator = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.Report} returns this - */ -proto.oracle.v1.Report.prototype.setValidator = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional bool in_before_resolve = 2; - * @return {boolean} - */ -proto.oracle.v1.Report.prototype.getInBeforeResolve = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 2, false) - ) -} - -/** - * @param {boolean} value - * @return {!proto.oracle.v1.Report} returns this - */ -proto.oracle.v1.Report.prototype.setInBeforeResolve = function (value) { - return jspb.Message.setProto3BooleanField(this, 2, value) -} - -/** - * repeated RawReport raw_reports = 3; - * @return {!Array} - */ -proto.oracle.v1.Report.prototype.getRawReportsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.oracle.v1.RawReport, 3) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.Report} returns this - */ -proto.oracle.v1.Report.prototype.setRawReportsList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value) -} - -/** - * @param {!proto.oracle.v1.RawReport=} opt_value - * @param {number=} opt_index - * @return {!proto.oracle.v1.RawReport} - */ -proto.oracle.v1.Report.prototype.addRawReports = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 3, - opt_value, - proto.oracle.v1.RawReport, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.Report} returns this - */ -proto.oracle.v1.Report.prototype.clearRawReportsList = function () { - return this.setRawReportsList([]) -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.OracleRequestPacketData.repeatedFields_ = [6] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.OracleRequestPacketData.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.OracleRequestPacketData.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.OracleRequestPacketData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.OracleRequestPacketData.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - clientId: jspb.Message.getFieldWithDefault(msg, 1, ''), - oracleScriptId: jspb.Message.getFieldWithDefault(msg, 2, 0), - calldata: msg.getCalldata_asB64(), - askCount: jspb.Message.getFieldWithDefault(msg, 4, 0), - minCount: jspb.Message.getFieldWithDefault(msg, 5, 0), - feeLimitList: jspb.Message.toObjectList( - msg.getFeeLimitList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, - includeInstance, - ), - prepareGas: jspb.Message.getFieldWithDefault(msg, 7, 0), - executeGas: jspb.Message.getFieldWithDefault(msg, 8, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.OracleRequestPacketData} - */ -proto.oracle.v1.OracleRequestPacketData.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.OracleRequestPacketData() - return proto.oracle.v1.OracleRequestPacketData.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.OracleRequestPacketData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.OracleRequestPacketData} - */ -proto.oracle.v1.OracleRequestPacketData.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setClientId(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setOracleScriptId(value) - break - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setCalldata(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setAskCount(value) - break - case 5: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMinCount(value) - break - case 6: - var value = new cosmos_base_v1beta1_coin_pb.Coin() - reader.readMessage( - value, - cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader, - ) - msg.addFeeLimit(value) - break - case 7: - var value = /** @type {number} */ (reader.readUint64()) - msg.setPrepareGas(value) - break - case 8: - var value = /** @type {number} */ (reader.readUint64()) - msg.setExecuteGas(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.OracleRequestPacketData.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.OracleRequestPacketData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.OracleRequestPacketData.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getClientId() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getOracleScriptId() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getCalldata_asU8() - if (f.length > 0) { - writer.writeBytes(3, f) - } - f = message.getAskCount() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getMinCount() - if (f !== 0) { - writer.writeUint64(5, f) - } - f = message.getFeeLimitList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter, - ) - } - f = message.getPrepareGas() - if (f !== 0) { - writer.writeUint64(7, f) - } - f = message.getExecuteGas() - if (f !== 0) { - writer.writeUint64(8, f) - } -} - -/** - * optional string client_id = 1; - * @return {string} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getClientId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.OracleRequestPacketData} returns this - */ -proto.oracle.v1.OracleRequestPacketData.prototype.setClientId = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional uint64 oracle_script_id = 2; - * @return {number} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getOracleScriptId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleRequestPacketData} returns this - */ -proto.oracle.v1.OracleRequestPacketData.prototype.setOracleScriptId = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional bytes calldata = 3; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getCalldata = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 3, '') - ) -} - -/** - * optional bytes calldata = 3; - * This is a type-conversion wrapper around `getCalldata()` - * @return {string} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getCalldata_asB64 = - function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getCalldata())) - } - -/** - * optional bytes calldata = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCalldata()` - * @return {!Uint8Array} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getCalldata_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getCalldata()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.OracleRequestPacketData} returns this - */ -proto.oracle.v1.OracleRequestPacketData.prototype.setCalldata = function ( - value, -) { - return jspb.Message.setProto3BytesField(this, 3, value) -} - -/** - * optional uint64 ask_count = 4; - * @return {number} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getAskCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleRequestPacketData} returns this - */ -proto.oracle.v1.OracleRequestPacketData.prototype.setAskCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 4, value) -} - -/** - * optional uint64 min_count = 5; - * @return {number} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getMinCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleRequestPacketData} returns this - */ -proto.oracle.v1.OracleRequestPacketData.prototype.setMinCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 5, value) -} - -/** - * repeated cosmos.base.v1beta1.Coin fee_limit = 6; - * @return {!Array} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getFeeLimitList = - function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - cosmos_base_v1beta1_coin_pb.Coin, - 6, - ) - ) - } - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.OracleRequestPacketData} returns this - */ -proto.oracle.v1.OracleRequestPacketData.prototype.setFeeLimitList = function ( - value, -) { - return jspb.Message.setRepeatedWrapperField(this, 6, value) -} - -/** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.addFeeLimit = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 6, - opt_value, - proto.cosmos.base.v1beta1.Coin, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.OracleRequestPacketData} returns this - */ -proto.oracle.v1.OracleRequestPacketData.prototype.clearFeeLimitList = - function () { - return this.setFeeLimitList([]) - } - -/** - * optional uint64 prepare_gas = 7; - * @return {number} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getPrepareGas = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleRequestPacketData} returns this - */ -proto.oracle.v1.OracleRequestPacketData.prototype.setPrepareGas = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 7, value) -} - -/** - * optional uint64 execute_gas = 8; - * @return {number} - */ -proto.oracle.v1.OracleRequestPacketData.prototype.getExecuteGas = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleRequestPacketData} returns this - */ -proto.oracle.v1.OracleRequestPacketData.prototype.setExecuteGas = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 8, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.OracleRequestPacketAcknowledgement.prototype.toObject = - function (opt_includeInstance) { - return proto.oracle.v1.OracleRequestPacketAcknowledgement.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.OracleRequestPacketAcknowledgement} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.OracleRequestPacketAcknowledgement.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - requestId: jspb.Message.getFieldWithDefault(msg, 1, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.OracleRequestPacketAcknowledgement} - */ -proto.oracle.v1.OracleRequestPacketAcknowledgement.deserializeBinary = - function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.OracleRequestPacketAcknowledgement() - return proto.oracle.v1.OracleRequestPacketAcknowledgement.deserializeBinaryFromReader( - msg, - reader, - ) - } - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.OracleRequestPacketAcknowledgement} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.OracleRequestPacketAcknowledgement} - */ -proto.oracle.v1.OracleRequestPacketAcknowledgement.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.OracleRequestPacketAcknowledgement.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.OracleRequestPacketAcknowledgement.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.OracleRequestPacketAcknowledgement} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.OracleRequestPacketAcknowledgement.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(1, f) - } - } - -/** - * optional uint64 request_id = 1; - * @return {number} - */ -proto.oracle.v1.OracleRequestPacketAcknowledgement.prototype.getRequestId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleRequestPacketAcknowledgement} returns this - */ -proto.oracle.v1.OracleRequestPacketAcknowledgement.prototype.setRequestId = - function (value) { - return jspb.Message.setProto3IntField(this, 1, value) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.OracleResponsePacketData.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.OracleResponsePacketData.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.OracleResponsePacketData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.OracleResponsePacketData.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - clientId: jspb.Message.getFieldWithDefault(msg, 1, ''), - requestId: jspb.Message.getFieldWithDefault(msg, 2, 0), - ansCount: jspb.Message.getFieldWithDefault(msg, 3, 0), - requestTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - resolveTime: jspb.Message.getFieldWithDefault(msg, 5, 0), - resolveStatus: jspb.Message.getFieldWithDefault(msg, 6, 0), - result: msg.getResult_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.OracleResponsePacketData} - */ -proto.oracle.v1.OracleResponsePacketData.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.OracleResponsePacketData() - return proto.oracle.v1.OracleResponsePacketData.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.OracleResponsePacketData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.OracleResponsePacketData} - */ -proto.oracle.v1.OracleResponsePacketData.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setClientId(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setAnsCount(value) - break - case 4: - var value = /** @type {number} */ (reader.readInt64()) - msg.setRequestTime(value) - break - case 5: - var value = /** @type {number} */ (reader.readInt64()) - msg.setResolveTime(value) - break - case 6: - var value = /** @type {!proto.oracle.v1.ResolveStatus} */ ( - reader.readEnum() - ) - msg.setResolveStatus(value) - break - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setResult(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.OracleResponsePacketData.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.OracleResponsePacketData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.OracleResponsePacketData.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getClientId() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getAnsCount() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getRequestTime() - if (f !== 0) { - writer.writeInt64(4, f) - } - f = message.getResolveTime() - if (f !== 0) { - writer.writeInt64(5, f) - } - f = message.getResolveStatus() - if (f !== 0.0) { - writer.writeEnum(6, f) - } - f = message.getResult_asU8() - if (f.length > 0) { - writer.writeBytes(7, f) - } -} - -/** - * optional string client_id = 1; - * @return {string} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.getClientId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.OracleResponsePacketData} returns this - */ -proto.oracle.v1.OracleResponsePacketData.prototype.setClientId = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional uint64 request_id = 2; - * @return {number} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.getRequestId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleResponsePacketData} returns this - */ -proto.oracle.v1.OracleResponsePacketData.prototype.setRequestId = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional uint64 ans_count = 3; - * @return {number} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.getAnsCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleResponsePacketData} returns this - */ -proto.oracle.v1.OracleResponsePacketData.prototype.setAnsCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -/** - * optional int64 request_time = 4; - * @return {number} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.getRequestTime = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleResponsePacketData} returns this - */ -proto.oracle.v1.OracleResponsePacketData.prototype.setRequestTime = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 4, value) -} - -/** - * optional int64 resolve_time = 5; - * @return {number} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.getResolveTime = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.OracleResponsePacketData} returns this - */ -proto.oracle.v1.OracleResponsePacketData.prototype.setResolveTime = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 5, value) -} - -/** - * optional ResolveStatus resolve_status = 6; - * @return {!proto.oracle.v1.ResolveStatus} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.getResolveStatus = - function () { - return /** @type {!proto.oracle.v1.ResolveStatus} */ ( - jspb.Message.getFieldWithDefault(this, 6, 0) - ) - } - -/** - * @param {!proto.oracle.v1.ResolveStatus} value - * @return {!proto.oracle.v1.OracleResponsePacketData} returns this - */ -proto.oracle.v1.OracleResponsePacketData.prototype.setResolveStatus = function ( - value, -) { - return jspb.Message.setProto3EnumField(this, 6, value) -} - -/** - * optional bytes result = 7; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.getResult = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 7, '') - ) -} - -/** - * optional bytes result = 7; - * This is a type-conversion wrapper around `getResult()` - * @return {string} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.getResult_asB64 = - function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getResult())) - } - -/** - * optional bytes result = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getResult()` - * @return {!Uint8Array} - */ -proto.oracle.v1.OracleResponsePacketData.prototype.getResult_asU8 = - function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getResult())) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.OracleResponsePacketData} returns this - */ -proto.oracle.v1.OracleResponsePacketData.prototype.setResult = function ( - value, -) { - return jspb.Message.setProto3BytesField(this, 7, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.Result.prototype.toObject = function (opt_includeInstance) { - return proto.oracle.v1.Result.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.Result} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.Result.toObject = function (includeInstance, msg) { - var f, - obj = { - clientId: jspb.Message.getFieldWithDefault(msg, 1, ''), - oracleScriptId: jspb.Message.getFieldWithDefault(msg, 2, 0), - calldata: msg.getCalldata_asB64(), - askCount: jspb.Message.getFieldWithDefault(msg, 4, 0), - minCount: jspb.Message.getFieldWithDefault(msg, 5, 0), - requestId: jspb.Message.getFieldWithDefault(msg, 6, 0), - ansCount: jspb.Message.getFieldWithDefault(msg, 7, 0), - requestTime: jspb.Message.getFieldWithDefault(msg, 8, 0), - resolveTime: jspb.Message.getFieldWithDefault(msg, 9, 0), - resolveStatus: jspb.Message.getFieldWithDefault(msg, 10, 0), - result: msg.getResult_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.Result} - */ -proto.oracle.v1.Result.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.Result() - return proto.oracle.v1.Result.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.Result} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.Result} - */ -proto.oracle.v1.Result.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setClientId(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setOracleScriptId(value) - break - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setCalldata(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setAskCount(value) - break - case 5: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMinCount(value) - break - case 6: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - case 7: - var value = /** @type {number} */ (reader.readUint64()) - msg.setAnsCount(value) - break - case 8: - var value = /** @type {number} */ (reader.readInt64()) - msg.setRequestTime(value) - break - case 9: - var value = /** @type {number} */ (reader.readInt64()) - msg.setResolveTime(value) - break - case 10: - var value = /** @type {!proto.oracle.v1.ResolveStatus} */ ( - reader.readEnum() - ) - msg.setResolveStatus(value) - break - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setResult(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.Result.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.Result.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.Result} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.Result.serializeBinaryToWriter = function (message, writer) { - var f = undefined - f = message.getClientId() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getOracleScriptId() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getCalldata_asU8() - if (f.length > 0) { - writer.writeBytes(3, f) - } - f = message.getAskCount() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getMinCount() - if (f !== 0) { - writer.writeUint64(5, f) - } - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(6, f) - } - f = message.getAnsCount() - if (f !== 0) { - writer.writeUint64(7, f) - } - f = message.getRequestTime() - if (f !== 0) { - writer.writeInt64(8, f) - } - f = message.getResolveTime() - if (f !== 0) { - writer.writeInt64(9, f) - } - f = message.getResolveStatus() - if (f !== 0.0) { - writer.writeEnum(10, f) - } - f = message.getResult_asU8() - if (f.length > 0) { - writer.writeBytes(11, f) - } -} - -/** - * optional string client_id = 1; - * @return {string} - */ -proto.oracle.v1.Result.prototype.getClientId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setClientId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional uint64 oracle_script_id = 2; - * @return {number} - */ -proto.oracle.v1.Result.prototype.getOracleScriptId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setOracleScriptId = function (value) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional bytes calldata = 3; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.Result.prototype.getCalldata = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 3, '') - ) -} - -/** - * optional bytes calldata = 3; - * This is a type-conversion wrapper around `getCalldata()` - * @return {string} - */ -proto.oracle.v1.Result.prototype.getCalldata_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getCalldata())) -} - -/** - * optional bytes calldata = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCalldata()` - * @return {!Uint8Array} - */ -proto.oracle.v1.Result.prototype.getCalldata_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getCalldata())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setCalldata = function (value) { - return jspb.Message.setProto3BytesField(this, 3, value) -} - -/** - * optional uint64 ask_count = 4; - * @return {number} - */ -proto.oracle.v1.Result.prototype.getAskCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setAskCount = function (value) { - return jspb.Message.setProto3IntField(this, 4, value) -} - -/** - * optional uint64 min_count = 5; - * @return {number} - */ -proto.oracle.v1.Result.prototype.getMinCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setMinCount = function (value) { - return jspb.Message.setProto3IntField(this, 5, value) -} - -/** - * optional uint64 request_id = 6; - * @return {number} - */ -proto.oracle.v1.Result.prototype.getRequestId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setRequestId = function (value) { - return jspb.Message.setProto3IntField(this, 6, value) -} - -/** - * optional uint64 ans_count = 7; - * @return {number} - */ -proto.oracle.v1.Result.prototype.getAnsCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setAnsCount = function (value) { - return jspb.Message.setProto3IntField(this, 7, value) -} - -/** - * optional int64 request_time = 8; - * @return {number} - */ -proto.oracle.v1.Result.prototype.getRequestTime = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setRequestTime = function (value) { - return jspb.Message.setProto3IntField(this, 8, value) -} - -/** - * optional int64 resolve_time = 9; - * @return {number} - */ -proto.oracle.v1.Result.prototype.getResolveTime = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setResolveTime = function (value) { - return jspb.Message.setProto3IntField(this, 9, value) -} - -/** - * optional ResolveStatus resolve_status = 10; - * @return {!proto.oracle.v1.ResolveStatus} - */ -proto.oracle.v1.Result.prototype.getResolveStatus = function () { - return /** @type {!proto.oracle.v1.ResolveStatus} */ ( - jspb.Message.getFieldWithDefault(this, 10, 0) - ) -} - -/** - * @param {!proto.oracle.v1.ResolveStatus} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setResolveStatus = function (value) { - return jspb.Message.setProto3EnumField(this, 10, value) -} - -/** - * optional bytes result = 11; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.Result.prototype.getResult = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 11, '') - ) -} - -/** - * optional bytes result = 11; - * This is a type-conversion wrapper around `getResult()` - * @return {string} - */ -proto.oracle.v1.Result.prototype.getResult_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getResult())) -} - -/** - * optional bytes result = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getResult()` - * @return {!Uint8Array} - */ -proto.oracle.v1.Result.prototype.getResult_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getResult())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.Result} returns this - */ -proto.oracle.v1.Result.prototype.setResult = function (value) { - return jspb.Message.setProto3BytesField(this, 11, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.ValidatorStatus.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.ValidatorStatus.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.ValidatorStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.ValidatorStatus.toObject = function (includeInstance, msg) { - var f, - obj = { - isActive: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - since: - (f = msg.getSince()) && - google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.ValidatorStatus} - */ -proto.oracle.v1.ValidatorStatus.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.ValidatorStatus() - return proto.oracle.v1.ValidatorStatus.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.ValidatorStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.ValidatorStatus} - */ -proto.oracle.v1.ValidatorStatus.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()) - msg.setIsActive(value) - break - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp() - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader, - ) - msg.setSince(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.ValidatorStatus.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.ValidatorStatus.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.ValidatorStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.ValidatorStatus.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getIsActive() - if (f) { - writer.writeBool(1, f) - } - f = message.getSince() - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter, - ) - } -} - -/** - * optional bool is_active = 1; - * @return {boolean} - */ -proto.oracle.v1.ValidatorStatus.prototype.getIsActive = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 1, false) - ) -} - -/** - * @param {boolean} value - * @return {!proto.oracle.v1.ValidatorStatus} returns this - */ -proto.oracle.v1.ValidatorStatus.prototype.setIsActive = function (value) { - return jspb.Message.setProto3BooleanField(this, 1, value) -} - -/** - * optional google.protobuf.Timestamp since = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.oracle.v1.ValidatorStatus.prototype.getSince = function () { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 2, - ) - ) -} - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.oracle.v1.ValidatorStatus} returns this - */ -proto.oracle.v1.ValidatorStatus.prototype.setSince = function (value) { - return jspb.Message.setWrapperField(this, 2, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.ValidatorStatus} returns this - */ -proto.oracle.v1.ValidatorStatus.prototype.clearSince = function () { - return this.setSince(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.ValidatorStatus.prototype.hasSince = function () { - return jspb.Message.getField(this, 2) != null -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.ActiveValidator.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.ActiveValidator.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.ActiveValidator} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.ActiveValidator.toObject = function (includeInstance, msg) { - var f, - obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ''), - power: jspb.Message.getFieldWithDefault(msg, 2, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.ActiveValidator} - */ -proto.oracle.v1.ActiveValidator.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.ActiveValidator() - return proto.oracle.v1.ActiveValidator.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.ActiveValidator} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.ActiveValidator} - */ -proto.oracle.v1.ActiveValidator.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setAddress(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setPower(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.ActiveValidator.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.ActiveValidator.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.ActiveValidator} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.ActiveValidator.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getAddress() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getPower() - if (f !== 0) { - writer.writeUint64(2, f) - } -} - -/** - * optional string address = 1; - * @return {string} - */ -proto.oracle.v1.ActiveValidator.prototype.getAddress = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.ActiveValidator} returns this - */ -proto.oracle.v1.ActiveValidator.prototype.setAddress = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional uint64 power = 2; - * @return {number} - */ -proto.oracle.v1.ActiveValidator.prototype.getPower = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.ActiveValidator} returns this - */ -proto.oracle.v1.ActiveValidator.prototype.setPower = function (value) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.Params.prototype.toObject = function (opt_includeInstance) { - return proto.oracle.v1.Params.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.Params} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.Params.toObject = function (includeInstance, msg) { - var f, - obj = { - maxRawRequestCount: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxAskCount: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxCalldataSize: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxReportDataSize: jspb.Message.getFieldWithDefault(msg, 4, 0), - expirationBlockCount: jspb.Message.getFieldWithDefault(msg, 5, 0), - baseOwasmGas: jspb.Message.getFieldWithDefault(msg, 6, 0), - perValidatorRequestGas: jspb.Message.getFieldWithDefault(msg, 7, 0), - samplingTryCount: jspb.Message.getFieldWithDefault(msg, 8, 0), - oracleRewardPercentage: jspb.Message.getFieldWithDefault(msg, 9, 0), - inactivePenaltyDuration: jspb.Message.getFieldWithDefault(msg, 10, 0), - ibcRequestEnabled: jspb.Message.getBooleanFieldWithDefault( - msg, - 11, - false, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.Params} - */ -proto.oracle.v1.Params.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.Params() - return proto.oracle.v1.Params.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.Params} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.Params} - */ -proto.oracle.v1.Params.deserializeBinaryFromReader = function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMaxRawRequestCount(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMaxAskCount(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMaxCalldataSize(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMaxReportDataSize(value) - break - case 5: - var value = /** @type {number} */ (reader.readUint64()) - msg.setExpirationBlockCount(value) - break - case 6: - var value = /** @type {number} */ (reader.readUint64()) - msg.setBaseOwasmGas(value) - break - case 7: - var value = /** @type {number} */ (reader.readUint64()) - msg.setPerValidatorRequestGas(value) - break - case 8: - var value = /** @type {number} */ (reader.readUint64()) - msg.setSamplingTryCount(value) - break - case 9: - var value = /** @type {number} */ (reader.readUint64()) - msg.setOracleRewardPercentage(value) - break - case 10: - var value = /** @type {number} */ (reader.readUint64()) - msg.setInactivePenaltyDuration(value) - break - case 11: - var value = /** @type {boolean} */ (reader.readBool()) - msg.setIbcRequestEnabled(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.Params.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.Params.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.Params} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.Params.serializeBinaryToWriter = function (message, writer) { - var f = undefined - f = message.getMaxRawRequestCount() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getMaxAskCount() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getMaxCalldataSize() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getMaxReportDataSize() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getExpirationBlockCount() - if (f !== 0) { - writer.writeUint64(5, f) - } - f = message.getBaseOwasmGas() - if (f !== 0) { - writer.writeUint64(6, f) - } - f = message.getPerValidatorRequestGas() - if (f !== 0) { - writer.writeUint64(7, f) - } - f = message.getSamplingTryCount() - if (f !== 0) { - writer.writeUint64(8, f) - } - f = message.getOracleRewardPercentage() - if (f !== 0) { - writer.writeUint64(9, f) - } - f = message.getInactivePenaltyDuration() - if (f !== 0) { - writer.writeUint64(10, f) - } - f = message.getIbcRequestEnabled() - if (f) { - writer.writeBool(11, f) - } -} - -/** - * optional uint64 max_raw_request_count = 1; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getMaxRawRequestCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setMaxRawRequestCount = function (value) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional uint64 max_ask_count = 2; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getMaxAskCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setMaxAskCount = function (value) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional uint64 max_calldata_size = 3; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getMaxCalldataSize = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setMaxCalldataSize = function (value) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -/** - * optional uint64 max_report_data_size = 4; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getMaxReportDataSize = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setMaxReportDataSize = function (value) { - return jspb.Message.setProto3IntField(this, 4, value) -} - -/** - * optional uint64 expiration_block_count = 5; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getExpirationBlockCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setExpirationBlockCount = function (value) { - return jspb.Message.setProto3IntField(this, 5, value) -} - -/** - * optional uint64 base_owasm_gas = 6; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getBaseOwasmGas = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setBaseOwasmGas = function (value) { - return jspb.Message.setProto3IntField(this, 6, value) -} - -/** - * optional uint64 per_validator_request_gas = 7; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getPerValidatorRequestGas = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setPerValidatorRequestGas = function (value) { - return jspb.Message.setProto3IntField(this, 7, value) -} - -/** - * optional uint64 sampling_try_count = 8; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getSamplingTryCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setSamplingTryCount = function (value) { - return jspb.Message.setProto3IntField(this, 8, value) -} - -/** - * optional uint64 oracle_reward_percentage = 9; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getOracleRewardPercentage = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setOracleRewardPercentage = function (value) { - return jspb.Message.setProto3IntField(this, 9, value) -} - -/** - * optional uint64 inactive_penalty_duration = 10; - * @return {number} - */ -proto.oracle.v1.Params.prototype.getInactivePenaltyDuration = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setInactivePenaltyDuration = function (value) { - return jspb.Message.setProto3IntField(this, 10, value) -} - -/** - * optional bool ibc_request_enabled = 11; - * @return {boolean} - */ -proto.oracle.v1.Params.prototype.getIbcRequestEnabled = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 11, false) - ) -} - -/** - * @param {boolean} value - * @return {!proto.oracle.v1.Params} returns this - */ -proto.oracle.v1.Params.prototype.setIbcRequestEnabled = function (value) { - return jspb.Message.setProto3BooleanField(this, 11, value) -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.PendingResolveList.repeatedFields_ = [1] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.PendingResolveList.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.PendingResolveList.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.PendingResolveList} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.PendingResolveList.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - requestIdsList: - (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.PendingResolveList} - */ -proto.oracle.v1.PendingResolveList.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.PendingResolveList() - return proto.oracle.v1.PendingResolveList.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.PendingResolveList} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.PendingResolveList} - */ -proto.oracle.v1.PendingResolveList.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var values = /** @type {!Array} */ ( - reader.isDelimited() - ? reader.readPackedUint64() - : [reader.readUint64()] - ) - for (var i = 0; i < values.length; i++) { - msg.addRequestIds(values[i]) - } - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.PendingResolveList.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.PendingResolveList.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.PendingResolveList} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.PendingResolveList.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getRequestIdsList() - if (f.length > 0) { - writer.writePackedUint64(1, f) - } -} - -/** - * repeated uint64 request_ids = 1; - * @return {!Array} - */ -proto.oracle.v1.PendingResolveList.prototype.getRequestIdsList = function () { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.PendingResolveList} returns this - */ -proto.oracle.v1.PendingResolveList.prototype.setRequestIdsList = function ( - value, -) { - return jspb.Message.setField(this, 1, value || []) -} - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.oracle.v1.PendingResolveList} returns this - */ -proto.oracle.v1.PendingResolveList.prototype.addRequestIds = function ( - value, - opt_index, -) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.PendingResolveList} returns this - */ -proto.oracle.v1.PendingResolveList.prototype.clearRequestIdsList = function () { - return this.setRequestIdsList([]) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.IBCChannel.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.IBCChannel.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.IBCChannel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.IBCChannel.toObject = function (includeInstance, msg) { - var f, - obj = { - portId: jspb.Message.getFieldWithDefault(msg, 1, ''), - channelId: jspb.Message.getFieldWithDefault(msg, 2, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.IBCChannel} - */ -proto.oracle.v1.IBCChannel.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.IBCChannel() - return proto.oracle.v1.IBCChannel.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.IBCChannel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.IBCChannel} - */ -proto.oracle.v1.IBCChannel.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setPortId(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setChannelId(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.IBCChannel.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.IBCChannel.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.IBCChannel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.IBCChannel.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getPortId() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getChannelId() - if (f.length > 0) { - writer.writeString(2, f) - } -} - -/** - * optional string port_id = 1; - * @return {string} - */ -proto.oracle.v1.IBCChannel.prototype.getPortId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.IBCChannel} returns this - */ -proto.oracle.v1.IBCChannel.prototype.setPortId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional string channel_id = 2; - * @return {string} - */ -proto.oracle.v1.IBCChannel.prototype.getChannelId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.IBCChannel} returns this - */ -proto.oracle.v1.IBCChannel.prototype.setChannelId = function (value) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.RequestVerification.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.RequestVerification.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.RequestVerification} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.RequestVerification.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - chainId: jspb.Message.getFieldWithDefault(msg, 1, ''), - validator: jspb.Message.getFieldWithDefault(msg, 2, ''), - requestId: jspb.Message.getFieldWithDefault(msg, 3, 0), - externalId: jspb.Message.getFieldWithDefault(msg, 4, 0), - dataSourceId: jspb.Message.getFieldWithDefault(msg, 5, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.RequestVerification} - */ -proto.oracle.v1.RequestVerification.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.RequestVerification() - return proto.oracle.v1.RequestVerification.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.RequestVerification} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.RequestVerification} - */ -proto.oracle.v1.RequestVerification.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setChainId(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setValidator(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setExternalId(value) - break - case 5: - var value = /** @type {number} */ (reader.readUint64()) - msg.setDataSourceId(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.RequestVerification.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.RequestVerification.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.RequestVerification} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.RequestVerification.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getChainId() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getValidator() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getExternalId() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getDataSourceId() - if (f !== 0) { - writer.writeUint64(5, f) - } -} - -/** - * optional string chain_id = 1; - * @return {string} - */ -proto.oracle.v1.RequestVerification.prototype.getChainId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.RequestVerification} returns this - */ -proto.oracle.v1.RequestVerification.prototype.setChainId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional string validator = 2; - * @return {string} - */ -proto.oracle.v1.RequestVerification.prototype.getValidator = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.RequestVerification} returns this - */ -proto.oracle.v1.RequestVerification.prototype.setValidator = function (value) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -/** - * optional uint64 request_id = 3; - * @return {number} - */ -proto.oracle.v1.RequestVerification.prototype.getRequestId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.RequestVerification} returns this - */ -proto.oracle.v1.RequestVerification.prototype.setRequestId = function (value) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -/** - * optional uint64 external_id = 4; - * @return {number} - */ -proto.oracle.v1.RequestVerification.prototype.getExternalId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.RequestVerification} returns this - */ -proto.oracle.v1.RequestVerification.prototype.setExternalId = function (value) { - return jspb.Message.setProto3IntField(this, 4, value) -} - -/** - * optional uint64 data_source_id = 5; - * @return {number} - */ -proto.oracle.v1.RequestVerification.prototype.getDataSourceId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.RequestVerification} returns this - */ -proto.oracle.v1.RequestVerification.prototype.setDataSourceId = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 5, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.PriceResult.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.PriceResult.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.PriceResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.PriceResult.toObject = function (includeInstance, msg) { - var f, - obj = { - symbol: jspb.Message.getFieldWithDefault(msg, 1, ''), - multiplier: jspb.Message.getFieldWithDefault(msg, 2, 0), - px: jspb.Message.getFieldWithDefault(msg, 3, 0), - requestId: jspb.Message.getFieldWithDefault(msg, 4, 0), - resolveTime: jspb.Message.getFieldWithDefault(msg, 5, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.PriceResult} - */ -proto.oracle.v1.PriceResult.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.PriceResult() - return proto.oracle.v1.PriceResult.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.PriceResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.PriceResult} - */ -proto.oracle.v1.PriceResult.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setSymbol(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMultiplier(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setPx(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - case 5: - var value = /** @type {number} */ (reader.readInt64()) - msg.setResolveTime(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.PriceResult.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.PriceResult.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.PriceResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.PriceResult.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getSymbol() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getMultiplier() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getPx() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getResolveTime() - if (f !== 0) { - writer.writeInt64(5, f) - } -} - -/** - * optional string symbol = 1; - * @return {string} - */ -proto.oracle.v1.PriceResult.prototype.getSymbol = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.PriceResult} returns this - */ -proto.oracle.v1.PriceResult.prototype.setSymbol = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional uint64 multiplier = 2; - * @return {number} - */ -proto.oracle.v1.PriceResult.prototype.getMultiplier = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.PriceResult} returns this - */ -proto.oracle.v1.PriceResult.prototype.setMultiplier = function (value) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional uint64 px = 3; - * @return {number} - */ -proto.oracle.v1.PriceResult.prototype.getPx = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.PriceResult} returns this - */ -proto.oracle.v1.PriceResult.prototype.setPx = function (value) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -/** - * optional uint64 request_id = 4; - * @return {number} - */ -proto.oracle.v1.PriceResult.prototype.getRequestId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.PriceResult} returns this - */ -proto.oracle.v1.PriceResult.prototype.setRequestId = function (value) { - return jspb.Message.setProto3IntField(this, 4, value) -} - -/** - * optional int64 resolve_time = 5; - * @return {number} - */ -proto.oracle.v1.PriceResult.prototype.getResolveTime = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.PriceResult} returns this - */ -proto.oracle.v1.PriceResult.prototype.setResolveTime = function (value) { - return jspb.Message.setProto3IntField(this, 5, value) -} - -/** - * @enum {number} - */ -proto.oracle.v1.ResolveStatus = { - RESOLVE_STATUS_OPEN_UNSPECIFIED: 0, - RESOLVE_STATUS_SUCCESS: 1, - RESOLVE_STATUS_FAILURE: 2, - RESOLVE_STATUS_EXPIRED: 3, -} - -goog.object.extend(exports, proto.oracle.v1) diff --git a/proto/oracle/v1/oracle_pb_service.d.ts b/proto/oracle/v1/oracle_pb_service.d.ts deleted file mode 100644 index 95e7fa5..0000000 --- a/proto/oracle/v1/oracle_pb_service.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/oracle.proto diff --git a/proto/oracle/v1/oracle_pb_service.js b/proto/oracle/v1/oracle_pb_service.js deleted file mode 100644 index 95e7fa5..0000000 --- a/proto/oracle/v1/oracle_pb_service.js +++ /dev/null @@ -1,2 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/oracle.proto diff --git a/proto/oracle/v1/query_pb.d.ts b/proto/oracle/v1/query_pb.d.ts deleted file mode 100644 index 53447f0..0000000 --- a/proto/oracle/v1/query_pb.d.ts +++ /dev/null @@ -1,988 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/query.proto - -import * as jspb from 'google-protobuf' -import * as gogoproto_gogo_pb from '../../gogoproto/gogo_pb' -import * as google_api_annotations_pb from '../../google/api/annotations_pb' -import * as cosmos_proto_cosmos_pb from '../../cosmos_proto/cosmos_pb' -import * as oracle_v1_oracle_pb from '../../oracle/v1/oracle_pb' - -export class QueryCountsRequest extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryCountsRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryCountsRequest, - ): QueryCountsRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryCountsRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryCountsRequest - static deserializeBinaryFromReader( - message: QueryCountsRequest, - reader: jspb.BinaryReader, - ): QueryCountsRequest -} - -export namespace QueryCountsRequest { - export type AsObject = {} -} - -export class QueryCountsResponse extends jspb.Message { - getDataSourceCount(): number - setDataSourceCount(value: number): void - - getOracleScriptCount(): number - setOracleScriptCount(value: number): void - - getRequestCount(): number - setRequestCount(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryCountsResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryCountsResponse, - ): QueryCountsResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryCountsResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryCountsResponse - static deserializeBinaryFromReader( - message: QueryCountsResponse, - reader: jspb.BinaryReader, - ): QueryCountsResponse -} - -export namespace QueryCountsResponse { - export type AsObject = { - dataSourceCount: number - oracleScriptCount: number - requestCount: number - } -} - -export class QueryDataRequest extends jspb.Message { - getDataHash(): string - setDataHash(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryDataRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryDataRequest, - ): QueryDataRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryDataRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryDataRequest - static deserializeBinaryFromReader( - message: QueryDataRequest, - reader: jspb.BinaryReader, - ): QueryDataRequest -} - -export namespace QueryDataRequest { - export type AsObject = { - dataHash: string - } -} - -export class QueryDataResponse extends jspb.Message { - getData(): Uint8Array | string - getData_asU8(): Uint8Array - getData_asB64(): string - setData(value: Uint8Array | string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryDataResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryDataResponse, - ): QueryDataResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryDataResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryDataResponse - static deserializeBinaryFromReader( - message: QueryDataResponse, - reader: jspb.BinaryReader, - ): QueryDataResponse -} - -export namespace QueryDataResponse { - export type AsObject = { - data: Uint8Array | string - } -} - -export class QueryDataSourceRequest extends jspb.Message { - getDataSourceId(): number - setDataSourceId(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryDataSourceRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryDataSourceRequest, - ): QueryDataSourceRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryDataSourceRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryDataSourceRequest - static deserializeBinaryFromReader( - message: QueryDataSourceRequest, - reader: jspb.BinaryReader, - ): QueryDataSourceRequest -} - -export namespace QueryDataSourceRequest { - export type AsObject = { - dataSourceId: number - } -} - -export class QueryDataSourceResponse extends jspb.Message { - hasDataSource(): boolean - clearDataSource(): void - getDataSource(): oracle_v1_oracle_pb.DataSource | undefined - setDataSource(value?: oracle_v1_oracle_pb.DataSource): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryDataSourceResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryDataSourceResponse, - ): QueryDataSourceResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryDataSourceResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryDataSourceResponse - static deserializeBinaryFromReader( - message: QueryDataSourceResponse, - reader: jspb.BinaryReader, - ): QueryDataSourceResponse -} - -export namespace QueryDataSourceResponse { - export type AsObject = { - dataSource?: oracle_v1_oracle_pb.DataSource.AsObject - } -} - -export class QueryOracleScriptRequest extends jspb.Message { - getOracleScriptId(): number - setOracleScriptId(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryOracleScriptRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryOracleScriptRequest, - ): QueryOracleScriptRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryOracleScriptRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryOracleScriptRequest - static deserializeBinaryFromReader( - message: QueryOracleScriptRequest, - reader: jspb.BinaryReader, - ): QueryOracleScriptRequest -} - -export namespace QueryOracleScriptRequest { - export type AsObject = { - oracleScriptId: number - } -} - -export class QueryOracleScriptResponse extends jspb.Message { - hasOracleScript(): boolean - clearOracleScript(): void - getOracleScript(): oracle_v1_oracle_pb.OracleScript | undefined - setOracleScript(value?: oracle_v1_oracle_pb.OracleScript): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryOracleScriptResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryOracleScriptResponse, - ): QueryOracleScriptResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryOracleScriptResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryOracleScriptResponse - static deserializeBinaryFromReader( - message: QueryOracleScriptResponse, - reader: jspb.BinaryReader, - ): QueryOracleScriptResponse -} - -export namespace QueryOracleScriptResponse { - export type AsObject = { - oracleScript?: oracle_v1_oracle_pb.OracleScript.AsObject - } -} - -export class QueryRequestRequest extends jspb.Message { - getRequestId(): number - setRequestId(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryRequestRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryRequestRequest, - ): QueryRequestRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryRequestRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryRequestRequest - static deserializeBinaryFromReader( - message: QueryRequestRequest, - reader: jspb.BinaryReader, - ): QueryRequestRequest -} - -export namespace QueryRequestRequest { - export type AsObject = { - requestId: number - } -} - -export class QueryRequestResponse extends jspb.Message { - hasRequest(): boolean - clearRequest(): void - getRequest(): oracle_v1_oracle_pb.Request | undefined - setRequest(value?: oracle_v1_oracle_pb.Request): void - - clearReportsList(): void - getReportsList(): Array - setReportsList(value: Array): void - addReports( - value?: oracle_v1_oracle_pb.Report, - index?: number, - ): oracle_v1_oracle_pb.Report - - hasResult(): boolean - clearResult(): void - getResult(): oracle_v1_oracle_pb.Result | undefined - setResult(value?: oracle_v1_oracle_pb.Result): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryRequestResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryRequestResponse, - ): QueryRequestResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryRequestResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryRequestResponse - static deserializeBinaryFromReader( - message: QueryRequestResponse, - reader: jspb.BinaryReader, - ): QueryRequestResponse -} - -export namespace QueryRequestResponse { - export type AsObject = { - request?: oracle_v1_oracle_pb.Request.AsObject - reportsList: Array - result?: oracle_v1_oracle_pb.Result.AsObject - } -} - -export class QueryPendingRequestsRequest extends jspb.Message { - getValidatorAddress(): string - setValidatorAddress(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryPendingRequestsRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryPendingRequestsRequest, - ): QueryPendingRequestsRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryPendingRequestsRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryPendingRequestsRequest - static deserializeBinaryFromReader( - message: QueryPendingRequestsRequest, - reader: jspb.BinaryReader, - ): QueryPendingRequestsRequest -} - -export namespace QueryPendingRequestsRequest { - export type AsObject = { - validatorAddress: string - } -} - -export class QueryPendingRequestsResponse extends jspb.Message { - clearRequestIdsList(): void - getRequestIdsList(): Array - setRequestIdsList(value: Array): void - addRequestIds(value: number, index?: number): number - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryPendingRequestsResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryPendingRequestsResponse, - ): QueryPendingRequestsResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryPendingRequestsResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryPendingRequestsResponse - static deserializeBinaryFromReader( - message: QueryPendingRequestsResponse, - reader: jspb.BinaryReader, - ): QueryPendingRequestsResponse -} - -export namespace QueryPendingRequestsResponse { - export type AsObject = { - requestIdsList: Array - } -} - -export class QueryParamsRequest extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryParamsRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryParamsRequest, - ): QueryParamsRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryParamsRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryParamsRequest - static deserializeBinaryFromReader( - message: QueryParamsRequest, - reader: jspb.BinaryReader, - ): QueryParamsRequest -} - -export namespace QueryParamsRequest { - export type AsObject = {} -} - -export class QueryParamsResponse extends jspb.Message { - hasParams(): boolean - clearParams(): void - getParams(): oracle_v1_oracle_pb.Params | undefined - setParams(value?: oracle_v1_oracle_pb.Params): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryParamsResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryParamsResponse, - ): QueryParamsResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryParamsResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryParamsResponse - static deserializeBinaryFromReader( - message: QueryParamsResponse, - reader: jspb.BinaryReader, - ): QueryParamsResponse -} - -export namespace QueryParamsResponse { - export type AsObject = { - params?: oracle_v1_oracle_pb.Params.AsObject - } -} - -export class QueryValidatorRequest extends jspb.Message { - getValidatorAddress(): string - setValidatorAddress(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryValidatorRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryValidatorRequest, - ): QueryValidatorRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryValidatorRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryValidatorRequest - static deserializeBinaryFromReader( - message: QueryValidatorRequest, - reader: jspb.BinaryReader, - ): QueryValidatorRequest -} - -export namespace QueryValidatorRequest { - export type AsObject = { - validatorAddress: string - } -} - -export class QueryValidatorResponse extends jspb.Message { - hasStatus(): boolean - clearStatus(): void - getStatus(): oracle_v1_oracle_pb.ValidatorStatus | undefined - setStatus(value?: oracle_v1_oracle_pb.ValidatorStatus): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryValidatorResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryValidatorResponse, - ): QueryValidatorResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryValidatorResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryValidatorResponse - static deserializeBinaryFromReader( - message: QueryValidatorResponse, - reader: jspb.BinaryReader, - ): QueryValidatorResponse -} - -export namespace QueryValidatorResponse { - export type AsObject = { - status?: oracle_v1_oracle_pb.ValidatorStatus.AsObject - } -} - -export class QueryIsReporterRequest extends jspb.Message { - getValidatorAddress(): string - setValidatorAddress(value: string): void - - getReporterAddress(): string - setReporterAddress(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryIsReporterRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryIsReporterRequest, - ): QueryIsReporterRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryIsReporterRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryIsReporterRequest - static deserializeBinaryFromReader( - message: QueryIsReporterRequest, - reader: jspb.BinaryReader, - ): QueryIsReporterRequest -} - -export namespace QueryIsReporterRequest { - export type AsObject = { - validatorAddress: string - reporterAddress: string - } -} - -export class QueryIsReporterResponse extends jspb.Message { - getIsReporter(): boolean - setIsReporter(value: boolean): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryIsReporterResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryIsReporterResponse, - ): QueryIsReporterResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryIsReporterResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryIsReporterResponse - static deserializeBinaryFromReader( - message: QueryIsReporterResponse, - reader: jspb.BinaryReader, - ): QueryIsReporterResponse -} - -export namespace QueryIsReporterResponse { - export type AsObject = { - isReporter: boolean - } -} - -export class QueryReportersRequest extends jspb.Message { - getValidatorAddress(): string - setValidatorAddress(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryReportersRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryReportersRequest, - ): QueryReportersRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryReportersRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryReportersRequest - static deserializeBinaryFromReader( - message: QueryReportersRequest, - reader: jspb.BinaryReader, - ): QueryReportersRequest -} - -export namespace QueryReportersRequest { - export type AsObject = { - validatorAddress: string - } -} - -export class QueryReportersResponse extends jspb.Message { - clearReporterList(): void - getReporterList(): Array - setReporterList(value: Array): void - addReporter(value: string, index?: number): string - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryReportersResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryReportersResponse, - ): QueryReportersResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryReportersResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryReportersResponse - static deserializeBinaryFromReader( - message: QueryReportersResponse, - reader: jspb.BinaryReader, - ): QueryReportersResponse -} - -export namespace QueryReportersResponse { - export type AsObject = { - reporterList: Array - } -} - -export class QueryActiveValidatorsRequest extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryActiveValidatorsRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryActiveValidatorsRequest, - ): QueryActiveValidatorsRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryActiveValidatorsRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryActiveValidatorsRequest - static deserializeBinaryFromReader( - message: QueryActiveValidatorsRequest, - reader: jspb.BinaryReader, - ): QueryActiveValidatorsRequest -} - -export namespace QueryActiveValidatorsRequest { - export type AsObject = {} -} - -export class QueryActiveValidatorsResponse extends jspb.Message { - clearValidatorsList(): void - getValidatorsList(): Array - setValidatorsList(value: Array): void - addValidators( - value?: oracle_v1_oracle_pb.ActiveValidator, - index?: number, - ): oracle_v1_oracle_pb.ActiveValidator - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryActiveValidatorsResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryActiveValidatorsResponse, - ): QueryActiveValidatorsResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryActiveValidatorsResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryActiveValidatorsResponse - static deserializeBinaryFromReader( - message: QueryActiveValidatorsResponse, - reader: jspb.BinaryReader, - ): QueryActiveValidatorsResponse -} - -export namespace QueryActiveValidatorsResponse { - export type AsObject = { - validatorsList: Array - } -} - -export class QueryRequestSearchRequest extends jspb.Message { - getOracleScriptId(): number - setOracleScriptId(value: number): void - - getCalldata(): string - setCalldata(value: string): void - - getAskCount(): number - setAskCount(value: number): void - - getMinCount(): number - setMinCount(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryRequestSearchRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryRequestSearchRequest, - ): QueryRequestSearchRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryRequestSearchRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryRequestSearchRequest - static deserializeBinaryFromReader( - message: QueryRequestSearchRequest, - reader: jspb.BinaryReader, - ): QueryRequestSearchRequest -} - -export namespace QueryRequestSearchRequest { - export type AsObject = { - oracleScriptId: number - calldata: string - askCount: number - minCount: number - } -} - -export class QueryRequestSearchResponse extends jspb.Message { - hasRequest(): boolean - clearRequest(): void - getRequest(): QueryRequestResponse | undefined - setRequest(value?: QueryRequestResponse): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryRequestSearchResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryRequestSearchResponse, - ): QueryRequestSearchResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryRequestSearchResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryRequestSearchResponse - static deserializeBinaryFromReader( - message: QueryRequestSearchResponse, - reader: jspb.BinaryReader, - ): QueryRequestSearchResponse -} - -export namespace QueryRequestSearchResponse { - export type AsObject = { - request?: QueryRequestResponse.AsObject - } -} - -export class QueryRequestPriceRequest extends jspb.Message { - clearSymbolsList(): void - getSymbolsList(): Array - setSymbolsList(value: Array): void - addSymbols(value: string, index?: number): string - - getAskCount(): number - setAskCount(value: number): void - - getMinCount(): number - setMinCount(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryRequestPriceRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryRequestPriceRequest, - ): QueryRequestPriceRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryRequestPriceRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryRequestPriceRequest - static deserializeBinaryFromReader( - message: QueryRequestPriceRequest, - reader: jspb.BinaryReader, - ): QueryRequestPriceRequest -} - -export namespace QueryRequestPriceRequest { - export type AsObject = { - symbolsList: Array - askCount: number - minCount: number - } -} - -export class QueryRequestPriceResponse extends jspb.Message { - clearPriceResultsList(): void - getPriceResultsList(): Array - setPriceResultsList(value: Array): void - addPriceResults( - value?: oracle_v1_oracle_pb.PriceResult, - index?: number, - ): oracle_v1_oracle_pb.PriceResult - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryRequestPriceResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryRequestPriceResponse, - ): QueryRequestPriceResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryRequestPriceResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryRequestPriceResponse - static deserializeBinaryFromReader( - message: QueryRequestPriceResponse, - reader: jspb.BinaryReader, - ): QueryRequestPriceResponse -} - -export namespace QueryRequestPriceResponse { - export type AsObject = { - priceResultsList: Array - } -} - -export class QueryRequestVerificationRequest extends jspb.Message { - getChainId(): string - setChainId(value: string): void - - getValidator(): string - setValidator(value: string): void - - getRequestId(): number - setRequestId(value: number): void - - getExternalId(): number - setExternalId(value: number): void - - getDataSourceId(): number - setDataSourceId(value: number): void - - getReporter(): string - setReporter(value: string): void - - getSignature(): Uint8Array | string - getSignature_asU8(): Uint8Array - getSignature_asB64(): string - setSignature(value: Uint8Array | string): void - - getMaxDelay(): number - setMaxDelay(value: number): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryRequestVerificationRequest.AsObject - static toObject( - includeInstance: boolean, - msg: QueryRequestVerificationRequest, - ): QueryRequestVerificationRequest.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryRequestVerificationRequest, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryRequestVerificationRequest - static deserializeBinaryFromReader( - message: QueryRequestVerificationRequest, - reader: jspb.BinaryReader, - ): QueryRequestVerificationRequest -} - -export namespace QueryRequestVerificationRequest { - export type AsObject = { - chainId: string - validator: string - requestId: number - externalId: number - dataSourceId: number - reporter: string - signature: Uint8Array | string - maxDelay: number - } -} - -export class QueryRequestVerificationResponse extends jspb.Message { - getChainId(): string - setChainId(value: string): void - - getValidator(): string - setValidator(value: string): void - - getRequestId(): number - setRequestId(value: number): void - - getExternalId(): number - setExternalId(value: number): void - - getDataSourceId(): number - setDataSourceId(value: number): void - - getIsDelay(): boolean - setIsDelay(value: boolean): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): QueryRequestVerificationResponse.AsObject - static toObject( - includeInstance: boolean, - msg: QueryRequestVerificationResponse, - ): QueryRequestVerificationResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: QueryRequestVerificationResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): QueryRequestVerificationResponse - static deserializeBinaryFromReader( - message: QueryRequestVerificationResponse, - reader: jspb.BinaryReader, - ): QueryRequestVerificationResponse -} - -export namespace QueryRequestVerificationResponse { - export type AsObject = { - chainId: string - validator: string - requestId: number - externalId: number - dataSourceId: number - isDelay: boolean - } -} diff --git a/proto/oracle/v1/query_pb.js b/proto/oracle/v1/query_pb.js deleted file mode 100644 index f2c1627..0000000 --- a/proto/oracle/v1/query_pb.js +++ /dev/null @@ -1,5557 +0,0 @@ -// source: oracle/v1/query.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf') -var goog = jspb -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - function () { - return this - }.call(null) || - Function('return this')() - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') -goog.object.extend(proto, gogoproto_gogo_pb) -var google_api_annotations_pb = require('../../google/api/annotations_pb.js') -goog.object.extend(proto, google_api_annotations_pb) -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js') -goog.object.extend(proto, cosmos_proto_cosmos_pb) -var oracle_v1_oracle_pb = require('../../oracle/v1/oracle_pb.js') -goog.object.extend(proto, oracle_v1_oracle_pb) -goog.exportSymbol('proto.oracle.v1.QueryActiveValidatorsRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryActiveValidatorsResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryCountsRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryCountsResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryDataRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryDataResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryDataSourceRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryDataSourceResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryIsReporterRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryIsReporterResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryOracleScriptRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryOracleScriptResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryParamsRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryParamsResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryPendingRequestsRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryPendingRequestsResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryReportersRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryReportersResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryRequestPriceRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryRequestPriceResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryRequestRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryRequestResponse', null, global) -goog.exportSymbol('proto.oracle.v1.QueryRequestSearchRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryRequestSearchResponse', null, global) -goog.exportSymbol( - 'proto.oracle.v1.QueryRequestVerificationRequest', - null, - global, -) -goog.exportSymbol( - 'proto.oracle.v1.QueryRequestVerificationResponse', - null, - global, -) -goog.exportSymbol('proto.oracle.v1.QueryValidatorRequest', null, global) -goog.exportSymbol('proto.oracle.v1.QueryValidatorResponse', null, global) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryCountsRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryCountsRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryCountsRequest.displayName = - 'proto.oracle.v1.QueryCountsRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryCountsResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryCountsResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryCountsResponse.displayName = - 'proto.oracle.v1.QueryCountsResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryDataRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryDataRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryDataRequest.displayName = - 'proto.oracle.v1.QueryDataRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryDataResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryDataResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryDataResponse.displayName = - 'proto.oracle.v1.QueryDataResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryDataSourceRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryDataSourceRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryDataSourceRequest.displayName = - 'proto.oracle.v1.QueryDataSourceRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryDataSourceResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryDataSourceResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryDataSourceResponse.displayName = - 'proto.oracle.v1.QueryDataSourceResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryOracleScriptRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryOracleScriptRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryOracleScriptRequest.displayName = - 'proto.oracle.v1.QueryOracleScriptRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryOracleScriptResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryOracleScriptResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryOracleScriptResponse.displayName = - 'proto.oracle.v1.QueryOracleScriptResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryRequestRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryRequestRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryRequestRequest.displayName = - 'proto.oracle.v1.QueryRequestRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryRequestResponse = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.QueryRequestResponse.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.QueryRequestResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryRequestResponse.displayName = - 'proto.oracle.v1.QueryRequestResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryPendingRequestsRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryPendingRequestsRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryPendingRequestsRequest.displayName = - 'proto.oracle.v1.QueryPendingRequestsRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryPendingRequestsResponse = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.QueryPendingRequestsResponse.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.QueryPendingRequestsResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryPendingRequestsResponse.displayName = - 'proto.oracle.v1.QueryPendingRequestsResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryParamsRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryParamsRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryParamsRequest.displayName = - 'proto.oracle.v1.QueryParamsRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryParamsResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryParamsResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryParamsResponse.displayName = - 'proto.oracle.v1.QueryParamsResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryValidatorRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryValidatorRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryValidatorRequest.displayName = - 'proto.oracle.v1.QueryValidatorRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryValidatorResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryValidatorResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryValidatorResponse.displayName = - 'proto.oracle.v1.QueryValidatorResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryIsReporterRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryIsReporterRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryIsReporterRequest.displayName = - 'proto.oracle.v1.QueryIsReporterRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryIsReporterResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryIsReporterResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryIsReporterResponse.displayName = - 'proto.oracle.v1.QueryIsReporterResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryReportersRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryReportersRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryReportersRequest.displayName = - 'proto.oracle.v1.QueryReportersRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryReportersResponse = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.QueryReportersResponse.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.QueryReportersResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryReportersResponse.displayName = - 'proto.oracle.v1.QueryReportersResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryActiveValidatorsRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryActiveValidatorsRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryActiveValidatorsRequest.displayName = - 'proto.oracle.v1.QueryActiveValidatorsRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryActiveValidatorsResponse = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.QueryActiveValidatorsResponse.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.QueryActiveValidatorsResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryActiveValidatorsResponse.displayName = - 'proto.oracle.v1.QueryActiveValidatorsResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryRequestSearchRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryRequestSearchRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryRequestSearchRequest.displayName = - 'proto.oracle.v1.QueryRequestSearchRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryRequestSearchResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryRequestSearchResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryRequestSearchResponse.displayName = - 'proto.oracle.v1.QueryRequestSearchResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryRequestPriceRequest = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.QueryRequestPriceRequest.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.QueryRequestPriceRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryRequestPriceRequest.displayName = - 'proto.oracle.v1.QueryRequestPriceRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryRequestPriceResponse = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.QueryRequestPriceResponse.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.QueryRequestPriceResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryRequestPriceResponse.displayName = - 'proto.oracle.v1.QueryRequestPriceResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryRequestVerificationRequest = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryRequestVerificationRequest, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryRequestVerificationRequest.displayName = - 'proto.oracle.v1.QueryRequestVerificationRequest' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.QueryRequestVerificationResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.QueryRequestVerificationResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.QueryRequestVerificationResponse.displayName = - 'proto.oracle.v1.QueryRequestVerificationResponse' -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryCountsRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryCountsRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryCountsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryCountsRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryCountsRequest} - */ -proto.oracle.v1.QueryCountsRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryCountsRequest() - return proto.oracle.v1.QueryCountsRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryCountsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryCountsRequest} - */ -proto.oracle.v1.QueryCountsRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryCountsRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryCountsRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryCountsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryCountsRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryCountsResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryCountsResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryCountsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryCountsResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - dataSourceCount: jspb.Message.getFieldWithDefault(msg, 1, 0), - oracleScriptCount: jspb.Message.getFieldWithDefault(msg, 2, 0), - requestCount: jspb.Message.getFieldWithDefault(msg, 3, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryCountsResponse} - */ -proto.oracle.v1.QueryCountsResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryCountsResponse() - return proto.oracle.v1.QueryCountsResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryCountsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryCountsResponse} - */ -proto.oracle.v1.QueryCountsResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setDataSourceCount(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setOracleScriptCount(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestCount(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryCountsResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryCountsResponse.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryCountsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryCountsResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getDataSourceCount() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getOracleScriptCount() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getRequestCount() - if (f !== 0) { - writer.writeUint64(3, f) - } -} - -/** - * optional uint64 data_source_count = 1; - * @return {number} - */ -proto.oracle.v1.QueryCountsResponse.prototype.getDataSourceCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryCountsResponse} returns this - */ -proto.oracle.v1.QueryCountsResponse.prototype.setDataSourceCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional uint64 oracle_script_count = 2; - * @return {number} - */ -proto.oracle.v1.QueryCountsResponse.prototype.getOracleScriptCount = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryCountsResponse} returns this - */ -proto.oracle.v1.QueryCountsResponse.prototype.setOracleScriptCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional uint64 request_count = 3; - * @return {number} - */ -proto.oracle.v1.QueryCountsResponse.prototype.getRequestCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryCountsResponse} returns this - */ -proto.oracle.v1.QueryCountsResponse.prototype.setRequestCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryDataRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryDataRequest.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryDataRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryDataRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - dataHash: jspb.Message.getFieldWithDefault(msg, 1, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryDataRequest} - */ -proto.oracle.v1.QueryDataRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryDataRequest() - return proto.oracle.v1.QueryDataRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryDataRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryDataRequest} - */ -proto.oracle.v1.QueryDataRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setDataHash(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryDataRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryDataRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryDataRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryDataRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getDataHash() - if (f.length > 0) { - writer.writeString(1, f) - } -} - -/** - * optional string data_hash = 1; - * @return {string} - */ -proto.oracle.v1.QueryDataRequest.prototype.getDataHash = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryDataRequest} returns this - */ -proto.oracle.v1.QueryDataRequest.prototype.setDataHash = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryDataResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryDataResponse.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryDataResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryDataResponse.toObject = function (includeInstance, msg) { - var f, - obj = { - data: msg.getData_asB64(), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryDataResponse} - */ -proto.oracle.v1.QueryDataResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryDataResponse() - return proto.oracle.v1.QueryDataResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryDataResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryDataResponse} - */ -proto.oracle.v1.QueryDataResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setData(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryDataResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryDataResponse.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryDataResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryDataResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getData_asU8() - if (f.length > 0) { - writer.writeBytes(1, f) - } -} - -/** - * optional bytes data = 1; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.QueryDataResponse.prototype.getData = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 1, '') - ) -} - -/** - * optional bytes data = 1; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.oracle.v1.QueryDataResponse.prototype.getData_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData())) -} - -/** - * optional bytes data = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryDataResponse.prototype.getData_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.QueryDataResponse} returns this - */ -proto.oracle.v1.QueryDataResponse.prototype.setData = function (value) { - return jspb.Message.setProto3BytesField(this, 1, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryDataSourceRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryDataSourceRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryDataSourceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryDataSourceRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - dataSourceId: jspb.Message.getFieldWithDefault(msg, 1, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryDataSourceRequest} - */ -proto.oracle.v1.QueryDataSourceRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryDataSourceRequest() - return proto.oracle.v1.QueryDataSourceRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryDataSourceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryDataSourceRequest} - */ -proto.oracle.v1.QueryDataSourceRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setDataSourceId(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryDataSourceRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryDataSourceRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryDataSourceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryDataSourceRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getDataSourceId() - if (f !== 0) { - writer.writeUint64(1, f) - } -} - -/** - * optional uint64 data_source_id = 1; - * @return {number} - */ -proto.oracle.v1.QueryDataSourceRequest.prototype.getDataSourceId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryDataSourceRequest} returns this - */ -proto.oracle.v1.QueryDataSourceRequest.prototype.setDataSourceId = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryDataSourceResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryDataSourceResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryDataSourceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryDataSourceResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - dataSource: - (f = msg.getDataSource()) && - oracle_v1_oracle_pb.DataSource.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryDataSourceResponse} - */ -proto.oracle.v1.QueryDataSourceResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryDataSourceResponse() - return proto.oracle.v1.QueryDataSourceResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryDataSourceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryDataSourceResponse} - */ -proto.oracle.v1.QueryDataSourceResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new oracle_v1_oracle_pb.DataSource() - reader.readMessage( - value, - oracle_v1_oracle_pb.DataSource.deserializeBinaryFromReader, - ) - msg.setDataSource(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryDataSourceResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryDataSourceResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryDataSourceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryDataSourceResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getDataSource() - if (f != null) { - writer.writeMessage( - 1, - f, - oracle_v1_oracle_pb.DataSource.serializeBinaryToWriter, - ) - } -} - -/** - * optional DataSource data_source = 1; - * @return {?proto.oracle.v1.DataSource} - */ -proto.oracle.v1.QueryDataSourceResponse.prototype.getDataSource = function () { - return /** @type{?proto.oracle.v1.DataSource} */ ( - jspb.Message.getWrapperField(this, oracle_v1_oracle_pb.DataSource, 1) - ) -} - -/** - * @param {?proto.oracle.v1.DataSource|undefined} value - * @return {!proto.oracle.v1.QueryDataSourceResponse} returns this - */ -proto.oracle.v1.QueryDataSourceResponse.prototype.setDataSource = function ( - value, -) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.QueryDataSourceResponse} returns this - */ -proto.oracle.v1.QueryDataSourceResponse.prototype.clearDataSource = - function () { - return this.setDataSource(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.QueryDataSourceResponse.prototype.hasDataSource = function () { - return jspb.Message.getField(this, 1) != null -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryOracleScriptRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryOracleScriptRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryOracleScriptRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryOracleScriptRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryOracleScriptRequest} - */ -proto.oracle.v1.QueryOracleScriptRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryOracleScriptRequest() - return proto.oracle.v1.QueryOracleScriptRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryOracleScriptRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryOracleScriptRequest} - */ -proto.oracle.v1.QueryOracleScriptRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setOracleScriptId(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryOracleScriptRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryOracleScriptRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryOracleScriptRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryOracleScriptRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getOracleScriptId() - if (f !== 0) { - writer.writeUint64(1, f) - } -} - -/** - * optional uint64 oracle_script_id = 1; - * @return {number} - */ -proto.oracle.v1.QueryOracleScriptRequest.prototype.getOracleScriptId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryOracleScriptRequest} returns this - */ -proto.oracle.v1.QueryOracleScriptRequest.prototype.setOracleScriptId = - function (value) { - return jspb.Message.setProto3IntField(this, 1, value) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryOracleScriptResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryOracleScriptResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryOracleScriptResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryOracleScriptResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - oracleScript: - (f = msg.getOracleScript()) && - oracle_v1_oracle_pb.OracleScript.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryOracleScriptResponse} - */ -proto.oracle.v1.QueryOracleScriptResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryOracleScriptResponse() - return proto.oracle.v1.QueryOracleScriptResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryOracleScriptResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryOracleScriptResponse} - */ -proto.oracle.v1.QueryOracleScriptResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new oracle_v1_oracle_pb.OracleScript() - reader.readMessage( - value, - oracle_v1_oracle_pb.OracleScript.deserializeBinaryFromReader, - ) - msg.setOracleScript(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryOracleScriptResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryOracleScriptResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryOracleScriptResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryOracleScriptResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getOracleScript() - if (f != null) { - writer.writeMessage( - 1, - f, - oracle_v1_oracle_pb.OracleScript.serializeBinaryToWriter, - ) - } -} - -/** - * optional OracleScript oracle_script = 1; - * @return {?proto.oracle.v1.OracleScript} - */ -proto.oracle.v1.QueryOracleScriptResponse.prototype.getOracleScript = - function () { - return /** @type{?proto.oracle.v1.OracleScript} */ ( - jspb.Message.getWrapperField(this, oracle_v1_oracle_pb.OracleScript, 1) - ) - } - -/** - * @param {?proto.oracle.v1.OracleScript|undefined} value - * @return {!proto.oracle.v1.QueryOracleScriptResponse} returns this - */ -proto.oracle.v1.QueryOracleScriptResponse.prototype.setOracleScript = function ( - value, -) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.QueryOracleScriptResponse} returns this - */ -proto.oracle.v1.QueryOracleScriptResponse.prototype.clearOracleScript = - function () { - return this.setOracleScript(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.QueryOracleScriptResponse.prototype.hasOracleScript = - function () { - return jspb.Message.getField(this, 1) != null - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryRequestRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryRequestRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryRequestRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryRequestRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - requestId: jspb.Message.getFieldWithDefault(msg, 1, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryRequestRequest} - */ -proto.oracle.v1.QueryRequestRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryRequestRequest() - return proto.oracle.v1.QueryRequestRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryRequestRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryRequestRequest} - */ -proto.oracle.v1.QueryRequestRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryRequestRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryRequestRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryRequestRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryRequestRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(1, f) - } -} - -/** - * optional uint64 request_id = 1; - * @return {number} - */ -proto.oracle.v1.QueryRequestRequest.prototype.getRequestId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestRequest} returns this - */ -proto.oracle.v1.QueryRequestRequest.prototype.setRequestId = function (value) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.QueryRequestResponse.repeatedFields_ = [2] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryRequestResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryRequestResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryRequestResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryRequestResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - request: - (f = msg.getRequest()) && - oracle_v1_oracle_pb.Request.toObject(includeInstance, f), - reportsList: jspb.Message.toObjectList( - msg.getReportsList(), - oracle_v1_oracle_pb.Report.toObject, - includeInstance, - ), - result: - (f = msg.getResult()) && - oracle_v1_oracle_pb.Result.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryRequestResponse} - */ -proto.oracle.v1.QueryRequestResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryRequestResponse() - return proto.oracle.v1.QueryRequestResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryRequestResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryRequestResponse} - */ -proto.oracle.v1.QueryRequestResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new oracle_v1_oracle_pb.Request() - reader.readMessage( - value, - oracle_v1_oracle_pb.Request.deserializeBinaryFromReader, - ) - msg.setRequest(value) - break - case 2: - var value = new oracle_v1_oracle_pb.Report() - reader.readMessage( - value, - oracle_v1_oracle_pb.Report.deserializeBinaryFromReader, - ) - msg.addReports(value) - break - case 3: - var value = new oracle_v1_oracle_pb.Result() - reader.readMessage( - value, - oracle_v1_oracle_pb.Result.deserializeBinaryFromReader, - ) - msg.setResult(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryRequestResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryRequestResponse.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryRequestResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryRequestResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getRequest() - if (f != null) { - writer.writeMessage( - 1, - f, - oracle_v1_oracle_pb.Request.serializeBinaryToWriter, - ) - } - f = message.getReportsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - oracle_v1_oracle_pb.Report.serializeBinaryToWriter, - ) - } - f = message.getResult() - if (f != null) { - writer.writeMessage( - 3, - f, - oracle_v1_oracle_pb.Result.serializeBinaryToWriter, - ) - } -} - -/** - * optional Request request = 1; - * @return {?proto.oracle.v1.Request} - */ -proto.oracle.v1.QueryRequestResponse.prototype.getRequest = function () { - return /** @type{?proto.oracle.v1.Request} */ ( - jspb.Message.getWrapperField(this, oracle_v1_oracle_pb.Request, 1) - ) -} - -/** - * @param {?proto.oracle.v1.Request|undefined} value - * @return {!proto.oracle.v1.QueryRequestResponse} returns this - */ -proto.oracle.v1.QueryRequestResponse.prototype.setRequest = function (value) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.QueryRequestResponse} returns this - */ -proto.oracle.v1.QueryRequestResponse.prototype.clearRequest = function () { - return this.setRequest(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.QueryRequestResponse.prototype.hasRequest = function () { - return jspb.Message.getField(this, 1) != null -} - -/** - * repeated Report reports = 2; - * @return {!Array} - */ -proto.oracle.v1.QueryRequestResponse.prototype.getReportsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, oracle_v1_oracle_pb.Report, 2) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.QueryRequestResponse} returns this - */ -proto.oracle.v1.QueryRequestResponse.prototype.setReportsList = function ( - value, -) { - return jspb.Message.setRepeatedWrapperField(this, 2, value) -} - -/** - * @param {!proto.oracle.v1.Report=} opt_value - * @param {number=} opt_index - * @return {!proto.oracle.v1.Report} - */ -proto.oracle.v1.QueryRequestResponse.prototype.addReports = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.oracle.v1.Report, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.QueryRequestResponse} returns this - */ -proto.oracle.v1.QueryRequestResponse.prototype.clearReportsList = function () { - return this.setReportsList([]) -} - -/** - * optional Result result = 3; - * @return {?proto.oracle.v1.Result} - */ -proto.oracle.v1.QueryRequestResponse.prototype.getResult = function () { - return /** @type{?proto.oracle.v1.Result} */ ( - jspb.Message.getWrapperField(this, oracle_v1_oracle_pb.Result, 3) - ) -} - -/** - * @param {?proto.oracle.v1.Result|undefined} value - * @return {!proto.oracle.v1.QueryRequestResponse} returns this - */ -proto.oracle.v1.QueryRequestResponse.prototype.setResult = function (value) { - return jspb.Message.setWrapperField(this, 3, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.QueryRequestResponse} returns this - */ -proto.oracle.v1.QueryRequestResponse.prototype.clearResult = function () { - return this.setResult(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.QueryRequestResponse.prototype.hasResult = function () { - return jspb.Message.getField(this, 3) != null -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryPendingRequestsRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryPendingRequestsRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryPendingRequestsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryPendingRequestsRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryPendingRequestsRequest} - */ -proto.oracle.v1.QueryPendingRequestsRequest.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryPendingRequestsRequest() - return proto.oracle.v1.QueryPendingRequestsRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryPendingRequestsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryPendingRequestsRequest} - */ -proto.oracle.v1.QueryPendingRequestsRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setValidatorAddress(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryPendingRequestsRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryPendingRequestsRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryPendingRequestsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryPendingRequestsRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getValidatorAddress() - if (f.length > 0) { - writer.writeString(1, f) - } -} - -/** - * optional string validator_address = 1; - * @return {string} - */ -proto.oracle.v1.QueryPendingRequestsRequest.prototype.getValidatorAddress = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryPendingRequestsRequest} returns this - */ -proto.oracle.v1.QueryPendingRequestsRequest.prototype.setValidatorAddress = - function (value) { - return jspb.Message.setProto3StringField(this, 1, value) - } - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.QueryPendingRequestsResponse.repeatedFields_ = [1] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryPendingRequestsResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryPendingRequestsResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryPendingRequestsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryPendingRequestsResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - requestIdsList: - (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryPendingRequestsResponse} - */ -proto.oracle.v1.QueryPendingRequestsResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryPendingRequestsResponse() - return proto.oracle.v1.QueryPendingRequestsResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryPendingRequestsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryPendingRequestsResponse} - */ -proto.oracle.v1.QueryPendingRequestsResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var values = /** @type {!Array} */ ( - reader.isDelimited() - ? reader.readPackedUint64() - : [reader.readUint64()] - ) - for (var i = 0; i < values.length; i++) { - msg.addRequestIds(values[i]) - } - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryPendingRequestsResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryPendingRequestsResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryPendingRequestsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryPendingRequestsResponse.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getRequestIdsList() - if (f.length > 0) { - writer.writePackedUint64(1, f) - } - } - -/** - * repeated uint64 request_ids = 1; - * @return {!Array} - */ -proto.oracle.v1.QueryPendingRequestsResponse.prototype.getRequestIdsList = - function () { - return /** @type {!Array} */ ( - jspb.Message.getRepeatedField(this, 1) - ) - } - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.QueryPendingRequestsResponse} returns this - */ -proto.oracle.v1.QueryPendingRequestsResponse.prototype.setRequestIdsList = - function (value) { - return jspb.Message.setField(this, 1, value || []) - } - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.oracle.v1.QueryPendingRequestsResponse} returns this - */ -proto.oracle.v1.QueryPendingRequestsResponse.prototype.addRequestIds = - function (value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index) - } - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.QueryPendingRequestsResponse} returns this - */ -proto.oracle.v1.QueryPendingRequestsResponse.prototype.clearRequestIdsList = - function () { - return this.setRequestIdsList([]) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryParamsRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryParamsRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryParamsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryParamsRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryParamsRequest} - */ -proto.oracle.v1.QueryParamsRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryParamsRequest() - return proto.oracle.v1.QueryParamsRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryParamsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryParamsRequest} - */ -proto.oracle.v1.QueryParamsRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryParamsRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryParamsRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryParamsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryParamsRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryParamsResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryParamsResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryParamsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryParamsResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - params: - (f = msg.getParams()) && - oracle_v1_oracle_pb.Params.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryParamsResponse} - */ -proto.oracle.v1.QueryParamsResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryParamsResponse() - return proto.oracle.v1.QueryParamsResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryParamsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryParamsResponse} - */ -proto.oracle.v1.QueryParamsResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new oracle_v1_oracle_pb.Params() - reader.readMessage( - value, - oracle_v1_oracle_pb.Params.deserializeBinaryFromReader, - ) - msg.setParams(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryParamsResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryParamsResponse.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryParamsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryParamsResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getParams() - if (f != null) { - writer.writeMessage( - 1, - f, - oracle_v1_oracle_pb.Params.serializeBinaryToWriter, - ) - } -} - -/** - * optional Params params = 1; - * @return {?proto.oracle.v1.Params} - */ -proto.oracle.v1.QueryParamsResponse.prototype.getParams = function () { - return /** @type{?proto.oracle.v1.Params} */ ( - jspb.Message.getWrapperField(this, oracle_v1_oracle_pb.Params, 1) - ) -} - -/** - * @param {?proto.oracle.v1.Params|undefined} value - * @return {!proto.oracle.v1.QueryParamsResponse} returns this - */ -proto.oracle.v1.QueryParamsResponse.prototype.setParams = function (value) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.QueryParamsResponse} returns this - */ -proto.oracle.v1.QueryParamsResponse.prototype.clearParams = function () { - return this.setParams(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.QueryParamsResponse.prototype.hasParams = function () { - return jspb.Message.getField(this, 1) != null -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryValidatorRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryValidatorRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryValidatorRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryValidatorRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryValidatorRequest} - */ -proto.oracle.v1.QueryValidatorRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryValidatorRequest() - return proto.oracle.v1.QueryValidatorRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryValidatorRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryValidatorRequest} - */ -proto.oracle.v1.QueryValidatorRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setValidatorAddress(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryValidatorRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryValidatorRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryValidatorRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryValidatorRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getValidatorAddress() - if (f.length > 0) { - writer.writeString(1, f) - } -} - -/** - * optional string validator_address = 1; - * @return {string} - */ -proto.oracle.v1.QueryValidatorRequest.prototype.getValidatorAddress = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryValidatorRequest} returns this - */ -proto.oracle.v1.QueryValidatorRequest.prototype.setValidatorAddress = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryValidatorResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryValidatorResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryValidatorResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryValidatorResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - status: - (f = msg.getStatus()) && - oracle_v1_oracle_pb.ValidatorStatus.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryValidatorResponse} - */ -proto.oracle.v1.QueryValidatorResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryValidatorResponse() - return proto.oracle.v1.QueryValidatorResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryValidatorResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryValidatorResponse} - */ -proto.oracle.v1.QueryValidatorResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new oracle_v1_oracle_pb.ValidatorStatus() - reader.readMessage( - value, - oracle_v1_oracle_pb.ValidatorStatus.deserializeBinaryFromReader, - ) - msg.setStatus(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryValidatorResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryValidatorResponse.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryValidatorResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryValidatorResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getStatus() - if (f != null) { - writer.writeMessage( - 1, - f, - oracle_v1_oracle_pb.ValidatorStatus.serializeBinaryToWriter, - ) - } -} - -/** - * optional ValidatorStatus status = 1; - * @return {?proto.oracle.v1.ValidatorStatus} - */ -proto.oracle.v1.QueryValidatorResponse.prototype.getStatus = function () { - return /** @type{?proto.oracle.v1.ValidatorStatus} */ ( - jspb.Message.getWrapperField(this, oracle_v1_oracle_pb.ValidatorStatus, 1) - ) -} - -/** - * @param {?proto.oracle.v1.ValidatorStatus|undefined} value - * @return {!proto.oracle.v1.QueryValidatorResponse} returns this - */ -proto.oracle.v1.QueryValidatorResponse.prototype.setStatus = function (value) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.QueryValidatorResponse} returns this - */ -proto.oracle.v1.QueryValidatorResponse.prototype.clearStatus = function () { - return this.setStatus(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.QueryValidatorResponse.prototype.hasStatus = function () { - return jspb.Message.getField(this, 1) != null -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryIsReporterRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryIsReporterRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryIsReporterRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryIsReporterRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ''), - reporterAddress: jspb.Message.getFieldWithDefault(msg, 2, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryIsReporterRequest} - */ -proto.oracle.v1.QueryIsReporterRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryIsReporterRequest() - return proto.oracle.v1.QueryIsReporterRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryIsReporterRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryIsReporterRequest} - */ -proto.oracle.v1.QueryIsReporterRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setValidatorAddress(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setReporterAddress(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryIsReporterRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryIsReporterRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryIsReporterRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryIsReporterRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getValidatorAddress() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getReporterAddress() - if (f.length > 0) { - writer.writeString(2, f) - } -} - -/** - * optional string validator_address = 1; - * @return {string} - */ -proto.oracle.v1.QueryIsReporterRequest.prototype.getValidatorAddress = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryIsReporterRequest} returns this - */ -proto.oracle.v1.QueryIsReporterRequest.prototype.setValidatorAddress = - function (value) { - return jspb.Message.setProto3StringField(this, 1, value) - } - -/** - * optional string reporter_address = 2; - * @return {string} - */ -proto.oracle.v1.QueryIsReporterRequest.prototype.getReporterAddress = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryIsReporterRequest} returns this - */ -proto.oracle.v1.QueryIsReporterRequest.prototype.setReporterAddress = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryIsReporterResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryIsReporterResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryIsReporterResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryIsReporterResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - isReporter: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryIsReporterResponse} - */ -proto.oracle.v1.QueryIsReporterResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryIsReporterResponse() - return proto.oracle.v1.QueryIsReporterResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryIsReporterResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryIsReporterResponse} - */ -proto.oracle.v1.QueryIsReporterResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()) - msg.setIsReporter(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryIsReporterResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryIsReporterResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryIsReporterResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryIsReporterResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getIsReporter() - if (f) { - writer.writeBool(1, f) - } -} - -/** - * optional bool is_reporter = 1; - * @return {boolean} - */ -proto.oracle.v1.QueryIsReporterResponse.prototype.getIsReporter = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 1, false) - ) -} - -/** - * @param {boolean} value - * @return {!proto.oracle.v1.QueryIsReporterResponse} returns this - */ -proto.oracle.v1.QueryIsReporterResponse.prototype.setIsReporter = function ( - value, -) { - return jspb.Message.setProto3BooleanField(this, 1, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryReportersRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryReportersRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryReportersRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryReportersRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryReportersRequest} - */ -proto.oracle.v1.QueryReportersRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryReportersRequest() - return proto.oracle.v1.QueryReportersRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryReportersRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryReportersRequest} - */ -proto.oracle.v1.QueryReportersRequest.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setValidatorAddress(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryReportersRequest.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryReportersRequest.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryReportersRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryReportersRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getValidatorAddress() - if (f.length > 0) { - writer.writeString(1, f) - } -} - -/** - * optional string validator_address = 1; - * @return {string} - */ -proto.oracle.v1.QueryReportersRequest.prototype.getValidatorAddress = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryReportersRequest} returns this - */ -proto.oracle.v1.QueryReportersRequest.prototype.setValidatorAddress = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.QueryReportersResponse.repeatedFields_ = [1] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryReportersResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryReportersResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryReportersResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryReportersResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - reporterList: - (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryReportersResponse} - */ -proto.oracle.v1.QueryReportersResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryReportersResponse() - return proto.oracle.v1.QueryReportersResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryReportersResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryReportersResponse} - */ -proto.oracle.v1.QueryReportersResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.addReporter(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryReportersResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryReportersResponse.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryReportersResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryReportersResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getReporterList() - if (f.length > 0) { - writer.writeRepeatedString(1, f) - } -} - -/** - * repeated string reporter = 1; - * @return {!Array} - */ -proto.oracle.v1.QueryReportersResponse.prototype.getReporterList = function () { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.QueryReportersResponse} returns this - */ -proto.oracle.v1.QueryReportersResponse.prototype.setReporterList = function ( - value, -) { - return jspb.Message.setField(this, 1, value || []) -} - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.oracle.v1.QueryReportersResponse} returns this - */ -proto.oracle.v1.QueryReportersResponse.prototype.addReporter = function ( - value, - opt_index, -) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.QueryReportersResponse} returns this - */ -proto.oracle.v1.QueryReportersResponse.prototype.clearReporterList = - function () { - return this.setReporterList([]) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryActiveValidatorsRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryActiveValidatorsRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryActiveValidatorsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryActiveValidatorsRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryActiveValidatorsRequest} - */ -proto.oracle.v1.QueryActiveValidatorsRequest.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryActiveValidatorsRequest() - return proto.oracle.v1.QueryActiveValidatorsRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryActiveValidatorsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryActiveValidatorsRequest} - */ -proto.oracle.v1.QueryActiveValidatorsRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryActiveValidatorsRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryActiveValidatorsRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryActiveValidatorsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryActiveValidatorsRequest.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - } - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.QueryActiveValidatorsResponse.repeatedFields_ = [1] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryActiveValidatorsResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryActiveValidatorsResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryActiveValidatorsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryActiveValidatorsResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - validatorsList: jspb.Message.toObjectList( - msg.getValidatorsList(), - oracle_v1_oracle_pb.ActiveValidator.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryActiveValidatorsResponse} - */ -proto.oracle.v1.QueryActiveValidatorsResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryActiveValidatorsResponse() - return proto.oracle.v1.QueryActiveValidatorsResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryActiveValidatorsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryActiveValidatorsResponse} - */ -proto.oracle.v1.QueryActiveValidatorsResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new oracle_v1_oracle_pb.ActiveValidator() - reader.readMessage( - value, - oracle_v1_oracle_pb.ActiveValidator.deserializeBinaryFromReader, - ) - msg.addValidators(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryActiveValidatorsResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryActiveValidatorsResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryActiveValidatorsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryActiveValidatorsResponse.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getValidatorsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - oracle_v1_oracle_pb.ActiveValidator.serializeBinaryToWriter, - ) - } - } - -/** - * repeated ActiveValidator validators = 1; - * @return {!Array} - */ -proto.oracle.v1.QueryActiveValidatorsResponse.prototype.getValidatorsList = - function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - oracle_v1_oracle_pb.ActiveValidator, - 1, - ) - ) - } - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.QueryActiveValidatorsResponse} returns this - */ -proto.oracle.v1.QueryActiveValidatorsResponse.prototype.setValidatorsList = - function (value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value) - } - -/** - * @param {!proto.oracle.v1.ActiveValidator=} opt_value - * @param {number=} opt_index - * @return {!proto.oracle.v1.ActiveValidator} - */ -proto.oracle.v1.QueryActiveValidatorsResponse.prototype.addValidators = - function (opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 1, - opt_value, - proto.oracle.v1.ActiveValidator, - opt_index, - ) - } - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.QueryActiveValidatorsResponse} returns this - */ -proto.oracle.v1.QueryActiveValidatorsResponse.prototype.clearValidatorsList = - function () { - return this.setValidatorsList([]) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryRequestSearchRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryRequestSearchRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryRequestSearchRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryRequestSearchRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), - calldata: jspb.Message.getFieldWithDefault(msg, 2, ''), - askCount: jspb.Message.getFieldWithDefault(msg, 3, 0), - minCount: jspb.Message.getFieldWithDefault(msg, 4, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryRequestSearchRequest} - */ -proto.oracle.v1.QueryRequestSearchRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryRequestSearchRequest() - return proto.oracle.v1.QueryRequestSearchRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryRequestSearchRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryRequestSearchRequest} - */ -proto.oracle.v1.QueryRequestSearchRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setOracleScriptId(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setCalldata(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setAskCount(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMinCount(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryRequestSearchRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryRequestSearchRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryRequestSearchRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryRequestSearchRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getOracleScriptId() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getCalldata() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getAskCount() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getMinCount() - if (f !== 0) { - writer.writeUint64(4, f) - } -} - -/** - * optional uint64 oracle_script_id = 1; - * @return {number} - */ -proto.oracle.v1.QueryRequestSearchRequest.prototype.getOracleScriptId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestSearchRequest} returns this - */ -proto.oracle.v1.QueryRequestSearchRequest.prototype.setOracleScriptId = - function (value) { - return jspb.Message.setProto3IntField(this, 1, value) - } - -/** - * optional string calldata = 2; - * @return {string} - */ -proto.oracle.v1.QueryRequestSearchRequest.prototype.getCalldata = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryRequestSearchRequest} returns this - */ -proto.oracle.v1.QueryRequestSearchRequest.prototype.setCalldata = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -/** - * optional uint64 ask_count = 3; - * @return {number} - */ -proto.oracle.v1.QueryRequestSearchRequest.prototype.getAskCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestSearchRequest} returns this - */ -proto.oracle.v1.QueryRequestSearchRequest.prototype.setAskCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -/** - * optional uint64 min_count = 4; - * @return {number} - */ -proto.oracle.v1.QueryRequestSearchRequest.prototype.getMinCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestSearchRequest} returns this - */ -proto.oracle.v1.QueryRequestSearchRequest.prototype.setMinCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 4, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryRequestSearchResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryRequestSearchResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryRequestSearchResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryRequestSearchResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - request: - (f = msg.getRequest()) && - proto.oracle.v1.QueryRequestResponse.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryRequestSearchResponse} - */ -proto.oracle.v1.QueryRequestSearchResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryRequestSearchResponse() - return proto.oracle.v1.QueryRequestSearchResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryRequestSearchResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryRequestSearchResponse} - */ -proto.oracle.v1.QueryRequestSearchResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new proto.oracle.v1.QueryRequestResponse() - reader.readMessage( - value, - proto.oracle.v1.QueryRequestResponse.deserializeBinaryFromReader, - ) - msg.setRequest(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryRequestSearchResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryRequestSearchResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryRequestSearchResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryRequestSearchResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getRequest() - if (f != null) { - writer.writeMessage( - 1, - f, - proto.oracle.v1.QueryRequestResponse.serializeBinaryToWriter, - ) - } -} - -/** - * optional QueryRequestResponse request = 1; - * @return {?proto.oracle.v1.QueryRequestResponse} - */ -proto.oracle.v1.QueryRequestSearchResponse.prototype.getRequest = function () { - return /** @type{?proto.oracle.v1.QueryRequestResponse} */ ( - jspb.Message.getWrapperField(this, proto.oracle.v1.QueryRequestResponse, 1) - ) -} - -/** - * @param {?proto.oracle.v1.QueryRequestResponse|undefined} value - * @return {!proto.oracle.v1.QueryRequestSearchResponse} returns this - */ -proto.oracle.v1.QueryRequestSearchResponse.prototype.setRequest = function ( - value, -) { - return jspb.Message.setWrapperField(this, 1, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.QueryRequestSearchResponse} returns this - */ -proto.oracle.v1.QueryRequestSearchResponse.prototype.clearRequest = - function () { - return this.setRequest(undefined) - } - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.QueryRequestSearchResponse.prototype.hasRequest = function () { - return jspb.Message.getField(this, 1) != null -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.QueryRequestPriceRequest.repeatedFields_ = [1] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryRequestPriceRequest.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryRequestPriceRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryRequestPriceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryRequestPriceRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - symbolsList: - (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - askCount: jspb.Message.getFieldWithDefault(msg, 2, 0), - minCount: jspb.Message.getFieldWithDefault(msg, 3, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryRequestPriceRequest} - */ -proto.oracle.v1.QueryRequestPriceRequest.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryRequestPriceRequest() - return proto.oracle.v1.QueryRequestPriceRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryRequestPriceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryRequestPriceRequest} - */ -proto.oracle.v1.QueryRequestPriceRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.addSymbols(value) - break - case 2: - var value = /** @type {number} */ (reader.readUint64()) - msg.setAskCount(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMinCount(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryRequestPriceRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryRequestPriceRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryRequestPriceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryRequestPriceRequest.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getSymbolsList() - if (f.length > 0) { - writer.writeRepeatedString(1, f) - } - f = message.getAskCount() - if (f !== 0) { - writer.writeUint64(2, f) - } - f = message.getMinCount() - if (f !== 0) { - writer.writeUint64(3, f) - } -} - -/** - * repeated string symbols = 1; - * @return {!Array} - */ -proto.oracle.v1.QueryRequestPriceRequest.prototype.getSymbolsList = - function () { - return /** @type {!Array} */ ( - jspb.Message.getRepeatedField(this, 1) - ) - } - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.QueryRequestPriceRequest} returns this - */ -proto.oracle.v1.QueryRequestPriceRequest.prototype.setSymbolsList = function ( - value, -) { - return jspb.Message.setField(this, 1, value || []) -} - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.oracle.v1.QueryRequestPriceRequest} returns this - */ -proto.oracle.v1.QueryRequestPriceRequest.prototype.addSymbols = function ( - value, - opt_index, -) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.QueryRequestPriceRequest} returns this - */ -proto.oracle.v1.QueryRequestPriceRequest.prototype.clearSymbolsList = - function () { - return this.setSymbolsList([]) - } - -/** - * optional uint64 ask_count = 2; - * @return {number} - */ -proto.oracle.v1.QueryRequestPriceRequest.prototype.getAskCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestPriceRequest} returns this - */ -proto.oracle.v1.QueryRequestPriceRequest.prototype.setAskCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 2, value) -} - -/** - * optional uint64 min_count = 3; - * @return {number} - */ -proto.oracle.v1.QueryRequestPriceRequest.prototype.getMinCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestPriceRequest} returns this - */ -proto.oracle.v1.QueryRequestPriceRequest.prototype.setMinCount = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.QueryRequestPriceResponse.repeatedFields_ = [1] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryRequestPriceResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.QueryRequestPriceResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryRequestPriceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryRequestPriceResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - priceResultsList: jspb.Message.toObjectList( - msg.getPriceResultsList(), - oracle_v1_oracle_pb.PriceResult.toObject, - includeInstance, - ), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryRequestPriceResponse} - */ -proto.oracle.v1.QueryRequestPriceResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryRequestPriceResponse() - return proto.oracle.v1.QueryRequestPriceResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryRequestPriceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryRequestPriceResponse} - */ -proto.oracle.v1.QueryRequestPriceResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = new oracle_v1_oracle_pb.PriceResult() - reader.readMessage( - value, - oracle_v1_oracle_pb.PriceResult.deserializeBinaryFromReader, - ) - msg.addPriceResults(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryRequestPriceResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryRequestPriceResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryRequestPriceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryRequestPriceResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getPriceResultsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - oracle_v1_oracle_pb.PriceResult.serializeBinaryToWriter, - ) - } -} - -/** - * repeated PriceResult price_results = 1; - * @return {!Array} - */ -proto.oracle.v1.QueryRequestPriceResponse.prototype.getPriceResultsList = - function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - oracle_v1_oracle_pb.PriceResult, - 1, - ) - ) - } - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.QueryRequestPriceResponse} returns this - */ -proto.oracle.v1.QueryRequestPriceResponse.prototype.setPriceResultsList = - function (value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value) - } - -/** - * @param {!proto.oracle.v1.PriceResult=} opt_value - * @param {number=} opt_index - * @return {!proto.oracle.v1.PriceResult} - */ -proto.oracle.v1.QueryRequestPriceResponse.prototype.addPriceResults = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 1, - opt_value, - proto.oracle.v1.PriceResult, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.QueryRequestPriceResponse} returns this - */ -proto.oracle.v1.QueryRequestPriceResponse.prototype.clearPriceResultsList = - function () { - return this.setPriceResultsList([]) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryRequestVerificationRequest.prototype.toObject = - function (opt_includeInstance) { - return proto.oracle.v1.QueryRequestVerificationRequest.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryRequestVerificationRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryRequestVerificationRequest.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - chainId: jspb.Message.getFieldWithDefault(msg, 1, ''), - validator: jspb.Message.getFieldWithDefault(msg, 2, ''), - requestId: jspb.Message.getFieldWithDefault(msg, 3, 0), - externalId: jspb.Message.getFieldWithDefault(msg, 4, 0), - dataSourceId: jspb.Message.getFieldWithDefault(msg, 5, 0), - reporter: jspb.Message.getFieldWithDefault(msg, 6, ''), - signature: msg.getSignature_asB64(), - maxDelay: jspb.Message.getFieldWithDefault(msg, 8, 0), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} - */ -proto.oracle.v1.QueryRequestVerificationRequest.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryRequestVerificationRequest() - return proto.oracle.v1.QueryRequestVerificationRequest.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryRequestVerificationRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} - */ -proto.oracle.v1.QueryRequestVerificationRequest.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setChainId(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setValidator(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setExternalId(value) - break - case 5: - var value = /** @type {number} */ (reader.readUint64()) - msg.setDataSourceId(value) - break - case 6: - var value = /** @type {string} */ (reader.readString()) - msg.setReporter(value) - break - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setSignature(value) - break - case 8: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMaxDelay(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryRequestVerificationRequest.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryRequestVerificationRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryRequestVerificationRequest.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getChainId() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getValidator() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getExternalId() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getDataSourceId() - if (f !== 0) { - writer.writeUint64(5, f) - } - f = message.getReporter() - if (f.length > 0) { - writer.writeString(6, f) - } - f = message.getSignature_asU8() - if (f.length > 0) { - writer.writeBytes(7, f) - } - f = message.getMaxDelay() - if (f !== 0) { - writer.writeUint64(8, f) - } - } - -/** - * optional string chain_id = 1; - * @return {string} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getChainId = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} returns this - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.setChainId = - function (value) { - return jspb.Message.setProto3StringField(this, 1, value) - } - -/** - * optional string validator = 2; - * @return {string} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getValidator = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} returns this - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.setValidator = - function (value) { - return jspb.Message.setProto3StringField(this, 2, value) - } - -/** - * optional uint64 request_id = 3; - * @return {number} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getRequestId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} returns this - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.setRequestId = - function (value) { - return jspb.Message.setProto3IntField(this, 3, value) - } - -/** - * optional uint64 external_id = 4; - * @return {number} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getExternalId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} returns this - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.setExternalId = - function (value) { - return jspb.Message.setProto3IntField(this, 4, value) - } - -/** - * optional uint64 data_source_id = 5; - * @return {number} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getDataSourceId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} returns this - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.setDataSourceId = - function (value) { - return jspb.Message.setProto3IntField(this, 5, value) - } - -/** - * optional string reporter = 6; - * @return {string} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getReporter = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} returns this - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.setReporter = - function (value) { - return jspb.Message.setProto3StringField(this, 6, value) - } - -/** - * optional bytes signature = 7; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getSignature = - function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 7, '') - ) - } - -/** - * optional bytes signature = 7; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getSignature_asB64 = - function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getSignature())) - } - -/** - * optional bytes signature = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getSignature_asU8 = - function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getSignature()) - ) - } - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} returns this - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.setSignature = - function (value) { - return jspb.Message.setProto3BytesField(this, 7, value) - } - -/** - * optional uint64 max_delay = 8; - * @return {number} - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.getMaxDelay = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestVerificationRequest} returns this - */ -proto.oracle.v1.QueryRequestVerificationRequest.prototype.setMaxDelay = - function (value) { - return jspb.Message.setProto3IntField(this, 8, value) - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.QueryRequestVerificationResponse.prototype.toObject = - function (opt_includeInstance) { - return proto.oracle.v1.QueryRequestVerificationResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.QueryRequestVerificationResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.QueryRequestVerificationResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - chainId: jspb.Message.getFieldWithDefault(msg, 1, ''), - validator: jspb.Message.getFieldWithDefault(msg, 2, ''), - requestId: jspb.Message.getFieldWithDefault(msg, 3, 0), - externalId: jspb.Message.getFieldWithDefault(msg, 4, 0), - dataSourceId: jspb.Message.getFieldWithDefault(msg, 5, 0), - isDelay: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.QueryRequestVerificationResponse} - */ -proto.oracle.v1.QueryRequestVerificationResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.QueryRequestVerificationResponse() - return proto.oracle.v1.QueryRequestVerificationResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.QueryRequestVerificationResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.QueryRequestVerificationResponse} - */ -proto.oracle.v1.QueryRequestVerificationResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setChainId(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setValidator(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setExternalId(value) - break - case 5: - var value = /** @type {number} */ (reader.readUint64()) - msg.setDataSourceId(value) - break - case 6: - var value = /** @type {boolean} */ (reader.readBool()) - msg.setIsDelay(value) - break - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.QueryRequestVerificationResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.QueryRequestVerificationResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.QueryRequestVerificationResponse.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - f = message.getChainId() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getValidator() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getExternalId() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getDataSourceId() - if (f !== 0) { - writer.writeUint64(5, f) - } - f = message.getIsDelay() - if (f) { - writer.writeBool(6, f) - } - } - -/** - * optional string chain_id = 1; - * @return {string} - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.getChainId = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryRequestVerificationResponse} returns this - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.setChainId = - function (value) { - return jspb.Message.setProto3StringField(this, 1, value) - } - -/** - * optional string validator = 2; - * @return {string} - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.getValidator = - function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) - } - -/** - * @param {string} value - * @return {!proto.oracle.v1.QueryRequestVerificationResponse} returns this - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.setValidator = - function (value) { - return jspb.Message.setProto3StringField(this, 2, value) - } - -/** - * optional uint64 request_id = 3; - * @return {number} - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.getRequestId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestVerificationResponse} returns this - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.setRequestId = - function (value) { - return jspb.Message.setProto3IntField(this, 3, value) - } - -/** - * optional uint64 external_id = 4; - * @return {number} - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.getExternalId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestVerificationResponse} returns this - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.setExternalId = - function (value) { - return jspb.Message.setProto3IntField(this, 4, value) - } - -/** - * optional uint64 data_source_id = 5; - * @return {number} - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.getDataSourceId = - function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)) - } - -/** - * @param {number} value - * @return {!proto.oracle.v1.QueryRequestVerificationResponse} returns this - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.setDataSourceId = - function (value) { - return jspb.Message.setProto3IntField(this, 5, value) - } - -/** - * optional bool is_delay = 6; - * @return {boolean} - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.getIsDelay = - function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 6, false) - ) - } - -/** - * @param {boolean} value - * @return {!proto.oracle.v1.QueryRequestVerificationResponse} returns this - */ -proto.oracle.v1.QueryRequestVerificationResponse.prototype.setIsDelay = - function (value) { - return jspb.Message.setProto3BooleanField(this, 6, value) - } - -goog.object.extend(exports, proto.oracle.v1) diff --git a/proto/oracle/v1/query_pb_service.d.ts b/proto/oracle/v1/query_pb_service.d.ts deleted file mode 100644 index 148275d..0000000 --- a/proto/oracle/v1/query_pb_service.d.ts +++ /dev/null @@ -1,406 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/query.proto - -import * as oracle_v1_query_pb from '../../oracle/v1/query_pb' -import { grpc } from '@improbable-eng/grpc-web' - -type QueryCounts = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryCountsRequest - readonly responseType: typeof oracle_v1_query_pb.QueryCountsResponse -} - -type QueryData = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryDataRequest - readonly responseType: typeof oracle_v1_query_pb.QueryDataResponse -} - -type QueryDataSource = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryDataSourceRequest - readonly responseType: typeof oracle_v1_query_pb.QueryDataSourceResponse -} - -type QueryOracleScript = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryOracleScriptRequest - readonly responseType: typeof oracle_v1_query_pb.QueryOracleScriptResponse -} - -type QueryRequest = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryRequestRequest - readonly responseType: typeof oracle_v1_query_pb.QueryRequestResponse -} - -type QueryPendingRequests = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryPendingRequestsRequest - readonly responseType: typeof oracle_v1_query_pb.QueryPendingRequestsResponse -} - -type QueryValidator = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryValidatorRequest - readonly responseType: typeof oracle_v1_query_pb.QueryValidatorResponse -} - -type QueryIsReporter = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryIsReporterRequest - readonly responseType: typeof oracle_v1_query_pb.QueryIsReporterResponse -} - -type QueryReporters = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryReportersRequest - readonly responseType: typeof oracle_v1_query_pb.QueryReportersResponse -} - -type QueryActiveValidators = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryActiveValidatorsRequest - readonly responseType: typeof oracle_v1_query_pb.QueryActiveValidatorsResponse -} - -type QueryParams = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryParamsRequest - readonly responseType: typeof oracle_v1_query_pb.QueryParamsResponse -} - -type QueryRequestSearch = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryRequestSearchRequest - readonly responseType: typeof oracle_v1_query_pb.QueryRequestSearchResponse -} - -type QueryRequestPrice = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryRequestPriceRequest - readonly responseType: typeof oracle_v1_query_pb.QueryRequestPriceResponse -} - -type QueryRequestVerification = { - readonly methodName: string - readonly service: typeof Query - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_query_pb.QueryRequestVerificationRequest - readonly responseType: typeof oracle_v1_query_pb.QueryRequestVerificationResponse -} - -export class Query { - static readonly serviceName: string - static readonly Counts: QueryCounts - static readonly Data: QueryData - static readonly DataSource: QueryDataSource - static readonly OracleScript: QueryOracleScript - static readonly Request: QueryRequest - static readonly PendingRequests: QueryPendingRequests - static readonly Validator: QueryValidator - static readonly IsReporter: QueryIsReporter - static readonly Reporters: QueryReporters - static readonly ActiveValidators: QueryActiveValidators - static readonly Params: QueryParams - static readonly RequestSearch: QueryRequestSearch - static readonly RequestPrice: QueryRequestPrice - static readonly RequestVerification: QueryRequestVerification -} - -export type ServiceError = { - message: string - code: number - metadata: grpc.Metadata -} -export type Status = { details: string; code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void -} -interface ResponseStream { - cancel(): void - on(type: 'data', handler: (message: T) => void): ResponseStream - on(type: 'end', handler: (status?: Status) => void): ResponseStream - on(type: 'status', handler: (status: Status) => void): ResponseStream -} -interface RequestStream { - write(message: T): RequestStream - end(): void - cancel(): void - on(type: 'end', handler: (status?: Status) => void): RequestStream - on(type: 'status', handler: (status: Status) => void): RequestStream -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream - end(): void - cancel(): void - on( - type: 'data', - handler: (message: ResT) => void, - ): BidirectionalStream - on( - type: 'end', - handler: (status?: Status) => void, - ): BidirectionalStream - on( - type: 'status', - handler: (status: Status) => void, - ): BidirectionalStream -} - -export class QueryClient { - readonly serviceHost: string - - constructor(serviceHost: string, options?: grpc.RpcOptions) - counts( - requestMessage: oracle_v1_query_pb.QueryCountsRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryCountsResponse | null, - ) => void, - ): UnaryResponse - counts( - requestMessage: oracle_v1_query_pb.QueryCountsRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryCountsResponse | null, - ) => void, - ): UnaryResponse - data( - requestMessage: oracle_v1_query_pb.QueryDataRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryDataResponse | null, - ) => void, - ): UnaryResponse - data( - requestMessage: oracle_v1_query_pb.QueryDataRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryDataResponse | null, - ) => void, - ): UnaryResponse - dataSource( - requestMessage: oracle_v1_query_pb.QueryDataSourceRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryDataSourceResponse | null, - ) => void, - ): UnaryResponse - dataSource( - requestMessage: oracle_v1_query_pb.QueryDataSourceRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryDataSourceResponse | null, - ) => void, - ): UnaryResponse - oracleScript( - requestMessage: oracle_v1_query_pb.QueryOracleScriptRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryOracleScriptResponse | null, - ) => void, - ): UnaryResponse - oracleScript( - requestMessage: oracle_v1_query_pb.QueryOracleScriptRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryOracleScriptResponse | null, - ) => void, - ): UnaryResponse - request( - requestMessage: oracle_v1_query_pb.QueryRequestRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryRequestResponse | null, - ) => void, - ): UnaryResponse - request( - requestMessage: oracle_v1_query_pb.QueryRequestRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryRequestResponse | null, - ) => void, - ): UnaryResponse - pendingRequests( - requestMessage: oracle_v1_query_pb.QueryPendingRequestsRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryPendingRequestsResponse | null, - ) => void, - ): UnaryResponse - pendingRequests( - requestMessage: oracle_v1_query_pb.QueryPendingRequestsRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryPendingRequestsResponse | null, - ) => void, - ): UnaryResponse - validator( - requestMessage: oracle_v1_query_pb.QueryValidatorRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryValidatorResponse | null, - ) => void, - ): UnaryResponse - validator( - requestMessage: oracle_v1_query_pb.QueryValidatorRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryValidatorResponse | null, - ) => void, - ): UnaryResponse - isReporter( - requestMessage: oracle_v1_query_pb.QueryIsReporterRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryIsReporterResponse | null, - ) => void, - ): UnaryResponse - isReporter( - requestMessage: oracle_v1_query_pb.QueryIsReporterRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryIsReporterResponse | null, - ) => void, - ): UnaryResponse - reporters( - requestMessage: oracle_v1_query_pb.QueryReportersRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryReportersResponse | null, - ) => void, - ): UnaryResponse - reporters( - requestMessage: oracle_v1_query_pb.QueryReportersRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryReportersResponse | null, - ) => void, - ): UnaryResponse - activeValidators( - requestMessage: oracle_v1_query_pb.QueryActiveValidatorsRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryActiveValidatorsResponse | null, - ) => void, - ): UnaryResponse - activeValidators( - requestMessage: oracle_v1_query_pb.QueryActiveValidatorsRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryActiveValidatorsResponse | null, - ) => void, - ): UnaryResponse - params( - requestMessage: oracle_v1_query_pb.QueryParamsRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryParamsResponse | null, - ) => void, - ): UnaryResponse - params( - requestMessage: oracle_v1_query_pb.QueryParamsRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryParamsResponse | null, - ) => void, - ): UnaryResponse - requestSearch( - requestMessage: oracle_v1_query_pb.QueryRequestSearchRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryRequestSearchResponse | null, - ) => void, - ): UnaryResponse - requestSearch( - requestMessage: oracle_v1_query_pb.QueryRequestSearchRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryRequestSearchResponse | null, - ) => void, - ): UnaryResponse - requestPrice( - requestMessage: oracle_v1_query_pb.QueryRequestPriceRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryRequestPriceResponse | null, - ) => void, - ): UnaryResponse - requestPrice( - requestMessage: oracle_v1_query_pb.QueryRequestPriceRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryRequestPriceResponse | null, - ) => void, - ): UnaryResponse - requestVerification( - requestMessage: oracle_v1_query_pb.QueryRequestVerificationRequest, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryRequestVerificationResponse | null, - ) => void, - ): UnaryResponse - requestVerification( - requestMessage: oracle_v1_query_pb.QueryRequestVerificationRequest, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_query_pb.QueryRequestVerificationResponse | null, - ) => void, - ): UnaryResponse -} diff --git a/proto/oracle/v1/query_pb_service.js b/proto/oracle/v1/query_pb_service.js deleted file mode 100644 index af46ab0..0000000 --- a/proto/oracle/v1/query_pb_service.js +++ /dev/null @@ -1,632 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/query.proto - -var oracle_v1_query_pb = require('../../oracle/v1/query_pb') -var grpc = require('@improbable-eng/grpc-web').grpc - -var Query = (function () { - function Query() {} - Query.serviceName = 'oracle.v1.Query' - return Query -})() - -Query.Counts = { - methodName: 'Counts', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryCountsRequest, - responseType: oracle_v1_query_pb.QueryCountsResponse, -} - -Query.Data = { - methodName: 'Data', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryDataRequest, - responseType: oracle_v1_query_pb.QueryDataResponse, -} - -Query.DataSource = { - methodName: 'DataSource', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryDataSourceRequest, - responseType: oracle_v1_query_pb.QueryDataSourceResponse, -} - -Query.OracleScript = { - methodName: 'OracleScript', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryOracleScriptRequest, - responseType: oracle_v1_query_pb.QueryOracleScriptResponse, -} - -Query.Request = { - methodName: 'Request', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryRequestRequest, - responseType: oracle_v1_query_pb.QueryRequestResponse, -} - -Query.PendingRequests = { - methodName: 'PendingRequests', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryPendingRequestsRequest, - responseType: oracle_v1_query_pb.QueryPendingRequestsResponse, -} - -Query.Validator = { - methodName: 'Validator', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryValidatorRequest, - responseType: oracle_v1_query_pb.QueryValidatorResponse, -} - -Query.IsReporter = { - methodName: 'IsReporter', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryIsReporterRequest, - responseType: oracle_v1_query_pb.QueryIsReporterResponse, -} - -Query.Reporters = { - methodName: 'Reporters', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryReportersRequest, - responseType: oracle_v1_query_pb.QueryReportersResponse, -} - -Query.ActiveValidators = { - methodName: 'ActiveValidators', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryActiveValidatorsRequest, - responseType: oracle_v1_query_pb.QueryActiveValidatorsResponse, -} - -Query.Params = { - methodName: 'Params', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryParamsRequest, - responseType: oracle_v1_query_pb.QueryParamsResponse, -} - -Query.RequestSearch = { - methodName: 'RequestSearch', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryRequestSearchRequest, - responseType: oracle_v1_query_pb.QueryRequestSearchResponse, -} - -Query.RequestPrice = { - methodName: 'RequestPrice', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryRequestPriceRequest, - responseType: oracle_v1_query_pb.QueryRequestPriceResponse, -} - -Query.RequestVerification = { - methodName: 'RequestVerification', - service: Query, - requestStream: false, - responseStream: false, - requestType: oracle_v1_query_pb.QueryRequestVerificationRequest, - responseType: oracle_v1_query_pb.QueryRequestVerificationResponse, -} - -exports.Query = Query - -function QueryClient(serviceHost, options) { - this.serviceHost = serviceHost - this.options = options || {} -} - -QueryClient.prototype.counts = function counts( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.Counts, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.data = function data(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.Data, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.dataSource = function dataSource( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.DataSource, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.oracleScript = function oracleScript( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.OracleScript, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.request = function request( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.Request, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.pendingRequests = function pendingRequests( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.PendingRequests, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.validator = function validator( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.Validator, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.isReporter = function isReporter( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.IsReporter, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.reporters = function reporters( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.Reporters, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.activeValidators = function activeValidators( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.ActiveValidators, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.params = function params( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.Params, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.requestSearch = function requestSearch( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.RequestSearch, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.requestPrice = function requestPrice( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.RequestPrice, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -QueryClient.prototype.requestVerification = function requestVerification( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Query.RequestVerification, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -exports.QueryClient = QueryClient diff --git a/proto/oracle/v1/tx_pb.d.ts b/proto/oracle/v1/tx_pb.d.ts deleted file mode 100644 index dbd848f..0000000 --- a/proto/oracle/v1/tx_pb.d.ts +++ /dev/null @@ -1,646 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/tx.proto - -import * as jspb from 'google-protobuf' -import * as gogoproto_gogo_pb from '../../gogoproto/gogo_pb' -import * as oracle_v1_oracle_pb from '../../oracle/v1/oracle_pb' -import * as cosmos_base_v1beta1_coin_pb from '../../cosmos/base/v1beta1/coin_pb' -import * as cosmos_proto_cosmos_pb from '../../cosmos_proto/cosmos_pb' -import * as cosmos_msg_v1_msg_pb from '../../cosmos/msg/v1/msg_pb' -import * as amino_amino_pb from '../../amino/amino_pb' - -export class MsgRequestData extends jspb.Message { - getOracleScriptId(): number - setOracleScriptId(value: number): void - - getCalldata(): Uint8Array | string - getCalldata_asU8(): Uint8Array - getCalldata_asB64(): string - setCalldata(value: Uint8Array | string): void - - getAskCount(): number - setAskCount(value: number): void - - getMinCount(): number - setMinCount(value: number): void - - getClientId(): string - setClientId(value: string): void - - clearFeeLimitList(): void - getFeeLimitList(): Array - setFeeLimitList(value: Array): void - addFeeLimit( - value?: cosmos_base_v1beta1_coin_pb.Coin, - index?: number, - ): cosmos_base_v1beta1_coin_pb.Coin - - getPrepareGas(): number - setPrepareGas(value: number): void - - getExecuteGas(): number - setExecuteGas(value: number): void - - getSender(): string - setSender(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgRequestData.AsObject - static toObject( - includeInstance: boolean, - msg: MsgRequestData, - ): MsgRequestData.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgRequestData, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgRequestData - static deserializeBinaryFromReader( - message: MsgRequestData, - reader: jspb.BinaryReader, - ): MsgRequestData -} - -export namespace MsgRequestData { - export type AsObject = { - oracleScriptId: number - calldata: Uint8Array | string - askCount: number - minCount: number - clientId: string - feeLimitList: Array - prepareGas: number - executeGas: number - sender: string - } -} - -export class MsgRequestDataResponse extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgRequestDataResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MsgRequestDataResponse, - ): MsgRequestDataResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgRequestDataResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgRequestDataResponse - static deserializeBinaryFromReader( - message: MsgRequestDataResponse, - reader: jspb.BinaryReader, - ): MsgRequestDataResponse -} - -export namespace MsgRequestDataResponse { - export type AsObject = {} -} - -export class MsgReportData extends jspb.Message { - getRequestId(): number - setRequestId(value: number): void - - clearRawReportsList(): void - getRawReportsList(): Array - setRawReportsList(value: Array): void - addRawReports( - value?: oracle_v1_oracle_pb.RawReport, - index?: number, - ): oracle_v1_oracle_pb.RawReport - - getValidator(): string - setValidator(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgReportData.AsObject - static toObject( - includeInstance: boolean, - msg: MsgReportData, - ): MsgReportData.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgReportData, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgReportData - static deserializeBinaryFromReader( - message: MsgReportData, - reader: jspb.BinaryReader, - ): MsgReportData -} - -export namespace MsgReportData { - export type AsObject = { - requestId: number - rawReportsList: Array - validator: string - } -} - -export class MsgReportDataResponse extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgReportDataResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MsgReportDataResponse, - ): MsgReportDataResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgReportDataResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgReportDataResponse - static deserializeBinaryFromReader( - message: MsgReportDataResponse, - reader: jspb.BinaryReader, - ): MsgReportDataResponse -} - -export namespace MsgReportDataResponse { - export type AsObject = {} -} - -export class MsgCreateDataSource extends jspb.Message { - getName(): string - setName(value: string): void - - getDescription(): string - setDescription(value: string): void - - getExecutable(): Uint8Array | string - getExecutable_asU8(): Uint8Array - getExecutable_asB64(): string - setExecutable(value: Uint8Array | string): void - - clearFeeList(): void - getFeeList(): Array - setFeeList(value: Array): void - addFee( - value?: cosmos_base_v1beta1_coin_pb.Coin, - index?: number, - ): cosmos_base_v1beta1_coin_pb.Coin - - getTreasury(): string - setTreasury(value: string): void - - getOwner(): string - setOwner(value: string): void - - getSender(): string - setSender(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgCreateDataSource.AsObject - static toObject( - includeInstance: boolean, - msg: MsgCreateDataSource, - ): MsgCreateDataSource.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgCreateDataSource, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgCreateDataSource - static deserializeBinaryFromReader( - message: MsgCreateDataSource, - reader: jspb.BinaryReader, - ): MsgCreateDataSource -} - -export namespace MsgCreateDataSource { - export type AsObject = { - name: string - description: string - executable: Uint8Array | string - feeList: Array - treasury: string - owner: string - sender: string - } -} - -export class MsgCreateDataSourceResponse extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgCreateDataSourceResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MsgCreateDataSourceResponse, - ): MsgCreateDataSourceResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgCreateDataSourceResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgCreateDataSourceResponse - static deserializeBinaryFromReader( - message: MsgCreateDataSourceResponse, - reader: jspb.BinaryReader, - ): MsgCreateDataSourceResponse -} - -export namespace MsgCreateDataSourceResponse { - export type AsObject = {} -} - -export class MsgEditDataSource extends jspb.Message { - getDataSourceId(): number - setDataSourceId(value: number): void - - getName(): string - setName(value: string): void - - getDescription(): string - setDescription(value: string): void - - getExecutable(): Uint8Array | string - getExecutable_asU8(): Uint8Array - getExecutable_asB64(): string - setExecutable(value: Uint8Array | string): void - - clearFeeList(): void - getFeeList(): Array - setFeeList(value: Array): void - addFee( - value?: cosmos_base_v1beta1_coin_pb.Coin, - index?: number, - ): cosmos_base_v1beta1_coin_pb.Coin - - getTreasury(): string - setTreasury(value: string): void - - getOwner(): string - setOwner(value: string): void - - getSender(): string - setSender(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgEditDataSource.AsObject - static toObject( - includeInstance: boolean, - msg: MsgEditDataSource, - ): MsgEditDataSource.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgEditDataSource, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgEditDataSource - static deserializeBinaryFromReader( - message: MsgEditDataSource, - reader: jspb.BinaryReader, - ): MsgEditDataSource -} - -export namespace MsgEditDataSource { - export type AsObject = { - dataSourceId: number - name: string - description: string - executable: Uint8Array | string - feeList: Array - treasury: string - owner: string - sender: string - } -} - -export class MsgEditDataSourceResponse extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgEditDataSourceResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MsgEditDataSourceResponse, - ): MsgEditDataSourceResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgEditDataSourceResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgEditDataSourceResponse - static deserializeBinaryFromReader( - message: MsgEditDataSourceResponse, - reader: jspb.BinaryReader, - ): MsgEditDataSourceResponse -} - -export namespace MsgEditDataSourceResponse { - export type AsObject = {} -} - -export class MsgCreateOracleScript extends jspb.Message { - getName(): string - setName(value: string): void - - getDescription(): string - setDescription(value: string): void - - getSchema(): string - setSchema(value: string): void - - getSourceCodeUrl(): string - setSourceCodeUrl(value: string): void - - getCode(): Uint8Array | string - getCode_asU8(): Uint8Array - getCode_asB64(): string - setCode(value: Uint8Array | string): void - - getOwner(): string - setOwner(value: string): void - - getSender(): string - setSender(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgCreateOracleScript.AsObject - static toObject( - includeInstance: boolean, - msg: MsgCreateOracleScript, - ): MsgCreateOracleScript.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgCreateOracleScript, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgCreateOracleScript - static deserializeBinaryFromReader( - message: MsgCreateOracleScript, - reader: jspb.BinaryReader, - ): MsgCreateOracleScript -} - -export namespace MsgCreateOracleScript { - export type AsObject = { - name: string - description: string - schema: string - sourceCodeUrl: string - code: Uint8Array | string - owner: string - sender: string - } -} - -export class MsgCreateOracleScriptResponse extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgCreateOracleScriptResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MsgCreateOracleScriptResponse, - ): MsgCreateOracleScriptResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgCreateOracleScriptResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgCreateOracleScriptResponse - static deserializeBinaryFromReader( - message: MsgCreateOracleScriptResponse, - reader: jspb.BinaryReader, - ): MsgCreateOracleScriptResponse -} - -export namespace MsgCreateOracleScriptResponse { - export type AsObject = {} -} - -export class MsgEditOracleScript extends jspb.Message { - getOracleScriptId(): number - setOracleScriptId(value: number): void - - getName(): string - setName(value: string): void - - getDescription(): string - setDescription(value: string): void - - getSchema(): string - setSchema(value: string): void - - getSourceCodeUrl(): string - setSourceCodeUrl(value: string): void - - getCode(): Uint8Array | string - getCode_asU8(): Uint8Array - getCode_asB64(): string - setCode(value: Uint8Array | string): void - - getOwner(): string - setOwner(value: string): void - - getSender(): string - setSender(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgEditOracleScript.AsObject - static toObject( - includeInstance: boolean, - msg: MsgEditOracleScript, - ): MsgEditOracleScript.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgEditOracleScript, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgEditOracleScript - static deserializeBinaryFromReader( - message: MsgEditOracleScript, - reader: jspb.BinaryReader, - ): MsgEditOracleScript -} - -export namespace MsgEditOracleScript { - export type AsObject = { - oracleScriptId: number - name: string - description: string - schema: string - sourceCodeUrl: string - code: Uint8Array | string - owner: string - sender: string - } -} - -export class MsgEditOracleScriptResponse extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgEditOracleScriptResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MsgEditOracleScriptResponse, - ): MsgEditOracleScriptResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgEditOracleScriptResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgEditOracleScriptResponse - static deserializeBinaryFromReader( - message: MsgEditOracleScriptResponse, - reader: jspb.BinaryReader, - ): MsgEditOracleScriptResponse -} - -export namespace MsgEditOracleScriptResponse { - export type AsObject = {} -} - -export class MsgActivate extends jspb.Message { - getValidator(): string - setValidator(value: string): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgActivate.AsObject - static toObject( - includeInstance: boolean, - msg: MsgActivate, - ): MsgActivate.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgActivate, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgActivate - static deserializeBinaryFromReader( - message: MsgActivate, - reader: jspb.BinaryReader, - ): MsgActivate -} - -export namespace MsgActivate { - export type AsObject = { - validator: string - } -} - -export class MsgActivateResponse extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgActivateResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MsgActivateResponse, - ): MsgActivateResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgActivateResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgActivateResponse - static deserializeBinaryFromReader( - message: MsgActivateResponse, - reader: jspb.BinaryReader, - ): MsgActivateResponse -} - -export namespace MsgActivateResponse { - export type AsObject = {} -} - -export class MsgUpdateParams extends jspb.Message { - getAuthority(): string - setAuthority(value: string): void - - hasParams(): boolean - clearParams(): void - getParams(): oracle_v1_oracle_pb.Params | undefined - setParams(value?: oracle_v1_oracle_pb.Params): void - - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgUpdateParams.AsObject - static toObject( - includeInstance: boolean, - msg: MsgUpdateParams, - ): MsgUpdateParams.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgUpdateParams, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgUpdateParams - static deserializeBinaryFromReader( - message: MsgUpdateParams, - reader: jspb.BinaryReader, - ): MsgUpdateParams -} - -export namespace MsgUpdateParams { - export type AsObject = { - authority: string - params?: oracle_v1_oracle_pb.Params.AsObject - } -} - -export class MsgUpdateParamsResponse extends jspb.Message { - serializeBinary(): Uint8Array - toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject - static toObject( - includeInstance: boolean, - msg: MsgUpdateParamsResponse, - ): MsgUpdateParamsResponse.AsObject - static extensions: { [key: number]: jspb.ExtensionFieldInfo } - static extensionsBinary: { - [key: number]: jspb.ExtensionFieldBinaryInfo - } - static serializeBinaryToWriter( - message: MsgUpdateParamsResponse, - writer: jspb.BinaryWriter, - ): void - static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse - static deserializeBinaryFromReader( - message: MsgUpdateParamsResponse, - reader: jspb.BinaryReader, - ): MsgUpdateParamsResponse -} - -export namespace MsgUpdateParamsResponse { - export type AsObject = {} -} diff --git a/proto/oracle/v1/tx_pb.js b/proto/oracle/v1/tx_pb.js deleted file mode 100644 index 620ca80..0000000 --- a/proto/oracle/v1/tx_pb.js +++ /dev/null @@ -1,3625 +0,0 @@ -// source: oracle/v1/tx.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf') -var goog = jspb -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - function () { - return this - }.call(null) || - Function('return this')() - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') -goog.object.extend(proto, gogoproto_gogo_pb) -var oracle_v1_oracle_pb = require('../../oracle/v1/oracle_pb.js') -goog.object.extend(proto, oracle_v1_oracle_pb) -var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') -goog.object.extend(proto, cosmos_base_v1beta1_coin_pb) -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js') -goog.object.extend(proto, cosmos_proto_cosmos_pb) -var cosmos_msg_v1_msg_pb = require('../../cosmos/msg/v1/msg_pb.js') -goog.object.extend(proto, cosmos_msg_v1_msg_pb) -var amino_amino_pb = require('../../amino/amino_pb.js') -goog.object.extend(proto, amino_amino_pb) -goog.exportSymbol('proto.oracle.v1.MsgActivate', null, global) -goog.exportSymbol('proto.oracle.v1.MsgActivateResponse', null, global) -goog.exportSymbol('proto.oracle.v1.MsgCreateDataSource', null, global) -goog.exportSymbol('proto.oracle.v1.MsgCreateDataSourceResponse', null, global) -goog.exportSymbol('proto.oracle.v1.MsgCreateOracleScript', null, global) -goog.exportSymbol('proto.oracle.v1.MsgCreateOracleScriptResponse', null, global) -goog.exportSymbol('proto.oracle.v1.MsgEditDataSource', null, global) -goog.exportSymbol('proto.oracle.v1.MsgEditDataSourceResponse', null, global) -goog.exportSymbol('proto.oracle.v1.MsgEditOracleScript', null, global) -goog.exportSymbol('proto.oracle.v1.MsgEditOracleScriptResponse', null, global) -goog.exportSymbol('proto.oracle.v1.MsgReportData', null, global) -goog.exportSymbol('proto.oracle.v1.MsgReportDataResponse', null, global) -goog.exportSymbol('proto.oracle.v1.MsgRequestData', null, global) -goog.exportSymbol('proto.oracle.v1.MsgRequestDataResponse', null, global) -goog.exportSymbol('proto.oracle.v1.MsgUpdateParams', null, global) -goog.exportSymbol('proto.oracle.v1.MsgUpdateParamsResponse', null, global) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgRequestData = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.MsgRequestData.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.MsgRequestData, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgRequestData.displayName = 'proto.oracle.v1.MsgRequestData' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgRequestDataResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgRequestDataResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgRequestDataResponse.displayName = - 'proto.oracle.v1.MsgRequestDataResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgReportData = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.MsgReportData.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.MsgReportData, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgReportData.displayName = 'proto.oracle.v1.MsgReportData' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgReportDataResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgReportDataResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgReportDataResponse.displayName = - 'proto.oracle.v1.MsgReportDataResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgCreateDataSource = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.MsgCreateDataSource.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.MsgCreateDataSource, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgCreateDataSource.displayName = - 'proto.oracle.v1.MsgCreateDataSource' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgCreateDataSourceResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgCreateDataSourceResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgCreateDataSourceResponse.displayName = - 'proto.oracle.v1.MsgCreateDataSourceResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgEditDataSource = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.oracle.v1.MsgEditDataSource.repeatedFields_, - null, - ) -} -goog.inherits(proto.oracle.v1.MsgEditDataSource, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgEditDataSource.displayName = - 'proto.oracle.v1.MsgEditDataSource' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgEditDataSourceResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgEditDataSourceResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgEditDataSourceResponse.displayName = - 'proto.oracle.v1.MsgEditDataSourceResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgCreateOracleScript = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgCreateOracleScript, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgCreateOracleScript.displayName = - 'proto.oracle.v1.MsgCreateOracleScript' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgCreateOracleScriptResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgCreateOracleScriptResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgCreateOracleScriptResponse.displayName = - 'proto.oracle.v1.MsgCreateOracleScriptResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgEditOracleScript = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgEditOracleScript, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgEditOracleScript.displayName = - 'proto.oracle.v1.MsgEditOracleScript' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgEditOracleScriptResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgEditOracleScriptResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgEditOracleScriptResponse.displayName = - 'proto.oracle.v1.MsgEditOracleScriptResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgActivate = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgActivate, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgActivate.displayName = 'proto.oracle.v1.MsgActivate' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgActivateResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgActivateResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgActivateResponse.displayName = - 'proto.oracle.v1.MsgActivateResponse' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgUpdateParams = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgUpdateParams, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgUpdateParams.displayName = - 'proto.oracle.v1.MsgUpdateParams' -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.oracle.v1.MsgUpdateParamsResponse = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null) -} -goog.inherits(proto.oracle.v1.MsgUpdateParamsResponse, jspb.Message) -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.oracle.v1.MsgUpdateParamsResponse.displayName = - 'proto.oracle.v1.MsgUpdateParamsResponse' -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.MsgRequestData.repeatedFields_ = [6] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgRequestData.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgRequestData.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgRequestData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgRequestData.toObject = function (includeInstance, msg) { - var f, - obj = { - oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), - calldata: msg.getCalldata_asB64(), - askCount: jspb.Message.getFieldWithDefault(msg, 3, 0), - minCount: jspb.Message.getFieldWithDefault(msg, 4, 0), - clientId: jspb.Message.getFieldWithDefault(msg, 5, ''), - feeLimitList: jspb.Message.toObjectList( - msg.getFeeLimitList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, - includeInstance, - ), - prepareGas: jspb.Message.getFieldWithDefault(msg, 7, 0), - executeGas: jspb.Message.getFieldWithDefault(msg, 8, 0), - sender: jspb.Message.getFieldWithDefault(msg, 9, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgRequestData} - */ -proto.oracle.v1.MsgRequestData.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgRequestData() - return proto.oracle.v1.MsgRequestData.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgRequestData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgRequestData} - */ -proto.oracle.v1.MsgRequestData.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setOracleScriptId(value) - break - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setCalldata(value) - break - case 3: - var value = /** @type {number} */ (reader.readUint64()) - msg.setAskCount(value) - break - case 4: - var value = /** @type {number} */ (reader.readUint64()) - msg.setMinCount(value) - break - case 5: - var value = /** @type {string} */ (reader.readString()) - msg.setClientId(value) - break - case 6: - var value = new cosmos_base_v1beta1_coin_pb.Coin() - reader.readMessage( - value, - cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader, - ) - msg.addFeeLimit(value) - break - case 7: - var value = /** @type {number} */ (reader.readUint64()) - msg.setPrepareGas(value) - break - case 8: - var value = /** @type {number} */ (reader.readUint64()) - msg.setExecuteGas(value) - break - case 9: - var value = /** @type {string} */ (reader.readString()) - msg.setSender(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgRequestData.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgRequestData.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgRequestData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgRequestData.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getOracleScriptId() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getCalldata_asU8() - if (f.length > 0) { - writer.writeBytes(2, f) - } - f = message.getAskCount() - if (f !== 0) { - writer.writeUint64(3, f) - } - f = message.getMinCount() - if (f !== 0) { - writer.writeUint64(4, f) - } - f = message.getClientId() - if (f.length > 0) { - writer.writeString(5, f) - } - f = message.getFeeLimitList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter, - ) - } - f = message.getPrepareGas() - if (f !== 0) { - writer.writeUint64(7, f) - } - f = message.getExecuteGas() - if (f !== 0) { - writer.writeUint64(8, f) - } - f = message.getSender() - if (f.length > 0) { - writer.writeString(9, f) - } -} - -/** - * optional uint64 oracle_script_id = 1; - * @return {number} - */ -proto.oracle.v1.MsgRequestData.prototype.getOracleScriptId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.setOracleScriptId = function (value) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional bytes calldata = 2; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.MsgRequestData.prototype.getCalldata = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 2, '') - ) -} - -/** - * optional bytes calldata = 2; - * This is a type-conversion wrapper around `getCalldata()` - * @return {string} - */ -proto.oracle.v1.MsgRequestData.prototype.getCalldata_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getCalldata())) -} - -/** - * optional bytes calldata = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCalldata()` - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgRequestData.prototype.getCalldata_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getCalldata())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.setCalldata = function (value) { - return jspb.Message.setProto3BytesField(this, 2, value) -} - -/** - * optional uint64 ask_count = 3; - * @return {number} - */ -proto.oracle.v1.MsgRequestData.prototype.getAskCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.setAskCount = function (value) { - return jspb.Message.setProto3IntField(this, 3, value) -} - -/** - * optional uint64 min_count = 4; - * @return {number} - */ -proto.oracle.v1.MsgRequestData.prototype.getMinCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.setMinCount = function (value) { - return jspb.Message.setProto3IntField(this, 4, value) -} - -/** - * optional string client_id = 5; - * @return {string} - */ -proto.oracle.v1.MsgRequestData.prototype.getClientId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.setClientId = function (value) { - return jspb.Message.setProto3StringField(this, 5, value) -} - -/** - * repeated cosmos.base.v1beta1.Coin fee_limit = 6; - * @return {!Array} - */ -proto.oracle.v1.MsgRequestData.prototype.getFeeLimitList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - cosmos_base_v1beta1_coin_pb.Coin, - 6, - ) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.setFeeLimitList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value) -} - -/** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} - */ -proto.oracle.v1.MsgRequestData.prototype.addFeeLimit = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 6, - opt_value, - proto.cosmos.base.v1beta1.Coin, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.clearFeeLimitList = function () { - return this.setFeeLimitList([]) -} - -/** - * optional uint64 prepare_gas = 7; - * @return {number} - */ -proto.oracle.v1.MsgRequestData.prototype.getPrepareGas = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.setPrepareGas = function (value) { - return jspb.Message.setProto3IntField(this, 7, value) -} - -/** - * optional uint64 execute_gas = 8; - * @return {number} - */ -proto.oracle.v1.MsgRequestData.prototype.getExecuteGas = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.setExecuteGas = function (value) { - return jspb.Message.setProto3IntField(this, 8, value) -} - -/** - * optional string sender = 9; - * @return {string} - */ -proto.oracle.v1.MsgRequestData.prototype.getSender = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgRequestData} returns this - */ -proto.oracle.v1.MsgRequestData.prototype.setSender = function (value) { - return jspb.Message.setProto3StringField(this, 9, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgRequestDataResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgRequestDataResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgRequestDataResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgRequestDataResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgRequestDataResponse} - */ -proto.oracle.v1.MsgRequestDataResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgRequestDataResponse() - return proto.oracle.v1.MsgRequestDataResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgRequestDataResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgRequestDataResponse} - */ -proto.oracle.v1.MsgRequestDataResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgRequestDataResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgRequestDataResponse.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgRequestDataResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgRequestDataResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.MsgReportData.repeatedFields_ = [2] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgReportData.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgReportData.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgReportData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgReportData.toObject = function (includeInstance, msg) { - var f, - obj = { - requestId: jspb.Message.getFieldWithDefault(msg, 1, 0), - rawReportsList: jspb.Message.toObjectList( - msg.getRawReportsList(), - oracle_v1_oracle_pb.RawReport.toObject, - includeInstance, - ), - validator: jspb.Message.getFieldWithDefault(msg, 3, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgReportData} - */ -proto.oracle.v1.MsgReportData.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgReportData() - return proto.oracle.v1.MsgReportData.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgReportData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgReportData} - */ -proto.oracle.v1.MsgReportData.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setRequestId(value) - break - case 2: - var value = new oracle_v1_oracle_pb.RawReport() - reader.readMessage( - value, - oracle_v1_oracle_pb.RawReport.deserializeBinaryFromReader, - ) - msg.addRawReports(value) - break - case 3: - var value = /** @type {string} */ (reader.readString()) - msg.setValidator(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgReportData.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgReportData.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgReportData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgReportData.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getRequestId() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getRawReportsList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - oracle_v1_oracle_pb.RawReport.serializeBinaryToWriter, - ) - } - f = message.getValidator() - if (f.length > 0) { - writer.writeString(3, f) - } -} - -/** - * optional uint64 request_id = 1; - * @return {number} - */ -proto.oracle.v1.MsgReportData.prototype.getRequestId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.MsgReportData} returns this - */ -proto.oracle.v1.MsgReportData.prototype.setRequestId = function (value) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * repeated RawReport raw_reports = 2; - * @return {!Array} - */ -proto.oracle.v1.MsgReportData.prototype.getRawReportsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, oracle_v1_oracle_pb.RawReport, 2) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.MsgReportData} returns this - */ -proto.oracle.v1.MsgReportData.prototype.setRawReportsList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value) -} - -/** - * @param {!proto.oracle.v1.RawReport=} opt_value - * @param {number=} opt_index - * @return {!proto.oracle.v1.RawReport} - */ -proto.oracle.v1.MsgReportData.prototype.addRawReports = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.oracle.v1.RawReport, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.MsgReportData} returns this - */ -proto.oracle.v1.MsgReportData.prototype.clearRawReportsList = function () { - return this.setRawReportsList([]) -} - -/** - * optional string validator = 3; - * @return {string} - */ -proto.oracle.v1.MsgReportData.prototype.getValidator = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgReportData} returns this - */ -proto.oracle.v1.MsgReportData.prototype.setValidator = function (value) { - return jspb.Message.setProto3StringField(this, 3, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgReportDataResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgReportDataResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgReportDataResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgReportDataResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgReportDataResponse} - */ -proto.oracle.v1.MsgReportDataResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgReportDataResponse() - return proto.oracle.v1.MsgReportDataResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgReportDataResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgReportDataResponse} - */ -proto.oracle.v1.MsgReportDataResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgReportDataResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgReportDataResponse.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgReportDataResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgReportDataResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.MsgCreateDataSource.repeatedFields_ = [4] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgCreateDataSource.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgCreateDataSource.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgCreateDataSource} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgCreateDataSource.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ''), - description: jspb.Message.getFieldWithDefault(msg, 2, ''), - executable: msg.getExecutable_asB64(), - feeList: jspb.Message.toObjectList( - msg.getFeeList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, - includeInstance, - ), - treasury: jspb.Message.getFieldWithDefault(msg, 5, ''), - owner: jspb.Message.getFieldWithDefault(msg, 6, ''), - sender: jspb.Message.getFieldWithDefault(msg, 7, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgCreateDataSource} - */ -proto.oracle.v1.MsgCreateDataSource.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgCreateDataSource() - return proto.oracle.v1.MsgCreateDataSource.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgCreateDataSource} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgCreateDataSource} - */ -proto.oracle.v1.MsgCreateDataSource.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setName(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setDescription(value) - break - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setExecutable(value) - break - case 4: - var value = new cosmos_base_v1beta1_coin_pb.Coin() - reader.readMessage( - value, - cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader, - ) - msg.addFee(value) - break - case 5: - var value = /** @type {string} */ (reader.readString()) - msg.setTreasury(value) - break - case 6: - var value = /** @type {string} */ (reader.readString()) - msg.setOwner(value) - break - case 7: - var value = /** @type {string} */ (reader.readString()) - msg.setSender(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgCreateDataSource.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgCreateDataSource} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgCreateDataSource.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getName() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getDescription() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getExecutable_asU8() - if (f.length > 0) { - writer.writeBytes(3, f) - } - f = message.getFeeList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter, - ) - } - f = message.getTreasury() - if (f.length > 0) { - writer.writeString(5, f) - } - f = message.getOwner() - if (f.length > 0) { - writer.writeString(6, f) - } - f = message.getSender() - if (f.length > 0) { - writer.writeString(7, f) - } -} - -/** - * optional string name = 1; - * @return {string} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.getName = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateDataSource} returns this - */ -proto.oracle.v1.MsgCreateDataSource.prototype.setName = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional string description = 2; - * @return {string} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.getDescription = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateDataSource} returns this - */ -proto.oracle.v1.MsgCreateDataSource.prototype.setDescription = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -/** - * optional bytes executable = 3; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.getExecutable = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 3, '') - ) -} - -/** - * optional bytes executable = 3; - * This is a type-conversion wrapper around `getExecutable()` - * @return {string} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.getExecutable_asB64 = - function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getExecutable())) - } - -/** - * optional bytes executable = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getExecutable()` - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.getExecutable_asU8 = function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getExecutable()) - ) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.MsgCreateDataSource} returns this - */ -proto.oracle.v1.MsgCreateDataSource.prototype.setExecutable = function (value) { - return jspb.Message.setProto3BytesField(this, 3, value) -} - -/** - * repeated cosmos.base.v1beta1.Coin fee = 4; - * @return {!Array} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.getFeeList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - cosmos_base_v1beta1_coin_pb.Coin, - 4, - ) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.MsgCreateDataSource} returns this - */ -proto.oracle.v1.MsgCreateDataSource.prototype.setFeeList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value) -} - -/** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.addFee = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 4, - opt_value, - proto.cosmos.base.v1beta1.Coin, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.MsgCreateDataSource} returns this - */ -proto.oracle.v1.MsgCreateDataSource.prototype.clearFeeList = function () { - return this.setFeeList([]) -} - -/** - * optional string treasury = 5; - * @return {string} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.getTreasury = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateDataSource} returns this - */ -proto.oracle.v1.MsgCreateDataSource.prototype.setTreasury = function (value) { - return jspb.Message.setProto3StringField(this, 5, value) -} - -/** - * optional string owner = 6; - * @return {string} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateDataSource} returns this - */ -proto.oracle.v1.MsgCreateDataSource.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 6, value) -} - -/** - * optional string sender = 7; - * @return {string} - */ -proto.oracle.v1.MsgCreateDataSource.prototype.getSender = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateDataSource} returns this - */ -proto.oracle.v1.MsgCreateDataSource.prototype.setSender = function (value) { - return jspb.Message.setProto3StringField(this, 7, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgCreateDataSourceResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgCreateDataSourceResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgCreateDataSourceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgCreateDataSourceResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgCreateDataSourceResponse} - */ -proto.oracle.v1.MsgCreateDataSourceResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgCreateDataSourceResponse() - return proto.oracle.v1.MsgCreateDataSourceResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgCreateDataSourceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgCreateDataSourceResponse} - */ -proto.oracle.v1.MsgCreateDataSourceResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgCreateDataSourceResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgCreateDataSourceResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgCreateDataSourceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgCreateDataSourceResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.oracle.v1.MsgEditDataSource.repeatedFields_ = [5] - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgEditDataSource.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgEditDataSource.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgEditDataSource} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgEditDataSource.toObject = function (includeInstance, msg) { - var f, - obj = { - dataSourceId: jspb.Message.getFieldWithDefault(msg, 1, 0), - name: jspb.Message.getFieldWithDefault(msg, 2, ''), - description: jspb.Message.getFieldWithDefault(msg, 3, ''), - executable: msg.getExecutable_asB64(), - feeList: jspb.Message.toObjectList( - msg.getFeeList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, - includeInstance, - ), - treasury: jspb.Message.getFieldWithDefault(msg, 6, ''), - owner: jspb.Message.getFieldWithDefault(msg, 7, ''), - sender: jspb.Message.getFieldWithDefault(msg, 8, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgEditDataSource} - */ -proto.oracle.v1.MsgEditDataSource.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgEditDataSource() - return proto.oracle.v1.MsgEditDataSource.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgEditDataSource} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgEditDataSource} - */ -proto.oracle.v1.MsgEditDataSource.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setDataSourceId(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setName(value) - break - case 3: - var value = /** @type {string} */ (reader.readString()) - msg.setDescription(value) - break - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setExecutable(value) - break - case 5: - var value = new cosmos_base_v1beta1_coin_pb.Coin() - reader.readMessage( - value, - cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader, - ) - msg.addFee(value) - break - case 6: - var value = /** @type {string} */ (reader.readString()) - msg.setTreasury(value) - break - case 7: - var value = /** @type {string} */ (reader.readString()) - msg.setOwner(value) - break - case 8: - var value = /** @type {string} */ (reader.readString()) - msg.setSender(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgEditDataSource.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgEditDataSource.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgEditDataSource} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgEditDataSource.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getDataSourceId() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getName() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getDescription() - if (f.length > 0) { - writer.writeString(3, f) - } - f = message.getExecutable_asU8() - if (f.length > 0) { - writer.writeBytes(4, f) - } - f = message.getFeeList() - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter, - ) - } - f = message.getTreasury() - if (f.length > 0) { - writer.writeString(6, f) - } - f = message.getOwner() - if (f.length > 0) { - writer.writeString(7, f) - } - f = message.getSender() - if (f.length > 0) { - writer.writeString(8, f) - } -} - -/** - * optional uint64 data_source_id = 1; - * @return {number} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getDataSourceId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.MsgEditDataSource} returns this - */ -proto.oracle.v1.MsgEditDataSource.prototype.setDataSourceId = function (value) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional string name = 2; - * @return {string} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getName = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditDataSource} returns this - */ -proto.oracle.v1.MsgEditDataSource.prototype.setName = function (value) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -/** - * optional string description = 3; - * @return {string} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getDescription = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditDataSource} returns this - */ -proto.oracle.v1.MsgEditDataSource.prototype.setDescription = function (value) { - return jspb.Message.setProto3StringField(this, 3, value) -} - -/** - * optional bytes executable = 4; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getExecutable = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 4, '') - ) -} - -/** - * optional bytes executable = 4; - * This is a type-conversion wrapper around `getExecutable()` - * @return {string} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getExecutable_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getExecutable())) -} - -/** - * optional bytes executable = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getExecutable()` - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getExecutable_asU8 = function () { - return /** @type {!Uint8Array} */ ( - jspb.Message.bytesAsU8(this.getExecutable()) - ) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.MsgEditDataSource} returns this - */ -proto.oracle.v1.MsgEditDataSource.prototype.setExecutable = function (value) { - return jspb.Message.setProto3BytesField(this, 4, value) -} - -/** - * repeated cosmos.base.v1beta1.Coin fee = 5; - * @return {!Array} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getFeeList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - cosmos_base_v1beta1_coin_pb.Coin, - 5, - ) - ) -} - -/** - * @param {!Array} value - * @return {!proto.oracle.v1.MsgEditDataSource} returns this - */ -proto.oracle.v1.MsgEditDataSource.prototype.setFeeList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value) -} - -/** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} - */ -proto.oracle.v1.MsgEditDataSource.prototype.addFee = function ( - opt_value, - opt_index, -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 5, - opt_value, - proto.cosmos.base.v1beta1.Coin, - opt_index, - ) -} - -/** - * Clears the list making it empty but non-null. - * @return {!proto.oracle.v1.MsgEditDataSource} returns this - */ -proto.oracle.v1.MsgEditDataSource.prototype.clearFeeList = function () { - return this.setFeeList([]) -} - -/** - * optional string treasury = 6; - * @return {string} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getTreasury = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditDataSource} returns this - */ -proto.oracle.v1.MsgEditDataSource.prototype.setTreasury = function (value) { - return jspb.Message.setProto3StringField(this, 6, value) -} - -/** - * optional string owner = 7; - * @return {string} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditDataSource} returns this - */ -proto.oracle.v1.MsgEditDataSource.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 7, value) -} - -/** - * optional string sender = 8; - * @return {string} - */ -proto.oracle.v1.MsgEditDataSource.prototype.getSender = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditDataSource} returns this - */ -proto.oracle.v1.MsgEditDataSource.prototype.setSender = function (value) { - return jspb.Message.setProto3StringField(this, 8, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgEditDataSourceResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgEditDataSourceResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgEditDataSourceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgEditDataSourceResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgEditDataSourceResponse} - */ -proto.oracle.v1.MsgEditDataSourceResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgEditDataSourceResponse() - return proto.oracle.v1.MsgEditDataSourceResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgEditDataSourceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgEditDataSourceResponse} - */ -proto.oracle.v1.MsgEditDataSourceResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgEditDataSourceResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgEditDataSourceResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgEditDataSourceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgEditDataSourceResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgCreateOracleScript.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgCreateOracleScript.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgCreateOracleScript} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgCreateOracleScript.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ''), - description: jspb.Message.getFieldWithDefault(msg, 2, ''), - schema: jspb.Message.getFieldWithDefault(msg, 3, ''), - sourceCodeUrl: jspb.Message.getFieldWithDefault(msg, 4, ''), - code: msg.getCode_asB64(), - owner: jspb.Message.getFieldWithDefault(msg, 6, ''), - sender: jspb.Message.getFieldWithDefault(msg, 7, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgCreateOracleScript} - */ -proto.oracle.v1.MsgCreateOracleScript.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgCreateOracleScript() - return proto.oracle.v1.MsgCreateOracleScript.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgCreateOracleScript} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgCreateOracleScript} - */ -proto.oracle.v1.MsgCreateOracleScript.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setName(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setDescription(value) - break - case 3: - var value = /** @type {string} */ (reader.readString()) - msg.setSchema(value) - break - case 4: - var value = /** @type {string} */ (reader.readString()) - msg.setSourceCodeUrl(value) - break - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setCode(value) - break - case 6: - var value = /** @type {string} */ (reader.readString()) - msg.setOwner(value) - break - case 7: - var value = /** @type {string} */ (reader.readString()) - msg.setSender(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgCreateOracleScript.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgCreateOracleScript} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgCreateOracleScript.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getName() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getDescription() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getSchema() - if (f.length > 0) { - writer.writeString(3, f) - } - f = message.getSourceCodeUrl() - if (f.length > 0) { - writer.writeString(4, f) - } - f = message.getCode_asU8() - if (f.length > 0) { - writer.writeBytes(5, f) - } - f = message.getOwner() - if (f.length > 0) { - writer.writeString(6, f) - } - f = message.getSender() - if (f.length > 0) { - writer.writeString(7, f) - } -} - -/** - * optional string name = 1; - * @return {string} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.getName = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateOracleScript} returns this - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.setName = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional string description = 2; - * @return {string} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.getDescription = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateOracleScript} returns this - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.setDescription = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -/** - * optional string schema = 3; - * @return {string} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.getSchema = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateOracleScript} returns this - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.setSchema = function (value) { - return jspb.Message.setProto3StringField(this, 3, value) -} - -/** - * optional string source_code_url = 4; - * @return {string} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.getSourceCodeUrl = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateOracleScript} returns this - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.setSourceCodeUrl = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 4, value) -} - -/** - * optional bytes code = 5; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.getCode = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 5, '') - ) -} - -/** - * optional bytes code = 5; - * This is a type-conversion wrapper around `getCode()` - * @return {string} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.getCode_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getCode())) -} - -/** - * optional bytes code = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCode()` - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.getCode_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getCode())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.MsgCreateOracleScript} returns this - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.setCode = function (value) { - return jspb.Message.setProto3BytesField(this, 5, value) -} - -/** - * optional string owner = 6; - * @return {string} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateOracleScript} returns this - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 6, value) -} - -/** - * optional string sender = 7; - * @return {string} - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.getSender = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgCreateOracleScript} returns this - */ -proto.oracle.v1.MsgCreateOracleScript.prototype.setSender = function (value) { - return jspb.Message.setProto3StringField(this, 7, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgCreateOracleScriptResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgCreateOracleScriptResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgCreateOracleScriptResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgCreateOracleScriptResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgCreateOracleScriptResponse} - */ -proto.oracle.v1.MsgCreateOracleScriptResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgCreateOracleScriptResponse() - return proto.oracle.v1.MsgCreateOracleScriptResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgCreateOracleScriptResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgCreateOracleScriptResponse} - */ -proto.oracle.v1.MsgCreateOracleScriptResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgCreateOracleScriptResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgCreateOracleScriptResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgCreateOracleScriptResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgCreateOracleScriptResponse.serializeBinaryToWriter = - function (message, writer) { - var f = undefined - } - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgEditOracleScript.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgEditOracleScript.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgEditOracleScript} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgEditOracleScript.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = { - oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), - name: jspb.Message.getFieldWithDefault(msg, 2, ''), - description: jspb.Message.getFieldWithDefault(msg, 3, ''), - schema: jspb.Message.getFieldWithDefault(msg, 4, ''), - sourceCodeUrl: jspb.Message.getFieldWithDefault(msg, 5, ''), - code: msg.getCode_asB64(), - owner: jspb.Message.getFieldWithDefault(msg, 7, ''), - sender: jspb.Message.getFieldWithDefault(msg, 8, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgEditOracleScript} - */ -proto.oracle.v1.MsgEditOracleScript.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgEditOracleScript() - return proto.oracle.v1.MsgEditOracleScript.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgEditOracleScript} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgEditOracleScript} - */ -proto.oracle.v1.MsgEditOracleScript.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()) - msg.setOracleScriptId(value) - break - case 2: - var value = /** @type {string} */ (reader.readString()) - msg.setName(value) - break - case 3: - var value = /** @type {string} */ (reader.readString()) - msg.setDescription(value) - break - case 4: - var value = /** @type {string} */ (reader.readString()) - msg.setSchema(value) - break - case 5: - var value = /** @type {string} */ (reader.readString()) - msg.setSourceCodeUrl(value) - break - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()) - msg.setCode(value) - break - case 7: - var value = /** @type {string} */ (reader.readString()) - msg.setOwner(value) - break - case 8: - var value = /** @type {string} */ (reader.readString()) - msg.setSender(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgEditOracleScript.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgEditOracleScript} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgEditOracleScript.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getOracleScriptId() - if (f !== 0) { - writer.writeUint64(1, f) - } - f = message.getName() - if (f.length > 0) { - writer.writeString(2, f) - } - f = message.getDescription() - if (f.length > 0) { - writer.writeString(3, f) - } - f = message.getSchema() - if (f.length > 0) { - writer.writeString(4, f) - } - f = message.getSourceCodeUrl() - if (f.length > 0) { - writer.writeString(5, f) - } - f = message.getCode_asU8() - if (f.length > 0) { - writer.writeBytes(6, f) - } - f = message.getOwner() - if (f.length > 0) { - writer.writeString(7, f) - } - f = message.getSender() - if (f.length > 0) { - writer.writeString(8, f) - } -} - -/** - * optional uint64 oracle_script_id = 1; - * @return {number} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getOracleScriptId = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) -} - -/** - * @param {number} value - * @return {!proto.oracle.v1.MsgEditOracleScript} returns this - */ -proto.oracle.v1.MsgEditOracleScript.prototype.setOracleScriptId = function ( - value, -) { - return jspb.Message.setProto3IntField(this, 1, value) -} - -/** - * optional string name = 2; - * @return {string} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getName = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditOracleScript} returns this - */ -proto.oracle.v1.MsgEditOracleScript.prototype.setName = function (value) { - return jspb.Message.setProto3StringField(this, 2, value) -} - -/** - * optional string description = 3; - * @return {string} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getDescription = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditOracleScript} returns this - */ -proto.oracle.v1.MsgEditOracleScript.prototype.setDescription = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 3, value) -} - -/** - * optional string schema = 4; - * @return {string} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getSchema = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditOracleScript} returns this - */ -proto.oracle.v1.MsgEditOracleScript.prototype.setSchema = function (value) { - return jspb.Message.setProto3StringField(this, 4, value) -} - -/** - * optional string source_code_url = 5; - * @return {string} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getSourceCodeUrl = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditOracleScript} returns this - */ -proto.oracle.v1.MsgEditOracleScript.prototype.setSourceCodeUrl = function ( - value, -) { - return jspb.Message.setProto3StringField(this, 5, value) -} - -/** - * optional bytes code = 6; - * @return {!(string|Uint8Array)} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getCode = function () { - return /** @type {!(string|Uint8Array)} */ ( - jspb.Message.getFieldWithDefault(this, 6, '') - ) -} - -/** - * optional bytes code = 6; - * This is a type-conversion wrapper around `getCode()` - * @return {string} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getCode_asB64 = function () { - return /** @type {string} */ (jspb.Message.bytesAsB64(this.getCode())) -} - -/** - * optional bytes code = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCode()` - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getCode_asU8 = function () { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getCode())) -} - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.oracle.v1.MsgEditOracleScript} returns this - */ -proto.oracle.v1.MsgEditOracleScript.prototype.setCode = function (value) { - return jspb.Message.setProto3BytesField(this, 6, value) -} - -/** - * optional string owner = 7; - * @return {string} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditOracleScript} returns this - */ -proto.oracle.v1.MsgEditOracleScript.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 7, value) -} - -/** - * optional string sender = 8; - * @return {string} - */ -proto.oracle.v1.MsgEditOracleScript.prototype.getSender = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgEditOracleScript} returns this - */ -proto.oracle.v1.MsgEditOracleScript.prototype.setSender = function (value) { - return jspb.Message.setProto3StringField(this, 8, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgEditOracleScriptResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgEditOracleScriptResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgEditOracleScriptResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgEditOracleScriptResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgEditOracleScriptResponse} - */ -proto.oracle.v1.MsgEditOracleScriptResponse.deserializeBinary = function ( - bytes, -) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgEditOracleScriptResponse() - return proto.oracle.v1.MsgEditOracleScriptResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgEditOracleScriptResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgEditOracleScriptResponse} - */ -proto.oracle.v1.MsgEditOracleScriptResponse.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg - } - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgEditOracleScriptResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgEditOracleScriptResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgEditOracleScriptResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgEditOracleScriptResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgActivate.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgActivate.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgActivate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgActivate.toObject = function (includeInstance, msg) { - var f, - obj = { - validator: jspb.Message.getFieldWithDefault(msg, 1, ''), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgActivate} - */ -proto.oracle.v1.MsgActivate.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgActivate() - return proto.oracle.v1.MsgActivate.deserializeBinaryFromReader(msg, reader) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgActivate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgActivate} - */ -proto.oracle.v1.MsgActivate.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setValidator(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgActivate.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgActivate.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgActivate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgActivate.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getValidator() - if (f.length > 0) { - writer.writeString(1, f) - } -} - -/** - * optional string validator = 1; - * @return {string} - */ -proto.oracle.v1.MsgActivate.prototype.getValidator = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgActivate} returns this - */ -proto.oracle.v1.MsgActivate.prototype.setValidator = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgActivateResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgActivateResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgActivateResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgActivateResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgActivateResponse} - */ -proto.oracle.v1.MsgActivateResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgActivateResponse() - return proto.oracle.v1.MsgActivateResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgActivateResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgActivateResponse} - */ -proto.oracle.v1.MsgActivateResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgActivateResponse.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgActivateResponse.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgActivateResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgActivateResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgUpdateParams.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgUpdateParams.toObject(opt_includeInstance, this) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgUpdateParams} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgUpdateParams.toObject = function (includeInstance, msg) { - var f, - obj = { - authority: jspb.Message.getFieldWithDefault(msg, 1, ''), - params: - (f = msg.getParams()) && - oracle_v1_oracle_pb.Params.toObject(includeInstance, f), - } - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgUpdateParams} - */ -proto.oracle.v1.MsgUpdateParams.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgUpdateParams() - return proto.oracle.v1.MsgUpdateParams.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgUpdateParams} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgUpdateParams} - */ -proto.oracle.v1.MsgUpdateParams.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()) - msg.setAuthority(value) - break - case 2: - var value = new oracle_v1_oracle_pb.Params() - reader.readMessage( - value, - oracle_v1_oracle_pb.Params.deserializeBinaryFromReader, - ) - msg.setParams(value) - break - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgUpdateParams.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgUpdateParams.serializeBinaryToWriter(this, writer) - return writer.getResultBuffer() -} - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgUpdateParams} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgUpdateParams.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined - f = message.getAuthority() - if (f.length > 0) { - writer.writeString(1, f) - } - f = message.getParams() - if (f != null) { - writer.writeMessage( - 2, - f, - oracle_v1_oracle_pb.Params.serializeBinaryToWriter, - ) - } -} - -/** - * optional string authority = 1; - * @return {string} - */ -proto.oracle.v1.MsgUpdateParams.prototype.getAuthority = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) -} - -/** - * @param {string} value - * @return {!proto.oracle.v1.MsgUpdateParams} returns this - */ -proto.oracle.v1.MsgUpdateParams.prototype.setAuthority = function (value) { - return jspb.Message.setProto3StringField(this, 1, value) -} - -/** - * optional Params params = 2; - * @return {?proto.oracle.v1.Params} - */ -proto.oracle.v1.MsgUpdateParams.prototype.getParams = function () { - return /** @type{?proto.oracle.v1.Params} */ ( - jspb.Message.getWrapperField(this, oracle_v1_oracle_pb.Params, 2) - ) -} - -/** - * @param {?proto.oracle.v1.Params|undefined} value - * @return {!proto.oracle.v1.MsgUpdateParams} returns this - */ -proto.oracle.v1.MsgUpdateParams.prototype.setParams = function (value) { - return jspb.Message.setWrapperField(this, 2, value) -} - -/** - * Clears the message field making it undefined. - * @return {!proto.oracle.v1.MsgUpdateParams} returns this - */ -proto.oracle.v1.MsgUpdateParams.prototype.clearParams = function () { - return this.setParams(undefined) -} - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.oracle.v1.MsgUpdateParams.prototype.hasParams = function () { - return jspb.Message.getField(this, 2) != null -} - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.oracle.v1.MsgUpdateParamsResponse.prototype.toObject = function ( - opt_includeInstance, - ) { - return proto.oracle.v1.MsgUpdateParamsResponse.toObject( - opt_includeInstance, - this, - ) - } - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.oracle.v1.MsgUpdateParamsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.oracle.v1.MsgUpdateParamsResponse.toObject = function ( - includeInstance, - msg, - ) { - var f, - obj = {} - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj - } -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.oracle.v1.MsgUpdateParamsResponse} - */ -proto.oracle.v1.MsgUpdateParamsResponse.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes) - var msg = new proto.oracle.v1.MsgUpdateParamsResponse() - return proto.oracle.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader( - msg, - reader, - ) -} - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.oracle.v1.MsgUpdateParamsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.oracle.v1.MsgUpdateParamsResponse} - */ -proto.oracle.v1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function ( - msg, - reader, -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break - } - var field = reader.getFieldNumber() - switch (field) { - default: - reader.skipField() - break - } - } - return msg -} - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.oracle.v1.MsgUpdateParamsResponse.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter() - proto.oracle.v1.MsgUpdateParamsResponse.serializeBinaryToWriter( - this, - writer, - ) - return writer.getResultBuffer() - } - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.oracle.v1.MsgUpdateParamsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.oracle.v1.MsgUpdateParamsResponse.serializeBinaryToWriter = function ( - message, - writer, -) { - var f = undefined -} - -goog.object.extend(exports, proto.oracle.v1) diff --git a/proto/oracle/v1/tx_pb_service.d.ts b/proto/oracle/v1/tx_pb_service.d.ts deleted file mode 100644 index f839206..0000000 --- a/proto/oracle/v1/tx_pb_service.d.ts +++ /dev/null @@ -1,256 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/tx.proto - -import * as oracle_v1_tx_pb from '../../oracle/v1/tx_pb' -import { grpc } from '@improbable-eng/grpc-web' - -type MsgRequestData = { - readonly methodName: string - readonly service: typeof Msg - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_tx_pb.MsgRequestData - readonly responseType: typeof oracle_v1_tx_pb.MsgRequestDataResponse -} - -type MsgReportData = { - readonly methodName: string - readonly service: typeof Msg - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_tx_pb.MsgReportData - readonly responseType: typeof oracle_v1_tx_pb.MsgReportDataResponse -} - -type MsgCreateDataSource = { - readonly methodName: string - readonly service: typeof Msg - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_tx_pb.MsgCreateDataSource - readonly responseType: typeof oracle_v1_tx_pb.MsgCreateDataSourceResponse -} - -type MsgEditDataSource = { - readonly methodName: string - readonly service: typeof Msg - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_tx_pb.MsgEditDataSource - readonly responseType: typeof oracle_v1_tx_pb.MsgEditDataSourceResponse -} - -type MsgCreateOracleScript = { - readonly methodName: string - readonly service: typeof Msg - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_tx_pb.MsgCreateOracleScript - readonly responseType: typeof oracle_v1_tx_pb.MsgCreateOracleScriptResponse -} - -type MsgEditOracleScript = { - readonly methodName: string - readonly service: typeof Msg - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_tx_pb.MsgEditOracleScript - readonly responseType: typeof oracle_v1_tx_pb.MsgEditOracleScriptResponse -} - -type MsgActivate = { - readonly methodName: string - readonly service: typeof Msg - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_tx_pb.MsgActivate - readonly responseType: typeof oracle_v1_tx_pb.MsgActivateResponse -} - -type MsgUpdateParams = { - readonly methodName: string - readonly service: typeof Msg - readonly requestStream: false - readonly responseStream: false - readonly requestType: typeof oracle_v1_tx_pb.MsgUpdateParams - readonly responseType: typeof oracle_v1_tx_pb.MsgUpdateParamsResponse -} - -export class Msg { - static readonly serviceName: string - static readonly RequestData: MsgRequestData - static readonly ReportData: MsgReportData - static readonly CreateDataSource: MsgCreateDataSource - static readonly EditDataSource: MsgEditDataSource - static readonly CreateOracleScript: MsgCreateOracleScript - static readonly EditOracleScript: MsgEditOracleScript - static readonly Activate: MsgActivate - static readonly UpdateParams: MsgUpdateParams -} - -export type ServiceError = { - message: string - code: number - metadata: grpc.Metadata -} -export type Status = { details: string; code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void -} -interface ResponseStream { - cancel(): void - on(type: 'data', handler: (message: T) => void): ResponseStream - on(type: 'end', handler: (status?: Status) => void): ResponseStream - on(type: 'status', handler: (status: Status) => void): ResponseStream -} -interface RequestStream { - write(message: T): RequestStream - end(): void - cancel(): void - on(type: 'end', handler: (status?: Status) => void): RequestStream - on(type: 'status', handler: (status: Status) => void): RequestStream -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream - end(): void - cancel(): void - on( - type: 'data', - handler: (message: ResT) => void, - ): BidirectionalStream - on( - type: 'end', - handler: (status?: Status) => void, - ): BidirectionalStream - on( - type: 'status', - handler: (status: Status) => void, - ): BidirectionalStream -} - -export class MsgClient { - readonly serviceHost: string - - constructor(serviceHost: string, options?: grpc.RpcOptions) - requestData( - requestMessage: oracle_v1_tx_pb.MsgRequestData, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgRequestDataResponse | null, - ) => void, - ): UnaryResponse - requestData( - requestMessage: oracle_v1_tx_pb.MsgRequestData, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgRequestDataResponse | null, - ) => void, - ): UnaryResponse - reportData( - requestMessage: oracle_v1_tx_pb.MsgReportData, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgReportDataResponse | null, - ) => void, - ): UnaryResponse - reportData( - requestMessage: oracle_v1_tx_pb.MsgReportData, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgReportDataResponse | null, - ) => void, - ): UnaryResponse - createDataSource( - requestMessage: oracle_v1_tx_pb.MsgCreateDataSource, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgCreateDataSourceResponse | null, - ) => void, - ): UnaryResponse - createDataSource( - requestMessage: oracle_v1_tx_pb.MsgCreateDataSource, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgCreateDataSourceResponse | null, - ) => void, - ): UnaryResponse - editDataSource( - requestMessage: oracle_v1_tx_pb.MsgEditDataSource, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgEditDataSourceResponse | null, - ) => void, - ): UnaryResponse - editDataSource( - requestMessage: oracle_v1_tx_pb.MsgEditDataSource, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgEditDataSourceResponse | null, - ) => void, - ): UnaryResponse - createOracleScript( - requestMessage: oracle_v1_tx_pb.MsgCreateOracleScript, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgCreateOracleScriptResponse | null, - ) => void, - ): UnaryResponse - createOracleScript( - requestMessage: oracle_v1_tx_pb.MsgCreateOracleScript, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgCreateOracleScriptResponse | null, - ) => void, - ): UnaryResponse - editOracleScript( - requestMessage: oracle_v1_tx_pb.MsgEditOracleScript, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgEditOracleScriptResponse | null, - ) => void, - ): UnaryResponse - editOracleScript( - requestMessage: oracle_v1_tx_pb.MsgEditOracleScript, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgEditOracleScriptResponse | null, - ) => void, - ): UnaryResponse - activate( - requestMessage: oracle_v1_tx_pb.MsgActivate, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgActivateResponse | null, - ) => void, - ): UnaryResponse - activate( - requestMessage: oracle_v1_tx_pb.MsgActivate, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgActivateResponse | null, - ) => void, - ): UnaryResponse - updateParams( - requestMessage: oracle_v1_tx_pb.MsgUpdateParams, - metadata: grpc.Metadata, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgUpdateParamsResponse | null, - ) => void, - ): UnaryResponse - updateParams( - requestMessage: oracle_v1_tx_pb.MsgUpdateParams, - callback: ( - error: ServiceError | null, - responseMessage: oracle_v1_tx_pb.MsgUpdateParamsResponse | null, - ) => void, - ): UnaryResponse -} diff --git a/proto/oracle/v1/tx_pb_service.js b/proto/oracle/v1/tx_pb_service.js deleted file mode 100644 index ea2f174..0000000 --- a/proto/oracle/v1/tx_pb_service.js +++ /dev/null @@ -1,372 +0,0 @@ -// package: oracle.v1 -// file: oracle/v1/tx.proto - -var oracle_v1_tx_pb = require('../../oracle/v1/tx_pb') -var grpc = require('@improbable-eng/grpc-web').grpc - -var Msg = (function () { - function Msg() {} - Msg.serviceName = 'oracle.v1.Msg' - return Msg -})() - -Msg.RequestData = { - methodName: 'RequestData', - service: Msg, - requestStream: false, - responseStream: false, - requestType: oracle_v1_tx_pb.MsgRequestData, - responseType: oracle_v1_tx_pb.MsgRequestDataResponse, -} - -Msg.ReportData = { - methodName: 'ReportData', - service: Msg, - requestStream: false, - responseStream: false, - requestType: oracle_v1_tx_pb.MsgReportData, - responseType: oracle_v1_tx_pb.MsgReportDataResponse, -} - -Msg.CreateDataSource = { - methodName: 'CreateDataSource', - service: Msg, - requestStream: false, - responseStream: false, - requestType: oracle_v1_tx_pb.MsgCreateDataSource, - responseType: oracle_v1_tx_pb.MsgCreateDataSourceResponse, -} - -Msg.EditDataSource = { - methodName: 'EditDataSource', - service: Msg, - requestStream: false, - responseStream: false, - requestType: oracle_v1_tx_pb.MsgEditDataSource, - responseType: oracle_v1_tx_pb.MsgEditDataSourceResponse, -} - -Msg.CreateOracleScript = { - methodName: 'CreateOracleScript', - service: Msg, - requestStream: false, - responseStream: false, - requestType: oracle_v1_tx_pb.MsgCreateOracleScript, - responseType: oracle_v1_tx_pb.MsgCreateOracleScriptResponse, -} - -Msg.EditOracleScript = { - methodName: 'EditOracleScript', - service: Msg, - requestStream: false, - responseStream: false, - requestType: oracle_v1_tx_pb.MsgEditOracleScript, - responseType: oracle_v1_tx_pb.MsgEditOracleScriptResponse, -} - -Msg.Activate = { - methodName: 'Activate', - service: Msg, - requestStream: false, - responseStream: false, - requestType: oracle_v1_tx_pb.MsgActivate, - responseType: oracle_v1_tx_pb.MsgActivateResponse, -} - -Msg.UpdateParams = { - methodName: 'UpdateParams', - service: Msg, - requestStream: false, - responseStream: false, - requestType: oracle_v1_tx_pb.MsgUpdateParams, - responseType: oracle_v1_tx_pb.MsgUpdateParamsResponse, -} - -exports.Msg = Msg - -function MsgClient(serviceHost, options) { - this.serviceHost = serviceHost - this.options = options || {} -} - -MsgClient.prototype.requestData = function requestData( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Msg.RequestData, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -MsgClient.prototype.reportData = function reportData( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Msg.ReportData, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -MsgClient.prototype.createDataSource = function createDataSource( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Msg.CreateDataSource, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -MsgClient.prototype.editDataSource = function editDataSource( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Msg.EditDataSource, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -MsgClient.prototype.createOracleScript = function createOracleScript( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Msg.CreateOracleScript, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -MsgClient.prototype.editOracleScript = function editOracleScript( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Msg.EditOracleScript, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -MsgClient.prototype.activate = function activate( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Msg.Activate, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -MsgClient.prototype.updateParams = function updateParams( - requestMessage, - metadata, - callback, -) { - if (arguments.length === 2) { - callback = arguments[1] - } - var client = grpc.unary(Msg.UpdateParams, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage) - err.code = response.status - err.metadata = response.trailers - callback(err, null) - } else { - callback(null, response.message) - } - } - }, - }) - return { - cancel: function () { - callback = null - client.close() - }, - } -} - -exports.MsgClient = MsgClient diff --git a/proto/rollingseed/v1beta1/genesis_pb_service.d.ts b/proto/rollingseed/v1beta1/genesis_pb_service.d.ts deleted file mode 100644 index be899fb..0000000 --- a/proto/rollingseed/v1beta1/genesis_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: rollingseed.v1beta1 -// file: rollingseed/v1beta1/genesis.proto - diff --git a/proto/rollingseed/v1beta1/genesis_pb_service.js b/proto/rollingseed/v1beta1/genesis_pb_service.js deleted file mode 100644 index be899fb..0000000 --- a/proto/rollingseed/v1beta1/genesis_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: rollingseed.v1beta1 -// file: rollingseed/v1beta1/genesis.proto - diff --git a/proto/tss/v1beta1/genesis_pb.d.ts b/proto/tss/v1beta1/genesis_pb.d.ts deleted file mode 100644 index 377d015..0000000 --- a/proto/tss/v1beta1/genesis_pb.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/genesis.proto - -import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; -import * as tss_v1beta1_tss_pb from "../../tss/v1beta1/tss_pb"; -import * as cosmos_proto_cosmos_pb from "../../cosmos_proto/cosmos_pb"; - -export class GenesisState extends jspb.Message { - hasParams(): boolean; - clearParams(): void; - getParams(): Params | undefined; - setParams(value?: Params): void; - - getGroupCount(): number; - setGroupCount(value: number): void; - - clearGroupsList(): void; - getGroupsList(): Array; - setGroupsList(value: Array): void; - addGroups(value?: tss_v1beta1_tss_pb.Group, index?: number): tss_v1beta1_tss_pb.Group; - - getSigningCount(): number; - setSigningCount(value: number): void; - - clearSigningsList(): void; - getSigningsList(): Array; - setSigningsList(value: Array): void; - addSignings(value?: tss_v1beta1_tss_pb.Signing, index?: number): tss_v1beta1_tss_pb.Signing; - - getReplacementCount(): number; - setReplacementCount(value: number): void; - - clearReplacementsList(): void; - getReplacementsList(): Array; - setReplacementsList(value: Array): void; - addReplacements(value?: tss_v1beta1_tss_pb.Replacement, index?: number): tss_v1beta1_tss_pb.Replacement; - - clearDeQueuesGenesisList(): void; - getDeQueuesGenesisList(): Array; - setDeQueuesGenesisList(value: Array): void; - addDeQueuesGenesis(value?: DEQueueGenesis, index?: number): DEQueueGenesis; - - clearDesGenesisList(): void; - getDesGenesisList(): Array; - setDesGenesisList(value: Array): void; - addDesGenesis(value?: DEGenesis, index?: number): DEGenesis; - - clearStatusesList(): void; - getStatusesList(): Array; - setStatusesList(value: Array): void; - addStatuses(value?: tss_v1beta1_tss_pb.Status, index?: number): tss_v1beta1_tss_pb.Status; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenesisState.AsObject; - static toObject(includeInstance: boolean, msg: GenesisState): GenesisState.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenesisState, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenesisState; - static deserializeBinaryFromReader(message: GenesisState, reader: jspb.BinaryReader): GenesisState; -} - -export namespace GenesisState { - export type AsObject = { - params?: Params.AsObject, - groupCount: number, - groupsList: Array, - signingCount: number, - signingsList: Array, - replacementCount: number, - replacementsList: Array, - deQueuesGenesisList: Array, - desGenesisList: Array, - statusesList: Array, - } -} - -export class Params extends jspb.Message { - getMaxGroupSize(): number; - setMaxGroupSize(value: number): void; - - getMaxDESize(): number; - setMaxDESize(value: number): void; - - getCreatingPeriod(): number; - setCreatingPeriod(value: number): void; - - getSigningPeriod(): number; - setSigningPeriod(value: number): void; - - hasActiveDuration(): boolean; - clearActiveDuration(): void; - getActiveDuration(): google_protobuf_duration_pb.Duration | undefined; - setActiveDuration(value?: google_protobuf_duration_pb.Duration): void; - - hasInactivePenaltyDuration(): boolean; - clearInactivePenaltyDuration(): void; - getInactivePenaltyDuration(): google_protobuf_duration_pb.Duration | undefined; - setInactivePenaltyDuration(value?: google_protobuf_duration_pb.Duration): void; - - hasJailPenaltyDuration(): boolean; - clearJailPenaltyDuration(): void; - getJailPenaltyDuration(): google_protobuf_duration_pb.Duration | undefined; - setJailPenaltyDuration(value?: google_protobuf_duration_pb.Duration): void; - - getRewardPercentage(): number; - setRewardPercentage(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Params.AsObject; - static toObject(includeInstance: boolean, msg: Params): Params.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Params, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Params; - static deserializeBinaryFromReader(message: Params, reader: jspb.BinaryReader): Params; -} - -export namespace Params { - export type AsObject = { - maxGroupSize: number, - maxDESize: number, - creatingPeriod: number, - signingPeriod: number, - activeDuration?: google_protobuf_duration_pb.Duration.AsObject, - inactivePenaltyDuration?: google_protobuf_duration_pb.Duration.AsObject, - jailPenaltyDuration?: google_protobuf_duration_pb.Duration.AsObject, - rewardPercentage: number, - } -} - -export class DEQueueGenesis extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - hasDeQueue(): boolean; - clearDeQueue(): void; - getDeQueue(): tss_v1beta1_tss_pb.DEQueue | undefined; - setDeQueue(value?: tss_v1beta1_tss_pb.DEQueue): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DEQueueGenesis.AsObject; - static toObject(includeInstance: boolean, msg: DEQueueGenesis): DEQueueGenesis.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DEQueueGenesis, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DEQueueGenesis; - static deserializeBinaryFromReader(message: DEQueueGenesis, reader: jspb.BinaryReader): DEQueueGenesis; -} - -export namespace DEQueueGenesis { - export type AsObject = { - address: string, - deQueue?: tss_v1beta1_tss_pb.DEQueue.AsObject, - } -} - -export class DEGenesis extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - getIndex(): number; - setIndex(value: number): void; - - hasDe(): boolean; - clearDe(): void; - getDe(): tss_v1beta1_tss_pb.DE | undefined; - setDe(value?: tss_v1beta1_tss_pb.DE): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DEGenesis.AsObject; - static toObject(includeInstance: boolean, msg: DEGenesis): DEGenesis.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DEGenesis, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DEGenesis; - static deserializeBinaryFromReader(message: DEGenesis, reader: jspb.BinaryReader): DEGenesis; -} - -export namespace DEGenesis { - export type AsObject = { - address: string, - index: number, - de?: tss_v1beta1_tss_pb.DE.AsObject, - } -} - diff --git a/proto/tss/v1beta1/genesis_pb.js b/proto/tss/v1beta1/genesis_pb.js deleted file mode 100644 index fdc45b4..0000000 --- a/proto/tss/v1beta1/genesis_pb.js +++ /dev/null @@ -1,1475 +0,0 @@ -// source: tss/v1beta1/genesis.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); -var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); -goog.object.extend(proto, google_protobuf_duration_pb); -var tss_v1beta1_tss_pb = require('../../tss/v1beta1/tss_pb.js'); -goog.object.extend(proto, tss_v1beta1_tss_pb); -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js'); -goog.object.extend(proto, cosmos_proto_cosmos_pb); -goog.exportSymbol('proto.tss.v1beta1.DEGenesis', null, global); -goog.exportSymbol('proto.tss.v1beta1.DEQueueGenesis', null, global); -goog.exportSymbol('proto.tss.v1beta1.GenesisState', null, global); -goog.exportSymbol('proto.tss.v1beta1.Params', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.GenesisState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.GenesisState.repeatedFields_, null); -}; -goog.inherits(proto.tss.v1beta1.GenesisState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.GenesisState.displayName = 'proto.tss.v1beta1.GenesisState'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.Params = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.Params, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.Params.displayName = 'proto.tss.v1beta1.Params'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.DEQueueGenesis = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.DEQueueGenesis, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.DEQueueGenesis.displayName = 'proto.tss.v1beta1.DEQueueGenesis'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.DEGenesis = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.DEGenesis, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.DEGenesis.displayName = 'proto.tss.v1beta1.DEGenesis'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.GenesisState.repeatedFields_ = [3,5,7,8,9,10]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.GenesisState.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.GenesisState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.GenesisState.toObject = function(includeInstance, msg) { - var f, obj = { - params: (f = msg.getParams()) && proto.tss.v1beta1.Params.toObject(includeInstance, f), - groupCount: jspb.Message.getFieldWithDefault(msg, 2, 0), - groupsList: jspb.Message.toObjectList(msg.getGroupsList(), - tss_v1beta1_tss_pb.Group.toObject, includeInstance), - signingCount: jspb.Message.getFieldWithDefault(msg, 4, 0), - signingsList: jspb.Message.toObjectList(msg.getSigningsList(), - tss_v1beta1_tss_pb.Signing.toObject, includeInstance), - replacementCount: jspb.Message.getFieldWithDefault(msg, 6, 0), - replacementsList: jspb.Message.toObjectList(msg.getReplacementsList(), - tss_v1beta1_tss_pb.Replacement.toObject, includeInstance), - deQueuesGenesisList: jspb.Message.toObjectList(msg.getDeQueuesGenesisList(), - proto.tss.v1beta1.DEQueueGenesis.toObject, includeInstance), - desGenesisList: jspb.Message.toObjectList(msg.getDesGenesisList(), - proto.tss.v1beta1.DEGenesis.toObject, includeInstance), - statusesList: jspb.Message.toObjectList(msg.getStatusesList(), - tss_v1beta1_tss_pb.Status.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.GenesisState} - */ -proto.tss.v1beta1.GenesisState.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.GenesisState; - return proto.tss.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.GenesisState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.GenesisState} - */ -proto.tss.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.tss.v1beta1.Params; - reader.readMessage(value,proto.tss.v1beta1.Params.deserializeBinaryFromReader); - msg.setParams(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGroupCount(value); - break; - case 3: - var value = new tss_v1beta1_tss_pb.Group; - reader.readMessage(value,tss_v1beta1_tss_pb.Group.deserializeBinaryFromReader); - msg.addGroups(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSigningCount(value); - break; - case 5: - var value = new tss_v1beta1_tss_pb.Signing; - reader.readMessage(value,tss_v1beta1_tss_pb.Signing.deserializeBinaryFromReader); - msg.addSignings(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setReplacementCount(value); - break; - case 7: - var value = new tss_v1beta1_tss_pb.Replacement; - reader.readMessage(value,tss_v1beta1_tss_pb.Replacement.deserializeBinaryFromReader); - msg.addReplacements(value); - break; - case 8: - var value = new proto.tss.v1beta1.DEQueueGenesis; - reader.readMessage(value,proto.tss.v1beta1.DEQueueGenesis.deserializeBinaryFromReader); - msg.addDeQueuesGenesis(value); - break; - case 9: - var value = new proto.tss.v1beta1.DEGenesis; - reader.readMessage(value,proto.tss.v1beta1.DEGenesis.deserializeBinaryFromReader); - msg.addDesGenesis(value); - break; - case 10: - var value = new tss_v1beta1_tss_pb.Status; - reader.readMessage(value,tss_v1beta1_tss_pb.Status.deserializeBinaryFromReader); - msg.addStatuses(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.GenesisState.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.GenesisState.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.GenesisState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getParams(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.tss.v1beta1.Params.serializeBinaryToWriter - ); - } - f = message.getGroupCount(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getGroupsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - tss_v1beta1_tss_pb.Group.serializeBinaryToWriter - ); - } - f = message.getSigningCount(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getSigningsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - tss_v1beta1_tss_pb.Signing.serializeBinaryToWriter - ); - } - f = message.getReplacementCount(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getReplacementsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - tss_v1beta1_tss_pb.Replacement.serializeBinaryToWriter - ); - } - f = message.getDeQueuesGenesisList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - proto.tss.v1beta1.DEQueueGenesis.serializeBinaryToWriter - ); - } - f = message.getDesGenesisList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 9, - f, - proto.tss.v1beta1.DEGenesis.serializeBinaryToWriter - ); - } - f = message.getStatusesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 10, - f, - tss_v1beta1_tss_pb.Status.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Params params = 1; - * @return {?proto.tss.v1beta1.Params} - */ -proto.tss.v1beta1.GenesisState.prototype.getParams = function() { - return /** @type{?proto.tss.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, proto.tss.v1beta1.Params, 1)); -}; - - -/** - * @param {?proto.tss.v1beta1.Params|undefined} value - * @return {!proto.tss.v1beta1.GenesisState} returns this -*/ -proto.tss.v1beta1.GenesisState.prototype.setParams = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.clearParams = function() { - return this.setParams(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.GenesisState.prototype.hasParams = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint64 group_count = 2; - * @return {number} - */ -proto.tss.v1beta1.GenesisState.prototype.getGroupCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.setGroupCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated Group groups = 3; - * @return {!Array} - */ -proto.tss.v1beta1.GenesisState.prototype.getGroupsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Group, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.GenesisState} returns this -*/ -proto.tss.v1beta1.GenesisState.prototype.setGroupsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.tss.v1beta1.Group=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Group} - */ -proto.tss.v1beta1.GenesisState.prototype.addGroups = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tss.v1beta1.Group, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.clearGroupsList = function() { - return this.setGroupsList([]); -}; - - -/** - * optional uint64 signing_count = 4; - * @return {number} - */ -proto.tss.v1beta1.GenesisState.prototype.getSigningCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.setSigningCount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated Signing signings = 5; - * @return {!Array} - */ -proto.tss.v1beta1.GenesisState.prototype.getSigningsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Signing, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.GenesisState} returns this -*/ -proto.tss.v1beta1.GenesisState.prototype.setSigningsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.tss.v1beta1.Signing=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Signing} - */ -proto.tss.v1beta1.GenesisState.prototype.addSignings = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.tss.v1beta1.Signing, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.clearSigningsList = function() { - return this.setSigningsList([]); -}; - - -/** - * optional uint64 replacement_count = 6; - * @return {number} - */ -proto.tss.v1beta1.GenesisState.prototype.getReplacementCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.setReplacementCount = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * repeated Replacement replacements = 7; - * @return {!Array} - */ -proto.tss.v1beta1.GenesisState.prototype.getReplacementsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Replacement, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.GenesisState} returns this -*/ -proto.tss.v1beta1.GenesisState.prototype.setReplacementsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.tss.v1beta1.Replacement=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Replacement} - */ -proto.tss.v1beta1.GenesisState.prototype.addReplacements = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.tss.v1beta1.Replacement, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.clearReplacementsList = function() { - return this.setReplacementsList([]); -}; - - -/** - * repeated DEQueueGenesis de_queues_genesis = 8; - * @return {!Array} - */ -proto.tss.v1beta1.GenesisState.prototype.getDeQueuesGenesisList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tss.v1beta1.DEQueueGenesis, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.GenesisState} returns this -*/ -proto.tss.v1beta1.GenesisState.prototype.setDeQueuesGenesisList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); -}; - - -/** - * @param {!proto.tss.v1beta1.DEQueueGenesis=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.DEQueueGenesis} - */ -proto.tss.v1beta1.GenesisState.prototype.addDeQueuesGenesis = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.tss.v1beta1.DEQueueGenesis, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.clearDeQueuesGenesisList = function() { - return this.setDeQueuesGenesisList([]); -}; - - -/** - * repeated DEGenesis des_genesis = 9; - * @return {!Array} - */ -proto.tss.v1beta1.GenesisState.prototype.getDesGenesisList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.tss.v1beta1.DEGenesis, 9)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.GenesisState} returns this -*/ -proto.tss.v1beta1.GenesisState.prototype.setDesGenesisList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 9, value); -}; - - -/** - * @param {!proto.tss.v1beta1.DEGenesis=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.DEGenesis} - */ -proto.tss.v1beta1.GenesisState.prototype.addDesGenesis = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.tss.v1beta1.DEGenesis, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.clearDesGenesisList = function() { - return this.setDesGenesisList([]); -}; - - -/** - * repeated Status statuses = 10; - * @return {!Array} - */ -proto.tss.v1beta1.GenesisState.prototype.getStatusesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Status, 10)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.GenesisState} returns this -*/ -proto.tss.v1beta1.GenesisState.prototype.setStatusesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 10, value); -}; - - -/** - * @param {!proto.tss.v1beta1.Status=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Status} - */ -proto.tss.v1beta1.GenesisState.prototype.addStatuses = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.tss.v1beta1.Status, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.GenesisState} returns this - */ -proto.tss.v1beta1.GenesisState.prototype.clearStatusesList = function() { - return this.setStatusesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.Params.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.Params} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.Params.toObject = function(includeInstance, msg) { - var f, obj = { - maxGroupSize: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxDESize: jspb.Message.getFieldWithDefault(msg, 2, 0), - creatingPeriod: jspb.Message.getFieldWithDefault(msg, 3, 0), - signingPeriod: jspb.Message.getFieldWithDefault(msg, 4, 0), - activeDuration: (f = msg.getActiveDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - inactivePenaltyDuration: (f = msg.getInactivePenaltyDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - jailPenaltyDuration: (f = msg.getJailPenaltyDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - rewardPercentage: jspb.Message.getFieldWithDefault(msg, 8, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.Params} - */ -proto.tss.v1beta1.Params.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.Params; - return proto.tss.v1beta1.Params.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.Params} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.Params} - */ -proto.tss.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxGroupSize(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxDESize(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCreatingPeriod(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSigningPeriod(value); - break; - case 5: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setActiveDuration(value); - break; - case 6: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setInactivePenaltyDuration(value); - break; - case 7: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setJailPenaltyDuration(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRewardPercentage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.Params.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.Params.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.Params} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMaxGroupSize(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getMaxDESize(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getCreatingPeriod(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getSigningPeriod(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getActiveDuration(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getInactivePenaltyDuration(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getJailPenaltyDuration(); - if (f != null) { - writer.writeMessage( - 7, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getRewardPercentage(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } -}; - - -/** - * optional uint64 max_group_size = 1; - * @return {number} - */ -proto.tss.v1beta1.Params.prototype.getMaxGroupSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.Params} returns this - */ -proto.tss.v1beta1.Params.prototype.setMaxGroupSize = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 max_d_e_size = 2; - * @return {number} - */ -proto.tss.v1beta1.Params.prototype.getMaxDESize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.Params} returns this - */ -proto.tss.v1beta1.Params.prototype.setMaxDESize = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 creating_period = 3; - * @return {number} - */ -proto.tss.v1beta1.Params.prototype.getCreatingPeriod = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.Params} returns this - */ -proto.tss.v1beta1.Params.prototype.setCreatingPeriod = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 signing_period = 4; - * @return {number} - */ -proto.tss.v1beta1.Params.prototype.getSigningPeriod = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.Params} returns this - */ -proto.tss.v1beta1.Params.prototype.setSigningPeriod = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional google.protobuf.Duration active_duration = 5; - * @return {?proto.google.protobuf.Duration} - */ -proto.tss.v1beta1.Params.prototype.getActiveDuration = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.tss.v1beta1.Params} returns this -*/ -proto.tss.v1beta1.Params.prototype.setActiveDuration = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.Params} returns this - */ -proto.tss.v1beta1.Params.prototype.clearActiveDuration = function() { - return this.setActiveDuration(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.Params.prototype.hasActiveDuration = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional google.protobuf.Duration inactive_penalty_duration = 6; - * @return {?proto.google.protobuf.Duration} - */ -proto.tss.v1beta1.Params.prototype.getInactivePenaltyDuration = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.tss.v1beta1.Params} returns this -*/ -proto.tss.v1beta1.Params.prototype.setInactivePenaltyDuration = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.Params} returns this - */ -proto.tss.v1beta1.Params.prototype.clearInactivePenaltyDuration = function() { - return this.setInactivePenaltyDuration(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.Params.prototype.hasInactivePenaltyDuration = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional google.protobuf.Duration jail_penalty_duration = 7; - * @return {?proto.google.protobuf.Duration} - */ -proto.tss.v1beta1.Params.prototype.getJailPenaltyDuration = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 7)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.tss.v1beta1.Params} returns this -*/ -proto.tss.v1beta1.Params.prototype.setJailPenaltyDuration = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.Params} returns this - */ -proto.tss.v1beta1.Params.prototype.clearJailPenaltyDuration = function() { - return this.setJailPenaltyDuration(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.Params.prototype.hasJailPenaltyDuration = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional uint64 reward_percentage = 8; - * @return {number} - */ -proto.tss.v1beta1.Params.prototype.getRewardPercentage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.Params} returns this - */ -proto.tss.v1beta1.Params.prototype.setRewardPercentage = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.DEQueueGenesis.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.DEQueueGenesis.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.DEQueueGenesis} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.DEQueueGenesis.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - deQueue: (f = msg.getDeQueue()) && tss_v1beta1_tss_pb.DEQueue.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.DEQueueGenesis} - */ -proto.tss.v1beta1.DEQueueGenesis.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.DEQueueGenesis; - return proto.tss.v1beta1.DEQueueGenesis.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.DEQueueGenesis} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.DEQueueGenesis} - */ -proto.tss.v1beta1.DEQueueGenesis.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = new tss_v1beta1_tss_pb.DEQueue; - reader.readMessage(value,tss_v1beta1_tss_pb.DEQueue.deserializeBinaryFromReader); - msg.setDeQueue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.DEQueueGenesis.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.DEQueueGenesis.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.DEQueueGenesis} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.DEQueueGenesis.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getDeQueue(); - if (f != null) { - writer.writeMessage( - 2, - f, - tss_v1beta1_tss_pb.DEQueue.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.tss.v1beta1.DEQueueGenesis.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.DEQueueGenesis} returns this - */ -proto.tss.v1beta1.DEQueueGenesis.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional DEQueue de_queue = 2; - * @return {?proto.tss.v1beta1.DEQueue} - */ -proto.tss.v1beta1.DEQueueGenesis.prototype.getDeQueue = function() { - return /** @type{?proto.tss.v1beta1.DEQueue} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_tss_pb.DEQueue, 2)); -}; - - -/** - * @param {?proto.tss.v1beta1.DEQueue|undefined} value - * @return {!proto.tss.v1beta1.DEQueueGenesis} returns this -*/ -proto.tss.v1beta1.DEQueueGenesis.prototype.setDeQueue = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.DEQueueGenesis} returns this - */ -proto.tss.v1beta1.DEQueueGenesis.prototype.clearDeQueue = function() { - return this.setDeQueue(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.DEQueueGenesis.prototype.hasDeQueue = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.DEGenesis.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.DEGenesis.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.DEGenesis} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.DEGenesis.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - index: jspb.Message.getFieldWithDefault(msg, 2, 0), - de: (f = msg.getDe()) && tss_v1beta1_tss_pb.DE.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.DEGenesis} - */ -proto.tss.v1beta1.DEGenesis.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.DEGenesis; - return proto.tss.v1beta1.DEGenesis.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.DEGenesis} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.DEGenesis} - */ -proto.tss.v1beta1.DEGenesis.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIndex(value); - break; - case 3: - var value = new tss_v1beta1_tss_pb.DE; - reader.readMessage(value,tss_v1beta1_tss_pb.DE.deserializeBinaryFromReader); - msg.setDe(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.DEGenesis.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.DEGenesis.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.DEGenesis} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.DEGenesis.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getIndex(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getDe(); - if (f != null) { - writer.writeMessage( - 3, - f, - tss_v1beta1_tss_pb.DE.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.tss.v1beta1.DEGenesis.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.DEGenesis} returns this - */ -proto.tss.v1beta1.DEGenesis.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 index = 2; - * @return {number} - */ -proto.tss.v1beta1.DEGenesis.prototype.getIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.DEGenesis} returns this - */ -proto.tss.v1beta1.DEGenesis.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional DE de = 3; - * @return {?proto.tss.v1beta1.DE} - */ -proto.tss.v1beta1.DEGenesis.prototype.getDe = function() { - return /** @type{?proto.tss.v1beta1.DE} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_tss_pb.DE, 3)); -}; - - -/** - * @param {?proto.tss.v1beta1.DE|undefined} value - * @return {!proto.tss.v1beta1.DEGenesis} returns this -*/ -proto.tss.v1beta1.DEGenesis.prototype.setDe = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.DEGenesis} returns this - */ -proto.tss.v1beta1.DEGenesis.prototype.clearDe = function() { - return this.setDe(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.DEGenesis.prototype.hasDe = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -goog.object.extend(exports, proto.tss.v1beta1); diff --git a/proto/tss/v1beta1/genesis_pb_service.d.ts b/proto/tss/v1beta1/genesis_pb_service.d.ts deleted file mode 100644 index 5e4a4d3..0000000 --- a/proto/tss/v1beta1/genesis_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/genesis.proto - diff --git a/proto/tss/v1beta1/genesis_pb_service.js b/proto/tss/v1beta1/genesis_pb_service.js deleted file mode 100644 index 5e4a4d3..0000000 --- a/proto/tss/v1beta1/genesis_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/genesis.proto - diff --git a/proto/tss/v1beta1/query_pb_service.d.ts b/proto/tss/v1beta1/query_pb_service.d.ts deleted file mode 100644 index 107dc46..0000000 --- a/proto/tss/v1beta1/query_pb_service.d.ts +++ /dev/null @@ -1,272 +0,0 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/query.proto - -import * as tss_v1beta1_query_pb from "../../tss/v1beta1/query_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type QueryCounts = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryCountsRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryCountsResponse; -}; - -type QueryGroup = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryGroupRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryGroupResponse; -}; - -type QueryMembers = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryMembersRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryMembersResponse; -}; - -type QueryIsGrantee = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryIsGranteeRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryIsGranteeResponse; -}; - -type QueryDE = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryDERequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryDEResponse; -}; - -type QueryPendingGroups = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryPendingGroupsRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryPendingGroupsResponse; -}; - -type QueryPendingSignings = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryPendingSigningsRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryPendingSigningsResponse; -}; - -type QuerySigning = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QuerySigningRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QuerySigningResponse; -}; - -type QueryStatuses = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryStatusesRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryStatusesResponse; -}; - -type QueryStatus = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryStatusRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryStatusResponse; -}; - -type QueryReplacements = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryReplacementsRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryReplacementsResponse; -}; - -type QueryReplacement = { - readonly methodName: string; - readonly service: typeof Query; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_query_pb.QueryReplacementRequest; - readonly responseType: typeof tss_v1beta1_query_pb.QueryReplacementResponse; -}; - -export class Query { - static readonly serviceName: string; - static readonly Counts: QueryCounts; - static readonly Group: QueryGroup; - static readonly Members: QueryMembers; - static readonly IsGrantee: QueryIsGrantee; - static readonly DE: QueryDE; - static readonly PendingGroups: QueryPendingGroups; - static readonly PendingSignings: QueryPendingSignings; - static readonly Signing: QuerySigning; - static readonly Statuses: QueryStatuses; - static readonly Status: QueryStatus; - static readonly Replacements: QueryReplacements; - static readonly Replacement: QueryReplacement; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class QueryClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - counts( - requestMessage: tss_v1beta1_query_pb.QueryCountsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryCountsResponse|null) => void - ): UnaryResponse; - counts( - requestMessage: tss_v1beta1_query_pb.QueryCountsRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryCountsResponse|null) => void - ): UnaryResponse; - group( - requestMessage: tss_v1beta1_query_pb.QueryGroupRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryGroupResponse|null) => void - ): UnaryResponse; - group( - requestMessage: tss_v1beta1_query_pb.QueryGroupRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryGroupResponse|null) => void - ): UnaryResponse; - members( - requestMessage: tss_v1beta1_query_pb.QueryMembersRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryMembersResponse|null) => void - ): UnaryResponse; - members( - requestMessage: tss_v1beta1_query_pb.QueryMembersRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryMembersResponse|null) => void - ): UnaryResponse; - isGrantee( - requestMessage: tss_v1beta1_query_pb.QueryIsGranteeRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryIsGranteeResponse|null) => void - ): UnaryResponse; - isGrantee( - requestMessage: tss_v1beta1_query_pb.QueryIsGranteeRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryIsGranteeResponse|null) => void - ): UnaryResponse; - dE( - requestMessage: tss_v1beta1_query_pb.QueryDERequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryDEResponse|null) => void - ): UnaryResponse; - dE( - requestMessage: tss_v1beta1_query_pb.QueryDERequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryDEResponse|null) => void - ): UnaryResponse; - pendingGroups( - requestMessage: tss_v1beta1_query_pb.QueryPendingGroupsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryPendingGroupsResponse|null) => void - ): UnaryResponse; - pendingGroups( - requestMessage: tss_v1beta1_query_pb.QueryPendingGroupsRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryPendingGroupsResponse|null) => void - ): UnaryResponse; - pendingSignings( - requestMessage: tss_v1beta1_query_pb.QueryPendingSigningsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryPendingSigningsResponse|null) => void - ): UnaryResponse; - pendingSignings( - requestMessage: tss_v1beta1_query_pb.QueryPendingSigningsRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryPendingSigningsResponse|null) => void - ): UnaryResponse; - signing( - requestMessage: tss_v1beta1_query_pb.QuerySigningRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QuerySigningResponse|null) => void - ): UnaryResponse; - signing( - requestMessage: tss_v1beta1_query_pb.QuerySigningRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QuerySigningResponse|null) => void - ): UnaryResponse; - statuses( - requestMessage: tss_v1beta1_query_pb.QueryStatusesRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryStatusesResponse|null) => void - ): UnaryResponse; - statuses( - requestMessage: tss_v1beta1_query_pb.QueryStatusesRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryStatusesResponse|null) => void - ): UnaryResponse; - status( - requestMessage: tss_v1beta1_query_pb.QueryStatusRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryStatusResponse|null) => void - ): UnaryResponse; - status( - requestMessage: tss_v1beta1_query_pb.QueryStatusRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryStatusResponse|null) => void - ): UnaryResponse; - replacements( - requestMessage: tss_v1beta1_query_pb.QueryReplacementsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryReplacementsResponse|null) => void - ): UnaryResponse; - replacements( - requestMessage: tss_v1beta1_query_pb.QueryReplacementsRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryReplacementsResponse|null) => void - ): UnaryResponse; - replacement( - requestMessage: tss_v1beta1_query_pb.QueryReplacementRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryReplacementResponse|null) => void - ): UnaryResponse; - replacement( - requestMessage: tss_v1beta1_query_pb.QueryReplacementRequest, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_query_pb.QueryReplacementResponse|null) => void - ): UnaryResponse; -} - diff --git a/proto/tss/v1beta1/tss_pb_service.d.ts b/proto/tss/v1beta1/tss_pb_service.d.ts deleted file mode 100644 index 72c2c7f..0000000 --- a/proto/tss/v1beta1/tss_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/tss.proto - diff --git a/proto/tss/v1beta1/tss_pb_service.js b/proto/tss/v1beta1/tss_pb_service.js deleted file mode 100644 index 72c2c7f..0000000 --- a/proto/tss/v1beta1/tss_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/tss.proto - diff --git a/proto/tss/v1beta1/tx_pb.d.ts b/proto/tss/v1beta1/tx_pb.d.ts deleted file mode 100644 index 6d71b51..0000000 --- a/proto/tss/v1beta1/tx_pb.d.ts +++ /dev/null @@ -1,608 +0,0 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/tx.proto - -import * as jspb from "google-protobuf"; -import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; -import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as amino_amino_pb from "../../amino/amino_pb"; -import * as cosmos_base_v1beta1_coin_pb from "../../cosmos/base/v1beta1/coin_pb"; -import * as cosmos_proto_cosmos_pb from "../../cosmos_proto/cosmos_pb"; -import * as cosmos_msg_v1_msg_pb from "../../cosmos/msg/v1/msg_pb"; -import * as tss_v1beta1_tss_pb from "../../tss/v1beta1/tss_pb"; -import * as tss_v1beta1_genesis_pb from "../../tss/v1beta1/genesis_pb"; - -export class MsgCreateGroup extends jspb.Message { - clearMembersList(): void; - getMembersList(): Array; - setMembersList(value: Array): void; - addMembers(value: string, index?: number): string; - - getThreshold(): number; - setThreshold(value: number): void; - - clearFeeList(): void; - getFeeList(): Array; - setFeeList(value: Array): void; - addFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; - - getAuthority(): string; - setAuthority(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgCreateGroup.AsObject; - static toObject(includeInstance: boolean, msg: MsgCreateGroup): MsgCreateGroup.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgCreateGroup, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgCreateGroup; - static deserializeBinaryFromReader(message: MsgCreateGroup, reader: jspb.BinaryReader): MsgCreateGroup; -} - -export namespace MsgCreateGroup { - export type AsObject = { - membersList: Array, - threshold: number, - feeList: Array, - authority: string, - } -} - -export class MsgCreateGroupResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgCreateGroupResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgCreateGroupResponse): MsgCreateGroupResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgCreateGroupResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgCreateGroupResponse; - static deserializeBinaryFromReader(message: MsgCreateGroupResponse, reader: jspb.BinaryReader): MsgCreateGroupResponse; -} - -export namespace MsgCreateGroupResponse { - export type AsObject = { - } -} - -export class MsgReplaceGroup extends jspb.Message { - getFromGroupId(): number; - setFromGroupId(value: number): void; - - getToGroupId(): number; - setToGroupId(value: number): void; - - hasExecTime(): boolean; - clearExecTime(): void; - getExecTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setExecTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getAuthority(): string; - setAuthority(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgReplaceGroup.AsObject; - static toObject(includeInstance: boolean, msg: MsgReplaceGroup): MsgReplaceGroup.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgReplaceGroup, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgReplaceGroup; - static deserializeBinaryFromReader(message: MsgReplaceGroup, reader: jspb.BinaryReader): MsgReplaceGroup; -} - -export namespace MsgReplaceGroup { - export type AsObject = { - fromGroupId: number, - toGroupId: number, - execTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, - authority: string, - } -} - -export class MsgReplaceGroupResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgReplaceGroupResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgReplaceGroupResponse): MsgReplaceGroupResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgReplaceGroupResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgReplaceGroupResponse; - static deserializeBinaryFromReader(message: MsgReplaceGroupResponse, reader: jspb.BinaryReader): MsgReplaceGroupResponse; -} - -export namespace MsgReplaceGroupResponse { - export type AsObject = { - } -} - -export class MsgUpdateGroupFee extends jspb.Message { - getGroupId(): number; - setGroupId(value: number): void; - - clearFeeList(): void; - getFeeList(): Array; - setFeeList(value: Array): void; - addFee(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; - - getAuthority(): string; - setAuthority(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgUpdateGroupFee.AsObject; - static toObject(includeInstance: boolean, msg: MsgUpdateGroupFee): MsgUpdateGroupFee.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgUpdateGroupFee, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupFee; - static deserializeBinaryFromReader(message: MsgUpdateGroupFee, reader: jspb.BinaryReader): MsgUpdateGroupFee; -} - -export namespace MsgUpdateGroupFee { - export type AsObject = { - groupId: number, - feeList: Array, - authority: string, - } -} - -export class MsgUpdateGroupFeeResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgUpdateGroupFeeResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgUpdateGroupFeeResponse): MsgUpdateGroupFeeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgUpdateGroupFeeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgUpdateGroupFeeResponse; - static deserializeBinaryFromReader(message: MsgUpdateGroupFeeResponse, reader: jspb.BinaryReader): MsgUpdateGroupFeeResponse; -} - -export namespace MsgUpdateGroupFeeResponse { - export type AsObject = { - } -} - -export class MsgSubmitDKGRound1 extends jspb.Message { - getGroupId(): number; - setGroupId(value: number): void; - - hasRound1Info(): boolean; - clearRound1Info(): void; - getRound1Info(): tss_v1beta1_tss_pb.Round1Info | undefined; - setRound1Info(value?: tss_v1beta1_tss_pb.Round1Info): void; - - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitDKGRound1.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitDKGRound1): MsgSubmitDKGRound1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitDKGRound1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound1; - static deserializeBinaryFromReader(message: MsgSubmitDKGRound1, reader: jspb.BinaryReader): MsgSubmitDKGRound1; -} - -export namespace MsgSubmitDKGRound1 { - export type AsObject = { - groupId: number, - round1Info?: tss_v1beta1_tss_pb.Round1Info.AsObject, - address: string, - } -} - -export class MsgSubmitDKGRound1Response extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitDKGRound1Response.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitDKGRound1Response): MsgSubmitDKGRound1Response.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitDKGRound1Response, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound1Response; - static deserializeBinaryFromReader(message: MsgSubmitDKGRound1Response, reader: jspb.BinaryReader): MsgSubmitDKGRound1Response; -} - -export namespace MsgSubmitDKGRound1Response { - export type AsObject = { - } -} - -export class MsgSubmitDKGRound2 extends jspb.Message { - getGroupId(): number; - setGroupId(value: number): void; - - hasRound2Info(): boolean; - clearRound2Info(): void; - getRound2Info(): tss_v1beta1_tss_pb.Round2Info | undefined; - setRound2Info(value?: tss_v1beta1_tss_pb.Round2Info): void; - - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitDKGRound2.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitDKGRound2): MsgSubmitDKGRound2.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitDKGRound2, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound2; - static deserializeBinaryFromReader(message: MsgSubmitDKGRound2, reader: jspb.BinaryReader): MsgSubmitDKGRound2; -} - -export namespace MsgSubmitDKGRound2 { - export type AsObject = { - groupId: number, - round2Info?: tss_v1beta1_tss_pb.Round2Info.AsObject, - address: string, - } -} - -export class MsgSubmitDKGRound2Response extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitDKGRound2Response.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitDKGRound2Response): MsgSubmitDKGRound2Response.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitDKGRound2Response, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitDKGRound2Response; - static deserializeBinaryFromReader(message: MsgSubmitDKGRound2Response, reader: jspb.BinaryReader): MsgSubmitDKGRound2Response; -} - -export namespace MsgSubmitDKGRound2Response { - export type AsObject = { - } -} - -export class MsgComplain extends jspb.Message { - getGroupId(): number; - setGroupId(value: number): void; - - clearComplaintsList(): void; - getComplaintsList(): Array; - setComplaintsList(value: Array): void; - addComplaints(value?: tss_v1beta1_tss_pb.Complaint, index?: number): tss_v1beta1_tss_pb.Complaint; - - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgComplain.AsObject; - static toObject(includeInstance: boolean, msg: MsgComplain): MsgComplain.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgComplain, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgComplain; - static deserializeBinaryFromReader(message: MsgComplain, reader: jspb.BinaryReader): MsgComplain; -} - -export namespace MsgComplain { - export type AsObject = { - groupId: number, - complaintsList: Array, - address: string, - } -} - -export class MsgComplainResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgComplainResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgComplainResponse): MsgComplainResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgComplainResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgComplainResponse; - static deserializeBinaryFromReader(message: MsgComplainResponse, reader: jspb.BinaryReader): MsgComplainResponse; -} - -export namespace MsgComplainResponse { - export type AsObject = { - } -} - -export class MsgConfirm extends jspb.Message { - getGroupId(): number; - setGroupId(value: number): void; - - getMemberId(): number; - setMemberId(value: number): void; - - getOwnPubKeySig(): Uint8Array | string; - getOwnPubKeySig_asU8(): Uint8Array; - getOwnPubKeySig_asB64(): string; - setOwnPubKeySig(value: Uint8Array | string): void; - - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgConfirm.AsObject; - static toObject(includeInstance: boolean, msg: MsgConfirm): MsgConfirm.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgConfirm, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgConfirm; - static deserializeBinaryFromReader(message: MsgConfirm, reader: jspb.BinaryReader): MsgConfirm; -} - -export namespace MsgConfirm { - export type AsObject = { - groupId: number, - memberId: number, - ownPubKeySig: Uint8Array | string, - address: string, - } -} - -export class MsgConfirmResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgConfirmResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgConfirmResponse): MsgConfirmResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgConfirmResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgConfirmResponse; - static deserializeBinaryFromReader(message: MsgConfirmResponse, reader: jspb.BinaryReader): MsgConfirmResponse; -} - -export namespace MsgConfirmResponse { - export type AsObject = { - } -} - -export class MsgSubmitDEs extends jspb.Message { - clearDesList(): void; - getDesList(): Array; - setDesList(value: Array): void; - addDes(value?: tss_v1beta1_tss_pb.DE, index?: number): tss_v1beta1_tss_pb.DE; - - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitDEs.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitDEs): MsgSubmitDEs.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitDEs, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitDEs; - static deserializeBinaryFromReader(message: MsgSubmitDEs, reader: jspb.BinaryReader): MsgSubmitDEs; -} - -export namespace MsgSubmitDEs { - export type AsObject = { - desList: Array, - address: string, - } -} - -export class MsgSubmitDEsResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitDEsResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitDEsResponse): MsgSubmitDEsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitDEsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitDEsResponse; - static deserializeBinaryFromReader(message: MsgSubmitDEsResponse, reader: jspb.BinaryReader): MsgSubmitDEsResponse; -} - -export namespace MsgSubmitDEsResponse { - export type AsObject = { - } -} - -export class MsgRequestSignature extends jspb.Message { - getGroupId(): number; - setGroupId(value: number): void; - - hasContent(): boolean; - clearContent(): void; - getContent(): google_protobuf_any_pb.Any | undefined; - setContent(value?: google_protobuf_any_pb.Any): void; - - clearFeeLimitList(): void; - getFeeLimitList(): Array; - setFeeLimitList(value: Array): void; - addFeeLimit(value?: cosmos_base_v1beta1_coin_pb.Coin, index?: number): cosmos_base_v1beta1_coin_pb.Coin; - - getSender(): string; - setSender(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgRequestSignature.AsObject; - static toObject(includeInstance: boolean, msg: MsgRequestSignature): MsgRequestSignature.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgRequestSignature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgRequestSignature; - static deserializeBinaryFromReader(message: MsgRequestSignature, reader: jspb.BinaryReader): MsgRequestSignature; -} - -export namespace MsgRequestSignature { - export type AsObject = { - groupId: number, - content?: google_protobuf_any_pb.Any.AsObject, - feeLimitList: Array, - sender: string, - } -} - -export class MsgRequestSignatureResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgRequestSignatureResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgRequestSignatureResponse): MsgRequestSignatureResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgRequestSignatureResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgRequestSignatureResponse; - static deserializeBinaryFromReader(message: MsgRequestSignatureResponse, reader: jspb.BinaryReader): MsgRequestSignatureResponse; -} - -export namespace MsgRequestSignatureResponse { - export type AsObject = { - } -} - -export class MsgSubmitSignature extends jspb.Message { - getSigningId(): number; - setSigningId(value: number): void; - - getMemberId(): number; - setMemberId(value: number): void; - - getSignature(): Uint8Array | string; - getSignature_asU8(): Uint8Array; - getSignature_asB64(): string; - setSignature(value: Uint8Array | string): void; - - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitSignature.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitSignature): MsgSubmitSignature.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitSignature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitSignature; - static deserializeBinaryFromReader(message: MsgSubmitSignature, reader: jspb.BinaryReader): MsgSubmitSignature; -} - -export namespace MsgSubmitSignature { - export type AsObject = { - signingId: number, - memberId: number, - signature: Uint8Array | string, - address: string, - } -} - -export class MsgSubmitSignatureResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgSubmitSignatureResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgSubmitSignatureResponse): MsgSubmitSignatureResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgSubmitSignatureResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgSubmitSignatureResponse; - static deserializeBinaryFromReader(message: MsgSubmitSignatureResponse, reader: jspb.BinaryReader): MsgSubmitSignatureResponse; -} - -export namespace MsgSubmitSignatureResponse { - export type AsObject = { - } -} - -export class MsgActivate extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgActivate.AsObject; - static toObject(includeInstance: boolean, msg: MsgActivate): MsgActivate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgActivate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgActivate; - static deserializeBinaryFromReader(message: MsgActivate, reader: jspb.BinaryReader): MsgActivate; -} - -export namespace MsgActivate { - export type AsObject = { - address: string, - } -} - -export class MsgActivateResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgActivateResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgActivateResponse): MsgActivateResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgActivateResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgActivateResponse; - static deserializeBinaryFromReader(message: MsgActivateResponse, reader: jspb.BinaryReader): MsgActivateResponse; -} - -export namespace MsgActivateResponse { - export type AsObject = { - } -} - -export class MsgActive extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgActive.AsObject; - static toObject(includeInstance: boolean, msg: MsgActive): MsgActive.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgActive, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgActive; - static deserializeBinaryFromReader(message: MsgActive, reader: jspb.BinaryReader): MsgActive; -} - -export namespace MsgActive { - export type AsObject = { - address: string, - } -} - -export class MsgActiveResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgActiveResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgActiveResponse): MsgActiveResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgActiveResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgActiveResponse; - static deserializeBinaryFromReader(message: MsgActiveResponse, reader: jspb.BinaryReader): MsgActiveResponse; -} - -export namespace MsgActiveResponse { - export type AsObject = { - } -} - -export class MsgUpdateParams extends jspb.Message { - getAuthority(): string; - setAuthority(value: string): void; - - hasParams(): boolean; - clearParams(): void; - getParams(): tss_v1beta1_genesis_pb.Params | undefined; - setParams(value?: tss_v1beta1_genesis_pb.Params): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgUpdateParams.AsObject; - static toObject(includeInstance: boolean, msg: MsgUpdateParams): MsgUpdateParams.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgUpdateParams, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgUpdateParams; - static deserializeBinaryFromReader(message: MsgUpdateParams, reader: jspb.BinaryReader): MsgUpdateParams; -} - -export namespace MsgUpdateParams { - export type AsObject = { - authority: string, - params?: tss_v1beta1_genesis_pb.Params.AsObject, - } -} - -export class MsgUpdateParamsResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MsgUpdateParamsResponse.AsObject; - static toObject(includeInstance: boolean, msg: MsgUpdateParamsResponse): MsgUpdateParamsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MsgUpdateParamsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse; - static deserializeBinaryFromReader(message: MsgUpdateParamsResponse, reader: jspb.BinaryReader): MsgUpdateParamsResponse; -} - -export namespace MsgUpdateParamsResponse { - export type AsObject = { - } -} - diff --git a/proto/tss/v1beta1/tx_pb.js b/proto/tss/v1beta1/tx_pb.js deleted file mode 100644 index d5b96bb..0000000 --- a/proto/tss/v1beta1/tx_pb.js +++ /dev/null @@ -1,4683 +0,0 @@ -// source: tss/v1beta1/tx.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); - -var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); -goog.object.extend(proto, gogoproto_gogo_pb); -var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, google_protobuf_any_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -var amino_amino_pb = require('../../amino/amino_pb.js'); -goog.object.extend(proto, amino_amino_pb); -var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); -goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); -var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js'); -goog.object.extend(proto, cosmos_proto_cosmos_pb); -var cosmos_msg_v1_msg_pb = require('../../cosmos/msg/v1/msg_pb.js'); -goog.object.extend(proto, cosmos_msg_v1_msg_pb); -var tss_v1beta1_tss_pb = require('../../tss/v1beta1/tss_pb.js'); -goog.object.extend(proto, tss_v1beta1_tss_pb); -var tss_v1beta1_genesis_pb = require('../../tss/v1beta1/genesis_pb.js'); -goog.object.extend(proto, tss_v1beta1_genesis_pb); -goog.exportSymbol('proto.tss.v1beta1.MsgActivate', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgActivateResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgActive', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgActiveResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgComplain', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgComplainResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgConfirm', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgConfirmResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgCreateGroup', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgCreateGroupResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgReplaceGroup', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgReplaceGroupResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgRequestSignature', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgRequestSignatureResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgSubmitDEs', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgSubmitDEsResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgSubmitDKGRound1', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgSubmitDKGRound1Response', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgSubmitDKGRound2', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgSubmitDKGRound2Response', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgSubmitSignature', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgSubmitSignatureResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgUpdateGroupFee', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgUpdateGroupFeeResponse', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgUpdateParams', null, global); -goog.exportSymbol('proto.tss.v1beta1.MsgUpdateParamsResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgCreateGroup = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.MsgCreateGroup.repeatedFields_, null); -}; -goog.inherits(proto.tss.v1beta1.MsgCreateGroup, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgCreateGroup.displayName = 'proto.tss.v1beta1.MsgCreateGroup'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgCreateGroupResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgCreateGroupResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgCreateGroupResponse.displayName = 'proto.tss.v1beta1.MsgCreateGroupResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgReplaceGroup = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgReplaceGroup, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgReplaceGroup.displayName = 'proto.tss.v1beta1.MsgReplaceGroup'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgReplaceGroupResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgReplaceGroupResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgReplaceGroupResponse.displayName = 'proto.tss.v1beta1.MsgReplaceGroupResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgUpdateGroupFee = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.MsgUpdateGroupFee.repeatedFields_, null); -}; -goog.inherits(proto.tss.v1beta1.MsgUpdateGroupFee, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgUpdateGroupFee.displayName = 'proto.tss.v1beta1.MsgUpdateGroupFee'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgUpdateGroupFeeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgUpdateGroupFeeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgUpdateGroupFeeResponse.displayName = 'proto.tss.v1beta1.MsgUpdateGroupFeeResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgSubmitDKGRound1 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgSubmitDKGRound1, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgSubmitDKGRound1.displayName = 'proto.tss.v1beta1.MsgSubmitDKGRound1'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgSubmitDKGRound1Response = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgSubmitDKGRound1Response, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgSubmitDKGRound1Response.displayName = 'proto.tss.v1beta1.MsgSubmitDKGRound1Response'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgSubmitDKGRound2 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgSubmitDKGRound2, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgSubmitDKGRound2.displayName = 'proto.tss.v1beta1.MsgSubmitDKGRound2'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgSubmitDKGRound2Response = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgSubmitDKGRound2Response, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgSubmitDKGRound2Response.displayName = 'proto.tss.v1beta1.MsgSubmitDKGRound2Response'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgComplain = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.MsgComplain.repeatedFields_, null); -}; -goog.inherits(proto.tss.v1beta1.MsgComplain, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgComplain.displayName = 'proto.tss.v1beta1.MsgComplain'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgComplainResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgComplainResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgComplainResponse.displayName = 'proto.tss.v1beta1.MsgComplainResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgConfirm = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgConfirm, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgConfirm.displayName = 'proto.tss.v1beta1.MsgConfirm'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgConfirmResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgConfirmResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgConfirmResponse.displayName = 'proto.tss.v1beta1.MsgConfirmResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgSubmitDEs = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.MsgSubmitDEs.repeatedFields_, null); -}; -goog.inherits(proto.tss.v1beta1.MsgSubmitDEs, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgSubmitDEs.displayName = 'proto.tss.v1beta1.MsgSubmitDEs'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgSubmitDEsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgSubmitDEsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgSubmitDEsResponse.displayName = 'proto.tss.v1beta1.MsgSubmitDEsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgRequestSignature = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.tss.v1beta1.MsgRequestSignature.repeatedFields_, null); -}; -goog.inherits(proto.tss.v1beta1.MsgRequestSignature, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgRequestSignature.displayName = 'proto.tss.v1beta1.MsgRequestSignature'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgRequestSignatureResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgRequestSignatureResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgRequestSignatureResponse.displayName = 'proto.tss.v1beta1.MsgRequestSignatureResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgSubmitSignature = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgSubmitSignature, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgSubmitSignature.displayName = 'proto.tss.v1beta1.MsgSubmitSignature'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgSubmitSignatureResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgSubmitSignatureResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgSubmitSignatureResponse.displayName = 'proto.tss.v1beta1.MsgSubmitSignatureResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgActivate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgActivate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgActivate.displayName = 'proto.tss.v1beta1.MsgActivate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgActivateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgActivateResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgActivateResponse.displayName = 'proto.tss.v1beta1.MsgActivateResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgActive = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgActive, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgActive.displayName = 'proto.tss.v1beta1.MsgActive'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgActiveResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgActiveResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgActiveResponse.displayName = 'proto.tss.v1beta1.MsgActiveResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgUpdateParams = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgUpdateParams, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgUpdateParams.displayName = 'proto.tss.v1beta1.MsgUpdateParams'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.tss.v1beta1.MsgUpdateParamsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.tss.v1beta1.MsgUpdateParamsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.tss.v1beta1.MsgUpdateParamsResponse.displayName = 'proto.tss.v1beta1.MsgUpdateParamsResponse'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.MsgCreateGroup.repeatedFields_ = [1,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgCreateGroup.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgCreateGroup} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgCreateGroup.toObject = function(includeInstance, msg) { - var f, obj = { - membersList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - threshold: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeList: jspb.Message.toObjectList(msg.getFeeList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), - authority: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgCreateGroup} - */ -proto.tss.v1beta1.MsgCreateGroup.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgCreateGroup; - return proto.tss.v1beta1.MsgCreateGroup.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgCreateGroup} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgCreateGroup} - */ -proto.tss.v1beta1.MsgCreateGroup.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addMembers(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setThreshold(value); - break; - case 3: - var value = new cosmos_base_v1beta1_coin_pb.Coin; - reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.addFee(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setAuthority(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgCreateGroup.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgCreateGroup} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgCreateGroup.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMembersList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getThreshold(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getFeeList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter - ); - } - f = message.getAuthority(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * repeated string members = 1; - * @return {!Array} - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.getMembersList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.MsgCreateGroup} returns this - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.setMembersList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.MsgCreateGroup} returns this - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.addMembers = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.MsgCreateGroup} returns this - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.clearMembersList = function() { - return this.setMembersList([]); -}; - - -/** - * optional uint64 threshold = 2; - * @return {number} - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.getThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgCreateGroup} returns this - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.setThreshold = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated cosmos.base.v1beta1.Coin fee = 3; - * @return {!Array} - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.getFeeList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.MsgCreateGroup} returns this -*/ -proto.tss.v1beta1.MsgCreateGroup.prototype.setFeeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.addFee = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.MsgCreateGroup} returns this - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.clearFeeList = function() { - return this.setFeeList([]); -}; - - -/** - * optional string authority = 4; - * @return {string} - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.getAuthority = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgCreateGroup} returns this - */ -proto.tss.v1beta1.MsgCreateGroup.prototype.setAuthority = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgCreateGroupResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgCreateGroupResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgCreateGroupResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgCreateGroupResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgCreateGroupResponse} - */ -proto.tss.v1beta1.MsgCreateGroupResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgCreateGroupResponse; - return proto.tss.v1beta1.MsgCreateGroupResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgCreateGroupResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgCreateGroupResponse} - */ -proto.tss.v1beta1.MsgCreateGroupResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgCreateGroupResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgCreateGroupResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgCreateGroupResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgCreateGroupResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgReplaceGroup.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgReplaceGroup} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgReplaceGroup.toObject = function(includeInstance, msg) { - var f, obj = { - fromGroupId: jspb.Message.getFieldWithDefault(msg, 1, 0), - toGroupId: jspb.Message.getFieldWithDefault(msg, 2, 0), - execTime: (f = msg.getExecTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - authority: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgReplaceGroup} - */ -proto.tss.v1beta1.MsgReplaceGroup.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgReplaceGroup; - return proto.tss.v1beta1.MsgReplaceGroup.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgReplaceGroup} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgReplaceGroup} - */ -proto.tss.v1beta1.MsgReplaceGroup.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFromGroupId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setToGroupId(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setExecTime(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setAuthority(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgReplaceGroup.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgReplaceGroup} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgReplaceGroup.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFromGroupId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getToGroupId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getExecTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getAuthority(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional uint64 from_group_id = 1; - * @return {number} - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.getFromGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgReplaceGroup} returns this - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.setFromGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 to_group_id = 2; - * @return {number} - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.getToGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgReplaceGroup} returns this - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.setToGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp exec_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.getExecTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.tss.v1beta1.MsgReplaceGroup} returns this -*/ -proto.tss.v1beta1.MsgReplaceGroup.prototype.setExecTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.MsgReplaceGroup} returns this - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.clearExecTime = function() { - return this.setExecTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.hasExecTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string authority = 4; - * @return {string} - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.getAuthority = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgReplaceGroup} returns this - */ -proto.tss.v1beta1.MsgReplaceGroup.prototype.setAuthority = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgReplaceGroupResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgReplaceGroupResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgReplaceGroupResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgReplaceGroupResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgReplaceGroupResponse} - */ -proto.tss.v1beta1.MsgReplaceGroupResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgReplaceGroupResponse; - return proto.tss.v1beta1.MsgReplaceGroupResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgReplaceGroupResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgReplaceGroupResponse} - */ -proto.tss.v1beta1.MsgReplaceGroupResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgReplaceGroupResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgReplaceGroupResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgReplaceGroupResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgReplaceGroupResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.MsgUpdateGroupFee.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgUpdateGroupFee.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgUpdateGroupFee} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgUpdateGroupFee.toObject = function(includeInstance, msg) { - var f, obj = { - groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), - feeList: jspb.Message.toObjectList(msg.getFeeList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), - authority: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgUpdateGroupFee} - */ -proto.tss.v1beta1.MsgUpdateGroupFee.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgUpdateGroupFee; - return proto.tss.v1beta1.MsgUpdateGroupFee.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgUpdateGroupFee} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgUpdateGroupFee} - */ -proto.tss.v1beta1.MsgUpdateGroupFee.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGroupId(value); - break; - case 2: - var value = new cosmos_base_v1beta1_coin_pb.Coin; - reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.addFee(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAuthority(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgUpdateGroupFee.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgUpdateGroupFee} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgUpdateGroupFee.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGroupId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getFeeList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter - ); - } - f = message.getAuthority(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional uint64 group_id = 1; - * @return {number} - */ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.getGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgUpdateGroupFee} returns this - */ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.setGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * repeated cosmos.base.v1beta1.Coin fee = 2; - * @return {!Array} - */ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.getFeeList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.MsgUpdateGroupFee} returns this -*/ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.setFeeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} - */ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.addFee = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.MsgUpdateGroupFee} returns this - */ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.clearFeeList = function() { - return this.setFeeList([]); -}; - - -/** - * optional string authority = 3; - * @return {string} - */ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.getAuthority = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgUpdateGroupFee} returns this - */ -proto.tss.v1beta1.MsgUpdateGroupFee.prototype.setAuthority = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgUpdateGroupFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgUpdateGroupFeeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgUpdateGroupFeeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgUpdateGroupFeeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgUpdateGroupFeeResponse} - */ -proto.tss.v1beta1.MsgUpdateGroupFeeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgUpdateGroupFeeResponse; - return proto.tss.v1beta1.MsgUpdateGroupFeeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgUpdateGroupFeeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgUpdateGroupFeeResponse} - */ -proto.tss.v1beta1.MsgUpdateGroupFeeResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgUpdateGroupFeeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgUpdateGroupFeeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgUpdateGroupFeeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgUpdateGroupFeeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgSubmitDKGRound1.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound1} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.toObject = function(includeInstance, msg) { - var f, obj = { - groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), - round1Info: (f = msg.getRound1Info()) && tss_v1beta1_tss_pb.Round1Info.toObject(includeInstance, f), - address: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound1} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgSubmitDKGRound1; - return proto.tss.v1beta1.MsgSubmitDKGRound1.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound1} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound1} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGroupId(value); - break; - case 2: - var value = new tss_v1beta1_tss_pb.Round1Info; - reader.readMessage(value,tss_v1beta1_tss_pb.Round1Info.deserializeBinaryFromReader); - msg.setRound1Info(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgSubmitDKGRound1.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound1} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGroupId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getRound1Info(); - if (f != null) { - writer.writeMessage( - 2, - f, - tss_v1beta1_tss_pb.Round1Info.serializeBinaryToWriter - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional uint64 group_id = 1; - * @return {number} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.getGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound1} returns this - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.setGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional Round1Info round1_info = 2; - * @return {?proto.tss.v1beta1.Round1Info} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.getRound1Info = function() { - return /** @type{?proto.tss.v1beta1.Round1Info} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_tss_pb.Round1Info, 2)); -}; - - -/** - * @param {?proto.tss.v1beta1.Round1Info|undefined} value - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound1} returns this -*/ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.setRound1Info = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound1} returns this - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.clearRound1Info = function() { - return this.setRound1Info(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.hasRound1Info = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string address = 3; - * @return {string} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound1} returns this - */ -proto.tss.v1beta1.MsgSubmitDKGRound1.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1Response.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgSubmitDKGRound1Response.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound1Response} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDKGRound1Response.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound1Response} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1Response.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgSubmitDKGRound1Response; - return proto.tss.v1beta1.MsgSubmitDKGRound1Response.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound1Response} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound1Response} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1Response.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgSubmitDKGRound1Response.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgSubmitDKGRound1Response.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound1Response} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDKGRound1Response.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgSubmitDKGRound2.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound2} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.toObject = function(includeInstance, msg) { - var f, obj = { - groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), - round2Info: (f = msg.getRound2Info()) && tss_v1beta1_tss_pb.Round2Info.toObject(includeInstance, f), - address: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound2} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgSubmitDKGRound2; - return proto.tss.v1beta1.MsgSubmitDKGRound2.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound2} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound2} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGroupId(value); - break; - case 2: - var value = new tss_v1beta1_tss_pb.Round2Info; - reader.readMessage(value,tss_v1beta1_tss_pb.Round2Info.deserializeBinaryFromReader); - msg.setRound2Info(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgSubmitDKGRound2.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound2} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGroupId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getRound2Info(); - if (f != null) { - writer.writeMessage( - 2, - f, - tss_v1beta1_tss_pb.Round2Info.serializeBinaryToWriter - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional uint64 group_id = 1; - * @return {number} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.getGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound2} returns this - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.setGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional Round2Info round2_info = 2; - * @return {?proto.tss.v1beta1.Round2Info} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.getRound2Info = function() { - return /** @type{?proto.tss.v1beta1.Round2Info} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_tss_pb.Round2Info, 2)); -}; - - -/** - * @param {?proto.tss.v1beta1.Round2Info|undefined} value - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound2} returns this -*/ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.setRound2Info = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound2} returns this - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.clearRound2Info = function() { - return this.setRound2Info(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.hasRound2Info = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string address = 3; - * @return {string} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound2} returns this - */ -proto.tss.v1beta1.MsgSubmitDKGRound2.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2Response.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgSubmitDKGRound2Response.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound2Response} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDKGRound2Response.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound2Response} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2Response.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgSubmitDKGRound2Response; - return proto.tss.v1beta1.MsgSubmitDKGRound2Response.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound2Response} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgSubmitDKGRound2Response} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2Response.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgSubmitDKGRound2Response.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgSubmitDKGRound2Response.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgSubmitDKGRound2Response} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDKGRound2Response.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.MsgComplain.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgComplain.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgComplain.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgComplain} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgComplain.toObject = function(includeInstance, msg) { - var f, obj = { - groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), - complaintsList: jspb.Message.toObjectList(msg.getComplaintsList(), - tss_v1beta1_tss_pb.Complaint.toObject, includeInstance), - address: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgComplain} - */ -proto.tss.v1beta1.MsgComplain.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgComplain; - return proto.tss.v1beta1.MsgComplain.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgComplain} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgComplain} - */ -proto.tss.v1beta1.MsgComplain.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGroupId(value); - break; - case 2: - var value = new tss_v1beta1_tss_pb.Complaint; - reader.readMessage(value,tss_v1beta1_tss_pb.Complaint.deserializeBinaryFromReader); - msg.addComplaints(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgComplain.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgComplain.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgComplain} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgComplain.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGroupId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getComplaintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - tss_v1beta1_tss_pb.Complaint.serializeBinaryToWriter - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional uint64 group_id = 1; - * @return {number} - */ -proto.tss.v1beta1.MsgComplain.prototype.getGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgComplain} returns this - */ -proto.tss.v1beta1.MsgComplain.prototype.setGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * repeated Complaint complaints = 2; - * @return {!Array} - */ -proto.tss.v1beta1.MsgComplain.prototype.getComplaintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.Complaint, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.MsgComplain} returns this -*/ -proto.tss.v1beta1.MsgComplain.prototype.setComplaintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.tss.v1beta1.Complaint=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.Complaint} - */ -proto.tss.v1beta1.MsgComplain.prototype.addComplaints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tss.v1beta1.Complaint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.MsgComplain} returns this - */ -proto.tss.v1beta1.MsgComplain.prototype.clearComplaintsList = function() { - return this.setComplaintsList([]); -}; - - -/** - * optional string address = 3; - * @return {string} - */ -proto.tss.v1beta1.MsgComplain.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgComplain} returns this - */ -proto.tss.v1beta1.MsgComplain.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgComplainResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgComplainResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgComplainResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgComplainResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgComplainResponse} - */ -proto.tss.v1beta1.MsgComplainResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgComplainResponse; - return proto.tss.v1beta1.MsgComplainResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgComplainResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgComplainResponse} - */ -proto.tss.v1beta1.MsgComplainResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgComplainResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgComplainResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgComplainResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgComplainResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgConfirm.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgConfirm.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgConfirm} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgConfirm.toObject = function(includeInstance, msg) { - var f, obj = { - groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), - memberId: jspb.Message.getFieldWithDefault(msg, 2, 0), - ownPubKeySig: msg.getOwnPubKeySig_asB64(), - address: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgConfirm} - */ -proto.tss.v1beta1.MsgConfirm.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgConfirm; - return proto.tss.v1beta1.MsgConfirm.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgConfirm} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgConfirm} - */ -proto.tss.v1beta1.MsgConfirm.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGroupId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMemberId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnPubKeySig(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgConfirm.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgConfirm.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgConfirm} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgConfirm.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGroupId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getMemberId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getOwnPubKeySig_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional uint64 group_id = 1; - * @return {number} - */ -proto.tss.v1beta1.MsgConfirm.prototype.getGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgConfirm} returns this - */ -proto.tss.v1beta1.MsgConfirm.prototype.setGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 member_id = 2; - * @return {number} - */ -proto.tss.v1beta1.MsgConfirm.prototype.getMemberId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgConfirm} returns this - */ -proto.tss.v1beta1.MsgConfirm.prototype.setMemberId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes own_pub_key_sig = 3; - * @return {!(string|Uint8Array)} - */ -proto.tss.v1beta1.MsgConfirm.prototype.getOwnPubKeySig = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes own_pub_key_sig = 3; - * This is a type-conversion wrapper around `getOwnPubKeySig()` - * @return {string} - */ -proto.tss.v1beta1.MsgConfirm.prototype.getOwnPubKeySig_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnPubKeySig())); -}; - - -/** - * optional bytes own_pub_key_sig = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnPubKeySig()` - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgConfirm.prototype.getOwnPubKeySig_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnPubKeySig())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.MsgConfirm} returns this - */ -proto.tss.v1beta1.MsgConfirm.prototype.setOwnPubKeySig = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional string address = 4; - * @return {string} - */ -proto.tss.v1beta1.MsgConfirm.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgConfirm} returns this - */ -proto.tss.v1beta1.MsgConfirm.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgConfirmResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgConfirmResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgConfirmResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgConfirmResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgConfirmResponse} - */ -proto.tss.v1beta1.MsgConfirmResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgConfirmResponse; - return proto.tss.v1beta1.MsgConfirmResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgConfirmResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgConfirmResponse} - */ -proto.tss.v1beta1.MsgConfirmResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgConfirmResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgConfirmResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgConfirmResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgConfirmResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.MsgSubmitDEs.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgSubmitDEs.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgSubmitDEs.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgSubmitDEs} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDEs.toObject = function(includeInstance, msg) { - var f, obj = { - desList: jspb.Message.toObjectList(msg.getDesList(), - tss_v1beta1_tss_pb.DE.toObject, includeInstance), - address: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgSubmitDEs} - */ -proto.tss.v1beta1.MsgSubmitDEs.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgSubmitDEs; - return proto.tss.v1beta1.MsgSubmitDEs.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgSubmitDEs} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgSubmitDEs} - */ -proto.tss.v1beta1.MsgSubmitDEs.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new tss_v1beta1_tss_pb.DE; - reader.readMessage(value,tss_v1beta1_tss_pb.DE.deserializeBinaryFromReader); - msg.addDes(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgSubmitDEs.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgSubmitDEs.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgSubmitDEs} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDEs.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - tss_v1beta1_tss_pb.DE.serializeBinaryToWriter - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * repeated DE des = 1; - * @return {!Array} - */ -proto.tss.v1beta1.MsgSubmitDEs.prototype.getDesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, tss_v1beta1_tss_pb.DE, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.MsgSubmitDEs} returns this -*/ -proto.tss.v1beta1.MsgSubmitDEs.prototype.setDesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.tss.v1beta1.DE=} opt_value - * @param {number=} opt_index - * @return {!proto.tss.v1beta1.DE} - */ -proto.tss.v1beta1.MsgSubmitDEs.prototype.addDes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tss.v1beta1.DE, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.MsgSubmitDEs} returns this - */ -proto.tss.v1beta1.MsgSubmitDEs.prototype.clearDesList = function() { - return this.setDesList([]); -}; - - -/** - * optional string address = 2; - * @return {string} - */ -proto.tss.v1beta1.MsgSubmitDEs.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgSubmitDEs} returns this - */ -proto.tss.v1beta1.MsgSubmitDEs.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgSubmitDEsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgSubmitDEsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgSubmitDEsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDEsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgSubmitDEsResponse} - */ -proto.tss.v1beta1.MsgSubmitDEsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgSubmitDEsResponse; - return proto.tss.v1beta1.MsgSubmitDEsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgSubmitDEsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgSubmitDEsResponse} - */ -proto.tss.v1beta1.MsgSubmitDEsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgSubmitDEsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgSubmitDEsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgSubmitDEsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitDEsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.tss.v1beta1.MsgRequestSignature.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgRequestSignature.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgRequestSignature} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgRequestSignature.toObject = function(includeInstance, msg) { - var f, obj = { - groupId: jspb.Message.getFieldWithDefault(msg, 1, 0), - content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), - feeLimitList: jspb.Message.toObjectList(msg.getFeeLimitList(), - cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), - sender: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgRequestSignature} - */ -proto.tss.v1beta1.MsgRequestSignature.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgRequestSignature; - return proto.tss.v1beta1.MsgRequestSignature.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgRequestSignature} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgRequestSignature} - */ -proto.tss.v1beta1.MsgRequestSignature.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGroupId(value); - break; - case 2: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setContent(value); - break; - case 3: - var value = new cosmos_base_v1beta1_coin_pb.Coin; - reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); - msg.addFeeLimit(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgRequestSignature.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgRequestSignature} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgRequestSignature.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGroupId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getContent(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } - f = message.getFeeLimitList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter - ); - } - f = message.getSender(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional uint64 group_id = 1; - * @return {number} - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.getGroupId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgRequestSignature} returns this - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.setGroupId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional google.protobuf.Any content = 2; - * @return {?proto.google.protobuf.Any} - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.getContent = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.tss.v1beta1.MsgRequestSignature} returns this -*/ -proto.tss.v1beta1.MsgRequestSignature.prototype.setContent = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.MsgRequestSignature} returns this - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.clearContent = function() { - return this.setContent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.hasContent = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * repeated cosmos.base.v1beta1.Coin fee_limit = 3; - * @return {!Array} - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.getFeeLimitList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.tss.v1beta1.MsgRequestSignature} returns this -*/ -proto.tss.v1beta1.MsgRequestSignature.prototype.setFeeLimitList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value - * @param {number=} opt_index - * @return {!proto.cosmos.base.v1beta1.Coin} - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.addFeeLimit = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.tss.v1beta1.MsgRequestSignature} returns this - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.clearFeeLimitList = function() { - return this.setFeeLimitList([]); -}; - - -/** - * optional string sender = 4; - * @return {string} - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgRequestSignature} returns this - */ -proto.tss.v1beta1.MsgRequestSignature.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgRequestSignatureResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgRequestSignatureResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgRequestSignatureResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgRequestSignatureResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgRequestSignatureResponse} - */ -proto.tss.v1beta1.MsgRequestSignatureResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgRequestSignatureResponse; - return proto.tss.v1beta1.MsgRequestSignatureResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgRequestSignatureResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgRequestSignatureResponse} - */ -proto.tss.v1beta1.MsgRequestSignatureResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgRequestSignatureResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgRequestSignatureResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgRequestSignatureResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgRequestSignatureResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgSubmitSignature.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgSubmitSignature} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitSignature.toObject = function(includeInstance, msg) { - var f, obj = { - signingId: jspb.Message.getFieldWithDefault(msg, 1, 0), - memberId: jspb.Message.getFieldWithDefault(msg, 2, 0), - signature: msg.getSignature_asB64(), - address: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgSubmitSignature} - */ -proto.tss.v1beta1.MsgSubmitSignature.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgSubmitSignature; - return proto.tss.v1beta1.MsgSubmitSignature.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgSubmitSignature} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgSubmitSignature} - */ -proto.tss.v1beta1.MsgSubmitSignature.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSigningId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMemberId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgSubmitSignature.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgSubmitSignature} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitSignature.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSigningId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getMemberId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional uint64 signing_id = 1; - * @return {number} - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.getSigningId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgSubmitSignature} returns this - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.setSigningId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 member_id = 2; - * @return {number} - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.getMemberId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.tss.v1beta1.MsgSubmitSignature} returns this - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.setMemberId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.tss.v1beta1.MsgSubmitSignature} returns this - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional string address = 4; - * @return {string} - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgSubmitSignature} returns this - */ -proto.tss.v1beta1.MsgSubmitSignature.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgSubmitSignatureResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgSubmitSignatureResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgSubmitSignatureResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitSignatureResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgSubmitSignatureResponse} - */ -proto.tss.v1beta1.MsgSubmitSignatureResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgSubmitSignatureResponse; - return proto.tss.v1beta1.MsgSubmitSignatureResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgSubmitSignatureResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgSubmitSignatureResponse} - */ -proto.tss.v1beta1.MsgSubmitSignatureResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgSubmitSignatureResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgSubmitSignatureResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgSubmitSignatureResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgSubmitSignatureResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgActivate.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgActivate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgActivate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgActivate.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgActivate} - */ -proto.tss.v1beta1.MsgActivate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgActivate; - return proto.tss.v1beta1.MsgActivate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgActivate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgActivate} - */ -proto.tss.v1beta1.MsgActivate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgActivate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgActivate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgActivate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgActivate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.tss.v1beta1.MsgActivate.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgActivate} returns this - */ -proto.tss.v1beta1.MsgActivate.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgActivateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgActivateResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgActivateResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgActivateResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgActivateResponse} - */ -proto.tss.v1beta1.MsgActivateResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgActivateResponse; - return proto.tss.v1beta1.MsgActivateResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgActivateResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgActivateResponse} - */ -proto.tss.v1beta1.MsgActivateResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgActivateResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgActivateResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgActivateResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgActivateResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgActive.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgActive.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgActive} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgActive.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgActive} - */ -proto.tss.v1beta1.MsgActive.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgActive; - return proto.tss.v1beta1.MsgActive.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgActive} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgActive} - */ -proto.tss.v1beta1.MsgActive.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgActive.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgActive.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgActive} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgActive.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.tss.v1beta1.MsgActive.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgActive} returns this - */ -proto.tss.v1beta1.MsgActive.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgActiveResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgActiveResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgActiveResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgActiveResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgActiveResponse} - */ -proto.tss.v1beta1.MsgActiveResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgActiveResponse; - return proto.tss.v1beta1.MsgActiveResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgActiveResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgActiveResponse} - */ -proto.tss.v1beta1.MsgActiveResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgActiveResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgActiveResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgActiveResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgActiveResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgUpdateParams.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgUpdateParams.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgUpdateParams} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgUpdateParams.toObject = function(includeInstance, msg) { - var f, obj = { - authority: jspb.Message.getFieldWithDefault(msg, 1, ""), - params: (f = msg.getParams()) && tss_v1beta1_genesis_pb.Params.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgUpdateParams} - */ -proto.tss.v1beta1.MsgUpdateParams.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgUpdateParams; - return proto.tss.v1beta1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgUpdateParams} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgUpdateParams} - */ -proto.tss.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAuthority(value); - break; - case 2: - var value = new tss_v1beta1_genesis_pb.Params; - reader.readMessage(value,tss_v1beta1_genesis_pb.Params.deserializeBinaryFromReader); - msg.setParams(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgUpdateParams.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgUpdateParams.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgUpdateParams} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAuthority(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getParams(); - if (f != null) { - writer.writeMessage( - 2, - f, - tss_v1beta1_genesis_pb.Params.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string authority = 1; - * @return {string} - */ -proto.tss.v1beta1.MsgUpdateParams.prototype.getAuthority = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.tss.v1beta1.MsgUpdateParams} returns this - */ -proto.tss.v1beta1.MsgUpdateParams.prototype.setAuthority = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional Params params = 2; - * @return {?proto.tss.v1beta1.Params} - */ -proto.tss.v1beta1.MsgUpdateParams.prototype.getParams = function() { - return /** @type{?proto.tss.v1beta1.Params} */ ( - jspb.Message.getWrapperField(this, tss_v1beta1_genesis_pb.Params, 2)); -}; - - -/** - * @param {?proto.tss.v1beta1.Params|undefined} value - * @return {!proto.tss.v1beta1.MsgUpdateParams} returns this -*/ -proto.tss.v1beta1.MsgUpdateParams.prototype.setParams = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.tss.v1beta1.MsgUpdateParams} returns this - */ -proto.tss.v1beta1.MsgUpdateParams.prototype.clearParams = function() { - return this.setParams(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.tss.v1beta1.MsgUpdateParams.prototype.hasParams = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.tss.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.tss.v1beta1.MsgUpdateParamsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.tss.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgUpdateParamsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.tss.v1beta1.MsgUpdateParamsResponse} - */ -proto.tss.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.tss.v1beta1.MsgUpdateParamsResponse; - return proto.tss.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.tss.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.tss.v1beta1.MsgUpdateParamsResponse} - */ -proto.tss.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.tss.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.tss.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.tss.v1beta1.MsgUpdateParamsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.tss.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -goog.object.extend(exports, proto.tss.v1beta1); diff --git a/proto/tss/v1beta1/tx_pb_service.d.ts b/proto/tss/v1beta1/tx_pb_service.d.ts deleted file mode 100644 index 9d57f6d..0000000 --- a/proto/tss/v1beta1/tx_pb_service.d.ts +++ /dev/null @@ -1,291 +0,0 @@ -// package: tss.v1beta1 -// file: tss/v1beta1/tx.proto - -import * as tss_v1beta1_tx_pb from "../../tss/v1beta1/tx_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type MsgCreateGroup = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgCreateGroup; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgCreateGroupResponse; -}; - -type MsgReplaceGroup = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgReplaceGroup; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgReplaceGroupResponse; -}; - -type MsgUpdateGroupFee = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgUpdateGroupFee; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgUpdateGroupFeeResponse; -}; - -type MsgSubmitDKGRound1 = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgSubmitDKGRound1; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgSubmitDKGRound1Response; -}; - -type MsgSubmitDKGRound2 = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgSubmitDKGRound2; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgSubmitDKGRound2Response; -}; - -type MsgComplain = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgComplain; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgComplainResponse; -}; - -type MsgConfirm = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgConfirm; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgConfirmResponse; -}; - -type MsgSubmitDEs = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgSubmitDEs; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgSubmitDEsResponse; -}; - -type MsgRequestSignature = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgRequestSignature; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgRequestSignatureResponse; -}; - -type MsgSubmitSignature = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgSubmitSignature; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgSubmitSignatureResponse; -}; - -type MsgActivate = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgActivate; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgActivateResponse; -}; - -type MsgActive = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgActive; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgActiveResponse; -}; - -type MsgUpdateParams = { - readonly methodName: string; - readonly service: typeof Msg; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof tss_v1beta1_tx_pb.MsgUpdateParams; - readonly responseType: typeof tss_v1beta1_tx_pb.MsgUpdateParamsResponse; -}; - -export class Msg { - static readonly serviceName: string; - static readonly CreateGroup: MsgCreateGroup; - static readonly ReplaceGroup: MsgReplaceGroup; - static readonly UpdateGroupFee: MsgUpdateGroupFee; - static readonly SubmitDKGRound1: MsgSubmitDKGRound1; - static readonly SubmitDKGRound2: MsgSubmitDKGRound2; - static readonly Complain: MsgComplain; - static readonly Confirm: MsgConfirm; - static readonly SubmitDEs: MsgSubmitDEs; - static readonly RequestSignature: MsgRequestSignature; - static readonly SubmitSignature: MsgSubmitSignature; - static readonly Activate: MsgActivate; - static readonly Active: MsgActive; - static readonly UpdateParams: MsgUpdateParams; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class MsgClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - createGroup( - requestMessage: tss_v1beta1_tx_pb.MsgCreateGroup, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgCreateGroupResponse|null) => void - ): UnaryResponse; - createGroup( - requestMessage: tss_v1beta1_tx_pb.MsgCreateGroup, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgCreateGroupResponse|null) => void - ): UnaryResponse; - replaceGroup( - requestMessage: tss_v1beta1_tx_pb.MsgReplaceGroup, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgReplaceGroupResponse|null) => void - ): UnaryResponse; - replaceGroup( - requestMessage: tss_v1beta1_tx_pb.MsgReplaceGroup, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgReplaceGroupResponse|null) => void - ): UnaryResponse; - updateGroupFee( - requestMessage: tss_v1beta1_tx_pb.MsgUpdateGroupFee, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgUpdateGroupFeeResponse|null) => void - ): UnaryResponse; - updateGroupFee( - requestMessage: tss_v1beta1_tx_pb.MsgUpdateGroupFee, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgUpdateGroupFeeResponse|null) => void - ): UnaryResponse; - submitDKGRound1( - requestMessage: tss_v1beta1_tx_pb.MsgSubmitDKGRound1, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgSubmitDKGRound1Response|null) => void - ): UnaryResponse; - submitDKGRound1( - requestMessage: tss_v1beta1_tx_pb.MsgSubmitDKGRound1, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgSubmitDKGRound1Response|null) => void - ): UnaryResponse; - submitDKGRound2( - requestMessage: tss_v1beta1_tx_pb.MsgSubmitDKGRound2, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgSubmitDKGRound2Response|null) => void - ): UnaryResponse; - submitDKGRound2( - requestMessage: tss_v1beta1_tx_pb.MsgSubmitDKGRound2, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgSubmitDKGRound2Response|null) => void - ): UnaryResponse; - complain( - requestMessage: tss_v1beta1_tx_pb.MsgComplain, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgComplainResponse|null) => void - ): UnaryResponse; - complain( - requestMessage: tss_v1beta1_tx_pb.MsgComplain, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgComplainResponse|null) => void - ): UnaryResponse; - confirm( - requestMessage: tss_v1beta1_tx_pb.MsgConfirm, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgConfirmResponse|null) => void - ): UnaryResponse; - confirm( - requestMessage: tss_v1beta1_tx_pb.MsgConfirm, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgConfirmResponse|null) => void - ): UnaryResponse; - submitDEs( - requestMessage: tss_v1beta1_tx_pb.MsgSubmitDEs, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgSubmitDEsResponse|null) => void - ): UnaryResponse; - submitDEs( - requestMessage: tss_v1beta1_tx_pb.MsgSubmitDEs, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgSubmitDEsResponse|null) => void - ): UnaryResponse; - requestSignature( - requestMessage: tss_v1beta1_tx_pb.MsgRequestSignature, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgRequestSignatureResponse|null) => void - ): UnaryResponse; - requestSignature( - requestMessage: tss_v1beta1_tx_pb.MsgRequestSignature, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgRequestSignatureResponse|null) => void - ): UnaryResponse; - submitSignature( - requestMessage: tss_v1beta1_tx_pb.MsgSubmitSignature, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgSubmitSignatureResponse|null) => void - ): UnaryResponse; - submitSignature( - requestMessage: tss_v1beta1_tx_pb.MsgSubmitSignature, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgSubmitSignatureResponse|null) => void - ): UnaryResponse; - activate( - requestMessage: tss_v1beta1_tx_pb.MsgActivate, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgActivateResponse|null) => void - ): UnaryResponse; - activate( - requestMessage: tss_v1beta1_tx_pb.MsgActivate, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgActivateResponse|null) => void - ): UnaryResponse; - active( - requestMessage: tss_v1beta1_tx_pb.MsgActive, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgActiveResponse|null) => void - ): UnaryResponse; - active( - requestMessage: tss_v1beta1_tx_pb.MsgActive, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgActiveResponse|null) => void - ): UnaryResponse; - updateParams( - requestMessage: tss_v1beta1_tx_pb.MsgUpdateParams, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void - ): UnaryResponse; - updateParams( - requestMessage: tss_v1beta1_tx_pb.MsgUpdateParams, - callback: (error: ServiceError|null, responseMessage: tss_v1beta1_tx_pb.MsgUpdateParamsResponse|null) => void - ): UnaryResponse; -} - diff --git a/src/client.ts b/src/client.ts index 9496ba0..b7b01c1 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4,11 +4,11 @@ import { NodeHttpTransport } from '@improbable-eng/grpc-web-node-http-transport' import { NotFoundError, NotIntegerError, ValueError } from './error' import { ReferenceData } from './data' -import { QueryClient } from '../proto/oracle/v1/query_pb_service' -import { ServiceClient } from '../proto/cosmos/base/tendermint/v1beta1/query_pb_service' -import { QueryClient as AuthQueryClient } from '../proto/cosmos/auth/v1beta1/query_pb_service' -import { ServiceClient as TxServiceClient } from '../proto/cosmos/tx/v1beta1/service_pb_service' -import { QueryClient as QueryAllBalances } from '../proto/cosmos/bank/v1beta1/query_pb_service' +import { QueryClient } from '../codegen/band/oracle/v1/query_pb_service' +import { ServiceClient } from '../codegen/cosmos/base/tendermint/v1beta1/query_pb_service' +import { QueryClient as AuthQueryClient } from '../codegen/cosmos/auth/v1beta1/query_pb_service' +import { ServiceClient as TxServiceClient } from '../codegen/cosmos/tx/v1beta1/service_pb_service' +import { QueryClient as QueryAllBalances } from '../codegen/cosmos/bank/v1beta1/query_pb_service' import { QueryDataSourceRequest, @@ -18,26 +18,26 @@ import { QueryReportersRequest, QueryRequestPriceRequest, QueryRequestSearchRequest, -} from '../proto/oracle/v1/query_pb' +} from '../codegen/band/oracle/v1/query_pb' import { GetLatestBlockRequest, GetLatestBlockResponse, -} from '../proto/cosmos/base/tendermint/v1beta1/query_pb' -import { QueryAccountRequest } from '../proto/cosmos/auth/v1beta1/query_pb' -import { GetTxRequest } from '../proto/cosmos/tx/v1beta1/service_pb' -import { BroadcastTxRequest } from '../proto/cosmos/tx/v1beta1/service_pb' -import { TxResponse } from '../proto/cosmos/base/abci/v1beta1/abci_pb' +} from '../codegen/cosmos/base/tendermint/v1beta1/query_pb' +import { QueryAccountRequest } from '../codegen/cosmos/auth/v1beta1/query_pb' +import { GetTxRequest } from '../codegen/cosmos/tx/v1beta1/service_pb' +import { BroadcastTxRequest } from '../codegen/cosmos/tx/v1beta1/service_pb' +import { TxResponse } from '../codegen/cosmos/base/abci/v1beta1/abci_pb' import { DataSource, OracleScript, PriceResult, -} from '../proto/oracle/v1/oracle_pb' -import { BaseAccount } from '../proto/cosmos/auth/v1beta1/auth_pb' +} from '../codegen/band/oracle/v1/oracle_pb' +import { BaseAccount } from '../codegen/cosmos/auth/v1beta1/auth_pb' -import { QueryAllBalancesRequest } from '../proto/cosmos/bank/v1beta1/query_pb' -import { Coin } from '../proto/cosmos/base/v1beta1/coin_pb' +import { QueryAllBalancesRequest } from '../codegen/cosmos/bank/v1beta1/query_pb' +import { Coin } from '../codegen/cosmos/base/v1beta1/coin_pb' export default class Client { queryClient: QueryClient diff --git a/src/index.ts b/src/index.ts index a9cc1b8..a4c7bee 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,18 +1,18 @@ export * as Data from './data' export * as Message from './message' export * as Wallet from './wallet' -export * as Feeds from '../proto/feeds/v1beta1/feeds_pb' +export * as Feeds from '../codegen/band/feeds/v1beta1/feeds_pb' export { default as Client } from './client' export { default as Transaction } from './transaction' export { Obi } from './obi' -export { Coin } from '../proto/cosmos/base/v1beta1/coin_pb' -export { Fee } from '../proto/cosmos/tx/v1beta1/tx_pb' +export { Coin } from '../codegen/cosmos/base/v1beta1/coin_pb' +export { Fee } from '../codegen/cosmos/tx/v1beta1/tx_pb' export * as Proposal from './proposal' -export { Plan } from '../proto/cosmos/upgrade/v1beta1/upgrade_pb' -export { ParamChange } from '../proto/cosmos/params/v1beta1/params_pb' -export { Params as FeedParams } from '../proto/feeds/v1beta1/params_pb' +export { Plan } from '../codegen/cosmos/upgrade/v1beta1/upgrade_pb' +export { ParamChange } from '../codegen/cosmos/params/v1beta1/params_pb' +export { Params as FeedParams } from '../codegen/band/feeds/v1beta1/params_pb' export { ReferenceSourceConfig, Signal, SignalPrice, -} from '../proto/feeds/v1beta1/feeds_pb' +} from '../codegen/band/feeds/v1beta1/feeds_pb' diff --git a/src/message.ts b/src/message.ts index f3f7571..f2ed1fa 100644 --- a/src/message.ts +++ b/src/message.ts @@ -9,62 +9,57 @@ import { ValueTooLargeError, } from './error' -import { MsgSend as MsgSendProto } from '../proto/cosmos/bank/v1beta1/tx_pb' -import { Coin } from '../proto/cosmos/base/v1beta1/coin_pb' -import { MsgWithdrawDelegatorReward as MsgWithdrawDelegatorRewardProto } from '../proto/cosmos/distribution/v1beta1/tx_pb' +import { MsgSend as MsgSendProto } from '../codegen/cosmos/bank/v1beta1/tx_pb' +import { Coin } from '../codegen/cosmos/base/v1beta1/coin_pb' +import { MsgWithdrawDelegatorReward as MsgWithdrawDelegatorRewardProto } from '../codegen/cosmos/distribution/v1beta1/tx_pb' import { Deposit as MsgDepositProto, Vote as MsgVoteProto, VoteOption, VoteOptionMap, -} from '../proto/cosmos/gov/v1beta1/gov_pb' +} from '../codegen/cosmos/gov/v1beta1/gov_pb' import { MsgVote as MsgVoteGroupProto, ExecMap as GroupExecMap, -} from '../proto/cosmos/group/v1/tx_pb' +} from '../codegen/cosmos/group/v1/tx_pb' import { VoteOption as VoteOptionGroup, VoteOptionMap as VoteOptionGroupMap, -} from '../proto/cosmos/group/v1/types_pb' +} from '../codegen/cosmos/group/v1/types_pb' import { MsgBeginRedelegate as MsgBeginRedelegateProto, MsgDelegate as MsgDelegateProto, MsgUndelegate as MsgUndelegateProto, -} from '../proto/cosmos/staking/v1beta1/tx_pb' -import { MsgVote as MsgVoteCouncilProto } from '../proto/council/v1beta1/tx_pb' -import { - VoteOption as VoteOptionCouncil, - VoteOptionMap as VoteOptionMapCouncil, -} from '../proto/council/v1beta1/types_pb' -import { MsgTransfer as MsgTransferProto } from '../proto/ibc/applications/transfer/v1/tx_pb' +} from '../codegen/cosmos/staking/v1beta1/tx_pb' + +import { MsgTransfer as MsgTransferProto } from '../codegen/ibc/applications/transfer/v1/tx_pb' import { MsgCreateDataSource as MsgCreateDataSourceProto, MsgCreateOracleScript as MsgCreateOracleScriptProto, MsgEditDataSource as MsgEditDataSourceProto, MsgEditOracleScript as MsgEditOracleScriptProto, MsgRequestData as MsgRequestDataProto, -} from '../proto/oracle/v1/tx_pb' +} from '../codegen/band/oracle/v1/tx_pb' import { Message as JSPBMesage } from 'google-protobuf' -import { MsgSubmitProposal as MsgSubmitProposalProto } from '../proto/cosmos/gov/v1beta1/tx_pb' -import { MsgSubmitProposal as MsgSubmitCouncilProposalProto } from '../proto/council/v1beta1/tx_pb' -import { CouncilType, CouncilTypeMap } from '../proto/council/v1beta1/types_pb' +import { MsgSubmitProposal as MsgSubmitProposalProto } from '../codegen/cosmos/gov/v1beta1/tx_pb' + import { Proposal } from 'proposal' import { - MsgSubmitSignals as MsgSubmitSignalsProto, + MsgVote as MsgVoteSignalProto, MsgSubmitSignalPrices as MsgSubmitSignalPricesProto, MsgUpdateReferenceSourceConfig as MsgUpdateReferenceSourceConfigProto, MsgUpdateParams as MsgUpdateParamsProto, -} from '../proto/feeds/v1beta1/tx_pb' +} from '../codegen/band/feeds/v1beta1/tx_pb' import { ReferenceSourceConfig, Signal, SignalPrice, -} from '../proto/feeds/v1beta1/feeds_pb' -import { Params } from '../proto/feeds/v1beta1/params_pb' +} from '../codegen/band/feeds/v1beta1/feeds_pb' +import { Params } from '../codegen/band/feeds/v1beta1/params_pb' import { bech32 } from 'bech32' export interface BaseMsg extends JSPBMesage { @@ -779,115 +774,6 @@ export class MsgSubmitProposal } } -export class MsgSubmitCouncilProposal - extends MsgSubmitCouncilProposalProto - implements BaseMsg -{ - constructor( - title: string, - council: CouncilTypeMap[keyof CouncilTypeMap], - proposer: string, - public messagesList: Array, - metadata: string, - ) { - super() - this.setTitle(title) - this.setCouncil(council) - this.setMessagesList( - messagesList.map((msg) => { - return msg.toAny() - }), - ) - this.setProposer(proposer) - this.setMetadata(metadata) - } - - toAny(): Any { - this.validate() - - const anyMsg = new Any() - const name = 'council.v1beta1.MsgSubmitProposal' - anyMsg.pack(this.serializeBinary(), name, '/') - return anyMsg - } - - toJSON(): object { - const { messagesList } = this - return { - type: 'council/MsgSubmitProposal', - value: { - title: this.getTitle().toString(), - council: this.getCouncil().toString(), - messages: messagesList.map((msg: BaseMsg) => msg.toJSON()), - metadata: this.getMetadata().toString(), - }, - } - } - - validate() { - if (this.getCouncil() == CouncilType.COUNCIL_TYPE_UNSPECIFIED) { - throw new ValueError('council should not be COUNCIL_TYPE_UNSPECIFIED') - } - if (this.getTitle() === '') { - throw new ValueError('title should not be an empty string') - } - if (this.getMessagesList().length === 0) { - throw new ValueError('messages should not be an empty string') - } - if (this.getMetadata() === '') { - throw new ValueError('metadata should not be an empty string') - } - if (this.getProposer() === '') { - throw new ValueError('proposer should not be an empty string') - } - } -} - -export class MsgVoteCouncil extends MsgVoteCouncilProto implements BaseMsg { - constructor( - proposalId: number, - voter: string, - option: VoteOptionMapCouncil[keyof VoteOptionMapCouncil], - ) { - super() - this.setProposalId(proposalId) - this.setVoter(voter) - this.setOption(option) - } - - toAny(): Any { - this.validate() - - const anyMsg = new Any() - const name = 'council.v1beta1.MsgVote' - anyMsg.pack(this.serializeBinary(), name, '/') - return anyMsg - } - - toJSON(): object { - return { - type: 'council/MsgVote', - value: { - proposal_id: this.getProposalId().toString(), - voter: this.getVoter().toString(), - option: this.getOption().toString(), - }, - } - } - - validate() { - if (this.getProposalId() <= 0) { - throw new NegativeIntegerError('proposalId cannot be less than zero') - } - if (this.getVoter() === '') { - throw new ValueError('Address should not be an empty string') - } - if (this.getOption() === VoteOptionCouncil.VOTE_OPTION_UNSPECIFIED) { - throw new ValueError('VoteOption should not be VOTE_OPTION_UNSPECIFIED') - } - } -} - export class MsgDeposit extends MsgDepositProto implements BaseMsg { constructor(proposalId: number, depositor: string, amountList: Coin[]) { super() @@ -983,10 +869,10 @@ export class MsgVoteGroup extends MsgVoteGroupProto implements BaseMsg { } } -export class MsgSubmitSignals extends MsgSubmitSignalsProto implements BaseMsg { - constructor(delegator: string, signals: Signal[]) { +export class MsgVoteSignals extends MsgVoteSignalProto implements BaseMsg { + constructor(voter: string, signals: Signal[]) { super() - this.setDelegator(delegator) + this.setVoter(voter) this.setSignalsList(signals) } @@ -994,24 +880,24 @@ export class MsgSubmitSignals extends MsgSubmitSignalsProto implements BaseMsg { this.validate() const anyMsg = new Any() - const name = 'feeds.v1beta1.MsgSubmitSignals' + const name = 'band.feeds.v1beta1.MsgVote' anyMsg.pack(this.serializeBinary(), name, '/') return anyMsg } toJSON(): object { return { - type: 'feeds.v1beta1.MsgSubmitSignals', + type: 'feeds/MsgVote', value: { - delegator_address: this.getDelegator(), - amount: this.getSignalsList(), + voter: this.getVoter(), + signals: this.getSignalsList().map((signal) => signal.toObject()), }, } } validate() { - if (this.getDelegator() === '') { - throw new ValueError('Delegator address should not be an empty string') + if (this.getVoter() === '') { + throw new ValueError('Voter address should not be an empty string') } } } @@ -1024,25 +910,27 @@ export class MsgSubmitSignalPrices super() this.setValidator(validator) this.setTimestamp(timestamp) - this.setPricesList(pricesList) + this.setSignalPricesList(pricesList) } toAny(): Any { this.validate() const anyMsg = new Any() - const name = 'feeds.v1beta1.MsgSubmitSignalPrices' + const name = 'band.feeds.v1beta1.MsgSubmitSignalPrices' anyMsg.pack(this.serializeBinary(), name, '/') return anyMsg } toJSON(): object { return { - type: 'feeds.v1beta1.MsgSubmitSignalPrices', + type: 'feeds/MsgSubmitSignalPrices', value: { validator: this.getValidator(), timestamp: this.getTimestamp(), - pricesList: this.getPricesList(), + signalPrices: this.getSignalPricesList().map((signalPrice) => + signalPrice.toObject(), + ), }, } } diff --git a/src/proposal.ts b/src/proposal.ts index 32241db..0a2658c 100644 --- a/src/proposal.ts +++ b/src/proposal.ts @@ -1,17 +1,16 @@ import { Any } from 'google-protobuf/google/protobuf/any_pb' -import { CommunityPoolSpendProposal as CommunityPoolSpendProposalPb } from '../proto/cosmos/distribution/v1beta1/distribution_pb' -import { TextProposal as TextProposalPb } from '../proto/cosmos/gov/v1beta1/gov_pb' +import { CommunityPoolSpendProposal as CommunityPoolSpendProposalPb } from '../codegen/cosmos/distribution/v1beta1/distribution_pb' +import { TextProposal as TextProposalPb } from '../codegen/cosmos/gov/v1beta1/gov_pb' import { ParamChange, ParameterChangeProposal as ParameterChangeProposalPb, -} from '../proto/cosmos/params/v1beta1/params_pb' +} from '../codegen/cosmos/params/v1beta1/params_pb' import { CancelSoftwareUpgradeProposal as CancelSoftwareUpgradeProposalPb, Plan, SoftwareUpgradeProposal as SoftwareUpgradeProposalPb, -} from '../proto/cosmos/upgrade/v1beta1/upgrade_pb' -import { VetoProposal as VetoProposalPb } from '../proto/council/v1beta1/types_pb' -import { Coin } from '../proto/cosmos/base/v1beta1/coin_pb' +} from '../codegen/cosmos/upgrade/v1beta1/upgrade_pb' +import { Coin } from '../codegen/cosmos/base/v1beta1/coin_pb' import { BaseMsg } from 'message' export class TextProposal extends TextProposalPb implements BaseMsg { @@ -181,30 +180,6 @@ export class CancelSoftwareUpgradeProposal } } -export class VetoProposal extends VetoProposalPb implements BaseMsg { - constructor(proposalId: number, description: string) { - super() - this.setProposalId(proposalId) - this.setDescription(description) - } - - toAny() { - const any = new Any() - any.pack(this.serializeBinary(), 'council.v1beta1.VetoProposal', '/') - return any - } - - toJSON(): object { - return { - type: 'council/VetoProposal', - value: { - proposal_id: this.getProposalId().toString(), - description: this.getDescription().toString(), - }, - } - } -} - export namespace Proposal { export type Content = | TextProposal @@ -212,5 +187,4 @@ export namespace Proposal { | ParameterChangeProposal | SoftwareUpgradeProposal | CancelSoftwareUpgradeProposal - | VetoProposal } diff --git a/src/transaction.ts b/src/transaction.ts index a505656..0c9acf5 100644 --- a/src/transaction.ts +++ b/src/transaction.ts @@ -18,13 +18,13 @@ import { AuthInfo, SignDoc, TxRaw, -} from '../proto/cosmos/tx/v1beta1/tx_pb' +} from '../codegen/cosmos/tx/v1beta1/tx_pb' import { SignMode, SignModeMap, -} from '../proto/cosmos/tx/signing/v1beta1/signing_pb' +} from '../codegen/cosmos/tx/signing/v1beta1/signing_pb' import { Any } from 'google-protobuf/google/protobuf/any_pb' -import { Fee } from '../proto/cosmos/tx/v1beta1/tx_pb' +import { Fee } from '../codegen/cosmos/tx/v1beta1/tx_pb' export default class Transaction { msgs: Array = [] @@ -179,7 +179,7 @@ export default class Transaction { account_number: this.accountNum.toString(), chain_id: this.chainId, fee: { - amount: this.fee.getAmountList().map(coin => coin.toObject()), + amount: this.fee.getAmountList().map((coin) => coin.toObject()), gas: this.fee.getGasLimit().toString(), }, memo: this.memo, diff --git a/src/wallet.ts b/src/wallet.ts index 07f2a4b..e82d810 100644 --- a/src/wallet.ts +++ b/src/wallet.ts @@ -17,7 +17,7 @@ import { DecodeError, ValueError, } from './error' -import { PubKey as PublicKeyProto } from '../proto/cosmos/crypto/secp256k1/keys_pb' +import { PubKey as PublicKeyProto } from '../codegen/cosmos/crypto/secp256k1/keys_pb' const ECPair = ECPairFactory(ecc) const bip32 = BIP32Factory(ecc)